(function(){function _defineProperty2(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}System.register([],(function(exports,module){"use strict";var __vite_style__=document.createElement("style");return __vite_style__.textContent=':root{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: .10667rem;--van-padding-xs: .21333rem;--van-padding-sm: .32rem;--van-padding-md: .42667rem;--van-padding-lg: .64rem;--van-padding-xl: .85333rem;--van-font-bold: 600;--van-font-size-xs: .26667rem;--van-font-size-sm: .32rem;--van-font-size-md: .37333rem;--van-font-size-lg: .42667rem;--van-line-height-xs: .37333rem;--van-line-height-sm: .48rem;--van-line-height-md: .53333rem;--van-line-height-lg: .58667rem;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: .02667rem;--van-radius-sm: .05333rem;--van-radius-md: .10667rem;--van-radius-lg: .21333rem;--van-radius-max: 26.64rem}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}:root{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 1.33333rem}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}:root{--van-badge-size: .42667rem;--van-badge-color: var(--van-white);--van-badge-padding: 0 .08rem;--van-badge-font-size: var(--van-font-size-sm);--van-badge-font-weight: var(--van-font-bold);--van-badge-border-width: var(--van-border-width);--van-badge-background: var(--van-danger-color);--van-badge-dot-color: var(--van-danger-color);--van-badge-dot-size: .21333rem;--van-badge-font: -apple-system-font, helvetica neue, arial, sans-serif}.van-badge{display:inline-block;box-sizing:border-box;min-width:var(--van-badge-size);padding:var(--van-badge-padding);color:var(--van-badge-color);font-weight:var(--van-badge-font-weight);font-size:var(--van-badge-font-size);font-family:var(--van-badge-font);line-height:1.2;text-align:center;background:var(--van-badge-background);border:var(--van-badge-border-width) solid var(--van-background-2);border-radius:var(--van-radius-max)}.van-badge--fixed{position:absolute;transform-origin:100%}.van-badge--top-left{top:0;left:0;transform:translate(-50%,-50%)}.van-badge--top-right{top:0;right:0;transform:translate(50%,-50%)}.van-badge--bottom-left{bottom:0;left:0;transform:translate(-50%,50%)}.van-badge--bottom-right{bottom:0;right:0;transform:translate(50%,50%)}.van-badge--dot{width:var(--van-badge-dot-size);min-width:0;height:var(--van-badge-dot-size);background:var(--van-badge-dot-color);border-radius:100%;border:none;padding:0}.van-badge__wrapper{position:relative;display:inline-block}.van-icon{position:relative;display:inline-block;font:.37333rem/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon:before{display:inline-block}.van-icon-exchange:before{content:"\\e6af"}.van-icon-eye:before{content:"\\e6b0"}.van-icon-enlarge:before{content:"\\e6b1"}.van-icon-expand-o:before{content:"\\e6b2"}.van-icon-eye-o:before{content:"\\e6b3"}.van-icon-expand:before{content:"\\e6b4"}.van-icon-filter-o:before{content:"\\e6b5"}.van-icon-fire:before{content:"\\e6b6"}.van-icon-fail:before{content:"\\e6b7"}.van-icon-failure:before{content:"\\e6b8"}.van-icon-fire-o:before{content:"\\e6b9"}.van-icon-flag-o:before{content:"\\e6ba"}.van-icon-font:before{content:"\\e6bb"}.van-icon-font-o:before{content:"\\e6bc"}.van-icon-gem-o:before{content:"\\e6bd"}.van-icon-flower-o:before{content:"\\e6be"}.van-icon-gem:before{content:"\\e6bf"}.van-icon-gift-card:before{content:"\\e6c0"}.van-icon-friends:before{content:"\\e6c1"}.van-icon-friends-o:before{content:"\\e6c2"}.van-icon-gold-coin:before{content:"\\e6c3"}.van-icon-gold-coin-o:before{content:"\\e6c4"}.van-icon-good-job-o:before{content:"\\e6c5"}.van-icon-gift:before{content:"\\e6c6"}.van-icon-gift-o:before{content:"\\e6c7"}.van-icon-gift-card-o:before{content:"\\e6c8"}.van-icon-good-job:before{content:"\\e6c9"}.van-icon-home-o:before{content:"\\e6ca"}.van-icon-goods-collect:before{content:"\\e6cb"}.van-icon-graphic:before{content:"\\e6cc"}.van-icon-goods-collect-o:before{content:"\\e6cd"}.van-icon-hot-o:before{content:"\\e6ce"}.van-icon-info:before{content:"\\e6cf"}.van-icon-hotel-o:before{content:"\\e6d0"}.van-icon-info-o:before{content:"\\e6d1"}.van-icon-hot-sale-o:before{content:"\\e6d2"}.van-icon-hot:before{content:"\\e6d3"}.van-icon-like:before{content:"\\e6d4"}.van-icon-idcard:before{content:"\\e6d5"}.van-icon-invitation:before{content:"\\e6d6"}.van-icon-like-o:before{content:"\\e6d7"}.van-icon-hot-sale:before{content:"\\e6d8"}.van-icon-location-o:before{content:"\\e6d9"}.van-icon-location:before{content:"\\e6da"}.van-icon-label:before{content:"\\e6db"}.van-icon-lock:before{content:"\\e6dc"}.van-icon-label-o:before{content:"\\e6dd"}.van-icon-map-marked:before{content:"\\e6de"}.van-icon-logistics:before{content:"\\e6df"}.van-icon-manager:before{content:"\\e6e0"}.van-icon-more:before{content:"\\e6e1"}.van-icon-live:before{content:"\\e6e2"}.van-icon-manager-o:before{content:"\\e6e3"}.van-icon-medal:before{content:"\\e6e4"}.van-icon-more-o:before{content:"\\e6e5"}.van-icon-music-o:before{content:"\\e6e6"}.van-icon-music:before{content:"\\e6e7"}.van-icon-new-arrival-o:before{content:"\\e6e8"}.van-icon-medal-o:before{content:"\\e6e9"}.van-icon-new-o:before{content:"\\e6ea"}.van-icon-free-postage:before{content:"\\e6eb"}.van-icon-newspaper-o:before{content:"\\e6ec"}.van-icon-new-arrival:before{content:"\\e6ed"}.van-icon-minus:before{content:"\\e6ee"}.van-icon-orders-o:before{content:"\\e6ef"}.van-icon-new:before{content:"\\e6f0"}.van-icon-paid:before{content:"\\e6f1"}.van-icon-notes-o:before{content:"\\e6f2"}.van-icon-other-pay:before{content:"\\e6f3"}.van-icon-pause-circle:before{content:"\\e6f4"}.van-icon-pause:before{content:"\\e6f5"}.van-icon-pause-circle-o:before{content:"\\e6f6"}.van-icon-peer-pay:before{content:"\\e6f7"}.van-icon-pending-payment:before{content:"\\e6f8"}.van-icon-passed:before{content:"\\e6f9"}.van-icon-plus:before{content:"\\e6fa"}.van-icon-phone-circle-o:before{content:"\\e6fb"}.van-icon-phone-o:before{content:"\\e6fc"}.van-icon-printer:before{content:"\\e6fd"}.van-icon-photo-fail:before{content:"\\e6fe"}.van-icon-phone:before{content:"\\e6ff"}.van-icon-photo-o:before{content:"\\e700"}.van-icon-play-circle:before{content:"\\e701"}.van-icon-play:before{content:"\\e702"}.van-icon-phone-circle:before{content:"\\e703"}.van-icon-point-gift-o:before{content:"\\e704"}.van-icon-point-gift:before{content:"\\e705"}.van-icon-play-circle-o:before{content:"\\e706"}.van-icon-shrink:before{content:"\\e707"}.van-icon-photo:before{content:"\\e708"}.van-icon-qr:before{content:"\\e709"}.van-icon-qr-invalid:before{content:"\\e70a"}.van-icon-question-o:before{content:"\\e70b"}.van-icon-revoke:before{content:"\\e70c"}.van-icon-replay:before{content:"\\e70d"}.van-icon-service:before{content:"\\e70e"}.van-icon-question:before{content:"\\e70f"}.van-icon-search:before{content:"\\e710"}.van-icon-refund-o:before{content:"\\e711"}.van-icon-service-o:before{content:"\\e712"}.van-icon-scan:before{content:"\\e713"}.van-icon-share:before{content:"\\e714"}.van-icon-send-gift-o:before{content:"\\e715"}.van-icon-share-o:before{content:"\\e716"}.van-icon-setting:before{content:"\\e717"}.van-icon-points:before{content:"\\e718"}.van-icon-photograph:before{content:"\\e719"}.van-icon-shop:before{content:"\\e71a"}.van-icon-shop-o:before{content:"\\e71b"}.van-icon-shop-collect-o:before{content:"\\e71c"}.van-icon-shop-collect:before{content:"\\e71d"}.van-icon-smile:before{content:"\\e71e"}.van-icon-shopping-cart-o:before{content:"\\e71f"}.van-icon-sign:before{content:"\\e720"}.van-icon-sort:before{content:"\\e721"}.van-icon-star-o:before{content:"\\e722"}.van-icon-smile-comment-o:before{content:"\\e723"}.van-icon-stop:before{content:"\\e724"}.van-icon-stop-circle-o:before{content:"\\e725"}.van-icon-smile-o:before{content:"\\e726"}.van-icon-star:before{content:"\\e727"}.van-icon-success:before{content:"\\e728"}.van-icon-stop-circle:before{content:"\\e729"}.van-icon-records:before{content:"\\e72a"}.van-icon-shopping-cart:before{content:"\\e72b"}.van-icon-tosend:before{content:"\\e72c"}.van-icon-todo-list:before{content:"\\e72d"}.van-icon-thumb-circle-o:before{content:"\\e72e"}.van-icon-thumb-circle:before{content:"\\e72f"}.van-icon-umbrella-circle:before{content:"\\e730"}.van-icon-underway:before{content:"\\e731"}.van-icon-upgrade:before{content:"\\e732"}.van-icon-todo-list-o:before{content:"\\e733"}.van-icon-tv-o:before{content:"\\e734"}.van-icon-underway-o:before{content:"\\e735"}.van-icon-user-o:before{content:"\\e736"}.van-icon-vip-card-o:before{content:"\\e737"}.van-icon-vip-card:before{content:"\\e738"}.van-icon-send-gift:before{content:"\\e739"}.van-icon-wap-home:before{content:"\\e73a"}.van-icon-wap-nav:before{content:"\\e73b"}.van-icon-volume-o:before{content:"\\e73c"}.van-icon-video:before{content:"\\e73d"}.van-icon-wap-home-o:before{content:"\\e73e"}.van-icon-volume:before{content:"\\e73f"}.van-icon-warning:before{content:"\\e740"}.van-icon-weapp-nav:before{content:"\\e741"}.van-icon-wechat-pay:before{content:"\\e742"}.van-icon-warning-o:before{content:"\\e743"}.van-icon-wechat:before{content:"\\e744"}.van-icon-setting-o:before{content:"\\e745"}.van-icon-youzan-shield:before{content:"\\e746"}.van-icon-warn-o:before{content:"\\e747"}.van-icon-smile-comment:before{content:"\\e748"}.van-icon-user-circle-o:before{content:"\\e749"}.van-icon-video-o:before{content:"\\e74a"}.van-icon-add-square:before{content:"\\e65c"}.van-icon-add:before{content:"\\e65d"}.van-icon-arrow-down:before{content:"\\e65e"}.van-icon-arrow-up:before{content:"\\e65f"}.van-icon-arrow:before{content:"\\e660"}.van-icon-after-sale:before{content:"\\e661"}.van-icon-add-o:before{content:"\\e662"}.van-icon-alipay:before{content:"\\e663"}.van-icon-ascending:before{content:"\\e664"}.van-icon-apps-o:before{content:"\\e665"}.van-icon-aim:before{content:"\\e666"}.van-icon-award:before{content:"\\e667"}.van-icon-arrow-left:before{content:"\\e668"}.van-icon-award-o:before{content:"\\e669"}.van-icon-audio:before{content:"\\e66a"}.van-icon-bag-o:before{content:"\\e66b"}.van-icon-balance-list:before{content:"\\e66c"}.van-icon-back-top:before{content:"\\e66d"}.van-icon-bag:before{content:"\\e66e"}.van-icon-balance-pay:before{content:"\\e66f"}.van-icon-balance-o:before{content:"\\e670"}.van-icon-bar-chart-o:before{content:"\\e671"}.van-icon-bars:before{content:"\\e672"}.van-icon-balance-list-o:before{content:"\\e673"}.van-icon-birthday-cake-o:before{content:"\\e674"}.van-icon-bookmark:before{content:"\\e675"}.van-icon-bill:before{content:"\\e676"}.van-icon-bell:before{content:"\\e677"}.van-icon-browsing-history-o:before{content:"\\e678"}.van-icon-browsing-history:before{content:"\\e679"}.van-icon-bookmark-o:before{content:"\\e67a"}.van-icon-bulb-o:before{content:"\\e67b"}.van-icon-bullhorn-o:before{content:"\\e67c"}.van-icon-bill-o:before{content:"\\e67d"}.van-icon-calendar-o:before{content:"\\e67e"}.van-icon-brush-o:before{content:"\\e67f"}.van-icon-card:before{content:"\\e680"}.van-icon-cart-o:before{content:"\\e681"}.van-icon-cart-circle:before{content:"\\e682"}.van-icon-cart-circle-o:before{content:"\\e683"}.van-icon-cart:before{content:"\\e684"}.van-icon-cash-on-deliver:before{content:"\\e685"}.van-icon-cash-back-record:before{content:"\\e686"}.van-icon-cashier-o:before{content:"\\e687"}.van-icon-chart-trending-o:before{content:"\\e688"}.van-icon-certificate:before{content:"\\e689"}.van-icon-chat:before{content:"\\e68a"}.van-icon-clear:before{content:"\\e68b"}.van-icon-chat-o:before{content:"\\e68c"}.van-icon-checked:before{content:"\\e68d"}.van-icon-clock:before{content:"\\e68e"}.van-icon-clock-o:before{content:"\\e68f"}.van-icon-close:before{content:"\\e690"}.van-icon-closed-eye:before{content:"\\e691"}.van-icon-circle:before{content:"\\e692"}.van-icon-cluster-o:before{content:"\\e693"}.van-icon-column:before{content:"\\e694"}.van-icon-comment-circle-o:before{content:"\\e695"}.van-icon-cluster:before{content:"\\e696"}.van-icon-comment:before{content:"\\e697"}.van-icon-comment-o:before{content:"\\e698"}.van-icon-comment-circle:before{content:"\\e699"}.van-icon-completed:before{content:"\\e69a"}.van-icon-credit-pay:before{content:"\\e69b"}.van-icon-coupon:before{content:"\\e69c"}.van-icon-debit-pay:before{content:"\\e69d"}.van-icon-coupon-o:before{content:"\\e69e"}.van-icon-contact:before{content:"\\e69f"}.van-icon-descending:before{content:"\\e6a0"}.van-icon-desktop-o:before{content:"\\e6a1"}.van-icon-diamond-o:before{content:"\\e6a2"}.van-icon-description:before{content:"\\e6a3"}.van-icon-delete:before{content:"\\e6a4"}.van-icon-diamond:before{content:"\\e6a5"}.van-icon-delete-o:before{content:"\\e6a6"}.van-icon-cross:before{content:"\\e6a7"}.van-icon-edit:before{content:"\\e6a8"}.van-icon-ellipsis:before{content:"\\e6a9"}.van-icon-down:before{content:"\\e6aa"}.van-icon-discount:before{content:"\\e6ab"}.van-icon-ecard-pay:before{content:"\\e6ac"}.van-icon-envelop-o:before{content:"\\e6ae"}.van-icon-shield-o:before{content:"\\e74b"}.van-icon-guide-o:before{content:"\\e74c"}.van-icon-cash-o:before{content:"\\e74d"}.van-icon-qq:before{content:"\\e74e"}.van-icon-wechat-moments:before{content:"\\e74f"}.van-icon-weibo:before{content:"\\e750"}.van-icon-link-o:before{content:"\\e751"}.van-icon-miniprogram-o:before{content:"\\e752"}@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAGAgAA0AAAAA34AAAF/FAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCShEICoOWIIK6dAuDdAABNgIkA4N6BCAFhQ4HlRUb9q51B8h1O4AkUtvLGIkQNg4Ake1DZ///x+TGmFAifdkzRYUNWmGzVcusxJ63YJ8dHfe+KIHghunNX2CmdJrQVCF2JKmxNGunPaLGLvxCy+jknqsM//A/rYfPwLaRP8nJOzzfNt9HwIMvl8r/CgiCeCKKoPyvNyB44Ql4Vl53giaWHXaYttIOq3WvzNrEaldtbbXOpW7Zqa3WypXYtZXZWqtdMbBtzM06zF0dRqJN/Ndt392fEw04xCThNMtyiZNmgkBa1Nl/EysgV0oVx3IdupYPgKbHI01//pc5q27DbFW3JCeHiJYV2JsALbI/0lf6BmZmEe4JQL/lLdsCPrbr802ftjhV8OHfuSqvwEmCnESQXYdiayIRZAVd9lRXrv1Nfp9EsLlJvKi0HRPwyMmvzTuXn9j0kxrQIQ6QAzcGN8etbYwZPI8WAH7gx3em0q+0saRnuBTNJSAnPijlUuKs6B/71/4NOE7bUcI3gtwAKO0G5pnzKB5ughso4QNROGx8T0Cmc3pcN0izuUyKohr/3tTKC7tpdjl3MqCcna2rqeJc5iqXcSZSkr1+/zfQ///+jUY3wAW7SQ4I7IxAYEYLgMMTSHB3CQKDM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zrT92G1R1hoFhlS35bOXNIyGkDJeoyAbAkmJNMKiAP9sRdMa+SKbMtyQdrBjdx2SB2VTASFqoeAmD2Q5Y1ZPWPg5Qq9LkVJO1/uCCK7kcvQEsiWlZ+VTuGTwJJrAKmHnkGuN422fVBRQjzt9qM+5Ox6s5QVg4gVg5LQBoX3C7GhrqYaYjTjwBZ0QP3x4LjrSRh9MdIGqCPQ49p9TU2cdeoQ7zCq9klMIUfC5P6x0E9ljP3FQeCEF9xrhjejj3vzawWaGmOTmx+PBAtkWJR6tK0JknDigh9nbeE0Ip7/fENE3FZrlNJoLfJDocOBqsn4XBu8ZkIz4U1dSo0WUtTSIFTMpnvOXQnzC5168OSoXtiSoUwP1Z7UG0OrdjUeEwomR5rksSsFCNa42owjR9etIzk7opSs9zRa/UaCHZpQWfYCqqReW8cmYIchGw5beCBiLvIXGzxVgdT5tdK6rTA6DUe9Wo5yPFyEsfVFIkS1WsQBxlcHjbzepoEE294LBlX2+xeJJN0W0NBBi3YKG4AxORuIiJSN5Jli7eylPnJKdZ/hSjhTnkXX14B2LVcFlg/e25n2VDInLC42mF8130th1+ipl8NuQctrmzOh6QXr2u8PuPVjpiJQQ/D0aa+kvm7SXPASXTDJrwnkOufHqA9pB7CjBY6ZoXL569Y9XbjzTVF0jrVfSxCbSOdSwoHMCW21qCOMFaC3tQO33qPpVLl3iF3PBhKhPjCGQ9IYp3L6ygBAAA=) format("woff2"),url(//at.alicdn.com/t/c/font_2553510_ovbl29ce9ud.woff?t=1672541115585) format("woff")}.van-icon__image{display:block;width:1em;height:1em;object-fit:contain}:root{--van-skeleton-image-size: 2.56rem;--van-skeleton-image-radius: .64rem}.van-skeleton-image{display:flex;width:var(--van-skeleton-image-size);height:var(--van-skeleton-image-size);align-items:center;justify-content:center;background:var(--van-active-color)}.van-skeleton-image--round{border-radius:var(--van-skeleton-image-radius)}.van-skeleton-image__icon{width:calc(var(--van-skeleton-image-size) / 2);height:calc(var(--van-skeleton-image-size) / 2);font-size:calc(var(--van-skeleton-image-size) / 2);color:var(--van-gray-5)}:root{--van-rate-icon-size: .53333rem;--van-rate-icon-gutter: var(--van-padding-base);--van-rate-icon-void-color: var(--van-gray-5);--van-rate-icon-full-color: var(--van-danger-color);--van-rate-icon-disabled-color: var(--van-gray-5)}.van-rate{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap}.van-rate__item{position:relative}.van-rate__item:not(:last-child){padding-right:var(--van-rate-icon-gutter)}.van-rate__icon{display:block;width:1em;color:var(--van-rate-icon-void-color);font-size:var(--van-rate-icon-size)}.van-rate__icon--half{position:absolute;top:0;left:0;overflow:hidden}.van-rate__icon--full{color:var(--van-rate-icon-full-color)}.van-rate__icon--disabled{color:var(--van-rate-icon-disabled-color)}.van-rate--disabled{cursor:not-allowed}.van-rate--readonly{cursor:default}:root{--van-notice-bar-height: 1.06667rem;--van-notice-bar-padding: 0 var(--van-padding-md);--van-notice-bar-wrapable-padding: var(--van-padding-xs) var(--van-padding-md);--van-notice-bar-text-color: var(--van-orange-dark);--van-notice-bar-font-size: var(--van-font-size-md);--van-notice-bar-line-height: .64rem;--van-notice-bar-background: var(--van-orange-light);--van-notice-bar-icon-size: .42667rem;--van-notice-bar-icon-min-width: .64rem}.van-notice-bar{position:relative;display:flex;align-items:center;height:var(--van-notice-bar-height);padding:var(--van-notice-bar-padding);color:var(--van-notice-bar-text-color);font-size:var(--van-notice-bar-font-size);line-height:var(--van-notice-bar-line-height);background:var(--van-notice-bar-background)}.van-notice-bar__left-icon,.van-notice-bar__right-icon{min-width:var(--van-notice-bar-icon-min-width);font-size:var(--van-notice-bar-icon-size)}.van-notice-bar__right-icon{text-align:right;cursor:pointer}.van-notice-bar__wrap{position:relative;display:flex;flex:1;align-items:center;height:100%;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap;transition-timing-function:linear}.van-notice-bar__content.van-ellipsis{max-width:100%}.van-notice-bar--wrapable{height:auto;padding:var(--van-notice-bar-wrapable-padding)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal;word-wrap:break-word}:root{--van-nav-bar-height: 1.22667rem;--van-nav-bar-background: var(--van-background-2);--van-nav-bar-arrow-size: .42667rem;--van-nav-bar-icon-color: var(--van-primary-color);--van-nav-bar-text-color: var(--van-primary-color);--van-nav-bar-title-font-size: var(--van-font-size-lg);--van-nav-bar-title-text-color: var(--van-text-color);--van-nav-bar-z-index: 1}.van-nav-bar{position:relative;z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background);-webkit-user-select:none;user-select:none}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--van-nav-bar-height)}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;margin:0 auto;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-bold);font-size:var(--van-nav-bar-title-font-size)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--van-padding-md);font-size:var(--van-font-size-md)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)}:root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: .85333rem;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: .85333rem;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}:root{--van-back-top-size: 1.06667rem;--van-back-top-right: .8rem;--van-back-top-bottom: 1.06667rem;--van-back-top-z-index: 100;--van-back-top-icon-size: .53333rem;--van-back-top-text-color: #fff;--van-back-top-background: var(--van-blue)}.van-back-top{position:fixed;display:flex;align-items:center;justify-content:center;width:var(--van-back-top-size);height:var(--van-back-top-size);right:var(--van-back-top-right);bottom:var(--van-back-top-bottom);z-index:var(--van-back-top-z-index);cursor:pointer;color:var(--van-back-top-text-color);border-radius:var(--van-radius-max);box-shadow:0 .05333rem .21333rem rgba(0,0,0,.12);transform:scale(0);transition:var(--van-duration-base) cubic-bezier(.25,.8,.5,1);background-color:var(--van-back-top-background)}.van-back-top:active{opacity:var(--van-active-opacity)}.van-back-top--active{transform:scale(1)}.van-back-top__icon{font-size:var(--van-back-top-icon-size);font-weight:var(--van-font-bold)}:root{--van-tag-padding: 0 var(--van-padding-base);--van-tag-text-color: var(--van-white);--van-tag-font-size: var(--van-font-size-sm);--van-tag-radius: .05333rem;--van-tag-line-height: .42667rem;--van-tag-medium-padding: .05333rem .16rem;--van-tag-large-padding: var(--van-padding-base) var(--van-padding-xs);--van-tag-large-radius: var(--van-radius-md);--van-tag-large-font-size: var(--van-font-size-md);--van-tag-round-radius: var(--van-radius-max);--van-tag-danger-color: var(--van-danger-color);--van-tag-primary-color: var(--van-primary-color);--van-tag-success-color: var(--van-success-color);--van-tag-warning-color: var(--van-warning-color);--van-tag-default-color: var(--van-gray-6);--van-tag-plain-background: var(--van-background-2)}.van-tag{position:relative;display:inline-flex;align-items:center;padding:var(--van-tag-padding);color:var(--van-tag-text-color);font-size:var(--van-tag-font-size);line-height:var(--van-tag-line-height);border-radius:var(--van-tag-radius)}.van-tag--default{background:var(--van-tag-default-color)}.van-tag--default.van-tag--plain{color:var(--van-tag-default-color)}.van-tag--danger{background:var(--van-tag-danger-color)}.van-tag--danger.van-tag--plain{color:var(--van-tag-danger-color)}.van-tag--primary{background:var(--van-tag-primary-color)}.van-tag--primary.van-tag--plain{color:var(--van-tag-primary-color)}.van-tag--success{background:var(--van-tag-success-color)}.van-tag--success.van-tag--plain{color:var(--van-tag-success-color)}.van-tag--warning{background:var(--van-tag-warning-color)}.van-tag--warning.van-tag--plain{color:var(--van-tag-warning-color)}.van-tag--plain{background:var(--van-tag-plain-background);border-color:currentColor}.van-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:.02667rem solid;border-color:inherit;border-radius:inherit;content:"";pointer-events:none}.van-tag--medium{padding:var(--van-tag-medium-padding)}.van-tag--large{padding:var(--van-tag-large-padding);font-size:var(--van-tag-large-font-size);border-radius:var(--van-tag-large-radius)}.van-tag--mark{border-radius:0 var(--van-tag-round-radius) var(--van-tag-round-radius) 0}.van-tag--mark:after{display:block;width:.05333rem;content:""}.van-tag--round{border-radius:var(--van-tag-round-radius)}.van-tag__close{margin-left:.05333rem}:root{--van-card-padding: var(--van-padding-xs) var(--van-padding-md);--van-card-font-size: var(--van-font-size-sm);--van-card-text-color: var(--van-text-color);--van-card-background: var(--van-background);--van-card-thumb-size: 2.34667rem;--van-card-thumb-radius: var(--van-radius-lg);--van-card-title-line-height: .42667rem;--van-card-desc-color: var(--van-text-color-2);--van-card-desc-line-height: var(--van-line-height-md);--van-card-price-color: var(--van-text-color);--van-card-origin-price-color: var(--van-text-color-2);--van-card-num-color: var(--van-text-color-2);--van-card-origin-price-font-size: var(--van-font-size-xs);--van-card-price-font-size: var(--van-font-size-sm);--van-card-price-integer-font-size: var(--van-font-size-lg);--van-card-price-font: var(--van-price-font)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background:var(--van-card-background)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__title,.van-card__desc{word-wrap:break-word}.van-card__title{max-height:.85333rem;font-weight:var(--van-font-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font)}.van-card__price-decimal{font-family:var(--van-card-price-font)}.van-card__origin-price{display:inline-block;margin-left:.13333rem;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:.05333rem;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:.13333rem}:root{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: .64rem;--van-cell-vertical-padding: .26667rem;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-icon-size: .42667rem;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md)}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:.02667rem solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}:root{--van-coupon-cell-selected-text-color: var(--van-text-color)}.van-coupon-cell__value--selected{color:var(--van-coupon-cell-selected-text-color)}:root{--van-contact-card-padding: var(--van-padding-md);--van-contact-card-add-icon-size: 1.06667rem;--van-contact-card-add-icon-color: var(--van-primary-color);--van-contact-card-title-line-height: var(--van-line-height-md)}.van-contact-card{padding:var(--van-contact-card-padding)}.van-contact-card__title{margin-left:.13333rem;line-height:var(--van-contact-card-title-line-height)}.van-contact-card--add .van-contact-card__value{line-height:var(--van-contact-card-add-icon-size)}.van-contact-card--add .van-cell__left-icon{color:var(--van-contact-card-add-icon-color);font-size:var(--van-contact-card-add-icon-size)}.van-contact-card:before{position:absolute;right:0;bottom:0;left:0;height:.05333rem;background:repeating-linear-gradient(-45deg,var(--van-warning-color) 0,var(--van-warning-color) 20%,transparent 0,transparent 25%,var(--van-primary-color) 0,var(--van-primary-color) 45%,transparent 0,transparent 50%);background-size:2.13333rem;content:""}:root{--van-collapse-item-duration: var(--van-duration-base);--van-collapse-item-content-padding: var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size: var(--van-font-size-md);--van-collapse-item-content-line-height: 1.5;--van-collapse-item-content-text-color: var(--van-text-color-2);--van-collapse-item-content-background: var(--van-background-2);--van-collapse-item-title-disabled-color: var(--van-text-color-3)}.van-collapse-item{position:relative}.van-collapse-item--border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:.02667rem solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon:before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-duration)}.van-collapse-item__title:after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon:before{transform:rotate(-90deg)}.van-collapse-item__title--expanded:after{display:block}.van-collapse-item__title--borderless:after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background)}:root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: .42667rem;--van-field-clear-icon-size: .42667rem;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: .32rem;--van-field-text-area-min-height: 1.6rem;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: .42667rem;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);word-break:break-word}.van-field__label--required:before{margin-right:.05333rem;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control:read-only{cursor:default}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}:root{--van-search-padding: .26667rem var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: .90667rem;--van-search-label-padding: 0 .13333rem;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}:root{--van-action-bar-icon-width: 1.28rem;--van-action-bar-icon-height: 100%;--van-action-bar-icon-color: var(--van-text-color);--van-action-bar-icon-size: .48rem;--van-action-bar-icon-font-size: var(--van-font-size-xs);--van-action-bar-icon-active-color: var(--van-active-color);--van-action-bar-icon-text-color: var(--van-text-color);--van-action-bar-icon-background: var(--van-background-2)}.van-action-bar-icon{display:flex;flex-direction:column;justify-content:center;min-width:var(--van-action-bar-icon-width);height:var(--van-action-bar-icon-height);color:var(--van-action-bar-icon-text-color);font-size:var(--van-action-bar-icon-font-size);line-height:1;text-align:center;background:var(--van-action-bar-icon-background);cursor:pointer}.van-action-bar-icon:active{background-color:var(--van-action-bar-icon-active-color)}.van-action-bar-icon__icon{margin:0 auto var(--van-padding-base);color:var(--van-action-bar-icon-color);font-size:var(--van-action-bar-icon-size)}:root{--van-loading-text-color: var(--van-text-color-2);--van-loading-text-font-size: var(--van-font-size-md);--van-loading-spinner-color: var(--van-gray-5);--van-loading-spinner-size: .8rem;--van-loading-spinner-duration: .8s}.van-loading{position:relative;color:var(--van-loading-spinner-color);font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:var(--van-loading-spinner-size);max-width:100%;height:var(--van-loading-spinner-size);max-height:100%;vertical-align:middle;animation:van-rotate var(--van-loading-spinner-duration) linear infinite}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{animation-duration:2s}.van-loading__line{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__line:before{display:block;width:.05333rem;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:var(--van-padding-xs);color:var(--van-loading-text-color);font-size:var(--van-loading-text-font-size);vertical-align:middle}.van-loading--vertical{display:flex;flex-direction:column;align-items:center}.van-loading--vertical .van-loading__text{margin:var(--van-padding-xs) 0 0}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__line--1{transform:rotate(30deg);opacity:1}.van-loading__line--2{transform:rotate(60deg);opacity:.9375}.van-loading__line--3{transform:rotate(90deg);opacity:.875}.van-loading__line--4{transform:rotate(120deg);opacity:.8125}.van-loading__line--5{transform:rotate(150deg);opacity:.75}.van-loading__line--6{transform:rotate(180deg);opacity:.6875}.van-loading__line--7{transform:rotate(210deg);opacity:.625}.van-loading__line--8{transform:rotate(240deg);opacity:.5625}.van-loading__line--9{transform:rotate(270deg);opacity:.5}.van-loading__line--10{transform:rotate(300deg);opacity:.4375}.van-loading__line--11{transform:rotate(330deg);opacity:.375}.van-loading__line--12{transform:rotate(360deg);opacity:.3125}:root{--van-pull-refresh-head-height: 1.33333rem;--van-pull-refresh-head-font-size: var(--van-font-size-md);--van-pull-refresh-head-text-color: var(--van-text-color-2);--van-pull-refresh-loading-icon-size: .42667rem}.van-pull-refresh{overflow:hidden}.van-pull-refresh__track{position:relative;height:100%;transition-property:transform}.van-pull-refresh__head{position:absolute;left:0;width:100%;height:var(--van-pull-refresh-head-height);overflow:hidden;color:var(--van-pull-refresh-head-text-color);font-size:var(--van-pull-refresh-head-font-size);line-height:var(--van-pull-refresh-head-height);text-align:center;transform:translateY(-100%)}.van-pull-refresh__loading .van-loading__spinner{width:var(--van-pull-refresh-loading-icon-size);height:var(--van-pull-refresh-loading-icon-size)}:root{--van-number-keyboard-background: var(--van-gray-2);--van-number-keyboard-key-height: 1.28rem;--van-number-keyboard-key-font-size: .74667rem;--van-number-keyboard-key-active-color: var(--van-gray-3);--van-number-keyboard-key-background: var(--van-background-2);--van-number-keyboard-delete-font-size: var(--van-font-size-lg);--van-number-keyboard-title-color: var(--van-gray-7);--van-number-keyboard-title-height: .90667rem;--van-number-keyboard-title-font-size: var(--van-font-size-lg);--van-number-keyboard-close-padding: 0 var(--van-padding-md);--van-number-keyboard-close-color: var(--van-primary-color);--van-number-keyboard-close-font-size: var(--van-font-size-md);--van-number-keyboard-button-text-color: var(--van-white);--van-number-keyboard-button-background: var(--van-primary-color);--van-number-keyboard-z-index: 100}.van-theme-dark{--van-number-keyboard-background: var(--van-gray-8);--van-number-keyboard-key-background: var(--van-gray-7);--van-number-keyboard-key-active-color: var(--van-gray-6)}.van-number-keyboard{position:fixed;bottom:0;left:0;z-index:var(--van-number-keyboard-z-index);width:100%;padding-bottom:.58667rem;background:var(--van-number-keyboard-background);-webkit-user-select:none;user-select:none}.van-number-keyboard--with-title{border-radius:.53333rem .53333rem 0 0}.van-number-keyboard__header{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;height:var(--van-number-keyboard-title-height);padding-top:.16rem;color:var(--van-number-keyboard-title-color);font-size:var(--van-number-keyboard-title-font-size)}.van-number-keyboard__title{display:inline-block;font-weight:400}.van-number-keyboard__title-left{position:absolute;left:0}.van-number-keyboard__body{display:flex;padding:.16rem 0 0 .16rem}.van-number-keyboard__keys{display:flex;flex:3;flex-wrap:wrap}.van-number-keyboard__close{position:absolute;right:0;height:100%;padding:var(--van-number-keyboard-close-padding);color:var(--van-number-keyboard-close-color);font-size:var(--van-number-keyboard-close-font-size);background-color:transparent;border:none}.van-number-keyboard__sidebar{display:flex;flex:1;flex-direction:column}.van-number-keyboard--unfit{padding-bottom:0}.van-key{display:flex;align-items:center;justify-content:center;height:var(--van-number-keyboard-key-height);font-size:var(--van-number-keyboard-key-font-size);line-height:1.5;background:var(--van-number-keyboard-key-background);border-radius:var(--van-radius-lg);cursor:pointer}.van-key--large{position:absolute;top:0;right:.16rem;bottom:.16rem;left:0;height:auto}.van-key--blue,.van-key--delete{font-size:var(--van-number-keyboard-delete-font-size)}.van-key--active{background-color:var(--van-number-keyboard-key-active-color)}.van-key--blue{color:var(--van-number-keyboard-button-text-color);background:var(--van-number-keyboard-button-background)}.van-key--blue.van-key--active{opacity:var(--van-active-opacity)}.van-key__wrapper{position:relative;flex:1;flex-basis:33%;box-sizing:border-box;padding:0 .16rem .16rem 0}.van-key__wrapper--wider{flex-basis:66%}.van-key__delete-icon{width:.85333rem;height:.58667rem}.van-key__collapse-icon{width:.8rem;height:.64rem}.van-key__loading-icon{color:var(--van-number-keyboard-button-text-color)}:root{--van-list-text-color: var(--van-text-color-2);--van-list-text-font-size: var(--van-font-size-md);--van-list-text-line-height: 1.33333rem;--van-list-loading-icon-size: .42667rem}.van-list__loading,.van-list__finished-text,.van-list__error-text{color:var(--van-list-text-color);font-size:var(--van-list-text-font-size);line-height:var(--van-list-text-line-height);text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-list__loading-icon .van-loading__spinner{width:var(--van-list-loading-icon-size);height:var(--van-list-loading-icon-size)}:root{--van-switch-size: .69333rem;--van-switch-width:calc(1.8em + .10667rem);--van-switch-height:calc(1em + .10667rem);--van-switch-node-size: 1em;--van-switch-node-background: var(--van-white);--van-switch-node-shadow: 0 .08rem .02667rem 0 rgba(0, 0, 0, .05);--van-switch-background: rgba(120, 120, 128, .16);--van-switch-on-background: var(--van-primary-color);--van-switch-duration: var(--van-duration-base);--van-switch-disabled-opacity: var(--van-disabled-opacity)}.van-theme-dark{--van-switch-background: rgba(120, 120, 128, .32)}.van-switch{position:relative;display:inline-block;box-sizing:content-box;width:var(--van-switch-width);height:var(--van-switch-height);font-size:var(--van-switch-size);background:var(--van-switch-background);border-radius:var(--van-switch-node-size);cursor:pointer;transition:background-color var(--van-switch-duration)}.van-switch__node{position:absolute;top:.05333rem;left:.05333rem;width:var(--van-switch-node-size);height:var(--van-switch-node-size);font-size:inherit;background:var(--van-switch-node-background);border-radius:100%;box-shadow:var(--van-switch-node-shadow);transition:transform var(--van-switch-duration) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{top:25%;left:25%;width:50%;height:50%;line-height:1}.van-switch--on{background:var(--van-switch-on-background)}.van-switch--on .van-switch__node{transform:translate(calc(var(--van-switch-width) - var(--van-switch-node-size) - .10667rem))}.van-switch--on .van-switch__loading{color:var(--van-switch-on-background)}.van-switch--disabled{cursor:not-allowed;opacity:var(--van-switch-disabled-opacity)}.van-switch--loading{cursor:default}:root{--van-button-mini-height: .64rem;--van-button-mini-padding: 0 var(--van-padding-base);--van-button-mini-font-size: var(--van-font-size-xs);--van-button-small-height: .85333rem;--van-button-small-padding: 0 var(--van-padding-xs);--van-button-small-font-size: var(--van-font-size-sm);--van-button-normal-padding: 0 .4rem;--van-button-normal-font-size: var(--van-font-size-md);--van-button-large-height: 1.33333rem;--van-button-default-height: 1.17333rem;--van-button-default-line-height: 1.2;--van-button-default-font-size: var(--van-font-size-lg);--van-button-default-color: var(--van-text-color);--van-button-default-background: var(--van-background-2);--van-button-default-border-color: var(--van-gray-4);--van-button-primary-color: var(--van-white);--van-button-primary-background: var(--van-primary-color);--van-button-primary-border-color: var(--van-primary-color);--van-button-success-color: var(--van-white);--van-button-success-background: var(--van-success-color);--van-button-success-border-color: var(--van-success-color);--van-button-danger-color: var(--van-white);--van-button-danger-background: var(--van-danger-color);--van-button-danger-border-color: var(--van-danger-color);--van-button-warning-color: var(--van-white);--van-button-warning-background: var(--van-warning-color);--van-button-warning-border-color: var(--van-warning-color);--van-button-border-width: var(--van-border-width);--van-button-radius: var(--van-radius-md);--van-button-round-radius: var(--van-radius-max);--van-button-plain-background: var(--van-white);--van-button-disabled-opacity: var(--van-disabled-opacity);--van-button-icon-size: 1.2em;--van-button-loading-icon-size: .53333rem}.van-theme-dark{--van-button-plain-background: transparent}.van-button{position:relative;display:inline-block;box-sizing:border-box;height:var(--van-button-default-height);margin:0;padding:0;font-size:var(--van-button-default-font-size);line-height:var(--van-button-default-line-height);text-align:center;border-radius:var(--van-button-radius);cursor:pointer;transition:opacity var(--van-duration-fast);-webkit-appearance:none;-webkit-font-smoothing:auto}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background:var(--van-black);border:inherit;border-color:var(--van-black);border-radius:inherit;transform:translate(-50%,-50%);opacity:0;content:" "}.van-button:active:before{opacity:.1}.van-button--loading:before,.van-button--disabled:before{display:none}.van-button--default{color:var(--van-button-default-color);background:var(--van-button-default-background);border:var(--van-button-border-width) solid var(--van-button-default-border-color)}.van-button--primary{color:var(--van-button-primary-color);background:var(--van-button-primary-background);border:var(--van-button-border-width) solid var(--van-button-primary-border-color)}.van-button--success{color:var(--van-button-success-color);background:var(--van-button-success-background);border:var(--van-button-border-width) solid var(--van-button-success-border-color)}.van-button--danger{color:var(--van-button-danger-color);background:var(--van-button-danger-background);border:var(--van-button-border-width) solid var(--van-button-danger-border-color)}.van-button--warning{color:var(--van-button-warning-color);background:var(--van-button-warning-background);border:var(--van-button-border-width) solid var(--van-button-warning-border-color)}.van-button--plain{background:var(--van-button-plain-background)}.van-button--plain.van-button--primary{color:var(--van-button-primary-background)}.van-button--plain.van-button--success{color:var(--van-button-success-background)}.van-button--plain.van-button--danger{color:var(--van-button-danger-background)}.van-button--plain.van-button--warning{color:var(--van-button-warning-background)}.van-button--large{width:100%;height:var(--van-button-large-height)}.van-button--normal{padding:var(--van-button-normal-padding);font-size:var(--van-button-normal-font-size)}.van-button--small{height:var(--van-button-small-height);padding:var(--van-button-small-padding);font-size:var(--van-button-small-font-size)}.van-button__loading{color:inherit;font-size:inherit}.van-button__loading .van-loading__spinner{color:currentColor;width:var(--van-button-loading-icon-size);height:var(--van-button-loading-icon-size)}.van-button--mini{height:var(--van-button-mini-height);padding:var(--van-button-mini-padding);font-size:var(--van-button-mini-font-size)}.van-button--mini+.van-button--mini{margin-left:var(--van-padding-base)}.van-button--block{display:block;width:100%}.van-button--disabled{cursor:not-allowed;opacity:var(--van-button-disabled-opacity)}.van-button--loading{cursor:default}.van-button--round{border-radius:var(--van-button-round-radius)}.van-button--square{border-radius:0}.van-button__content{display:flex;align-items:center;justify-content:center;height:100%}.van-button__content:before{content:" "}.van-button__icon{font-size:var(--van-button-icon-size);line-height:inherit}.van-button__icon+.van-button__text,.van-button__loading+.van-button__text,.van-button__text+.van-button__icon,.van-button__text+.van-button__loading{margin-left:var(--van-padding-base)}.van-button--hairline{border-width:0}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--van-button-radius) * 2)}.van-button--hairline.van-button--round:after{border-radius:var(--van-button-round-radius)}.van-button--hairline.van-button--square:after{border-radius:0}:root{--van-submit-bar-height: 1.33333rem;--van-submit-bar-z-index: 100;--van-submit-bar-background: var(--van-background-2);--van-submit-bar-button-width: 2.93333rem;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: .53333rem;--van-submit-bar-price-font: var(--van-price-font);--van-submit-bar-currency-font-size: var(--van-font-size-md);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background: var(--van-orange-light);--van-submit-bar-tip-icon-size: .32rem;--van-submit-bar-button-height: 1.06667rem;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background);-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-bold);font-size:var(--van-submit-bar-price-font-size);margin-left:var(--van-padding-base)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}:root{--van-contact-edit-padding: var(--van-padding-md);--van-contact-edit-fields-radius: var(--van-radius-md);--van-contact-edit-buttons-padding: var(--van-padding-xl) 0;--van-contact-edit-button-margin-bottom: var(--van-padding-sm);--van-contact-edit-button-font-size: var(--van-font-size-lg);--van-contact-edit-field-label-width: 4.1em}.van-contact-edit{padding:var(--van-contact-edit-padding)}.van-contact-edit__fields{overflow:hidden;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__fields .van-field__label{width:var(--van-contact-edit-field-label-width)}.van-contact-edit__switch-cell{margin-top:.26667rem;padding-top:.24rem;padding-bottom:.24rem;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__buttons{padding:var(--van-contact-edit-buttons-padding)}.van-contact-edit__button{margin-bottom:var(--van-contact-edit-button-margin-bottom);font-size:var(--van-contact-edit-button-font-size)}:root{--van-action-bar-button-height: 1.06667rem;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:.13333rem;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:.13333rem;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width: 321px){.van-action-bar-button{font-size:.34667rem}}:root{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}:root{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: .42667rem;--van-popup-close-icon-size: .58667rem;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: .42667rem;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}:root{--van-share-sheet-header-padding: var(--van-padding-sm) var(--van-padding-md);--van-share-sheet-title-color: var(--van-text-color);--van-share-sheet-title-font-size: var(--van-font-size-md);--van-share-sheet-title-line-height: var(--van-line-height-md);--van-share-sheet-description-color: var(--van-text-color-2);--van-share-sheet-description-font-size: var(--van-font-size-sm);--van-share-sheet-description-line-height: .42667rem;--van-share-sheet-icon-size: 1.28rem;--van-share-sheet-option-name-color: var(--van-gray-7);--van-share-sheet-option-name-font-size: var(--van-font-size-sm);--van-share-sheet-option-description-color: var(--van-text-color-3);--van-share-sheet-option-description-font-size: var(--van-font-size-sm);--van-share-sheet-cancel-button-font-size: var(--van-font-size-lg);--van-share-sheet-cancel-button-height: 1.28rem;--van-share-sheet-cancel-button-background: var(--van-background-2)}.van-share-sheet__header{padding:var(--van-share-sheet-header-padding);text-align:center}.van-share-sheet__title{margin-top:var(--van-padding-xs);color:var(--van-share-sheet-title-color);font-weight:400;font-size:var(--van-share-sheet-title-font-size);line-height:var(--van-share-sheet-title-line-height)}.van-share-sheet__description{display:block;margin-top:var(--van-padding-xs);color:var(--van-share-sheet-description-color);font-size:var(--van-share-sheet-description-font-size);line-height:var(--van-share-sheet-description-line-height)}.van-share-sheet__options{position:relative;display:flex;padding:var(--van-padding-md) 0 var(--van-padding-md) var(--van-padding-xs);overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:var(--van-padding-md);border-top:.02667rem solid var(--van-border-color);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:flex;flex-direction:column;align-items:center;-webkit-user-select:none;user-select:none}.van-share-sheet__icon,.van-share-sheet__image-icon{width:var(--van-share-sheet-icon-size);height:var(--van-share-sheet-icon-size);margin:0 var(--van-padding-md)}.van-share-sheet__icon{display:flex;align-items:center;justify-content:center;color:var(--van-gray-7);border-radius:100%;background-color:var(--van-gray-2)}.van-share-sheet__icon--link,.van-share-sheet__icon--poster,.van-share-sheet__icon--qrcode{font-size:.69333rem}.van-share-sheet__icon--weapp-qrcode{font-size:.74667rem}.van-share-sheet__icon--qq,.van-share-sheet__icon--weibo,.van-share-sheet__icon--wechat,.van-share-sheet__icon--wechat-moments{font-size:.8rem;color:var(--van-white)}.van-share-sheet__icon--qq{background-color:#38b9fa}.van-share-sheet__icon--wechat{background-color:#0bc15f}.van-share-sheet__icon--weibo{background-color:#ee575e}.van-share-sheet__icon--wechat-moments{background-color:#7bc845}.van-share-sheet__name{margin-top:var(--van-padding-xs);padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-name-color);font-size:var(--van-share-sheet-option-name-font-size)}.van-share-sheet__option-description{padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-description-color);font-size:var(--van-share-sheet-option-description-font-size)}.van-share-sheet__cancel{display:block;width:100%;padding:0;font-size:var(--van-share-sheet-cancel-button-font-size);line-height:var(--van-share-sheet-cancel-button-height);text-align:center;background:var(--van-share-sheet-cancel-button-background);border:none;cursor:pointer}.van-share-sheet__cancel:before{display:block;height:var(--van-padding-xs);background-color:var(--van-background);content:" "}.van-share-sheet__cancel:active{background-color:var(--van-active-color)}:root{--van-popover-arrow-size: .16rem;--van-popover-radius: var(--van-radius-lg);--van-popover-action-width: 3.41333rem;--van-popover-action-height: 1.17333rem;--van-popover-action-font-size: var(--van-font-size-md);--van-popover-action-line-height: var(--van-line-height-md);--van-popover-action-icon-size: .53333rem;--van-popover-light-text-color: var(--van-text-color);--van-popover-light-background: var(--van-background-2);--van-popover-light-action-disabled-text-color: var(--van-text-color-3);--van-popover-dark-text-color: var(--van-white);--van-popover-dark-background: #4a4a4a;--van-popover-dark-action-disabled-text-color: var(--van-text-color-2)}.van-popover{position:absolute;overflow:visible;background-color:transparent;transition:opacity .15s,transform .15s}.van-popover__wrapper{display:inline-block}.van-popover__arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:var(--van-popover-arrow-size)}.van-popover__content{overflow:hidden;border-radius:var(--van-popover-radius)}.van-popover__action{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--van-popover-action-width);height:var(--van-popover-action-height);padding:0 var(--van-padding-md);font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);cursor:pointer}.van-popover__action:last-child .van-popover__action-text:after{display:none}.van-popover__action-text{display:flex;flex:1;align-items:center;justify-content:center;height:100%}.van-popover__action-icon{margin-right:var(--van-padding-xs);font-size:var(--van-popover-action-icon-size)}.van-popover__action--with-icon .van-popover__action-text{justify-content:flex-start}.van-popover[data-popper-placement^=top] .van-popover__arrow{bottom:0;border-top-color:currentColor;border-bottom-width:0;margin-bottom:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=top]{transform-origin:50% 100%}.van-popover[data-popper-placement=top] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=top-start]{transform-origin:0 100%}.van-popover[data-popper-placement=top-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=top-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=top-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover[data-popper-placement^=left] .van-popover__arrow{right:0;border-right-width:0;border-left-color:currentColor;margin-right:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=left]{transform-origin:100% 50%}.van-popover[data-popper-placement=left] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=left-start]{transform-origin:100% 0}.van-popover[data-popper-placement=left-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=left-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=left-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=right] .van-popover__arrow{left:0;border-right-color:currentColor;border-left-width:0;margin-left:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=right]{transform-origin:0 50%}.van-popover[data-popper-placement=right] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=right-start]{transform-origin:0 0}.van-popover[data-popper-placement=right-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=right-end]{transform-origin:0 100%}.van-popover[data-popper-placement=right-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=bottom] .van-popover__arrow{top:0;border-top-width:0;border-bottom-color:currentColor;margin-top:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=bottom]{transform-origin:50% 0}.van-popover[data-popper-placement=bottom] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=bottom-start]{transform-origin:0 0}.van-popover[data-popper-placement=bottom-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=bottom-end]{transform-origin:100% 0}.van-popover[data-popper-placement=bottom-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover--light{color:var(--van-popover-light-text-color)}.van-popover--light .van-popover__content{background:var(--van-popover-light-background);box-shadow:0 .05333rem .32rem rgba(50,50,51,.12)}.van-popover--light .van-popover__arrow{color:var(--van-popover-light-background)}.van-popover--light .van-popover__action:active{background-color:var(--van-active-color)}.van-popover--light .van-popover__action--disabled{color:var(--van-popover-light-action-disabled-text-color);cursor:not-allowed}.van-popover--light .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark{color:var(--van-popover-dark-text-color)}.van-popover--dark .van-popover__content{background:var(--van-popover-dark-background)}.van-popover--dark .van-popover__arrow{color:var(--van-popover-dark-background)}.van-popover--dark .van-popover__action:active{background-color:rgba(0,0,0,.2)}.van-popover--dark .van-popover__action--disabled{color:var(--van-popover-dark-action-disabled-text-color)}.van-popover--dark .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark .van-popover__action-text:after{border-color:var(--van-gray-7)}.van-popover-zoom-enter-from,.van-popover-zoom-leave-active{transform:scale(.8);opacity:0}.van-popover-zoom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popover-zoom-leave-active{transition-timing-function:var(--van-ease-in)}:root{--van-notify-text-color: var(--van-white);--van-notify-padding: var(--van-padding-xs) var(--van-padding-md);--van-notify-font-size: var(--van-font-size-md);--van-notify-line-height: var(--van-line-height-md);--van-notify-primary-background: var(--van-primary-color);--van-notify-success-background: var(--van-success-color);--van-notify-danger-background: var(--van-danger-color);--van-notify-warning-background: var(--van-warning-color)}.van-notify{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-notify-padding);color:var(--van-notify-text-color);font-size:var(--van-notify-font-size);line-height:var(--van-notify-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word}.van-notify--primary{background:var(--van-notify-primary-background)}.van-notify--success{background:var(--van-notify-success-background)}.van-notify--danger{background:var(--van-notify-danger-background)}.van-notify--warning{background:var(--van-notify-warning-background)}:root{--van-dialog-width: 8.53333rem;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: .42667rem;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: .64rem;--van-dialog-header-padding-top: .69333rem;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 1.28rem;--van-dialog-round-button-height: .96rem;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:2.77333rem}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:.69333rem var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}:root{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: .96rem;--van-toast-text-min-width: 2.56rem;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 2.34667rem;--van-toast-default-min-height: 2.34667rem;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}:root{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 1.28rem;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: .58667rem;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: .58667rem}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:block;width:100%;padding:.37333rem var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height)}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:.53333rem var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:.02667rem solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}:root{--van-sticky-z-index: 99}.van-sticky--fixed{position:fixed;z-index:var(--van-sticky-z-index)}:root{--van-swipe-indicator-size: .16rem;--van-swipe-indicator-margin: var(--van-padding-sm);--van-swipe-indicator-active-opacity: 1;--van-swipe-indicator-inactive-opacity: .3;--van-swipe-indicator-active-background: var(--van-primary-color);--van-swipe-indicator-inactive-background: var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translate(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-duration-fast),background-color var(--van-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background);opacity:var(--van-swipe-indicator-active-opacity)}.van-swipe-item{position:relative;flex-shrink:0;width:100%;height:100%}:root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 .02667rem .02667rem var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: .58667rem;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image,.van-image-preview__image-wrap{width:100%;transition-property:transform}.van-image-preview__image--vertical,.van-image-preview__image-wrap--vertical{width:auto;height:100%}.van-image-preview__image img,.van-image-preview__image-wrap img,.van-image-preview__image video,.van-image-preview__image-wrap video{-webkit-user-drag:none}.van-image-preview__image .van-image__error,.van-image-preview__image-wrap .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon,.van-image-preview__image-wrap .van-image__error-icon{font-size:.96rem}.van-image-preview__image .van-image__loading,.van-image-preview__image-wrap .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}:root{--van-uploader-size: 2.13333rem;--van-uploader-icon-size: .64rem;--van-uploader-icon-color: var(--van-gray-4);--van-uploader-text-color: var(--van-text-color-2);--van-uploader-text-font-size: var(--van-font-size-sm);--van-uploader-upload-background: var(--van-gray-1);--van-uploader-upload-active-color: var(--van-active-color);--van-uploader-delete-color: var(--van-white);--van-uploader-delete-icon-size: .37333rem;--van-uploader-delete-background: rgba(0, 0, 0, .7);--van-uploader-file-background: var(--van-background);--van-uploader-file-icon-size: .53333rem;--van-uploader-file-icon-color: var(--van-gray-7);--van-uploader-file-name-padding: 0 var(--van-padding-base);--van-uploader-file-name-margin-top: var(--van-padding-xs);--van-uploader-file-name-font-size: var(--van-font-size-sm);--van-uploader-file-name-text-color: var(--van-gray-7);--van-uploader-mask-text-color: var(--van-white);--van-uploader-mask-background: rgba(50, 50, 51, .88);--van-uploader-mask-icon-size: .58667rem;--van-uploader-mask-message-font-size: var(--van-font-size-sm);--van-uploader-mask-message-line-height: var(--van-line-height-xs);--van-uploader-loading-icon-size: .58667rem;--van-uploader-loading-icon-color: var(--van-white);--van-uploader-disabled-opacity: var(--van-disabled-opacity)}.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__wrapper--disabled{opacity:var(--van-uploader-disabled-opacity)}.van-uploader__input{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;cursor:pointer;opacity:0}.van-uploader__input-wrapper{position:relative}.van-uploader__input:disabled{cursor:not-allowed}.van-uploader__upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:var(--van-uploader-size);height:var(--van-uploader-size);margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;background:var(--van-uploader-upload-background)}.van-uploader__upload:active{background-color:var(--van-uploader-upload-active-color)}.van-uploader__upload--readonly:active{background-color:var(--van-uploader-upload-background)}.van-uploader__upload-icon{color:var(--van-uploader-icon-color);font-size:var(--van-uploader-icon-size)}.van-uploader__upload-text{margin-top:var(--van-padding-xs);color:var(--van-uploader-text-color);font-size:var(--van-uploader-text-font-size)}.van-uploader__preview{position:relative;margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;cursor:pointer}.van-uploader__preview-image{display:block;width:var(--van-uploader-size);height:var(--van-uploader-size);overflow:hidden}.van-uploader__preview-delete{position:absolute;top:0;right:0}.van-uploader__preview-delete--shadow{width:var(--van-uploader-delete-icon-size);height:var(--van-uploader-delete-icon-size);background:var(--van-uploader-delete-background);border-radius:0 0 0 .32rem}.van-uploader__preview-delete-icon{position:absolute;top:0;right:0;color:var(--van-uploader-delete-color);font-size:var(--van-uploader-delete-icon-size);transform:scale(.7) translate(10%,-10%)}.van-uploader__preview-cover{position:absolute;top:0;right:0;bottom:0;left:0}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-uploader-mask-text-color);background:var(--van-uploader-mask-background)}.van-uploader__mask-icon{font-size:var(--van-uploader-mask-icon-size)}.van-uploader__mask-message{margin-top:.16rem;padding:0 var(--van-padding-base);font-size:var(--van-uploader-mask-message-font-size);line-height:var(--van-uploader-mask-message-line-height)}.van-uploader__loading{width:var(--van-uploader-loading-icon-size);height:var(--van-uploader-loading-icon-size);color:var(--van-uploader-loading-icon-color)}.van-uploader__file{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--van-uploader-size);height:var(--van-uploader-size);background:var(--van-uploader-file-background)}.van-uploader__file-icon{color:var(--van-uploader-file-icon-color);font-size:var(--van-uploader-file-icon-size)}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:var(--van-uploader-file-name-margin-top);padding:var(--van-uploader-file-name-padding);color:var(--van-uploader-file-name-text-color);font-size:var(--van-uploader-file-name-font-size);text-align:center}:root{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 1.17333rem;--van-tabs-card-height: .8rem;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 1.06667rem;--van-tabs-bottom-bar-height: .08rem;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:.4rem}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-border-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:.4rem;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}.van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}:root{--van-cascader-header-height: 1.28rem;--van-cascader-header-padding: 0 var(--van-padding-md);--van-cascader-title-font-size: var(--van-font-size-lg);--van-cascader-title-line-height: .53333rem;--van-cascader-close-icon-size: .58667rem;--van-cascader-close-icon-color: var(--van-gray-5);--van-cascader-selected-icon-size: .48rem;--van-cascader-tabs-height: 1.28rem;--van-cascader-active-color: var(--van-primary-color);--van-cascader-options-height: 10.24rem;--van-cascader-option-disabled-color: var(--van-text-color-3);--van-cascader-tab-color: var(--van-text-color);--van-cascader-unselected-tab-color: var(--van-text-color-2)}.van-cascader__header{display:flex;align-items:center;justify-content:space-between;height:var(--van-cascader-header-height);padding:var(--van-cascader-header-padding)}.van-cascader__title{font-weight:var(--van-font-bold);font-size:var(--van-cascader-title-font-size);line-height:var(--van-cascader-title-line-height)}.van-cascader__close-icon{color:var(--van-cascader-close-icon-color);font-size:var(--van-cascader-close-icon-size)}.van-cascader__tabs.van-tabs--line .van-tabs__wrap{height:var(--van-cascader-tabs-height)}.van-cascader__tab{color:var(--van-cascader-tab-color);font-weight:var(--van-font-bold)}.van-cascader__tab--unselected{color:var(--van-cascader-unselected-tab-color);font-weight:400}.van-cascader__option{display:flex;align-items:center;justify-content:space-between;padding:.26667rem var(--van-padding-md);font-size:var(--van-font-size-md);line-height:var(--van-line-height-md);cursor:pointer}.van-cascader__option:active{background-color:var(--van-active-color)}.van-cascader__option--selected{color:var(--van-cascader-active-color);font-weight:var(--van-font-bold)}.van-cascader__option--disabled{color:var(--van-cascader-option-disabled-color);cursor:not-allowed}.van-cascader__option--disabled:active{background-color:transparent}.van-cascader__selected-icon{font-size:var(--van-cascader-selected-icon-size)}.van-cascader__options{box-sizing:border-box;height:var(--van-cascader-options-height);padding-top:.16rem;overflow-y:auto;-webkit-overflow-scrolling:touch}:root{--van-picker-background: var(--van-background-2);--van-picker-toolbar-height: 1.17333rem;--van-picker-title-font-size: var(--van-font-size-lg);--van-picker-title-line-height: var(--van-line-height-md);--van-picker-action-padding: 0 var(--van-padding-md);--van-picker-action-font-size: var(--van-font-size-md);--van-picker-confirm-action-color: var(--van-primary-color);--van-picker-cancel-action-color: var(--van-text-color-2);--van-picker-option-font-size: var(--van-font-size-lg);--van-picker-option-padding: 0 var(--van-padding-base);--van-picker-option-text-color: var(--van-text-color);--van-picker-option-disabled-opacity: .3;--van-picker-loading-icon-color: var(--van-primary-color);--van-picker-loading-mask-color: rgba(255, 255, 255, .9);--van-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4))}.van-theme-dark{--van-picker-loading-mask-color: rgba(0, 0, 0, .6);--van-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.van-picker{position:relative;background:var(--van-picker-background);-webkit-user-select:none;user-select:none}.van-picker__toolbar{position:relative;display:flex;align-items:center;justify-content:space-between;height:var(--van-picker-toolbar-height)}.van-picker__cancel,.van-picker__confirm{height:100%;padding:var(--van-picker-action-padding);font-size:var(--van-picker-action-font-size);background-color:transparent;border:none}.van-picker__confirm{color:var(--van-picker-confirm-action-color)}.van-picker__cancel{color:var(--van-picker-cancel-action-color)}.van-picker__title{position:absolute;left:50%;color:var(--van-text-color);max-width:50%;font-weight:var(--van-font-bold);font-size:var(--van-picker-title-font-size);line-height:var(--van-picker-title-line-height);text-align:center;transform:translate(-50%)}.van-picker__columns{position:relative;display:flex;cursor:-webkit-grab;cursor:grab}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--van-picker-loading-icon-color);background:var(--van-picker-loading-mask-color)}.van-picker__frame{position:absolute;top:50%;right:var(--van-padding-md);left:var(--van-padding-md);z-index:2;transform:translateY(-50%);pointer-events:none}.van-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--van-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.van-picker-column{flex:1;overflow:hidden;font-size:var(--van-picker-option-font-size)}.van-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--van-picker-option-padding);color:var(--van-picker-option-text-color)}.van-picker-column__item--disabled{cursor:not-allowed;opacity:var(--van-picker-option-disabled-opacity)}:root{--van-picker-group-background: var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:.42667rem}:root{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 .05333rem .26667rem rgba(125, 126, 128, .16);--van-calendar-header-title-height: 1.17333rem;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: .8rem;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 4.26667rem;--van-calendar-day-height: 1.70667rem;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: .10667rem;--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 1.44rem;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: .96rem;--van-calendar-confirm-button-margin: .18667rem 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:.29333rem}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:.24rem}}.van-calendar__top-info{top:.16rem}.van-calendar__bottom-info{bottom:.16rem}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}:root{--van-address-edit-padding: var(--van-padding-sm);--van-address-edit-buttons-padding: var(--van-padding-xl) var(--van-padding-base);--van-address-edit-button-margin-bottom: var(--van-padding-sm);--van-address-edit-button-font-size: var(--van-font-size-lg)}.van-address-edit{padding:var(--van-address-edit-padding)}.van-address-edit__fields{overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__fields .van-field__label{width:4.1em}.van-address-edit__default{margin-top:var(--van-padding-sm);overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__buttons{padding:var(--van-address-edit-buttons-padding)}.van-address-edit__button{margin-bottom:var(--van-address-edit-button-margin-bottom);font-size:var(--van-address-edit-button-font-size)}.van-address-edit-detail__search-item{background:var(--van-gray-2)}.van-radio-group--horizontal,.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}:root{--van-checkbox-size: .53333rem;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:.02667rem solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}:root{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 2.24rem;--van-coupon-content-padding: .37333rem 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 .10667rem rgba(0, 0, 0, .1);--van-coupon-head-width: 2.56rem;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: .8rem;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:.16rem;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:.05333rem}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:.42667rem;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1}.van-coupon__name{margin-bottom:.26667rem;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:.02667rem dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - .26667rem)}.van-coupon--disabled .van-coupon__head{color:inherit}:root{--van-radio-size: .53333rem;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:.02667rem solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}:root{--van-contact-list-edit-icon-size: .42667rem;--van-contact-list-add-button-z-index: 999;--van-contact-list-radio-color: var(--van-primary-color);--van-contact-list-item-padding: var(--van-padding-md)}.van-contact-list{box-sizing:border-box;height:100%;padding-bottom:2.13333rem}.van-contact-list__item{padding:var(--van-contact-list-item-padding)}.van-contact-list__item-title{display:flex;align-items:center;padding-right:var(--van-padding-xl);padding-left:var(--van-padding-xs)}.van-contact-list__item-tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch}.van-contact-list__edit{font-size:var(--van-contact-list-edit-icon-size)}.van-contact-list__radio .van-radio__icon--checked .van-icon{background-color:var(--van-contact-list-radio-color);border-color:var(--van-contact-list-radio-color)}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:var(--van-contact-list-add-button-z-index);padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-contact-list__add{height:1.06667rem;margin:.13333rem 0}:root{--van-address-list-padding: var(--van-padding-sm) var(--van-padding-sm) 2.13333rem;--van-address-list-disabled-text-color: var(--van-text-color-2);--van-address-list-disabled-text-padding: calc(var(--van-padding-base) * 5) 0;--van-address-list-disabled-text-font-size: var(--van-font-size-md);--van-address-list-disabled-text-line-height: var(--van-line-height-md);--van-address-list-add-button-z-index: 999;--van-address-list-item-padding: var(--van-padding-sm);--van-address-list-item-text-color: var(--van-text-color);--van-address-list-item-disabled-text-color: var(--van-text-color-3);--van-address-list-item-font-size: .34667rem;--van-address-list-item-line-height: var(--van-line-height-sm);--van-address-list-radio-color: var(--van-primary-color);--van-address-list-edit-icon-size: .53333rem}.van-address-list{box-sizing:border-box;height:100%;padding:var(--van-address-list-padding)}.van-address-list__bottom{position:fixed;bottom:0;left:0;z-index:var(--van-address-list-add-button-z-index);box-sizing:border-box;width:100%;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-address-list__add{height:1.06667rem;margin:.13333rem 0}.van-address-list__disabled-text{padding:var(--van-address-list-disabled-text-padding);color:var(--van-address-list-disabled-text-color);font-size:var(--van-address-list-disabled-text-font-size);line-height:var(--van-address-list-disabled-text-line-height)}.van-address-item{padding:var(--van-address-list-item-padding);background-color:var(--van-background-2);border-radius:var(--van-radius-lg)}.van-address-item:not(:last-child){margin-bottom:var(--van-padding-sm)}.van-address-item__title{padding-right:1.17333rem}.van-address-item__name{display:flex;align-items:center;margin-bottom:var(--van-padding-xs);font-size:var(--van-font-size-lg);line-height:var(--van-line-height-lg)}.van-address-item__tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-address-item__address{color:var(--van-address-list-item-text-color);font-size:var(--van-address-list-item-font-size);line-height:var(--van-address-list-item-line-height)}.van-address-item--disabled .van-address-item__name,.van-address-item--disabled .van-address-item__address{color:var(--van-address-list-item-disabled-text-color)}.van-address-item__edit{position:absolute;top:50%;right:var(--van-padding-md);color:var(--van-gray-6);font-size:var(--van-address-list-edit-icon-size);transform:translateY(-50%)}.van-address-item .van-cell{padding:0}.van-address-item .van-radio__label{margin-left:var(--van-padding-sm)}.van-address-item .van-radio__icon--checked .van-icon{background-color:var(--van-address-list-radio-color);border-color:var(--van-address-list-radio-color)}:root{--van-cell-group-background: var(--van-background-2);--van-cell-group-title-color: var(--van-text-color-2);--van-cell-group-title-padding: var(--van-padding-md) var(--van-padding-md);--van-cell-group-title-font-size: var(--van-font-size-md);--van-cell-group-title-line-height: .42667rem;--van-cell-group-inset-padding: 0 var(--van-padding-md);--van-cell-group-inset-radius: var(--van-radius-lg);--van-cell-group-inset-title-padding: var(--van-padding-md) var(--van-padding-md)}.van-cell-group{background:var(--van-cell-group-background)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}:root{--van-circle-size: 2.66667rem;--van-circle-color: var(--van-primary-color);--van-circle-layer-color: var(--van-white);--van-circle-text-color: var(--van-text-color);--van-circle-text-font-weight: var(--van-font-bold);--van-circle-text-font-size: var(--van-font-size-md);--van-circle-text-line-height: var(--van-line-height-md)}.van-circle{position:relative;display:inline-block;width:var(--van-circle-size);height:var(--van-circle-size);text-align:center}.van-circle svg{position:absolute;top:0;left:0;width:100%;height:100%}.van-circle__layer{stroke:var(--van-circle-layer-color)}.van-circle__hover{fill:none;stroke:var(--van-circle-color);stroke-linecap:round}.van-circle__text{position:absolute;top:50%;left:0;box-sizing:border-box;width:100%;padding:0 var(--van-padding-base);color:var(--van-circle-text-color);font-weight:var(--van-circle-text-font-weight);font-size:var(--van-circle-text-font-size);line-height:var(--van-circle-text-line-height);transform:translateY(-50%)}.van-row{display:flex;flex-wrap:wrap}.van-row--nowrap{flex-wrap:nowrap}.van-row--justify-center{justify-content:center}.van-row--justify-end{justify-content:flex-end}.van-row--justify-space-between{justify-content:space-between}.van-row--justify-space-around{justify-content:space-around}.van-row--align-center{align-items:center}.van-row--align-bottom{align-items:flex-end}.van-col{display:block;box-sizing:border-box;min-height:.02667rem}.van-col--1{flex:0 0 4.16666667%;max-width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{flex:0 0 8.33333333%;max-width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{flex:0 0 12.5%;max-width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{flex:0 0 16.66666667%;max-width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{flex:0 0 20.83333333%;max-width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{flex:0 0 25%;max-width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{flex:0 0 29.16666667%;max-width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{flex:0 0 33.33333333%;max-width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{flex:0 0 37.5%;max-width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{flex:0 0 41.66666667%;max-width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{flex:0 0 45.83333333%;max-width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{flex:0 0 50%;max-width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{flex:0 0 54.16666667%;max-width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{flex:0 0 58.33333333%;max-width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{flex:0 0 62.5%;max-width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{flex:0 0 66.66666667%;max-width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{flex:0 0 70.83333333%;max-width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{flex:0 0 75%;max-width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{flex:0 0 79.16666667%;max-width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{flex:0 0 83.33333333%;max-width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{flex:0 0 87.5%;max-width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{flex:0 0 91.66666667%;max-width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{flex:0 0 95.83333333%;max-width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{flex:0 0 100%;max-width:100%}.van-col--offset-24{margin-left:100%}:root{--van-count-down-text-color: var(--van-text-color);--van-count-down-font-size: var(--van-font-size-md);--van-count-down-line-height: var(--van-line-height-md)}.van-count-down{color:var(--van-count-down-text-color);font-size:var(--van-count-down-font-size);line-height:var(--van-count-down-line-height)}:root{--van-empty-padding: var(--van-padding-xl) 0;--van-empty-image-size: 4.26667rem;--van-empty-description-margin-top: var(--van-padding-md);--van-empty-description-padding: 0 1.6rem;--van-empty-description-color: var(--van-text-color-2);--van-empty-description-font-size: var(--van-font-size-md);--van-empty-description-line-height: var(--van-line-height-md);--van-empty-bottom-margin-top: .64rem}.van-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-empty-padding)}.van-empty__image{width:var(--van-empty-image-size);height:var(--van-empty-image-size)}.van-empty__image img{width:100%;height:100%}.van-empty__description{margin-top:var(--van-empty-description-margin-top);padding:var(--van-empty-description-padding);color:var(--van-empty-description-color);font-size:var(--van-empty-description-font-size);line-height:var(--van-empty-description-line-height)}.van-empty__bottom{margin-top:var(--van-empty-bottom-margin-top)}.van-theme-dark .van-empty{opacity:.5}:root{--van-coupon-list-background: var(--van-background);--van-coupon-list-field-padding: .13333rem 0 .13333rem var(--van-padding-md);--van-coupon-list-exchange-button-height: .85333rem;--van-coupon-list-close-button-height: 1.06667rem;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:.90667rem;padding-left:var(--van-padding-sm);line-height:.90667rem;background:var(--van-background);border-radius:var(--van-radius-max)}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-2)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - .05333rem);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 .16rem .32rem -.32rem var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:1.33333rem}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:.13333rem var(--van-padding-md);font-weight:var(--van-font-bold);background-color:var(--van-background-2)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}:root{--van-divider-margin: var(--van-padding-md) 0;--van-divider-text-color: var(--van-text-color-2);--van-divider-font-size: var(--van-font-size-md);--van-divider-line-height: .64rem;--van-divider-border-color: var(--van-border-color);--van-divider-content-padding: var(--van-padding-md);--van-divider-content-left-width: 10%;--van-divider-content-right-width: 10%}.van-divider{display:flex;align-items:center;margin:var(--van-divider-margin);color:var(--van-divider-text-color);font-size:var(--van-divider-font-size);line-height:var(--van-divider-line-height);border-color:var(--van-divider-border-color);border-style:solid;border-width:0}.van-divider:before,.van-divider:after{display:block;flex:1;box-sizing:border-box;height:.02667rem;border-color:inherit;border-style:inherit;border-width:var(--van-border-width) 0 0}.van-divider:before{content:""}.van-divider--hairline:before,.van-divider--hairline:after{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--content-center:before,.van-divider--content-left:before,.van-divider--content-right:before{margin-right:var(--van-divider-content-padding)}.van-divider--content-center:after,.van-divider--content-left:after,.van-divider--content-right:after{margin-left:var(--van-divider-content-padding);content:""}.van-divider--content-left:before{max-width:var(--van-divider-content-left-width)}.van-divider--content-right:after{max-width:var(--van-divider-content-right-width)}:root{--van-dropdown-menu-height: 1.28rem;--van-dropdown-menu-background: var(--van-background-2);--van-dropdown-menu-shadow: 0 .05333rem .32rem rgba(100, 101, 102, .12);--van-dropdown-menu-title-font-size: .4rem;--van-dropdown-menu-title-text-color: var(--van-text-color);--van-dropdown-menu-title-active-text-color: var(--van-primary-color);--van-dropdown-menu-title-disabled-text-color: var(--van-text-color-2);--van-dropdown-menu-title-padding: 0 var(--van-padding-xs);--van-dropdown-menu-title-line-height: var(--van-line-height-lg);--van-dropdown-menu-option-active-color: var(--van-primary-color);--van-dropdown-menu-content-max-height: 80%}.van-dropdown-menu{-webkit-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);box-shadow:var(--van-dropdown-menu-shadow)}.van-dropdown-menu__bar--opened{z-index:calc(var(--van-dropdown-item-z-index) + 1)}.van-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;min-width:0}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--van-dropdown-menu-title-disabled-text-color)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:var(--van-dropdown-menu-title-padding);color:var(--van-dropdown-menu-title-text-color);font-size:var(--van-dropdown-menu-title-font-size);line-height:var(--van-dropdown-menu-title-line-height)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-.10667rem;margin-top:-.13333rem;border:.08rem solid;border-color:transparent transparent var(--van-gray-4) var(--van-gray-4);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:var(--van-dropdown-menu-title-active-text-color)}.van-dropdown-menu__title--active:after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down:after{margin-top:-.02667rem;transform:rotate(135deg)}:root{--van-dropdown-item-z-index: 10}.van-dropdown-item{position:fixed;right:0;left:0;z-index:var(--van-dropdown-item-z-index);overflow:hidden}.van-dropdown-item__icon{display:block;line-height:inherit}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-active-color)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__content{position:absolute;max-height:var(--van-dropdown-menu-content-max-height)}.van-grid{display:flex;flex-wrap:wrap}:root{--van-grid-item-content-padding: var(--van-padding-md) var(--van-padding-xs);--van-grid-item-content-background: var(--van-background-2);--van-grid-item-content-active-color: var(--van-active-color);--van-grid-item-icon-size: .74667rem;--van-grid-item-text-color: var(--van-text-color);--van-grid-item-text-font-size: var(--van-font-size-sm)}.van-grid-item{position:relative;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__icon{font-size:var(--van-grid-item-icon-size)}.van-grid-item__text{color:var(--van-grid-item-text-color);font-size:var(--van-grid-item-text-font-size);line-height:1.5;word-break:break-all}.van-grid-item__icon+.van-grid-item__text{margin-top:var(--van-padding-xs)}.van-grid-item__content{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:var(--van-grid-item-content-padding);background:var(--van-grid-item-content-background)}.van-grid-item__content:after{z-index:1;border-width:0 var(--van-border-width) var(--van-border-width) 0}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 var(--van-padding-xs)}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 var(--van-padding-xs)}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 var(--van-padding-xs) 0 0}.van-grid-item__content--surround:after{border-width:var(--van-border-width)}.van-grid-item__content--clickable{cursor:pointer}.van-grid-item__content--clickable:active{background-color:var(--van-grid-item-content-active-color)}:root{--van-index-bar-sidebar-z-index: 2;--van-index-bar-index-font-size: var(--van-font-size-xs);--van-index-bar-index-line-height: var(--van-line-height-xs);--van-index-bar-index-active-color: var(--van-primary-color)}.van-index-bar__sidebar{position:fixed;top:50%;right:0;z-index:var(--van-index-bar-sidebar-z-index);display:flex;flex-direction:column;text-align:center;transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;user-select:none}.van-index-bar__index{padding:0 var(--van-padding-xs) 0 var(--van-padding-md);font-weight:var(--van-font-bold);font-size:var(--van-index-bar-index-font-size);line-height:var(--van-index-bar-index-line-height)}.van-index-bar__index--active{color:var(--van-index-bar-index-active-color);font-weight:700}:root{--van-index-anchor-z-index: 1;--van-index-anchor-padding: 0 var(--van-padding-md);--van-index-anchor-text-color: var(--van-text-color);--van-index-anchor-font-weight: var(--van-font-bold);--van-index-anchor-font-size: var(--van-font-size-md);--van-index-anchor-line-height: .85333rem;--van-index-anchor-background: transparent;--van-index-anchor-sticky-text-color: var(--van-primary-color);--van-index-anchor-sticky-background: var(--van-background-2)}.van-index-anchor{z-index:var(--van-index-anchor-z-index);box-sizing:border-box;padding:var(--van-index-anchor-padding);color:var(--van-index-anchor-text-color);font-weight:var(--van-index-anchor-font-weight);font-size:var(--van-index-anchor-font-size);line-height:var(--van-index-anchor-line-height);background:var(--van-index-anchor-background)}.van-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--van-index-anchor-sticky-text-color);background:var(--van-index-anchor-sticky-background)}:root{--van-pagination-height: 1.06667rem;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: .96rem;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:after{border-width:var(--van-border-width)}.van-pagination__item--disabled{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}:root{--van-password-input-height: 1.33333rem;--van-password-input-margin: 0 var(--van-padding-md);--van-password-input-font-size: .53333rem;--van-password-input-radius: .16rem;--van-password-input-background: var(--van-background-2);--van-password-input-info-color: var(--van-text-color-2);--van-password-input-info-font-size: var(--van-font-size-md);--van-password-input-error-info-color: var(--van-danger-color);--van-password-input-dot-size: .26667rem;--van-password-input-dot-color: var(--van-text-color);--van-password-input-text-color: var(--van-text-color);--van-password-input-cursor-color: var(--van-text-color);--van-password-input-cursor-width: .02667rem;--van-password-input-cursor-height: 40%;--van-password-input-cursor-duration: 1s}.van-password-input{position:relative;margin:var(--van-password-input-margin);-webkit-user-select:none;user-select:none}.van-password-input__info,.van-password-input__error-info{margin-top:var(--van-padding-md);font-size:var(--van-password-input-info-font-size);text-align:center}.van-password-input__info{color:var(--van-password-input-info-color)}.van-password-input__error-info{color:var(--van-password-input-error-info-color)}.van-password-input__security{display:flex;width:100%;height:var(--van-password-input-height);cursor:pointer}.van-password-input__security:after{border-radius:var(--van-password-input-radius)}.van-password-input__security li{position:relative;display:flex;flex:1;align-items:center;justify-content:center;height:100%;color:var(--van-password-input-text-color);font-size:var(--van-password-input-font-size);line-height:1.2;background:var(--van-password-input-background)}.van-password-input__security i{position:absolute;top:50%;left:50%;width:var(--van-password-input-dot-size);height:var(--van-password-input-dot-size);background:var(--van-password-input-dot-color);border-radius:100%;transform:translate(-50%,-50%);visibility:hidden}.van-password-input__cursor{position:absolute;top:50%;left:50%;width:var(--van-password-input-cursor-width);height:var(--van-password-input-cursor-height);background:var(--van-password-input-cursor-color);transform:translate(-50%,-50%);animation:var(--van-password-input-cursor-duration) van-cursor-flicker infinite}@keyframes van-cursor-flicker{0%{opacity:0}50%{opacity:1}to{opacity:0}}:root{--van-progress-height: .10667rem;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background: var(--van-gray-3);--van-progress-pivot-padding: 0 .13333rem;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background);border-radius:1em;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}:root{--van-sidebar-width: 2.13333rem}.van-sidebar{width:var(--van-sidebar-width);overflow-y:auto;-webkit-overflow-scrolling:touch}:root{--van-sidebar-font-size: var(--van-font-size-md);--van-sidebar-line-height: var(--van-line-height-md);--van-sidebar-text-color: var(--van-text-color);--van-sidebar-disabled-text-color: var(--van-text-color-3);--van-sidebar-padding: .53333rem var(--van-padding-sm);--van-sidebar-active-color: var(--van-active-color);--van-sidebar-background: var(--van-background);--van-sidebar-selected-font-weight: var(--van-font-bold);--van-sidebar-selected-text-color: var(--van-text-color);--van-sidebar-selected-border-width: .10667rem;--van-sidebar-selected-border-height: .42667rem;--van-sidebar-selected-border-color: var(--van-primary-color);--van-sidebar-selected-background: var(--van-background-2)}.van-sidebar-item{position:relative;display:block;box-sizing:border-box;padding:var(--van-sidebar-padding);overflow:hidden;color:var(--van-sidebar-text-color);font-size:var(--van-sidebar-font-size);line-height:var(--van-sidebar-line-height);background:var(--van-sidebar-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-sidebar-item:active{background-color:var(--van-sidebar-active-color)}.van-sidebar-item:not(:last-child):after{border-bottom-width:.02667rem}.van-sidebar-item__text{word-break:break-all}.van-sidebar-item--select{color:var(--van-sidebar-selected-text-color);font-weight:var(--van-sidebar-selected-font-weight)}.van-sidebar-item--select,.van-sidebar-item--select:active{background-color:var(--van-sidebar-selected-background)}.van-sidebar-item--select:before{position:absolute;top:50%;left:0;width:var(--van-sidebar-selected-border-width);height:var(--van-sidebar-selected-border-height);background-color:var(--van-sidebar-selected-border-color);transform:translateY(-50%);content:""}.van-sidebar-item--disabled{color:var(--van-sidebar-disabled-text-color);cursor:not-allowed}.van-sidebar-item--disabled:active{background-color:var(--van-sidebar-background)}:root{--van-tree-select-font-size: var(--van-font-size-md);--van-tree-select-nav-background: var(--van-background);--van-tree-select-content-background: var(--van-background-2);--van-tree-select-nav-item-padding: .37333rem var(--van-padding-sm);--van-tree-select-item-height: 1.28rem;--van-tree-select-item-active-color: var(--van-primary-color);--van-tree-select-item-disabled-color: var(--van-gray-5);--van-tree-select-item-selected-size: .42667rem}.van-tree-select{position:relative;display:flex;font-size:var(--van-tree-select-font-size)}.van-tree-select__nav{flex:1;overflow-y:auto;background:var(--van-tree-select-nav-background);-webkit-overflow-scrolling:touch}.van-tree-select__nav-item{padding:var(--van-tree-select-nav-item-padding)}.van-tree-select__content{flex:2;overflow-y:auto;background:var(--van-tree-select-content-background);-webkit-overflow-scrolling:touch}.van-tree-select__item{position:relative;padding:0 .85333rem 0 var(--van-padding-md);font-weight:var(--van-font-bold);line-height:var(--van-tree-select-item-height);-webkit-user-select:none;user-select:none;cursor:pointer}.van-tree-select__item--active{color:var(--van-tree-select-item-active-color)}.van-tree-select__item:active{background-color:var(--van-active-color)}.van-tree-select__item--disabled{color:var(--van-tree-select-item-disabled-color);cursor:not-allowed}.van-tree-select__item--disabled:active{background-color:transparent}.van-tree-select__selected{position:absolute;top:50%;right:var(--van-padding-md);margin-top:calc(var(--van-padding-xs) * -1);font-size:var(--van-tree-select-item-selected-size)}:root{--van-skeleton-title-width: 40%}.van-skeleton-title{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-title--round{border-radius:var(--van-radius-max)}.van-skeleton-title{width:var(--van-skeleton-title-width);margin:0}.van-skeleton-title+.van-skeleton-paragraph{margin-top:.53333rem}:root{--van-skeleton-avatar-size: .85333rem;--van-skeleton-avatar-background: var(--van-active-color)}.van-skeleton-avatar{flex-shrink:0;width:var(--van-skeleton-avatar-size);height:var(--van-skeleton-avatar-size);margin-right:var(--van-padding-md);background:var(--van-skeleton-avatar-background)}.van-skeleton-avatar--round{border-radius:var(--van-radius-max)}.van-skeleton-avatar+.van-skeleton__content{padding-top:var(--van-padding-xs)}:root{--van-skeleton-paragraph-height: .42667rem;--van-skeleton-paragraph-background: var(--van-active-color);--van-skeleton-paragraph-margin-top: var(--van-padding-sm)}.van-skeleton-paragraph{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-paragraph--round{border-radius:var(--van-radius-max)}.van-skeleton-paragraph:not(:first-child){margin-top:var(--van-skeleton-paragraph-margin-top)}:root{--van-skeleton-duration: 1.2s}.van-skeleton{display:flex;padding:0 var(--van-padding-md)}.van-skeleton__content{width:100%}.van-skeleton--animate{animation:van-skeleton-blink var(--van-skeleton-duration) ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}:root{--van-slider-active-background: var(--van-primary-color);--van-slider-inactive-background: var(--van-gray-3);--van-slider-disabled-opacity: var(--van-disabled-opacity);--van-slider-bar-height: .05333rem;--van-slider-button-width: .64rem;--van-slider-button-height: .64rem;--van-slider-button-radius: 50%;--van-slider-button-background: var(--van-white);--van-slider-button-shadow: 0 .02667rem .05333rem rgba(0, 0, 0, .5)}.van-theme-dark{--van-slider-inactive-background: var(--van-background-3)}.van-slider{position:relative;width:100%;height:var(--van-slider-bar-height);background:var(--van-slider-inactive-background);border-radius:var(--van-radius-max);cursor:pointer}.van-slider:before{position:absolute;top:calc(var(--van-padding-xs) * -1);right:0;bottom:calc(var(--van-padding-xs) * -1);left:0;content:""}.van-slider__bar{position:absolute;width:100%;height:100%;background:var(--van-slider-active-background);border-radius:inherit;transition:all var(--van-duration-fast)}.van-slider__button{width:var(--van-slider-button-width);height:var(--van-slider-button-height);background:var(--van-slider-button-background);border-radius:var(--van-slider-button-radius);box-shadow:var(--van-slider-button-shadow)}.van-slider__button-wrapper{position:absolute;cursor:-webkit-grab;cursor:grab;top:50%}.van-slider__button-wrapper--right{right:0;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper--left{left:0;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{cursor:not-allowed;opacity:var(--van-slider-disabled-opacity)}.van-slider--disabled .van-slider__button-wrapper{cursor:not-allowed}.van-slider--vertical{display:inline-block;width:var(--van-slider-bar-height);height:100%}.van-slider--vertical .van-slider__button-wrapper--right{top:auto;right:50%;bottom:0;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper--left{top:0;right:50%;left:auto;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{top:0;right:calc(var(--van-padding-xs) * -1);bottom:0;left:calc(var(--van-padding-xs) * -1)}.van-space{display:inline-flex}.van-space--horizontal .van-space-item{display:flex;align-items:center}.van-space--vertical{flex-direction:column}.van-space--align-baseline{align-items:baseline}.van-space--align-start{align-items:flex-start}.van-space--align-end{align-items:flex-end}.van-space--align-center{align-items:center}.van-space--wrap{flex-wrap:wrap}.van-space--fill{display:flex}:root{--van-steps-background: var(--van-background-2)}.van-steps{overflow:hidden;background-color:var(--van-steps-background)}.van-steps--horizontal{padding:.26667rem .26667rem 0}.van-steps--horizontal .van-steps__items{position:relative;display:flex;margin:0 0 .26667rem;padding-bottom:.58667rem}.van-steps--vertical{padding:0 0 0 var(--van-padding-xl)}:root{--van-step-text-color: var(--van-text-color-2);--van-step-active-color: var(--van-primary-color);--van-step-process-text-color: var(--van-text-color);--van-step-font-size: var(--van-font-size-md);--van-step-line-color: var(--van-border-color);--van-step-finish-line-color: var(--van-primary-color);--van-step-finish-text-color: var(--van-text-color);--van-step-icon-size: .32rem;--van-step-circle-size: .13333rem;--van-step-circle-color: var(--van-gray-6);--van-step-horizontal-title-font-size: var(--van-font-size-sm)}.van-step{position:relative;flex:1;color:var(--van-step-text-color);font-size:var(--van-step-font-size)}.van-step__circle{display:block;width:var(--van-step-circle-size);height:var(--van-step-circle-size);background-color:var(--van-step-circle-color);border-radius:50%}.van-step__line{position:absolute;background-color:var(--van-step-line-color);transition:background-color var(--van-duration-base)}.van-step--horizontal{float:left}.van-step--horizontal:first-child .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child{position:absolute;right:.02667rem;width:auto}.van-step--horizontal:last-child .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:-.24rem;left:auto}.van-step--horizontal .van-step__circle-container{position:absolute;top:.8rem;left:calc(var(--van-padding-xs) * -1);z-index:1;padding:0 var(--van-padding-xs);background-color:var(--van-background-2);transform:translateY(-50%)}.van-step--horizontal .van-step__title{display:inline-block;margin-left:.08rem;font-size:var(--van-step-horizontal-title-font-size);transform:translate(-50%)}.van-step--horizontal .van-step__line{top:.8rem;left:0;width:100%;height:.02667rem}.van-step--horizontal .van-step__icon{display:block;font-size:var(--van-step-icon-size)}.van-step--horizontal .van-step--process{color:var(--van-step-process-text-color)}.van-step--vertical{display:block;float:none;padding:.26667rem .26667rem .26667rem 0;line-height:var(--van-line-height-sm)}.van-step--vertical:not(:last-child):after{border-bottom-width:.02667rem}.van-step--vertical .van-step__circle-container{position:absolute;top:.50667rem;left:-.4rem;z-index:1;font-size:var(--van-step-icon-size);line-height:1;transform:translate(-50%,-50%)}.van-step--vertical .van-step__line{top:.42667rem;left:-.4rem;width:.02667rem;height:100%}.van-step:last-child .van-step__line{width:0}.van-step--finish{color:var(--van-step-finish-text-color)}.van-step--finish .van-step__circle,.van-step--finish .van-step__line{background-color:var(--van-step-finish-line-color)}.van-step__icon,.van-step__title{transition:color var(--van-duration-base)}.van-step__icon--active,.van-step__title--active,.van-step__icon--finish,.van-step__title--finish{color:var(--van-step-active-color)}:root{--van-stepper-background: var(--van-active-color);--van-stepper-button-icon-color: var(--van-text-color);--van-stepper-button-disabled-color: var(--van-background);--van-stepper-button-disabled-icon-color: var(--van-gray-5);--van-stepper-button-round-theme-color: var(--van-primary-color);--van-stepper-input-width: .85333rem;--van-stepper-input-height: .74667rem;--van-stepper-input-font-size: var(--van-font-size-md);--van-stepper-input-line-height: normal;--van-stepper-input-text-color: var(--van-text-color);--van-stepper-input-disabled-text-color: var(--van-text-color-3);--van-stepper-input-disabled-background: var(--van-active-color);--van-stepper-radius: var(--van-radius-md)}.van-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.van-stepper__minus,.van-stepper__plus{position:relative;box-sizing:border-box;width:var(--van-stepper-input-height);height:var(--van-stepper-input-height);margin:0;padding:0;color:var(--van-stepper-button-icon-color);vertical-align:middle;background:var(--van-stepper-background);border:0}.van-stepper__minus:before,.van-stepper__plus:before{width:50%;height:.02667rem}.van-stepper__minus:after,.van-stepper__plus:after{width:.02667rem;height:50%}.van-stepper__minus:before,.van-stepper__plus:before,.van-stepper__minus:after,.van-stepper__plus:after{position:absolute;top:50%;left:50%;background-color:currentColor;transform:translate(-50%,-50%);content:""}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--van-stepper-button-disabled-icon-color);background-color:var(--van-stepper-button-disabled-color);cursor:not-allowed}.van-stepper__minus{border-radius:var(--van-stepper-radius) 0 0 var(--van-stepper-radius)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--van-stepper-radius) var(--van-stepper-radius) 0}.van-stepper__input{box-sizing:border-box;width:var(--van-stepper-input-width);height:var(--van-stepper-input-height);margin:0 .05333rem;padding:0;color:var(--van-stepper-input-text-color);font-size:var(--van-stepper-input-font-size);line-height:var(--van-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--van-stepper-background);border:0;border-width:.02667rem 0;border-radius:0;-webkit-appearance:none}.van-stepper__input:disabled{color:var(--van-stepper-input-disabled-text-color);background-color:var(--van-stepper-input-disabled-background);-webkit-text-fill-color:var(--van-stepper-input-disabled-text-color);opacity:1}.van-stepper__input:read-only{cursor:default}.van-stepper--round .van-stepper__input{background-color:transparent}.van-stepper--round .van-stepper__plus,.van-stepper--round .van-stepper__minus{border-radius:100%}.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.van-stepper--round .van-stepper__plus{color:var(--van-white);background:var(--van-stepper-button-round-theme-color)}.van-stepper--round .van-stepper__minus{color:var(--van-stepper-button-round-theme-color);background-color:var(--van-background-2);border:.02667rem solid var(--van-stepper-button-round-theme-color)}.van-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}:root{--van-tabbar-height: 1.33333rem;--van-tabbar-z-index: 1;--van-tabbar-background: var(--van-background-2)}.van-tabbar{z-index:var(--van-tabbar-z-index);display:flex;box-sizing:content-box;width:100%;height:var(--van-tabbar-height);background:var(--van-tabbar-background)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}:root{--van-tabbar-item-font-size: var(--van-font-size-sm);--van-tabbar-item-text-color: var(--van-text-color);--van-tabbar-item-active-color: var(--van-primary-color);--van-tabbar-item-active-background: var(--van-background-2);--van-tabbar-item-line-height: 1;--van-tabbar-item-icon-size: .58667rem;--van-tabbar-item-icon-margin-bottom: var(--van-padding-base)}.van-tabbar-item{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;color:var(--van-tabbar-item-text-color);font-size:var(--van-tabbar-item-font-size);line-height:var(--van-tabbar-item-line-height);cursor:pointer}.van-tabbar-item__icon{margin-bottom:var(--van-tabbar-item-icon-margin-bottom);font-size:var(--van-tabbar-item-icon-size)}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-badge{margin-top:var(--van-padding-base)}.van-tabbar-item__icon img{display:block;height:.53333rem}.van-tabbar-item--active{color:var(--van-tabbar-item-active-color);background-color:var(--van-tabbar-item-active-background)}:root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;word-break:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}.var--box,.var--box *{box-sizing:border-box}.var--relative{position:relative}.var--absolute{position:absolute}.var--hidden{overflow:hidden}.var--lock{overflow:hidden!important}.var--block{display:block}.var--ellipsis{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.var--inline-block{display:inline-block}.var--flex{display:flex}.var--inline-flex{display:inline-flex}:root{--font-size-xs: .26667rem;--font-size-sm: .32rem;--font-size-md: .37333rem;--font-size-lg: .42667rem;--icon-size-xs: .42667rem;--icon-size-sm: .48rem;--icon-size-md: .53333rem;--icon-size-lg: .58667rem;--color-body: #fff;--color-text: #333;--color-primary: #3a7afe;--color-info: #00afef;--color-success: #00c48f;--color-warning: #ff9f00;--color-danger: #f44336;--color-disabled: #e0e0e0;--color-text-disabled: #aaa;--opacity-disabled: .6;--cubic-bezier: cubic-bezier(.25, .8, .5, 1);--shadow-key-umbra-opacity: rgba(0, 0, 0, .2);--shadow-key-penumbra-opacity: rgba(0, 0, 0, .14);--shadow-key-ambient-opacity: rgba(0, 0, 0, .12)}:root{--popup-content-background-color: #fff;--popup-overlay-background-color: rgba(0, 0, 0, .6)}.var-fade-enter-from,.var-fade-leave-to{opacity:0}.var-fade-enter-active,.var-fade-leave-active{transition:opacity .25s}.var-pop-center-enter-from,.var-pop-center-leave-to{transform:scale(.3)}.var-pop-center-enter-active,.var-pop-center-leave-active{transition:all .25s}.var-pop-bottom-enter-from,.var-pop-bottom-leave-to{transform:translateY(100%)}.var-pop-bottom-enter-active,.var-pop-bottom-leave-active{transition:all .25s}.var-pop-top-enter-from,.var-pop-top-leave-to{transform:translateY(-100%)}.var-pop-top-enter-active,.var-pop-top-leave-active{transition:all .25s}.var-pop-left-enter-from,.var-pop-left-leave-to{transform:translate(-100%)}.var-pop-left-enter-active,.var-pop-left-leave-active{transition:all .25s}.var-pop-right-enter-from,.var-pop-right-leave-to{transform:translate(100%)}.var-pop-right-enter-active,.var-pop-right-leave-active{transition:all .25s}.var-popup{display:flex;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto}.var-popup__overlay{display:flex;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--popup-overlay-background-color);transition:all .25s}.var-popup__content{overflow:auto;transition:all .25s}.var-popup--content-background-color{background-color:var(--popup-content-background-color)}.var-popup--center{position:relative}.var-popup--bottom{min-width:100%;position:absolute;left:0;bottom:0}.var-popup--top{min-width:100%;position:absolute;left:0;top:0}.var-popup--left{min-height:100%;position:absolute;left:0;top:0}.var-popup--right{min-height:100%;position:absolute;right:0;top:0}.var-elevation--0{box-shadow:0 0 0 0 var(--shadow-key-umbra-opacity),0 0 0 0 var(--shadow-key-penumbra-opacity),0 0 0 0 var(--shadow-key-ambient-opacity)}.var-elevation--1{box-shadow:0 .05333rem .02667rem -.02667rem var(--shadow-key-umbra-opacity),0 .02667rem .02667rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .08rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--2{box-shadow:0 .08rem .02667rem -.05333rem var(--shadow-key-umbra-opacity),0 .05333rem .05333rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .13333rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--3{box-shadow:0 .08rem .08rem -.05333rem var(--shadow-key-umbra-opacity),0 .08rem .10667rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .21333rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--4{box-shadow:0 .05333rem .10667rem -.02667rem var(--shadow-key-umbra-opacity),0 .10667rem .13333rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .26667rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--5{box-shadow:0 .08rem .13333rem -.02667rem var(--shadow-key-umbra-opacity),0 .13333rem .21333rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .37333rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--6{box-shadow:0 .08rem .13333rem -.02667rem var(--shadow-key-umbra-opacity),0 .16rem .26667rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .48rem 0 var(--shadow-key-ambient-opacity)}.var-elevation--7{box-shadow:0 .10667rem .13333rem -.05333rem var(--shadow-key-umbra-opacity),0 .18667rem .26667rem .02667rem var(--shadow-key-penumbra-opacity),0 .05333rem .42667rem .02667rem var(--shadow-key-ambient-opacity)}.var-elevation--8{box-shadow:0 .13333rem .13333rem -.08rem var(--shadow-key-umbra-opacity),0 .21333rem .26667rem .02667rem var(--shadow-key-penumbra-opacity),0 .08rem .37333rem .05333rem var(--shadow-key-ambient-opacity)}.var-elevation--9{box-shadow:0 .13333rem .16rem -.08rem var(--shadow-key-umbra-opacity),0 .24rem .32rem .02667rem var(--shadow-key-penumbra-opacity),0 .08rem .42667rem .05333rem var(--shadow-key-ambient-opacity)}.var-elevation--10{box-shadow:0 .16rem .16rem -.08rem var(--shadow-key-umbra-opacity),0 .26667rem .37333rem .02667rem var(--shadow-key-penumbra-opacity),0 .10667rem .48rem .08rem var(--shadow-key-ambient-opacity)}.var-elevation--11{box-shadow:0 .16rem .18667rem -.10667rem var(--shadow-key-umbra-opacity),0 .29333rem .4rem .02667rem var(--shadow-key-penumbra-opacity),0 .10667rem .53333rem .08rem var(--shadow-key-ambient-opacity)}.var-elevation--12{box-shadow:0 .18667rem .21333rem -.10667rem var(--shadow-key-umbra-opacity),0 .32rem .45333rem .05333rem var(--shadow-key-penumbra-opacity),0 .13333rem .58667rem .10667rem var(--shadow-key-ambient-opacity)}.var-elevation--13{box-shadow:0 .18667rem .21333rem -.10667rem var(--shadow-key-umbra-opacity),0 .34667rem .50667rem .05333rem var(--shadow-key-penumbra-opacity),0 .13333rem .64rem .10667rem var(--shadow-key-ambient-opacity)}.var-elevation--14{box-shadow:0 .18667rem .24rem -.10667rem var(--shadow-key-umbra-opacity),0 .37333rem .56rem .05333rem var(--shadow-key-penumbra-opacity),0 .13333rem .69333rem .10667rem var(--shadow-key-ambient-opacity)}.var-elevation--15{box-shadow:0 .21333rem .24rem -.13333rem var(--shadow-key-umbra-opacity),0 .4rem .58667rem .05333rem var(--shadow-key-penumbra-opacity),0 .16rem .74667rem .13333rem var(--shadow-key-ambient-opacity)}.var-elevation--16{box-shadow:0 .21333rem .26667rem -.13333rem var(--shadow-key-umbra-opacity),0 .42667rem .64rem .05333rem var(--shadow-key-penumbra-opacity),0 .16rem .8rem .13333rem var(--shadow-key-ambient-opacity)}.var-elevation--17{box-shadow:0 .21333rem .29333rem -.13333rem var(--shadow-key-umbra-opacity),0 .45333rem .69333rem .05333rem var(--shadow-key-penumbra-opacity),0 .16rem .85333rem .13333rem var(--shadow-key-ambient-opacity)}.var-elevation--18{box-shadow:0 .24rem .29333rem -.13333rem var(--shadow-key-umbra-opacity),0 .48rem .74667rem .05333rem var(--shadow-key-penumbra-opacity),0 .18667rem .90667rem .16rem var(--shadow-key-ambient-opacity)}.var-elevation--19{box-shadow:0 .24rem .32rem -.16rem var(--shadow-key-umbra-opacity),0 .50667rem .77333rem .05333rem var(--shadow-key-penumbra-opacity),0 .18667rem .96rem .16rem var(--shadow-key-ambient-opacity)}.var-elevation--20{box-shadow:0 .26667rem .34667rem -.16rem var(--shadow-key-umbra-opacity),0 .53333rem .82667rem .08rem var(--shadow-key-penumbra-opacity),0 .21333rem 1.01333rem .18667rem var(--shadow-key-ambient-opacity)}.var-elevation--21{box-shadow:0 .26667rem .34667rem -.16rem var(--shadow-key-umbra-opacity),0 .56rem .88rem .08rem var(--shadow-key-penumbra-opacity),0 .21333rem 1.06667rem .18667rem var(--shadow-key-ambient-opacity)}.var-elevation--22{box-shadow:0 .26667rem .37333rem -.16rem var(--shadow-key-umbra-opacity),0 .58667rem .93333rem .08rem var(--shadow-key-penumbra-opacity),0 .21333rem 1.12rem .18667rem var(--shadow-key-ambient-opacity)}.var-elevation--23{box-shadow:0 .29333rem .37333rem -.18667rem var(--shadow-key-umbra-opacity),0 .61333rem .96rem .08rem var(--shadow-key-penumbra-opacity),0 .24rem 1.17333rem .21333rem var(--shadow-key-ambient-opacity)}.var-elevation--24{box-shadow:0 .29333rem .4rem -.18667rem var(--shadow-key-umbra-opacity),0 .64rem 1.01333rem .08rem var(--shadow-key-penumbra-opacity),0 .24rem 1.22667rem .21333rem var(--shadow-key-ambient-opacity)}:root{--loading-opacity: .38;--loading-desc-margin: .21333rem 0 0}.var-loading{--loading-normal-width: 1.33333rem;--loading-normal-height: calc(var(--font-size-md) + .05333rem);--loading-large-width: 1.70667rem;--loading-large-height: calc(var(--font-size-lg) + .05333rem);--loading-small-width: .96rem;--loading-small-height: calc(var(--font-size-sm) + .05333rem);--loading-mini-width: .58667rem;--loading-mini-height: calc(var(--font-size-xs) + .05333rem);position:relative}.var-loading__content{position:relative;transition:opacity .3s;opacity:1}.var-loading__content--active{opacity:var(--loading-opacity)}.var-loading__content-mask{position:absolute;left:0;right:0;top:0;bottom:0}.var-loading__body{display:flex;justify-content:center;align-items:center;height:100%;flex-direction:column}.var-loading__inside{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1}.var-loading__description{color:var(--color-primary);margin:var(--loading-desc-margin)}.var-loading__description--large{font-size:var(--font-size-lg)}.var-loading__description--normal{font-size:var(--font-size-md)}.var-loading__description--small{font-size:var(--font-size-sm)}.var-loading__description--mini{font-size:var(--font-size-xs)}.var-loading__circle{display:flex}.var-loading__circle-block{display:inline-block;color:var(--color-primary);animation:circle 1.8s linear infinite}.var-loading__circle-block--large{width:.96rem;height:.96rem}.var-loading__circle-block--normal{width:.8rem;height:.8rem}.var-loading__circle-block--small{width:.64rem;height:.64rem}.var-loading__circle-block--mini{width:.48rem;height:.48rem}.var-loading__circle-block svg{display:block;width:100%;height:100%}.var-loading__circle-block svg circle{animation:circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}@keyframes circle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}.var-loading__wave{--loading-wave-size-item-width: .13333rem;--loading-wave-size-item-margin: .13333rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.var-loading__wave--large{width:var(--loading-large-width);height:var(--loading-large-height)}.var-loading__wave--normal{width:var(--loading-normal-width);height:var(--loading-normal-height)}.var-loading__wave--small{width:var(--loading-small-width);height:var(--loading-small-height)}.var-loading__wave--mini{width:var(--loading-mini-width);height:var(--loading-mini-height)}.var-loading__wave-item{height:100%;display:inline-block;animation:1.2s ease-in-out infinite wave;background-color:var(--color-primary)}.var-loading__wave-item:nth-child(1){animation-delay:-1.2s;margin-left:0}.var-loading__wave-item:nth-child(2){animation-delay:-1.1s}.var-loading__wave-item:nth-child(3){animation-delay:-1s}.var-loading__wave-item:nth-child(4){animation-delay:-.9s}.var-loading__wave-item:nth-child(5){animation-delay:-.8s}.var-loading__wave-item--large{width:var(--loading-wave-size-item-width);margin-left:var(--loading-wave-size-item-margin)}.var-loading__wave-item--normal{width:calc(var(--loading-wave-size-item-width) - .02667rem);margin-left:calc(var(--loading-wave-size-item-margin) - .02667rem)}.var-loading__wave-item--small{width:calc(var(--loading-wave-size-item-width) - .05333rem);margin-left:calc(var(--loading-wave-size-item-margin) - .05333rem)}.var-loading__wave-item--mini{width:calc(var(--loading-wave-size-item-width) - .08rem);margin-left:calc(var(--loading-wave-size-item-margin) - .08rem)}@keyframes wave{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}.var-loading__cube{--loading-cube-size-item-width: .26667rem;--loading-cube-size-item-height: .26667rem;--loading-cube-size-item-margin: .13333rem;display:flex;align-items:center;flex-shrink:0}.var-loading__cube--large{width:var(--loading-large-width);height:var(--loading-large-height)}.var-loading__cube--normal{width:var(--loading-normal-width);height:var(--loading-normal-height)}.var-loading__cube--small{width:var(--loading-small-width);height:var(--loading-small-height)}.var-loading__cube--mini{width:var(--loading-mini-width);height:var(--loading-mini-height)}.var-loading__cube-item{display:inline-block;transform-origin:right bottom;animation:1.5s ease infinite cube;background-color:var(--color-primary)}.var-loading__cube-item:nth-child(1){animation-delay:.2s;margin-left:0}.var-loading__cube-item:nth-child(2){animation-delay:.4s}.var-loading__cube-item:nth-child(3){animation-delay:.6s}.var-loading__cube-item:nth-child(4){animation-delay:.8s}.var-loading__cube-item--large{height:var(--loading-cube-size-item-height);width:var(--loading-cube-size-item-width);margin-left:var(--loading-cube-size-item-margin)}.var-loading__cube-item--normal{height:calc(var(--loading-cube-size-item-height) - .05333rem);width:calc(var(--loading-cube-size-item-width) - .05333rem);margin-left:calc(var(--loading-cube-size-item-margin) - .02667rem)}.var-loading__cube-item--small{height:calc(var(--loading-cube-size-item-height) - .10667rem);width:calc(var(--loading-cube-size-item-width) - .10667rem);margin-left:calc(var(--loading-cube-size-item-margin) - .05333rem)}.var-loading__cube-item--mini{height:calc(var(--loading-cube-size-item-height) - .16rem);width:calc(var(--loading-cube-size-item-width) - .16rem);margin-left:calc(var(--loading-cube-size-item-margin) - .08rem)}@keyframes cube{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:rotate(90deg) scale(.3)}}.var-loading__rect{--loading-rect-size-item-width: .21333rem;--loading-rect-size-item-height: 100%;display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;flex-shrink:0}.var-loading__rect--large{width:var(--loading-large-width);height:var(--loading-large-height)}.var-loading__rect--normal{width:var(--loading-normal-width);height:var(--loading-normal-height)}.var-loading__rect--small{width:var(--loading-small-width);height:var(--loading-small-height)}.var-loading__rect--mini{width:var(--loading-mini-width);height:var(--loading-mini-height)}.var-loading__rect-item{animation:2s ease-in-out infinite rect;background-color:var(--color-primary)}.var-loading__rect-item:nth-child(1){animation-delay:1.75s}.var-loading__rect-item:nth-child(2){animation-delay:1.5s}.var-loading__rect-item:nth-child(3){animation-delay:1.25s}.var-loading__rect-item:nth-child(4){animation-delay:1s}.var-loading__rect-item:nth-child(5){animation-delay:.75s}.var-loading__rect-item:nth-child(6){animation-delay:.5s}.var-loading__rect-item:nth-child(7){animation-delay:.25s}.var-loading__rect-item:nth-child(8){animation-delay:0s}.var-loading__rect-item--large{height:var(--loading-rect-size-item-height);width:var(--loading-rect-size-item-width)}.var-loading__rect-item--normal{height:calc(var(--loading-rect-size-item-height) * .9);width:calc(var(--loading-rect-size-item-width) * .8)}.var-loading__rect-item--small{height:calc(var(--loading-rect-size-item-height) * .8);width:calc(var(--loading-rect-size-item-width) * .6)}.var-loading__rect-item--mini{height:calc(var(--loading-rect-size-item-height) * .7);width:calc(var(--loading-rect-size-item-width) * .4)}@keyframes rect{0%{opacity:.3}25%{opacity:1}50%{opacity:.3}65%{opacity:1}to{opacity:.3}}.var-loading__disappear{--loading-disappear-size-item-width: .4rem;--loading-disappear-size-item-height: .4rem;display:flex;justify-content:space-around;align-items:center;flex-flow:nowrap;flex-shrink:0}.var-loading__disappear--large{width:var(--loading-large-width);height:var(--loading-large-height)}.var-loading__disappear--normal{width:var(--loading-normal-width);height:var(--loading-normal-height)}.var-loading__disappear--small{width:var(--loading-small-width);height:var(--loading-small-height)}.var-loading__disappear--mini{width:var(--loading-mini-width);height:var(--loading-mini-height)}.var-loading__disappear-item{border-radius:50%;animation:.5s ease-in-out infinite alternate disappear;background-color:var(--color-primary)}.var-loading__disappear-item:nth-child(1){animation-delay:-.4s}.var-loading__disappear-item:nth-child(2){animation-delay:-.2s}.var-loading__disappear-item:nth-child(3){animation-delay:0s}.var-loading__disappear-item--large{height:var(--loading-disappear-size-item-height);width:var(--loading-disappear-size-item-width)}.var-loading__disappear-item--normal{height:calc(var(--loading-disappear-size-item-height) * .8);width:calc(var(--loading-disappear-size-item-width) * .8)}.var-loading__disappear-item--small{height:calc(var(--loading-disappear-size-item-height) * .6);width:calc(var(--loading-disappear-size-item-width) * .6)}.var-loading__disappear-item--mini{height:calc(var(--loading-disappear-size-item-height) * .4);width:calc(var(--loading-disappear-size-item-width) * .4)}@keyframes disappear{0%{opacity:1}to{opacity:0}}:root{--button-default-color: #f5f5f5;--button-primary-color: var(--color-primary);--button-danger-color: var(--color-danger);--button-success-color: var(--color-success);--button-warning-color: var(--color-warning);--button-info-color: var(--color-info);--button-disabled-color: var(--color-disabled);--button-disabled-text-color: var(--color-text-disabled);--button-border-radius: .10667rem;--button-mini-padding: 0 .24rem;--button-small-padding: 0 .29333rem;--button-normal-padding: 0 .4rem;--button-large-padding: 0 .58667rem;--button-round-padding: .16rem;--button-mini-height: .53333rem;--button-small-height: .74667rem;--button-normal-height: .96rem;--button-large-height: 1.17333rem;--button-mini-font-size: var(--font-size-xs);--button-small-font-size: var(--font-size-sm);--button-normal-font-size: var(--font-size-md);--button-large-font-size: var(--font-size-lg)}.var-button{position:relative;justify-content:center;align-items:center;outline:none;border:none;border-radius:var(--button-border-radius);user-select:none;cursor:pointer;font-family:inherit;transition:box-shadow .2s,background-color .25s;will-change:box-shadow;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap}.var-button:active{box-shadow:0 .08rem .13333rem -.02667rem var(--shadow-key-umbra-opacity),0 .13333rem .21333rem 0 var(--shadow-key-penumbra-opacity),0 .02667rem .37333rem 0 var(--shadow-key-ambient-opacity)}.var-button__content{display:flex;align-items:center;flex-wrap:wrap}.var-button__loading[var-button-cover]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.var-button--default{color:inherit;background-color:var(--button-default-color)}.var-button--primary{color:#fff;background-color:var(--button-primary-color)}.var-button--info{color:#fff;background-color:var(--button-info-color)}.var-button--success{color:#fff;background-color:var(--button-success-color)}.var-button--warning{color:#fff;background-color:var(--button-warning-color)}.var-button--danger{color:#fff;background-color:var(--button-danger-color)}.var-button--disabled{background-color:var(--button-disabled-color);color:var(--button-disabled-text-color);cursor:not-allowed;box-shadow:none!important}.var-button--block{width:100%}.var-button--text{background-color:transparent}.var-button--text:active{box-shadow:none}.var-button--text-default{color:inherit}.var-button--text-primary{color:var(--button-primary-color)}.var-button--text-info{color:var(--button-info-color)}.var-button--text-success{color:var(--button-success-color)}.var-button--text-warning{color:var(--button-warning-color)}.var-button--text-danger{color:var(--button-danger-color)}.var-button--text-disabled{color:var(--button-disabled-text-color)}.var-button--normal{height:var(--button-normal-height);padding:var(--button-normal-padding);font-size:var(--button-normal-font-size)}.var-button--large{height:var(--button-large-height);padding:var(--button-large-padding);font-size:var(--button-large-font-size)}.var-button--small{height:var(--button-small-height);padding:var(--button-small-padding);font-size:var(--button-small-font-size)}.var-button--mini{height:var(--button-mini-height);padding:var(--button-mini-padding);font-size:var(--button-mini-font-size)}.var-button--round{padding:var(--button-round-padding);border-radius:50%;height:auto}.var-button--outline{border:thin solid currentColor}.var-button--hidden{opacity:0}@font-face{font-family:varlet-icons;src:url(data:font/truetype;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI/skzfAAABjAAAAFZjbWFwjZdd9AAAA7AAAAf2Z2x5ZsxpT7MAAAyQAAAxJGhlYWRhIEB+AAAA4AAAADZoaGVhA8QCMwAAALwAAAAkaG10eOQAAAAAAAHkAAABzGxvY2GWuqLkAAALqAAAAOhtYXhwAYwAfgAAARgAAAAgbmFtZQyVRWAAAD20AAACRnBvc3QvJoX1AAA//AAABvcAAQAAAcD/wAAAAgAAAP//AgEAAQAAAAAAAAAAAAAAAAAAAHMAAQAAAAEAAK/5zeZfDzz1AAsCAAAAAAAAAAAAAAAAAAAAAAAAAP/AAgEBwQAAAAgAAgAAAAAAAAABAAAAcwByAA8AAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAEB/AGQAAUAAAFEAWYAAABHAUQBZgAAAPUAGQCEAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAQPAA8RMBwP/AAC4BwQBAAAAAAQAAAAAAAAAAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAA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AA8EcAAAAwAADwSAAA8EgAAAAxAADwSQAA8EkAAAAyAADwUAAA8FAAAAAzAADwUQAA8FEAAAA0AADwUgAA8FIAAAA1AADwUwAA8FMAAAA2AADwVAAA8FQAAAA3AADwVQAA8FUAAAA4AADwVgAA8FYAAAA5AADwVwAA8FcAAAA6AADwWAAA8FgAAAA7AADwWQAA8FkAAAA8AADwYAAA8GAAAAA9AADwYQAA8GEAAAA+AADwYgAA8GIAAAA/AADwYwAA8GMAAABAAADwZAAA8GQAAABBAADwZQAA8GUAAABCAADwZgAA8GYAAABDAADwZwAA8GcAAABEAADwaAAA8GgAAABFAADwaQAA8GkAAABGAADwcAAA8HAAAABHAADwcQAA8HEAAABIAADwcgAA8HIAAABJAADwcwAA8HMAAABKAADwdAAA8HQAAABLAADwdQAA8HUAAABMAADwdgAA8HYAAABNAADwdwAA8HcAAABOAADweAAA8HgAAABPAADweQAA8HkAAABQAADwgAAA8IAAAABRAADwgQAA8IEAAABSAADwggAA8IIAAABTAADwgwAA8IMAAABUAADwhAAA8IQAAABVAADwhQAA8IUAAABWAADwhgAA8IYAAABXAADwhwAA8IcAAABYAADwiAAA8IgAAABZAADwiQAA8IkAAABaAADwkAAA8JAAAABbAADwkQAA8JEAAABcAADwkgAA8JIAAABdAADwkwAA8JMAAABeAADwlAAA8JQAAABfAADwlQAA8JUAAABgAADwlgAA8JYAAABhAADwlwAA8JcAAABiAADwmAAA8JgAAABjAADwmQAA8JkAAABkAADxAAAA8QAAAABlAADxAQAA8QEAAABmAADxAgAA8QIAAABnAADxAwAA8QMAAABoAADxBAAA8QQAAABpAADxBQAA8QUAAABqAADxBgAA8QYAAABrAADxBwAA8QcAAABsAADxCAAA8QgAAABtAADxCQAA8QkAAABuAADxEAAA8RAAAABvAADxEQAA8REAAABwAADxEgAA8RIAAABxAADxEwAA8RMAAAByAAAAAAAAACgAYACIAMQA3AD8ASQBWgGAAaoBzgISAkYCdgKkAuQDFgNOA24DoAO4A9gEAAQuBGwEwATiBQoF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1jaXJjbGUtb3V0bGluZQVjaGVjawx3aW5kb3ctY2xvc2UEcGx1cwVtaW51cwpjaGV2cm9uLXVwDGNoZXZyb24tZG93bgxjaGV2cm9uLWxlZnQNY2hldnJvbi1yaWdodAdtZW51LXVwCW1lbnUtZG93bgltZW51LWxlZnQKbWVudS1yaWdodAZ1cGxvYWQIZG93bmxvYWQUZm9ybWF0LWxpc3QtY2hlY2tib3gEbWVudQltZW51LW9wZW4NZG90cy12ZXJ0aWNhbBRtZXNzYWdlLXRleHQtb3V0bGluZRptZXNzYWdlLXByb2Nlc3Npbmctb3V0bGluZRN3aGl0ZS1iYWxhbmNlLXN1bm55DndlYXRoZXItY2xvdWR5EXdlYXRoZXItbGlnaHRuaW5nD3dlYXRoZXItcG91cmluZw13ZWF0aGVyLXNub3d5DXdlYXRoZXItcmFpbnkJdHJhbnNsYXRlB21hZ25pZnkGZ2l0aHViB3JlZnJlc2gKYXJyb3ctZG93bgVwb3dlchVmaWxlLWRvY3VtZW50LW91dGxpbmUEZmlyZQR3aWZpBndyZW5jaAxjYWtlLXZhcmlhbnQIbm90ZWJvb2sJY2VsbHBob25lDXdlYXRoZXItbmlnaHQDeG1sDGNvbnRlbnQtY29weQtxcmNvZGUtc2NhbgxiYXJjb2RlLXNjYW4Ic2hvcHBpbmcQc2hvcHBpbmctb3V0bGluZRRjYXJkLWFjY291bnQtZGV0YWlscxxjYXJkLWFjY291bnQtZGV0YWlscy1vdXRsaW5lA3BpbgdwaW4tb2ZmC3Bpbi1vdXRsaW5lD3Bpbi1vZmYtb3V0bGluZQljb2RlLWpzb24AAAA=) format("truetype");font-weight:400;font-style:normal}.var-icon--set{font-family:varlet-icons}.var-icon-checkbox-marked-circle:before{content:"\\f000"}.var-icon-check-circle-outline:before{content:"\\f001"}.var-icon-information:before{content:"\\f002"}.var-icon-information-outline:before{content:"\\f003"}.var-icon-warning:before{content:"\\f004"}.var-icon-alert-outline:before{content:"\\f005"}.var-icon-error:before{content:"\\f006"}.var-icon-alert-circle-outline:before{content:"\\f007"}.var-icon-checkbox-marked:before{content:"\\f008"}.var-icon-checkbox-marked-outline:before{content:"\\f009"}.var-icon-checkbox-blank-outline:before{content:"\\f010"}.var-icon-radio-marked:before{content:"\\f011"}.var-icon-checkbox-marked-circle-outline:before{content:"\\f012"}.var-icon-radio-blank:before{content:"\\f013"}.var-icon-close-circle:before{content:"\\f014"}.var-icon-close-circle-outline:before{content:"\\f015"}.var-icon-close-box:before{content:"\\f016"}.var-icon-close-box-outline:before{content:"\\f017"}.var-icon-minus-circle:before{content:"\\f018"}.var-icon-minus-circle-outline:before{content:"\\f019"}.var-icon-star:before{content:"\\f020"}.var-icon-star-half-full:before{content:"\\f021"}.var-icon-star-outline:before{content:"\\f022"}.var-icon-heart:before{content:"\\f023"}.var-icon-heart-half-full:before{content:"\\f024"}.var-icon-heart-outline:before{content:"\\f025"}.var-icon-delete:before{content:"\\f026"}.var-icon-trash-can:before{content:"\\f027"}.var-icon-trash-can-outline:before{content:"\\f028"}.var-icon-minus-box:before{content:"\\f029"}.var-icon-minus-box-outline:before{content:"\\f030"}.var-icon-account-circle:before{content:"\\f031"}.var-icon-account-circle-outline:before{content:"\\f032"}.var-icon-cog:before{content:"\\f033"}.var-icon-cog-outline:before{content:"\\f034"}.var-icon-map-marker-radius:before{content:"\\f035"}.var-icon-map-marker-radius-outline:before{content:"\\f036"}.var-icon-camera:before{content:"\\f037"}.var-icon-camera-outline:before{content:"\\f038"}.var-icon-cart:before{content:"\\f039"}.var-icon-cart-outline:before{content:"\\f040"}.var-icon-phone:before{content:"\\f041"}.var-icon-phone-outline:before{content:"\\f042"}.var-icon-image:before{content:"\\f043"}.var-icon-image-outline:before{content:"\\f044"}.var-icon-bell:before{content:"\\f045"}.var-icon-bell-outline:before{content:"\\f046"}.var-icon-home:before{content:"\\f047"}.var-icon-home-outline:before{content:"\\f048"}.var-icon-map-marker:before{content:"\\f049"}.var-icon-map-marker-outline:before{content:"\\f050"}.var-icon-magnify-plus:before{content:"\\f051"}.var-icon-magnify-plus-outline:before{content:"\\f052"}.var-icon-magnify-minus:before{content:"\\f053"}.var-icon-magnify-minus-outline:before{content:"\\f054"}.var-icon-play-circle:before{content:"\\f055"}.var-icon-play-circle-outline:before{content:"\\f056"}.var-icon-help-circle:before{content:"\\f057"}.var-icon-help-circle-outline:before{content:"\\f058"}.var-icon-plus-circle:before{content:"\\f059"}.var-icon-plus-circle-outline:before{content:"\\f060"}.var-icon-check:before{content:"\\f061"}.var-icon-window-close:before{content:"\\f062"}.var-icon-plus:before{content:"\\f063"}.var-icon-minus:before{content:"\\f064"}.var-icon-chevron-up:before{content:"\\f065"}.var-icon-chevron-down:before{content:"\\f066"}.var-icon-chevron-left:before{content:"\\f067"}.var-icon-chevron-right:before{content:"\\f068"}.var-icon-menu-up:before{content:"\\f069"}.var-icon-menu-down:before{content:"\\f070"}.var-icon-menu-left:before{content:"\\f071"}.var-icon-menu-right:before{content:"\\f072"}.var-icon-upload:before{content:"\\f073"}.var-icon-download:before{content:"\\f074"}.var-icon-format-list-checkbox:before{content:"\\f075"}.var-icon-menu:before{content:"\\f076"}.var-icon-menu-open:before{content:"\\f077"}.var-icon-dots-vertical:before{content:"\\f078"}.var-icon-message-text-outline:before{content:"\\f079"}.var-icon-message-processing-outline:before{content:"\\f080"}.var-icon-white-balance-sunny:before{content:"\\f081"}.var-icon-weather-cloudy:before{content:"\\f082"}.var-icon-weather-lightning:before{content:"\\f083"}.var-icon-weather-pouring:before{content:"\\f084"}.var-icon-weather-snowy:before{content:"\\f085"}.var-icon-weather-rainy:before{content:"\\f086"}.var-icon-translate:before{content:"\\f087"}.var-icon-magnify:before{content:"\\f088"}.var-icon-github:before{content:"\\f089"}.var-icon-refresh:before{content:"\\f090"}.var-icon-arrow-down:before{content:"\\f091"}.var-icon-power:before{content:"\\f092"}.var-icon-file-document-outline:before{content:"\\f093"}.var-icon-fire:before{content:"\\f094"}.var-icon-wifi:before{content:"\\f095"}.var-icon-wrench:before{content:"\\f096"}.var-icon-cake-variant:before{content:"\\f097"}.var-icon-notebook:before{content:"\\f098"}.var-icon-cellphone:before{content:"\\f099"}.var-icon-weather-night:before{content:"\\f100"}.var-icon-xml:before{content:"\\f101"}.var-icon-content-copy:before{content:"\\f102"}.var-icon-qrcode-scan:before{content:"\\f103"}.var-icon-barcode-scan:before{content:"\\f104"}.var-icon-shopping:before{content:"\\f105"}.var-icon-shopping-outline:before{content:"\\f106"}.var-icon-card-account-details:before{content:"\\f107"}.var-icon-card-account-details-outline:before{content:"\\f108"}.var-icon-pin:before{content:"\\f109"}.var-icon-pin-off:before{content:"\\f110"}.var-icon-pin-outline:before{content:"\\f111"}.var-icon-pin-off-outline:before{content:"\\f112"}.var-icon-code-json:before{content:"\\f113"}:root{--icon-size: .53333rem}.var-icon{position:relative;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;color:inherit;font-size:var(--icon-size)}.var-icon:before{position:relative;display:inline-block;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;font-weight:400;font-style:normal;line-height:1}.var-icon--shrinking{transform:scale(0);transition-property:transform}.var-icon__image{width:var(--icon-size);height:var(--icon-size);object-fit:cover}:root{--snackbar-width: 6.82667rem;--snackbar-color: rgba(255, 255, 255, .87);--snackbar-border-radius: .10667rem;--snackbar-background: #333;--snackbar-font-size: var(--font-size-md);--snackbar-margin: .16rem .64rem;--snackbar-border-color: currentColor;--snackbar-success-background: var(--color-success);--snackbar-info-background: var(--color-info);--snackbar-error-background: var(--color-danger);--snackbar-warning-background: var(--color-warning);--snackbar-content-padding: .37333rem .42667rem;--snackbar-action-margin: 0 .42667rem 0 0}.var-transition-group{position:fixed;left:0;right:0;top:0;bottom:0;pointer-events:none}.var-pointer-auto{pointer-events:auto}.var-snackbar{display:flex;justify-content:center;align-items:baseline;left:0;right:0;bottom:0;transition:all .15s var(--cubic-bezier)}.var-snackbar__transition{top:0;position:fixed}.var-snackbar__transition .var-snackbar__wrapper{position:absolute}.var-snackbar__transition .var-snackbar__wrapper-top{top:5%}.var-snackbar__transition .var-snackbar__wrapper-center{top:45%}.var-snackbar__transition .var-snackbar__wrapper-bottom{bottom:5%}.var-snackbar__wrapper{width:var(--snackbar-width);display:flex;border-radius:var(--snackbar-border-radius);color:var(--snackbar-color);background:var(--snackbar-background);font-size:var(--snackbar-font-size);margin:var(--snackbar-margin);align-items:center;border-color:var(--snackbar-border-color);pointer-events:auto;transition:.3s var(--cubic-bezier)}.var-snackbar__wrapper-success{background:var(--snackbar-success-background)}.var-snackbar__wrapper-info{background:var(--snackbar-info-background)}.var-snackbar__wrapper-warning{background:var(--snackbar-warning-background)}.var-snackbar__wrapper-error{background:var(--snackbar-error-background)}.var-snackbar__content{flex-grow:1;padding:var(--snackbar-content-padding)}.var-snackbar__action{margin:var(--snackbar-action-margin);display:flex}.var-snackbar__vertical{flex-direction:column;align-items:flex-start}.var-snackbar__vertical .var-snackbar__action{align-self:flex-end;margin-bottom:.21333rem}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to{opacity:0;transform:translateY(-.8rem)}:root{--cell-color: var(--color-text);--cell-font-size: var(--font-size-md);--cell-description-font-size: var(--font-size-sm);--cell-description-color: rgba(0, 0, 0, .6);--cell-description-margin-top: .10667rem;--cell-padding: .26667rem .32rem;--cell-min-height: 1.06667rem;--cell-border-color: #bcc2cb;--cell-border-left: .32rem;--cell-border-right: .32rem;--cell-icon-right: .21333rem;--cell-extra-left: .21333rem}.var-cell{align-items:center;display:flex;min-height:var(--cell-min-height);outline:none;width:100%;padding:var(--cell-padding);position:relative;box-sizing:border-box;font-size:var(--cell-font-size);color:var(--cell-color)}.var-cell--border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;bottom:0;right:var(--cell-border-right);left:var(--cell-border-left);border-bottom:.02667rem solid var(--cell-border-color);transform:scaleY(.5)}.var-cell__icon{margin-right:var(--cell-icon-right);flex:0}.var-cell__content{flex:1;overflow:hidden}.var-cell__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.var-cell__description{font-size:var(--cell-description-font-size);color:var(--cell-description-color);margin-top:var(--cell-description-margin-top)}.var-cell__extra{flex:0;margin-left:var(--cell-extra-left)}.var-cell--cursor{cursor:pointer}:root{--ripple-cubic-bezier: cubic-bezier(.68, .01, .62, .6);--ripple-color: currentColor}.var-ripple{position:absolute;transition:transform .2s var(--ripple-cubic-bezier),opacity .14s linear;top:0;left:0;border-radius:50%;opacity:0;will-change:transform,opacity;pointer-events:none;z-index:100;background-color:var(--ripple-color)}:root{--form-details-error-message-color: var(--color-danger);--form-details-extra-message-color: #888;--form-details-margin-top: .16rem;--form-details-font-size: .32rem;--form-details-message-margin-right: .10667rem}.var-form-details{display:flex;justify-content:space-between;font-size:var(--form-details-font-size);margin-top:var(--form-details-margin-top)}.var-form-details-enter-from,.var-form-details-leave-to{opacity:0;margin-top:.05333rem!important}.var-form-details-enter-active,.var-form-details-leave-active{transition:.2s all var(--cubic-bezier)}.var-form-details__message-enter-from,.var-form-details__message-leave-to{opacity:0}.var-form-details__message-enter-active,.var-form-details__message-leave-active{transition:.2s all var(--cubic-bezier)}.var-form-details__error-message{flex-grow:1;color:var(--form-details-error-message-color);margin-right:var(--form-details-message-margin-right);user-select:none;text-align:left}.var-form-details__extra-message{flex-shrink:0;color:var(--form-details-extra-message-color);user-select:none;text-align:right}.var-hover-overlay{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-color:currentColor;opacity:0;transition:opacity .15s;will-change:opacity;pointer-events:none}.var-hover-overlay--hovering{opacity:.15}:root{--switch-track-background: #fff;--switch-track-active-background: var(--color-primary);--switch-track-error-background: var(--color-danger);--switch-ripple-color: var(--color-primary);--switch-handle-background: #fff;--switch-handle-color: #fff;--switch-handle-active-background: var(--color-primary);--switch-handle-error-background: var(--color-danger);--switch-disabled-opacity: var(--opacity-disabled)}.var-switch{display:inline-block}.var-switch__block{position:relative;display:flex;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;justify-content:center;height:.64rem;width:1.06667rem;transition:filter .25s}.var-switch--disabled{filter:opacity(var(--switch-disabled-opacity));cursor:not-allowed}.var-switch__track{background-color:var(--switch-track-background);transition:background-color .25s;filter:opacity(var(--switch-disabled-opacity));height:.384rem;width:1.01333rem;border-radius:calc(.53333rem * 2 / 3)}.var-switch__track--active{background-color:var(--switch-track-active-background)}.var-switch__track--error{background-color:var(--switch-track-error-background)!important}.var-switch__ripple{position:absolute;display:flex;align-items:center;justify-content:center;color:var(--switch-ripple-color);border-radius:50%;overflow:hidden;transition:.3s var(--cubic-bezier);width:1.06667rem;height:1.06667rem;left:-.26667rem}.var-switch__ripple--active{left:.26667rem}.var-switch__handle{border-radius:50%;background-color:var(--switch-handle-background);display:flex;align-items:center;justify-content:center;color:var(--switch-handle-color);transition:background-color .25s;width:.53333rem;height:.53333rem}.var-switch__handle--active{background-color:var(--switch-handle-active-background)}.var-switch__handle--error{background-color:var(--switch-handle-error-background)!important}*{margin:0;padding:0;box-sizing:border-box}img{-webkit-touch-callout:none}body{user-select:none}:root{--cursor-color: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABRJREFUCB1jZDy49T8DEDCBCBAAACTkAnq23WmtAAAAAElFTkSuQmCC);--container-background: #fff;--active-stave-box: rgba(1, 193, 181, .2);--corsor-opacity: 1}.eyeProtection{--cursor-color: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABZJREFUCB1j/N8sv5UBCJhABMN/hv8AKQgEWNQffFMAAAAASUVORK5CYII=);--container-background: #fff4e1;--active-measur-backgorund: rgba(255, 98, 37, .18)}.hideCursor{--corsor-opacity: 0}.selectionToast{top:10vh}.pop-center-enter-from,.pop-center-leave-to{transform:scale(0)}.pop-center-enter-active,.pop-center-leave-active{transition:all .25s}:root{--van-duration-base: .25s}.van-overlay{transition:all .25s}.popup-custom{transition:all .25s;background:transparent;overflow:initial;max-width:100%}.popup-custom.van-scale{transform-origin:center -25%}.van-scale-enter-from,.van-scale-leave-to{opacity:0;transform:scale(.3)}.van-scale-enter-active,.van-scale-leave-active{transition:all .25s}.custom-close-btn .van-popup__close-icon{top:0;right:-.8rem;background-color:#fff;border-radius:50%;padding:.10667rem;font-size:.42667rem;color:var(--van-primary-color)}.v-slide-right-enter-from,.v-slide-right-leave-to{transform:translate(100%)}.v-slide-right-enter-active,.v-slide-right-leave-active{transition:all .3s}.v-slide-up-enter-from,.v-slide-up-leave-to{transform:translateY(100%)}.v-slide-up-enter-active,.v-slide-up-leave-active{transition:all .3s}@keyframes guideKeyframes{0%{transform:scale(.9)}50%{transform:scale(1)}to{transform:scale(.9)}}.guideAnimate{animation-duration:1.5s;animation-name:guideKeyframes;animation-iteration-count:infinite}._scoreMode_11hmk_1{background:transparent;left:10vw}._audioList_1j0z3_1{position:fixed;left:0;bottom:0;width:100%;z-index:-1000000}._popup_1838h_1{background:transparent;width:100%;height:100%}._dots_1838h_6{display:flex;justify-content:center;align-items:center;width:100%;height:100%}._dot_1838h_6{width:.8rem;height:.8rem;margin:0 .53333rem;background-color:silver;border-radius:50%}._dot_1838h_6._active_1838h_20{background-color:#fff}._dot_1838h_6._one_1838h_23{background-color:var(--van-primary-color)}._selectionContainer_1jfjr_1{position:absolute;left:0;top:0;right:0;z-index:2}._position_1jfjr_8{position:absolute}._note_1jfjr_11{cursor:pointer}._staveBox_1jfjr_14{background-color:var(--active-stave-box)!important}._leftStaveBox_1jfjr_17{background-color:var(--active-stave-box)}._leftStaveBox_1jfjr_17:before{content:"";position:absolute;left:-.13333rem;top:-.13333rem;width:.13333rem;height:100%;border-top:.13333rem solid var(--van-primary-color);border-left:.13333rem solid var(--van-primary-color);border-bottom:.13333rem solid var(--van-primary-color)}._rightStaveBox_1jfjr_31{background-color:var(--active-stave-box)}._rightStaveBox_1jfjr_31:after{content:"";position:absolute;right:-.13333rem;top:-.13333rem;width:.13333rem;height:100%;border-top:.13333rem solid var(--van-primary-color);border-right:.13333rem solid var(--van-primary-color);border-bottom:.13333rem solid var(--van-primary-color)}._centerStaveBox_1jfjr_45{background-color:var(--active-stave-box)}._centerStaveBox_1jfjr_45:before{content:"";position:absolute;left:-.13333rem;top:-.13333rem;width:.13333rem;height:100%;border-top:.13333rem solid var(--van-primary-color);border-left:.13333rem solid var(--van-primary-color);border-bottom:.13333rem solid var(--van-primary-color)}._centerStaveBox_1jfjr_45:after{content:"";position:absolute;right:-.13333rem;top:-.13333rem;width:.13333rem;height:100%;border-top:.13333rem solid var(--van-primary-color);border-right:.13333rem solid var(--van-primary-color);border-bottom:.13333rem solid var(--van-primary-color)}._prepareStaveBox_1jfjr_70{background-color:rgba(255,98,37,.18)}._disable_1jfjr_73{pointer-events:none}._line_1jfjr_76{position:absolute;height:120%;background-color:rgba(25,140,254,.7);min-height:58PX;height:58PX;top:50%;width:2PX!important;border-radius:4Px;opacity:var(--corsor-opacity);transform:translate(4PX,-50%)}._lineStaff_1jfjr_88{width:14PX}._lineJianPu_1jfjr_91{width:18PX}.lineHide{opacity:0!important}._scoreItem_1jfjr_97{position:absolute;left:50%;top:-90%;transform:translate(-50%);font-size:.42667rem;font-family:Roboto,sans-serif;font-weight:700;display:flex;align-items:center;pointer-events:none;transition:all .8s}._scoreItem_1jfjr_97 img{height:.8rem}.scoreItemLeve0{background-color:rgba(255,142,142,.32)}.scoreItemLeve1{background-color:rgba(1,193,181,.2)}.scoreItemLeve2{background-color:rgba(255,178,82,.37)}.scoreItemLeve3{background-color:rgba(255,220,64,.4)}.centerTop-enter-active{opacity:1}.centerTop-enter-from{opacity:0;left:50%;top:50%;transform:translate(-50%) translateY(-50%) scale(.3)}._dotWrap_1jfjr_134{position:absolute;top:-.26667rem;right:6%;display:flex;justify-content:center;align-items:center;width:.53333rem;height:.53333rem;border-radius:50%;background-color:#ff9100;color:#fff;font-weight:700;font-size:.37333rem}._noteFollow_1jfjr_149{pointer-events:none;text-align:center;display:none}._noteFollow_1jfjr_149 .van-icon-success,._noteFollow_1jfjr_149 .van-icon-cross{display:none}.follow-error,.follow-error .van-icon-cross{display:block}.follow-down .van-icon-cross{color:#ffca67!important}.follow-down .vf-note path{fill:#ffca67!important;stroke:#ffca67!important}.follow-up .van-icon-cross{color:red!important}.follow-up .vf-note path{fill:red!important;stroke:red!important}.follow-success{display:block}.follow-success .van-icon-success{display:block;color:#07c160}._linePC_1jfjr_185 ._line_1jfjr_76{min-height:94Px;transform:translateX(8.5Px,-50%)}#musicAndSelection{position:relative;overflow-x:hidden;overflow-y:auto;height:100%;max-height:100vh}#musicAndSelection::-webkit-scrollbar{width:0;display:none}#musicAndSelection>div{transform:scale(var(--music-zoom));transform-origin:left top}#musicAndSelection svg{overflow:visible}#musicAndSelection #osmdCanvasPage1{position:absolute!important;left:0;top:0}._inGradualRange_1ryfw_24 #cursorImg-0{opacity:0}\n',document.head.appendChild(__vite_style__),{execute:function(){var _window$webkit,_window$webkit$messag,_window$webkit2,_window$webkit2$messa,_window$webkit3,_window$webkit3$messa;exports({J:useClickAway,U:toRefs,V:isVNode,Y:useRoute$1,a9:useRouter,aU:createNamespace$1,aX:withInstall,as:nextTick,av:createRouter,aw:createWebHashHistory,b$:createElementBlock,b3:usePageVisibility,bC:mergeProps,bE:useScrollParent,bH:isHidden,bI:addUnit,bJ:usePlaceholder,bL:useRoute,bQ:noop$1,bU:callInterceptor,bW:mountComponent,bX:usePopupState,bY:useCustomFieldValue,b_:openBlock,bn:useTouch,bo:useParent,bp:useExpose,bq:watchEffect,br:useEventListener$1,bs:preventDefault,bu:useChildren,bv:pick$1,bz:unitToPx,c0:normalizeStyle,c1:raf,c2:getScrollTop,c3:setScrollTop,c5:onDeactivated,c6:onMountedOrActivated,c7:getZIndexStyle,cA:defineListenerProp,cB:useZIndex,cC:useTeleport,cD:useLock,cE:useRouteListener,cG:call,cH:createNamespace,ca:onActivated,cb:onPopupReopen,cc:doubleRaf,cd:useId,cf:setRootScrollTop,cg:getElementTop,ch:route,ci:inject,cj:provide,ck:withDirectives,cm:getRootScrollTop,cr:formatNumber,ct:resetScroll,cv:cancelRaf,cw:getSizeStyle,cz:addNumber,d:defineComponent,k:createTextVNode,l:ref,n:reactive,q:showToast,w:watch});const index="",common="",popup$1="",SnackbarSfc="",elevation="",loading="",button="",icon="",snackbar="",coreSfc="",cell="",CellSfc="",ripple="",formDetails="",hoverOverlay="",_switch="",SwitchSfc="",style="";function makeMap(e,t){const n=Object.create(null),i=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}function normalizeStyle(e){if(isArray$8(e)){const t={};for(let n=0;n{if(e){const n=e.split(propertyDelimiterRE);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function normalizeClass(e){let t="";if(isString$2(e))t=e;else if(isArray$8(e))for(let n=0;nisString$2(e)?e:null==e?"":isArray$8(e)||isObject$4(e)&&(e.toString===objectToString$2||!isFunction$4(e.toString))?JSON.stringify(e,replacer,2):String(e),replacer=(e,t)=>t&&t.__v_isRef?replacer(e,t.value):isMap$1(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:isSet$1(t)?{[`Set(${t.size})`]:[...t.values()]}:!isObject$4(t)||isArray$8(t)||isPlainObject$3(t)?t:String(t),EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=e=>onRE.test(e),isModelListener=e=>e.startsWith("onUpdate:"),extend$3=Object.assign,remove$7=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$3=Object.prototype.hasOwnProperty,hasOwn$2=(e,t)=>hasOwnProperty$3.call(e,t),isArray$8=Array.isArray,isMap$1=e=>"[object Map]"===toTypeString(e),isSet$1=e=>"[object Set]"===toTypeString(e),isFunction$4=e=>"function"==typeof e,isString$2=e=>"string"==typeof e,isSymbol$1=e=>"symbol"==typeof e,isObject$4=e=>null!==e&&"object"==typeof e,isPromise$1=e=>isObject$4(e)&&isFunction$4(e.then)&&isFunction$4(e.catch),objectToString$2=Object.prototype.toString,toTypeString=e=>objectToString$2.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject$3=e=>"[object Object]"===toTypeString(e),isIntegerKey=e=>isString$2(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE$1=/-(\w)/g,camelize$1=cacheStringFunction((e=>e.replace(camelizeRE$1,((e,t)=>t?t.toUpperCase():"")))),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction((e=>e.replace(hyphenateRE,"-$1").toLowerCase())),capitalize=cacheStringFunction((e=>e.charAt(0).toUpperCase()+e.slice(1))),toHandlerKey=cacheStringFunction((e=>e?`on${capitalize(e)}`:"")),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},toNumber$1=e=>{const t=isString$2(e)?Number(e):NaN;return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},wasTracked=e=>(e.w&trackOpBit)>0,newTracked=e=>(e.n&trackOpBit)>0,initDepMarkers=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let i=0;i{("length"===n||n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(s.get(n)),t){case"add":isArray$8(e)?isIntegerKey(n)&&a.push(s.get("length")):(a.push(s.get(ITERATE_KEY)),isMap$1(e)&&a.push(s.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$8(e)||(a.push(s.get(ITERATE_KEY)),isMap$1(e)&&a.push(s.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(e)&&a.push(s.get(ITERATE_KEY))}if(1===a.length)a[0]&&triggerEffects(a[0]);else{const e=[];for(const t of a)t&&e.push(...t);triggerEffects(createDep(e))}}function triggerEffects(e,t){const n=isArray$8(e)?e:[...e];for(const i of n)i.computed&&triggerEffect(i);for(const i of n)i.computed||triggerEffect(i)}function triggerEffect(e,t){(e!==activeEffect||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function getDepFromReactive(e,t){var n;return null===(n=targetMap.get(e))||void 0===n?void 0:n.get(t)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(isSymbol$1)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=toRaw(this);for(let t=0,r=this.length;t{e[t]=function(...e){pauseTracking();const n=toRaw(this)[t].apply(this,e);return resetTracking(),n}})),e}function hasOwnProperty$2(e){const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}function createGetter(e=!1,t=!1){return function(n,i,r){if("__v_isReactive"===i)return!e;if("__v_isReadonly"===i)return e;if("__v_isShallow"===i)return t;if("__v_raw"===i&&r===(e?t?shallowReadonlyMap:readonlyMap:t?shallowReactiveMap:reactiveMap).get(n))return n;const o=isArray$8(n);if(!e){if(o&&hasOwn$2(arrayInstrumentations,i))return Reflect.get(arrayInstrumentations,i,r);if("hasOwnProperty"===i)return hasOwnProperty$2}const s=Reflect.get(n,i,r);return(isSymbol$1(i)?builtInSymbols.has(i):isNonTrackableKeys(i))?s:(e||track(n,"get",i),t?s:isRef(s)?o&&isIntegerKey(i)?s:s.value:isObject$4(s)?e?readonly(s):reactive(s):s)}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(e=!1){return function(t,n,i,r){let o=t[n];if(isReadonly(o)&&isRef(o)&&!isRef(i))return!1;if(!e&&(isShallow(i)||isReadonly(i)||(o=toRaw(o),i=toRaw(i)),!isArray$8(t)&&isRef(o)&&!isRef(i)))return o.value=i,!0;const s=isArray$8(t)&&isIntegerKey(n)?Number(n)!0,deleteProperty:(e,t)=>!0},shallowReactiveHandlers=extend$3({},mutableHandlers,{get:shallowGet,set:shallowSet}),toShallow=e=>e,getProto$1=e=>Reflect.getPrototypeOf(e);function get$2(e,t,n=!1,i=!1){const r=toRaw(e=e.__v_raw),o=toRaw(t);n||(t!==o&&track(r,"get",t),track(r,"get",o));const{has:s}=getProto$1(r),a=i?toShallow:n?toReadonly:toReactive;return s.call(r,t)?a(e.get(t)):s.call(r,o)?a(e.get(o)):void(e!==r&&e.get(t))}function has$4(e,t=!1){const n=this.__v_raw,i=toRaw(n),r=toRaw(e);return t||(e!==r&&track(i,"has",e),track(i,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function size(e,t=!1){return e=e.__v_raw,!t&&track(toRaw(e),"iterate",ITERATE_KEY),Reflect.get(e,"size",e)}function add(e){e=toRaw(e);const t=toRaw(this);return getProto$1(t).has.call(t,e)||(t.add(e),trigger(t,"add",e,e)),this}function set(e,t){t=toRaw(t);const n=toRaw(this),{has:i,get:r}=getProto$1(n);let o=i.call(n,e);o||(e=toRaw(e),o=i.call(n,e));const s=r.call(n,e);return n.set(e,t),o?hasChanged(t,s)&&trigger(n,"set",e,t):trigger(n,"add",e,t),this}function deleteEntry(e){const t=toRaw(this),{has:n,get:i}=getProto$1(t);let r=n.call(t,e);r||(e=toRaw(e),r=n.call(t,e)),i&&i.call(t,e);const o=t.delete(e);return r&&trigger(t,"delete",e,void 0),o}function clear(){const e=toRaw(this),t=0!==e.size,n=e.clear();return t&&trigger(e,"clear",void 0,void 0),n}function createForEach(e,t){return function(n,i){const r=this,o=r.__v_raw,s=toRaw(o),a=t?toShallow:e?toReadonly:toReactive;return!e&&track(s,"iterate",ITERATE_KEY),o.forEach(((e,t)=>n.call(i,a(e),a(t),r)))}}function createIterableMethod(e,t,n){return function(...i){const r=this.__v_raw,o=toRaw(r),s=isMap$1(o),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...i),u=n?toShallow:t?toReadonly:toReactive;return!t&&track(o,"iterate",l?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return"delete"!==e&&this}}function createInstrumentations(){const e={get(e){return get$2(this,e)},get size(){return size(this)},has:has$4,add:add,set:set,delete:deleteEntry,clear:clear,forEach:createForEach(!1,!1)},t={get(e){return get$2(this,e,!1,!0)},get size(){return size(this)},has:has$4,add:add,set:set,delete:deleteEntry,clear:clear,forEach:createForEach(!1,!0)},n={get(e){return get$2(this,e,!0)},get size(){return size(this,!0)},has(e){return has$4.call(this,e,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},i={get(e){return get$2(this,e,!0,!0)},get size(){return size(this,!0)},has(e){return has$4.call(this,e,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=createIterableMethod(r,!1,!1),n[r]=createIterableMethod(r,!0,!1),t[r]=createIterableMethod(r,!1,!0),i[r]=createIterableMethod(r,!0,!0)})),[e,n,t,i]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(e,t){const n=t?e?shallowReadonlyInstrumentations:shallowInstrumentations:e?readonlyInstrumentations:mutableInstrumentations;return(t,i,r)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(hasOwn$2(n,i)&&i in t?n:t,i,r)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(e,t,n,i,r){if(!isObject$4(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const s=getTargetType(e);if(0===s)return e;const a=new Proxy(e,2===s?i:n);return r.set(e,a),a}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!(!e||!e.__v_isReactive)}function isReadonly(e){return!(!e||!e.__v_isReadonly)}function isShallow(e){return!(!e||!e.__v_isShallow)}function isProxy(e){return isReactive(e)||isReadonly(e)}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return def(e,"__v_skip",!0),e}const toReactive=e=>isObject$4(e)?reactive(e):e,toReadonly=e=>isObject$4(e)?readonly(e):e;function trackRefValue(e){shouldTrack&&activeEffect&&trackEffects((e=toRaw(e)).dep||(e.dep=createDep()))}function triggerRefValue(e,t){const n=(e=toRaw(e)).dep;n&&triggerEffects(n)}function isRef(e){return!(!e||!0!==e.__v_isRef)}function ref(e){return createRef(e,!1)}function shallowRef(e){return createRef(e,!0)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const t=this.__v_isShallow||isShallow(e)||isReadonly(e);e=t?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:toReactive(e),triggerRefValue(this))}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,n)=>unref(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const r=e[t];return isRef(r)&&!isRef(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}function toRefs(e){const t=isArray$8(e)?new Array(e.length):{};for(const n in e)t[n]=toRef(e,n);return t}class ObjectRefImpl{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}function toRef(e,t,n){const i=e[t];return isRef(i)?i:new ObjectRefImpl(e,t,n)}var _a$1;class ComputedRefImpl{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[_a$1]=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,(()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=toRaw(this);return trackRefValue(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function computed$1(e,t,n=!1){let i,r;const o=isFunction$4(e);o?(i=e,r=NOOP):(i=e.get,r=e.set);return new ComputedRefImpl(i,r,o||!r,n)}function warn(e,...t){}function callWithErrorHandling(e,t,n,i){let r;try{r=i?e(...i):e()}catch(o){handleError(o,t,n)}return r}function callWithAsyncErrorHandling(e,t,n,i){if(isFunction$4(e)){const r=callWithErrorHandling(e,t,n,i);return r&&isPromise$1(r)&&r.catch((e=>{handleError(e,t,n)})),r}const r=[];for(let o=0;o>>1;getId(queue$1[i])flushIndex&&queue$1.splice(t,1)}function queuePostFlushCb(e){isArray$8(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&activePostFlushCbs.includes(e,e.allowRecurse?postFlushIndex+1:postFlushIndex)||pendingPostFlushCbs.push(e),queueFlush()}function flushPreFlushCbs(e,t=(isFlushing?flushIndex+1:0)){for(;tgetId(e)-getId(t))),postFlushIndex=0;postFlushIndexnull==e.id?1/0:e.id,comparator=(e,t)=>{const n=getId(e)-getId(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function flushJobs(e){isFlushPending=!1,isFlushing=!0,queue$1.sort(comparator);try{for(flushIndex=0;flushIndexisString$2(e)?e.trim():e))),t&&(r=n.map(looseToNumber))}let a,l=i[a=toHandlerKey(t)]||i[a=toHandlerKey(camelize$1(t))];!l&&o&&(l=i[a=toHandlerKey(hyphenate(t))]),l&&callWithAsyncErrorHandling(l,e,6,r);const c=i[a+"Once"];if(c){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,callWithAsyncErrorHandling(c,e,6,r)}}function normalizeEmitsOptions(e,t,n=!1){const i=t.emitsCache,r=i.get(e);if(void 0!==r)return r;const o=e.emits;let s={},a=!1;if(!isFunction$4(e)){const i=e=>{const n=normalizeEmitsOptions(e,t,!0);n&&(a=!0,extend$3(s,n))};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}return o||a?(isArray$8(o)?o.forEach((e=>s[e]=null)):extend$3(s,o),isObject$4(e)&&i.set(e,s),s):(isObject$4(e)&&i.set(e,null),null)}function isEmitListener(e,t){return!(!e||!isOn(t))&&(t=t.slice(2).replace(/Once$/,""),hasOwn$2(e,t[0].toLowerCase()+t.slice(1))||hasOwn$2(e,hyphenate(t))||hasOwn$2(e,t))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){const t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function pushScopeId(e){currentScopeId=e}function popScopeId(){currentScopeId=null}function withCtx(e,t=currentRenderingInstance,n){if(!t)return e;if(e._n)return e;const i=(...n)=>{i._d&&setBlockTracking(-1);const r=setCurrentRenderingInstance(t);let o;try{o=e(...n)}finally{setCurrentRenderingInstance(r),i._d&&setBlockTracking(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:i,withProxy:r,props:o,propsOptions:[s],slots:a,attrs:l,emit:c,render:u,renderCache:h,data:d,setupState:p,ctx:f,inheritAttrs:m}=e;let g,v;const b=setCurrentRenderingInstance(e);try{if(4&n.shapeFlag){const e=r||i;g=normalizeVNode(u.call(e,e,h,o,p,d,f)),v=l}else{const e=t;0,g=normalizeVNode(e.length>1?e(o,{attrs:l,slots:a,emit:c}):e(o,null)),v=t.props?l:getFunctionalFallthrough(l)}}catch(y){blockStack.length=0,handleError(y,e,1),g=createVNode(Comment)}let A=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=A;e.length&&7&t&&(s&&e.some(isModelListener)&&(v=filterModelListeners(v,s)),A=cloneVNode(A,v))}return n.dirs&&(A=cloneVNode(A),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),g=A,setCurrentRenderingInstance(b),g}const getFunctionalFallthrough=e=>{let t;for(const n in e)("class"===n||"style"===n||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const i in e)isModelListener(i)&&i.slice(9)in t||(n[i]=e[i]);return n};function shouldUpdateComponent(e,t,n){const{props:i,children:r,component:o}=e,{props:s,children:a,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||i!==s&&(i?!s||hasPropsChanged(i,s,c):!!s);if(1024&l)return!0;if(16&l)return i?hasPropsChanged(i,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$8(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}function provide(e,t){if(currentInstance){let n=currentInstance.provides;const i=currentInstance.parent&¤tInstance.parent.provides;i===n&&(n=currentInstance.provides=Object.create(i)),n[e]=t}else;}function inject(e,t,n=!1){const i=currentInstance||currentRenderingInstance;if(i){const r=null==i.parent?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&isFunction$4(t)?t.call(i.proxy):t}}function watchEffect(e,t){return doWatch(e,null,t)}const INITIAL_WATCHER_VALUE={};function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,{immediate:n,deep:i,flush:r,onTrack:o,onTrigger:s}=EMPTY_OBJ){const a=getCurrentScope()===(null==currentInstance?void 0:currentInstance.scope)?currentInstance:null;let l,c,u=!1,h=!1;if(isRef(e)?(l=()=>e.value,u=isShallow(e)):isReactive(e)?(l=()=>e,i=!0):isArray$8(e)?(h=!0,u=e.some((e=>isReactive(e)||isShallow(e))),l=()=>e.map((e=>isRef(e)?e.value:isReactive(e)?traverse(e):isFunction$4(e)?callWithErrorHandling(e,a,2):void 0))):l=isFunction$4(e)?t?()=>callWithErrorHandling(e,a,2):()=>{if(!a||!a.isUnmounted)return c&&c(),callWithAsyncErrorHandling(e,a,3,[p])}:NOOP,t&&i){const e=l;l=()=>traverse(e())}let d,p=e=>{c=v.onStop=()=>{callWithErrorHandling(e,a,4)}};if(isInSSRComponentSetup){if(p=NOOP,t?n&&callWithAsyncErrorHandling(t,a,3,[l(),h?[]:void 0,p]):l(),"sync"!==r)return NOOP;{const e=useSSRContext();d=e.__watcherHandles||(e.__watcherHandles=[])}}let f=h?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const m=()=>{if(v.active)if(t){const e=v.run();(i||u||(h?e.some(((e,t)=>hasChanged(e,f[t]))):hasChanged(e,f)))&&(c&&c(),callWithAsyncErrorHandling(t,a,3,[e,f===INITIAL_WATCHER_VALUE?void 0:h&&f[0]===INITIAL_WATCHER_VALUE?[]:f,p]),f=e)}else v.run()};let g;m.allowRecurse=!!t,"sync"===r?g=m:"post"===r?g=()=>queuePostRenderEffect(m,a&&a.suspense):(m.pre=!0,a&&(m.id=a.uid),g=()=>queueJob(m));const v=new ReactiveEffect(l,g);t?n?m():f=v.run():"post"===r?queuePostRenderEffect(v.run.bind(v),a&&a.suspense):v.run();const b=()=>{v.stop(),a&&a.scope&&remove$7(a.scope.effects,v)};return d&&d.push(b),b}function instanceWatch(e,t,n){const i=this.proxy,r=isString$2(e)?e.includes(".")?createPathGetter(i,e):()=>i[e]:e.bind(i,i);let o;isFunction$4(t)?o=t:(o=t.handler,n=t);const s=currentInstance;setCurrentInstance(this);const a=doWatch(r,o.bind(i),n);return s?setCurrentInstance(s):unsetCurrentInstance(),a}function createPathGetter(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{traverse(e,t)}));else if(isPlainObject$3(e))for(const n in e)traverse(e[n],t);return e}function useTransitionState(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted((()=>{e.isMounted=!0})),onBeforeUnmount((()=>{e.isUnmounting=!0})),e}const TransitionHookValidator=[Function,Array],BaseTransitionImpl={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},setup(e,{slots:t}){const n=getCurrentInstance(),i=useTransitionState();let r;return()=>{const o=t.default&&getTransitionRawChildren(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1)for(const e of o)if(e.type!==Comment){s=e;break}const a=toRaw(e),{mode:l}=a;if(i.isLeaving)return emptyPlaceholder(s);const c=getKeepAliveChild(s);if(!c)return emptyPlaceholder(s);const u=resolveTransitionHooks(c,a,i,n);setTransitionHooks(c,u);const h=n.subTree,d=h&&getKeepAliveChild(h);let p=!1;const{getTransitionKey:f}=c.type;if(f){const e=f();void 0===r?r=e:e!==r&&(r=e,p=!0)}if(d&&d.type!==Comment&&(!isSameVNodeType(c,d)||p)){const e=resolveTransitionHooks(d,a,i,n);if(setTransitionHooks(d,e),"out-in"===l)return i.isLeaving=!0,e.afterLeave=()=>{i.isLeaving=!1,!1!==n.update.active&&n.update()},emptyPlaceholder(s);"in-out"===l&&c.type!==Comment&&(e.delayLeave=(e,t,n)=>{getLeavingNodesForType(i,d)[String(d.key)]=d,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return s}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function resolveTransitionHooks(e,t,n,i){const{appear:r,mode:o,persisted:s=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:f,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:b}=t,A=String(e.key),y=getLeavingNodesForType(n,e),S=(e,t)=>{e&&callWithAsyncErrorHandling(e,i,9,t)},x=(e,t)=>{const n=t[1];S(e,t),isArray$8(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},w={mode:o,persisted:s,beforeEnter(t){let i=a;if(!n.isMounted){if(!r)return;i=m||a}t._leaveCb&&t._leaveCb(!0);const o=y[A];o&&isSameVNodeType(e,o)&&o.el._leaveCb&&o.el._leaveCb(),S(i,[t])},enter(e){let t=l,i=c,o=u;if(!n.isMounted){if(!r)return;t=g||l,i=v||c,o=b||u}let s=!1;const a=e._enterCb=t=>{s||(s=!0,S(t?o:i,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,a]):a()},leave(t,i){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return i();S(h,[t]);let o=!1;const s=t._leaveCb=n=>{o||(o=!0,i(),S(n?f:p,[t]),t._leaveCb=void 0,y[r]===e&&delete y[r])};y[r]=e,d?x(d,[t,s]):s()},clone:e=>resolveTransitionHooks(e,t,n,i)};return w}function emptyPlaceholder(e){if(isKeepAlive(e))return(e=cloneVNode(e)).children=null,e}function getKeepAliveChild(e){return isKeepAlive(e)?e.children?e.children[0]:void 0:e}function setTransitionHooks(e,t){6&e.shapeFlag&&e.component?setTransitionHooks(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function getTransitionRawChildren(e,t=!1,n){let i=[],r=0;for(let o=0;o1)for(let o=0;o!!e.type.__asyncLoader,isKeepAlive=e=>e.type.__isKeepAlive;function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n=currentInstance){const i=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(injectHook(t,i,n),n){let e=n.parent;for(;e&&e.parent;)isKeepAlive(e.parent.vnode)&&injectToKeepAliveRoot(i,t,n,e),e=e.parent}}function injectToKeepAliveRoot(e,t,n,i){const r=injectHook(t,e,i,!0);onUnmounted((()=>{remove$7(i[t],r)}),n)}function injectHook(e,t,n=currentInstance,i=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;pauseTracking(),setCurrentInstance(n);const r=callWithAsyncErrorHandling(t,n,e,i);return unsetCurrentInstance(),resetTracking(),r});return i?r.unshift(o):r.push(o),o}}const createHook=e=>(t,n=currentInstance)=>(!isInSSRComponentSetup||"sp"===e)&&injectHook(e,((...e)=>t(...e)),n),onBeforeMount=exports("o",createHook("bm")),onMounted=exports("c",createHook("m")),onBeforeUpdate=exports("c4",createHook("bu")),onUpdated=exports("bF",createHook("u")),onBeforeUnmount=exports("af",createHook("bum")),onUnmounted=exports("a2",createHook("um")),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(e,t=currentInstance){injectHook("ec",e,t)}function withDirectives(e,t){const n=currentRenderingInstance;if(null===n)return e;const i=getExposeProxy(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;ot(e,n,void 0,o&&o[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let i=0,s=n.length;i!isVNode(e)||e.type!==Comment&&!(e.type===Fragment&&!ensureValidVNode(e.children))))?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getExposeProxy(e)||e.proxy:getPublicInstance(e.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>queueJob(e.update)),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn$2(e,t),PublicInstanceProxyHandlers={get({_:e},t){const{ctx:n,setupState:i,data:r,props:o,accessCache:s,type:a,appContext:l}=e;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(hasSetupBinding(i,t))return s[t]=1,i[t];if(r!==EMPTY_OBJ&&hasOwn$2(r,t))return s[t]=2,r[t];if((c=e.propsOptions[0])&&hasOwn$2(c,t))return s[t]=3,o[t];if(n!==EMPTY_OBJ&&hasOwn$2(n,t))return s[t]=4,n[t];shouldCacheAccess&&(s[t]=0)}}const u=publicPropertiesMap[t];let h,d;return u?("$attrs"===t&&track(e,"get",t),u(e)):(h=a.__cssModules)&&(h=h[t])?h:n!==EMPTY_OBJ&&hasOwn$2(n,t)?(s[t]=4,n[t]):(d=l.config.globalProperties,hasOwn$2(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:i,setupState:r,ctx:o}=e;return hasSetupBinding(r,t)?(r[t]=n,!0):i!==EMPTY_OBJ&&hasOwn$2(i,t)?(i[t]=n,!0):!hasOwn$2(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(o[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:r,propsOptions:o}},s){let a;return!!n[s]||e!==EMPTY_OBJ&&hasOwn$2(e,s)||hasSetupBinding(t,s)||(a=o[0])&&hasOwn$2(a,s)||hasOwn$2(i,s)||hasOwn$2(publicPropertiesMap,s)||hasOwn$2(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:hasOwn$2(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,i=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook$1(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:s,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:d,beforeUpdate:p,updated:f,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:b,destroyed:A,unmounted:y,render:S,renderTracked:x,renderTriggered:w,errorCaptured:E,serverPrefetch:_,expose:M,inheritAttrs:P,components:T,directives:C,filters:I}=t;if(c&&resolveInjections(c,i,null,e.appContext.config.unwrapInjectedRef),s)for(const B in s){const e=s[B];isFunction$4(e)&&(i[B]=e.bind(n))}if(r){const t=r.call(n,n);isObject$4(t)&&(e.data=reactive(t))}if(shouldCacheAccess=!0,o)for(const B in o){const e=o[B],t=isFunction$4(e)?e.bind(n,n):isFunction$4(e.get)?e.get.bind(n,n):NOOP,r=!isFunction$4(e)&&isFunction$4(e.set)?e.set.bind(n):NOOP,s=computed({get:t,set:r});Object.defineProperty(i,B,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(a)for(const B in a)createWatcher(a[B],i,n,B);if(l){const e=isFunction$4(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{provide(t,e[t])}))}function k(e,t){isArray$8(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&callHook$1(u,e,"c"),k(onBeforeMount,h),k(onMounted,d),k(onBeforeUpdate,p),k(onUpdated,f),k(onActivated,m),k(onDeactivated,g),k(onErrorCaptured,E),k(onRenderTracked,x),k(onRenderTriggered,w),k(onBeforeUnmount,b),k(onUnmounted,y),k(onServerPrefetch,_),isArray$8(M))if(M.length){const t=e.exposed||(e.exposed={});M.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===NOOP&&(e.render=S),null!=P&&(e.inheritAttrs=P),T&&(e.components=T),C&&(e.directives=C)}function resolveInjections(e,t,n=NOOP,i=!1){isArray$8(e)&&(e=normalizeInject(e));for(const r in e){const n=e[r];let o;o=isObject$4(n)?"default"in n?inject(n.from||r,n.default,!0):inject(n.from||r):inject(n),isRef(o)&&i?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[r]=o}}function callHook$1(e,t,n){callWithAsyncErrorHandling(isArray$8(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,i){const r=i.includes(".")?createPathGetter(n,i):()=>n[i];if(isString$2(e)){const n=t[e];isFunction$4(n)&&watch(r,n)}else if(isFunction$4(e))watch(r,e.bind(n));else if(isObject$4(e))if(isArray$8(e))e.forEach((e=>createWatcher(e,t,n,i)));else{const i=isFunction$4(e.handler)?e.handler.bind(n):t[e.handler];isFunction$4(i)&&watch(r,i,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,a=o.get(t);let l;return a?l=a:r.length||n||i?(l={},r.length&&r.forEach((e=>mergeOptions$1(l,e,s,!0))),mergeOptions$1(l,t,s)):l=t,isObject$4(t)&&o.set(t,l),l}function mergeOptions$1(e,t,n,i=!1){const{mixins:r,extends:o}=t;o&&mergeOptions$1(e,o,n,!0),r&&r.forEach((t=>mergeOptions$1(e,t,n,!0)));for(const s in t)if(i&&"expose"===s);else{const i=internalOptionMergeStrats[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeObjectOptions,emits:mergeObjectOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend$3(isFunction$4(e)?e.call(this,this):e,isFunction$4(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$8(e)){const t={};for(let n=0;n0)||16&s){let i;setFullProps(e,t,r,o)&&(c=!0);for(const o in a)t&&(hasOwn$2(t,o)||(i=hyphenate(o))!==o&&hasOwn$2(t,i))||(l?!n||void 0===n[o]&&void 0===n[i]||(r[o]=resolvePropValue(l,a,o,void 0,e,!0)):delete r[o]);if(o!==a)for(const e in o)t&&hasOwn$2(t,e)||(delete o[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let i=0;i{l=!0;const[n,i]=normalizePropsOptions(e,t,!0);extend$3(s,n),i&&a.push(...i)};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}if(!o&&!l)return isObject$4(e)&&i.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$8(o))for(let u=0;u-1,n[1]=i<0||t-1||hasOwn$2(n,"default"))&&a.push(e)}}}const c=[s,a];return isObject$4(e)&&i.set(e,c),c}function validatePropName(e){return"$"!==e[0]}function getType(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function isSameType(e,t){return getType(e)===getType(t)}function getTypeIndex(e,t){return isArray$8(t)?t.findIndex((t=>isSameType(t,e))):isFunction$4(t)&&isSameType(t,e)?0:-1}const isInternalKey=e=>"_"===e[0]||"$stable"===e,normalizeSlotValue=e=>isArray$8(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot$1=(e,t,n)=>{if(t._n)return t;const i=withCtx(((...e)=>normalizeSlotValue(t(...e))),n);return i._c=!1,i},normalizeObjectSlots=(e,t,n)=>{const i=e._ctx;for(const r in e){if(isInternalKey(r))continue;const n=e[r];if(isFunction$4(n))t[r]=normalizeSlot$1(r,n,i);else if(null!=n){const e=normalizeSlotValue(n);t[r]=()=>e}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},initSlots=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=toRaw(t),def(t,"_",n)):normalizeObjectSlots(t,e.slots={})}else e.slots={},t&&normalizeVNodeSlots(e,t);def(e.slots,InternalObjectKey,1)},updateSlots=(e,t,n)=>{const{vnode:i,slots:r}=e;let o=!0,s=EMPTY_OBJ;if(32&i.shapeFlag){const e=t._;e?n&&1===e?o=!1:(extend$3(r,t),n||1!==e||delete r._):(o=!t.$stable,normalizeObjectSlots(t,r)),s=t}else t&&(normalizeVNodeSlots(e,t),s={default:1});if(o)for(const a in r)isInternalKey(a)||a in s||delete r[a]};function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(e,t){return function(n,i=null){isFunction$4(n)||(n=Object.assign({},n)),null==i||isObject$4(i)||(i=null);const r=createAppContext(),o=new Set;let s=!1;const a=r.app={_uid:uid$1++,_component:n,_props:i,_container:null,_context:r,_instance:null,version:version,get config(){return r.config},set config(e){},use:(e,...t)=>(o.has(e)||(e&&isFunction$4(e.install)?(o.add(e),e.install(a,...t)):isFunction$4(e)&&(o.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(o,l,c){if(!s){const u=createVNode(n,i);return u.appContext=r,l&&t?t(u,o):e(u,o,c),s=!0,a._container=o,o.__vue_app__=a,getExposeProxy(u.component)||u.component.proxy}},unmount(){s&&(e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,a)};return a}}function setRef(e,t,n,i,r=!1){if(isArray$8(e))return void e.forEach(((e,o)=>setRef(e,t&&(isArray$8(t)?t[o]:t),n,i,r)));if(isAsyncWrapper(i)&&!r)return;const o=4&i.shapeFlag?getExposeProxy(i.component)||i.component.proxy:i.el,s=r?null:o,{i:a,r:l}=e,c=t&&t.r,u=a.refs===EMPTY_OBJ?a.refs={}:a.refs,h=a.setupState;if(null!=c&&c!==l&&(isString$2(c)?(u[c]=null,hasOwn$2(h,c)&&(h[c]=null)):isRef(c)&&(c.value=null)),isFunction$4(l))callWithErrorHandling(l,a,12,[s,u]);else{const t=isString$2(l),i=isRef(l);if(t||i){const a=()=>{if(e.f){const n=t?hasOwn$2(h,l)?h[l]:u[l]:l.value;r?isArray$8(n)&&remove$7(n,o):isArray$8(n)?n.includes(o)||n.push(o):t?(u[l]=[o],hasOwn$2(h,l)&&(h[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else t?(u[l]=s,hasOwn$2(h,l)&&(h[l]=s)):i&&(l.value=s,e.k&&(u[e.k]=s))};s?(a.id=-1,queuePostRenderEffect(a,n)):a()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){getGlobalThis().__VUE__=!0;const{insert:n,remove:i,patchProp:r,createElement:o,createText:s,createComment:a,setText:l,setElementText:c,parentNode:u,nextSibling:h,setScopeId:d=NOOP,insertStaticContent:p}=e,f=(e,t,n,i=null,r=null,o=null,s=!1,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!isSameVNodeType(e,t)&&(i=z(e),N(e,r,o,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:h}=t;switch(c){case Text:m(e,t,n,i);break;case Comment:g(e,t,n,i);break;case Static:null==e&&v(t,n,i,s);break;case Fragment:_(e,t,n,i,r,o,s,a,l);break;default:1&h?b(e,t,n,i,r,o,s,a,l):6&h?M(e,t,n,i,r,o,s,a,l):(64&h||128&h)&&c.process(e,t,n,i,r,o,s,a,l,U)}null!=u&&r&&setRef(u,e&&e.ref,o,t||e,!t)},m=(e,t,i,r)=>{if(null==e)n(t.el=s(t.children),i,r);else{const n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},g=(e,t,i,r)=>{null==e?n(t.el=a(t.children||""),i,r):t.el=e.el},v=(e,t,n,i)=>{[e.el,e.anchor]=p(e.children,t,n,i,e.el,e.anchor)},b=(e,t,n,i,r,o,s,a,l)=>{s=s||"svg"===t.type,null==e?A(t,n,i,r,o,s,a,l):x(e,t,r,o,s,a,l)},A=(e,t,i,s,a,l,u,h)=>{let d,p;const{type:f,props:m,shapeFlag:g,transition:v,dirs:b}=e;if(d=e.el=o(e.type,l,m&&m.is,m),8&g?c(d,e.children):16&g&&S(e.children,d,null,s,a,l&&"foreignObject"!==f,u,h),b&&invokeDirectiveHook(e,null,s,"created"),y(d,e,e.scopeId,u,s),m){for(const t in m)"value"===t||isReservedProp(t)||r(d,t,null,m[t],l,e.children,s,a,V);"value"in m&&r(d,"value",null,m.value),(p=m.onVnodeBeforeMount)&&invokeVNodeHook(p,s,e)}b&&invokeDirectiveHook(e,null,s,"beforeMount");const A=(!a||a&&!a.pendingBranch)&&v&&!v.persisted;A&&v.beforeEnter(d),n(d,t,i),((p=m&&m.onVnodeMounted)||A||b)&&queuePostRenderEffect((()=>{p&&invokeVNodeHook(p,s,e),A&&v.enter(d),b&&invokeDirectiveHook(e,null,s,"mounted")}),a)},y=(e,t,n,i,r)=>{if(n&&d(e,n),i)for(let o=0;o{for(let c=l;c{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:h,dirs:d}=t;u|=16&e.patchFlag;const p=e.props||EMPTY_OBJ,f=t.props||EMPTY_OBJ;let m;n&&toggleRecurse(n,!1),(m=f.onVnodeBeforeUpdate)&&invokeVNodeHook(m,n,t,e),d&&invokeDirectiveHook(t,e,n,"beforeUpdate"),n&&toggleRecurse(n,!0);const g=o&&"foreignObject"!==t.type;if(h?w(e.dynamicChildren,h,l,n,i,g,s):a||k(e,t,l,null,n,i,g,s,!1),u>0){if(16&u)E(l,t,p,f,n,i,o);else if(2&u&&p.class!==f.class&&r(l,"class",null,f.class,o),4&u&&r(l,"style",p.style,f.style,o),8&u){const s=t.dynamicProps;for(let t=0;t{m&&invokeVNodeHook(m,n,t,e),d&&invokeDirectiveHook(t,e,n,"updated")}),i)},w=(e,t,n,i,r,o,s)=>{for(let a=0;a{if(n!==i){if(n!==EMPTY_OBJ)for(const l in n)isReservedProp(l)||l in i||r(e,l,n[l],null,a,t.children,o,s,V);for(const l in i){if(isReservedProp(l))continue;const c=i[l],u=n[l];c!==u&&"value"!==l&&r(e,l,u,c,a,t.children,o,s,V)}"value"in i&&r(e,"value",n.value,i.value)}},_=(e,t,i,r,o,a,l,c,u)=>{const h=t.el=e?e.el:s(""),d=t.anchor=e?e.anchor:s("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(h,i,r),n(d,i,r),S(t.children,i,d,o,a,l,c,u)):p>0&&64&p&&f&&e.dynamicChildren?(w(e.dynamicChildren,f,i,o,a,l,c),(null!=t.key||o&&t===o.subTree)&&traverseStaticChildren(e,t,!0)):k(e,t,i,d,o,a,l,c,u)},M=(e,t,n,i,r,o,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?r.ctx.activate(t,n,i,s,l):P(t,n,i,r,o,s,l):T(e,t,l)},P=(e,t,n,i,r,o,s)=>{const a=e.component=createComponentInstance(e,i,r);if(isKeepAlive(e)&&(a.ctx.renderer=U),setupComponent(a),a.asyncDep){if(r&&r.registerDep(a,C),!e.el){const e=a.subTree=createVNode(Comment);g(null,e,t,n)}}else C(a,e,t,n,r,o,s)},T=(e,t,n)=>{const i=t.component=e.component;if(shouldUpdateComponent(e,t,n)){if(i.asyncDep&&!i.asyncResolved)return void I(i,t,n);i.next=t,invalidateJob(i.update),i.update()}else t.el=e.el,i.vnode=t},C=(e,t,n,i,r,o,s)=>{const a=e.effect=new ReactiveEffect((()=>{if(e.isMounted){let t,{next:n,bu:i,u:a,parent:l,vnode:c}=e,h=n;toggleRecurse(e,!1),n?(n.el=c.el,I(e,n,s)):n=c,i&&invokeArrayFns(i),(t=n.props&&n.props.onVnodeBeforeUpdate)&&invokeVNodeHook(t,l,n,c),toggleRecurse(e,!0);const d=renderComponentRoot(e),p=e.subTree;e.subTree=d,f(p,d,u(p.el),z(p),e,r,o),n.el=d.el,null===h&&updateHOCHostEl(e,d.el),a&&queuePostRenderEffect(a,r),(t=n.props&&n.props.onVnodeUpdated)&&queuePostRenderEffect((()=>invokeVNodeHook(t,l,n,c)),r)}else{let s;const{el:a,props:l}=t,{bm:c,m:u,parent:h}=e,d=isAsyncWrapper(t);if(toggleRecurse(e,!1),c&&invokeArrayFns(c),!d&&(s=l&&l.onVnodeBeforeMount)&&invokeVNodeHook(s,h,t),toggleRecurse(e,!0),a&&j){const n=()=>{e.subTree=renderComponentRoot(e),j(a,e.subTree,e,r,null)};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=renderComponentRoot(e);f(null,s,n,i,e,r,o),t.el=s.el}if(u&&queuePostRenderEffect(u,r),!d&&(s=l&&l.onVnodeMounted)){const e=t;queuePostRenderEffect((()=>invokeVNodeHook(s,h,e)),r)}(256&t.shapeFlag||h&&isAsyncWrapper(h.vnode)&&256&h.vnode.shapeFlag)&&e.a&&queuePostRenderEffect(e.a,r),e.isMounted=!0,t=n=i=null}}),(()=>queueJob(l)),e.scope),l=e.update=()=>a.run();l.id=e.uid,toggleRecurse(e,!0),l()},I=(e,t,n)=>{t.component=e;const i=e.vnode.props;e.vnode=t,e.next=null,updateProps(e,t.props,i,n),updateSlots(e,t.children,n),pauseTracking(),flushPreFlushCbs(),resetTracking()},k=(e,t,n,i,r,o,s,a,l=!1)=>{const u=e&&e.children,h=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void R(u,d,n,i,r,o,s,a,l);if(256&p)return void B(u,d,n,i,r,o,s,a,l)}8&f?(16&h&&V(u,r,o),d!==u&&c(n,d)):16&h?16&f?R(u,d,n,i,r,o,s,a,l):V(u,r,o,!0):(8&h&&c(n,""),16&f&&S(d,n,i,r,o,s,a,l))},B=(e,t,n,i,r,o,s,a,l)=>{t=t||EMPTY_ARR;const c=(e=e||EMPTY_ARR).length,u=t.length,h=Math.min(c,u);let d;for(d=0;du?V(e,r,o,!0,!1,h):S(t,n,i,r,o,s,a,l,h)},R=(e,t,n,i,r,o,s,a,l)=>{let c=0;const u=t.length;let h=e.length-1,d=u-1;for(;c<=h&&c<=d;){const i=e[c],u=t[c]=l?cloneIfMounted(t[c]):normalizeVNode(t[c]);if(!isSameVNodeType(i,u))break;f(i,u,n,null,r,o,s,a,l),c++}for(;c<=h&&c<=d;){const i=e[h],c=t[d]=l?cloneIfMounted(t[d]):normalizeVNode(t[d]);if(!isSameVNodeType(i,c))break;f(i,c,n,null,r,o,s,a,l),h--,d--}if(c>h){if(c<=d){const e=d+1,h=ed)for(;c<=h;)N(e[c],r,o,!0),c++;else{const p=c,m=c,g=new Map;for(c=m;c<=d;c++){const e=t[c]=l?cloneIfMounted(t[c]):normalizeVNode(t[c]);null!=e.key&&g.set(e.key,c)}let v,b=0;const A=d-m+1;let y=!1,S=0;const x=new Array(A);for(c=0;c=A){N(i,r,o,!0);continue}let u;if(null!=i.key)u=g.get(i.key);else for(v=m;v<=d;v++)if(0===x[v-m]&&isSameVNodeType(i,t[v])){u=v;break}void 0===u?N(i,r,o,!0):(x[u-m]=c+1,u>=S?S=u:y=!0,f(i,t[u],n,null,r,o,s,a,l),b++)}const w=y?getSequence(x):EMPTY_ARR;for(v=w.length-1,c=A-1;c>=0;c--){const e=m+c,h=t[e],d=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void L(e.component.subTree,t,i,r);if(128&u)return void e.suspense.move(t,i,r);if(64&u)return void a.move(e,t,i,U);if(a===Fragment){n(s,t,i);for(let e=0;e{let o;for(;e&&e!==t;)o=h(e),n(e,i,r),e=o;n(t,i,r)})(e,t,i);if(2!==r&&1&u&&l)if(0===r)l.beforeEnter(s),n(s,t,i),queuePostRenderEffect((()=>l.enter(s)),o);else{const{leave:e,delayLeave:r,afterLeave:o}=l,a=()=>n(s,t,i),c=()=>{e(s,(()=>{a(),o&&o()}))};r?r(s,a,c):c()}else n(s,t,i)},N=(e,t,n,i=!1,r=!1)=>{const{type:o,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:h,dirs:d}=e;if(null!=a&&setRef(a,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const p=1&u&&d,f=!isAsyncWrapper(e);let m;if(f&&(m=s&&s.onVnodeBeforeUnmount)&&invokeVNodeHook(m,t,e),6&u)O(e.component,n,i);else{if(128&u)return void e.suspense.unmount(n,i);p&&invokeDirectiveHook(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,U,i):c&&(o!==Fragment||h>0&&64&h)?V(c,t,n,!1,!0):(o===Fragment&&384&h||!r&&16&u)&&V(l,t,n),i&&D(e)}(f&&(m=s&&s.onVnodeUnmounted)||p)&&queuePostRenderEffect((()=>{m&&invokeVNodeHook(m,t,e),p&&invokeDirectiveHook(e,null,t,"unmounted")}),n)},D=e=>{const{type:t,el:n,anchor:r,transition:o}=e;if(t===Fragment)return void F(n,r);if(t===Static)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:i}=o,r=()=>t(n,s);i?i(e.el,s,r):r()}else s()},F=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},O=(e,t,n)=>{const{bum:i,scope:r,update:o,subTree:s,um:a}=e;i&&invokeArrayFns(i),r.stop(),o&&(o.active=!1,N(s,e,t,n)),a&&queuePostRenderEffect(a,t),queuePostRenderEffect((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},V=(e,t,n,i=!1,r=!1,o=0)=>{for(let s=o;s6&e.shapeFlag?z(e.component.subTree):128&e.shapeFlag?e.suspense.next():h(e.anchor||e.el),G=(e,t,n)=>{null==e?t._vnode&&N(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),flushPreFlushCbs(),flushPostFlushCbs(),t._vnode=e},U={p:f,um:N,m:L,r:D,mt:P,mc:S,pc:k,pbc:w,n:z,o:e};let H,j;return t&&([H,j]=t(U)),{render:G,hydrate:H,createApp:createAppAPI(G,H)}}function toggleRecurse({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function traverseStaticChildren(e,t,n=!1){const i=e.children,r=t.children;if(isArray$8(i)&&isArray$8(r))for(let o=0;o>1,e[n[a]]0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}const isTeleport=e=>e.__isTeleport,isTeleportDisabled=e=>e&&(e.disabled||""===e.disabled),isTargetSVG=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,resolveTarget=(e,t)=>{const n=e&&e.to;if(isString$2(n)){if(t){return t(n)}return null}return n},TeleportImpl={__isTeleport:!0,process(e,t,n,i,r,o,s,a,l,c){const{mc:u,pc:h,pbc:d,o:{insert:p,querySelector:f,createText:m,createComment:g}}=c,v=isTeleportDisabled(t.props);let{shapeFlag:b,children:A,dynamicChildren:y}=t;if(null==e){const e=t.el=m(""),c=t.anchor=m("");p(e,n,i),p(c,n,i);const h=t.target=resolveTarget(t.props,f),d=t.targetAnchor=m("");h&&(p(d,h),s=s||isTargetSVG(h));const g=(e,t)=>{16&b&&u(A,e,t,r,o,s,a,l)};v?g(n,c):h&&g(h,d)}else{t.el=e.el;const i=t.anchor=e.anchor,u=t.target=e.target,p=t.targetAnchor=e.targetAnchor,m=isTeleportDisabled(e.props),g=m?n:u,b=m?i:p;if(s=s||isTargetSVG(u),y?(d(e.dynamicChildren,y,g,r,o,s,a),traverseStaticChildren(e,t,!0)):l||h(e,t,g,b,r,o,s,a,!1),v)m||moveTeleport(t,n,i,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=resolveTarget(t.props,f);e&&moveTeleport(t,e,null,c,0)}else m&&moveTeleport(t,u,p,c,1)}updateCssVars(t)},remove(e,t,n,i,{um:r,o:{remove:o}},s){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:h,props:d}=e;if(h&&o(u),(s||!isTeleportDisabled(d))&&(o(c),16&a))for(let p=0;p0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,n,i,r,o){return setupBlock(createBaseVNode(e,t,n,i,r,o,!0))}function createBlock(e,t,n,i,r){return setupBlock(createVNode(e,t,n,i,r,!0))}function isVNode(e){return!!e&&!0===e.__v_isVNode}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const InternalObjectKey="__vInternal",normalizeKey=({key:e})=>null!=e?e:null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>null!=e?isString$2(e)||isRef(e)||isFunction$4(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e:null;function createBaseVNode(e,t=null,n=null,i=0,r=null,o=(e===Fragment?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(l,n),128&o&&e.normalize(l)):n&&(l.shapeFlag|=isString$2(n)?8:16),isBlockTreeEnabled>0&&!s&¤tBlock&&(l.patchFlag>0||6&o)&&32!==l.patchFlag&¤tBlock.push(l),l}const createVNode=exports("f",_createVNode);function _createVNode(e,t=null,n=null,i=0,r=null,o=!1){if(e&&e!==NULL_DYNAMIC_COMPONENT||(e=Comment),isVNode(e)){const i=cloneVNode(e,t,!0);return n&&normalizeChildren(i,n),isBlockTreeEnabled>0&&!o&¤tBlock&&(6&i.shapeFlag?currentBlock[currentBlock.indexOf(e)]=i:currentBlock.push(i)),i.patchFlag|=-2,i}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:e,style:n}=t;e&&!isString$2(e)&&(t.class=normalizeClass(e)),isObject$4(n)&&(isProxy(n)&&!isArray$8(n)&&(n=extend$3({},n)),t.style=normalizeStyle(n))}return createBaseVNode(e,t,n,i,r,isString$2(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$4(e)?4:isFunction$4(e)?2:0,o,!0)}function guardReactiveProps(e){return e?isProxy(e)||InternalObjectKey in e?extend$3({},e):e:null}function cloneVNode(e,t,n=!1){const{props:i,ref:r,patchFlag:o,children:s}=e,a=t?mergeProps(i||{},t):i;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&normalizeKey(a),ref:t&&t.ref?n&&r?isArray$8(r)?r.concat(normalizeRef(t)):[r,normalizeRef(t)]:normalizeRef(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?-1===o?16:16|o:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function createTextVNode(e=" ",t=0){return createVNode(Text,null,e,t)}function createCommentVNode(e="",t=!1){return t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return null==e||"boolean"==typeof e?createVNode(Comment):isArray$8(e)?createVNode(Fragment,null,e.slice()):"object"==typeof e?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:i}=e;if(null==t)t=null;else if(isArray$8(t))n=16;else if("object"==typeof t){if(65&i){const n=t.default;return void(n&&(n._c&&(n._d=!1),normalizeChildren(e,n()),n._c&&(n._d=!0)))}{n=32;const i=t._;i||InternalObjectKey in t?3===i&¤tRenderingInstance&&(1===currentRenderingInstance.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=currentRenderingInstance}}else isFunction$4(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),64&i?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){const t={};for(let n=0;ncurrentInstance||currentRenderingInstance,setCurrentInstance=e=>{currentInstance=e,e.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),currentInstance=null};function isStatefulComponent(e){return 4&e.vnode.shapeFlag}let isInSSRComponentSetup=!1,compile$1;function setupComponent(e,t=!1){isInSSRComponentSetup=t;const{props:n,children:i}=e.vnode,r=isStatefulComponent(e);initProps(e,n,r,t),initSlots(e,i);const o=r?setupStatefulComponent(e,t):void 0;return isInSSRComponentSetup=!1,o}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=markRaw(new Proxy(e.ctx,PublicInstanceProxyHandlers));const{setup:i}=n;if(i){const n=e.setupContext=i.length>1?createSetupContext(e):null;setCurrentInstance(e),pauseTracking();const r=callWithErrorHandling(i,e,0,[e.props,n]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(r)){if(r.then(unsetCurrentInstance,unsetCurrentInstance),t)return r.then((n=>{handleSetupResult(e,n,t)})).catch((t=>{handleError(t,e,0)}));e.asyncDep=r}else handleSetupResult(e,r,t)}else finishComponentSetup(e,t)}function handleSetupResult(e,t,n){isFunction$4(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$4(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e,n)}function finishComponentSetup(e,t,n){const i=e.type;if(!e.render){if(!t&&compile$1&&!i.render){const t=i.template||resolveMergedOptions(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:o,compilerOptions:s}=i,a=extend$3(extend$3({isCustomElement:n,delimiters:o},r),s);i.render=compile$1(t,a)}}e.render=i.render||NOOP}setCurrentInstance(e),pauseTracking(),applyOptions(e),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(e){return new Proxy(e.attrs,{get:(t,n)=>(track(e,"get","$attrs"),t[n])})}function createSetupContext(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=createAttrsProxy(e))},slots:e.slots,emit:e.emit,expose:t}}function getExposeProxy(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get:(t,n)=>n in t?t[n]:n in publicPropertiesMap?publicPropertiesMap[n](e):void 0,has:(e,t)=>t in e||t in publicPropertiesMap}))}function getComponentName(e,t=!0){return isFunction$4(e)?e.displayName||e.name:e.name||t&&e.__name}function isClassComponent(e){return isFunction$4(e)&&"__vccOpts"in e}const computed=exports("e",((e,t)=>computed$1(e,t,isInSSRComponentSetup)));function h(e,t,n){const i=arguments.length;return 2===i?isObject$4(t)&&!isArray$8(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&isVNode(n)&&(n=[n]),createVNode(e,t,n))}const ssrContextKey=Symbol(""),useSSRContext=()=>inject(ssrContextKey),version="3.2.47",svgNS="http://www.w3.org/2000/svg",doc$2="undefined"!=typeof document?document:null,templateContainer=doc$2&&doc$2.createElement("template"),nodeOps={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const r=t?doc$2.createElementNS(svgNS,e):doc$2.createElement(e,n?{is:n}:void 0);return"select"===e&&i&&null!=i.multiple&&r.setAttribute("multiple",i.multiple),r},createText:e=>doc$2.createTextNode(e),createComment:e=>doc$2.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc$2.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,r,o){const s=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==o&&(r=r.nextSibling););else{templateContainer.innerHTML=i?`${e}`:e;const r=templateContainer.content;if(i){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function patchClass(e,t,n){const i=e._vtc;i&&(t=(t?[t,...i]:[...i]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function patchStyle(e,t,n){const i=e.style,r=isString$2(n);if(n&&!r){if(t&&!isString$2(t))for(const e in t)null==n[e]&&setStyle(i,e,"");for(const e in n)setStyle(i,e,n[e])}else{const o=i.display;r?t!==n&&(i.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(i.display=o)}}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray$8(n))n.forEach((n=>setStyle(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(i),n.replace(importantRE,""),"important"):e[i]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let i=camelize$1(t);if("filter"!==i&&i in e)return prefixCache[t]=i;i=capitalize(i);for(let r=0;rcachedNow||(p.then((()=>cachedNow=0)),cachedNow=Date.now());function createInvoker(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();callWithAsyncErrorHandling(patchStopImmediatePropagation(e,n.value),t,5,[e])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray$8(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const nativeOnRE=/^on[a-z]/,patchProp=(e,t,n,i,r=!1,o,s,a,l)=>{"class"===t?patchClass(e,i,r):"style"===t?patchStyle(e,n,i):isOn(t)?isModelListener(t)||patchEvent(e,t,n,i,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):shouldSetAsProp(e,t,i,r))?patchDOMProp(e,t,i,o,s,a,l):("true-value"===t?e._trueValue=i:"false-value"===t&&(e._falseValue=i),patchAttr(e,t,i,r))};function shouldSetAsProp(e,t,n,i){return i?"innerHTML"===t||"textContent"===t||!!(t in e&&nativeOnRE.test(t)&&isFunction$4(n)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!nativeOnRE.test(t)||!isString$2(n))&&t in e))))}const TRANSITION="transition",ANIMATION="animation",Transition=exports("ah",((e,{slots:t})=>h(BaseTransition,resolveTransitionProps(e),t)));Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=Transition.props=extend$3({},BaseTransition.props,DOMTransitionPropsValidators),callHook=(e,t=[])=>{isArray$8(e)?e.forEach((e=>e(...t))):e&&e(...t)},hasExplicitCallback=e=>!!e&&(isArray$8(e)?e.some((e=>e.length>1)):e.length>1);function resolveTransitionProps(e){const t={};for(const T in e)T in DOMTransitionPropsValidators||(t[T]=e[T]);if(!1===e.css)return t;const{name:n="v",type:i,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:u=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,f=normalizeDuration(r),m=f&&f[0],g=f&&f[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:A,onLeave:y,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:w=b,onAppearCancelled:E=A}=t,_=(e,t,n)=>{removeTransitionClass(e,t?u:a),removeTransitionClass(e,t?c:s),n&&n()},M=(e,t)=>{e._isLeaving=!1,removeTransitionClass(e,h),removeTransitionClass(e,p),removeTransitionClass(e,d),t&&t()},P=e=>(t,n)=>{const r=e?w:b,s=()=>_(t,e,n);callHook(r,[t,s]),nextFrame((()=>{removeTransitionClass(t,e?l:o),addTransitionClass(t,e?u:a),hasExplicitCallback(r)||whenTransitionEnds(t,i,m,s)}))};return extend$3(t,{onBeforeEnter(e){callHook(v,[e]),addTransitionClass(e,o),addTransitionClass(e,s)},onBeforeAppear(e){callHook(x,[e]),addTransitionClass(e,l),addTransitionClass(e,c)},onEnter:P(!1),onAppear:P(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>M(e,t);addTransitionClass(e,h),forceReflow(),addTransitionClass(e,d),nextFrame((()=>{e._isLeaving&&(removeTransitionClass(e,h),addTransitionClass(e,p),hasExplicitCallback(y)||whenTransitionEnds(e,i,g,n))})),callHook(y,[e,n])},onEnterCancelled(e){_(e,!1),callHook(A,[e])},onAppearCancelled(e){_(e,!0),callHook(E,[e])},onLeaveCancelled(e){M(e),callHook(S,[e])}})}function normalizeDuration(e){if(null==e)return null;if(isObject$4(e))return[NumberOf(e.enter),NumberOf(e.leave)];{const t=NumberOf(e);return[t,t]}}function NumberOf(e){return toNumber$1(e)}function addTransitionClass(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function removeTransitionClass(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function nextFrame(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let endId=0;function whenTransitionEnds(e,t,n,i){const r=e._endId=++endId,o=()=>{r===e._endId&&i()};if(n)return setTimeout(o,n);const{type:s,timeout:a,propCount:l}=getTransitionInfo(e,t);if(!s)return i();const c=s+"end";let u=0;const h=()=>{e.removeEventListener(c,d),o()},d=t=>{t.target===e&&++u>=l&&h()};setTimeout((()=>{u(n[e]||"").split(", "),r=i(`${TRANSITION}Delay`),o=i(`${TRANSITION}Duration`),s=getTimeout(r,o),a=i(`${ANIMATION}Delay`),l=i(`${ANIMATION}Duration`),c=getTimeout(a,l);let u=null,h=0,d=0;t===TRANSITION?s>0&&(u=TRANSITION,h=s,d=o.length):t===ANIMATION?c>0&&(u=ANIMATION,h=c,d=l.length):(h=Math.max(s,c),u=h>0?s>c?TRANSITION:ANIMATION:null,d=u?u===TRANSITION?o.length:l.length:0);return{type:u,timeout:h,propCount:d,hasTransform:u===TRANSITION&&/\b(transform|all)(,|$)/.test(i(`${TRANSITION}Property`).toString())}}function getTimeout(e,t){for(;e.lengthtoMs(t)+toMs(e[n]))))}function toMs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function forceReflow(){return document.body.offsetHeight}const positionMap=new WeakMap,newPositionMap=new WeakMap,TransitionGroupImpl={name:"TransitionGroup",props:extend$3({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=getCurrentInstance(),i=useTransitionState();let r,o;return onUpdated((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!hasCSSTransform(r[0].el,n.vnode.el,t))return;r.forEach(callPendingCbs),r.forEach(recordPosition);const i=r.filter(applyTranslation);forceReflow(),i.forEach((e=>{const n=e.el,i=n.style;addTransitionClass(n,t),i.transform=i.webkitTransform=i.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,removeTransitionClass(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const s=toRaw(e),a=resolveTransitionProps(s);let l=s.tag||Fragment;r=o,o=t.default?getTransitionRawChildren(t.default()):[];for(let e=0;edelete e.mode;TransitionGroupImpl.props;const TransitionGroup=TransitionGroupImpl;function callPendingCbs(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function recordPosition(e){newPositionMap.set(e,e.el.getBoundingClientRect())}function applyTranslation(e){const t=positionMap.get(e),n=newPositionMap.get(e),i=t.left-n.left,r=t.top-n.top;if(i||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${i}px,${r}px)`,t.transitionDuration="0s",e}}function hasCSSTransform(e,t,n){const i=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&i.classList.remove(e)))})),n.split(/\s+/).forEach((e=>e&&i.classList.add(e))),i.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(i);const{hasTransform:o}=getTransitionInfo(i);return r.removeChild(i),o}const keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=exports("bP",((e,t)=>n=>{if(!("key"in n))return;const i=hyphenate(n.key);return t.some((e=>e===i||keyNames[e]===i))?e(n):void 0})),vShow=exports("cl",{beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):setDisplay(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),setDisplay(e,!0),i.enter(e)):i.leave(e,(()=>{setDisplay(e,!1)})):setDisplay(e,t))},beforeUnmount(e,{value:t}){setDisplay(e,t)}});function setDisplay(e,t){e.style.display=t?e._vod:"none"}const rendererOptions=extend$3({patchProp:patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=exports("az",((...e)=>{const t=ensureRenderer().createApp(...e),{mount:n}=t;return t.mount=e=>{const i=normalizeContainer(e);if(!i)return;const r=t._component;isFunction$4(r)||r.render||r.template||(r.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t}));function normalizeContainer(e){if(isString$2(e)){return document.querySelector(e)}return e} /*! * vue-router v4.1.6 * (c) 2022 Eduardo San Martin Morote * @license MIT */const isBrowser="undefined"!=typeof window;function isESModule(e){return e.__esModule||"Module"===e[Symbol.toStringTag]}const assign$2=Object.assign;function applyToParams(e,t){const n={};for(const i in t){const r=t[i];n[i]=isArray$7(r)?r.map(e):e(r)}return n}const noop$2=()=>{},isArray$7=Array.isArray,TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=e=>e.replace(TRAILING_SLASH_RE,"");function parseURL(e,t,n="/"){let i,r={},o="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(i=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),r=e(o)),a>-1&&(i=i||t.slice(0,a),s=t.slice(a,t.length)),i=resolveRelativePath(null!=i?i:t,n),{fullPath:i+(o&&"?")+o+s,path:i,query:r,hash:s}}function stringifyURL(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function stripBase(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function isSameRouteLocation(e,t,n){const i=t.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&isSameRouteRecord(t.matched[i],n.matched[r])&&isSameRouteLocationParams(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function isSameRouteRecord(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function isSameRouteLocationParams(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!isSameRouteLocationParamsValue(e[n],t[n]))return!1;return!0}function isSameRouteLocationParamsValue(e,t){return isArray$7(e)?isEquivalentArray(e,t):isArray$7(t)?isEquivalentArray(t,e):e===t}function isEquivalentArray(e,t){return isArray$7(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}function resolveRelativePath(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),i=e.split("/");let r,o,s=n.length-1;for(r=0;r1&&s--}return n.slice(0,s).join("/")+"/"+i.slice(r-(r===i.length?1:0)).join("/")}var NavigationType,NavigationDirection;function normalizeBase(e){if(!e)if(isBrowser){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),removeTrailingSlash(e)}!function(e){e.pop="pop",e.push="push"}(NavigationType||(NavigationType={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(NavigationDirection||(NavigationDirection={}));const BEFORE_HASH_RE=/^[^#]+#/;function createHref(e,t){return e.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(e,t){const n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-n.left-(t.left||0),top:i.top-n.top-(t.top||0)}}const computeScrollPosition=()=>({left:window.pageXOffset,top:window.pageYOffset});function scrollToPosition(e){let t;if("el"in e){const n=e.el,i="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=getElementPosition(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function getScrollKey(e,t){return(history.state?history.state.position-t:-1)+e}const scrollPositions=new Map;function saveScrollPosition(e,t){scrollPositions.set(e,t)}function getSavedScrollPosition(e){const t=scrollPositions.get(e);return scrollPositions.delete(e),t}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(e,t){const{pathname:n,search:i,hash:r}=t,o=e.indexOf("#");if(o>-1){let t=r.includes(e.slice(o))?e.slice(o).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),stripBase(n,"")}return stripBase(n,e)+i+r}function useHistoryListeners(e,t,n,i){let r=[],o=[],s=null;const a=({state:o})=>{const a=createCurrentLocation(e,location),l=n.value,c=t.value;let u=0;if(o){if(n.value=a,t.value=o,s&&s===l)return void(s=null);u=c?o.position-c.position:0}else i(a);r.forEach((e=>{e(n.value,l,{delta:u,type:NavigationType.pop,direction:u?u>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})}))};function l(){const{history:e}=window;e.state&&e.replaceState(assign$2({},e.state,{scroll:computeScrollPosition()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l),{pauseListeners:function(){s=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return o.push(t),t},destroy:function(){for(const e of o)e();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}}}function buildState(e,t,n,i=!1,r=!1){return{back:e,current:t,forward:n,replaced:i,position:window.history.length,scroll:r?computeScrollPosition():null}}function useHistoryStateNavigation(e){const{history:t,location:n}=window,i={value:createCurrentLocation(e,n)},r={value:t.state};function o(i,o,s){const a=e.indexOf("#"),l=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+i:createBaseLocation()+e+i;try{t[s?"replaceState":"pushState"](o,"",l),r.value=o}catch(c){console.error(c),n[s?"replace":"assign"](l)}}return r.value||o(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:i,state:r,push:function(e,n){const s=assign$2({},r.value,t.state,{forward:e,scroll:computeScrollPosition()});o(s.current,s,!0),o(e,assign$2({},buildState(i.value,e,null),{position:s.position+1},n),!1),i.value=e},replace:function(e,n){o(e,assign$2({},t.state,buildState(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),i.value=e}}}function createWebHistory(e){const t=useHistoryStateNavigation(e=normalizeBase(e)),n=useHistoryListeners(e,t.state,t.location,t.replace);const i=assign$2({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:createHref.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function createWebHashHistory(e){return(e=location.host?e||location.pathname+location.search:"").includes("#")||(e+="#"),createWebHistory(e)}function isRouteLocation(e){return"string"==typeof e||e&&"object"==typeof e}function isRouteName(e){return"string"==typeof e||"symbol"==typeof e}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;function createRouterError(e,t){return assign$2(new Error,{type:e,[NavigationFailureSymbol]:!0},t)}function isNavigationFailure(e,t){return e instanceof Error&&NavigationFailureSymbol in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(NavigationFailureType||(NavigationFailureType={}));const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(e,t){const n=assign$2({},BASE_PATH_PARSER_OPTIONS,t),i=[];let r=n.start?"^":"";const o=[];for(const l of e){const e=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let t=0;tt.length?1===t.length&&80===t[0]?1:-1:0}function comparePathParserScore(e,t){let n=0;const i=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(e){if(!e)return[[]];if("/"===e)return[[ROOT_TOKEN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${n})/"${c}": ${e}`)}let n=0,i=n;const r=[];let o;function s(){o&&r.push(o),o=[]}let a,l=0,c="",u="";function h(){c&&(0===n?o.push({type:0,value:c}):1===n||2===n||3===n?(o.length>1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function d(){c+=a}for(;l{o(d)}:noop$2}function o(e){if(isRouteName(e)){const t=i.get(e);t&&(i.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&i.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(e){let t=0;for(;t=0&&(e.record.path!==n[t].record.path||!isRecordChildOf(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!isAliasRecord(e)&&i.set(e.record.name,e)}return t=mergeOptions({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,o,s,a={};if("name"in e&&e.name){if(r=i.get(e.name),!r)throw createRouterError(1,{location:e});s=r.record.name,a=assign$2(paramsFromLocation(t.params,r.keys.filter((e=>!e.optional)).map((e=>e.name))),e.params&¶msFromLocation(e.params,r.keys.map((e=>e.name)))),o=r.stringify(a)}else if("path"in e)o=e.path,r=n.find((e=>e.re.test(o))),r&&(a=r.parse(o),s=r.record.name);else{if(r=t.name?i.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw createRouterError(1,{location:e,currentLocation:t});s=r.record.name,a=assign$2({},t.params,e.params),o=r.stringify(a)}const l=[];let c=r;for(;c;)l.unshift(c.record),c=c.parent;return{name:s,path:o,params:a,matched:l,meta:mergeMetaFields(l)}},removeRoute:o,getRoutes:function(){return n},getRecordMatcher:function(e){return i.get(e)}}}function paramsFromLocation(e,t){const n={};for(const i of t)i in e&&(n[i]=e[i]);return n}function normalizeRouteRecord(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:normalizeRecordProps(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function normalizeRecordProps(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const i in e.components)t[i]="boolean"==typeof n?n:n[i];return t}function isAliasRecord(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mergeMetaFields(e){return e.reduce(((e,t)=>assign$2(e,t.meta)),{})}function mergeOptions(e,t){const n={};for(const i in e)n[i]=i in t?t[i]:e[i];return n}function isRecordChildOf(e,t){return t.children.some((t=>t===e||isRecordChildOf(e,t)))}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(e){return encodeURI(""+e).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(e){return commonEncode(e).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(e){return commonEncode(e).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(e){return encodeQueryValue(e).replace(EQUAL_RE,"%3D")}function encodePath(e){return commonEncode(e).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(e){return null==e?"":encodePath(e).replace(SLASH_RE,"%2F")}function decode$5(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function parseQuery(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let i=0;ie&&encodeQueryValue(e))):[i&&encodeQueryValue(i)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function normalizeQuery(e){const t={};for(const n in e){const i=e[n];void 0!==i&&(t[n]=isArray$7(i)?i.map((e=>null==e?null:""+e)):null==i?i:""+i)}return t}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e,reset:function(){e=[]}}}function guardToPromiseFn(e,t,n,i,r){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise(((s,a)=>{const l=e=>{!1===e?a(createRouterError(4,{from:n,to:t})):e instanceof Error?a(e):isRouteLocation(e)?a(createRouterError(2,{from:t,to:e})):(o&&i.enterCallbacks[r]===o&&"function"==typeof e&&o.push(e),s())},c=e.call(i&&i.instances[r],t,n,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch((e=>a(e)))}))}function extractComponentsGuards(e,t,n,i){const r=[];for(const o of e)for(const e in o.components){let s=o.components[e];if("beforeRouteEnter"===t||o.instances[e])if(isRouteComponent(s)){const a=(s.__vccOpts||s)[t];a&&r.push(guardToPromiseFn(a,n,i,o,e))}else{let a=s();r.push((()=>a.then((r=>{if(!r)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${o.path}"`));const s=isESModule(r)?r.default:r;o.components[e]=s;const a=(s.__vccOpts||s)[t];return a&&guardToPromiseFn(a,n,i,o,e)()}))))}}return r}function isRouteComponent(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}function useLink(e){const t=inject(routerKey),n=inject(routeLocationKey),i=computed((()=>t.resolve(unref(e.to)))),r=computed((()=>{const{matched:e}=i.value,{length:t}=e,r=e[t-1],o=n.matched;if(!r||!o.length)return-1;const s=o.findIndex(isSameRouteRecord.bind(null,r));if(s>-1)return s;const a=getOriginalPath(e[t-2]);return t>1&&getOriginalPath(r)===a&&o[o.length-1].path!==a?o.findIndex(isSameRouteRecord.bind(null,e[t-2])):s})),o=computed((()=>r.value>-1&&includesParams(n.params,i.value.params))),s=computed((()=>r.value>-1&&r.value===n.matched.length-1&&isSameRouteLocationParams(n.params,i.value.params)));return{route:i,href:computed((()=>i.value.href)),isActive:o,isExactActive:s,navigate:function(n={}){return guardEvent(n)?t[unref(e.replace)?"replace":"push"](unref(e.to)).catch(noop$2):Promise.resolve()}}}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:useLink,setup(e,{slots:t}){const n=reactive(useLink(e)),{options:i}=inject(routerKey),r=computed((()=>({[getLinkClass(e.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[getLinkClass(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const i=t.default&&t.default(n);return e.custom?i:h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),RouterLink=RouterLinkImpl;function guardEvent(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function includesParams(e,t){for(const n in t){const i=t[n],r=e[n];if("string"==typeof i){if(i!==r)return!1}else if(!isArray$7(r)||r.length!==i.length||i.some(((e,t)=>e!==r[t])))return!1}return!0}function getOriginalPath(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const getLinkClass=(e,t,n)=>null!=e?e:null!=t?t:n,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const i=inject(routerViewLocationKey),r=computed((()=>e.route||i.value)),o=inject(viewDepthKey,0),s=computed((()=>{let e=unref(o);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),a=computed((()=>r.value.matched[s.value]));provide(viewDepthKey,computed((()=>s.value+1))),provide(matchedRouteKey,a),provide(routerViewLocationKey,r);const l=ref();return watch((()=>[l.value,a.value,e.name]),(([e,t,n],[i,r,o])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===i&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&isSameRouteRecord(t,r)&&i||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const i=r.value,o=e.name,s=a.value,c=s&&s.components[o];if(!c)return normalizeSlot(n.default,{Component:c,route:i});const u=s.props[o],d=u?!0===u?i.params:"function"==typeof u?u(i):u:null,p=h(c,assign$2({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[o]=null)},ref:l}));return normalizeSlot(n.default,{Component:p,route:i})||p}}});function normalizeSlot(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const RouterView=exports("R",RouterViewImpl);function createRouter(e){const t=createRouterMatcher(e.routes,e),n=e.parseQuery||parseQuery,i=e.stringifyQuery||stringifyQuery,r=e.history,o=useCallbacks(),s=useCallbacks(),a=useCallbacks(),l=shallowRef(START_LOCATION_NORMALIZED);let c=START_LOCATION_NORMALIZED;isBrowser&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=applyToParams.bind(null,(e=>""+e)),h=applyToParams.bind(null,encodeParam),d=applyToParams.bind(null,decode$5);function p(e,o){if(o=assign$2({},o||l.value),"string"==typeof e){const i=parseURL(n,e,o.path),s=t.resolve({path:i.path},o),a=r.createHref(i.fullPath);return assign$2(i,s,{params:d(s.params),hash:decode$5(i.hash),redirectedFrom:void 0,href:a})}let s;if("path"in e)s=assign$2({},e,{path:parseURL(n,e.path,o.path).path});else{const t=assign$2({},e.params);for(const e in t)null==t[e]&&delete t[e];s=assign$2({},e,{params:h(e.params)}),o.params=h(o.params)}const a=t.resolve(s,o),c=e.hash||"";a.params=u(d(a.params));const p=stringifyURL(i,assign$2({},e,{hash:encodeHash(c),path:a.path})),f=r.createHref(p);return assign$2({fullPath:p,hash:c,query:i===stringifyQuery?normalizeQuery(e.query):e.query||{}},a,{redirectedFrom:void 0,href:f})}function f(e){return"string"==typeof e?parseURL(n,e,l.value.path):assign$2({},e)}function m(e,t){if(c!==e)return createRouterError(8,{from:t,to:e})}function g(e){return b(e)}function v(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let i="function"==typeof n?n(e):n;return"string"==typeof i&&(i=i.includes("?")||i.includes("#")?i=f(i):{path:i},i.params={}),assign$2({query:e.query,hash:e.hash,params:"path"in i?{}:e.params},i)}}function b(e,t){const n=c=p(e),r=l.value,o=e.state,s=e.force,a=!0===e.replace,u=v(n);if(u)return b(assign$2(f(u),{state:"object"==typeof u?assign$2({},o,u.state):o,force:s,replace:a}),t||n);const h=n;let d;return h.redirectedFrom=t,!s&&isSameRouteLocation(i,r,n)&&(d=createRouterError(16,{to:h,from:r}),C(r,r,!0,!1)),(d?Promise.resolve(d):y(h,r)).catch((e=>isNavigationFailure(e)?isNavigationFailure(e,2)?e:T(e):P(e,h,r))).then((e=>{if(e){if(isNavigationFailure(e,2))return b(assign$2({replace:a},f(e.to),{state:"object"==typeof e.to?assign$2({},o,e.to.state):o,force:s}),t||h)}else e=x(h,r,!0,a,o);return S(h,r,e),e}))}function A(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function y(e,t){let n;const[i,r,a]=extractChangingRecords(e,t);n=extractComponentsGuards(i.reverse(),"beforeRouteLeave",e,t);for(const o of i)o.leaveGuards.forEach((i=>{n.push(guardToPromiseFn(i,e,t))}));const l=A.bind(null,e,t);return n.push(l),runGuardQueue(n).then((()=>{n=[];for(const i of o.list())n.push(guardToPromiseFn(i,e,t));return n.push(l),runGuardQueue(n)})).then((()=>{n=extractComponentsGuards(r,"beforeRouteUpdate",e,t);for(const i of r)i.updateGuards.forEach((i=>{n.push(guardToPromiseFn(i,e,t))}));return n.push(l),runGuardQueue(n)})).then((()=>{n=[];for(const i of e.matched)if(i.beforeEnter&&!t.matched.includes(i))if(isArray$7(i.beforeEnter))for(const r of i.beforeEnter)n.push(guardToPromiseFn(r,e,t));else n.push(guardToPromiseFn(i.beforeEnter,e,t));return n.push(l),runGuardQueue(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=extractComponentsGuards(a,"beforeRouteEnter",e,t),n.push(l),runGuardQueue(n)))).then((()=>{n=[];for(const i of s.list())n.push(guardToPromiseFn(i,e,t));return n.push(l),runGuardQueue(n)})).catch((e=>isNavigationFailure(e,8)?e:Promise.reject(e)))}function S(e,t,n){for(const i of a.list())i(e,t,n)}function x(e,t,n,i,o){const s=m(e,t);if(s)return s;const a=t===START_LOCATION_NORMALIZED,c=isBrowser?history.state:{};n&&(i||a?r.replace(e.fullPath,assign$2({scroll:a&&c&&c.scroll},o)):r.push(e.fullPath,o)),l.value=e,C(e,t,n,a),T()}let w;let E,_=useCallbacks(),M=useCallbacks();function P(e,t,n){T(e);const i=M.list();return i.length?i.forEach((i=>i(e,t,n))):console.error(e),Promise.reject(e)}function T(e){return E||(E=!e,w||(w=r.listen(((e,t,n)=>{if(!R.listening)return;const i=p(e),o=v(i);if(o)return void b(assign$2(o,{replace:!0}),i).catch(noop$2);c=i;const s=l.value;isBrowser&&saveScrollPosition(getScrollKey(s.fullPath,n.delta),computeScrollPosition()),y(i,s).catch((e=>isNavigationFailure(e,12)?e:isNavigationFailure(e,2)?(b(e.to,i).then((e=>{isNavigationFailure(e,20)&&!n.delta&&n.type===NavigationType.pop&&r.go(-1,!1)})).catch(noop$2),Promise.reject()):(n.delta&&r.go(-n.delta,!1),P(e,i,s)))).then((e=>{(e=e||x(i,s,!1))&&(n.delta&&!isNavigationFailure(e,8)?r.go(-n.delta,!1):n.type===NavigationType.pop&&isNavigationFailure(e,20)&&r.go(-1,!1)),S(i,s,e)})).catch(noop$2)}))),_.list().forEach((([t,n])=>e?n(e):t())),_.reset()),e}function C(t,n,i,r){const{scrollBehavior:o}=e;if(!isBrowser||!o)return Promise.resolve();const s=!i&&getSavedScrollPosition(getScrollKey(t.fullPath,0))||(r||!i)&&history.state&&history.state.scroll||null;return nextTick().then((()=>o(t,n,s))).then((e=>e&&scrollToPosition(e))).catch((e=>P(e,t,n)))}const I=e=>r.go(e);let k;const B=new Set,R={currentRoute:l,listening:!0,addRoute:function(e,n){let i,r;return isRouteName(e)?(i=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,i)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:p,options:e,push:g,replace:function(e){return g(assign$2(f(e),{replace:!0}))},go:I,back:()=>I(-1),forward:()=>I(1),beforeEach:o.add,beforeResolve:s.add,afterEach:a.add,onError:M.add,isReady:function(){return E&&l.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise(((e,t)=>{_.add([e,t])}))},install(e){e.component("RouterLink",RouterLink),e.component("RouterView",RouterView),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(l)}),isBrowser&&!k&&l.value===START_LOCATION_NORMALIZED&&(k=!0,g(r.location).catch((e=>{})));const t={};for(const i in START_LOCATION_NORMALIZED)t[i]=computed((()=>l.value[i]));e.provide(routerKey,this),e.provide(routeLocationKey,reactive(t)),e.provide(routerViewLocationKey,l);const n=e.unmount;B.add(e),e.unmount=function(){B.delete(e),B.size<1&&(c=START_LOCATION_NORMALIZED,w&&w(),w=null,l.value=START_LOCATION_NORMALIZED,k=!1,E=!1),n()}}};return R}function runGuardQueue(e){return e.reduce(((e,t)=>e.then((()=>t()))),Promise.resolve())}function extractChangingRecords(e,t){const n=[],i=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let s=0;sisSameRouteRecord(e,o)))?i.push(o):n.push(o));const a=e.matched[s];a&&(t.matched.find((e=>isSameRouteRecord(e,a)))||r.push(a))}return[n,i,r]}function useRouter(){return inject(routerKey)}function useRoute$1(){return inject(routeLocationKey)}const isDef$1=exports("bh",(e=>null!=e)),isFunction$3=exports("bR",(e=>"function"==typeof e)),isObject$3=exports("cn",(e=>null!==e&&"object"==typeof e)),isPromise=exports("co",(e=>isObject$3(e)&&isFunction$3(e.then)&&isFunction$3(e.catch))),isNumeric=e=>"number"==typeof e||/^\d+(\.\d+)?$/.test(e),isIOS$1=()=>!!inBrowser$2&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());function noop$1(){}const extend$2=exports("bi",Object.assign),inBrowser$2=exports("bV","undefined"!=typeof window);function get(e,t){const n=t.split(".");let i=e;return n.forEach((e=>{var t;i=isObject$3(i)&&null!=(t=i[e])?t:""})),i}function pick$1(e,t,n){return t.reduce(((t,i)=>(n&&void 0===e[i]||(t[i]=e[i]),t)),{})}const isSameValue=exports("bA",((e,t)=>JSON.stringify(e)===JSON.stringify(t))),toArray=exports("cq",(e=>Array.isArray(e)?e:[e])),unknownProp=exports("bN",null),numericProp=exports("bk",[Number,String]),truthProp=exports("bx",{type:Boolean,default:!0}),makeRequiredProp=exports("bl",(e=>({type:e,required:!0}))),makeArrayProp=exports("bm",(()=>({type:Array,default:()=>[]}))),makeNumberProp=exports("cu",(e=>({type:Number,default:e}))),makeNumericProp=exports("bw",(e=>({type:numericProp,default:e}))),makeStringProp=exports("by",(e=>({type:String,default:e})));var inBrowser$1="undefined"!=typeof window;function raf(e){return inBrowser$1?requestAnimationFrame(e):-1}function cancelRaf(e){inBrowser$1&&cancelAnimationFrame(e)}function doubleRaf(e){raf((()=>raf(e)))}var isWindow=e=>e===window,makeDOMRect=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),useRect=exports("bG",(e=>{const t=unref(e);if(isWindow(t)){const e=t.innerWidth,n=t.innerHeight;return makeDOMRect(e,n)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():makeDOMRect(0,0)}));function useParent(e){const t=inject(e,null);if(t){const e=getCurrentInstance(),{link:n,unlink:i,internalChildren:r}=t;n(e),onUnmounted((()=>i(e)));return{parent:t,index:computed((()=>r.indexOf(e)))}}return{parent:null,index:ref(-1)}}function flattenVNodes(e){const t=[],n=e=>{Array.isArray(e)&&e.forEach((e=>{var i;isVNode(e)&&(t.push(e),(null==(i=e.component)?void 0:i.subTree)&&(t.push(e.component.subTree),n(e.component.subTree.children)),e.children&&n(e.children))}))};return n(e),t}var findVNodeIndex=(e,t)=>{const n=e.indexOf(t);return-1===n?e.findIndex((e=>void 0!==t.key&&null!==t.key&&e.type===t.type&&e.key===t.key)):n},width,height;function sortChildren(e,t,n){const i=flattenVNodes(e.subTree.children);n.sort(((e,t)=>findVNodeIndex(i,e.vnode)-findVNodeIndex(i,t.vnode)));const r=n.map((e=>e.proxy));t.sort(((e,t)=>r.indexOf(e)-r.indexOf(t)))}function useChildren(e){const t=reactive([]),n=reactive([]),i=getCurrentInstance();return{children:t,linkChildren:r=>{provide(e,Object.assign({link:e=>{e.proxy&&(n.push(e),t.push(e.proxy),sortChildren(i,t,n))},unlink:e=>{const i=n.indexOf(e);t.splice(i,1),n.splice(i,1)},children:t,internalChildren:n},r))}}}function onMountedOrActivated(e){let t;onMounted((()=>{e(),nextTick((()=>{t=!0}))})),onActivated((()=>{t&&e()}))}function useEventListener$1(e,t,n={}){if(!inBrowser$1)return;const{target:i=window,passive:r=!1,capture:o=!1}=n;let s,a=!1;const l=n=>{if(a)return;const i=unref(n);i&&!s&&(i.addEventListener(e,t,{capture:o,passive:r}),s=!0)},c=n=>{if(a)return;const i=unref(n);i&&s&&(i.removeEventListener(e,t,o),s=!1)};let u;return onUnmounted((()=>c(i))),onDeactivated((()=>c(i))),onMountedOrActivated((()=>l(i))),isRef(i)&&(u=watch(i,((e,t)=>{c(t),l(e)}))),()=>{null==u||u(),c(i),a=!0}}function useClickAway(e,t,n={}){if(!inBrowser$1)return;const{eventName:i="click"}=n;useEventListener$1(i,(n=>{(Array.isArray(e)?e:[e]).every((e=>{const t=unref(e);return t&&!t.contains(n.target)}))&&t(n)}),{target:document})}function useWindowSize(){if(!width&&(width=ref(0),height=ref(0),inBrowser$1)){const e=()=>{width.value=window.innerWidth,height.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:width,height:height}}var overflowScrollReg=/scroll|auto|overlay/i,defaultRoot=inBrowser$1?window:void 0,visibility;function isElement$1(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType}function getScrollParent(e,t=defaultRoot){let n=e;for(;n&&n!==t&&isElement$1(n);){const{overflowY:e}=window.getComputedStyle(n);if(overflowScrollReg.test(e))return n;n=n.parentNode}return t}function useScrollParent(e,t=defaultRoot){const n=ref();return onMounted((()=>{e.value&&(n.value=getScrollParent(e.value,t))})),n}function usePageVisibility(){if(!visibility&&(visibility=ref("visible"),inBrowser$1)){const e=()=>{visibility.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return visibility}var CUSTOM_FIELD_INJECTION_KEY=exports("cs",Symbol("van-field"));function useCustomFieldValue(e){const t=inject(CUSTOM_FIELD_INJECTION_KEY,null);t&&!t.customValue.value&&(t.customValue.value=e,watch(e,(()=>{t.resetValidation(),t.validateWithTrigger("onChange")})))}function getScrollTop(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function setScrollTop(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function getRootScrollTop(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function setRootScrollTop(e){setScrollTop(window,e),setScrollTop(document.body,e)}function getElementTop(e,t){if(e===window)return 0;const n=t?getScrollTop(t):getRootScrollTop();return useRect(e).top+n}const isIOS=isIOS$1();function resetScroll(){isIOS&&setRootScrollTop(getRootScrollTop())}const stopPropagation=exports("cy",(e=>e.stopPropagation()));function preventDefault(e,t){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault(),t&&stopPropagation(e)}function isHidden(e){const t=unref(e);if(!t)return!1;const n=window.getComputedStyle(t),i="none"===n.display,r=null===t.offsetParent&&"fixed"!==n.position;return i||r}const{width:windowWidth,height:windowHeight}=useWindowSize();function addUnit(e){if(isDef$1(e))return isNumeric(e)?`${e}px`:String(e)}function getSizeStyle(e){if(isDef$1(e)){if(Array.isArray(e))return{width:addUnit(e[0]),height:addUnit(e[1])};const t=addUnit(e);return{width:t,height:t}}}function getZIndexStyle(e){const t={};return void 0!==e&&(t.zIndex=+e),t}let rootFontSize;function getRootFontSize(){if(!rootFontSize){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;rootFontSize=parseFloat(t)}return rootFontSize}function convertRem(e){return+(e=e.replace(/rem/g,""))*getRootFontSize()}function convertVw(e){return+(e=e.replace(/vw/g,""))*windowWidth.value/100}function convertVh(e){return+(e=e.replace(/vh/g,""))*windowHeight.value/100}function unitToPx(e){if("number"==typeof e)return e;if(inBrowser$2){if(e.includes("rem"))return convertRem(e);if(e.includes("vw"))return convertVw(e);if(e.includes("vh"))return convertVh(e)}return parseFloat(e)}exports({c8:windowWidth,c9:windowHeight});const camelizeRE=/-(\w)/g,camelize=e=>e.replace(camelizeRE,((e,t)=>t.toUpperCase())),kebabCase=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),clamp=exports("bj",((e,t,n)=>Math.min(Math.max(e,t),n)));function trimExtraChar(e,t,n){const i=e.indexOf(t);return-1===i?e:"-"===t&&0!==i?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(n,"")}function formatNumber(e,t=!0,n=!0){e=t?trimExtraChar(e,".",/\./g):e.split(".")[0];const i=t?/[^-0-9.]/g:/[^-0-9]/g;return(e=n?trimExtraChar(e,"-",/-/g):e.replace(/-/,"")).replace(i,"")}function addNumber(e,t){const n=10**10;return Math.round((e+t)*n)/n}const{hasOwnProperty:hasOwnProperty$1}=Object.prototype;function assignKey(e,t,n){const i=t[n];isDef$1(i)&&(hasOwnProperty$1.call(e,n)&&isObject$3(i)?e[n]=deepAssign(Object(e[n]),i):e[n]=i)}function deepAssign(e,t){return Object.keys(t).forEach((n=>{assignKey(e,t,n)})),e}var stdin_default$i={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const lang=ref("zh-CN"),messages=reactive({"zh-CN":stdin_default$i}),Locale={messages:()=>messages[lang.value],use(e,t){lang.value=e,this.add({[e]:t})},add(e={}){deepAssign(messages,e)}};var stdin_default$h=Locale;function createTranslate(e){const t=camelize(e)+".";return(e,...n)=>{const i=stdin_default$h.messages(),r=get(i,t+e)||get(i,e);return isFunction$3(r)?r(...n):r}}function genBem(e,t){return t?"string"==typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce(((t,n)=>t+genBem(e,n)),""):Object.keys(t).reduce(((n,i)=>n+(t[i]?genBem(e,i):"")),""):""}function createBEM(e){return(t,n)=>(t&&"string"!=typeof t&&(n=t,t=""),`${t=t?`${e}__${t}`:e}${genBem(t,n)}`)}function createNamespace$1(e){const t=`van-${e}`;return[t,createBEM(t),createTranslate(t)]}const BORDER="van-hairline",BORDER_TOP=exports("bT",`${BORDER}--top`),BORDER_LEFT=exports("bS",`${BORDER}--left`),BORDER_BOTTOM=exports("cx",`${BORDER}--bottom`),BORDER_SURROUND=`${BORDER}--surround`,BORDER_TOP_BOTTOM=exports("ce",`${BORDER}--top-bottom`),BORDER_UNSET_TOP_BOTTOM=exports("bD",`${BORDER}-unset--top-bottom`),HAPTICS_FEEDBACK=exports("bt","van-haptics-feedback"),FORM_KEY=exports("cp",Symbol("van-form"));function callInterceptor(e,{args:t=[],done:n,canceled:i}){if(e){const r=e.apply(null,t);isPromise(r)?r.then((e=>{e?n():i&&i()})).catch(noop$1):r?n():i&&i()}else n()}function withInstall(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component(camelize(`-${n}`),e))},e}const POPUP_TOGGLE_KEY=Symbol();function onPopupReopen(e){const t=inject(POPUP_TOGGLE_KEY,null);t&&watch(t,(t=>{t&&e()}))}const useHeight=(e,t)=>{const n=ref(),i=()=>{n.value=useRect(e).height};return onMounted((()=>{if(nextTick(i),t)for(let e=1;e<=3;e++)setTimeout(i,100*e)})),onPopupReopen((()=>nextTick(i))),watch([windowWidth,windowHeight],i),n};function usePlaceholder(e,t){const n=useHeight(e,!0);return e=>createVNode("div",{class:t("placeholder"),style:{height:n.value?`${n.value}px`:void 0}},[e()])}function useExpose(e){const t=getCurrentInstance();t&&extend$2(t.proxy,e)}const routeProps=exports("bK",{to:[String,Object],url:String,replace:Boolean});function route({to:e,url:t,replace:n,$router:i}){e&&i?i[n?"replace":"push"](e):t&&(n?location.replace(t):location.href=t)}function useRoute(){const e=getCurrentInstance().proxy;return()=>route(e)}const[name$e,bem$e]=createNamespace$1("badge"),badgeProps={dot:Boolean,max:numericProp,tag:makeStringProp("div"),color:String,offset:Array,content:numericProp,showZero:truthProp,position:makeStringProp("top-right")};var stdin_default$g=defineComponent({name:name$e,props:badgeProps,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:n,showZero:i}=e;return isDef$1(n)&&""!==n&&(i||0!==n&&"0"!==n)},i=()=>{const{dot:i,max:r,content:o}=e;if(!i&&n())return t.content?t.content():isDef$1(r)&&isNumeric(o)&&+o>+r?`${r}+`:o},r=e=>e.startsWith("-")?e.replace("-",""):`-${e}`,o=computed((()=>{const n={background:e.color};if(e.offset){const[i,o]=e.offset,{position:s}=e,[a,l]=s.split("-");t.default?(n[a]="number"==typeof o?addUnit("top"===a?o:-o):"top"===a?addUnit(o):r(o),n[l]="number"==typeof i?addUnit("left"===l?i:-i):"left"===l?addUnit(i):r(i)):(n.marginTop=addUnit(o),n.marginLeft=addUnit(i))}return n})),s=()=>{if(n()||e.dot)return createVNode("div",{class:bem$e([e.position,{dot:e.dot,fixed:!!t.default}]),style:o.value},[i()])};return()=>{if(t.default){const{tag:n}=e;return createVNode(n,{class:bem$e("wrapper")},{default:()=>[t.default(),s()]})}return s()}}});const Badge=exports("a7",withInstall(stdin_default$g));let globalZIndex=2e3;const useGlobalZIndex=()=>++globalZIndex,setGlobalZIndex=e=>{globalZIndex=e},[name$d,bem$d]=createNamespace$1("config-provider"),CONFIG_PROVIDER_KEY=Symbol(name$d),configProviderProps={tag:makeStringProp("div"),theme:makeStringProp("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,iconPrefix:String};function mapThemeVarsToCSSVars(e){const t={};return Object.keys(e).forEach((n=>{t[`--van-${kebabCase(n)}`]=e[n]})),t}defineComponent({name:name$d,props:configProviderProps,setup(e,{slots:t}){const n=computed((()=>mapThemeVarsToCSSVars(extend$2({},e.themeVars,"dark"===e.theme?e.themeVarsDark:e.themeVarsLight))));if(inBrowser$2){const t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},n=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};watch((()=>e.theme),((e,i)=>{i&&n(i),t()}),{immediate:!0}),onActivated(t),onDeactivated(n),onBeforeUnmount(n)}return provide(CONFIG_PROVIDER_KEY,e),watchEffect((()=>{void 0!==e.zIndex&&setGlobalZIndex(e.zIndex)})),()=>createVNode(e.tag,{class:bem$d(),style:n.value},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[name$c,bem$c]=createNamespace$1("icon"),isImage=e=>null==e?void 0:e.includes("/"),iconProps={dot:Boolean,tag:makeStringProp("i"),name:String,size:numericProp,badge:numericProp,color:String,badgeProps:Object,classPrefix:String};var stdin_default$f=defineComponent({name:name$c,props:iconProps,setup(e,{slots:t}){const n=inject(CONFIG_PROVIDER_KEY,null),i=computed((()=>e.classPrefix||(null==n?void 0:n.iconPrefix)||bem$c()));return()=>{const{tag:n,dot:r,name:o,size:s,badge:a,color:l}=e,c=isImage(o);return createVNode(Badge,mergeProps({dot:r,tag:n,class:[i.value,c?"":`${i.value}-${o}`],style:{color:l,fontSize:addUnit(s)},content:a},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),c&&createVNode("img",{class:bem$c("image"),src:o},null)]}})}}});const Icon$1=exports("I",withInstall(stdin_default$f)),[name$b,bem$b]=createNamespace$1("loading"),SpinIcon=Array(12).fill(null).map(((e,t)=>createVNode("i",{class:bem$b("line",String(t+1))},null))),CircularIcon=createVNode("svg",{class:bem$b("circular"),viewBox:"25 25 50 50"},[createVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),loadingProps={size:numericProp,type:makeStringProp("circular"),color:String,vertical:Boolean,textSize:numericProp,textColor:String};var stdin_default$e=defineComponent({name:name$b,props:loadingProps,setup(e,{slots:t}){const n=computed((()=>extend$2({color:e.color},getSizeStyle(e.size)))),i=()=>{const i="spinner"===e.type?SpinIcon:CircularIcon;return createVNode("span",{class:bem$b("spinner",e.type),style:n.value},[t.icon?t.icon():i])},r=()=>{var n;if(t.default)return createVNode("span",{class:bem$b("text"),style:{fontSize:addUnit(e.textSize),color:null!=(n=e.textColor)?n:e.color}},[t.default()])};return()=>{const{type:t,vertical:n}=e;return createVNode("div",{class:bem$b([t,{vertical:n}]),"aria-live":"polite","aria-busy":!0},[i(),r()])}}});const Loading$1=exports("bB",withInstall(stdin_default$e)),[name$a,bem$a]=createNamespace$1("button"),buttonProps=extend$2({},routeProps,{tag:makeStringProp("button"),text:String,icon:String,type:makeStringProp("default"),size:makeStringProp("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:makeStringProp("button"),loadingSize:numericProp,loadingText:String,loadingType:String,iconPosition:makeStringProp("left")});var stdin_default$d=defineComponent({name:name$a,props:buttonProps,emits:["click"],setup(e,{emit:t,slots:n}){const i=useRoute(),r=()=>e.loading?n.loading?n.loading():createVNode(Loading$1,{size:e.loadingSize,type:e.loadingType,class:bem$a("loading")},null):n.icon?createVNode("div",{class:bem$a("icon")},[n.icon()]):e.icon?createVNode(Icon$1,{name:e.icon,class:bem$a("icon"),classPrefix:e.iconPrefix},null):void 0,o=()=>{let t;if(t=e.loading?e.loadingText:n.default?n.default():e.text,t)return createVNode("span",{class:bem$a("text")},[t])},s=()=>{const{color:t,plain:n}=e;if(t){const e={color:n?t:"white"};return n||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}},a=n=>{e.loading?preventDefault(n):e.disabled||(t("click",n),i())};return()=>{const{tag:t,type:n,size:i,block:l,round:c,plain:u,square:h,loading:d,disabled:p,hairline:f,nativeType:m,iconPosition:g}=e,v=[bem$a([n,i,{plain:u,block:l,round:c,square:h,loading:d,disabled:p,hairline:f}]),{[BORDER_SURROUND]:f}];return createVNode(t,{type:m,class:v,style:s(),disabled:p,onClick:a},{default:()=>[createVNode("div",{class:bem$a("content")},["left"===g&&r(),o(),"right"===g&&r()])]})}}});const Button=exports("K",withInstall(stdin_default$d)),popupSharedProps=exports("bM",{show:Boolean,zIndex:numericProp,overlay:truthProp,duration:numericProp,teleport:[String,Object],lockScroll:truthProp,lazyRender:truthProp,beforeClose:Function,overlayStyle:Object,overlayClass:unknownProp,transitionAppear:Boolean,closeOnClickOverlay:truthProp}),popupSharedPropKeys=exports("bO",Object.keys(popupSharedProps));function getDirection(e,t){return e>t?"horizontal":t>e?"vertical":""}function useTouch(){const e=ref(0),t=ref(0),n=ref(0),i=ref(0),r=ref(0),o=ref(0),s=ref(""),a=()=>{n.value=0,i.value=0,r.value=0,o.value=0,s.value=""};return{move:a=>{const l=a.touches[0];n.value=(l.clientX<0?0:l.clientX)-e.value,i.value=l.clientY-t.value,r.value=Math.abs(n.value),o.value=Math.abs(i.value);(!s.value||r.value<10&&o.value<10)&&(s.value=getDirection(r.value,o.value))},start:n=>{a(),e.value=n.touches[0].clientX,t.value=n.touches[0].clientY},reset:a,startX:e,startY:t,deltaX:n,deltaY:i,offsetX:r,offsetY:o,direction:s,isVertical:()=>"vertical"===s.value,isHorizontal:()=>"horizontal"===s.value}}let totalLockCount=0;const BODY_LOCK_CLASS="van-overflow-hidden";function useLockScroll(e,t){const n=useTouch(),i=t=>{n.move(t);const i=n.deltaY.value>0?"10":"01",r=getScrollParent(t.target,e.value),{scrollHeight:o,offsetHeight:s,scrollTop:a}=r;let l="11";0===a?l=s>=o?"00":"01":a+s>=o&&(l="10"),"11"===l||!n.isVertical()||parseInt(l,2)&parseInt(i,2)||preventDefault(t,!0)},r=()=>{document.addEventListener("touchstart",n.start),document.addEventListener("touchmove",i,{passive:!1}),totalLockCount||document.body.classList.add(BODY_LOCK_CLASS),totalLockCount++},o=()=>{totalLockCount&&(document.removeEventListener("touchstart",n.start),document.removeEventListener("touchmove",i),totalLockCount--,totalLockCount||document.body.classList.remove(BODY_LOCK_CLASS))},s=()=>t()&&o();onMountedOrActivated((()=>t()&&r())),onDeactivated(s),onBeforeUnmount(s),watch(t,(e=>{e?r():o()}))}function useLazyRender(e){const t=ref(!1);return watch(e,(e=>{e&&(t.value=e)}),{immediate:!0}),e=>()=>t.value?e():null}const[name$9,bem$9]=createNamespace$1("overlay"),overlayProps={show:Boolean,zIndex:numericProp,duration:numericProp,className:unknownProp,lockScroll:truthProp,lazyRender:truthProp,customStyle:Object};var stdin_default$c=defineComponent({name:name$9,props:overlayProps,setup(e,{slots:t}){const n=ref(),i=useLazyRender((()=>e.show||!e.lazyRender))((()=>{var i;const r=extend$2(getZIndexStyle(e.zIndex),e.customStyle);return isDef$1(e.duration)&&(r.animationDuration=`${e.duration}s`),withDirectives(createVNode("div",{ref:n,style:r,class:[bem$9(),e.className]},[null==(i=t.default)?void 0:i.call(t)]),[[vShow,e.show]])}));return useEventListener$1("touchmove",(t=>{e.lockScroll&&preventDefault(t,!0)}),{target:n}),()=>createVNode(Transition,{name:"van-fade",appear:!0},{default:i})}});const Overlay=withInstall(stdin_default$c),popupProps=extend$2({},popupSharedProps,{round:Boolean,position:makeStringProp("center"),closeIcon:makeStringProp("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:makeStringProp("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[name$8,bem$8]=createNamespace$1("popup");var stdin_default$b=defineComponent({name:name$8,inheritAttrs:!1,props:popupProps,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:n,slots:i}){let r,o;const s=ref(),a=ref(),l=useLazyRender((()=>e.show||!e.lazyRender)),c=computed((()=>{const t={zIndex:s.value};if(isDef$1(e.duration)){t["center"===e.position?"animationDuration":"transitionDuration"]=`${e.duration}s`}return t})),u=()=>{r||(r=!0,s.value=void 0!==e.zIndex?+e.zIndex:useGlobalZIndex(),t("open"))},h=()=>{r&&callInterceptor(e.beforeClose,{done(){r=!1,t("close"),t("update:show",!1)}})},d=n=>{t("clickOverlay",n),e.closeOnClickOverlay&&h()},p=()=>{if(e.overlay)return createVNode(Overlay,{show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0,onClick:d},{default:i["overlay-content"]})},f=e=>{t("clickCloseIcon",e),h()},m=()=>{if(e.closeable)return createVNode(Icon$1,{role:"button",tabindex:0,name:e.closeIcon,class:[bem$8("close-icon",e.closeIconPosition),HAPTICS_FEEDBACK],classPrefix:e.iconPrefix,onClick:f},null)},g=()=>t("opened"),v=()=>t("closed"),b=e=>t("keydown",e),A=l((()=>{var t;const{round:r,position:o,safeAreaInsetTop:s,safeAreaInsetBottom:l}=e;return withDirectives(createVNode("div",mergeProps({ref:a,style:c.value,role:"dialog",tabindex:0,class:[bem$8({round:r,[o]:o}),{"van-safe-area-top":s,"van-safe-area-bottom":l}],onKeydown:b},n),[null==(t=i.default)?void 0:t.call(i),m()]),[[vShow,e.show]])})),y=()=>{const{position:t,transition:n,transitionAppear:i}=e;return createVNode(Transition,{name:n||("center"===t?"van-fade":`van-popup-slide-${t}`),appear:i,onAfterEnter:g,onAfterLeave:v},{default:A})};return watch((()=>e.show),(e=>{e&&!r&&(u(),0===n.tabindex&&nextTick((()=>{var e;null==(e=a.value)||e.focus()}))),!e&&r&&(r=!1,t("close"))})),useExpose({popupRef:a}),useLockScroll(a,(()=>e.show&&e.lockScroll)),useEventListener$1("popstate",(()=>{e.closeOnPopstate&&(h(),o=!1)})),onMounted((()=>{e.show&&u()})),onActivated((()=>{o&&(t("update:show",!0),o=!1)})),onDeactivated((()=>{e.show&&e.teleport&&(h(),o=!0)})),provide(POPUP_TOGGLE_KEY,(()=>e.show)),()=>e.teleport?createVNode(Teleport,{to:e.teleport},{default:()=>[p(),y()]}):createVNode(Fragment,null,[p(),y()])}});const Popup=exports("P",withInstall(stdin_default$b));let current=0;function useId(){const e=getCurrentInstance(),{name:t="unknown"}=(null==e?void 0:e.type)||{};return`${t}-${++current}`}let lockCount=0;function lockClick(e){e?(lockCount||document.body.classList.add("van-toast--unclickable"),lockCount++):lockCount&&(lockCount--,lockCount||document.body.classList.remove("van-toast--unclickable"))}const[name$7,bem$7]=createNamespace$1("toast"),popupInheritProps=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay"],toastProps={icon:String,show:Boolean,type:makeStringProp("text"),overlay:Boolean,message:numericProp,iconSize:numericProp,duration:makeNumberProp(2e3),position:makeStringProp("middle"),teleport:[String,Object],wordBreak:String,className:unknownProp,iconPrefix:String,transition:makeStringProp("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:unknownProp,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean};var stdin_default$a=defineComponent({name:name$7,props:toastProps,emits:["update:show"],setup(e,{emit:t,slots:n}){let i,r=!1;const o=()=>{const t=e.show&&e.forbidClick;r!==t&&(r=t,lockClick(r))},s=e=>t("update:show",e),a=()=>{e.closeOnClick&&s(!1)},l=()=>clearTimeout(i),c=()=>{const{icon:t,type:n,iconSize:i,iconPrefix:r,loadingType:o}=e;return t||"success"===n||"fail"===n?createVNode(Icon$1,{name:t||n,size:i,class:bem$7("icon"),classPrefix:r},null):"loading"===n?createVNode(Loading$1,{class:bem$7("loading"),size:i,type:o},null):void 0},u=()=>{const{type:t,message:i}=e;return n.message?createVNode("div",{class:bem$7("text")},[n.message()]):isDef$1(i)&&""!==i?"html"===t?createVNode("div",{key:0,class:bem$7("text"),innerHTML:String(i)},null):createVNode("div",{class:bem$7("text")},[i]):void 0};return watch((()=>[e.show,e.forbidClick]),o),watch((()=>[e.show,e.type,e.message,e.duration]),(()=>{l(),e.show&&e.duration>0&&(i=setTimeout((()=>{s(!1)}),e.duration))})),onMounted(o),onUnmounted(o),()=>createVNode(Popup,mergeProps({class:[bem$7([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:a,onClosed:l,"onUpdate:show":s},pick$1(e,popupInheritProps)),{default:()=>[c(),u()]})}});function usePopupState(){const e=reactive({show:!1}),t=t=>{e.show=t},n=n=>{extend$2(e,n,{transitionAppear:!0}),t(!0)},i=()=>t(!1);return useExpose({open:n,close:i,toggle:t}),{open:n,close:i,state:e,toggle:t}}function mountComponent(e){const t=createApp(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}const defaultOptions$1={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let queue=[],allowMultiple=!1,currentOptions=extend$2({},defaultOptions$1);const defaultOptionsMap=new Map;function parseOptions(e){return isObject$3(e)?e:{message:e}}function createInstance(){const{instance:e,unmount:t}=mountComponent({setup(){const e=ref(""),{open:t,state:n,close:i,toggle:r}=usePopupState(),o=()=>{};return watch(e,(e=>{n.message=e})),getCurrentInstance().render=()=>createVNode(stdin_default$a,mergeProps(n,{onClosed:o,"onUpdate:show":r}),null),{open:t,close:i,message:e}}});return e}function getInstance(){if(!queue.length||allowMultiple){const e=createInstance();queue.push(e)}return queue[queue.length-1]}function showToast(e={}){if(!inBrowser$2)return{};const t=getInstance(),n=parseOptions(e);return t.open(extend$2({},currentOptions,defaultOptionsMap.get(n.type||currentOptions.type),n)),t}const createMethod=e=>t=>showToast(extend$2({type:e},parseOptions(t))),showLoadingToast=exports("Z",createMethod("loading")),closeToast=exports("$",(e=>{queue.length&&(e?(queue.forEach((e=>{e.close()})),queue=[]):queue[0].close())}));withInstall(stdin_default$a);const[name$6,bem$6]=createNamespace$1("empty"),emptyProps={image:makeStringProp("default"),imageSize:[Number,String,Array],description:String};var stdin_default$9=defineComponent({name:name$6,props:emptyProps,setup(e,{slots:t}){const n=()=>{const n=t.description?t.description():e.description;if(n)return createVNode("p",{class:bem$6("description")},[n])},i=()=>{if(t.default)return createVNode("div",{class:bem$6("bottom")},[t.default()])},r=useId(),o=e=>`${r}-${e}`,s=e=>`url(#${o(e)})`,a=(e,t,n)=>createVNode("stop",{"stop-color":e,offset:`${t}%`,"stop-opacity":n},null),l=(e,t)=>[a(e,0),a(t,100)],c=e=>[createVNode("defs",null,[createVNode("radialGradient",{id:o(e),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[a("#EBEDF0",0),a("#F2F3F5",100,.3)])]),createVNode("ellipse",{fill:s(e),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],u=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:o("a"),x1:"64%",y1:"100%",x2:"64%"},[a("#FFF",0,.5),a("#F2F3F5",100)])]),createVNode("g",{opacity:".8"},[createVNode("path",{d:"M36 131V53H16v20H2v58h34z",fill:s("a")},null),createVNode("path",{d:"M123 15h22v14h9v77h-31V15z",fill:s("a")},null)])],h=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:o("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[a("#F2F3F5",0,.3),a("#F2F3F5",100)])]),createVNode("g",{opacity:".8"},[createVNode("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:s("b")},null),createVNode("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:s("b")},null)])],d=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{id:o(1),x1:"64%",y1:"100%",x2:"64%"},[a("#FFF",0,.5),a("#F2F3F5",100)]),createVNode("linearGradient",{id:o(2),x1:"50%",x2:"50%",y2:"84%"},[a("#EBEDF0",0),a("#DCDEE0",100,0)]),createVNode("linearGradient",{id:o(3),x1:"100%",x2:"100%",y2:"100%"},[l("#EAEDF0","#DCDEE0")]),createVNode("radialGradient",{id:o(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[a("#EBEDF0",0),a("#FFF",100,0)])]),createVNode("g",{fill:"none"},[u(),createVNode("path",{fill:s(4),d:"M0 139h160v21H0z"},null),createVNode("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:s(2)},null),createVNode("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7"},[createVNode("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:s(3)},null),createVNode("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:s(3)},null),createVNode("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:s(3)},null),createVNode("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:s(3)},null)]),createVNode("g",{transform:"translate(31 105)"},[createVNode("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),createVNode("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),createVNode("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),p=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(5)},[l("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:o(6)},[l("#EAEDF1","#DCDEE0")]),createVNode("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:o(7)},[l("#EAEDF1","#DCDEE0")])]),u(),h(),createVNode("g",{transform:"translate(36 50)",fill:"none"},[createVNode("g",{transform:"translate(8)"},[createVNode("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),createVNode("rect",{fill:s(5),width:"64",height:"66",rx:"2"},null),createVNode("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),createVNode("g",{transform:"translate(15 17)",fill:s(6)},[createVNode("rect",{width:"34",height:"6",rx:"1"},null),createVNode("path",{d:"M0 14h34v6H0z"},null),createVNode("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),createVNode("rect",{fill:s(7),y:"61",width:"88",height:"28",rx:"1"},null),createVNode("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),f=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(8)},[l("#EAEDF1","#DCDEE0")])]),u(),h(),c("c"),createVNode("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:s(8)},null)]),m=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:o(9)},[l("#EEE","#D8D8D8")]),createVNode("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:o(10)},[l("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(11)},[l("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(12)},[l("#FFF","#F7F8FA")])]),u(),h(),c("d"),createVNode("g",{transform:"rotate(-45 113 -4)",fill:"none"},[createVNode("rect",{fill:s(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),createVNode("rect",{fill:s(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),createVNode("circle",{stroke:s(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),createVNode("circle",{fill:s(12),cx:"27",cy:"27",r:"16"},null),createVNode("path",{d:"M37 7c-8 0-15 5-16 12",stroke:s(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),g=()=>{var n;if(t.image)return t.image();const i={error:f,search:m,network:d,default:p};return(null==(n=i[e.image])?void 0:n.call(i))||createVNode("img",{src:e.image},null)};return()=>createVNode("div",{class:bem$6()},[createVNode("div",{class:bem$6("image"),style:getSizeStyle(e.imageSize)},[g()]),n(),i()])}});const Empty=withInstall(stdin_default$9),[name$5,bem$5]=createNamespace$1("nav-bar"),navBarProps={title:String,fixed:Boolean,zIndex:numericProp,border:truthProp,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:truthProp};var stdin_default$8=defineComponent({name:name$5,props:navBarProps,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:n}){const i=ref(),r=usePlaceholder(i,bem$5),o=e=>t("clickLeft",e),s=e=>t("clickRight",e),a=()=>{const{title:t,fixed:r,border:a,zIndex:l}=e,c=getZIndexStyle(l),u=e.leftArrow||e.leftText||n.left,h=e.rightText||n.right;return createVNode("div",{ref:i,style:c,class:[bem$5({fixed:r}),{[BORDER_BOTTOM]:a,"van-safe-area-top":e.safeAreaInsetTop}]},[createVNode("div",{class:bem$5("content")},[u&&createVNode("div",{class:[bem$5("left"),e.clickable?HAPTICS_FEEDBACK:""],onClick:o},[n.left?n.left():[e.leftArrow&&createVNode(Icon$1,{class:bem$5("arrow"),name:"arrow-left"},null),e.leftText&&createVNode("span",{class:bem$5("text")},[e.leftText])]]),createVNode("div",{class:[bem$5("title"),"van-ellipsis"]},[n.title?n.title():t]),h&&createVNode("div",{class:[bem$5("right"),e.clickable?HAPTICS_FEEDBACK:""],onClick:s},[n.right?n.right():createVNode("span",{class:bem$5("text")},[e.rightText])])])])};return()=>e.fixed&&e.placeholder?r(a):a()}});const NavBar=withInstall(stdin_default$8),[name$4,bem$4]=createNamespace$1("notice-bar"),noticeBarProps={text:String,mode:String,color:String,delay:makeNumericProp(1),speed:makeNumericProp(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var stdin_default$7=defineComponent({name:name$4,props:noticeBarProps,emits:["close","replay"],setup(e,{emit:t,slots:n}){let i,r=0,o=0;const s=ref(),a=ref(),l=reactive({show:!0,offset:0,duration:0}),c=n=>{"closeable"===e.mode&&(l.show=!1,t("close",n))},u=()=>{if(n["right-icon"])return n["right-icon"]();const t="closeable"===e.mode?"cross":"link"===e.mode?"arrow":void 0;return t?createVNode(Icon$1,{name:t,class:bem$4("right-icon"),onClick:c},null):void 0},h=()=>{l.offset=r,l.duration=0,raf((()=>{doubleRaf((()=>{l.offset=-o,l.duration=(o+r)/+e.speed,t("replay")}))}))},d=()=>{const t=!1===e.scrollable&&!e.wrapable,i={transform:l.offset?`translateX(${l.offset}px)`:"",transitionDuration:`${l.duration}s`};return createVNode("div",{ref:s,role:"marquee",class:bem$4("wrap")},[createVNode("div",{ref:a,style:i,class:[bem$4("content"),{"van-ellipsis":t}],onTransitionend:h},[n.default?n.default():e.text])])},p=()=>{const{delay:t,speed:n,scrollable:c}=e,u=isDef$1(t)?1e3*+t:0;r=0,o=0,l.offset=0,l.duration=0,clearTimeout(i),i=setTimeout((()=>{if(!s.value||!a.value||!1===c)return;const e=useRect(s).width,t=useRect(a).width;(c||t>e)&&doubleRaf((()=>{r=e,o=t,l.offset=-o,l.duration=o/+n}))}),u)};return onPopupReopen(p),onMountedOrActivated(p),useEventListener$1("pageshow",p),useExpose({reset:p}),watch((()=>[e.text,e.scrollable]),p),()=>{const{color:t,wrapable:i,background:r}=e;return withDirectives(createVNode("div",{role:"alert",class:bem$4({wrapable:i}),style:{color:t,background:r}},[n["left-icon"]?n["left-icon"]():e.leftIcon?createVNode(Icon$1,{class:bem$4("left-icon"),name:e.leftIcon},null):void 0,d(),u()]),[[vShow,l.show]])}}});const NoticeBar=exports("N",withInstall(stdin_default$7)),[name$3,bem$3]=createNamespace$1("skeleton-title"),skeletonTitleProps={round:Boolean,titleWidth:numericProp};var stdin_default$6=defineComponent({name:name$3,props:skeletonTitleProps,setup:e=>()=>createVNode("h3",{class:bem$3([{round:e.round}]),style:{width:addUnit(e.titleWidth)}},null)});const SkeletonTitle=withInstall(stdin_default$6);var stdin_default$5=SkeletonTitle;const[name$2,bem$2]=createNamespace$1("skeleton-avatar"),skeletonAvatarProps={avatarSize:numericProp,avatarShape:makeStringProp("round")};var stdin_default$4=defineComponent({name:name$2,props:skeletonAvatarProps,setup:e=>()=>createVNode("div",{class:bem$2([e.avatarShape]),style:getSizeStyle(e.avatarSize)},null)});const SkeletonAvatar=withInstall(stdin_default$4);var stdin_default$3=SkeletonAvatar;const DEFAULT_ROW_WIDTH="100%",skeletonParagraphProps={round:Boolean,rowWidth:{type:numericProp,default:DEFAULT_ROW_WIDTH}},[name$1,bem$1]=createNamespace$1("skeleton-paragraph");var stdin_default$2=defineComponent({name:name$1,props:skeletonParagraphProps,setup:e=>()=>createVNode("div",{class:bem$1([{round:e.round}]),style:{width:e.rowWidth}},null)});const SkeletonParagraph=withInstall(stdin_default$2);var stdin_default$1=SkeletonParagraph;const[name,bem]=createNamespace$1("skeleton"),DEFAULT_LAST_ROW_WIDTH="60%",skeletonProps={row:makeNumericProp(0),round:Boolean,title:Boolean,titleWidth:numericProp,avatar:Boolean,avatarSize:numericProp,avatarShape:makeStringProp("round"),loading:truthProp,animate:truthProp,rowWidth:{type:[Number,String,Array],default:DEFAULT_ROW_WIDTH}};var stdin_default=defineComponent({name:name,inheritAttrs:!1,props:skeletonProps,setup(e,{slots:t,attrs:n}){const i=()=>{if(e.avatar)return createVNode(stdin_default$3,{avatarShape:e.avatarShape,avatarSize:e.avatarSize},null)},r=()=>{if(e.title)return createVNode(stdin_default$5,{round:e.round,titleWidth:e.titleWidth},null)},o=t=>{const{rowWidth:n}=e;return n===DEFAULT_ROW_WIDTH&&t===+e.row-1?DEFAULT_LAST_ROW_WIDTH:Array.isArray(n)?n[t]:n};return()=>{var s;return e.loading?createVNode("div",mergeProps({class:bem({animate:e.animate,round:e.round})},n),[t.template?t.template():createVNode(Fragment,null,[i(),createVNode("div",{class:bem("content")},[r(),Array(+e.row).fill("").map(((t,n)=>createVNode(stdin_default$1,{key:n,round:e.round,rowWidth:addUnit(o(n))},null)))])])]):null==(s=t.default)?void 0:s.call(t)}}});const Skeleton=exports("ag",withInstall(stdin_default)),storeData=exports("h",reactive({status:"init",user:{},platformType:"STUDENT",platformApi:"/api-student",proxy:"",isApp:!1})),setStoreData=exports("ay",(e=>{Object.assign(storeData,e)})),setUserInfo=exports("i",(e=>{storeData.status="login",storeData.user=e||{}}));var commonjsGlobal=exports("bZ","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var assign$1=make_assign(),create$1=make_create(),trim$1=make_trim(),Global$5="undefined"!=typeof window?window:commonjsGlobal,util$i={assign:assign$1,create:create$1,trim:trim$1,bind:bind$3,slice:slice$3,each:each$8,map:map,pluck:pluck$1,isList:isList$1,isFunction:isFunction$2,isObject:isObject$2,Global:Global$5};function make_assign(){return Object.assign?Object.assign:function(e,t,n,i){for(var r=1;r=0;t--){var n=localStorage$1().key(t);e(read$5(n),n)}}function remove$6(e){return localStorage$1().removeItem(e)}function clearAll$5(){return localStorage$1().clear()}var util$f=util$i,Global$3=util$f.Global,oldFFGlobalStorage={name:"oldFF-globalStorage",read:read$4,write:write$4,each:each$5,remove:remove$5,clearAll:clearAll$4},globalStorage=Global$3.globalStorage;function read$4(e){return globalStorage[e]}function write$4(e,t){globalStorage[e]=t}function each$5(e){for(var t=globalStorage.length-1;t>=0;t--){var n=globalStorage.key(t);e(globalStorage[n],n)}}function remove$5(e){return globalStorage.removeItem(e)}function clearAll$4(){each$5((function(e,t){delete globalStorage[e]}))}var util$e=util$i,Global$2=util$e.Global,oldIEUserDataStorage={name:"oldIE-userDataStorage",write:write$3,read:read$3,each:each$4,remove:remove$4,clearAll:clearAll$3},storageName="storejs",doc$1=Global$2.document,_withStorageEl=_makeIEStorageElFunction(),disable$1=(Global$2.navigator?Global$2.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function write$3(e,t){if(!disable$1){var n=fixKey(e);_withStorageEl((function(e){e.setAttribute(n,t),e.save(storageName)}))}}function read$3(e){if(!disable$1){var t=fixKey(e),n=null;return _withStorageEl((function(e){n=e.getAttribute(t)})),n}}function each$4(e){_withStorageEl((function(t){for(var n=t.XMLDocument.documentElement.attributes,i=n.length-1;i>=0;i--){var r=n[i];e(t.getAttribute(r.name),r.name)}}))}function remove$4(e){var t=fixKey(e);_withStorageEl((function(e){e.removeAttribute(t),e.save(storageName)}))}function clearAll$3(){_withStorageEl((function(e){var t=e.XMLDocument.documentElement.attributes;e.load(storageName);for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save(storageName)}))}var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fixKey(e){return e.replace(/^\d/,"___$&").replace(forbiddenCharsRegex,"___")}function _makeIEStorageElFunction(){if(!doc$1||!doc$1.documentElement||!doc$1.documentElement.addBehavior)return null;var e,t,n,i="script";try{(t=new ActiveXObject("htmlfile")).open(),t.write("<"+i+">document.w=window'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(r){n=doc$1.createElement("div"),e=doc$1.body}return function(t){var i=[].slice.call(arguments,0);i.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load(storageName),t.apply(this,i),e.removeChild(n)}}var util$d=util$i,Global$1=util$d.Global,trim=util$d.trim,cookieStorage={name:"cookieStorage",read:read$2,write:write$2,each:each$3,remove:remove$3,clearAll:clearAll$2},doc=Global$1.document;function read$2(e){if(!e||!_has(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(doc.cookie.replace(new RegExp(t),"$1"))}function each$3(e){for(var t=doc.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(trim(t[n])){var i=t[n].split("="),r=unescape(i[0]);e(unescape(i[1]),r)}}function write$2(e,t){e&&(doc.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function remove$3(e){e&&_has(e)&&(doc.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function clearAll$2(){each$3((function(e,t){remove$3(t)}))}function _has(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(doc.cookie)}var util$c=util$i,Global=util$c.Global,sessionStorage_1={name:"sessionStorage",read:read$1,write:write$1,each:each$2,remove:remove$2,clearAll:clearAll$1};function sessionStorage$1(){return Global.sessionStorage}function read$1(e){return sessionStorage$1().getItem(e)}function write$1(e,t){return sessionStorage$1().setItem(e,t)}function each$2(e){for(var t=sessionStorage$1().length-1;t>=0;t--){var n=sessionStorage$1().key(t);e(read$1(n),n)}}function remove$2(e){return sessionStorage$1().removeItem(e)}function clearAll$1(){return sessionStorage$1().clear()}var memoryStorage_1={name:"memoryStorage",read:read,write:write,each:each$1,remove:remove$1,clearAll:clearAll},memoryStorage={};function read(e){return memoryStorage[e]}function write(e,t){memoryStorage[e]=t}function each$1(e){for(var t in memoryStorage)memoryStorage.hasOwnProperty(t)&&e(memoryStorage[t],t)}function remove$1(e){delete memoryStorage[e]}function clearAll(e){memoryStorage={}}var all=[localStorage_1,oldFFGlobalStorage,oldIEUserDataStorage,cookieStorage,sessionStorage_1,memoryStorage_1],json2$1={},hasRequiredJson2;function requireJson2(){return hasRequiredJson2||(hasRequiredJson2=1,"object"!=typeof JSON&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,i,r,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n{const e=navigator.userAgent;return{trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1==e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/Mac OS X/)||/(iPhone|iPad|iPod|iOS)/i.test(e),android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,iPhone:e.indexOf("ORCHESTRAAPPI")>-1,isApp:e.includes("DAYAAPPA")||e.includes("DAYAAPPI")||e.includes("COLEXIUAPPA")||e.includes("COLEXIUAPPI")||e.includes("ORCHESTRAAPPI")||e.includes("ORCHESTRAAPPA"),isTeacher:e.indexOf("ORCHESTRATEACHER")>-1||e.includes("COLEXIUTEACHER"),isStudent:e.indexOf("ORCHESTRASTUDENT")>-1||e.includes("COLEXIUSTUDENT"),isSchool:e.indexOf("ORCHESTRASCHOOL")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1==e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,alipay:e.indexOf("AlipayClient")>-1,huawei:!!e.match(/huawei/i)||!!e.match(/honor/i),xiaomi:!!e.match(/mi\s/i)||!!e.match(/redmi/i)||!!e.match(/mix/i)}})),getRandomKey=exports("j",(()=>""+Date.now()+Math.floor(1e6*Math.random()))),AuthorizationKey="AUTHORIZATION",setToken=exports("s",(e=>{sessionStorage.setItem(AuthorizationKey,e)})),getToken=exports("aO",(()=>sessionStorage.getItem(AuthorizationKey)||"")),setGlobalData=exports("ac",((e,t)=>{if(!e||!t)return;const n=window.GYM||{};n[e]=t,window.GYM=n})),BEHAVIORIDKEY="BEHAVIORID",setBehaviorId=exports("a",(e=>{localStorage.setItem(BEHAVIORIDKEY,e)})),getBehaviorId=exports("a0",(()=>localStorage.getItem(BEHAVIORIDKEY))),campIdKey="CAMPID",setCampId=exports("b",(e=>{sessionStorage.setItem(campIdKey,e)})),getCampId=exports("a1",(()=>sessionStorage.getItem(campIdKey)||"")),getSecondRPM=exports("aa",((e,t)=>{if(isNaN(e))return"00:00";let n=Math.floor(e/60/60%24),i=Math.floor(e/60%60),r=Math.floor(e%60);return"cn"===t?`${n>0?n.toString().padStart(2,"0")+"时":""}${i.toString().padStart(2,"0")}分${r.toString().padStart(2,"0")}秒`:`${n>0?n.toString().padStart(2,"0")+":":""}${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})),SPEEDKEY="speeds",setStorageSpeed=(e,t)=>{const n=store_legacy.get(SPEEDKEY)||{};n[e]=t,store_legacy.set(SPEEDKEY,n)},getStorageSpeed=exports("ar",(e=>(store_legacy.get(SPEEDKEY)||{})[e]||0)),originalPostMessage=window.postMessage;window.postMessage=e=>{originalPostMessage(e,"*")};const loop=()=>{},calls={},instance=window.DAYA||(null===(_window$webkit=window.webkit)||void 0===_window$webkit||null===(_window$webkit$messag=_window$webkit.messageHandlers)||void 0===_window$webkit$messag?void 0:_window$webkit$messag.DAYA)||window.COLEXIU||(null===(_window$webkit2=window.webkit)||void 0===_window$webkit2||null===(_window$webkit2$messa=_window$webkit2.messageHandlers)||void 0===_window$webkit2$messa?void 0:_window$webkit2$messa.COLEXIU)||window.ORCHESTRA||(null===(_window$webkit3=window.webkit)||void 0===_window$webkit3||null===(_window$webkit3$messa=_window$webkit3.messageHandlers)||void 0===_window$webkit3$messa?void 0:_window$webkit3$messa.ORCHESTRA);instance&&window.addEventListener("message",(e=>{try{var t,n;const r=e.data?"object"==typeof e.data?e.data:JSON.parse(e.data):{},o=(null===(t=r.content)||void 0===t?void 0:t.uuid)||r.uuid;try{r.content&&(r.content=JSON.parse(r.content))}catch(i){}if(!o){const e=Object.keys(calls).filter((e=>0===e.indexOf(r.api)));for(const t of e){const e=calls[t]||loop;"function"==typeof e&&e(r),Array.isArray(e)&&e.forEach((e=>{"function"==typeof e&&e(r)}))}return}const s=(null===(n=r.content)||void 0===n?void 0:n.uuid)||r.uuid||r.api+r.uuid,a=calls[s]||loop;"function"==typeof a&&a(r)}catch(i){console.error("通信消息解析错误",i)}}));const postMessage=exports("X",((e,t)=>{if(instance){const n=getRandomKey();calls[n]=t||loop,e.content=e.content?{...e.content,uuid:n}:{uuid:n},instance.postMessage(JSON.stringify(e)),console.log("h5_请求_api:",e)}})),listenerMessage=(e,t)=>{const n=e;calls[n]||(calls[n]=[]),calls[n].push(t||loop)},removeListenerMessage=(e,t)=>{const n=e;if(Array.isArray(calls[n])){const e=calls[n].indexOf(t);calls[n].splice(e,1)}},promisefiyPostMessage=exports("aM",(e=>new Promise((t=>{postMessage(e,(e=>t(e)))})))),api_getToken=exports("aY",(()=>storeData.isApp?promisefiyPostMessage({api:"getToken"}):Promise.resolve({}))),getEarphone=exports("b0",(()=>storeData.isApp?promisefiyPostMessage({api:"isWiredHeadsetOn"}):Promise.resolve({}))),isSpecialShapedScreen=exports("al",(()=>storeData.isApp?promisefiyPostMessage({api:"isSpecialShapedScreen"}):Promise.resolve({}))),sendResult=exports("a_",(e=>{listenerMessage("sendResult",e)})),removeResult=exports("a$",(e=>{removeListenerMessage("sendResult",e)})),endSoundCheck=()=>{postMessage({api:"endSoundCheck"})},startEvaluating=e=>storeData.isApp?promisefiyPostMessage({api:"startEvaluating",content:e}):Promise.resolve({}),endEvaluating=e=>storeData.isApp?promisefiyPostMessage({api:"endEvaluating",content:e}):Promise.resolve({}),cancelEvaluating=()=>{postMessage({api:"cancelEvaluating"})},api_startRecording=e=>storeData.isApp?promisefiyPostMessage({api:"startRecording",content:e}):Promise.resolve({}),api_stopRecording=()=>storeData.isApp?promisefiyPostMessage({api:"stopRecording"}):Promise.resolve({}),api_proxyServiceMessage=exports("E",(e=>storeData.isApp?promisefiyPostMessage({api:"proxyServiceMessage",content:e}):Promise.resolve({}))),api_recordStartTime=e=>{listenerMessage("recordStartTime",e)},api_remove_recordStartTime=e=>{removeListenerMessage("recordStartTime",e)},api_videoUpdate=exports("D",(e=>{postMessage({api:"videoUpdate"},e)})),api_shareAchievements=exports("u",(e=>storeData.isApp?promisefiyPostMessage({api:"shareAchievements",content:e}):Promise.resolve({}))),api_openWebView=exports("aS",(e=>storeData.isApp?promisefiyPostMessage({api:"openWebView",content:e}):Promise.resolve({}))),api_openCamera=exports("M",(()=>storeData.isApp?promisefiyPostMessage({api:"openCamera"}):Promise.resolve({}))),api_closeCamera=exports("O",(()=>storeData.isApp?promisefiyPostMessage({api:"closeCamera"}):Promise.resolve({}))),api_setStatusBarVisibility=exports("ad",(()=>{postMessage({api:"setStatusBarVisibility",content:{isVisibility:0}})})),api_cloudToggleFollow=e=>storeData.isApp?promisefiyPostMessage({api:"cloudToggleFollow",content:{state:e}}):Promise.resolve({}),api_cloudFollowTime=(e,t=!0)=>{t?listenerMessage("cloudFollowTime",e):removeListenerMessage("cloudFollowTime",e)},api_goback=exports("b2",(()=>{postMessage({api:"goBack"})})),api_back=exports("a8",(()=>{postMessage({api:"back"})})),api_cloudLoading=exports("at",((e=!1)=>{postMessage({api:"cloudLoading",content:{show:e,type:"fullscreen"}})})),api_cloudDestroy=exports("W",(()=>{postMessage({api:"cloudDestroy"})})),api_setEventTracking=exports("aI",(()=>{postMessage({api:"setEventTracking",content:{type:"klx_xiaokuAI"}})})),api_savePicture=exports("aA",(e=>storeData.isApp?promisefiyPostMessage({api:"savePicture",content:e}):Promise.resolve({}))),api_setCache=exports("aN",(e=>{postMessage({api:"setCache",content:e})})),api_suspendPlay=exports("aP",(e=>{listenerMessage("suspendPlay",e)})),api_startCapture=()=>{postMessage({api:"startCapture"})},api_endCapture=()=>{postMessage({api:"endCapture"})},api_getDeviceDelay=exports("b6",(()=>storeData.isApp?promisefiyPostMessage({api:"getDeviceDelay"}):Promise.resolve({}))),api_toggleTune=exports("b1",((e,t)=>storeData.isApp?"start"===e?promisefiyPostMessage({api:"startTune",content:{count:t+""}}):"stop"===e?promisefiyPostMessage({api:"endTune"}):"finishTune"===e?promisefiyPostMessage({api:"finishTune"}):void 0:Promise.resolve({}))),api_createMusicPlayer=e=>storeData.isApp?promisefiyPostMessage({api:"createMusicPlayer",content:e}):Promise.resolve({}),api_keepScreenLongLight=exports("bb",(()=>{postMessage({api:"keepScreenLongLight",content:{isOpenLight:!0}})})),api_setRequestedOrientation=exports("b8",(e=>{postMessage({api:"setRequestedOrientation",content:{orientation:e}})})),api_playProgress=e=>{listenerMessage("playProgress",e)},api_cloudAccompanyMessage=exports("bf",(e=>{postMessage({api:"cloudAccompanyMessage",content:{accompanyUrl:e}})})),api_openAdjustRecording=exports("b7",(e=>{postMessage({api:"openAdjustRecording",content:e})})),hideComplexButton=(e,t)=>{t?listenerMessage("hideComplexButton",e):removeListenerMessage("hideComplexButton",e)},TheError=exports("T",defineComponent({name:"The-error",setup:(e,t)=>()=>createVNode("div",null,[createVNode(NavBar,{leftArrow:!0,onClickLeft:()=>{api_back()}},null),createVNode(Empty,{image:"error",description:"网络开小差,请稍后重试"},{default:()=>[createVNode(Button,{type:"primary",size:"small",onClick:()=>history.go(0)},{default:()=>[createTextVNode("重新加载")]})]})])})),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(e,t){try{return[decodeURIComponent(e.join(""))]}catch(r){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),i=e.slice(t);return Array.prototype.concat.call([],decodeComponents(n),decodeComponents(i))}function decode$4(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(singleMatcher)||[];for(let i=1;inull==e,strictUriEncode=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),encodeFragmentIdentifier=Symbol("encodeFragmentIdentifier");function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return t=>(n,i)=>{const r=n.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[encode$1(t,e),"[",r,"]"].join("")]:[...n,[encode$1(t,e),"[",encode$1(r,e),"]=",encode$1(i,e)].join("")]};case"bracket":return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[encode$1(t,e),"[]"].join("")]:[...n,[encode$1(t,e),"[]=",encode$1(i,e)].join("")];case"colon-list-separator":return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[encode$1(t,e),":list="].join("")]:[...n,[encode$1(t,e),":list=",encode$1(i,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(i,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?i:(r=null===r?"":r,0===i.length?[[encode$1(n,e),t,encode$1(r,e)].join("")]:[[i,encode$1(r,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,encode$1(t,e)]:[...n,[encode$1(t,e),"=",encode$1(i,e)].join("")]}}function parserForArrayFormat(e){let t;switch(e.arrayFormat){case"index":return(e,n,i)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===i[e]&&(i[e]={}),i[e][t[1]]=n):i[e]=n};case"bracket":return(e,n,i)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==i[e]?i[e]=[...i[e],n]:i[e]=[n]:i[e]=n};case"colon-list-separator":return(e,n,i)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==i[e]?i[e]=[...i[e],n]:i[e]=[n]:i[e]=n};case"comma":case"separator":return(t,n,i)=>{const r="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!r&&decode$3(n,e).includes(e.arrayFormatSeparator);n=o?decode$3(n,e):n;const s=r||o?n.split(e.arrayFormatSeparator).map((t=>decode$3(t,e))):null===n?n:decode$3(n,e);i[t]=s};case"bracket-separator":return(t,n,i)=>{const r=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!r)return void(i[t]=n?decode$3(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>decode$3(t,e)));void 0!==i[t]?i[t]=[...i[t],...o]:i[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}function validateArrayFormatSeparator(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function encode$1(e,t){return t.encode?t.strict?strictUriEncode(e):encodeURIComponent(e):e}function decode$3(e,t){return t.decode?decodeUriComponent(e):e}function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function removeHash(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function getHash(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function parseValue(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function extract(e){const t=(e=removeHash(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function parse$5(e,t){validateArrayFormatSeparator((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const n=parserForArrayFormat(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const r of e.split("&")){if(""===r)continue;const e=t.decode?r.replace(/\+/g," "):r;let[o,s]=splitOnFirst(e,"=");void 0===o&&(o=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:decode$3(s,t),n(decode$3(o,t),s,i)}for(const[r,o]of Object.entries(i))if("object"==typeof o&&null!==o)for(const[e,n]of Object.entries(o))o[e]=parseValue(n,t);else i[r]=parseValue(o,t);return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=keysSorter(n):e[t]=n,e}),Object.create(null))}function stringify$2(e,t){if(!e)return"";validateArrayFormatSeparator((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&isNullOrUndefined(e[n])||t.skipEmptyString&&""===e[n],i=encoderForArrayFormat(t),r={};for(const[s,a]of Object.entries(e))n(s)||(r[s]=a);const o=Object.keys(r);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const r=e[n];return void 0===r?"":null===r?encode$1(n,t):Array.isArray(r)?0===r.length&&"bracket-separator"===t.arrayFormat?encode$1(n,t)+"[]":r.reduce(i(n),[]).join("&"):encode$1(n,t)+"="+encode$1(r,t)})).filter((e=>e.length>0)).join("&")}function parseUrl(e,t){var n,i,r;t={decode:!0,...t};let[o,s]=splitOnFirst(e,"#");return void 0===o&&(o=e),{url:null!==(n=null===(i=o)||void 0===i||null===(r=i.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:parse$5(extract(e),t),...t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:decode$3(s,t)}:{}}}function stringifyUrl(e,t){t={encode:!0,strict:!0,[encodeFragmentIdentifier]:!0,...t};const n=removeHash(e.url).split("?")[0]||"";let i=stringify$2({...parse$5(extract(e.url),{sort:!1}),...e.query},t);i&&(i=`?${i}`);let r=getHash(e.url);if(e.fragmentIdentifier){const i=new URL(n);i.hash=e.fragmentIdentifier,r=t[encodeFragmentIdentifier]?i.hash:`#${e.fragmentIdentifier}`}return`${n}${i}${r}`}function pick(e,t,n){n={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...n};const{url:i,query:r,fragmentIdentifier:o}=parseUrl(e,n);return stringifyUrl({url:i,query:includeKeys(r,t),fragmentIdentifier:o},n)}function exclude(e,t,n){return pick(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const queryString=Object.freeze(Object.defineProperty({__proto__:null,exclude:exclude,extract:extract,parse:parse$5,parseUrl:parseUrl,pick:pick,stringify:stringify$2,stringifyUrl:stringifyUrl},Symbol.toStringTag,{value:"Module"}));exports("t",queryString);const getQuery=exports("g",(()=>{let e={};try{e={...queryString.parse(location.search),...queryString.parse(location.hash.split("?")[1])}}catch(t){}return{...e}}));var shams=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0},origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=shams,hasSymbols$1=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice$1=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function(e){var t=this;if("function"!=typeof t||toStr$1.call(t)!==funcType)throw new TypeError(ERROR_MESSAGE+t);for(var n,i=slice$1.call(arguments,1),r=Math.max(0,t.length-i.length),o=[],s=0;s1&&"boolean"!=typeof t)throw new $TypeError$1('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,e))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=stringToPath(e),i=n.length>0?n[0]:"",r=getBaseIntrinsic("%"+i+"%",t),o=r.name,s=r.value,a=!1,l=r.alias;l&&(i=l[0],$spliceApply(n,$concat$1([0,1],l)));for(var c=1,u=!0;c=n.length){var f=$gOPD(s,h);s=(u=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:s[h]}else u=hasOwn$1(s,h),s=s[h];u&&!a&&(INTRINSICS[o]=s)}}return s},callBindExports={},callBind$1={get exports(){return callBindExports},set exports(e){callBindExports=e}};!function(t){var n=functionBind,i=getIntrinsic,r=i("%Function.prototype.apply%"),o=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(o,r),a=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}t.exports=function(e){var t=s(n,o,arguments);a&&l&&(a(t,"length").configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))}));return t};var u=function(){return s(n,r,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u}(callBind$1);var GetIntrinsic$1=getIntrinsic,callBind=callBindExports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function(e,t){var n=GetIntrinsic$1(e,!!t);return"function"==typeof n&&$indexOf(e,".prototype.")>-1?callBind(n):n};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);var hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap="function"==typeof WeakMap&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet="function"==typeof WeakSet&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef="function"==typeof WeakRef&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString$1=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,toStringTag="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||$test.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-$floor(-e):$floor(e);if(i!==e){var r=String(i),o=$slice.call(t,r.length+1);return $replace.call(r,n,"$&_")+"."+$replace.call($replace.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(t,n,"$&_")}var utilInspect=require$$0$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,objectInspect=function e(t,n,i,r){var o=n||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof s&&"symbol"!==s)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return a?addNumericSeparator(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return a?addNumericSeparator(t,c):c}var u=void 0===o.depth?5:o.depth;if(void 0===i&&(i=0),i>=u&&u>0&&"object"==typeof t)return isArray$6(t)?"[Array]":"[Object]";var h=getIndent(o,i);if(void 0===r)r=[];else if(indexOf$2(r,t)>=0)return"[Circular]";function d(t,n,s){if(n&&(r=$arrSlice.call(r)).push(n),s){var a={depth:o.depth};return has$3(o,"quoteStyle")&&(a.quoteStyle=o.quoteStyle),e(t,a,i+1,r)}return e(t,o,i+1,r)}if("function"==typeof t&&!isRegExp$1(t)){var p=nameOf(t),f=arrObjKeys(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(t)){var m=hasShammedSymbols?$replace.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?m:markBoxed(m)}if(isElement(t)){for(var g="<"+$toLowerCase.call(String(t.nodeName)),v=t.attributes||[],b=0;b"}if(isArray$6(t)){if(0===t.length)return"[]";var A=arrObjKeys(t,d);return h&&!singleLineValues(A)?"["+indentedJoin(A,h)+"]":"[ "+$join.call(A,", ")+" ]"}if(isError(t)){var y=arrObjKeys(t,d);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===y.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(y,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat.call("[cause]: "+d(t.cause),y),", ")+" }"}if("object"==typeof t&&s){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:u-i});if("symbol"!==s&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var S=[];return mapForEach&&mapForEach.call(t,(function(e,n){S.push(d(n,t,!0)+" => "+d(e,t))})),collectionOf("Map",mapSize.call(t),S,h)}if(isSet(t)){var x=[];return setForEach&&setForEach.call(t,(function(e){x.push(d(e,t))})),collectionOf("Set",setSize.call(t),x,h)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber$1(t))return markBoxed(d(Number(t)));if(isBigInt(t))return markBoxed(d(bigIntValueOf.call(t)));if(isBoolean$1(t))return markBoxed(booleanValueOf.call(t));if(isString$1(t))return markBoxed(d(String(t)));if(!isDate$1(t)&&!isRegExp$1(t)){var w=arrObjKeys(t,d),E=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",M=!E&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr(t),8,-1):_?"Object":"",P=(E||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(M||_?"["+$join.call($concat.call([],M||[],_||[]),": ")+"] ":"");return 0===w.length?P+"{}":h?P+"{"+indentedJoin(w,h)+"}":P+"{ "+$join.call(w,", ")+" }"}return String(t)};function wrapQuotes(e,t,n){var i="double"===(n.quoteStyle||t)?'"':"'";return i+e+i}function quote(e){return $replace.call(String(e),/"/g,""")}function isArray$6(e){return!("[object Array]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isDate$1(e){return!("[object Date]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isError(e){return!("[object Error]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isString$1(e){return!("[object String]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isNumber$1(e){return!("[object Number]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isBoolean$1(e){return!("[object Boolean]"!==toStr(e)||toStringTag&&"object"==typeof e&&toStringTag in e)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(e){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(e){}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return hasOwn.call(e,t)}function toStr(e){return objectToString$1.call(e)}function nameOf(e){if(e.name)return e.name;var t=$match.call(functionToString.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function indexOf$2(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return inspectString($slice.call(e,0,t.maxStringLength),t)+i}return wrapQuotes($replace.call($replace.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+$toUpperCase.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,n,i){return e+" ("+t+") {"+(i?indentedJoin(n,i):$join.call(n,", "))+"}"}function singleLineValues(e){for(var t=0;t=0)return!1;return!0}function getIndent(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=$join.call(Array(e.indent+1)," ")}return{base:n,prev:$join.call(Array(t+1),n)}}function indentedJoin(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+$join.call(e,","+n)+"\n"+t.prev}function arrObjKeys(e,t){var n=isArray$6(e),i=[];if(n){i.length=e.length;for(var r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(isArray$5(n)){for(var i=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===formats$2.RFC1738&&(40===l||41===l)?s+=o.charAt(a):l<128?s+=hexTable[l]:l<2048?s+=hexTable[192|l>>6]+hexTable[128|63&l]:l<55296||l>=57344?s+=hexTable[224|l>>12]+hexTable[128|l>>6&63]+hexTable[128|63&l]:(a+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(a)),s+=hexTable[240|l>>18]+hexTable[128|l>>12&63]+hexTable[128|l>>6&63]+hexTable[128|63&l])}return s},compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i0?v.join(",")||null:void 0}];else if(isArray$4(l))x=l;else{var E=Object.keys(v);x=c?E.sort(c):E}for(var _=r&&isArray$4(v)&&1===v.length?n+"[]":n,M=0;M0?p+d:""},utils$1=utils$3,has=Object.prototype.hasOwnProperty,isArray$3=Array.isArray,defaults={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:utils$1.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(e,t){var n,i={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,s=r.split(t.delimiter,o),a=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(u=isArray$3(u)?[u]:u),has.call(i,c)?i[c]=utils$1.combine(i[c],u):i[c]=u}return i},parseObject=function(e,t,n,i){for(var r=i?t:parseArrayValue(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if("[]"===a&&n.parseArrays)s=[].concat(r);else{s=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=r:"__proto__"!==l&&(s[l]=r):s={0:r}}r=s}return r},parseKeys=function(e,t,n,i){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(r),a=s?r.slice(0,s.index):r,l=[];if(a){if(!n.plainObjects&&has.call(Object.prototype,a)&&!n.allowPrototypes)return;l.push(a)}for(var c=0;n.depth>0&&null!==(s=o.exec(r))&&c-1};function normalizeName(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function normalizeValue(e){return"string"!=typeof e&&(e=String(e)),e}function iteratorFor(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return support.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Headers(e){this.map={},e instanceof Headers?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function consumed(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function fileReaderReady(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function readBlobAsArrayBuffer(e){var t=new FileReader,n=fileReaderReady(t);return t.readAsArrayBuffer(e),n}function readBlobAsText(e){var t=new FileReader,n=fileReaderReady(t);return t.readAsText(e),n}function readArrayBufferAsText(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i-1?t:e}function Request(e,t){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Request){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Headers(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Headers(t.headers)),this.method=normalizeMethod(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function decode$1(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function parseHeaders(e){var t=new Headers;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();t.append(i,r)}})),t}function Response(e,t){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Headers(t.headers),this.url=t.url||"",this._initBody(e)}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var e=new Response(null,{status:0,statusText:""});return e.type="error",e};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(e,t){if(-1===redirectStatuses.indexOf(t))throw new RangeError("Invalid status code");return new Response(null,{status:t,headers:{location:e}})};var DOMException=global$1.DOMException;try{new DOMException}catch(err){DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},DOMException.prototype=Object.create(Error.prototype),DOMException.prototype.constructor=DOMException}function fetch$2(t,n){return new Promise((function(i,r){var o=new Request(t,n);if(o.signal&&o.signal.aborted)return r(new DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:parseHeaders(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;setTimeout((function(){i(new Response(t,e))}),0)},s.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){r(new DOMException("Aborted","AbortError"))}),0)},s.open(o.method,function(t){try{return""===t&&global$1.location.href?global$1.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(support.blob?s.responseType="blob":support.arrayBuffer&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof Headers?o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){s.setRequestHeader(e,normalizeValue(n.headers[e]))})),o.signal&&(o.signal.addEventListener("abort",a),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",a)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread2(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{global:!1,core:!1,defaultInstance:!1},i=!1,r=!1,o=!1;"number"==typeof n?(process&&process.env,i=!0,r=!1):"object"===_typeof(n)&&n&&(r=n.global||!1,i=n.core||!1,o=n.defaultInstance||!1),r?e.globalMiddlewares.splice(e.globalMiddlewares.length-e.defaultGlobalMiddlewaresLength,0,t):i?e.coreMiddlewares.splice(e.coreMiddlewares.length-e.defaultCoreMiddlewaresLength,0,t):o?this.defaultMiddlewares.push(t):this.middlewares.push(t)}},{key:"execute",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return compose([].concat(_toConsumableArray(this.middlewares),_toConsumableArray(this.defaultMiddlewares),_toConsumableArray(e.globalMiddlewares),_toConsumableArray(e.coreMiddlewares)))(t)}}]),e}();Onion.globalMiddlewares=[],Onion.defaultGlobalMiddlewaresLength=0,Onion.coreMiddlewares=[],Onion.defaultCoreMiddlewaresLength=0;var MapCache=function(){function e(t){_classCallCheck(this,e),this.cache=new Map,this.timer={},this.extendOptions(t)}return _createClass(e,[{key:"extendOptions",value:function(e){this.maxCache=e.maxCache||0}},{key:"get",value:function(e){return this.cache.get(JSON.stringify(e))}},{key:"set",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e4;if(this.maxCache>0&&this.cache.size>=this.maxCache){var r=_toConsumableArray(this.cache.keys())[0];this.cache.delete(r),this.timer[r]&&clearTimeout(this.timer[r])}var o=JSON.stringify(e);this.cache.set(o,t),i>0&&(this.timer[o]=setTimeout((function(){n.cache.delete(o),delete n.timer[o]}),i))}},{key:"delete",value:function(e){var t=JSON.stringify(e);return delete this.timer[t],this.cache.delete(t)}},{key:"clear",value:function(){return this.timer={},this.cache.clear()}}]),e}(),RequestError=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"RequestError";return _classCallCheck(this,n),(r=t.call(this,e)).name="RequestError",r.request=i,r.type=o,r}return n}(_wrapNativeSuper(Error)),ResponseError=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,o){var s,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"ResponseError";return _classCallCheck(this,n),(s=t.call(this,i||e.statusText)).name="ResponseError",s.data=r,s.response=e,s.request=o,s.type=a,s}return n}(_wrapNativeSuper(Error));function readerGBK(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=n,i.readAsText(e,"GBK")}))}function safeJsonParse(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{return JSON.parse(t)}catch(e){if(n)throw new ResponseError(i,"JSON.parse fail",t,r,"ParseError")}return t}function timeout2Throw(e,t,n){return new Promise((function(i,r){setTimeout((function(){r(new RequestError(t||"timeout of ".concat(e,"ms exceeded"),n,"Timeout"))}),e)}))}function cancel2Throw(e){return new Promise((function(t,n){e.cancelToken&&e.cancelToken.promise.then((function(e){n(e)}))}))}var toString$2=Object.prototype.toString;function getEnv(){var e;return"undefined"!=typeof process&&"[object process]"===toString$2.call(process)&&(e="NODE"),"undefined"!=typeof XMLHttpRequest&&(e="BROWSER"),e}function isArray$2(e){return"object"===_typeof(e)&&"[object Array]"===Object.prototype.toString.call(e)}function isURLSearchParams(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function isDate(e){return"object"===_typeof(e)&&"[object Date]"===Object.prototype.toString.call(e)}function isObject(e){return null!==e&&"object"===_typeof(e)}function forEach2ObjArr(e,t){if(e)if("object"!==_typeof(e)&&(e=[e]),isArray$2(e))for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.prefix,i=t.suffix;return n&&(e="".concat(n).concat(e)),i&&(e="".concat(e).concat(i)),{url:e,options:t}},warnedCoreType=!1;function __defaultValidateCache(e,t){var n=t.method;return"get"===(void 0===n?"get":n).toLowerCase()}function fetchMiddleware(e,t){if(!e)return t();var n=e.req,i=(n=void 0===n?{}:n).options,r=void 0===i?{}:i,o=n.url,s=void 0===o?"":o,a=e.cache,l=e.responseInterceptors,c=r.timeout,u=void 0===c?0:c,h=r.timeoutMessage,d=r.__umiRequestCoreType__,p=void 0===d?"normal":d,f=r.useCache,m=void 0!==f&&f,g=r.method,v=void 0===g?"get":g,b=r.params,A=r.ttl,y=r.validateCache,S=void 0===y?__defaultValidateCache:y;if("normal"!==p)return process&&process.env,t();var x=fetch;if(!x)throw new Error("Global fetch not exist!");var w,E="BROWSER"===getEnv(),_=S(s,r)&&m&&E;if(_){var M=a.get({url:s,params:b,method:v});if(M)return(M=M.clone()).useCache=!0,e.res=M,t()}return w=u>0?Promise.race([cancel2Throw(r),x(s,r),timeout2Throw(u,h,e.req)]):Promise.race([cancel2Throw(r),x(s,r)]),l.forEach((function(e){w=w.then((function(t){var n="function"==typeof t.clone?t.clone():t;return e(n,r)}))})),w.then((function(n){if(_&&200===n.status){var i=n.clone();i.useCache=!0,a.set({url:s,params:b,method:v},i,A)}return e.res=n,t()}))}function parseResponseMiddleware(t,n){var i;return n().then((function(){if(t){var n=t.res,r=void 0===n?{}:n,o=t.req,s=void 0===o?{}:o,a=(s||{}).options,l=(a=void 0===a?{}:a).responseType,c=void 0===l?"json":l,u=a.charset,h=void 0===u?"utf8":u;a.getResponse;var d=a.throwErrIfParseFail,p=void 0!==d&&d,f=a.parseResponse;if((void 0===f||f)&&r&&r.clone){if((i="BROWSER"===getEnv()?r.clone():r).useCache=r.useCache||!1,"gbk"===h)try{return r.blob().then(readerGBK).then((function(e){return safeJsonParse(e,!1,i,s)}))}catch(e){throw new ResponseError(i,e.message,null,s,"ParseError")}else if("json"===c)return r.text().then((function(e){return safeJsonParse(e,p,i,s)}));try{return r[c]()}catch(e){throw new ResponseError(i,"responseType not support",null,s,"ParseError")}}}})).then((function(e){if(t){t.res;var n=t.req,r=void 0===n?{}:n,o=(r||{}).options,s=(o=void 0===o?{}:o).getResponse,a=void 0!==s&&s;if(i){if(i.status>=200&&i.status<300)return a?void(t.res={data:e,response:i}):void(t.res=e);throw new ResponseError(i,"http error",e,r,"HttpError")}}})).catch((function(e){if(e instanceof RequestError||e instanceof ResponseError)throw e;var n=t.req,i=t.res;throw e.request=e.request||n,e.response=e.response||i,e.type=e.type||e.name,e.data=e.data||void 0,e}))}function simplePostMiddleware(e,t){if(!e)return t();var n=e.req,i=(n=void 0===n?{}:n).options,r=void 0===i?{}:i,o=r.method;if(-1===["post","put","patch","delete"].indexOf((void 0===o?"get":o).toLowerCase()))return t();var s=r.requestType,a=void 0===s?"json":s,l=r.data;if(l){var c=Object.prototype.toString.call(l);"[object Object]"===c||"[object Array]"===c?"json"===a?(r.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/json;charset=UTF-8"},r.headers),r.body=JSON.stringify(l)):"form"===a&&(r.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},r.headers),r.body=reqStringify(l)):(r.headers=_objectSpread2({Accept:"application/json"},r.headers),r.body=l)}return e.req.options=r,t()}function paramsSerialize(e,t){var n,i;if(e)if(t)n=t(e);else if(isURLSearchParams(e))n=e.toString();else{if(isArray$2(e))i=[],forEach2ObjArr(e,(function(e){null==e?i.push(e):i.push(isObject(e)?JSON.stringify(e):e)})),n=reqStringify(i);else i={},forEach2ObjArr(e,(function(e,t){var n=e;null==e?i[t]=e:isDate(e)?n=e.toISOString():isArray$2(e)?n=e:isObject(e)&&(n=JSON.stringify(e)),i[t]=n})),n=reqStringify(i)}return n}function simpleGetMiddleware(e,t){if(!e)return t();var n=e.req,i=(n=void 0===n?{}:n).options,r=void 0===i?{}:i,o=r.paramsSerializer,s=r.params,a=e.req,l=(a=void 0===a?{}:a).url,c=void 0===l?"":l;r.method=r.method?r.method.toUpperCase():"GET",r.credentials=r.credentials||"same-origin";var u=paramsSerialize(s,o);if(e.req.originUrl=c,u){var h=-1!==c.indexOf("?")?"&":"?";e.req.url="".concat(c).concat(h).concat(u)}return e.req.options=r,t()}var globalMiddlewares=[simplePostMiddleware,simpleGetMiddleware,parseResponseMiddleware],coreMiddlewares=[fetchMiddleware];Onion.globalMiddlewares=globalMiddlewares,Onion.defaultGlobalMiddlewaresLength=globalMiddlewares.length,Onion.coreMiddlewares=coreMiddlewares,Onion.defaultCoreMiddlewaresLength=coreMiddlewares.length;var Core=function(){function t(e){_classCallCheck(this,t),this.onion=new Onion([]),this.fetchIndex=0,this.mapCache=new MapCache(e),this.initOptions=e,this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[]}return _createClass(t,[{key:"use",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!1,core:!1};return this.onion.use(e,t),this}},{key:"extendOptions",value:function(e){this.initOptions=mergeRequestOptions(this.initOptions,e),this.mapCache.extendOptions(e)}},{key:"dealRequestInterceptors",value:function(e){return[].concat(_toConsumableArray(t.requestInterceptors),_toConsumableArray(this.instanceRequestInterceptors)).reduce((function(t,n){return t.then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.req.url=t.url||e.req.url,e.req.options=t.options||e.req.options,n(e.req.url,e.req.options)}))}),Promise.resolve()).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.req.url=t.url||e.req.url,e.req.options=t.options||e.req.options,Promise.resolve()}))}},{key:"request",value:function(n,i){var r=this,o=this.onion,s={req:{url:n,options:_objectSpread2(_objectSpread2({},i),{},{url:n})},res:null,cache:this.mapCache,responseInterceptors:[].concat(_toConsumableArray(t.responseInterceptors),_toConsumableArray(this.instanceResponseInterceptors))};if("string"!=typeof n)throw new Error("url MUST be a string");return new Promise((function(t,n){r.dealRequestInterceptors(s).then((function(){return o.execute(s)})).then((function(){t(s.res)})).catch((function(i){var r=s.req.options.errorHandler;if(r)try{var o=r(i);t(o)}catch(e){n(e)}else n(i)}))}))}}],[{key:"requestUse",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!0};if("function"!=typeof e)throw new TypeError("Interceptor must be function!");n.global?t.requestInterceptors.push(e):this.instanceRequestInterceptors.push(e)}},{key:"responseUse",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!0};if("function"!=typeof e)throw new TypeError("Interceptor must be function!");n.global?t.responseInterceptors.push(e):this.instanceResponseInterceptors.push(e)}}]),t}();function Cancel(e){this.message=e}function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new Cancel(e),t(n.reason))}))}function isCancel(e){return!(!e||!e.__CANCEL__)}Core.requestInterceptors=[addfix],Core.responseInterceptors=[],Cancel.prototype.toString=function(){return this.message?"Cancel: ".concat(this.message):"Cancel"},Cancel.prototype.__CANCEL__=!0,CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var e;return{token:new CancelToken((function(t){e=t})),cancel:e}};var request$1=function(){var e=new Core(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),t=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=mergeRequestOptions(e.initOptions,n);return e.request(t,i)};t.use=e.use.bind(e),t.fetchIndex=e.fetchIndex,t.interceptors={request:{use:Core.requestUse.bind(e)},response:{use:Core.responseUse.bind(e)}};return["get","post","delete","put","patch","head","options","rpc"].forEach((function(e){t[e]=function(n,i){return t(n,_objectSpread2(_objectSpread2({},i),{},{method:e}))}})),t.Cancel=Cancel,t.CancelToken=CancelToken,t.isCancel=isCancel,t.extendOptions=e.extendOptions.bind(e),t.middlewares={instance:e.onion.middlewares,defaultInstance:e.onion.defaultMiddlewares,global:Onion.globalMiddlewares,core:Onion.coreMiddlewares},t},extend$1=function(e){return request$1(e)};request$1({parseResponse:!1});var request$1$1=exports("_",request$1({})),lodash_isemptyExports={},lodash_isempty={get exports(){return lodash_isemptyExports},set exports(e){lodash_isemptyExports=e}};!function(t,n){var i=9007199254740991,r="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",a="[object Map]",l="[object Promise]",c="[object Set]",u="[object WeakMap]",h="[object DataView]",d=/^\[object .+?Constructor\]$/,p="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,f="object"==typeof self&&self&&self.Object===Object&&self,m=p||f||Function("return this")(),g=n&&!n.nodeType&&n,v=g&&t&&!t.nodeType&&t,b=v&&v.exports===g;var A=Function.prototype,y=Object.prototype,S=m["__core-js_shared__"],x=function(){var e=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),w=A.toString,E=y.hasOwnProperty,_=y.toString,M=RegExp("^"+w.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=b?m.Buffer:void 0,T=y.propertyIsEnumerable,C=P?P.isBuffer:void 0,I=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),k=H(m,"DataView"),B=H(m,"Map"),R=H(m,"Promise"),L=H(m,"Set"),N=H(m,"WeakMap"),D=!T.call({valueOf:1},"valueOf"),F=Q(k),O=Q(B),V=Q(R),z=Q(L),G=Q(N);function U(t){if(!J(t)||(n=t,x&&x in n))return!1;var n,i=$(t)||function(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}(t)?M:d;return i.test(Q(t))}function H(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return U(n)?n:void 0}var j=function(e){return _.call(e)};function Q(t){if(null!=t){try{return w.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Y(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&E.call(e,"callee")&&(!T.call(e,"callee")||_.call(e)==r)}(k&&j(new k(new ArrayBuffer(1)))!=h||B&&j(new B)!=a||R&&j(R.resolve())!=l||L&&j(new L)!=c||N&&j(new N)!=u)&&(j=function(e){var t=_.call(e),n="[object Object]"==t?e.constructor:void 0,i=n?Q(n):void 0;if(i)switch(i){case F:return h;case O:return a;case V:return l;case z:return c;case G:return u}return t});var W=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!$(e)}var K=C||function(){return!1};function $(e){var t=J(e)?_.call(e):"";return t==o||t==s}function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=function(e){if(X(e)&&(W(e)||"string"==typeof e||"function"==typeof e.splice||K(e)||Y(e)))return!e.length;var t=j(e);if(t==a||t==c)return!e.size;if(D||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||y)}(e))return!I(e).length;for(var n in e)if(E.call(e,n))return!1;return!0}}(lodash_isempty,lodash_isemptyExports);var objectTag="[object Object]";function isHostObject(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}function overArg(e,t){return function(n){return e(t(n))}}var funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object),objectToString=objectProto.toString,getPrototype=overArg(Object.getPrototypeOf,Object);function isObjectLike(e){return!!e&&"object"==typeof e}function isPlainObject$2(e){if(!isObjectLike(e)||objectToString.call(e)!=objectTag||isHostObject(e))return!1;var t=getPrototype(e);if(null===t)return!0;var n=hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&funcToString.call(n)==objectCtorString}var lodash_isplainobject=isPlainObject$2,lodash_transformExports={},lodash_transform={get exports(){return lodash_transformExports},set exports(e){lodash_transformExports=e}};!function(t,n){var i="__lodash_hash_undefined__",r=1,o=2,s=1/0,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",b="[object Promise]",A="[object RegExp]",y="[object Set]",S="[object String]",x="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",_="[object DataView]",M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/,T=/^\./,C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,I=/\\(\\)?/g,k=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[l]=R[c]=R[E]=R[u]=R[_]=R[h]=R[d]=R[p]=R[m]=R[g]=R[v]=R[A]=R[y]=R[S]=R[w]=!1;var L="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,N="object"==typeof self&&self&&self.Object===Object&&self,D=L||N||Function("return this")(),F=n&&!n.nodeType&&n,O=F&&t&&!t.nodeType&&t,V=O&&O.exports===F&&L.process,z=function(){try{return V&&V.binding("util")}catch(e){}}(),G=z&&z.isTypedArray;function U(e,t){for(var n=-1,i=e?e.length:0;++n-1},_e.prototype.set=function(e,t){var n=this.__data__,i=Ie(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Me.prototype.clear=function(){this.__data__={hash:new Ee,map:new(he||_e),string:new Ee}},Me.prototype.delete=function(e){return Ue(this,e).delete(e)},Me.prototype.get=function(e){return Ue(this,e).get(e)},Me.prototype.has=function(e){return Ue(this,e).has(e)},Me.prototype.set=function(e,t){return Ue(this,e).set(e,t),this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,i),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new _e},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _e){var i=n.__data__;if(!he||i.length<199)return i.push([e,t]),this;n=this.__data__=new Me(i)}return n.set(e,t),this};var ke,Be=function(e,t,n){for(var i=-1,r=Object(e),o=n(e),s=o.length;s--;){var a=o[ke?s:++i];if(!1===t(r[a],a,r))break}return e};function Re(e,t){return e&&Be(e,t,ut)}function Le(e,t){for(var n=0,i=(t=Ye(t,e)?[t]:ze(t)).length;null!=e&&nc))return!1;var h=a.get(e);if(h&&a.get(t))return h==t;var d=-1,p=!0,f=s&r?new Pe:void 0;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=a}function ot(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function st(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||st(e)&&te.call(e)==x}var lt,ct=G?(lt=G,function(e){return lt(e)}):function(e){return st(e)&&rt(e.length)&&!!R[te.call(e)]};function ut(e){return nt(e)?Ce(e):Ve(e)}function ht(e){return e}t.exports=function(e,t,n){var i,r=tt(e)||ct(e);if(t=Oe(t),null==n)if(r||ot(e)){var o=e.constructor;n=r?tt(e)?new o:[]:it(o)?ot(i=oe(e))?se(i):{}:{}}else n={};return(r?U:Re)(e,(function(e,i,r){return t(n,e,i,r)})),n}}(lodash_transform,lodash_transformExports);const isEmpty$1=lodash_isemptyExports,isPlainObject$1=lodash_isplainobject,transform=lodash_transformExports;var src=function e(t,{cleanKeys:n=[],cleanValues:i=[],emptyArrays:r=!0,emptyObjects:o=!0,emptyStrings:s=!0,NaNValues:a=!1,nullValues:l=!0,undefinedValues:c=!0}={}){return transform(t,((t,u,h)=>{if(!n.includes(h)&&((Array.isArray(u)||isPlainObject$1(u))&&(u=e(u,{NaNValues:a,cleanKeys:n,cleanValues:i,emptyArrays:r,emptyObjects:o,emptyStrings:s,nullValues:l,undefinedValues:c})),!i.includes(u)&&!(o&&isPlainObject$1(u)&&isEmpty$1(u))&&(!r||!Array.isArray(u)||u.length)&&!(s&&""===u||a&&Number.isNaN(u)||l&&null===u||c&&void 0===u)))return Array.isArray(t)?t.push(u):void(t[h]=u)}))};const whiteUrl=()=>({"/sysMusicScoreCategories/queryTree":"/eduMusicScore/queryTree","/sysMusicScoreAccompaniment/queryPage":queryString.parse(location.search).platform?"/sysMusicScoreAccompaniment/queryPage":"/eduMusicScore/queryPage","/sysMusicScoreAccompaniment/queryPageLimit":"/eduMusicScore/queryPageLimit","/sysMusicScoreAccompaniment/querySubjectIds":"/eduMusicScore/querySubjectIds"}),apiRouter=whiteUrl();browser();const request=exports("r",extend$1({requestType:"form",timeout:1e4}));request.interceptors.request.use(((e,t)=>{const n=storeData.proxy+storeData.platformApi;"WEB"===storeData.platformType&&apiRouter[e]&&(e=apiRouter[e]);const i=getToken(),r={};return i&&(r.Authorization=i),{url:n+e,options:{...t,params:src(t.params),data:src(t.data),headers:{...t.headers,...r}}}}),{global:!1}),request.interceptors.response.use((async(e,t)=>{if(e.status>299||e.status<200){showToast(e.statusText+", 状态码"+e.status)}const n=await e.clone().json();if(5e3===n.code)return n;if(200!==n.code&&0!==n.errCode){const e=n.msg||n.message||"处理失败,请重试";throw 403!==n.code&&n.code,new Error(e)}return n}),{global:!1});var dayjs_minExports={},dayjs_min={get exports(){return dayjs_minExports},set exports(e){dayjs_minExports=e}};!function(e,t){e.exports=function(){var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",o="minute",s="hour",a="day",l="week",c="month",u="quarter",h="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function e(t,n){if(t.date()1)return e(s[0])}else{var a=t.name;y[a]=t,r=a}return!i&&r&&(A=r),r||!i&&A},w=function(e,t){if(S(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new _(n)},E=b;E.l=x,E.i=S,E.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e)}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(f);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return w(e)=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,n.ctx.currentTime);for(var i=0;i=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,u()),e},codecs:function(e){return(this||n)._codecs[e.replace(/^x-/,"")]},_setup:function(){var t=this||n;if(t.state=t.ctx&&t.ctx.state||"suspended",t._autoSuspend(),!t.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(t._canPlayEvent="canplay")}catch(e){t.noAudio=!0}else t.noAudio=!0;try{(new Audio).muted&&(t.noAudio=!0)}catch(e){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var e=this||n,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(err){return e}if(!t||"function"!=typeof t.canPlayType)return e;var i=t.canPlayType("audio/mpeg;").replace(/^no$/,""),r=e._navigator?e._navigator.userAgent:"",o=r.match(/OPR\/([0-6].)/g),s=o&&parseInt(o[0].split("/")[1],10)<33,a=-1!==r.indexOf("Safari")&&-1===r.indexOf("Chrome"),l=r.match(/Version\/(.*?) /),c=a&&l&&parseInt(l[1],10)<15;return e._codecs={mp3:!(s||!i&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!i,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(c||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(c||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||n;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length0?a._seek:i._sprite[e][0]/1e3),u=Math.max(0,(i._sprite[e][0]+i._sprite[e][1])/1e3-c),h=1e3*u/Math.abs(a._rate),d=i._sprite[e][0]/1e3,p=(i._sprite[e][0]+i._sprite[e][1])/1e3;a._sprite=e,a._ended=!1;var f=function(){a._paused=!1,a._seek=c,a._start=d,a._stop=p,a._loop=!(!a._loop&&!i._sprite[e][2])};if(!(c>=p)){var m=a._node;if(i._webAudio){var g=function(){i._playLock=!1,f(),i._refreshBuffer(a);var e=a._muted||i._muted?0:a._volume;m.gain.setValueAtTime(e,n.ctx.currentTime),a._playStart=n.ctx.currentTime,void 0===m.bufferSource.start?a._loop?m.bufferSource.noteGrainOn(0,c,86400):m.bufferSource.noteGrainOn(0,c,u):a._loop?m.bufferSource.start(0,c,86400):m.bufferSource.start(0,c,u),h!==1/0&&(i._endTimers[a._id]=setTimeout(i._ended.bind(i,a),h)),t||setTimeout((function(){i._emit("play",a._id),i._loadQueue()}),0)};"running"===n.state&&"interrupted"!==n.ctx.state?g():(i._playLock=!0,i.once("resume",g),i._clearTimer(a._id))}else{var v=function(){m.currentTime=c,m.muted=a._muted||i._muted||n._muted||m.muted,m.volume=a._volume*n.volume(),m.playbackRate=a._rate;try{var r=m.play();if(r&&"undefined"!=typeof Promise&&(r instanceof Promise||"function"==typeof r.then)?(i._playLock=!0,f(),r.then((function(){i._playLock=!1,m._unlocked=!0,t?i._loadQueue():i._emit("play",a._id)})).catch((function(){i._playLock=!1,i._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),a._ended=!0,a._paused=!0}))):t||(i._playLock=!1,f(),i._emit("play",a._id)),m.playbackRate=a._rate,m.paused)return void i._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||a._loop?i._endTimers[a._id]=setTimeout(i._ended.bind(i,a),h):(i._endTimers[a._id]=function(){i._ended(a),m.removeEventListener("ended",i._endTimers[a._id],!1)},m.addEventListener("ended",i._endTimers[a._id],!1))}catch(err){i._emit("playerror",a._id,err)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===m.src&&(m.src=i._src,m.load());var b=window&&window.ejecta||!m.readyState&&n._navigator.isCocoonJS;if(m.readyState>=3||b)v();else{i._playLock=!0,i._state="loading";var A=function(){i._state="loaded",v(),m.removeEventListener(n._canPlayEvent,A,!1)};m.addEventListener(n._canPlayEvent,A,!1),i._clearTimer(a._id)}}return a._id}i._ended(a)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),i=0;i=0?t=parseInt(o[0],10):e=parseFloat(o[0]):o.length>=2&&(e=parseFloat(o[0]),t=parseInt(o[1],10)),!(void 0!==e&&e>=0&&e<=1))return(i=t?r._soundById(t):r._sounds[0])?i._volume:0;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"volume",action:function(){r.volume.apply(r,o)}}),r;void 0===t&&(r._volume=e),t=r._getSoundIds(t);for(var s=0;s0?i/c:i),h=Date.now();e._fadeTo=n,e._interval=setInterval((function(){var r=(Date.now()-h)/i;h=Date.now(),a+=l*r,a=Math.round(100*a)/100,a=l<0?Math.max(n,a):Math.min(n,a),s._webAudio?e._volume=a:s.volume(a,e._id,!0),o&&(s._volume=a),(nt&&a>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,s.volume(n,e._id),s._emit("fade",e._id))}),u)},_stopFade:function(e){var t=this,i=t._soundById(e);return i&&i._interval&&(t._webAudio&&i._node.gain.cancelScheduledValues(n.ctx.currentTime),clearInterval(i._interval),i._interval=null,t.volume(i._fadeTo,e),i._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,n,i=this,r=arguments;if(0===r.length)return i._loop;if(1===r.length){if("boolean"!=typeof r[0])return!!(n=i._soundById(parseInt(r[0],10)))&&n._loop;e=r[0],i._loop=e}else 2===r.length&&(e=r[0],t=parseInt(r[1],10));for(var o=i._getSoundIds(t),s=0;s=0?t=parseInt(o[0],10):e=parseFloat(o[0]):2===o.length&&(e=parseFloat(o[0]),t=parseInt(o[1],10)),"number"!=typeof e)return(i=r._soundById(t))?i._rate:r._rate;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"rate",action:function(){r.rate.apply(r,o)}}),r;void 0===t&&(r._rate=e),t=r._getSoundIds(t);for(var s=0;s=0?t=parseInt(r[0],10):i._sounds.length&&(t=i._sounds[0]._id,e=parseFloat(r[0])):2===r.length&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),void 0===t)return 0;if("number"==typeof e&&("loaded"!==i._state||i._playLock))return i._queue.push({event:"seek",action:function(){i.seek.apply(i,r)}}),i;var o=i._soundById(t);if(o){if(!("number"==typeof e&&e>=0)){if(i._webAudio){var s=i.playing(t)?n.ctx.currentTime-o._playStart:0,a=o._rateSeek?o._rateSeek-o._seek:0;return o._seek+(a+s*Math.abs(o._rate))}return o._node.currentTime}var l=i.playing(t);l&&i.pause(t,!0),o._seek=e,o._ended=!1,i._clearTimer(t),i._webAudio||!o._node||isNaN(o._node.duration)||(o._node.currentTime=e);var c=function(){l&&i.play(t,!0),i._emit("seek",t)};if(l&&!i._webAudio){var u=function(){i._playLock?setTimeout(u,0):c()};setTimeout(u,0)}else c()}return i},playing:function(e){var t=this;if("number"==typeof e){var n=t._soundById(e);return!!n&&!n._paused}for(var i=0;i=0&&n._howls.splice(r,1);var s=!0;for(i=0;i=0){s=!1;break}return o&&s&&delete o[e._src],n.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,i){var r=this["_on"+e];return"function"==typeof t&&r.push(i?{id:n,fn:t,once:i}:{id:n,fn:t}),this},off:function(e,t,n){var i=this,r=i["_on"+e],o=0;if("number"==typeof t&&(n=t,t=null),t||n)for(o=0;o=0;o--)r[o].id&&r[o].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,n)}.bind(i,r[o].fn),0),r[o].once&&i.off(e,r[o].fn,r[o].id));return i._loadQueue(e),i},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action()}return t},_ended:function(e){var t=this,i=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;i--){if(n<=t)return;e._sounds[i]._ended&&(e._webAudio&&e._sounds[i]._node&&e._sounds[i]._node.disconnect(0),e._sounds.splice(i,1),n--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],n=0;n=0;if(n._scratchBuffer&&t.bufferSource&&(t.bufferSource.onended=null,t.bufferSource.disconnect(0),i))try{t.bufferSource.buffer=n._scratchBuffer}catch(e){}return t.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(n._navigator&&n._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var r=function(e){this._parent=e,this.init()};r.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++n._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,i=n._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===n.ctx.createGain?n.ctx.createGainNode():n.ctx.createGain(),e._node.gain.setValueAtTime(i,n.ctx.currentTime),e._node.paused=!0,e._node.connect(n.masterGain)):n.noAudio||(e._node=n._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(n._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=!0===t._preload?"auto":t._preload,e._node.volume=i*n.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++n._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(n._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var o={},s=function(e){var t=e._src;if(o[t])return e._duration=o[t].duration,void c(e);if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),i=new Uint8Array(n.length),r=0;r0?(o[t._src]=e,c(t,e)):i()};"undefined"!=typeof Promise&&1===n.ctx.decodeAudioData.length?n.ctx.decodeAudioData(e).then(r).catch(i):n.ctx.decodeAudioData(e,r,i)},c=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},u=function(){if(n.usingWebAudio){try{"undefined"!=typeof AudioContext?n.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?n.ctx=new webkitAudioContext:n.usingWebAudio=!1}catch(e){n.usingWebAudio=!1}n.ctx||(n.usingWebAudio=!1);var t=/iP(hone|od|ad)/.test(n._navigator&&n._navigator.platform),i=n._navigator&&n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),r=i?parseInt(i[1],10):null;if(t&&r&&r<9){var o=/safari/.test(n._navigator&&n._navigator.userAgent.toLowerCase());n._navigator&&!o&&(n.usingWebAudio=!1)}n.usingWebAudio&&(n.masterGain=void 0===n.ctx.createGain?n.ctx.createGainNode():n.ctx.createGain(),n.masterGain.gain.setValueAtTime(n._muted?0:n._volume,n.ctx.currentTime),n.masterGain.connect(n.ctx.destination)),n._setup()}};exports$1.Howler=n,exports$1.Howl=i,void 0!==commonjsGlobal?(commonjsGlobal.HowlerGlobal=t,commonjsGlobal.Howler=n,commonjsGlobal.Howl=i,commonjsGlobal.Sound=r):"undefined"!=typeof window&&(window.HowlerGlobal=t,window.Howler=n,window.Howl=i,window.Sound=r)}(), /*! * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. * * howler.js v2.2.3 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */ function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var n=t._howls.length-1;n>=0;n--)t._howls[n].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,n){var i=this;return i.ctx&&i.ctx.listener?(t="number"!=typeof t?i._pos[1]:t,n="number"!=typeof n?i._pos[2]:n,"number"!=typeof e?i._pos:(i._pos=[e,t,n],void 0!==i.ctx.listener.positionX?(i.ctx.listener.positionX.setTargetAtTime(i._pos[0],Howler.ctx.currentTime,.1),i.ctx.listener.positionY.setTargetAtTime(i._pos[1],Howler.ctx.currentTime,.1),i.ctx.listener.positionZ.setTargetAtTime(i._pos[2],Howler.ctx.currentTime,.1)):i.ctx.listener.setPosition(i._pos[0],i._pos[1],i._pos[2]),i)):i},HowlerGlobal.prototype.orientation=function(e,t,n,i,r,o){var s=this;if(!s.ctx||!s.ctx.listener)return s;var a=s._orientation;return t="number"!=typeof t?a[1]:t,n="number"!=typeof n?a[2]:n,i="number"!=typeof i?a[3]:i,r="number"!=typeof r?a[4]:r,o="number"!=typeof o?a[5]:o,"number"!=typeof e?a:(s._orientation=[e,t,n,i,r,o],void 0!==s.ctx.listener.forwardX?(s.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),s.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),s.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),s.ctx.listener.upX.setTargetAtTime(i,Howler.ctx.currentTime,.1),s.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),s.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):s.ctx.listener.setOrientation(e,t,n,i,r,o),s)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var n=this;return n._orientation=t.orientation||[1,0,0],n._stereo=t.stereo||null,n._pos=t.pos||null,n._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},n._onstereo=t.onstereo?[{fn:t.onstereo}]:[],n._onpos=t.onpos?[{fn:t.onpos}]:[],n._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,n){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"stereo",action:function(){i.stereo(e,n)}}),i;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof e)return i._stereo;i._stereo=e,i._pos=[e,0,0]}for(var o=i._getSoundIds(n),s=0;smetronomeData.cursorMode),(()=>{const e=document.querySelector("#cursorImg-0");if(e){switch(metronomeData.cursorMode){case 1:e.classList.remove("lineHide"),e.style.opacity="inherit",metronomeData.cursorTips="您已切换到指针跟随音符播放",e.style.opacity="inherit";break;case 2:e.classList.add("lineHide"),e.style.opacity="inherit",metronomeData.cursorTips="您已切换到指针跟随节拍播放";break;case 3:e.style.opacity="0",metronomeData.cursorTips="您已关闭指针显示"}hideCursorTip()}}));const toggleLine=()=>{if(!metronomeData.lineShow)return;const e=document.querySelector("#cursorImg-0");e&&(state$1.times[state$1.activeNoteIndex].multipleRestMeasures?e.classList.remove("lineHide"):e.classList.add("lineHide"))};watch((()=>metronomeData.lineShow),(()=>{const e=document.querySelector("#cursorImg-0");e&&(metronomeData.lineShow?e.classList.add("lineHide"):e.classList.remove("lineHide"))}));class Metronome{constructor(e){_defineProperty2(this,"playType","tick"),_defineProperty2(this,"source",null),_defineProperty2(this,"source1",null),_defineProperty2(this,"source2",null),_defineProperty2(this,"sound",(e=>{state$1.sectionStatus||(e=setCurrentTime(e));let t=-1,n=-1;for(let i=0;i=r))break;t=i,n=r}if(t>-1&&metronomeData.activeIndex!==t)return metronomeData.activeIndex=t,metronomeData.activeMetro=this.getStep(n),this.playAudio(),void(metronomeData.isClick=!1);toggleLine(),metronomeData.isClick=!1})),_defineProperty2(this,"playAudio",(()=>{var e;metronomeData.initPlayerState&&(this.source=0===(null===(e=metronomeData.activeMetro)||void 0===e?void 0:e.index)?this.source1:this.source2,this.source.volume(metronomeData.disable||"paused"===state$1.playState?0:.4),this.source.play())})),_defineProperty2(this,"loadAudio1",(()=>new howler.Howl({src:tockAndTick.tick}))),_defineProperty2(this,"loadAudio2",(()=>new howler.Howl({src:tockAndTick.tock})))}init(e){this.calculation(e),metronomeData.activeList=[]}initPlayer(){this.source1||(this.source1=this.loadAudio1()),this.source2||(this.source2=this.loadAudio2()),metronomeData.initPlayerState=!0}selectPlay(){}getStep(e){for(let t=0;tt.time===e));if(n)return n}return{}}calculation(e){var t;const n=[];let i=-1;for(let S=0;S-1&&v!=i){var l,c,u,h,d,p,f,m,g;const r={measureNumberXML:v,measureNumberIndex:b,numerator:(null==t||null===(l=t.noteElement)||void 0===l||null===(c=l.sourceMeasure)||void 0===c||null===(u=c.ActiveTimeSignature)||void 0===u?void 0:u.numerator)||0,start:t.measures[0].time,end:t.measures[t.measures.length-1].endtime,time:t.measures[t.measures.length-1].endtime-t.measures[0].time,stave_x:(null==t||null===(h=t.noteElement)||void 0===h||null===(d=h.sourceMeasure)||void 0===d||null===(p=d.verticalMeasureList)||void 0===p||null===(f=p[0])||void 0===f||null===(m=f.stave)||void 0===m?void 0:m.x)||0,end_x:(null==t||null===(g=t.stave)||void 0===g?void 0:g.end_x)||0,stepList:[],svgs:[],isRestFlag:t.isRestFlag};if([121].includes(state$1.subjectId)){const n=e.filter((e=>{var t,n;return(null==e||null===(t=e.noteElement)||void 0===t||null===(n=t.sourceMeasure)||void 0===n?void 0:n.measureListIndex)==b}));t.measures=n,r.start=t.measures[0].time,r.end=t.measures[t.measures.length-1].endtime,r.time=t.measures[t.measures.length-1].endtime-t.measures[0].time;try{const e=t.noteElement.sourceMeasure.verticalMeasureList.reduce(((e,t)=>(e.push(...t.vfVoices[1].tickables),e)),[]),n=[];r.svgs=e.map((e=>{const t=e.getBoundingBox().x;if(!n.includes(t)&&"w"!==e.duration)return n.push(t),e._start_x=t,e})).filter(Boolean).sort(((e,t)=>e._start_x-t._start_x))}catch(y){console.log(y)}r.stepList=calculateMutilpleMetroStep(t.measures,r)}else r.stepList=calculateMetroStep(t.measures,r);n.push(r),i=v}}let v=[];const b=[];try{for(let e=0;e-1?`${e} + ${r}%`:`${e}px + ${r}%`:`${r}%`,t.stepList[n]=s}b[e].push({index:n,time:o,left:(null===(A=s)||void 0===A?void 0:A.indexOf("%"))>-1?`calc(${s})`:s,measureNumberXML:t.measureNumberXML,isRestFlag:t.isRestFlag})}}}catch(y){console.log(y)}metronomeData.metroList=v,metronomeData.metroMeasure=b,metronomeData.activeMetro=(null===(t=b[0])||void 0===t?void 0:t[0])||{}}}function calculateMetroStep(e,t){const n=e.reduce(((e,t)=>e+=t._noteLength),0)/t.numerator;if(1===e.length){const n=e[0].svgElement;if(n&&!n.isRest()){var i,r,o,s,a,l,c,u;const e=(null==n||null===(i=n.attrs)||void 0===i||null===(r=i.el)||void 0===r||null===(o=r.parentElement)||void 0===o||null===(s=o.parentElement)||void 0===s||null===(a=s.getBoundingClientRect)||void 0===a?void 0:a.call(s))||{x:0,right:0};let h=(null==n||null===(l=n.attrs)||void 0===l||null===(c=l.el)||void 0===c||null===(u=c.getBoundingClientRect)||void 0===u?void 0:u.call(c))||{x:0},d=Math.abs(e.right-h.x)/t.numerator,p=[];for(let n=0;n=1){var x,w,E,_,M,P,T,C,I,k,B,R;A-=n;const r=(null==t||null===(x=t.svgElement)||void 0===x||null===(w=x.attrs)||void 0===w||null===(E=w.el)||void 0===E||null===(_=E.parentElement)||void 0===_||null===(M=_.parentElement)||void 0===M||null===(P=(T=M).getBoundingClientRect)||void 0===P?void 0:P.call(T))||{x:0};if(y.length>0){var L,N,D,F,O,V;let t=(null===(L=y[0])||void 0===L||null===(N=L.svgElement)||void 0===N||null===(D=N.attrs)||void 0===D||null===(F=D.el)||void 0===F||null===(O=(V=F).getBoundingClientRect)||void 0===O?void 0:O.call(V))||{x:0},i=t.x-r.x;if(y[0]._noteLength/n>=1){var z,G,U,H,j,Q;const n=(null===(z=e[y[0].index+1])||void 0===z||null===(G=z.svgElement)||void 0===G||null===(U=G.attrs)||void 0===U||null===(H=U.el)||void 0===H||null===(j=(Q=H).getBoundingClientRect)||void 0===j?void 0:j.call(Q))||{x:r.right},o=Math.abs(t.x-n.x)/2;i=t.x-r.x+o}S.push(i)}else{var Y,W,X,K,$;let e=((null==t||null===(Y=t.svgElement)||void 0===Y||null===(W=Y.attrs)||void 0===W||null===(X=W.el)||void 0===X||null===(K=($=X).getBoundingClientRect)||void 0===K?void 0:K.call($))||{x:0}).x-r.x;S.push(e)}y=[];let o=(null==t||null===(C=t.svgElement)||void 0===C||null===(I=C.attrs)||void 0===I||null===(k=I.el)||void 0===k||null===(B=(R=k).getBoundingClientRect)||void 0===B?void 0:B.call(R))||{x:0},s=o.x-r.x,a=0;if(i>1){var J,q,Z,ee,te,ne;const t=(null===(J=e[re+1])||void 0===J||null===(q=J.svgElement)||void 0===q||null===(Z=q.attrs)||void 0===Z||null===(ee=Z.el)||void 0===ee||null===(te=(ne=ee).getBoundingClientRect)||void 0===te?void 0:te.call(ne))||{x:r.right};a=Math.abs(o.x-t.x)/i}for(let e=1;eNumber.EPSILON&&A>0&&y.push(t)}return S=S.reduce(((e,t)=>(e.includes(t)?e.push(void 0):e.push(t),e)),[]),S}function calculateMutilpleMetroStep(e,t){var n,i,r,o,s,a,l;const c=t.time/t.numerator,u=(null===(n=e[0])||void 0===n||null===(i=n.svgElement)||void 0===i||null===(r=i.attrs)||void 0===r||null===(o=r.el)||void 0===o||null===(s=o.parentElement)||void 0===s||null===(a=s.parentElement)||void 0===a||null===(l=a.getBoundingClientRect)||void 0===l?void 0:l.call(a))||{x:0};if(1===e.length){var h,d,p;const e=t.svgs[0];let n=(null==e||null===(h=e.attrs)||void 0===h||null===(d=h.el)||void 0===d||null===(p=d.getBoundingClientRect)||void 0===p?void 0:p.call(d))||{x:0};return e&&!e.isRest()?[n.x-u.x]:[]}let f=0,m=[],g=[];for(let B=0;Bc){f-=c;let e=o.x-u.x;var x,w,E,_,M;if(m.length>0)r=null===(x=t.svgs[m[0]._index])||void 0===x||null===(w=x.attrs)||void 0===w?void 0:w.el,o=(null===(E=r)||void 0===E||null===(_=(M=E).getBoundingClientRect)||void 0===_?void 0:_.call(M))||{x:0},e=o.x-u.x;g.push(e),m=[]}else m.push(n);if(Math.abs(f-c)<.001){let e=o.x-u.x;var P,T,C,I,k;if(m.length>0)r=null===(P=t.svgs[m[0]._index])||void 0===P||null===(T=P.attrs)||void 0===T?void 0:T.el,o=(null===(C=r)||void 0===C||null===(I=(k=C).getBoundingClientRect)||void 0===I?void 0:I.call(k))||{x:0},e=o.x-u.x;g.push(e),f=0,m=[]}}return g=g.reduce(((e,t)=>(e.includes(t)?e.push(void 0):e.push(t),e)),[]),g}function setCurrentTime(e){return browserInfo$3.huawei||browserInfo$3.xiaomi?e+=.125:browserInfo$3.android?e+=.11:browserInfo$3.ios&&(e+=.01),e}function hideCursorTip(){tipsTimer?(clearTimeout(tipsTimer),tipsTimer=setTimeout((()=>{metronomeData.cursorTips="",clearTimeout(tipsTimer),tipsTimer=null}),2e3)):tipsTimer=setTimeout((()=>{metronomeData.cursorTips="",clearTimeout(tipsTimer),tipsTimer=null}),2e3)}exports("aq",Metronome);var GradualVersion=(e=>(e[e.BASE=0]="BASE",e[e.ENSEMBLE=1]="ENSEMBLE",e))(GradualVersion||{});const scoreMode="_scoreMode_11hmk_1",styles$4={scoreMode:scoreMode};var context={locks:{},zIndex:2e3,enableRipple:!0};reactive(context);const Context=reactive(context),isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isNumber=e=>"number"==typeof e,isPlainObject=e=>"[object Object]"===Object.prototype.toString.call(e),isArray$1=e=>Array.isArray(e),isURL=e=>!!e&&/^(http)|(\.*\/)/.test(e),toNumber=e=>null==e?0:isString(e)?(e=parseFloat(e),e=Number.isNaN(e)?0:e):isBoolean(e)?Number(e):e,inBrowser=()=>"undefined"!=typeof window;function getViewportSize(){var{innerWidth:e,innerHeight:t}=window;return e>t?{vMin:t,vMax:e}:{vMin:e,vMax:t}}var isRem=e=>isString(e)&&e.endsWith("rem"),isPx=e=>isString(e)&&e.endsWith("px")||isNumber(e),isPercent=e=>isString(e)&&e.endsWith("%"),isVw=e=>isString(e)&&e.endsWith("vw"),isVh=e=>isString(e)&&e.endsWith("vh"),isVMin=e=>isString(e)&&e.endsWith("vmin"),isVMax=e=>isString(e)&&e.endsWith("vmax"),isCalc=e=>isString(e)&&e.startsWith("calc("),isVar=e=>isString(e)&&e.startsWith("var("),toPxNum=e=>{if(isNumber(e))return e;if(isPx(e))return+e.replace("px","");if(isVw(e))return+e.replace("vw","")*window.innerWidth/100;if(isVh(e))return+e.replace("vh","")*window.innerHeight/100;if(isRem(e)){var t=+e.replace("rem",""),n=window.getComputedStyle(document.documentElement).fontSize;return t*parseFloat(n)}return isVMin(e)?getViewportSize().vMin:isVMax(e)?getViewportSize().vMax:isString(e)?toNumber(e):0},toSizeUnit=e=>{if(null!=e)return isPercent(e)||isVw(e)||isVh(e)||isRem(e)||isCalc(e)||isVar(e)||isVMin(e)||isVMax(e)?e:toPxNum(e)+"px"},multiplySizeUnit=function(e,t){if(void 0===t&&(t=1),null!=e){var n=toSizeUnit(e),i=n.match(/(vh|%|rem|px|vw)$/)[0];return""+parseFloat(n)*t+i}};function useMounted(e){let t=!1;onMounted((()=>{e(),nextTick((()=>{t=!0}))})),onActivated((()=>{t&&e()}))}function useEventListener(e,t,n,i={}){if(!inBrowser())return;const{passive:r=!1,capture:o=!1}=i;let s=!1,a=!1;const l=e=>{if(s||a)return;const i=unref(e);i&&(i.addEventListener(t,n,{passive:r,capture:o}),s=!0)},c=e=>{if(!s||a)return;const i=unref(e);i&&(i.removeEventListener(t,n,{capture:o}),s=!1)};let u;isRef(e)&&(u=watch((()=>e.value),((e,t)=>{c(t),l(e)})));return useMounted((()=>{l(e)})),onBeforeUnmount((()=>{c(e)})),onDeactivated((()=>{c(e)})),()=>{null==u||u(),c(e),a=!0}}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t(t[n]=e[n],t)),{}):e[t]}function mount(e){var t=createApp(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}function mountInstance(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var i={setup:()=>()=>h(e,_extends$2({},t,n))},{unmount:r}=mount(i);return{unmountInstance:r}}function useRouteListener(e){inBrowser()&&(useEventListener(window,"hashchange",e),useEventListener(window,"popstate",e))}function useTeleport(){var e=ref(!1);return onActivated((()=>{e.value=!1})),onDeactivated((()=>{e.value=!0})),{disabled:e}}function createNamespace(e){var t="var-"+e;return{n:e=>e?"$"===e[0]?e.replace("$","var"):e.startsWith("--")?""+t+e:t+"__"+e:t,classes:function(){for(var e=arguments.length,t=new Array(e),n=0;n{if(isArray$1(e)){var[t,n,i=null]=e;return t?n:i}return e}))}}}function call(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;ie(...n))):e?e(...n):void 0}function defineListenerProp(e){return{type:[Function,Array],default:e}}function resolveLock(){Object.keys(Context.locks).length<=0?document.body.classList.remove("var--lock"):document.body.classList.add("var--lock")}function addLock(e){Context.locks[e]=1,resolveLock()}function releaseLock(e){delete Context.locks[e],resolveLock()}function useLock(e,t){var{uid:n}=getCurrentInstance();t&&watch(t,(t=>{!1===t?releaseLock(n):!0===t&&!0===e()&&addLock(n)})),watch(e,(e=>{t&&!1===t()||(!0===e?addLock(n):releaseLock(n))})),onBeforeMount((()=>{t&&!1===t()||!0===e()&&addLock(n)})),onUnmounted((()=>{t&&!1===t()||!0===e()&&releaseLock(n)})),onActivated((()=>{t&&!1===t()||!0===e()&&addLock(n)})),onDeactivated((()=>{t&&!1===t()||!0===e()&&releaseLock(n)}))}function useZIndex(e,t){var n=ref(Context.zIndex);return watch(e,(e=>{e&&(Context.zIndex+=t,n.value=Context.zIndex)}),{immediate:!0}),{zIndex:n}}globalThis&&globalThis.__rest;var props$3={name:{type:String},size:{type:[Number,String]},color:{type:String},namespace:{type:String,default:"var-icon"},transition:{type:[Number,String],default:0},animationClass:{type:String},onClick:defineListenerProp()};function asyncGeneratorStep(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){asyncGeneratorStep(o,i,r,s,a,"next",e)}function a(e){asyncGeneratorStep(o,i,r,s,a,"throw",e)}s(void 0)}))}}var{n:n$3,classes:classes$2}=createNamespace("icon");function __render__$3(e,t){return openBlock(),createBlock(resolveDynamicComponent(e.isURL(e.name)?"img":"i"),{class:normalizeClass(e.classes(e.n(),[e.namespace!==e.n(),e.namespace],e.namespace+"--set",[e.isURL(e.name),e.n("image"),e.namespace+"-"+e.nextName],[e.animateInProgress,null==e.animationClass?e.n("--shrinking"):e.animationClass])),style:normalizeStyle({color:e.color,"transition-duration":e.toNumber(e.transition)+"ms",width:e.isURL(e.name)?e.toSizeUnit(e.size):null,height:e.isURL(e.name)?e.toSizeUnit(e.size):null,fontSize:e.toSizeUnit(e.size)}),src:e.isURL(e.name)?e.nextName:null,onClick:e.onClick},null,8,["class","style","src","onClick"])}var __sfc__$3=defineComponent({name:"VarIcon",props:props$3,setup(e){var t=ref(""),n=ref(!1),i=function(){var i=_asyncToGenerator((function*(i,r){var{transition:o}=e;null!=r&&0!==toNumber(o)?(n.value=!0,yield nextTick(),setTimeout((()=>{null!=r&&(t.value=i),n.value=!1}),toNumber(o))):t.value=i}));return function(e,t){return i.apply(this,arguments)}}();return watch((()=>e.name),i,{immediate:!0}),{n:n$3,classes:classes$2,nextName:t,animateInProgress:n,isURL:isURL,toNumber:toNumber,toSizeUnit:toSizeUnit}}});__sfc__$3.render=__render__$3;const Icon=__sfc__$3;function typeValidator$1(e){return["circle","wave","cube","rect","disappear"].includes(e)}function sizeValidator(e){return["normal","mini","small","large"].includes(e)}Icon.install=function(e){e.component(Icon.name,Icon)};var props$2={type:{type:String,default:"circle",validator:typeValidator$1},radius:{type:[String,Number]},size:{type:String,default:"normal",validator:sizeValidator},color:{type:String},description:{type:String},loading:{type:Boolean,default:!1}},{n:n$2,classes:classes$1}=createNamespace("loading"),_withScopeId=e=>(pushScopeId(""),e=e(),popScopeId(),e),_hoisted_1=_withScopeId((()=>createBaseVNode("svg",{viewBox:"25 25 50 50"},[createBaseVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none"})],-1))),_hoisted_2=[_hoisted_1];function __render__$2(e,t){return openBlock(),createElementBlock("div",{class:normalizeClass(e.n())},[e.$slots.default?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(e.classes(e.n("content"),[e.loading,e.n("content--active")]))},[renderSlot(e.$slots,"default"),e.loading?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(e.n("content-mask"))},null,2)):createCommentVNode("v-if",!0)],2)):createCommentVNode("v-if",!0),e.isShow?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(e.classes(e.n("$--box"),e.n("body"),[e.$slots.default,e.n("inside")]))},["circle"===e.type?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(e.n("circle"))},[createBaseVNode("span",{class:normalizeClass(e.classes(e.n("circle-block"),e.n("circle-block--"+e.size))),style:normalizeStyle({width:e.multiplySizeUnit(e.radius,2),height:e.multiplySizeUnit(e.radius,2),color:e.color})},_hoisted_2,6)],2)):createCommentVNode("v-if",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(e.loadingTypeDict,((t,n)=>(openBlock(),createElementBlock(Fragment,{key:n},[e.type===n?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(e.classes(e.n(n),e.n(n+"--"+e.size)))},[(openBlock(!0),createElementBlock(Fragment,null,renderList(t,(t=>(openBlock(),createElementBlock("div",{key:t+n,style:normalizeStyle({backgroundColor:e.color}),class:normalizeClass(e.classes(e.n(n+"-item"),e.n(n+"-item--"+e.size)))},null,6)))),128))],2)):createCommentVNode("v-if",!0)],64)))),128)),e.$slots.description||e.description?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(e.classes(e.n("description"),e.n("description--"+e.size))),style:normalizeStyle({color:e.color})},[renderSlot(e.$slots,"description",{},(()=>[createTextVNode(toDisplayString(e.description),1)]))],6)):createCommentVNode("v-if",!0)],2)):createCommentVNode("v-if",!0)],2)}var __sfc__$2=defineComponent({name:"VarLoading",props:props$2,setup(e,t){var{slots:n}=t,i=computed((()=>!call(n.default)||e.loading));return{n:n$2,classes:classes$1,multiplySizeUnit:multiplySizeUnit,loadingTypeDict:{wave:5,cube:4,rect:8,disappear:3},isShow:i}}});__sfc__$2.render=__render__$2;const Loading=__sfc__$2;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t[createTextVNode(toDisplayString(e.content),1)]))],2),createBaseVNode("div",{class:normalizeClass(e.n("action"))},[e.iconName?(openBlock(),createBlock(n,{key:0,name:e.iconName},null,8,["name"])):createCommentVNode("v-if",!0),"loading"===e.type?(openBlock(),createBlock(i,{key:1,type:e.loadingType,size:e.loadingSize,color:e.loadingColor,radius:e.loadingRadius},null,8,["type","size","color","radius"])):createCommentVNode("v-if",!0),renderSlot(e.$slots,"action")],2)],6)],6)),[[vShow,e.show]])}var __sfc__$1=defineComponent({name:"VarSnackbarCore",components:{VarLoading:Loading,VarIcon:Icon},props:props$1,setup(e){var t=ref(null),{zIndex:n}=useZIndex((()=>e.show),1);useLock((()=>e.show),(()=>e.lockScroll));var i=computed((()=>"loading"===e.type||e.forbidClick)),r=computed((()=>e.type?ICON_TYPE_DICT[e.type]:"")),o=()=>{t.value=setTimeout((()=>{"loading"!==e.type&&call(e["onUpdate:show"],!1)}),e.duration)};return watch((()=>e.show),(n=>{n?(call(e.onOpen),o()):!1===n&&(clearTimeout(t.value),call(e.onClose))})),watch((()=>e._update),(()=>{clearTimeout(t.value),o()})),useMounted((()=>{e.show&&(call(e.onOpen),o())})),{SNACKBAR_TYPE:SNACKBAR_TYPE,n:n$1,classes:classes,zIndex:n,iconName:r,isForbidClick:i}}});__sfc__$1.render=__render__$1;const VarSnackbarCore=__sfc__$1;var{n:n}=createNamespace("snackbar");function __render__(e,t){var n=resolveComponent("var-snackbar-core");return openBlock(),createBlock(Teleport,{to:e.teleport,disabled:e.disabled},[createVNode(Transition,{name:e.n()+"-fade",onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:withCtx((()=>[createVNode(n,mergeProps(e.$props,{class:e.n("transition")}),{action:withCtx((()=>[renderSlot(e.$slots,"action")])),default:withCtx((()=>[renderSlot(e.$slots,"default",{},(()=>[createTextVNode(toDisplayString(e.content),1)]))])),_:3},16,["class"])])),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}var __sfc__=defineComponent({name:"VarSnackbar",components:{VarSnackbarCore:VarSnackbarCore},props:props$1,setup(){var{disabled:e}=useTeleport();return{n:n,disabled:e}}});__sfc__.render=__render__;const VarSnackbar=__sfc__;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},onOpened:()=>{},onClose:()=>{},onClosed:()=>{}},uniqSnackbarOptions=reactive([]),defaultOptions=defaultOptionsValue,transitionGroupProps={name:"var-snackbar-fade",tag:"div",class:"var-transition-group"},TransitionGroupHost={setup:()=>()=>{var e=uniqSnackbarOptions.map((e=>{var{id:t,reactiveSnackOptions:n,_update:i}=e,r=document.querySelector(".var-transition-group");n.forbidClick||"loading"===n.type?r.classList.add("var-pointer-auto"):r.classList.remove("var-pointer-auto"),isAllowMultiple&&(n.position="top");var o=_extends({position:isAllowMultiple?"relative":"absolute"},getTop(n.position));return createVNode(VarSnackbarCore,mergeProps(n,{key:t,style:o,"data-id":t,_update:i,show:n.show,"onUpdate:show":e=>n.show=e}),null)}));return createVNode(TransitionGroup,mergeProps(transitionGroupProps,{style:{zIndex:Context.zIndex},onAfterEnter:opened,onAfterLeave:removeUniqOption}),_isSlot(e)?e:{default:()=>[e]})}},Snackbar=function(e){var t=normalizeOptions(e),n=reactive(_extends({},defaultOptions,t));n.show=!0,isMount||(isMount=!0,unmount=mountInstance(TransitionGroupHost).unmountInstance);var{length:i}=uniqSnackbarOptions,r={id:sid++,reactiveSnackOptions:n};0===i||isAllowMultiple?addUniqOption(r):updateUniqOption(n,"update-"+sid);return{clear(){!isAllowMultiple&&uniqSnackbarOptions.length?uniqSnackbarOptions[0].reactiveSnackOptions.show=!1:n.show=!1}}};function opened(e){var t=e.getAttribute("data-id"),n=uniqSnackbarOptions.find((e=>e.id===toNumber(t)));n&&call(n.reactiveSnackOptions.onOpened)}function removeUniqOption(e){e.parentElement&&e.parentElement.classList.remove("var-pointer-auto");var t=e.getAttribute("data-id"),n=uniqSnackbarOptions.find((e=>e.id===toNumber(t)));n&&(n.animationEnd=!0,call(n.reactiveSnackOptions.onClosed));var i=uniqSnackbarOptions.every((e=>e.animationEnd));i&&(call(unmount),uniqSnackbarOptions=reactive([]),isMount=!1)}function addUniqOption(e){uniqSnackbarOptions.push(e)}function normalizeOptions(e){return void 0===e&&(e={}),isString(e)?{content:e}:e}function updateUniqOption(e,t){var[n]=uniqSnackbarOptions;n.reactiveSnackOptions=_extends({},n.reactiveSnackOptions,e),n._update=t}function getTop(e){return void 0===e&&(e="top"),"bottom"===e?{[e]:"5%"}:{top:"top"===e?"5%":"45%"}}SNACKBAR_TYPE.forEach((e=>{Snackbar[e]=t=>(isPlainObject(t)?t.type=e:t={content:t,type:e},Snackbar(t))})),Snackbar.install=function(e){e.component(VarSnackbar.name,VarSnackbar)},Snackbar.allowMultiple=function(e){void 0===e&&(e=!1),e!==isAllowMultiple&&(uniqSnackbarOptions.forEach((e=>{e.reactiveSnackOptions.show=!1})),isAllowMultiple=e)},Snackbar.clear=function(){uniqSnackbarOptions.forEach((e=>{e.reactiveSnackOptions.show=!1}))},Snackbar.setDefaultOptions=function(e){defaultOptions=e},Snackbar.resetDefaultOptions=function(){defaultOptions=defaultOptionsValue},Snackbar.Component=VarSnackbar,VarSnackbar.install=function(e){e.component(VarSnackbar.name,VarSnackbar)};const Snackbar$1=exports("S",Snackbar),Image1=""+new URL("5-d8bfbf51.png",module.meta.url).href,Image2=""+new URL("4-cfa387c7.png",module.meta.url).href,Image3=""+new URL("3-d02c685a.png",module.meta.url).href,Image4=""+new URL("2-5c4c2ef5.png",module.meta.url).href,Image5=""+new URL("1-a0d5037d.png",module.meta.url).href,clx1=""+new URL("clx5-b3331931.svg",module.meta.url).href,clx2=""+new URL("clx4-7a8a1657.svg",module.meta.url).href,clx3=""+new URL("clx3-82262a8a.svg",module.meta.url).href,clx4=""+new URL("clx2-99f2ced3.svg",module.meta.url).href,clx5=""+new URL("clx1-3d063166.svg",module.meta.url).href,good="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAACQCAMAAABOB0IDAAADAFBMVEUAAAADBBoCBhMBChQACBYABhUABhUACBYACBYDDhgABxUCCRcABxYACBYACBYABxUACBYACBYACBcABxbc4ODk5uUABxYACBbT2drKzc4ABxYACBXm6Ofo6ejR1tbP0tTn6OiiqKvN09SIkpcjOUW6wsWLmp/j5eUVIjDQ1dZ9h424vLz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1rdSwbi7IwNvFBJKnIBd7S8aryEFbHcH3ri0BxaP/gKdEB7KYrDIcgAAAABJRU5ErkJggg==",scoreIcon={good:good,bad:bad,perfect:perfect,great:great},leveByScoreMeasureIcons=[{icon:scoreIcon.bad,text:"bad",color:"#EE4C6A"},{icon:scoreIcon.good,text:"good",color:"#FF958B"},{icon:scoreIcon.great,text:"great",color:"#FF8E5A"},{icon:scoreIcon.perfect,text:"perfect",color:"#516AFF"}],icons=[{img:Image1,tips:"你的演奏不太好,再练一练吧~",mome:"敢于尝试",clxImg:clx1,clxtip:"你的演奏不太好,音准和完整性还需加强,再练一练吧~",clxmome:"敢于尝试"},{img:Image2,tips:"你的演奏还不熟练,加紧训练才能有好成绩哦~",mome:"还要加油哦~",clxImg:clx2,clxtip:"你的演奏还不熟练,音准和完整性还需加强,加紧训练才能有好成绩哦~",clxmome:"还要加油哦~"},{img:Image3,tips:"你的演奏还不流畅,科学的练习才能更完美哦~",mome:"突破自我",clxImg:clx3,clxtip:"你的演奏还不流畅,音准和节奏还需加强,科学的练习才能更完美哦~",clxmome:"突破自我"},{img:Image4,tips:"你的演奏还不错,继续加油吧,离完美就差一步啦~",mome:"崭露头角",clxImg:clx4,clxtip:"你的演奏还不错,继续加油吧,加强音准,离完美就差一步啦~",clxmome:"崭露头角"},{img:Image5,tips:"你的演奏完美无缺,继续努力吧~",mome:"你很棒",clxImg:clx5,clxtip:"你的演奏非常不错,音准的把握和节奏稍有瑕疵,完整性把握的很好~",clxmome:"你很棒"}],getLeveByScore=e=>{if(!e&&"number"!=typeof e)return{};let t=0;return e>20&&e<=40?t=1:e>40&&e<=60?t=2:e>60&&e<=80?t=3:e>80&&(t=4),{...icons[t],leve:t}},getLeveByScoreMeasure=e=>{if(!e&&"number"!=typeof e)return{};let t=0;return e>=40&&e<70?t=1:e>=70&&e<90?t=2:e>=90&&(t=3),t},audioList="_audioList_1j0z3_1",styles$3={audioList:audioList};let timer=null;const midiData=reactive({iframeRef:null,playing:!1,index:0,rate:1}),playNote=()=>{var e,t;if(!midiData.playing)return;const n=state$1.times[midiData.index];if(!n)return void onEnded();midiData.index++;const i=n.endtime-n.time;null===(e=midiData.iframeRef)||void 0===e||null===(t=e.contentWindow)||void 0===t||t.playNote(n.realKey,i),timer=setTimeout((()=>{playNote()}),i/midiData.rate*1e3)},stopPlay=()=>{midiData.playing=!1},hanldeInitMidiData=e=>{midiData.iframeRef=e},handleTogglePlayMidi=e=>{"play"===e?(midiData.playing=!0,playNote(),onPlay()):stopPlay()},hanldeSetMidiPlaybackRate=e=>{midiData.rate=e},getMidiCurrentTime=()=>{let e=midiData.index-1;return e=e<0?0:e,state$1.times[e].time},getMidiDuration=()=>state$1.times[state$1.times.length-1].endtime,setMidiCurrentTime=e=>{clearTimeout(timer),midiData.index=e,playNote()},audioData=reactive({songEle:null,backgroundEle:null,midiRender:!1,progress:0,duration:0}),midiRef=ref(),audioListStart=e=>{var t,n;if("play"===e&&0!==state$1.originSpeed&&setAudioPlaybackRate(state$1.speed/state$1.originSpeed),audioData.midiRender)handleTogglePlayMidi(e);else if("play"===e)null===(t=audioData.songEle)||void 0===t||t.play(),null===(n=audioData.backgroundEle)||void 0===n||n.play();else if("paused"===e){var i,r;null===(i=audioData.songEle)||void 0===i||i.pause(),null===(r=audioData.backgroundEle)||void 0===r||r.pause()}},setAudioPlaybackRate=e=>{audioData.midiRender?hanldeSetMidiPlaybackRate(e):(audioData.songEle&&(audioData.songEle.playbackRate=e),audioData.backgroundEle&&(audioData.backgroundEle.playbackRate=e))},getAudioCurrentTime=exports("aF",(()=>{var e,t,n;if(audioData.midiRender){return getMidiCurrentTime()}return"music"===state$1.playSource?(null===(e=audioData.songEle)||void 0===e?void 0:e.currentTime)||audioData.progress:"background"===state$1.playSource?(null===(t=audioData.backgroundEle)||void 0===t?void 0:t.currentTime)||audioData.progress:(null===(n=audioData.songEle)||void 0===n?void 0:n.currentTime)||audioData.progress})),getAudioDuration=exports("aZ",(()=>{var e,t;if(audioData.midiRender){return getMidiDuration()}return(null===(e=audioData.songEle)||void 0===e?void 0:e.duration)||(null===(t=audioData.backgroundEle)||void 0===t?void 0:t.duration)||audioData.duration})),setAudioCurrentTime=(e,t=0)=>{audioData.midiRender?setMidiCurrentTime(t):(audioData.songEle&&(audioData.songEle.currentTime=e),audioData.backgroundEle&&(audioData.backgroundEle.currentTime=e),audioData.progress=e)},toggleMutePlayAudio=(e,t)=>{"music"===e?audioData.songEle&&(audioData.songEle.muted=t):"background"===e&&audioData.backgroundEle&&(audioData.backgroundEle.muted=t)},AudioList=exports("aj",defineComponent({name:"audio-list",setup(){const e=()=>{midiRef.value.contentWindow.handleRendered=()=>{audioData.midiRender=!0},hanldeInitMidiData(midiRef.value)};watch((()=>state$1.playSource),(()=>{"evaluating"!==state$1.modeType||state$1.setting.enableAccompaniment?"music"===state$1.playSource?(audioData.songEle&&(audioData.songEle.muted=!1),audioData.backgroundEle&&(audioData.backgroundEle.muted=!0)):(audioData.songEle&&(audioData.songEle.muted=!0),audioData.backgroundEle&&(audioData.backgroundEle.muted=!1)):console.log("评测模式设置了关闭伴奏,不切换原音伴奏")}));const t=e=>new Promise((t=>{const n=new Audio(e+"?v="+Date.now());n.load(),n.onloadedmetadata=()=>{t(n)},n.onerror=()=>{t(null)}})),n=e=>{var t,n,i;const r=(null==e?void 0:e.currentTime)||(null==e||null===(t=e.content)||void 0===t?void 0:t.currentTime),o=(null==e?void 0:e.totalDuration)||(null==e||null===(n=e.content)||void 0===n?void 0:n.totalDuration),s=r/1e3;audioData.progress=s,audioData.songEle&&(audioData.songEle.currentTime=s),audioData.backgroundEle&&(audioData.backgroundEle.currentTime=s),audioData.duration=o/1e3,(null==e||null===(i=e.content)||void 0===i?void 0:i.totalDuration)>1e3&&r>=o&&onEnded()};return onMounted((()=>{"MIDI"!==state$1.playMode&&(Promise.all([t(state$1.music),t(state$1.accompany)]).then((([e,t])=>{e&&(audioData.songEle=e),t&&(audioData.backgroundEle=t),audioData.songEle?(audioData.songEle.addEventListener("play",onPlay),audioData.songEle.addEventListener("ended",onEnded),t&&(t.muted=!0)):audioData.backgroundEle&&(audioData.backgroundEle.addEventListener("play",onPlay),audioData.backgroundEle.addEventListener("ended",onEnded))})),api_playProgress(n))})),()=>createVNode("div",{class:styles$3.audioList},["MIDI"===state$1.playMode&&0!=state$1.speed&&createVNode("iframe",{style:{display:"none"},ref:midiRef,src:"/midi/index.html",onLoad:e},null)])}})),popup="_popup_1838h_1",dots="_dots_1838h_6",dot="_dot_1838h_6",active="_active_1838h_20",one="_one_1838h_23",styles$2={popup:popup,dots:dots,dot:dot,active:active,one:one},tickData=reactive({list:[],len:0,tickEnd:!1,beatLengthInMilliseconds:0,state:"",source1:"",source2:"",index:0,show:!1}),handlePlay=(e,t)=>new Promise((n=>{setTimeout((()=>{tickData.tickEnd||(tickData.index++,t&&t.play()),n(e)}),tickData.beatLengthInMilliseconds)})),handleInitTick=exports("aL",((e,t)=>{tickData.state="",tickData.beatLengthInMilliseconds=e,tickData.len=t})),handleStartTick=async()=>{tickData.show=!0,tickData.tickEnd=!1,"ok"!==tickData.state&&(tickData.source1=new howler.Howl({src:tockAndTick.tick}),tickData.source2=new howler.Howl({src:tockAndTick.tock}),tickData.state="ok"),tickData.index=0,tickData.beatLengthInMilliseconds=60/state$1.speed*1e3;for(let e=0;e<=tickData.len;e++){if(tickData.tickEnd)return!1;const t=0===e?tickData.source1:e===tickData.len?null:tickData.source2;await handlePlay(e,t)}return tickData.show=!1,!0},Tick=exports("aJ",defineComponent({name:"metronome",setup(){const e=()=>{tickData.tickEnd=!0};return()=>createVNode(Popup,{class:styles$2.popup,show:tickData.show,"onUpdate:show":e=>tickData.show=e,closeable:!0,onClickCloseIcon:e},{default:()=>[createVNode("div",{class:styles$2.dots},[Array(tickData.len).fill(0).map(((e,t)=>createVNode("div",{class:[styles$2.dot,tickData.index>t&&styles$2.active,tickData.index>t&&0===t&&styles$2.one]},null)))])]})}})),browserInfo$2=browser(),evaluatingData=exports("p",reactive({contentData:{},rendered:!1,earphone:!1,soundEffect:!1,soundEffectFrequency:0,checkStep:0,checkEnd:!1,earphoneMode:!1,soundEffectMode:!1,websocketState:!1,startBegin:!1,backtime:0,evaluatings:{},resultData:{},resulstMode:!1,isComplete:!1,isDisabledPlayMusic:!1})),handleStartEvaluat=exports("C",(()=>{"evaluating"===state$1.modeType?handleCancelEvaluat():handleStopPlay(),state$1.modeType="evaluating"===state$1.modeType?"practise":"evaluating","evaluating"!==state$1.modeType&&(evaluatingData.rendered=!1)})),check_currentTime=()=>{let e=0;state$1.isSelectMeasureMode&&(e=1e3*state$1.section[0].time);1e3*getAudioCurrentTime()-e>=500?sendEvaluatingOffsetTime(500):setTimeout((()=>{check_currentTime()}),10)},sendEvaluatingOffsetTime=async e=>{if(!evaluatingData.backtime)return;const t=Date.now()-evaluatingData.backtime-e;console.error("真正播放延迟",t,"currentTime:",e),await api_proxyServiceMessage({header:{commond:"audioPlayStart",type:"SOUND_COMPARE"},body:{offsetTime:t<0?0:t,micDelay:0}})},checkUseEarphone=async()=>{var e;const t=await getEarphone();return(null==t||null===(e=t.content)||void 0===e?void 0:e.checkIsWired)||!1},handleEndSoundCheck=exports("A",(()=>{endSoundCheck()})),connectWebsocket=exports("G",(async e=>{evaluatingData.contentData=e,evaluatingData.websocketState=!0})),handlePerformDetection=exports("x",(async()=>{if(!evaluatingData.checkEnd){if(0===evaluatingData.checkStep){if(evaluatingData.checkStep=5,state$1.setting.soundEffect)return void(evaluatingData.soundEffectMode=!0);const e=await api_getDeviceDelay();return console.log("🚀 ~ delayTime:",e),e?void handlePerformDetection():void(evaluatingData.soundEffectMode=!0)}if(evaluatingData.checkStep=5){evaluatingData.checkStep=10;return await checkUseEarphone()?void handlePerformDetection():void(evaluatingData.earphoneMode=!0)}10===evaluatingData.checkStep&&(evaluatingData.checkEnd=!0)}})),addMeasureScore=exports("au",((e,t=!0)=>{for(let n in evaluatingData.evaluatings)evaluatingData.evaluatings[n].show=!1;evaluatingData.evaluatings[e.measureRenderIndex]={...e,leve:getLeveByScoreMeasure(e.score),show:t}})),handleScoreResult=e=>{if(console.log("返回",e),null!=e&&e.content){const{header:t,body:n}=e.content;"checking"===t.commond&&(evaluatingData.soundEffectFrequency=n.frequency);const i=()=>Math.floor(20*Math.random())+80;"measureScore"===(null==t?void 0:t.commond)&&(console.log("🚀 ~ 评测返回:",e),n.score=i(),addMeasureScore(n)),"overall"===(null==t?void 0:t.commond)&&(console.log("🚀 ~ 评测返回:",e),n.score=i(),n.intonation=i(),n.cadence=i(),n.integrity=i(),state$1.isHideEvaluatReportSaveBtn=!1,evaluatingData.resulstMode=!0,evaluatingData.resultData={...n,...getLeveByScore(n.score)},closeToast())}},handleStartBegin=exports("y",(async e=>{var t;evaluatingData.isComplete=!1,evaluatingData.evaluatings={},evaluatingData.resultData={},evaluatingData.backtime=0,resetPlaybackToStart();const n=await startEvaluating(evaluatingData.contentData);if("startEvaluating"!==(null==n?void 0:n.api))return Snackbar$1.error("请在APP端进行评测"),void(evaluatingData.startBegin=!1);if(null!=n&&null!==(t=n.content)&&void 0!==t&&t.reson)return showToast(n.content.reson),void(evaluatingData.startBegin=!1);if(evaluatingData.startBegin=!0,evaluatingData.isDisabledPlayMusic){if(state$1.playState="paused"===state$1.playState?"play":"paused","play"===state$1.playState&&state$1.needTick){if(!(await handleStartTick()))return state$1.playState="paused",void(evaluatingData.startBegin=!1)}onPlay()}await api_startRecording({accompanimentState:state$1.setting.enableAccompaniment?1:0,firstNoteTime:e||0}),state$1.setting.camera&&(console.log("开始录制视频"),api_startCapture())})),playMusic=async()=>{if(!(await togglePlay("play")))return evaluatingData.startBegin=!1,void handleCancelEvaluat();check_currentTime(),state$1.setting.camera&&(console.log("开始录制视频"),api_startCapture())},recordStartTimePoint=async e=>{var t;if(console.error("开始录音"),!evaluatingData.startBegin)return;let n=(null==e||null===(t=e.content)||void 0===t?void 0:t.inteveral)||0;browserInfo$2.ios&&(n*=1e3),evaluatingData.backtime=n||Date.now(),console.log("🚀 ~ 开始时间点:",evaluatingData.backtime,"已经录的时间:",Date.now()-n,"记录时间点:",Date.now()),evaluatingData.isDisabledPlayMusic||playMusic()},handleEndEvaluat=(e=!1)=>{evaluatingData.startBegin&&"evaluating"===state$1.modeType&&(evaluatingData.startBegin=!1,api_stopRecording(),setTimeout((()=>{endEvaluating({musicScoreId:state$1.examSongId})}),500),showLoadingToast({message:"评分中",duration:0,overlay:!0,overlayClass:styles$4.scoreMode}),evaluatingData.isComplete=e,state$1.setting.camera&&(console.log("结束录制视频"),api_endCapture()))},handleEndBegin=exports("z",(()=>{handleEndEvaluat(),handleStopPlay()})),handleCancelEvaluat=()=>{evaluatingData.evaluatings={},evaluatingData.startBegin=!1,closeToast(),api_proxyServiceMessage({header:{commond:"recordCancel",type:"SOUND_COMPARE",status:200}}),cancelEvaluating(),handleStopPlay()},handleViewReport=exports("B",((e,t)=>{var n;const i=(null===(n=evaluatingData.resultData)||void 0===n?void 0:n[e])||"";let r="";switch(t){case"gym":r=location.origin+location.pathname+"#/report/"+i;break;case"orchestra":default:r=location.origin+location.pathname+"report-share.html?id="+i;break;case"instrument":r=location.origin+location.pathname+"#/evaluat-report?id="+i}api_openWebView({url:r,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0,c_orientation:0})})),handleComplexButton=e=>{console.log("监听是否隐藏保存按钮",e),null!=e&&e.content&&(e.content,state$1.isHideEvaluatReportSaveBtn=!0)},Evaluating=exports("ak",defineComponent({name:"evaluating",setup(){const e=usePageVisibility(),t=reactive({finger:!1,play_mode:"",enableAccompaniment:!0});return watch(e,(e=>{"hidden"==e&&evaluatingData.startBegin&&handleEndBegin()})),onMounted((()=>{resetPlaybackToStart(),t.finger=state$1.setting.displayFingering,state$1.setting.displayFingering=!1,t.play_mode=state$1.playSource,t.enableAccompaniment=state$1.setting.enableAccompaniment,t.enableAccompaniment||(console.log("关闭伴奏"),toggleMutePlayAudio("music"===t.play_mode?"music":"background",!0)),evaluatingData.resultData={},evaluatingData.evaluatings={},evaluatingData.soundEffectFrequency=0,evaluatingData.checkStep=0,evaluatingData.rendered=!0,sendResult(handleScoreResult),hideComplexButton(handleComplexButton,!0),api_recordStartTime(recordStartTimePoint),state$1.isSelectMeasureMode||clearSelection(),console.log("加载评测模块成功")})),onUnmounted((()=>{evaluatingData.checkEnd=!1,evaluatingData.rendered=!1,resetPlaybackToStart(),removeResult(handleScoreResult),hideComplexButton((()=>{}),!1),api_remove_recordStartTime(recordStartTimePoint),state$1.setting.displayFingering=t.finger,state$1.playSource=t.play_mode,t.enableAccompaniment||toggleMutePlayAudio("music"===t.play_mode?"music":"background",!1),console.log("卸载评测模块成功")})),()=>createVNode("div",null,null)}}));function autoCorrelate(e,t){for(var n=e.length,i=0,r=0;rl[u+1];)u++;var h=-1,d=-1;for(r=u;rh&&(h=l[r],d=r);var p=d,f=l[p-1],m=l[p],g=l[p+1];let v=(f+g-2*m)/2;return v&&(p-=(g-f)/2/(2*v)),t/p}const audioRecorder={audioContext:null,mediaRecorder:null,recordeState:!1,progress:e=>{},init(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)},toggleRecord(e){return new Promise(((t,n)=>{e?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{audioRecorder.mediaRecorder=e.getAudioTracks()[0],audioRecorder.recordeState=!0;const n=this.audioContext.createMediaStreamSource(e),i=this.audioContext.createAnalyser();i.fftSize=2048,n.connect(i);var r=new Float32Array(i.fftSize);const o=this.audioContext.sampleRate;!function e(){if(!audioRecorder.recordeState)return;i.getFloatTimeDomainData(r);const t=autoCorrelate(r,o);audioRecorder.progress(t),setTimeout((()=>{e()}),10)}(),t(!0)})).catch((e=>{t(!1),console.error("Error accessing media devices:",e)})):audioRecorder.mediaRecorder.stop()}))},checkSupport:()=>new Promise(((e,t)=>{if(navigator.mediaDevices.getUserMedia){const t={audio:!0};navigator.mediaDevices.getUserMedia(t).then((t=>{e(!0),console.log("授权成功!")}),(()=>{e(!1),console.error("授权失败!")}))}else e(!1),console.error("浏览器不支持 getUserMedia")}))},followData=exports("aQ",reactive({list:[],index:0,start:!1,rendered:!1,earphone:!1})),toggleFollow=exports("aE",((e=!0)=>{state$1.modeType="follow"===state$1.modeType?"practise":"follow",e||(followData.start=!1,openToggleRecord(!1))})),noteFrequency=ref(0),audioFrequency=ref(0),followTime=ref(0),openToggleRecord=async(e=!0)=>{if(api_cloudToggleFollow(e?"start":"end"),e)followTime.value=Date.now();else{const e=Date.now()-followTime.value;0!==followTime.value&&e>0&&(followTime.value=0)}if(!storeData.isApp){!(await(null==audioRecorder?void 0:audioRecorder.toggleRecord(e)))&&followData.start&&(followData.earphone=!0,followData.start=!1)}},onClear=()=>{state$1.times.forEach((e=>{const t=document.querySelector(`div[data-vf=vf${e.id}]`);t&&t.classList.remove("follow-up","follow-down","follow-error","follow-success");const n=document.getElementById(`vf-${e.id}`);n&&n.classList.remove("follow-up","follow-down")}))},handleFollowStart=exports("aG",(()=>{onClear(),followData.start=!0,followData.index=0,followData.list=[],resetPlaybackToStart(),openToggleRecord(!0),getNoteIndex()})),handleFollowEnd=exports("aH",(()=>{followData.start=!1,openToggleRecord(!1),followData.index=0,console.log("结束")})),next=()=>{gotoNext(state$1.times[followData.index])},getNoteIndex=()=>{const e=state$1.times[followData.index];return e.frequency<=0?(followData.index=followData.index+1,next(),getNoteIndex()):(noteFrequency.value=e.frequency,{id:e.id,min:e.frequency-.5*(e.frequency-e.prevFrequency),max:e.frequency+.5*(e.nextFrequency-e.frequency),duration:e.duration,baseFrequency:e.frequency})};let checking=!1;const onFollowTime=e=>{var t;const n=null==e||null===(t=e.content)||void 0===t?void 0:t.frequency;followData.start&&n>0&&(audioFrequency.value=n,checked())};let startTime=0;const checked=()=>{if(checking)return;checking=!0;const e=getNoteIndex();if(audioFrequency.value<.5*e.baseFrequency)checking=!1;else{if(audioFrequency.value>=e.min&&audioFrequency.value<=e.max)if(0===startTime)startTime=Date.now();else{if((Date.now()-startTime)/1e3>=.6*e.duration)return startTime=0,followData.index=followData.index+1,setColor(e,"",!0),next(),void(checking=!1)}setColor(e,audioFrequency.value>e.baseFrequency?"follow-up":"follow-down"),checking=!1}},setColor=(e,t,n=!1)=>{const i=document.querySelector(`div[data-vf=vf${e.id}]`);i&&(i.classList.remove("follow-up","follow-down","follow-error","follow-success"),n?i.classList.add("follow-success"):i.classList.add("follow-error",t));const r=document.getElementById(`vf-${e.id}`);r&&(r.classList.remove("follow-up","follow-down"),t&&r.classList.add(t))},FollowPractice=exports("aK",defineComponent({name:"follow",setup:()=>(onMounted((async()=>{if(storeData.isApp)api_cloudFollowTime(onFollowTime);else{await audioRecorder.checkSupport()?(audioRecorder.init(),audioRecorder.progress=e=>{onFollowTime({api:"",content:{frequency:e}})}):followData.earphone=!0}console.log("进入跟练模式")})),onUnmounted((()=>{api_cloudFollowTime(onFollowTime,!1),resetPlaybackToStart(),onClear(),openToggleRecord(!1),console.log("退出跟练模式")})),()=>createVNode("div",null,null))}));var EnumMusicRenderType=exports("bc",(e=>(e.staff="staff",e.firstTone="firstTone",e.fixedTone="fixedTone",e))(EnumMusicRenderType||{}));const musicscoresettingKey=exports("aT","musicscoresetting");var IPlatform=exports("b5",(e=>(e.APP="APP",e.PC="PC",e))(IPlatform||{}));const state=reactive({platform:"",appName:"",musicRenderType:"staff",musicRendered:!1,detailId:"",xmlUrl:"",subjectId:0,trackId:0,categoriesId:0,categoriesName:"",enableEvaluation:!0,enableNotation:!1,examSongId:"",examSongName:"",coverImg:"",extConfigJson:{},extStyleConfigJson:{},isOpenMetronome:!1,isShowFingering:!1,music:"",accompany:"",midiUrl:"",parentCategoriesId:0,musicSheetCategoriesId:0,playMode:"MP3",speed:0,originSpeed:0,track:"",partIndex:0,needTick:!1,osmd:null,isSpecialBookCategory:!1,playState:"paused",playEnd:!1,playSource:"music",playProgress:0,activeNoteIndex:0,activeMeasureIndex:0,sectionStatus:!1,section:[],sectionBoundingBoxs:[],isOpenPrepare:!1,sectionFirst:null,times:[],modeType:"practise",setting:{soundEffect:!0,eyeProtection:!1,camera:!1,cameraOpacity:70,repeatAutoPlay:!0,displayFingering:!0,displayCursor:!0,frequency:442,evaluationDifficulty:"ADVANCED",saveToAlbum:!0,enableAccompaniment:!0,reactionTimeMs:0},fixtime:0,fingeringInfo:{},scrollContainer:"musicAndSelection",isPercussion:!1,repeatedBeats:0,partListNames:[],gradual:[],gradualVersion:GradualVersion.BASE,gradualTimes:null,multitrack:0,zoom:.8,musicZoom:1,isSelectMeasureMode:!1,isReport:!1,isHideEvaluatReportSaveBtn:!1,isConcert:!1,userChooseEndIndex:0,repeatInfo:[]}),browserInfo$1=browser();let offset_duration=0;const customData=exports("ab",reactive({customNoteRealValue:[],customNoteCurrentTime:!1})),setStep=()=>{if("play"!==state.playState)return void console.log("暂停播放");let e=Date.now();requestAnimationFrame((()=>{Date.now()-e<16.7?(handlePlaying(),setStep()):setTimeout((()=>{handlePlaying(),setStep()}),16.7)}))},onPlay=()=>{console.log("开始播放"),state.playEnd=!1,offset_duration=browserInfo$1.xiaomi?.2:.08,setStep()},autoResetPlay=()=>{"practise"===state.modeType&&(skipNotePlay(0,!0),state.setting.repeatAutoPlay&&(scrollViewNote(),setTimeout((()=>{togglePlay("play")}),1e3)))},onEnded=()=>{console.log("音频播放结束"),state.playEnd=!0,state.playState="paused",audioListStart(state.playState),handleEndEvaluat(!0),autoResetPlay()},handlePlaying=()=>{var e;const t=getAudioCurrentTime(),n=getAudioDuration();state.playProgress=t/n*100;let i=getNote(t);if(i){if(state.sectionStatus&&2===state.section.length){const e=state.sectionFirst?state.sectionFirst:state.section[0],n=state.section[1];if(Math.abs(n.endtime-t){const n=state.times[e];let i=n.time;var r;(t&&(i=0),n)&&(setAudioCurrentTime(i,e),gotoNext(n),null===(r=metronomeData.metro)||void 0===r||r.sound(i))},togglePlay=exports("a4",(async e=>{if(state.playState=e||("paused"===state.playState?"play":"paused"),"play"===state.playState&&state.sectionStatus&&2==state.section.length&&0===state.playProgress&&resetPlaybackToStart(),"play"===state.playState&&state.needTick){if(!(await handleStartTick()))return state.playState="paused",!1}return"play"==state.playState&&state.sectionStatus&&state.section.length<2&&clearSelection(),audioListStart(state.playState),!0})),handleStopPlay=()=>{state.playState="paused",audioListStart(state.playState)},resetPlaybackToStart=exports("be",(()=>{state.sectionStatus&&2===state.section.length?state.section=formateSelectMearure(state.section):skipNotePlay(0,!0)})),gotoCustomNote=e=>{try{state.osmd.cursor.reset()}catch(t){}for(let n=0;n{"firstTone"!==state.musicRenderType&&"fixedTone"!==state.musicRenderType||nextTick((()=>{let n=e.bbox;if(!n){var i,r,o;const t=((null===(i=document.getElementById("musicAndSelection"))||void 0===i?void 0:i.getBoundingClientRect())||{x:0,y:0}).x||0,a=document.querySelector(`#vf-${null===(r=e.svgElement)||void 0===r||null===(o=r.attrs)||void 0===o?void 0:o.id}`);if(a){var s;const i=a.querySelector(".vf-numbered-note-head"),r=null==i||null===(s=i.getBoundingClientRect)||void 0===s?void 0:s.call(i);r&&(e.bbox={left:r.x-t-r.width/4,width:1.5*r.width},n=e.bbox)}}if(!n)return;const a="PC"===state.platform?29:18,l=(n.width-a)/3;t.cursorElement.style.left=n.left+"px",t.cursorElement.style.transform=`translateX(${l}px)`}))},gotoNext=e=>{const t=e.i;if(state.activeNoteIndex===e.i){try{setCursorPosition(e,state.osmd.cursor)}catch(r){console.log(r)}return}const n=state.osmd;let i=state.activeNoteIndex;if(state.activeNoteIndex=t,state.activeMeasureIndex=e.MeasureNumberXML,i&&t-i==1)n.cursor.next();else if(i&&t-i>0)for(;t-i>0;)i++,n.cursor.next();else gotoCustomNote(t);try{setCursorPosition(e,state.osmd.cursor)}catch(r){console.log(r)}scrollViewNote()},getNote=e=>{const t=state.times,n=state.times.length;if(e>t[n-1].endtime+2)return void onEnded();let i=null;for(let r=state.activeNoteIndex;r=n.time))break;o&&n.time==o.time||(i=n)}return i},handleResetPlay=exports("a6",(()=>{resetPlaybackToStart(),togglePlay("play")})),handleSetSpeed=exports("L",(e=>{setStorageSpeed(state.examSongId,e),state.speed=e})),clearSelection=()=>{state.sectionStatus=!1,state.section=[],closeToast()},handleChangeSection=exports("a3",(()=>{if(state.sectionStatus)return togglePlay("paused"),skipNotePlay(0,!0),void clearSelection();state.sectionStatus=!0,state.sectionStatus&&togglePlay("paused"),showToast({message:"请选择开始小节",duration:0,position:"top",className:"selectionToast"})})),formateSelectMearure=e=>{var t,n;if(!e.length)return[];const i=e.sort(((e,t)=>e.time-t.time)),r=null===(t=i[0])||void 0===t?void 0:t.measureOpenIndex,o=null===(n=i.last())||void 0===n?void 0:n.measureOpenIndex,s=state.times.filter((e=>r===e.measureOpenIndex))||[],a=state.times.filter((e=>o===e.measureOpenIndex))||[];if(!s.length||!a.length)return clearSelection(),[];i[0]=s[0],i[1]=a.last();let l=i[0].i;if(state.isOpenPrepare){const e=i[0].MeasureNumberXML;state.sectionFirst=state.times.find((t=>e-t.MeasureNumberXML==1)),l=state.sectionFirst?state.sectionFirst.i:l}return skipNotePlay(l,0===l),i},handleSelection=e=>{!state.sectionStatus||state.section.length>1||(2!==state.section.length&&e&&(state.section.push(e),2===state.section.length&&(state.section=formateSelectMearure(state.section),closeToast())),1===state.section.length&&showToast({message:"请选择结束小节",duration:0,position:"top",className:"selectionToast"}))},setSection=exports("b4",((e,t,n)=>{var i;const r=state.times.filter((t=>t.noteElement.sourceMeasure.MeasureNumberXML==e)),o=state.times.filter((e=>e.noteElement.sourceMeasure.MeasureNumberXML==t)),s=o[o.length-1].noteId;let a=o.filter((e=>e.noteId===s));const l=verifyCanRepeat(e,t),c=l.canRepeat;let u=t;const h=(null===(i=state.repeatInfo[l.repeatIdx])||void 0===i?void 0:i.end)||0;for(;c&&1===a.length&&a[0].MeasureNumberXML<=h;){u-=1;const e=state.times.filter((e=>e.noteElement.sourceMeasure.MeasureNumberXML==u)),t=e[e.length-1].noteId;a=e.filter((e=>e.noteId===t))}const d=c&&l.repeatIdx==state.repeatInfo.length-1?a.length-1:0,p=r[0],f=a[d];p&&f&&(state.isSelectMeasureMode=!0,hanldeDirectSelection([p,f]),n&&handleSetSpeed(n))})),hanldeDirectSelection=exports("aR",(e=>{Array.isArray(e)&&2===e.length&&(state.sectionStatus=!0,setTimeout((()=>{state.section=formateSelectMearure(e),console.log(333333333,state.section)}),500))}));let offsetTop=0;const scrollViewNote=()=>{const e=document.getElementById("cursorImg-0"),t=document.getElementById(state.scrollContainer);e&&t&&offsetTop!==e.offsetTop&&(offsetTop=e.offsetTop,offsetTop>50?t.scrollTo({top:(offsetTop-50)*state.musicZoom,behavior:"smooth"}):t.scrollTo({top:0,behavior:"smooth"}))},isRhythmicExercises=exports("an",(()=>state.examSongName.indexOf("节奏练习")>-1)),handleRessetState=exports("aD",(()=>{"evaluating"===state.modeType?handleStartEvaluat():"practise"===state.modeType?togglePlay("paused"):"follow"===state.modeType&&toggleFollow(!1)})),state$1=exports("m",state),evaluatCreateMusicPlayer=exports("bd",(()=>api_createMusicPlayer({musicSrc:state.accompany||state.music,tuneSrc:"https://oss.dayaedu.com/cloud-coach/1686725501654check_music1_(1).mp3"})));class AJAX{static ajax(e,t=9e3){let n;const i=e.indexOf(".mxl")>-1?"text/plain; charset=x-user-defined":"application/xml";if(XMLHttpRequest)n=new XMLHttpRequest;else{if(!ActiveXObject)return Promise.reject(new Error("XMLHttp not supported."));n=new ActiveXObject("Microsoft.XMLHTTP")}return n.timeout=t,new Promise(((t,r)=>{n.onreadystatechange=()=>{n.readyState===XMLHttpRequest.DONE&&(200===n.status||0===n.status&&n.responseText?t(n.responseText):r(new Error("Could not retrieve requested URL "+n.status)))},n.ontimeout=e=>{r(new Error("Server request Timeout"))},n.overrideMimeType(i),n.open("GET",e,!0),n.send()}))}}const _Fraction=class{constructor(e=0,t=1,n=0,i=!0){this.numerator=0,this.denominator=1,this.wholeValue=0,this.numerator=e,this.denominator=t,this.wholeValue=n,i&&this.simplify(),this.setRealValue()}static max(e,t){return e.RealValue>t.RealValue?e:t}static Equal(e,t){return e.wholeValue===t.wholeValue&&e.Denominator===t.Denominator&&e.Numerator===t.Numerator}static createFromFraction(e){return new _Fraction(e.numerator,e.denominator,e.wholeValue,!1)}static plus(e,t){const n=e.clone();return n.Add(t),n}static minus(e,t){const n=e.clone();return n.Sub(t),n}static multiply(e,t){return new _Fraction((e.wholeValue*e.denominator+e.numerator)*(t.wholeValue*t.denominator+t.numerator),e.denominator*t.denominator)}static greatestCommonDenominator(e,t){if(0===e)return t;if(1===t)return 1;for(;Math.abs(t)>1e-8;)e>t?e-=t:t-=e;return Math.round(e)}toString(){let e=this.numerator+"/"+this.denominator;return 0!==this.wholeValue&&(e=this.wholeValue+" "+e),e}clone(){return new _Fraction(this.numerator,this.denominator,this.wholeValue,!1)}get Numerator(){return this.numerator}set Numerator(e){this.numerator!==e&&(this.numerator=e,this.simplify(),this.setRealValue())}get Denominator(){return this.denominator}set Denominator(e){this.denominator!==e&&(this.denominator=e,0!==this.numerator&&this.simplify(),this.setRealValue())}get WholeValue(){return this.wholeValue}set WholeValue(e){this.wholeValue!==e&&(this.wholeValue=e,this.setRealValue())}GetExpandedNumerator(){return this.wholeValue*this.denominator+this.numerator}calculateNumberOfNeededDots(){let e=1,t=2;const n=this.GetExpandedNumerator();for(;te;)t.Numerator++;if(this.numerator>this.denominator){const n=new _Fraction(this.numerator-1,this.denominator,this.wholeValue);for(;n.Denominator>e;)n.Numerator--;if(n.Denominator_Fraction.maximumAllowedNumber){const e=this.denominator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/e),this.denominator=Math.round(this.denominator/e)}if(this.numerator>_Fraction.maximumAllowedNumber){const e=this.numerator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/e),this.denominator=Math.round(this.denominator/e)}}isOnBeat(e){const t=this.distanceFromBeat(e);return Math.abs(t)<_Fraction.FloatInaccuracyTolerance}distanceFromBeat(e){const t=new _Fraction(1,e.Denominator);return this.RealValue%t.RealValue}};let Fraction$1=_Fraction;Fraction$1.maximumAllowedNumber=46340,Fraction$1.FloatInaccuracyTolerance=1e-4;class AbstractExpression{constructor(e){this.placement=e}static isStringInStringList(e,t){for(let n=0,i=e.length;n(e[e.Above=0]="Above",e[e.Below=1]="Below",e[e.Left=2]="Left",e[e.Right=3]="Right",e[e.NotYetDefined=4]="NotYetDefined",e[e.AboveOrBelow=5]="AboveOrBelow",e))(PlacementEnum||{});const _ContinuousDynamicExpression=class extends AbstractExpression{constructor(e,t,n,i,r,o,s=""){super(t),super.parentMeasure=i,this.NumberXml=o,this.dynamicType=e,this.label=s,this.staffNumber=n,this.activeInstantaneousDynamic=r,this.startVolume=1,this.endVolume=1,this.setStartAndEndVolume(),""!==s&&this.setType()}setStartAndEndVolume(){this.activeInstantaneousDynamic&&(0===this.dynamicType&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=1.2*this.activeInstantaneousDynamic.Volume),1===this.dynamicType&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=.8*this.activeInstantaneousDynamic.Volume))}get DynamicType(){return this.dynamicType}set DynamicType(e){this.dynamicType=e}get StartMultiExpression(){return this.startMultiExpression}set StartMultiExpression(e){this.startMultiExpression=e}get EndMultiExpression(){return this.endMultiExpression}set EndMultiExpression(e){this.endMultiExpression=e}get Placement(){return this.placement}set Placement(e){this.placement=e}get StartVolume(){return this.startVolume}set StartVolume(e){this.startVolume=e}get EndVolume(){return this.endVolume}set EndVolume(e){this.endVolume=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get Label(){return this.label}set Label(e){this.label=e,this.setType()}static isInputStringContinuousDynamic(e){return!!e&&(_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicIncreasing,e)||_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicDecreasing,e))}getInterpolatedDynamic(e){const t=this.StartMultiExpression.AbsoluteTimestamp;let n;if(n=this.EndMultiExpression?this.EndMultiExpression.AbsoluteTimestamp:Fraction$1.plus(this.startMultiExpression.SourceMeasureParent.AbsoluteTimestamp,this.startMultiExpression.SourceMeasureParent.Duration),e.lt(t))return-1;if(n.lt(e))return-2;const i=Fraction$1.minus(e,t).RealValue/Fraction$1.minus(n,t).RealValue;return Math.max(0,Math.min(99.9,this.startVolume+(this.endVolume-this.startVolume)*i))}isWedge(){return!this.label}setType(){_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicIncreasing,this.label)?this.dynamicType=0:_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicDecreasing,this.label)&&(this.dynamicType=1)}};let ContinuousDynamicExpression=_ContinuousDynamicExpression;ContinuousDynamicExpression.listContinuousDynamicIncreasing=["crescendo","cresc","cresc.","cres."],ContinuousDynamicExpression.listContinuousDynamicDecreasing=["decrescendo","decresc","decr.","diminuendo","dim.","dim"];var ContDynamicEnum=(e=>(e[e.crescendo=0]="crescendo",e[e.diminuendo=1]="diminuendo",e))(ContDynamicEnum||{}),DynamicExpressionSymbolEnum=(e=>(e[e.p=0]="p",e[e.f=1]="f",e[e.s=2]="s",e[e.z=3]="z",e[e.m=4]="m",e[e.r=5]="r",e))(DynamicExpressionSymbolEnum||{});class MusicSheetReadingException{constructor(e,t){this.message=e,t&&(this.message+=" "+t.toString())}}class ArgumentOutOfRangeException{constructor(e){this.message=e}}class InvalidEnumArgumentException{constructor(e){this.message=e}}var loglevelExports={},loglevel={get exports(){return loglevelExports},set exports(e){loglevelExports=e}};!function(t){var n,i;n=commonjsGlobal,i=function(){var t=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,n){var i=t[n];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var i=0;i=0&&t<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(o=t,!1!==i&&function(e){var t=(r[e]||"silent").toUpperCase();if(typeof window!==n&&l){try{return void(window.localStorage[l]=t)}catch(i){}try{window.document.cookie=encodeURIComponent(l)+"="+t+";"}catch(i){}}}(t),a.call(s,t,e),typeof console===n&&t=0;r--)if(i(e[r],t))return r;return-1}function contains(e,t,n){return indexOf$1(e,t,n)>=0}function remove(e,t,n){var i=indexOf$1(e,t,n);return!(i<0)&&(e.splice(i,1),!0)}function frequency(e,t,n){for(var i=n||util$a.defaultEquals,r=e.length,o=0,s=0;s=e.length||n<0||n>=e.length)return!1;var i=e[t];return e[t]=e[n],e[n]=i,!0}function toString$1(e){return"["+e.toString()+"]"}function forEach(e,t){for(var n=0,i=e;ne.size())return!1;var t=!0;return this.forEach((function(n){return!!e.contains(n)||(t=!1,!1)})),t},e.prototype.remove=function(e){return!!this.contains(e)&&(this.dictionary.remove(e),!0)},e.prototype.forEach=function(e){this.dictionary.forEach((function(t,n){return e(n)}))},e.prototype.toArray=function(){return this.dictionary.values()},e.prototype.isEmpty=function(){return this.dictionary.isEmpty()},e.prototype.size=function(){return this.dictionary.size()},e.prototype.clear=function(){this.dictionary.clear()},e.prototype.toString=function(){return arrays$3.toString(this.toArray())},e}();_Set.default=Set$1,Object.defineProperty(Bag$1,"__esModule",{value:!0});var util$7=util$b,Dictionary_1$4=Dictionary$2,Set_1$1=_Set,Bag=function(){function e(e){this.toStrF=e||util$7.defaultToString,this.dictionary=new Dictionary_1$4.default(this.toStrF),this.nElements=0}return e.prototype.add=function(e,t){if(void 0===t&&(t=1),util$7.isUndefined(e)||t<=0)return!1;if(this.contains(e))this.dictionary.getValue(e).copies+=t;else{var n={value:e,copies:t};this.dictionary.setValue(e,n)}return this.nElements+=t,!0},e.prototype.count=function(e){return this.contains(e)?this.dictionary.getValue(e).copies:0},e.prototype.contains=function(e){return this.dictionary.containsKey(e)},e.prototype.remove=function(e,t){if(void 0===t&&(t=1),util$7.isUndefined(e)||t<=0)return!1;if(this.contains(e)){var n=this.dictionary.getValue(e);return t>n.copies?this.nElements-=n.copies:this.nElements-=t,n.copies-=t,n.copies<=0&&this.dictionary.remove(e),!0}return!1},e.prototype.toArray=function(){for(var e=[],t=0,n=this.dictionary.values();tthis.nElements||util$6.isUndefined(e))return!1;var n=this.createNode(e);if(0===this.nElements||null===this.lastNode)this.firstNode=n,this.lastNode=n;else if(t===this.nElements)this.lastNode.next=n,this.lastNode=n;else if(0===t)n.next=this.firstNode,this.firstNode=n;else{var i=this.nodeAtIndex(t-1);if(null===i)return!1;n.next=i.next,i.next=n}return this.nElements++,!0},e.prototype.first=function(){if(null!==this.firstNode)return this.firstNode.element},e.prototype.last=function(){if(null!==this.lastNode)return this.lastNode.element},e.prototype.elementAtIndex=function(e){var t=this.nodeAtIndex(e);if(null!==t)return t.element},e.prototype.indexOf=function(e,t){var n=t||util$6.defaultEquals;if(util$6.isUndefined(e))return-1;for(var i=this.firstNode,r=0;null!==i;){if(n(i.element,e))return r;r++,i=i.next}return-1},e.prototype.contains=function(e,t){return this.indexOf(e,t)>=0},e.prototype.remove=function(e,t){var n=t||util$6.defaultEquals;if(this.nElements<1||util$6.isUndefined(e))return!1;for(var i=null,r=this.firstNode;null!==r;){if(n(r.element,e))return null===i?(this.firstNode=r.next,r===this.lastNode&&(this.lastNode=null)):r===this.lastNode?(this.lastNode=i,i.next=r.next,r.next=null):(i.next=r.next,r.next=null),this.nElements--,!0;i=r,r=r.next}return!1},e.prototype.clear=function(){this.firstNode=null,this.lastNode=null,this.nElements=0},e.prototype.equals=function(t,n){var i=n||util$6.defaultEquals;return t instanceof e&&(this.size()===t.size()&&this.equalsAux(this.firstNode,t.firstNode,i))},e.prototype.equalsAux=function(e,t,n){for(;null!==e&&null!==t;){if(!n(e.element,t.element))return!1;e=e.next,t=t.next}return!0},e.prototype.removeElementAtIndex=function(e){if(!(e<0||e>=this.nElements||null===this.firstNode||null===this.lastNode)){var t;if(1===this.nElements)t=this.firstNode.element,this.firstNode=null,this.lastNode=null;else{var n=this.nodeAtIndex(e-1);null===n?(t=this.firstNode.element,this.firstNode=this.firstNode.next):n.next===this.lastNode&&(t=this.lastNode.element,this.lastNode=n),null!==n&&null!==n.next&&(t=n.next.element,n.next=n.next.next)}return this.nElements--,t}},e.prototype.forEach=function(e){for(var t=this.firstNode;null!==t&&!1!==e(t.element);)t=t.next},e.prototype.reverse=function(){for(var e=null,t=this.firstNode,n=null;null!==t;)n=t.next,t.next=e,e=t,t=n;n=this.firstNode,this.firstNode=this.lastNode,this.lastNode=n},e.prototype.toArray=function(){for(var e=[],t=this.firstNode;null!==t;)e.push(t.element),t=t.next;return e},e.prototype.size=function(){return this.nElements},e.prototype.isEmpty=function(){return this.nElements<=0},e.prototype.toString=function(){return arrays$2.toString(this.toArray())},e.prototype.nodeAtIndex=function(e){if(e<0||e>=this.nElements)return null;if(e===this.nElements-1)return this.lastNode;for(var t=this.firstNode,n=0;n0&&(e=e.rightCh);return e},e.prototype.transplant=function(e,t){null===e.parent?this.root=t:e===e.parent.leftCh?e.parent.leftCh=t:e.parent.rightCh=t,null!==t&&(t.parent=e.parent)},e.prototype.removeNode=function(e){if(null===e.leftCh)this.transplant(e,e.rightCh);else if(null===e.rightCh)this.transplant(e,e.leftCh);else{var t=this.minimumAux(e.rightCh);t.parent!==e&&(this.transplant(t,t.rightCh),t.rightCh=e.rightCh,t.rightCh.parent=t),this.transplant(e,t),t.leftCh=e.leftCh,t.leftCh.parent=t}},e.prototype.inorderTraversalAux=function(e,t,n){null===e||n.stop||(this.inorderTraversalAux(e.leftCh,t,n),n.stop||(n.stop=!1===t(e.element),n.stop||this.inorderTraversalAux(e.rightCh,t,n)))},e.prototype.levelTraversalAux=function(e,t){var n=new Queue_1$1.default;for(null!==e&&n.enqueue(e),e=n.dequeue()||null;null!=e;){if(!1===t(e.element))return;null!==e.leftCh&&n.enqueue(e.leftCh),null!==e.rightCh&&n.enqueue(e.rightCh),e=n.dequeue()||null}},e.prototype.preorderTraversalAux=function(e,t,n){null===e||n.stop||(n.stop=!1===t(e.element),n.stop||(this.preorderTraversalAux(e.leftCh,t,n),n.stop||this.preorderTraversalAux(e.rightCh,t,n)))},e.prototype.postorderTraversalAux=function(e,t,n){null===e||n.stop||(this.postorderTraversalAux(e.leftCh,t,n),n.stop||(this.postorderTraversalAux(e.rightCh,t,n),n.stop||(n.stop=!1===t(e.element))))},e.prototype.minimumAux=function(e){for(;null!=e&&null!==e.leftCh;)e=e.leftCh;return e},e.prototype.maximumAux=function(e){for(;null!=e&&null!==e.rightCh;)e=e.rightCh;return e},e.prototype.heightAux=function(e){return null===e?-1:Math.max(this.heightAux(e.leftCh),this.heightAux(e.rightCh))+1},e.prototype.insertNode=function(e){for(var t=null,n=this.root;null!==n;){var i=this.compare(e.element,n.element);if(0===i)return null;i<0?(t=n,n=n.leftCh):(t=n,n=n.rightCh)}return e.parent=t,null===t?this.root=e:this.compare(e.element,t.element)<0?t.leftCh=e:t.rightCh=e,e},e.prototype.createNode=function(e){return{element:e,leftCh:null,rightCh:null,parent:null}},e}();BSTreeKV$1.default=BSTreeKV;var __extends$2=commonjsGlobal&&commonjsGlobal.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics;Object.defineProperty(BSTree$1,"__esModule",{value:!0});var BSTreeKV_1$1=BSTreeKV$1,BSTree=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2(t,e),t}(BSTreeKV_1$1.default);BSTree$1.default=BSTree;var Heap$1={};Object.defineProperty(Heap$1,"__esModule",{value:!0});var collections=util$b,arrays$1=arrays$4,Heap=function(){function e(e){this.data=[],this.compare=e||collections.defaultCompare}return e.prototype.leftChildIndex=function(e){return 2*e+1},e.prototype.rightChildIndex=function(e){return 2*e+2},e.prototype.parentIndex=function(e){return Math.floor((e-1)/2)},e.prototype.minIndex=function(e,t){return t>=this.data.length?e>=this.data.length?-1:e:this.compare(this.data[e],this.data[t])<=0?e:t},e.prototype.siftUp=function(e){for(var t=this.parentIndex(e);e>0&&this.compare(this.data[t],this.data[e])>0;)arrays$1.swap(this.data,t,e),e=t,t=this.parentIndex(e)},e.prototype.siftDown=function(e){for(var t=this.minIndex(this.leftChildIndex(e),this.rightChildIndex(e));t>=0&&this.compare(this.data[e],this.data[t])>0;)arrays$1.swap(this.data,t,e),e=t,t=this.minIndex(this.leftChildIndex(e),this.rightChildIndex(e))},e.prototype.peek=function(){return this.data.length>0?this.data[0]:void 0},e.prototype.add=function(e){return!collections.isUndefined(e)&&(this.data.push(e),this.siftUp(this.data.length-1),!0)},e.prototype.removeRoot=function(){if(this.data.length>0){var e=this.data[0];return this.data[0]=this.data[this.data.length-1],this.data.splice(this.data.length-1,1),this.data.length>0&&this.siftDown(0),e}},e.prototype.contains=function(e){var t=collections.compareToEquals(this.compare);return arrays$1.contains(this.data,e,t)},e.prototype.size=function(){return this.data.length},e.prototype.isEmpty=function(){return this.data.length<=0},e.prototype.clear=function(){this.data.length=0},e.prototype.forEach=function(e){arrays$1.forEach(this.data,e)},e}();Heap$1.default=Heap;var LinkedDictionary$1={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(LinkedDictionary$1,"__esModule",{value:!0});var Dictionary_1$3=Dictionary$2,util$4=util$b,LinkedDictionaryPair=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},e}(),HeadOrTailLinkedDictionaryPair=function(){function e(){this.key=null,this.value=null}return e.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},e}();function isHeadOrTailLinkedDictionaryPair(e){return!e.next}var LinkedDictionary=function(e){function t(t){var n=e.call(this,t)||this;return n.head=new HeadOrTailLinkedDictionaryPair,n.tail=new HeadOrTailLinkedDictionaryPair,n.head.next=n.tail,n.tail.prev=n.head,n}return __extends$1(t,e),t.prototype.appendToTail=function(e){var t=this.tail.prev;t.next=e,e.prev=t,e.next=this.tail,this.tail.prev=e},t.prototype.getLinkedDictionaryPair=function(e){if(!util$4.isUndefined(e)){var t="$"+this.toStr(e);return this.table[t]}},t.prototype.getValue=function(e){var t=this.getLinkedDictionaryPair(e);if(!util$4.isUndefined(t))return t.value},t.prototype.remove=function(t){var n=this.getLinkedDictionaryPair(t);if(!util$4.isUndefined(n))return e.prototype.remove.call(this,t),n.unlink(),n.value},t.prototype.clear=function(){e.prototype.clear.call(this),this.head.next=this.tail,this.tail.prev=this.head},t.prototype.replace=function(e,t){var n="$"+this.toStr(t.key);t.next=e.next,t.prev=e.prev,this.remove(e.key),t.prev.next=t,t.next.prev=t,this.table[n]=t,++this.nElements},t.prototype.setValue=function(e,t){if(!util$4.isUndefined(e)&&!util$4.isUndefined(t)){var n=this.getLinkedDictionaryPair(e),i=new LinkedDictionaryPair(e,t),r="$"+this.toStr(e);return util$4.isUndefined(n)?(this.appendToTail(i),this.table[r]=i,void++this.nElements):(this.replace(n,i),n.value)}},t.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(t)})),e},t.prototype.values=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),e},t.prototype.forEach=function(e){for(var t=this.head.next;!isHeadOrTailLinkedDictionaryPair(t);){if(!1===e(t.key,t.value))return;t=t.next}},t}(Dictionary_1$3.default);LinkedDictionary$1.default=LinkedDictionary;var MultiDictionary$1={};Object.defineProperty(MultiDictionary$1,"__esModule",{value:!0});var util$3=util$b,Dictionary_1$2=Dictionary$2,arrays=arrays$4,MultiDictionary=function(){function e(e,t,n){void 0===n&&(n=!1),this.dict=new Dictionary_1$2.default(e),this.equalsF=t||util$3.defaultEquals,this.allowDuplicate=n}return e.prototype.getValue=function(e){var t=this.dict.getValue(e);return util$3.isUndefined(t)?[]:arrays.copy(t)},e.prototype.setValue=function(e,t){if(util$3.isUndefined(e)||util$3.isUndefined(t))return!1;var n=this.dict.getValue(e);return util$3.isUndefined(n)?(this.dict.setValue(e,[t]),!0):!(!this.allowDuplicate&&arrays.contains(n,t,this.equalsF))&&(n.push(t),!0)},e.prototype.remove=function(e,t){if(util$3.isUndefined(t)){var n=this.dict.remove(e);return!util$3.isUndefined(n)}var i=this.dict.getValue(e);return!(util$3.isUndefined(i)||!arrays.remove(i,t,this.equalsF))&&(0===i.length&&this.dict.remove(e),!0)},e.prototype.keys=function(){return this.dict.keys()},e.prototype.values=function(){for(var e=[],t=0,n=this.dict.values();t-1&&this.insertIdIntoRoot(t,n),this.nodes)if(this.nodes.hasOwnProperty(i)){var r=this.findNodeId(i,e);r>-1&&this.insertIdIntoNode(i,t,r)}},e.prototype.insertIdAfterId=function(e,t){var n=this.findRootId(e);for(var i in n>-1&&this.insertIdIntoRoot(t,n+1),this.nodes)if(this.nodes.hasOwnProperty(i)){var r=this.findNodeId(i,e);r>-1&&this.insertIdIntoNode(i,t,r+1)}},e.prototype.insertIdIntoId=function(e,t){this.nodeInsertAtEnd(e,t),this.nodes[t]=[]},e.prototype.insertIdIntoRoot=function(e,t){if(void 0===t)this.rootInsertAtEnd(e);else if(t<0){var n=this.rootIds.length;this.rootIds.splice(t+n+1,0,e)}else this.rootIds.splice(t,0,e);this.nodes[e]=this.nodes[e]||[]},e.prototype.insertIdIntoNode=function(e,t,n){if(this.nodes[e]=this.nodes[e]||[],this.nodes[t]=this.nodes[t]||[],void 0===n)this.nodeInsertAtEnd(e,t);else if(n<0){var i=this.nodes[e].length;this.nodes[e].splice(n+i+1,0,t)}else this.nodes[e].splice(n,0,t)},e.prototype.moveId=function(e,t,n){var i=e,r=this.findRootId(i);for(var o in this.nodes[t],this.nodes)if(this.nodes.hasOwnProperty(o)){this.findNodeId(o,t);break}var s=t,a=this.findRootId(s);for(var o in this.nodes[t],this.nodes)if(this.nodes.hasOwnProperty(o)){this.findNodeId(o,t);break}if(r>-1)if(a>-1)switch(this.rootDelete(r),a>r&&a--,n){case Direction.BEFORE:this.insertIdIntoRoot(i,a);break;case Direction.AFTER:this.insertIdIntoRoot(i,a+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(s,i);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(s,i)}else for(var o in this.rootDelete(r),this.nodes){if(this.nodes.hasOwnProperty(o))if((l=this.findNodeId(o,s))>-1){switch(n){case Direction.BEFORE:this.insertIdIntoNode(o,i,l);break;case Direction.AFTER:this.insertIdIntoNode(o,i,l+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(s,i);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(s,i)}break}}else if(a>-1){for(var o in this.nodes){if(this.nodes.hasOwnProperty(o))if((l=this.findNodeId(o,i))>-1){this.nodeDeleteAtIndex(o,l);break}}switch(n){case Direction.BEFORE:this.insertIdIntoRoot(i,a);break;case Direction.AFTER:this.insertIdIntoRoot(i,a+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(s,i);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(s,i)}}else{for(var o in this.nodes){if(this.nodes.hasOwnProperty(o))if((l=this.findNodeId(o,i))>-1){this.nodeDeleteAtIndex(o,l);break}}for(var o in this.nodes){var l;if(this.nodes.hasOwnProperty(o))if((l=this.findNodeId(o,s))>-1){switch(n){case Direction.BEFORE:this.insertIdIntoNode(o,i,l);break;case Direction.AFTER:this.insertIdIntoNode(o,i,l+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(s,i);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(s,i)}break}}}},e.prototype.swapArrayElements=function(e,t,n){var i=e[t];return e[t]=e[n],e[n]=i,e},e.prototype.rootDeleteId=function(e){var t=this.findRootId(e);t>-1&&this.rootDelete(t)},e.prototype.nodeAndSubNodesDelete=function(e){for(var t=[],n=0;n(e[e.pppppp=0]="pppppp",e[e.ppppp=1]="ppppp",e[e.pppp=2]="pppp",e[e.ppp=3]="ppp",e[e.pp=4]="pp",e[e.p=5]="p",e[e.mp=6]="mp",e[e.mf=7]="mf",e[e.f=8]="f",e[e.ff=9]="ff",e[e.fff=10]="fff",e[e.ffff=11]="ffff",e[e.fffff=12]="fffff",e[e.ffffff=13]="ffffff",e[e.sf=14]="sf",e[e.sff=15]="sff",e[e.sfp=16]="sfp",e[e.sfpp=17]="sfpp",e[e.fp=18]="fp",e[e.rf=19]="rf",e[e.rfz=20]="rfz",e[e.sfz=21]="sfz",e[e.sffz=22]="sffz",e[e.fz=23]="fz",e[e.other=24]="other",e))(DynamicEnum||{});InstantaneousDynamicExpression.staticConstructor();class DynamicsContainer{constructor(e,t){e instanceof ContinuousDynamicExpression?this.continuousDynamicExpression=e:e instanceof InstantaneousDynamicExpression&&(this.instantaneousDynamicExpression=e),this.staffNumber=t}static Compare(e,t){return e.parMultiExpression().AbsoluteTimestamp.CompareTo(t.parMultiExpression().AbsoluteTimestamp)}parMultiExpression(){return this.continuousDynamicExpression?this.continuousDynamicExpression.StartMultiExpression:this.instantaneousDynamicExpression?this.instantaneousDynamicExpression.ParentMultiExpression:void 0}}class AbstractNotationInstruction{constructor(e){this.printObject=!0,this.parent=e}get Parent(){return this.parent}set Parent(e){this.parent=e}get PrintObject(){return this.printObject}set PrintObject(e){this.printObject=e}}class RhythmInstruction extends AbstractNotationInstruction{constructor(e,t){super(void 0),this.rhythm=e,this.numerator=e.Numerator,this.denominator=e.Denominator,this.symbolEnum=t}get Rhythm(){return this.rhythm}set Rhythm(e){this.rhythm=e}get SymbolEnum(){return this.symbolEnum}set SymbolEnum(e){this.symbolEnum=e}clone(){return new RhythmInstruction(this.rhythm.clone(),this.symbolEnum)}OperatorEquals(e){const t=this;return t===e||!(!t||!e)&&(t.numerator===e.numerator&&t.denominator===e.denominator)}OperatorNotEqual(e){return!(this===e)}ToString(){return"Rhythm: "+this.rhythm.toString()}}var RhythmSymbolEnum=(e=>(e[e.NONE=0]="NONE",e[e.COMMON=1]="COMMON",e[e.CUT=2]="CUT",e))(RhythmSymbolEnum||{});class MusicPartManagerIterator{constructor(e,t,n){this.currentMeasureIndex=0,this.currentPartIndex=0,this.currentVoiceEntryIndex=-1,this.currentDynamicEntryIndex=0,this.currentTempoEntryIndex=0,this.currentDynamicChangingExpressions=[],this.repetitionIterationCountDictKeys=[],this.repetitionIterationCountDictValues=[],this.currentRepetition=void 0,this.endReached=!1,this.frontReached=!1,this.currentTimeStamp=new Fraction$1(0,1),this.currentEnrolledMeasureTimestamp=new Fraction$1(0,1),this.currentRelativeInMeasureTimestamp=new Fraction$1(0,1),this.currentVerticalContainerInMeasureTimestamp=new Fraction$1(0,1),this.jumpResponsibleRepetition=void 0,this.activeDynamicExpressions=[];try{this.frontReached=!0,this.musicSheet=e,this.currentBpm=e.userStartTempoInBPM,this.currentVoiceEntries=void 0,this.frontReached=!1;for(const e of this.musicSheet.Repetitions)this.setRepetitionIterationCount(e,1);for(let t=0;t=this.JumpResponsibleRepetition.StartIndex&&n.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(n)}}handleRepetitionsAtMeasureEnd(){for(let e=0,t=this.currentMeasure.LastRepetitionInstructions.length;e-1&&this.getRepetitionIterationCount(n)=this.JumpResponsibleRepetition.StartIndex&&n.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(n),this.repetitionIterationCountDictKeys.contains(n))){const e=n.getForwardJumpTargetForIteration(this.getRepetitionIterationCount(n));if(e>=0)return this.currentMeasureIndex=e,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.jumpResponsibleRepetition=n,void(this.forwardJumpOccurred=!0);-2===e&&(this.endReached=!0)}}}this.currentMeasureIndex++,void 0!==this.JumpResponsibleRepetition&&this.currentMeasureIndex>this.JumpResponsibleRepetition.EndIndex&&(this.jumpResponsibleRepetition=void 0)}doBackJump(e){this.currentMeasureIndex=e.getBackwardJumpTarget(),this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.incrementRepetitionIterationCount(e),this.jumpResponsibleRepetition=e,this.backJumpOccurred=!0}activateCurrentRhythmInstructions(){if(void 0!==this.currentMeasure&&this.currentMeasure.FirstInstructionsStaffEntries.length>0&&void 0!==this.currentMeasure.FirstInstructionsStaffEntries[0]){const e=this.currentMeasure.FirstInstructionsStaffEntries[0].Instructions;for(let t=0,n=e.length;t0&&(this.currentDynamicEntryIndex>=e.length||e[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentDynamicEntryIndex--;for(;this.currentDynamicEntryIndex0&&(this.currentTempoEntryIndex>=t.length||t[this.currentTempoEntryIndex].AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentTempoEntryIndex--;for(;this.currentTempoEntryIndex=0&&this.currentVoiceEntryIndex=0&&this.currentMeasureIndex0){if(!e)return!0;for(let e=0,n=t.length;et&&(this.openSheetMusicDisplay.Sheet.SelectionStart=this.openSheetMusicDisplay.Sheet.SourceMeasures[t].AbsoluteTimestamp),this.openSheetMusicDisplay.Sheet&&this.openSheetMusicDisplay.Sheet.SourceMeasures.length>n){const e=this.openSheetMusicDisplay.Sheet.SourceMeasures[n];this.openSheetMusicDisplay.Sheet.SelectionEnd=Fraction$1.plus(e.AbsoluteTimestamp,e.Duration)}this.iterator=this.manager.getIterator()}getStaffEntryFromVoiceEntry(e){const t=e.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.measureListIndex,n=e.ParentSourceStaffEntry.ParentStaff.idInMusicSheet;return this.graphic.findGraphicalStaffEntryFromMeasureList(n,t,e.ParentSourceStaffEntry)}updateWithTimestamp(e){const t=this.manager.absoluteEnrolledToSheetTimestamp(e),n=this.graphic.calculateXPositionFromTimestamp(t),i=n[0],r=n[1];this.updateCurrentPageFromSystem(r);const o=n[2];if(!o)return;const s=Math.max(o.parentMeasure.MeasureNumber,1);let a;for(const h of this.graphic.MeasureList[s-1])if(h){a=h;break}const l=this.graphic.calculateCursorPoints(i,r),c=l[0].y,u=l[1].y-c;if(a){if(this.updateWidthAndStyle(a.PositionAndShape,i,c,u),this.openSheetMusicDisplay.FollowCursor){const e=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:e<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}}update(){if(this.hidden||void 0===this.hidden||null===this.hidden)return;this.updateCurrentPage();const e=this.Iterator,t=e.CurrentVisibleVoiceEntries();if(e.EndReached||!e.CurrentVoiceEntries||0===t.length)return;let n,i=0,r=0,o=0;if(e.CurrentMeasure.isReducedToMultiRest){const t=this.graphic.findGraphicalMeasure(e.CurrentMeasureIndex,0),r=t.parentSourceMeasure.multipleRestMeasures,o=e.CurrentMeasure.multipleRestMeasureNumber/(r+1),s=t.PositionAndShape.Size.width-t.beginInstructionsWidth;i=t.PositionAndShape.AbsolutePosition.x+t.beginInstructionsWidth+o*s,n=t.ParentMusicSystem}else{const e=t.map((e=>this.getStaffEntryFromVoiceEntry(e))).sort(((e,t)=>{var n,i,r,o;return(null==e||null===(n=e.PositionAndShape)||void 0===n||null===(i=n.AbsolutePosition)||void 0===i?void 0:i.x)<=(null==t||null===(r=t.PositionAndShape)||void 0===r||null===(o=r.AbsolutePosition)||void 0===o?void 0:o.x)?-1:1}))[0];e&&(i=e.PositionAndShape.AbsolutePosition.x,n=e.parentMeasure.ParentMusicSystem)}if(!n)return;r=n.PositionAndShape.AbsolutePosition.y+n.StaffLines[0].PositionAndShape.RelativePosition.y;const s=n.StaffLines[n.StaffLines.length-1];o=n.PositionAndShape.AbsolutePosition.y+s.PositionAndShape.RelativePosition.y+s.StaffHeight-r;const a=this.graphic.findGraphicalMeasure(e.CurrentMeasureIndex,0).PositionAndShape;if(this.updateWidthAndStyle(a,i,r,o),this.openSheetMusicDisplay.FollowCursor&&this.cursorOptions.follow)if(this.openSheetMusicDisplay.EngravingRules.RenderSingleHorizontalStaffline)this.cursorElement.scrollIntoView({behavior:"smooth",inline:"center"});else{const e=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:e<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}updateWidthAndStyle(e,t,n,i){var r;const o=this.cursorElement;let s=0,a=i;switch(this.cursorOptions.type){case 1:o.style.top=10*n*this.openSheetMusicDisplay.zoom+"px",o.style.left=10*(t-1.5)*this.openSheetMusicDisplay.zoom+"px",a=10*i*this.openSheetMusicDisplay.zoom,o.height=a,o.style.height=a+"px",s=5*this.openSheetMusicDisplay.zoom;break;case 2:o.style.top=10*(n-2.5)*this.openSheetMusicDisplay.zoom+"px",o.style.left=10*t*this.openSheetMusicDisplay.zoom+"px",a=15*this.openSheetMusicDisplay.zoom,o.height=a,o.style.height=a+"px",s=5*this.openSheetMusicDisplay.zoom;break;case 3:o.style.top=10*e.AbsolutePosition.y*this.openSheetMusicDisplay.zoom+"px",o.style.left=10*e.AbsolutePosition.x*this.openSheetMusicDisplay.zoom+"px",a=10*i*this.openSheetMusicDisplay.zoom,o.height=a,o.style.height=a+"px",s=10*e.Size.width*this.openSheetMusicDisplay.zoom;break;case 4:o.style.top=10*e.AbsolutePosition.y*this.openSheetMusicDisplay.zoom+"px",o.style.left=10*e.AbsolutePosition.x*this.openSheetMusicDisplay.zoom+"px",a=10*i*this.openSheetMusicDisplay.zoom,o.height=a,o.style.height=a+"px",s=10*(t-e.AbsolutePosition.x)*this.openSheetMusicDisplay.zoom;break;default:o.style.top=10*n*this.openSheetMusicDisplay.zoom+"px",o.style.left=10*(t-1.5)*this.openSheetMusicDisplay.zoom+"px",a=10*i*this.openSheetMusicDisplay.zoom,o.height=a,o.style.height=a+"px",s=30*this.openSheetMusicDisplay.zoom}null!==(r=window.GYM)&&void 0!==r&&r.multitrack&&(o.height=a+24,o.style.height=a+24+"px"),s!==o.width&&(o.width=s,this.updateStyle(s,this.cursorOptions))}hide(){this.cursorElement.style.display="none",this.hidden=!0}next(){this.Iterator.moveToNextVisibleVoiceEntry(!1),this.update()}reset(){this.resetIterator();const e=this.manager.getIterator(this.graphic.ParentMusicSheet.SelectionStart);this.updateWithTimestamp(e.CurrentEnrolledTimestamp)}updateStyle(e,t=undefined){void 0!==t&&(this.cursorOptions=t);const n=document.createElement("canvas");n.width=this.cursorElement.width,n.height=1;const i=n.getContext("2d");i.globalAlpha=this.cursorOptions.alpha;const r=i.createLinearGradient(0,0,this.cursorElement.width,0);switch(this.cursorOptions.type){case 1:case 2:case 3:case 4:r.addColorStop(1,this.cursorOptions.color);break;default:r.addColorStop(0,"white"),r.addColorStop(.2,this.cursorOptions.color),r.addColorStop(.8,this.cursorOptions.color),r.addColorStop(1,"white")}i.fillStyle=r,i.fillRect(0,0,e,1),this.cursorElement.src=n.toDataURL("image/png")}get Iterator(){return this.iterator}get Hidden(){return this.hidden}VoicesUnderCursor(e){return this.Iterator.CurrentVisibleVoiceEntries(e)}NotesUnderCursor(e){const t=this.VoicesUnderCursor(e),n=[];return t.forEach((e=>{n.push.apply(n,e.Notes)})),n}GNotesUnderCursor(e){const t=this.VoicesUnderCursor(e),n=[];return t.forEach((e=>{n.push(...e.Notes.map((e=>this.rules.GNote(e))))})),n}updateCurrentPage(){const e=this.Iterator.currentTimeStamp;for(const t of this.graphic.MusicPages){if(t.MusicSystems.last().GetSystemsLastTimeStamp().gt(e)){const e=t.PageNumber;return e!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+e),this.container.appendChild(this.cursorElement)),this.currentPageNumber=e}}return 1}updateCurrentPageFromSystem(e){if(null!=e&&e.Parent){const t=e.Parent.PageNumber;return t!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+t),this.container.appendChild(this.cursorElement)),this.currentPageNumber=t}return 1}}class PointF2D{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}static get Empty(){return new PointF2D}static pointsAreEqual(e,t){return e.x===t.x&&e.y===t.y}ToString(){return"["+this.x+", "+this.y+"]"}}class SizeF2D{constructor(e=0,t=0){this.width=e,this.height=t}}class RectangleF2D{constructor(e,t,n,i){this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=t,this.width=n,this.height=i}static createFromLocationAndSize(e,t){return new RectangleF2D(e.x,e.y,t.width,t.height)}get Location(){return new PointF2D(this.x,this.y)}get Size(){return new SizeF2D(this.width,this.height)}}class AClassHierarchyTrackable{isInstanceOfClass(e){let t=this.constructor.prototype;for(;t;){if(e===t.constructor.name)return!0;t=t.__proto__}return!1}}class GraphicalObject extends AClassHierarchyTrackable{get PositionAndShape(){return this.boundingBox}set PositionAndShape(e){this.boundingBox=e}}class StaffLineActivitySymbol extends GraphicalObject{constructor(e){super(),this.parentStaffLine=e;const t=e.PositionAndShape;this.boundingBox=new BoundingBox$1(this,t),this.boundingBox.BorderRight=6,this.boundingBox.BorderBottom=4.5,this.boundingBox.BorderLeft=-1.5,this.boundingBox.BorderTop=-1.5}}class Clickable extends GraphicalObject{}let BoundingBox$1=class{constructor(e=undefined,t=undefined,n=!1){this.isSymbol=!1,this.relativePositionHasBeenSet=!1,this.xBordersHaveBeenSet=!1,this.yBordersHaveBeenSet=!1,this.absolutePosition=new PointF2D,this.relativePosition=new PointF2D,this.size=new SizeF2D,this.marginSize=new SizeF2D,this.upperLeftCorner=new PointF2D,this.upperLeftMarginCorner=new PointF2D,this.borderLeft=0,this.borderRight=0,this.borderTop=0,this.borderBottom=0,this.borderMarginLeft=0,this.borderMarginRight=0,this.borderMarginTop=0,this.borderMarginBottom=0,this.childElements=[],this.parent=t,this.dataObject=e,this.isSymbol=n,this.xBordersHaveBeenSet=!1,this.yBordersHaveBeenSet=!1,t&&(this.Parent=t)}get RelativePositionHasBeenSet(){return this.relativePositionHasBeenSet}get XBordersHaveBeenSet(){return this.xBordersHaveBeenSet}set XBordersHaveBeenSet(e){this.xBordersHaveBeenSet=e}get YBordersHaveBeenSet(){return this.yBordersHaveBeenSet}set YBordersHaveBeenSet(e){this.yBordersHaveBeenSet=e}get AbsolutePosition(){return this.absolutePosition}set AbsolutePosition(e){this.absolutePosition=e}get RelativePosition(){return this.relativePosition}set RelativePosition(e){this.relativePosition=e,this.relativePositionHasBeenSet=!0}get Size(){return this.size}set Size(e){this.size=e}get MarginSize(){return this.marginSize}get UpperLeftCorner(){return this.upperLeftCorner}get UpperLeftMarginCorner(){return this.upperLeftMarginCorner}get BorderLeft(){return this.borderLeft}set BorderLeft(e){this.borderLeft=e,this.calculateRectangle()}get BorderRight(){return this.borderRight}set BorderRight(e){this.borderRight=e,this.calculateRectangle()}get BorderTop(){return this.borderTop}set BorderTop(e){this.borderTop=e,this.calculateRectangle()}get BorderBottom(){return this.borderBottom}set BorderBottom(e){this.borderBottom=e,this.calculateRectangle()}get BorderMarginLeft(){return this.borderMarginLeft>this.borderLeft?this.borderLeft:this.borderMarginLeft}set BorderMarginLeft(e){this.borderMarginLeft=e,this.calculateMarginRectangle()}get BorderMarginRight(){return this.borderMarginRightthis.borderTop?this.borderTop:this.borderMarginTop}set BorderMarginTop(e){this.borderMarginTop=e,this.calculateMarginRectangle()}get BorderMarginBottom(){return this.borderMarginBottom-1&&this.parent.ChildElements.splice(e,1)}(this.parent=e,(null===(t=this.parent)||void 0===t||null===(n=t.ChildElements)||void 0===n?void 0:n.indexOf(this))>-1)?loglevelExports.error("BoundingBox of "+this.dataObject.constructor.name+" already in children list of "+this.parent.dataObject.constructor.name+"'s BoundingBox"):null===(i=this.parent)||void 0===i||null===(r=i.ChildElements)||void 0===r||r.push(this)}get DataObject(){return this.dataObject}get Center(){return new PointF2D(this.RelativePosition.x+(this.BorderMarginRight+this.BorderMarginLeft),this.RelativePosition.y+(this.BorderMarginBottom+this.BorderMarginTop))}setAbsolutePositionFromParent(){this.parent?(this.absolutePosition.x=this.parent.AbsolutePosition.x+this.relativePosition.x,this.absolutePosition.y=this.parent.AbsolutePosition.y+this.relativePosition.y):this.absolutePosition=this.relativePosition}calculateAbsolutePosition(){this.absolutePosition.x=this.relativePosition.x,this.absolutePosition.y=this.relativePosition.y;let e=this.parent;for(;e;)this.absolutePosition.x+=e.relativePosition.x,this.absolutePosition.y+=e.relativePosition.y,e=e.parent}calculateAbsolutePositionsRecursiveWithoutTopelement(){this.absolutePosition.x=0,this.absolutePosition.y=0;for(let e=0,t=this.ChildElements.length;e.001;break;case 2:case 3:i=this.relativePosition.y,e.calculateMarginPositionAlongDirection(this,t),r=Math.abs(i-this.relativePosition.y)>.001;break;default:throw new ArgumentOutOfRangeException("direction")}}while(r)}collisionDetection(e){const t=Math.min(this.AbsolutePosition.x+this.borderRight,e.absolutePosition.x+e.borderRight)-Math.max(this.AbsolutePosition.x+this.borderLeft,e.absolutePosition.x+e.borderLeft),n=Math.min(this.AbsolutePosition.y+this.borderBottom,e.absolutePosition.y+e.borderBottom)-Math.max(this.AbsolutePosition.y+this.borderTop,e.absolutePosition.y+e.borderTop);return t>0&&n>0}liesInsideBorders(e){const t=this.AbsolutePosition.x+this.borderLeft<=e.absolutePosition.x+e.borderLeft&&e.absolutePosition.x+e.borderLeft<=this.AbsolutePosition.x+this.borderRight,n=this.AbsolutePosition.x+this.borderLeft<=e.absolutePosition.x+e.borderRight&&e.absolutePosition.x+e.borderRight<=this.AbsolutePosition.x+this.borderRight;if(t&&n){const t=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderTop&&e.absolutePosition.y+e.borderTop<=this.AbsolutePosition.y+this.borderBottom,n=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderBottom&&e.absolutePosition.y+e.borderBottom<=this.AbsolutePosition.y+this.borderBottom;if(t&&n)return!0}return!1}pointLiesInsideBorders(e){if(this.AbsolutePosition.x+this.borderLeft<=e.x&&e.x<=this.AbsolutePosition.x+this.borderRight){if(this.AbsolutePosition.y+this.borderTop<=e.y&&e.y<=this.AbsolutePosition.y+this.borderBottom)return!0}return!1}marginCollisionDetection(e){const t=Math.min(this.AbsolutePosition.x+this.borderMarginRight,e.absolutePosition.x+e.borderMarginRight)-Math.max(this.AbsolutePosition.x+this.borderMarginLeft,e.absolutePosition.x+e.borderMarginLeft),n=Math.min(this.AbsolutePosition.y+this.borderMarginBottom,e.absolutePosition.y+e.borderMarginBottom)-Math.max(this.AbsolutePosition.y+this.borderMarginTop,e.absolutePosition.y+e.borderMarginTop);return t>0&&n>0}liesInsideMargins(e){const t=this.AbsolutePosition.x+this.borderMarginLeft<=e.absolutePosition.x+e.borderMarginLeft&&e.absolutePosition.x+e.borderMarginLeft<=this.AbsolutePosition.x+this.borderMarginRight,n=this.AbsolutePosition.x+this.borderMarginLeft<=e.absolutePosition.x+e.borderMarginRight&&e.absolutePosition.x+e.borderMarginRight<=this.AbsolutePosition.x+this.borderMarginRight;if(t&&n){const t=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginTop&&e.absolutePosition.y+e.borderMarginTop<=this.AbsolutePosition.y+this.borderMarginBottom,n=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginBottom&&e.absolutePosition.y+e.borderMarginBottom<=this.AbsolutePosition.y+this.borderMarginBottom;if(t&&n)return!0}return!1}pointLiesInsideMargins(e){if(this.AbsolutePosition.x+this.borderMarginLeft<=e.x&&e.x<=this.AbsolutePosition.x+this.borderMarginRight){if(this.AbsolutePosition.y+this.borderMarginTop<=e.y&&e.y<=this.AbsolutePosition.y+this.borderMarginBottom)return!0}return!1}computeNonOverlappingPosition(e,t,n){this.RelativePosition=new PointF2D(n.x,n.y),this.setAbsolutePositionFromParent();let i=0,r=!1;do{switch(t){case 0:case 1:i=this.relativePosition.x,e.calculatePositionAlongDirection(this,t),r=Math.abs(i-this.relativePosition.x)>1e-4;break;case 2:case 3:i=this.relativePosition.y,e.calculatePositionAlongDirection(this,t),r=Math.abs(i-this.relativePosition.y)>1e-4;break;default:throw new ArgumentOutOfRangeException("direction")}}while(r)}getClickedObjectOfType(e){const t=this.dataObject;if(this.pointLiesInsideBorders(e)&&t)return t;for(let n=0,i=this.childElements.length;n(e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e))(ColDirEnum||{});class GraphicalMusicPage extends GraphicalObject{constructor(e){super(),this.musicSystems=[],this.labels=[],this.parent=e,this.boundingBox=new BoundingBox$1(this,void 0)}get MusicSystems(){return this.musicSystems}set MusicSystems(e){this.musicSystems=e}get Labels(){return this.labels}set Labels(e){this.labels=e}get Parent(){return this.parent}set Parent(e){this.parent=e}get PageNumber(){return this.pageNumber}set PageNumber(e){this.pageNumber=e}setMusicPageAbsolutePosition(e,t){return new PointF2D(0,0)}}var PagePlacementEnum=(e=>(e[e.Down=0]="Down",e[e.Right=1]="Right",e[e.RightDown=2]="RightDown",e))(PagePlacementEnum||{}),TextAlignmentEnum=(e=>(e[e.LeftTop=0]="LeftTop",e[e.LeftCenter=1]="LeftCenter",e[e.LeftBottom=2]="LeftBottom",e[e.CenterTop=3]="CenterTop",e[e.CenterCenter=4]="CenterCenter",e[e.CenterBottom=5]="CenterBottom",e[e.RightTop=6]="RightTop",e[e.RightCenter=7]="RightCenter",e[e.RightBottom=8]="RightBottom",e))(TextAlignmentEnum||{});class TextAlignment{static IsLeft(e){return 0===e||1===e||2===e}static IsCenterAligned(e){return 3===e||4===e||5===e}static IsRight(e){return 6===e||7===e||8===e}}var FontStyles=(e=>(e[e.Regular=0]="Regular",e[e.Bold=1]="Bold",e[e.Italic=2]="Italic",e[e.BoldItalic=3]="BoldItalic",e[e.Underlined=4]="Underlined",e))(FontStyles||{}),Fonts=(e=>(e[e.TimesNewRoman=0]="TimesNewRoman",e[e.Kokila=1]="Kokila",e[e.Gonville=2]="Gonville",e))(Fonts||{});const FontStringNames={0:"Times New Roman",1:"Kokila",2:"Gonville"};var TieTypes=(e=>(e.SIMPLE="",e.HAMMERON="H",e.PULLOFF="P",e.SLIDE="S",e.TAPPING="T",e))(TieTypes||{});const Additional={"-2":[4,12,23],"-7":[13],"-9":[6]};var NoteEnum=(e=>(e[e.C=0]="C",e[e.D=2]="D",e[e.E=4]="E",e[e.F=5]="F",e[e.G=7]="G",e[e.A=9]="A",e[e.B=11]="B",e))(NoteEnum||{}),AccidentalEnum=(e=>(e[e.SHARP=0]="SHARP",e[e.FLAT=1]="FLAT",e[e.NONE=2]="NONE",e[e.NATURAL=3]="NATURAL",e[e.DOUBLESHARP=4]="DOUBLESHARP",e[e.DOUBLEFLAT=5]="DOUBLEFLAT",e[e.TRIPLESHARP=6]="TRIPLESHARP",e[e.TRIPLEFLAT=7]="TRIPLEFLAT",e[e.QUARTERTONESHARP=8]="QUARTERTONESHARP",e[e.QUARTERTONEFLAT=9]="QUARTERTONEFLAT",e[e.SLASHFLAT=10]="SLASHFLAT",e[e.THREEQUARTERSSHARP=11]="THREEQUARTERSSHARP",e[e.THREEQUARTERSFLAT=12]="THREEQUARTERSFLAT",e[e.SLASHQUARTERSHARP=13]="SLASHQUARTERSHARP",e[e.SLASHSHARP=14]="SLASHSHARP",e[e.DOUBLESLASHFLAT=15]="DOUBLESLASHFLAT",e[e.SORI=16]="SORI",e[e.KORON=17]="KORON",e))(AccidentalEnum||{});const _Pitch=class{constructor(e,t,n,i=undefined){this.accidental=2,this.fundamentalNote=e,this.octave=t,this.accidental=n,this.accidentalXml=i,this.halfTone=e+12*(t+_Pitch.octXmlDiff)+_Pitch.HalfTonesFromAccidental(n),this.frequency=_Pitch.calcFrequency(this),this.nextFrequency=_Pitch.calcFrequency(this,"next"),this.prevFrequency=_Pitch.calcFrequency(this,"prev")}static getNoteEnumString(e){switch(e){case 0:return"C";case 2:return"D";case 4:return"E";case 5:return"F";case 7:return"G";case 9:return"A";case 11:return"B";default:return""}}static lineShiftFromNoteEnum(e,t){if(0===t)return[e,0];const n=_Pitch.pitchEnumValues,i=n.indexOf(e);let r=0,o=(i+t)%n.length;return i+t>n.length-1&&(r=1),o<0&&(o=n.length+o,r=-1),[n[o],r]}static CalculateTransposedHalfTone(e,t){const n=e.fundamentalNote+e.AccidentalHalfTones+t;return _Pitch.WrapAroundCheck(n,12)}static WrapAroundCheck(e,t){let n=0;for(;e<0;)e+=t,n--;for(;e>=t;)e-=t,n++;return{overflow:n,halftone:e}}static calcFrequency(e,t){let n,i=0;if(e instanceof _Pitch){const t=e;i=t.octave-1,n=t.fundamentalNote-9+t.AccidentalHalfTones}else if("number"==typeof e){n=e-57}const r=window.DYSubjectId;let o=0;"COLEXIU"===window.DYEnvironment&&(Additional[12]=[120]);for(const a in Additional)if(Object.prototype.hasOwnProperty.call(Additional,a)){if(Additional[a].includes(r)){o=parseFloat(a);break}}let s=n+o;return"next"===t&&s++,"prev"===t&&s--,442*Math.pow(2,i)*Math.pow(2,s/12)}static calcFractionalKey(e){return Math.log(e/440)/Math.LN10*_Pitch.halftoneFactor+57}static fromFrequency(e){const t=_Pitch.calcFractionalKey(e)+.5,n=Math.floor(t/12)-_Pitch.octXmlDiff,i=Math.floor(t)%12;let r=i,o=2;return-1===this.pitchEnumValues.indexOf(r)&&(r=i-1,o=0),new _Pitch(r,n,o)}static fromHalftone(e){const t=Math.floor(e/12)-_Pitch.octXmlDiff,n=e%12;let i=n,r=2;return-1===this.pitchEnumValues.indexOf(i)&&(i=n-1,r=0),new _Pitch(i,t,r)}static ceiling(e){let t=e%=12;return-1===this.pitchEnumValues.indexOf(t)&&(t=e+1),t}static floor(e){let t=e%=12;return-1===this.pitchEnumValues.indexOf(t)&&(t=e-1),t}static HalfTonesFromAccidental(e){switch(e){case 2:case 3:return 0;case 0:return 1;case 1:return-1;case 4:return 2;case 5:return-2;case 6:return 3;case 7:return-3;case 8:return.5;case 9:return-.5;case 10:return-.51;case 11:return 1.5;case 12:return-1.5;case 13:return.0013;case 14:return.0014;case 15:return-.0015;case 16:return.0016;case 17:return.0017;default:throw new Error("Unhandled AccidentalEnum value")}}static AccidentalFromHalfTones(e){switch(e){case 0:return 2;case 1:return 0;case-1:return 1;case 2:return 4;case-2:return 5;case 3:return 6;case-3:return 7;case.5:return 8;case-.5:return 9;case 1.5:return 11;case-1.5:return 12;default:return e>0&&e<1?8:e<0&&e>-1?9:8}}static accidentalVexflow(e){let t;switch(e){case 3:t="n";break;case 1:t="b";break;case 0:t="#";break;case 4:t="##";break;case 6:t="###";break;case 5:t="bb";break;case 7:t="bbs";break;case 8:t="+";break;case 9:t="d";break;case 10:t="bs";break;case 11:t="++";break;case 12:t="db";break;case 13:t="+-";break;case 14:t="++-";break;case 15:t="bss";break;case 16:t="o";break;case 17:t="k"}return t}get AccidentalHalfTones(){return _Pitch.HalfTonesFromAccidental(this.accidental)}get Octave(){return this.octave}get FundamentalNote(){return this.fundamentalNote}get Accidental(){return this.accidental}get AccidentalXml(){return this.accidentalXml}get Frequency(){return this.frequency}static get OctaveXmlDifference(){return _Pitch.octXmlDiff}getHalfTone(){return this.halfTone}getTransposedPitch(e){if(e>12)throw new Error("rewrite this method to handle bigger octave changes or don't use is with bigger octave changes!");return e>0?this.getHigherPitchByTransposeFactor(e):e<0?this.getLowerPitchByTransposeFactor(-e):this}DoEnharmonicChange(){switch(this.accidental){case 1:case 5:this.fundamentalNote=this.getPreviousFundamentalNote(this.fundamentalNote),this.accidental=_Pitch.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+12*(this.octave+_Pitch.octXmlDiff)));break;case 0:case 4:this.fundamentalNote=this.getNextFundamentalNote(this.fundamentalNote),this.accidental=_Pitch.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+12*(this.octave+_Pitch.octXmlDiff)));break;default:return}}ToString(){let e=_Pitch.accidentalVexflow(this.accidental);return e||(e=""),"Key: "+_Pitch.getNoteEnumString(this.fundamentalNote)+e+", Note: "+this.fundamentalNote+", octave: "+this.octave.toString()}OperatorEquals(e){const t=this;return!(!t||!e)&&(t.FundamentalNote===e.FundamentalNote&&t.Octave===e.Octave&&t.Accidental===e.Accidental)}OperatorNotEqual(e){return!(this===e)}OperatorFundamentalGreaterThan(e){const t=this;return t.Octave===e.Octave?t.FundamentalNote>e.FundamentalNote:t.Octave>e.Octave}OperatorFundamentalLessThan(e){const t=this;return t.Octave===e.Octave?t.FundamentalNote_Pitch.pitchEnumValues.length-1?(n=_Pitch.pitchEnumValues[t+e-_Pitch.pitchEnumValues.length],i++):n=_Pitch.pitchEnumValues[t+e],new _Pitch(n,i,2)}getLowerPitchByTransposeFactor(e){const t=_Pitch.pitchEnumValues.indexOf(this.fundamentalNote);let n,i=this.octave;return t-e<0?(n=_Pitch.pitchEnumValues[_Pitch.pitchEnumValues.length+t-e],i--):n=_Pitch.pitchEnumValues[t-e],new _Pitch(n,i,2)}getNextFundamentalNote(e){let t=_Pitch.pitchEnumValues.indexOf(e);return t=(t+1)%_Pitch.pitchEnumValues.length,_Pitch.pitchEnumValues[t]}getPreviousFundamentalNote(e){const t=_Pitch.pitchEnumValues.indexOf(e);return t>0?_Pitch.pitchEnumValues[t-1]:_Pitch.pitchEnumValues[_Pitch.pitchEnumValues.length-1]}};let Pitch=_Pitch;Pitch.pitchEnumValues=[0,2,4,5,7,9,11],Pitch.halftoneFactor=12/(Math.LN2/Math.LN10),Pitch.octXmlDiff=3;class VerticalGraphicalStaffEntryContainer{constructor(e,t){this.staffEntries=[],this.absoluteTimestamp=t,this.staffEntries=new Array(e)}get Index(){return this.index}set Index(e){this.index=e}get AbsoluteTimestamp(){return this.absoluteTimestamp}get StaffEntries(){return this.staffEntries}set StaffEntries(e){this.staffEntries=e}static compareByTimestamp(e,t){const n=e.absoluteTimestamp.RealValue,i=t.absoluteTimestamp.RealValue;return ni?1:0}getFirstNonNullStaffEntry(){for(let e=0,t=this.staffEntries.length;e(e[e.BaseWritingColor=0]="BaseWritingColor",e[e.FollowingCursor=1]="FollowingCursor",e[e.AlternativeFollowingCursor=2]="AlternativeFollowingCursor",e[e.PlaybackCursor=3]="PlaybackCursor",e[e.Highlighted=4]="Highlighted",e[e.ErrorUnderlay=5]="ErrorUnderlay",e[e.Selected=6]="Selected",e[e.SelectionSymbol=7]="SelectionSymbol",e[e.DebugColor1=8]="DebugColor1",e[e.DebugColor2=9]="DebugColor2",e[e.DebugColor3=10]="DebugColor3",e[e.SplitScreenDivision=11]="SplitScreenDivision",e[e.GreyTransparentOverlay=12]="GreyTransparentOverlay",e[e.MarkedArea1=13]="MarkedArea1",e[e.MarkedArea2=14]="MarkedArea2",e[e.MarkedArea3=15]="MarkedArea3",e[e.MarkedArea4=16]="MarkedArea4",e[e.MarkedArea5=17]="MarkedArea5",e[e.MarkedArea6=18]="MarkedArea6",e[e.MarkedArea7=19]="MarkedArea7",e[e.MarkedArea8=20]="MarkedArea8",e[e.MarkedArea9=21]="MarkedArea9",e[e.MarkedArea10=22]="MarkedArea10",e[e.Comment1=23]="Comment1",e[e.Comment2=24]="Comment2",e[e.Comment3=25]="Comment3",e[e.Comment4=26]="Comment4",e[e.Comment5=27]="Comment5",e[e.Comment6=28]="Comment6",e[e.Comment7=29]="Comment7",e[e.Comment8=30]="Comment8",e[e.Comment9=31]="Comment9",e[e.Comment10=32]="Comment10",e))(OutlineAndFillStyleEnum||{});const OUTLINE_AND_FILL_STYLE_DICT=new Dictionary;OUTLINE_AND_FILL_STYLE_DICT.setValue(0,"Thistle"),OUTLINE_AND_FILL_STYLE_DICT.setValue(1,"Aqua"),OUTLINE_AND_FILL_STYLE_DICT.setValue(2,"Azure"),OUTLINE_AND_FILL_STYLE_DICT.setValue(3,"Bisque"),OUTLINE_AND_FILL_STYLE_DICT.setValue(4,"CadetBlue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(5,"DarkBlue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(6,"DarkGoldenRod"),OUTLINE_AND_FILL_STYLE_DICT.setValue(7,"BlanchedAlmond"),OUTLINE_AND_FILL_STYLE_DICT.setValue(8,"Chartreuse"),OUTLINE_AND_FILL_STYLE_DICT.setValue(9,"DarkGreen"),OUTLINE_AND_FILL_STYLE_DICT.setValue(10,"DarkOrange"),OUTLINE_AND_FILL_STYLE_DICT.setValue(11,"FireBrick"),OUTLINE_AND_FILL_STYLE_DICT.setValue(12,"DarkSalmon"),OUTLINE_AND_FILL_STYLE_DICT.setValue(13,"DarkSeaGreen"),OUTLINE_AND_FILL_STYLE_DICT.setValue(14,"DarkOrchid"),OUTLINE_AND_FILL_STYLE_DICT.setValue(15,"Aquamarine"),OUTLINE_AND_FILL_STYLE_DICT.setValue(16,"DarkKhaki"),OUTLINE_AND_FILL_STYLE_DICT.setValue(17,"ForestGreen"),OUTLINE_AND_FILL_STYLE_DICT.setValue(18,"AliceBlue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(19,"DeepPink"),OUTLINE_AND_FILL_STYLE_DICT.setValue(20,"Coral"),OUTLINE_AND_FILL_STYLE_DICT.setValue(21,"DarkOliveGreen"),OUTLINE_AND_FILL_STYLE_DICT.setValue(22,"Chocolate"),OUTLINE_AND_FILL_STYLE_DICT.setValue(23,"DodgerBlue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(24,"Blue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(25,"Beige"),OUTLINE_AND_FILL_STYLE_DICT.setValue(26,"Crimson"),OUTLINE_AND_FILL_STYLE_DICT.setValue(27,"Fuchsia"),OUTLINE_AND_FILL_STYLE_DICT.setValue(28,"Brown"),OUTLINE_AND_FILL_STYLE_DICT.setValue(29,"BlanchedAlmond"),OUTLINE_AND_FILL_STYLE_DICT.setValue(30,"CornflowerBlue"),OUTLINE_AND_FILL_STYLE_DICT.setValue(31,"Cornsilk"),OUTLINE_AND_FILL_STYLE_DICT.setValue(32,"DarkGrey");var GraphicalLayers=(e=>(e[e.Background=0]="Background",e[e.Highlight=1]="Highlight",e[e.MeasureError=2]="MeasureError",e[e.SelectionSymbol=3]="SelectionSymbol",e[e.Cursor=4]="Cursor",e[e.PSI_Debug=5]="PSI_Debug",e[e.Notes=6]="Notes",e[e.Comment=7]="Comment",e[e.Debug_above=8]="Debug_above",e))(GraphicalLayers||{}),NoteState=(e=>(e[e.Normal=0]="Normal",e[e.Selected=1]="Selected",e[e.Follow_Confirmed=2]="Follow_Confirmed",e[e.QFeedback_NotFound=3]="QFeedback_NotFound",e[e.QFeedback_OK=4]="QFeedback_OK",e[e.QFeedback_Perfect=5]="QFeedback_Perfect",e[e.Debug1=6]="Debug1",e[e.Debug2=7]="Debug2",e[e.Debug3=8]="Debug3",e))(NoteState||{}),AutoColorSet=(e=>(e.C="#d82c6b",e.D="#F89D15",e.E="#FFE21A",e.F="#4dbd5c",e.G="#009D96",e.A="#43469d",e.B="#76429c",e.Rest="#000000",e))(AutoColorSet||{});class GraphicalLine{constructor(e,t,n=0,i=OutlineAndFillStyleEnum.BaseWritingColor,r=undefined){this.start=e,this.end=t,this.width=n,this.styleId=i,this.colorHex=r}get Start(){return this.start}set Start(e){this.start=e}get End(){return this.end}set End(e){this.end=e}get Width(){return this.width}set Width(e){this.width=e}}class ClefInstruction extends AbstractNotationInstruction{constructor(e=0,t=0,n=2){super(void 0),this.clefType=0,this.line=2,this.octaveOffset=0,this.line=n,this.clefType=e,this.octaveOffset=t,this.calcParameters()}static getDefaultClefFromMidiInstrument(e){switch(e){case 0:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 43:return new ClefInstruction(1,0,4);default:return new ClefInstruction(0,0,2)}}static getAllPossibleClefs(){const e=[];for(let t=0;t<=2;t++){const n=new ClefInstruction(0,t,2);e.push(n)}for(let t=-2;t<=0;t++){const n=new ClefInstruction(1,t,4);e.push(n)}return e}static isSupportedClef(e){switch(e){case 0:case 1:case 2:case 3:case 4:return!0;default:return!1}}get ClefType(){return this.clefType}set ClefType(e){this.clefType=e}get Line(){return this.line}set Line(e){this.line=e}get OctaveOffset(){return this.octaveOffset}set OctaveOffset(e){this.octaveOffset=e}get ClefPitch(){return this.clefPitch}set ClefPitch(e){this.clefPitch=e}get ReferenceCyPosition(){return this.referenceCyPosition}set ReferenceCyPosition(e){this.referenceCyPosition=e}Equals(e){return this===e||!(!this||!e)&&(this.clefPitch===e.clefPitch&&this.Line===e.Line)}NotEqual(e){return!this.Equals(e)}ToString(){return"ClefType: "+this.clefType}calcParameters(){switch(this.clefType){case 0:this.clefPitch=new Pitch(NoteEnum.G,1+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+2;break;case 1:this.clefPitch=new Pitch(NoteEnum.F,0+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+1.5;break;case 2:this.clefPitch=new Pitch(NoteEnum.C,1+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line;break;case 3:this.clefPitch=new Pitch(NoteEnum.C,2,AccidentalEnum.NONE),this.referenceCyPosition=2;break;case 4:this.clefPitch=new Pitch(NoteEnum.G,0,AccidentalEnum.NONE),this.referenceCyPosition=0;break;default:throw new ArgumentOutOfRangeException("clefType")}}}var ClefEnum=(e=>(e[e.G=0]="G",e[e.F=1]="F",e[e.C=2]="C",e[e.percussion=3]="percussion",e[e.TAB=4]="TAB",e))(ClefEnum||{}),MidiInstrument=(e=>(e[e.None=-1]="None",e[e.Acoustic_Grand_Piano=0]="Acoustic_Grand_Piano",e[e.Bright_Acoustic_Piano=1]="Bright_Acoustic_Piano",e[e.Electric_Grand_Piano=2]="Electric_Grand_Piano",e[e.Honky_tonk_Piano=3]="Honky_tonk_Piano",e[e.Electric_Piano_1=4]="Electric_Piano_1",e[e.Electric_Piano_2=5]="Electric_Piano_2",e[e.Harpsichord=6]="Harpsichord",e[e.Clavinet=7]="Clavinet",e[e.Celesta=8]="Celesta",e[e.Glockenspiel=9]="Glockenspiel",e[e.Music_Box=10]="Music_Box",e[e.Vibraphone=11]="Vibraphone",e[e.Marimba=12]="Marimba",e[e.Xylophone=13]="Xylophone",e[e.Tubular_Bells=14]="Tubular_Bells",e[e.Dulcimer=15]="Dulcimer",e[e.Drawbar_Organ=16]="Drawbar_Organ",e[e.Percussive_Organ=17]="Percussive_Organ",e[e.Rock_Organ=18]="Rock_Organ",e[e.Church_Organ=19]="Church_Organ",e[e.Reed_Organ=20]="Reed_Organ",e[e.Accordion=21]="Accordion",e[e.Harmonica=22]="Harmonica",e[e.Tango_Accordion=23]="Tango_Accordion",e[e.Acoustic_Guitar_nylon=24]="Acoustic_Guitar_nylon",e[e.Acoustic_Guitar_steel=25]="Acoustic_Guitar_steel",e[e.Electric_Guitar_jazz=26]="Electric_Guitar_jazz",e[e.Electric_Guitar_clean=27]="Electric_Guitar_clean",e[e.Electric_Guitar_muted=28]="Electric_Guitar_muted",e[e.Overdriven_Guitar=29]="Overdriven_Guitar",e[e.Distortion_Guitar=30]="Distortion_Guitar",e[e.Guitar_harmonics=31]="Guitar_harmonics",e[e.Acoustic_Bass=32]="Acoustic_Bass",e[e.Electric_Bass_finger=33]="Electric_Bass_finger",e[e.Electric_Bass_pick=34]="Electric_Bass_pick",e[e.Fretless_Bass=35]="Fretless_Bass",e[e.Slap_Bass_1=36]="Slap_Bass_1",e[e.Slap_Bass_2=37]="Slap_Bass_2",e[e.Synth_Bass_1=38]="Synth_Bass_1",e[e.Synth_Bass_2=39]="Synth_Bass_2",e[e.Violin=40]="Violin",e[e.Viola=41]="Viola",e[e.Cello=42]="Cello",e[e.Contrabass=43]="Contrabass",e[e.Tremolo_Strings=44]="Tremolo_Strings",e[e.Pizzicato_Strings=45]="Pizzicato_Strings",e[e.Orchestral_Harp=46]="Orchestral_Harp",e[e.Timpani=47]="Timpani",e[e.String_Ensemble_1=48]="String_Ensemble_1",e[e.String_Ensemble_2=49]="String_Ensemble_2",e[e.Synth_Strings_1=50]="Synth_Strings_1",e[e.Synth_Strings_2=51]="Synth_Strings_2",e[e.Choir_Aahs=52]="Choir_Aahs",e[e.Voice_Oohs=53]="Voice_Oohs",e[e.Synth_Voice=54]="Synth_Voice",e[e.Orchestra_Hit=55]="Orchestra_Hit",e[e.Trumpet=56]="Trumpet",e[e.Trombone=57]="Trombone",e[e.Tuba=58]="Tuba",e[e.Muted_Trumpet=59]="Muted_Trumpet",e[e.French_Horn=60]="French_Horn",e[e.Brass_Section=61]="Brass_Section",e[e.Synth_Brass_1=62]="Synth_Brass_1",e[e.Synth_Brass_2=63]="Synth_Brass_2",e[e.Soprano_Sax=64]="Soprano_Sax",e[e.Alto_Sax=65]="Alto_Sax",e[e.Tenor_Sax=66]="Tenor_Sax",e[e.Baritone_Sax=67]="Baritone_Sax",e[e.Oboe=68]="Oboe",e[e.English_Horn=69]="English_Horn",e[e.Bassoon=70]="Bassoon",e[e.Clarinet=71]="Clarinet",e[e.Piccolo=72]="Piccolo",e[e.Flute=73]="Flute",e[e.Recorder=74]="Recorder",e[e.Pan_Flute=75]="Pan_Flute",e[e.Blown_Bottle=76]="Blown_Bottle",e[e.Shakuhachi=77]="Shakuhachi",e[e.Whistle=78]="Whistle",e[e.Ocarina=79]="Ocarina",e[e.Lead_1_square=80]="Lead_1_square",e[e.Lead_2_sawtooth=81]="Lead_2_sawtooth",e[e.Lead_3_calliope=82]="Lead_3_calliope",e[e.Lead_4_chiff=83]="Lead_4_chiff",e[e.Lead_5_charang=84]="Lead_5_charang",e[e.Lead_6_voice=85]="Lead_6_voice",e[e.Lead_7_fifths=86]="Lead_7_fifths",e[e.Lead_8_bass_lead=87]="Lead_8_bass_lead",e[e.Pad_1_new_age=88]="Pad_1_new_age",e[e.Pad_2_warm=89]="Pad_2_warm",e[e.Pad_3_polysynth=90]="Pad_3_polysynth",e[e.Pad_4_choir=91]="Pad_4_choir",e[e.Pad_5_bowed=92]="Pad_5_bowed",e[e.Pad_6_metallic=93]="Pad_6_metallic",e[e.Pad_7_halo=94]="Pad_7_halo",e[e.Pad_8_sweep=95]="Pad_8_sweep",e[e.FX_1_rain=96]="FX_1_rain",e[e.FX_2_soundtrack=97]="FX_2_soundtrack",e[e.FX_3_crystal=98]="FX_3_crystal",e[e.FX_4_atmosphere=99]="FX_4_atmosphere",e[e.FX_5_brightness=100]="FX_5_brightness",e[e.FX_6_goblins=101]="FX_6_goblins",e[e.FX_7_echoes=102]="FX_7_echoes",e[e.FX_8_scifi=103]="FX_8_scifi",e[e.Sitar=104]="Sitar",e[e.Banjo=105]="Banjo",e[e.Shamisen=106]="Shamisen",e[e.Koto=107]="Koto",e[e.Kalimba=108]="Kalimba",e[e.Bag_pipe=109]="Bag_pipe",e[e.Fiddle=110]="Fiddle",e[e.Shanai=111]="Shanai",e[e.Tinkle_Bell=112]="Tinkle_Bell",e[e.Agogo=113]="Agogo",e[e.Steel_Drums=114]="Steel_Drums",e[e.Woodblock=115]="Woodblock",e[e.Taiko_Drum=116]="Taiko_Drum",e[e.Melodic_Tom=117]="Melodic_Tom",e[e.Synth_Drum=118]="Synth_Drum",e[e.Reverse_Cymbal=119]="Reverse_Cymbal",e[e.Guitar_Fret_Noise=120]="Guitar_Fret_Noise",e[e.Breath_Noise=121]="Breath_Noise",e[e.Seashore=122]="Seashore",e[e.Bird_Tweet=123]="Bird_Tweet",e[e.Telephone_Ring=124]="Telephone_Ring",e[e.Helicopter=125]="Helicopter",e[e.Applause=126]="Applause",e[e.Gunshot=127]="Gunshot",e[e.euphonium=128]="euphonium",e[e.AltoClarinetInEb=200]="AltoClarinetInEb",e[e.TrumpetInBb=201]="TrumpetInBb",e[e.BaritoneSaxophone=202]="BaritoneSaxophone",e[e.TenorSaxophone=203]="TenorSaxophone",e[e.ClarinetInEb=204]="ClarinetInEb",e[e.Euphonium=205]="Euphonium",e[e.Alto_Clarinet=206]="Alto_Clarinet",e[e.Bass_Clarinet=207]="Bass_Clarinet",e[e.Bass_Trombone=208]="Bass_Trombone",e[e.clarinet_in_bb=209]="clarinet_in_bb",e[e.clarinet_in_eb=210]="clarinet_in_eb",e[e.Percussion=135]="Percussion",e))(MidiInstrument||{});const _KeyInstruction=class extends AbstractNotationInstruction{constructor(e=undefined,t=0,n=0){super(e),this.isTransposedBy=0,this.Key=t,this.keyTypeOriginal=t,this.mode=n,this.alteratedNotes=this.calcAlteratedNotes()}static copy(e){const t=new _KeyInstruction(e.parent,e.Key,e.Mode);return t.keyTypeOriginal=e.keyTypeOriginal,t}static getAllPossibleMajorKeyInstructions(){const e=[];for(let t=-7;t<7;t++){const n=new _KeyInstruction(void 0,t,0);e.push(n)}return e}get Key(){return this.keyType}set Key(e){this.keyType=e,this.alteratedNotes=this.calcAlteratedNotes()}get Mode(){return this.mode}set Mode(e){this.mode=e}get AlteratedNotes(){return this.alteratedNotes}calcAlteratedNotes(){const e=[];if(this.keyType>0)for(let t=0;t=0}getAlterationForPitch(e){return this.keyType>0&&this.alteratedNotes.indexOf(e.FundamentalNote)<=this.keyType?AccidentalEnum.SHARP:this.keyType<0&&this.alteratedNotes.indexOf(e.FundamentalNote)<=Math.abs(this.keyType)?AccidentalEnum.FLAT:AccidentalEnum.NONE}ToString(){return"Key: "+this.keyType+this.mode}OperatorEquals(e){const t=this;return t===e||!(!t||!e)&&(t.Key===e.Key&&t.Mode===e.Mode)}OperatorNotEqual(e){return!this.OperatorEquals(e)}};let KeyInstruction=_KeyInstruction;KeyInstruction.sharpPositionList=[NoteEnum.F,NoteEnum.C,NoteEnum.G,NoteEnum.D,NoteEnum.A,NoteEnum.E,NoteEnum.B],KeyInstruction.flatPositionList=[NoteEnum.B,NoteEnum.E,NoteEnum.A,NoteEnum.D,NoteEnum.G,NoteEnum.C,NoteEnum.F];var KeyEnum=(e=>(e[e.major=0]="major",e[e.minor=1]="minor",e[e.none=2]="none",e[e.dorian=3]="dorian",e[e.phrygian=4]="phrygian",e[e.lydian=5]="lydian",e[e.mixolydian=6]="mixolydian",e[e.aeolian=7]="aeolian",e[e.ionian=8]="ionian",e[e.locrian=9]="locrian",e))(KeyEnum||{});Array.prototype.last||Object.defineProperty(Array.prototype,"last",{enumerable:!1,value:function(){return this[this.length-1]}}),Array.prototype.clear||Object.defineProperty(Array.prototype,"clear",{enumerable:!1,value:function(){this.length=0}}),Array.prototype.contains||Object.defineProperty(Array.prototype,"contains",{enumerable:!1,value:function(e){return-1!==this.indexOf(e)}});class CollectionUtil{static contains2(e,t){for(let n=0;n{var n,i,r,o;return(null!==(n=null===(i=t.sourceNote.Pitch)||void 0===i?void 0:i.getHalfTone())&&void 0!==n?n:0)-(null!==(r=null===(o=e.sourceNote.Pitch)||void 0===o?void 0:o.getHalfTone())&&void 0!==r?r:0)})),this.notes}sortForVexflow(){return this.notes.sort(((e,t)=>{var n,i,r;return(null!==(n=null===(i=e.sourceNote.Pitch)||void 0===i?void 0:i.getHalfTone())&&void 0!==n?n:0)-(null!==(r=t.sourceNote.Pitch.getHalfTone())&&void 0!==r?r:0)})),this.notes}color(){}}class GraphicalMusicSheet{constructor(e,t){this.musicPages=[],this.measureList=[],this.verticalGraphicalStaffEntryContainers=[],this.cursors=[],this.leadSheet=!1,this.musicSheet=e,this.numberOfStaves=this.musicSheet.Staves.length,this.calculator=t,this.calculator.initialize(this)}get ParentMusicSheet(){return this.musicSheet}get GetCalculator(){return this.calculator}get JianpuKeySignature(){return this.jianpuKeySignature}set JianpuKeySignature(e){this.jianpuKeySignature=e}get MusicPages(){return this.musicPages}set MusicPages(e){this.musicPages=e}get MeasureList(){return this.measureList}set MeasureList(e){this.measureList=e}get VerticalGraphicalStaffEntryContainers(){return this.verticalGraphicalStaffEntryContainers}set VerticalGraphicalStaffEntryContainers(e){this.verticalGraphicalStaffEntryContainers=e}get Title(){return this.title}set Title(e){this.title=e}get Subtitle(){return this.subtitle}set Subtitle(e){this.subtitle=e}get Composer(){return this.composer}set Composer(e){this.composer=e}get Lyricist(){return this.lyricist}set Lyricist(e){this.lyricist=e}get Cursors(){return this.cursors}get SelectionStartSymbol(){return this.selectionStartSymbol}get SelectionEndSymbol(){return this.selectionEndSymbol}get MinAllowedSystemWidth(){return this.minAllowedSystemWidth}set MinAllowedSystemWidth(e){this.minAllowedSystemWidth=e}get NumberOfStaves(){return this.numberOfStaves}get LeadSheet(){return this.leadSheet}set LeadSheet(e){this.leadSheet=e}static transformRelativeToAbsolutePosition(e){for(let t=0;t=0;n--){const e=this.measureList[n][t];if(e)return e}}findGraphicalStaffEntryFromMeasureList(e,t,n){for(let i=t;i0)return n.staffEntries[0]}}getFirstVisibleMeasuresListFromIndices(e,t){const n=[],i=this.measureList[0].length;for(let r=e;r<=t;r++)for(let e=0;e=0;t--){if(this.verticalGraphicalStaffEntryContainers[t].AbsoluteTimestamp.lt(e)){const n=new VerticalGraphicalStaffEntryContainer(this.numberOfStaves,e);return this.verticalGraphicalStaffEntryContainers.splice(t+1,0,n),n}if(this.verticalGraphicalStaffEntryContainers[t].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers[t]}}GetVerticalContainerFromTimestamp(e,t=0){const n=CollectionUtil.binarySearch(this.verticalGraphicalStaffEntryContainers,new VerticalGraphicalStaffEntryContainer(0,e),VerticalGraphicalStaffEntryContainer.compareByTimestamp,t);if(n>=0)return this.verticalGraphicalStaffEntryContainers[n]}GetInterpolatedIndexInVerticalContainers(e){const t=this.verticalGraphicalStaffEntryContainers;let n,i,r=0,o=t.length-1;if(e.lte(t[t.length-1].AbsoluteTimestamp)){for(;o-r>1;){const n=Math.floor((o+r)/2);if(t[r].AbsoluteTimestamp.Equals(e)){o=r;break}if(t[o].AbsoluteTimestamp.Equals(e)){r=o;break}if(t[n].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers.indexOf(t[n]);e.lt(t[n].AbsoluteTimestamp)?o=n:r=n}if(r===o)return this.verticalGraphicalStaffEntryContainers.indexOf(t[r]);n=t[r].AbsoluteTimestamp,i=t[o].AbsoluteTimestamp}else n=t[t.length-1].AbsoluteTimestamp,i=Fraction$1.plus(this.getLongestStaffEntryDuration(t.length-1),n),o=t.length;const s=i.RealValue-n.RealValue,a=o-(i.RealValue-e.RealValue)/s;return Math.min(a,this.verticalGraphicalStaffEntryContainers.length)}getVisibleStavesIndicesFromSourceMeasure(e){const t=[],n=[];for(let i=0,r=e.length;i{var t;return void 0!==(null===(t=e.parentStaffEntry)||void 0===t?void 0:t.relInMeasureTimestamp)}))}GetNearestNote(e,t){const n=this.GetNearestVoiceEntry(e);if(!n)return;let i,r=Number.MAX_SAFE_INTEGER;for(const o of n.notes){const t=o.PositionAndShape.AbsolutePosition.y,n=Math.abs(o.PositionAndShape.AbsolutePosition.x-e.x),s=Math.abs(t-e.y);n+si.PositionAndShape.RelativePosition.x&&(n=i):n=i)}}catch(i){loglevelExports.info("GraphicalMusicSheet.getStaffEntry",i)}return n}GetPreviousVisibleContainerIndex(e){for(let t=e-1;t>=0;t--){const e=this.verticalGraphicalStaffEntryContainers[t].StaffEntries;for(let n=0,i=e.length;n=0;r--)if(n=this.getStaffEntry(r),n){if(!t)return n;if(n.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return n}}findClosestRightStaffEntry(e,t){let n;for(let i=Math.max(0,Math.ceil(e));i{};Vex.L=(e,t)=>{if(!t)return;const n=Array.prototype.slice.call(t).join(" ");window.console.log(e+": "+n)},Vex.MakeException=e=>class extends Error{constructor(t,n){super(t),this.name=e,this.message=t,this.data=n}};class RuntimeError{constructor(e,t){this.code=e,this.message=t}toString(){return"[RuntimeError] "+this.code+":"+this.message}}Vex.RuntimeError=RuntimeError,Vex.RERR=Vex.RuntimeError,Vex.Merge=(e,t)=>{for(const n in t)e[n]=t[n];return e},Vex.Min=Math.min,Vex.Max=Math.max,Vex.forEach=(e,t)=>{for(let n=0;ne%t>=t/2?parseInt(e/t,10)*t+t:parseInt(e/t,10)*t,Vex.MidLine=(e,t)=>{let n=t+(e-t)/2;return n%2>0&&(n=Vex.RoundN(10*n,5)/10),n},Vex.SortAndUnique=(e,t,n)=>{if(e.length>1){const i=[];let r;e.sort(t);for(let t=0;t{let n=e.length;for(;n--;)if(e[n]===t)return!0;return!1},Vex.getCanvasContext=e=>{if(!e)throw new Vex.RERR("BadArgument","Invalid canvas selector: "+e);const t=document.getElementById(e);if(!t||!t.getContext)throw new Vex.RERR("UnsupportedBrowserError","This browser does not support HTML5 Canvas");return t.getContext("2d")},Vex.drawDot=(e,t,n,i="#55")=>{e.save(),e.setFillStyle(i),e.beginPath(),e.arc(t,n,3,0,2*Math.PI,!0),e.closePath(),e.fill(),e.restore()},Vex.BM=(e,t)=>{const n=(new Date).getTime();t();const i=(new Date).getTime()-n;Vex.L(e+i+"ms")},Vex.StackTrace=()=>(new Error).stack,Vex.W=(...e)=>{const t=e.join(" ");window.console.log("Warning: ",t,Vex.StackTrace())},Vex.Prefix=e=>Vex.Prefix.prefix+e,Vex.Prefix.prefix="vf-";class Fraction{static GCD(e,t){if("number"!=typeof e||"number"!=typeof t)throw new Vex.RERR("BadArgument",`Invalid numbers: ${e}, ${t}`);let n;for(;0!==t;)n=t,t=e%t,e=n;return e}static LCM(e,t){return e*t/Fraction.GCD(e,t)}static LCMM(e){if(0===e.length)return 0;if(1===e.length)return e[0];if(2===e.length)return Fraction.LCM(e[0],e[1]);{const t=e[0];return e.shift(),Fraction.LCM(t,Fraction.LCMM(e))}}constructor(e,t){this.set(e,t)}set(e,t){return this.numerator=void 0===e?1:e,this.denominator=void 0===t?1:t,this}value(){return this.numerator/this.denominator}simplify(){let e=this.numerator,t=this.denominator;const n=Fraction.GCD(e,t);return e/=n,t/=n,t<0&&(t=-t,e=-e),this.set(e,t)}add(e,t){let n,i;e instanceof Fraction?(n=e.numerator,i=e.denominator):(n=void 0!==e?e:0,i=void 0!==t?t:1);const r=Fraction.LCM(this.denominator,i),o=r/this.denominator,s=r/i,a=this.numerator*o+n*s;return this.set(a,r)}subtract(e,t){let n,i;e instanceof Fraction?(n=e.numerator,i=e.denominator):(n=void 0!==e?e:0,i=void 0!==t?t:1);const r=Fraction.LCM(this.denominator,i),o=r/this.denominator,s=r/i,a=this.numerator*o-n*s;return this.set(a,r)}multiply(e,t){let n,i;return e instanceof Fraction?(n=e.numerator,i=e.denominator):(n=void 0!==e?e:1,i=void 0!==t?t:1),this.set(this.numerator*n,this.denominator*i)}divide(e,t){let n,i;return e instanceof Fraction?(n=e.numerator,i=e.denominator):(n=void 0!==e?e:1,i=void 0!==t?t:1),this.set(this.numerator*i,this.denominator*n)}equals(e){const t=Fraction.__compareA.copy(e).simplify(),n=Fraction.__compareB.copy(this).simplify();return t.numerator===n.numerator&&t.denominator===n.denominator}greaterThan(e){const t=Fraction.__compareB.copy(this);return t.subtract(e),t.numerator>0}greaterThanEquals(e){const t=Fraction.__compareB.copy(this);return t.subtract(e),t.numerator>=0}lessThan(e){return!this.greaterThanEquals(e)}lessThanEquals(e){return!this.greaterThan(e)}clone(){return new Fraction(this.numerator,this.denominator)}copy(e){return"number"==typeof e?this.set(e||0,1):this.set(e.numerator,e.denominator)}quotient(){return Math.floor(this.numerator/this.denominator)}fraction(){return this.numerator%this.denominator}abs(){return this.denominator=Math.abs(this.denominator),this.numerator=Math.abs(this.numerator),this}toString(){return this.numerator+"/"+this.denominator}toSimplifiedString(){return Fraction.__tmp.copy(this).simplify().toString()}toMixedString(){let e="";const t=this.quotient(),n=Fraction.__tmp.copy(this);return t<0?n.abs().fraction():n.fraction(),0!==t?(e+=t,0!==n.numerator&&(e+=" "+n.toSimplifiedString())):e=0===n.numerator?"0":n.toSimplifiedString(),e}parse(e){const t=e.split("/"),n=parseInt(t[0],10),i=t[1]?parseInt(t[1],10):1;return this.set(n,i)}}Fraction.__compareA=new Fraction,Fraction.__compareB=new Fraction,Fraction.__tmp=new Fraction;const X$3=Vex.MakeException("RegistryError");function setIndexValue(e,t,n,i,r){e[t][n]||(e[t][n]={}),e[t][n][i]=r}class Registry{static get INDEXES(){return["type"]}constructor(){this.clear()}static enableDefaultRegistry(e){Registry.defaultRegistry=e}static getDefaultRegistry(){return Registry.defaultRegistry}static disableDefaultRegistry(){Registry.defaultRegistry=null}clear(){return this.index={id:{},type:{},class:{}},this}updateIndex({id:e,name:t,value:n,oldValue:i}){const r=this.getElementById(e);null!==i&&this.index[t][i]&&delete this.index[t][i][e],null!==n&&setIndexValue(this.index,t,n,r.getAttribute("id"),r)}register(e,t){if(!(t=t||e.getAttribute("id")))throw new X$3("Can't add element without `id` attribute to registry",e);return e.setAttribute("id",t),setIndexValue(this.index,"id",t,t,e),Registry.INDEXES.forEach((n=>{this.updateIndex({id:t,name:n,value:e.getAttribute(n),oldValue:null})})),e.onRegister(this),this}getElementById(e){return this.index.id[e]?this.index.id[e][e]:null}getElementsByAttribute(e,t){const n=this.index[e];return n&&n[t]?Object.keys(n[t]).map((e=>n[t][e])):[]}getElementsByType(e){return this.getElementsByAttribute("type",e)}getElementsByClass(e){return this.getElementsByAttribute("class",e)}onUpdate({id:e,name:t,value:n,oldValue:i}){return function(e,t){return e.filter((e=>e===t)).length>0}(Registry.INDEXES.concat(["id","class"]),t)?(this.updateIndex({id:e,name:t,value:n,oldValue:i}),this):this}}Registry.defaultRegistry=null;let Element$1=class e{static newID(){return"auto"+e.ID++}constructor({type:t}={}){this.attrs={id:e.newID(),el:null,type:t||"Base",classes:{}},this.boundingBox=null,this.context=null,this.rendered=!1,Registry.getDefaultRegistry()&&Registry.getDefaultRegistry().register(this)}setStyle(e){return this.style=e,this}getStyle(){return this.style}applyStyle(e=this.context,t=this.getStyle()){return t?(e.save(),t.shadowColor&&e.setShadowColor(t.shadowColor),t.shadowBlur&&e.setShadowBlur(t.shadowBlur),t.fillStyle&&e.setFillStyle(t.fillStyle),t.strokeStyle&&e.setStrokeStyle(t.strokeStyle),t.lineWidth&&e.setLineWidth(t.lineWidth),this):this}restoreStyle(e=this.context,t=this.getStyle()){return t?(e.restore(),this):this}drawWithStyle(){this.checkContext(),this.applyStyle(),this.draw(),this.restoreStyle()}hasClass(e){return!0===this.attrs.classes[e]}addClass(e){return this.attrs.classes[e]=!0,this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:e,oldValue:null}),this}removeClass(e){return delete this.attrs.classes[e],this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:null,oldValue:e}),this}onRegister(e){return this.registry=e,this}isRendered(){return this.rendered}setRendered(e=!0){return this.rendered=e,this}getAttributes(){return this.attrs}getAttribute(e){return this.attrs[e]}setAttribute(e,t){const n=this.attrs.id,i=this.attrs[e];return this.attrs[e]=t,this.registry&&this.registry.onUpdate({id:n,name:e,value:t,oldValue:i}),this}getContext(){return this.context}setContext(e){return this.context=e,this}getBoundingBox(){return this.boundingBox}checkContext(){if(!this.context)throw new Vex.RERR("NoContext","No rendering context attached to instance");return this.context}};Element$1.ID=1e3;class BoundingBoxComputation{constructor(e,t,n,i){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.addPoint(e,t),this.addPoint(n,i)}width(){return this.x2-this.x1}height(){return this.y2-this.y1}addPoint(e,t){null!=e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),ethis.x2&&(this.x2=e)),null!=t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addQuadraticCurve(e,t,n,i,r,o){const s=e+2/3*(n-e),a=t+2/3*(i-t),l=s+1/3*(r-e),c=a+1/3*(o-t);this.addBezierCurve(e,t,s,a,l,c,r,o)}addBezierCurve(e,t,n,i,r,o,s,a){const l=[e,t],c=[n,i],u=[r,o],h=[s,a];let d;this.addPoint(l[0],l[1]),this.addPoint(h[0],h[1]);const p=(e,t)=>Math.pow(1-e,3)*l[t]+3*Math.pow(1-e,2)*e*c[t]+3*(1-e)*Math.pow(e,2)*u[t]+Math.pow(e,3)*h[t];for(d=0;d<=1;d++){const e=6*l[d]-12*c[d]+6*u[d],t=-3*l[d]+9*c[d]-9*u[d]+3*h[d],n=3*c[d]-3*l[d];if(0===t){if(0===e)continue;const t=-n/e;0{if(!e)throw new Vex.RERR("BadArgument","Invalid clef: "+e);const t=Flow.clefProperties.values[e];if(!t)throw new Vex.RERR("BadArgument","Invalid clef: "+e);return t}};Flow.clefProperties.values={treble:{line_shift:0},bass:{line_shift:6},tenor:{line_shift:4},alto:{line_shift:3},soprano:{line_shift:1},percussion:{line_shift:0},"mezzo-soprano":{line_shift:2},"baritone-c":{line_shift:5},"baritone-f":{line_shift:5},subbass:{line_shift:7},french:{line_shift:-1}},Flow.keyProperties=(e,t,n)=>{void 0===t&&(t="treble");const i={octave_shift:0};"object"==typeof n&&Vex.Merge(i,n);const r=e.split("/");if(r.length<2)throw new Vex.RERR("BadArguments",`Key must have note + octave and an optional glyph: ${e}`);const o=r[0].toUpperCase(),s=Flow.keyProperties.note_values[o];if(!s)throw new Vex.RERR("BadArguments","Invalid key name: "+o);s.octave&&(r[1]=s.octave);let a=parseInt(r[1],10);a+=-1*i.octave_shift;let l=(7*a-28+s.index)/2;l+=Flow.clefProperties(t).line_shift;let c=0;l<=0&&2*l%2==0&&(c=1),l>=6&&2*l%2==0&&(c=-1);const u=void 0!==s.int_val?12*a+s.int_val:null,h=s.code,d=s.shift_right;let p={};if(r.length>2&&r[2]){const e=r[2].toUpperCase();p=Flow.keyProperties.customNoteHeads[e]||{}}return{key:o,octave:a,line:l,int_value:u,accidental:s.accidental,code:h,stroke:c,shift_right:d,displaced:!1,...p}},Flow.keyProperties.note_values={C:{index:0,int_val:0,accidental:null},CN:{index:0,int_val:0,accidental:"n"},"C#":{index:0,int_val:1,accidental:"#"},"C##":{index:0,int_val:2,accidental:"##"},CB:{index:0,int_val:-1,accidental:"b"},CBB:{index:0,int_val:-2,accidental:"bb"},D:{index:1,int_val:2,accidental:null},DN:{index:1,int_val:2,accidental:"n"},"D#":{index:1,int_val:3,accidental:"#"},"D##":{index:1,int_val:4,accidental:"##"},DB:{index:1,int_val:1,accidental:"b"},DBB:{index:1,int_val:0,accidental:"bb"},E:{index:2,int_val:4,accidental:null},EN:{index:2,int_val:4,accidental:"n"},"E#":{index:2,int_val:5,accidental:"#"},"E##":{index:2,int_val:6,accidental:"##"},EB:{index:2,int_val:3,accidental:"b"},EBB:{index:2,int_val:2,accidental:"bb"},F:{index:3,int_val:5,accidental:null},FN:{index:3,int_val:5,accidental:"n"},"F#":{index:3,int_val:6,accidental:"#"},"F##":{index:3,int_val:7,accidental:"##"},FB:{index:3,int_val:4,accidental:"b"},FBB:{index:3,int_val:3,accidental:"bb"},G:{index:4,int_val:7,accidental:null},GN:{index:4,int_val:7,accidental:"n"},"G#":{index:4,int_val:8,accidental:"#"},"G##":{index:4,int_val:9,accidental:"##"},GB:{index:4,int_val:6,accidental:"b"},GBB:{index:4,int_val:5,accidental:"bb"},A:{index:5,int_val:9,accidental:null},AN:{index:5,int_val:9,accidental:"n"},"A#":{index:5,int_val:10,accidental:"#"},"A##":{index:5,int_val:11,accidental:"##"},AB:{index:5,int_val:8,accidental:"b"},ABB:{index:5,int_val:7,accidental:"bb"},B:{index:6,int_val:11,accidental:null},BN:{index:6,int_val:11,accidental:"n"},"B#":{index:6,int_val:12,accidental:"#"},"B##":{index:6,int_val:13,accidental:"##"},BB:{index:6,int_val:10,accidental:"b"},BBB:{index:6,int_val:9,accidental:"bb"},R:{index:6,int_val:9,rest:!0},X:{index:6,accidental:"",octave:4,code:"v3e",shift_right:5.5}},Flow.keyProperties.customNoteHeads={D0:{code:"v27",shift_right:0,stem_up_x_offset:0,stem_down_x_offset:0,stem_up_y_offset:-1,stem_down_y_offset:0},D1:{code:"v2d",shift_right:-.5},D2:{code:"v22",shift_right:-.5},D3:{code:"v70",shift_right:-.5},T0:{code:"v49",shift_right:-2,stem_up_y_offset:-4,stem_down_y_offset:4},T1:{code:"v93",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},T2:{code:"v40",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},T3:{code:"v7d",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},X0:{code:"v92",stem_up_x_offset:-2,stem_down_x_offset:0,stem_up_y_offset:4,stem_down_y_offset:4},X1:{code:"v95",shift_right:-.5,stem_up_y_offset:4,stem_down_y_offset:4},X2:{code:"v3e",shift_right:.5,stem_up_y_offset:4,stem_down_y_offset:4},X3:{code:"v3b",shift_right:0,stem_up_x_offset:-1.2,stem_down_x_offset:0,stem_up_y_offset:-1,stem_down_y_offset:2},S1:{code:"vd3",shift_right:0},S2:{code:"vd2",shift_right:0},R1:{code:"vd5",shift_right:0},R2:{code:"vd4",shift_right:0}},Flow.integerToNote=e=>{if(void 0===e)throw new Vex.RERR("BadArguments","Undefined integer for integerToNote");if(e<-2)throw new Vex.RERR("BadArguments",`integerToNote requires integer > -2: ${e}`);const t=Flow.integerToNote.table[e];if(!t)throw new Vex.RERR("BadArguments",`Unknown note value for integer: ${e}`);return t},Flow.integerToNote.table={0:"C",1:"C#",2:"D",3:"D#",4:"E",5:"F",6:"F#",7:"G",8:"G#",9:"A",10:"A#",11:"B"},Flow.tabToGlyph=(e,t=1)=>{let n=null,i=0,r=0;if("X"===e.toString().toUpperCase()){const e=new Glyph("v7f",Flow.DEFAULT_TABLATURE_FONT_SCALE).getMetrics();n="v7f",i=e.width,r=-e.height/2}else i=Flow.textWidth(e.toString());return{text:e,code:n,getWidth:()=>i*t,shift_y:r}},Flow.textWidth=e=>7*e.toString().length,Flow.articulationCodes=e=>Flow.articulationCodes.articulations[e],Flow.articulationCodes.articulations={"a.":{code:"v23",between_lines:!0},av:{code:"v28",between_lines:!0},"a>":{code:"v42",between_lines:!0},"a-":{code:"v25",between_lines:!0},"a^":{code:"va",between_lines:!1},"a+":{code:"v8b",between_lines:!1},ao:{code:"v94",between_lines:!1},ah:{code:"vb9",between_lines:!1},"a@a":{code:"v43",between_lines:!1},"a@u":{code:"v5b",between_lines:!1},"a|":{code:"v75",between_lines:!1},am:{code:"v97",between_lines:!1},"a,":{code:"vb3",between_lines:!1}},Flow.accidentalCodes=e=>Flow.accidentalCodes.accidentals[e],Flow.accidentalCodes.accidentals={"#":{code:"v18",parenRightPaddingAdjustment:-1},"##":{code:"v7f",parenRightPaddingAdjustment:-1},b:{code:"v44",parenRightPaddingAdjustment:-2},bb:{code:"v26",parenRightPaddingAdjustment:-2},n:{code:"v4e",parenRightPaddingAdjustment:-1},"{":{code:"v9c",parenRightPaddingAdjustment:-1},"}":{code:"v84",parenRightPaddingAdjustment:-1},db:{code:"v9e",parenRightPaddingAdjustment:-1},d:{code:"vab",parenRightPaddingAdjustment:0},bbs:{code:"v90",parenRightPaddingAdjustment:-1},"++":{code:"v51",parenRightPaddingAdjustment:-1},"+":{code:"v78",parenRightPaddingAdjustment:-1},"+-":{code:"v8d",parenRightPaddingAdjustment:-1},"++-":{code:"v7a",parenRightPaddingAdjustment:-1},bs:{code:"vb7",parenRightPaddingAdjustment:-1},bss:{code:"v39",parenRightPaddingAdjustment:-1},o:{code:"vd0",parenRightPaddingAdjustment:-1},k:{code:"vd1",parenRightPaddingAdjustment:-1},ashs:{code:"vd6",parenRightPaddingAdjustment:-1},afhf:{code:"vd7",parenRightPaddingAdjustment:-1}},Flow.accidentalColumnsTable={1:{a:[1],b:[1]},2:{a:[1,2]},3:{a:[1,3,2],b:[1,2,1],second_on_bottom:[1,2,3]},4:{a:[1,3,4,2],b:[1,2,3,1],spaced_out_tetrachord:[1,2,1,2]},5:{a:[1,3,5,4,2],b:[1,2,4,3,1],spaced_out_pentachord:[1,2,3,2,1],very_spaced_out_pentachord:[1,2,1,2,1]},6:{a:[1,3,5,6,4,2],b:[1,2,4,5,3,1],spaced_out_hexachord:[1,3,2,1,3,2],very_spaced_out_hexachord:[1,2,1,2,1,2]}},Flow.ornamentCodes=e=>Flow.ornamentCodes.ornaments[e],Flow.ornamentCodes.ornaments={mordent:{code:"v1e"},mordent_inverted:{code:"v45"},turn:{code:"v72"},turn_inverted:{code:"v33"},tr:{code:"v1f"},upprall:{code:"v60"},downprall:{code:"vb4"},prallup:{code:"v6d"},pralldown:{code:"v2c"},upmordent:{code:"v29"},downmordent:{code:"v68"},lineprall:{code:"v20"},prallprall:{code:"v86"}},Flow.keySignature=e=>{const t=Flow.keySignature.keySpecs[e];if(!t)throw new Vex.RERR("BadKeySignature",`Bad key signature spec: '${e}'`);if(!t.acc)return[];const n=Flow.keySignature.accidentalList(t.acc),i=[];for(let r=0;r({b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[e]),Flow.parseNoteDurationString=e=>{if("string"!=typeof e)return null;const t=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(e);if(!t)return null;const n=t[1],i=t[2].length;let r=t[3];return 0===r.length&&(r="n"),{duration:n,dots:i,type:r}},Flow.parseNoteStruct=e=>{const t=e.duration,n=Flow.parseNoteDurationString(t);if(!n)return null;let i=Flow.durationToTicks(n.duration);if(null==i)return null;let r=e.type;const o=[];if(r){if(!Flow.getGlyphProps.validTypes[r])return null}else r=n.type||"n",void 0!==e.keys&&e.keys.forEach(((e,t)=>{const n=e.split("/");n&&3===n.length&&(o[t]=n[2])}));const s=e.dots?e.dots:n.dots;if("number"!=typeof s)return null;let a=i;for(let l=0;l{const t=Flow.durationAliases[e];if(void 0!==t&&(e=t),void 0===Flow.durationToTicks.durations[e])throw new Vex.RERR("BadArguments",`The provided duration is not valid: ${e}`);return e},Flow.durationToFraction=e=>(new Fraction).parse(Flow.sanitizeDuration(e)),Flow.durationToNumber=e=>Flow.durationToFraction(e).value(),Flow.durationToTicks=e=>{e=Flow.sanitizeDuration(e);const t=Flow.durationToTicks.durations[e];return void 0===t?null:t},Flow.durationToTicks.durations={"1/2":2*Flow.RESOLUTION,1:Flow.RESOLUTION/1,2:Flow.RESOLUTION/2,4:Flow.RESOLUTION/4,8:Flow.RESOLUTION/8,16:Flow.RESOLUTION/16,32:Flow.RESOLUTION/32,64:Flow.RESOLUTION/64,128:Flow.RESOLUTION/128,256:Flow.RESOLUTION/256},Flow.durationAliases={w:"1",h:"2",q:"4",b:"256"},Flow.getGlyphProps=(e,t)=>{e=Flow.sanitizeDuration(e);const n=Flow.getGlyphProps.duration_codes[e];if(void 0===n)return null;t||(t="n");let i=n.type[t];if(void 0===i){const e=Flow.keyProperties.customNoteHeads[t.toUpperCase()];if(void 0===e)return null;i={code_head:e.code,...e}}return{...n.common,...i}},Flow.getGlyphProps.validTypes={n:{name:"note"},r:{name:"rest"},h:{name:"harmonic"},m:{name:"muted"},s:{name:"slash"}},Flow.getGlyphProps.duration_codes={"1/2":{common:{getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v53",e).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-Flow.STEM_HEIGHT,stem_down_extension:-Flow.STEM_HEIGHT,tabnote_stem_up_extension:-Flow.STEM_HEIGHT,tabnote_stem_down_extension:-Flow.STEM_HEIGHT,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v53"},h:{code_head:"v59"},m:{code_head:"vf",stem_offset:0},r:{code_head:"v31",rest:!0,position:"B/5",dot_shiftY:.5},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},1:{common:{getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v1d",e).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-Flow.STEM_HEIGHT,stem_down_extension:-Flow.STEM_HEIGHT,tabnote_stem_up_extension:-Flow.STEM_HEIGHT,tabnote_stem_down_extension:-Flow.STEM_HEIGHT,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v1d"},h:{code_head:"v46"},m:{code_head:"v92",stem_offset:-3},r:{code_head:"v5c",rest:!0,position:"D/5",dot_shiftY:.5},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},2:{common:{getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v81",e).getMetrics().width},stem:!0,stem_offset:0,flag:!1,stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v81"},h:{code_head:"v2d"},m:{code_head:"v95",stem_offset:-3},r:{code_head:"vc",stem:!1,rest:!0,position:"B/4",dot_shiftY:-.5},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},4:{common:{getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!1,stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e",stem_offset:-3},r:{code_head:"v7c",stem:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1.5,line_below:1.5},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},8:{common:{getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!0,beam_count:1,code_flag_upstem:"v54",code_flag_downstem:"v9a",stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"va5",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1,line_below:1},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},16:{common:{beam_count:2,getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v3f",code_flag_downstem:"v8f",stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v3c",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1,line_below:2},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},32:{common:{beam_count:3,getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v47",code_flag_downstem:"v2a",stem_up_extension:9,stem_down_extension:9,tabnote_stem_up_extension:8,tabnote_stem_down_extension:5,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v55",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-1.5,line_above:2,line_below:2},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},64:{common:{beam_count:4,getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"va9",code_flag_downstem:"v58",stem_up_extension:13,stem_down_extension:13,tabnote_stem_up_extension:12,tabnote_stem_down_extension:9,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v38",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-1.5,line_above:2,line_below:3},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},128:{common:{beam_count:5,getWidth(e=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",e).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v9b",code_flag_downstem:"v30",stem_up_extension:22,stem_down_extension:22,tabnote_stem_up_extension:21,tabnote_stem_down_extension:18,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"vaa",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:1.5,line_above:3,line_below:3},s:{getWidth:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}}},Flow.smufl={},Flow.smufl.to_code_points={bracketTop:"v1b",bracketBottom:"v10",barlineTick:"v6f",segno:"v8c",coda:"v4d",gClef:"v83",cClef:"vad",fClef:"v79",unpitchedPercussionClef1:"v59","6stringTabClef":"v2f",timeSig0:"v0",timeSig1:"v1",timeSig2:"v2",timeSig3:"v3",timeSig4:"v4",timeSig5:"v5",timeSig6:"v6",timeSig7:"v7",timeSig8:"v8",timeSig9:"v9",timeSigCommon:"v41",timeSigCutCommon:"vb6",noteheadDoubleWhole:"v53",noteheadWhole:"v1d",noteheadHalf:"v81",noteheadBlack:"vb",noteheadXWhole:"v92",noteheadXHalf:"v95",noteheadXBlack:"v3e",noteheadCircleX:"v3b",noteheadTriangleUpWhole:"v49",noteheadTriangleUpHalf:"v93",noteheadTriangleUpBlack:"v40",noteheadDiamondWhole:"v46",noteheadDiamondHalf:"v2d",noteheadDiamondBlack:"v22",augmentationDot:"v23",tremolo1:"v74",flag8thUp:"v54",flag8thDown:"v9a",flag16thUp:"v3f",flag16thDown:"v8f",flag32ndUp:"v47",flag32ndDown:"v2a",flag64thUp:"va9",flag64thDown:"v58",flag128thUp:"v9b",flag128thDown:"v30",accidentalFlat:"v44",accidentalNatural:"v4e",accidentalSharp:"v18",accidentalDoubleSharp:"v7f",accidentalDoubleFlat:"v26",accidentalParensLeft:"v9c",accidentalParensRight:"v84",accidentalQuarterToneFlatStein:"vab",accidentalThreeQuarterTonesFlatZimmermann:"v9e",accidentalQuarterToneSharpStein:"v78",accidentalThreeQuarterTonesSharpStein:"v51",accidentalBuyukMucennebFlat:"v39",accidentalBakiyeFlat:"vb7",accidentalKomaSharp:"v51",accidentalKucukMucennebSharp:"v8d",accidentalKoron:"vd1",accidentalSori:"vd0",articAccentAbove:"v42",articAccentBelow:"v42",articTenutoAbove:"v25",articTenutoBelow:"v25",articStaccatoAbove:"v23",articStaccatoBelow:"v23",articStaccatissimoAbove:"v28",articMarcatoAbove:"va",fermataAbove:"v43",fermataBelow:"v5b",breathMarkComma:"v6c",breathMarkUpbow:"v8a",caesura:"v34",caesuraCurved:"v4b",restMaxima:"v59",restDoubleWhole:"v31",restWhole:"v5c",restHalf:"vc",restQuarter:"v7c",rest8th:"va5",rest16th:"v3c",rest32nd:"v55",rest64th:"v38",rest128th:"vaa",dynamicPiano:"vbf",dynamicMezzo:"v62",dynamicForte:"vba",dynamicRinforzando:"vba",dynamicSforzando:"v4a",dynamicZ:"v80",ornamentTrill:"v1f",ornamentTurn:"v72",ornamentTurnSlash:"v33",ornamentMordent:"v45",ornamentMordentInverted:"v1e",ornamentTremblement:"v86",ornamentPrecompAppoggTrill:"v20",ornamentPrecompSlideTrillDAnglebert:"v60",ornamentPrecompSlideTrillBach:"v29",ornamentPrecompTrillSuffixDandrieu:"v6d",ornamentPrecompDoubleCadenceUpperPrefix:"vb4",ornamentPrecompDoubleCadenceUpperPrefixTurn:"v68",ornamentPrecompTrillLowerSuffix:"v2c",stringsDownBow:"v94",stringsUpBow:"v75",stringsHarmonic:"vb9",pluckedSnapPizzicatoAbove:"v94",pluckedLeftHandPizzicato:"v8b",keyboardPedalPed:"v36",keyboardPedalUp:"v5d",pictChokeCymbal:"vb3",wiggleArpeggiatoUp:"va3",arrowheadBlackUp:"vc3",arrowheadBlackDown:"v52"},Flow.TIME4_4={num_beats:4,beat_value:4,resolution:Flow.RESOLUTION};class CanvasContext{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static SanitizeCanvasDims(e,t){return Math.max(e,t)>this.CANVAS_BROWSER_SIZE_LIMIT&&(Vex.W("Canvas dimensions exceed browser limit. Cropping to "+this.CANVAS_BROWSER_SIZE_LIMIT),e>this.CANVAS_BROWSER_SIZE_LIMIT&&(e=this.CANVAS_BROWSER_SIZE_LIMIT),t>this.CANVAS_BROWSER_SIZE_LIMIT&&(t=this.CANVAS_BROWSER_SIZE_LIMIT)),[e,t]}constructor(e){this.vexFlowCanvasContext=e,e.canvas?this.canvas=e.canvas:this.canvas={width:CanvasContext.WIDTH,height:CanvasContext.HEIGHT}}clear(){this.vexFlowCanvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(){}closeGroup(){}add(){}setFont(e,t,n){return this.vexFlowCanvasContext.font=(n||"")+" "+t+"pt "+e,this}setRawFont(e){return this.vexFlowCanvasContext.font=e,this}setFillStyle(e){return this.vexFlowCanvasContext.fillStyle=e,this}setBackgroundFillStyle(e){return this.background_fillStyle=e,this}setStrokeStyle(e){return this.vexFlowCanvasContext.strokeStyle=e,this}setShadowColor(e){return this.vexFlowCanvasContext.shadowColor=e,this}setShadowBlur(e){return this.vexFlowCanvasContext.shadowBlur=e,this}setLineWidth(e){return this.vexFlowCanvasContext.lineWidth=e,this}setLineCap(e){return this.vexFlowCanvasContext.lineCap=e,this}setLineDash(e){return this.vexFlowCanvasContext.lineDash=e,this}scale(e,t){return this.vexFlowCanvasContext.scale(parseFloat(e),parseFloat(t))}resize(e,t){return[e,t]=this.SanitizeCanvasDims(parseInt(e,10),parseInt(t,10)),this.vexFlowCanvasContext.resize(e,t)}rect(e,t,n,i){return this.vexFlowCanvasContext.rect(e,t,n,i)}fillRect(e,t,n,i){return this.vexFlowCanvasContext.fillRect(e,t,n,i)}clearRect(e,t,n,i){return this.vexFlowCanvasContext.clearRect(e,t,n,i)}beginPath(){return this.vexFlowCanvasContext.beginPath()}moveTo(e,t){return this.vexFlowCanvasContext.moveTo(e,t)}lineTo(e,t){return this.vexFlowCanvasContext.lineTo(e,t)}bezierCurveTo(e,t,n,i,r,o){return this.vexFlowCanvasContext.bezierCurveTo(e,t,n,i,r,o)}quadraticCurveTo(e,t,n,i){return this.vexFlowCanvasContext.quadraticCurveTo(e,t,n,i)}arc(e,t,n,i,r,o){return this.vexFlowCanvasContext.arc(e,t,n,i,r,o)}glow(){return this.vexFlowCanvasContext.glow()}fill(){return this.vexFlowCanvasContext.fill()}stroke(){return this.vexFlowCanvasContext.stroke()}closePath(){return this.vexFlowCanvasContext.closePath()}measureText(e){return this.vexFlowCanvasContext.measureText(e)}fillText(e,t,n){return this.vexFlowCanvasContext.fillText(e,t,n)}save(){return this.vexFlowCanvasContext.save()}restore(){return this.vexFlowCanvasContext.restore()}}class RaphaelContext{constructor(e){this.element=e,this.paper=Raphael(e),this.path="",this.pen={x:0,y:0},this.lineWidth=1,this.state={scale:{x:1,y:1},font_family:"Arial",font_size:8,font_weight:800},this.attributes={"stroke-width":.3,fill:"black",stroke:"black",font:"10pt Arial"},this.background_attributes={"stroke-width":0,fill:"white",stroke:"white",font:"10pt Arial"},this.shadow_attributes={width:0,color:"black"},this.state_stack=[]}openGroup(){}closeGroup(){}add(){}setFont(e,t,n){return this.state.font_family=e,this.state.font_size=t,this.state.font_weight=n,this.attributes.font=(this.state.font_weight||"")+" "+this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this}setRawFont(e){return this.attributes.font=e,this}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.background_attributes.fill=e,this.background_attributes.stroke=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.shadow_attributes.color=e,this}setShadowBlur(e){return this.shadow_attributes.width=e,this}setLineWidth(e){this.attributes["stroke-width"]=e,this.lineWidth=e}setLineDash(){return this}setLineCap(){return this}scale(e,t){return this.state.scale={x:e,y:t},this.attributes.transform="S"+e+","+t+",0,0",this.attributes.scale=e+","+t+",0,0",this.attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this.background_attributes.transform="S"+e+","+t+",0,0",this.background_attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this}clear(){this.paper.clear()}resize(e,t){return this.element.style.width=e,this.paper.setSize(e,t),this}setViewBox(e){this.paper.canvas.setAttribute("viewBox",e)}rect(e,t,n,i){return i<0&&(t+=i,i=-i),this.paper.rect(e,t,n-.5,i-.5).attr(this.attributes).attr("fill","none").attr("stroke-width",this.lineWidth),this}fillRect(e,t,n,i){return i<0&&(t+=i,i=-i),this.paper.rect(e,t,n-.5,i-.5).attr(this.attributes),this}clearRect(e,t,n,i){return i<0&&(t+=i,i=-i),this.paper.rect(e,t,n-.5,i-.5).attr(this.background_attributes),this}beginPath(){return this.path="",this.pen.x=0,this.pen.y=0,this}moveTo(e,t){return this.path+="M"+e+","+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return this.path+="L"+e+","+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,n,i,r,o){return this.path+="C"+e+","+t+","+n+","+i+","+r+","+o,this.pen.x=r,this.pen.y=o,this}quadraticCurveTo(e,t,n,i){return this.path+="Q"+e+","+t+","+n+","+i,this.pen.x=n,this.pen.y=i,this}arc(e,t,n,i,r,o){function s(e){for(;e<0;)e+=2*Math.PI;for(;e>2*Math.PI;)e-=2*Math.PI;return e}if((i=s(i))>(r=s(r))){const e=i;i=r,r=e,o=!o}const a=r-i;return a>Math.PI?(this.arcHelper(e,t,n,i,i+a/2,o),this.arcHelper(e,t,n,i+a/2,r,o)):this.arcHelper(e,t,n,i,r,o),this}arcHelper(e,t,n,i,r,o){const s=e+n*Math.cos(i),a=t+n*Math.sin(i),l=e+n*Math.cos(r),c=t+n*Math.sin(r);let u=0,h=0;o?(h=1,r-iMath.PI&&(u=1),this.path+="M"+s+","+a+",A"+n+","+n+",0,"+u+","+h+","+l+","+c+"M"+this.pen.x+","+this.pen.y}glow(){const e=this.paper.set();if(this.shadow_attributes.width>0){const t=this.shadow_attributes,n=t.width/2;for(let i=1;i<=n;i++)e.push(this.paper.path(this.path).attr({stroke:t.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/n*i).toFixed(3),opacity:+((t.opacity||.3)/n).toFixed(3),transform:this.attributes.transform,scale:this.attributes.scale}))}return e}fill(){const e=this.paper.path(this.path).attr(this.attributes).attr("stroke-width",0);return this.glow(e),this}stroke(){const e=this.lineWidth*(this.state.scale.x+this.state.scale.y)/2,t=this.paper.path(this.path).attr(this.attributes).attr("fill","none").attr("stroke-width",e);return this.glow(t),this}closePath(){return this.path+="Z",this}measureText(e){const t=this.paper.text(0,0,e).attr(this.attributes).attr("fill","none").attr("stroke","none"),n=t.getBBox();return t.remove(),{width:n.width,height:n.height}}fillText(e,t,n){return this.paper.text(t+this.measureText(e).width/2,n-this.state.font_size/(2.25*this.state.scale.y),e).attr(this.attributes),this}save(){return this.state_stack.push({state:{font_family:this.state.font_family},attributes:{font:this.attributes.font,fill:this.attributes.fill,stroke:this.attributes.stroke,"stroke-width":this.attributes["stroke-width"]},shadow_attributes:{width:this.shadow_attributes.width,color:this.shadow_attributes.color}}),this}restore(){const e=this.state_stack.pop();return this.state.font_family=e.state.font_family,this.attributes.font=e.attributes.font,this.attributes.fill=e.attributes.fill,this.attributes.stroke=e.attributes.stroke,this.attributes["stroke-width"]=e.attributes["stroke-width"],this.shadow_attributes.width=e.shadow_attributes.width,this.shadow_attributes.color=e.shadow_attributes.color,this}}const attrNamesToIgnoreMap={path:{x:!0,y:!0,width:!0,height:!0},rect:{},text:{width:!0,height:!0}};{const e={"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0};Vex.Merge(attrNamesToIgnoreMap.rect,e),Vex.Merge(attrNamesToIgnoreMap.path,e)}class SVGContext{constructor(e){this.element=e,this.svgNS="http://www.w3.org/2000/svg";const t=this.create("svg");this.element.appendChild(t),this.svg=t,this.groups=[this.svg],this.parent=this.svg,this.path="",this.pen={x:NaN,y:NaN},this.lineWidth=1,this.state={scale:{x:1,y:1},"font-family":"Arial","font-size":"8pt","font-weight":"normal"},this.attributes={"stroke-width":.3,fill:"black",stroke:"black","stroke-dasharray":"none","font-family":"Arial","font-size":"10pt","font-weight":"normal","font-style":"normal"},this.background_attributes={"stroke-width":0,fill:"white",stroke:"white","stroke-dasharray":"none","font-family":"Arial","font-size":"10pt","font-weight":"normal","font-style":"normal"},this.shadow_attributes={width:0,color:"black"},this.state_stack=[],this.iePolyfill()}create(e){return document.createElementNS(this.svgNS,e)}openGroup(e,t,n){const i=this.create("g");return this.groups.push(i),this.parent.appendChild(i),this.parent=i,e&&i.setAttribute("class",Vex.Prefix(e)),t&&i.setAttribute("id",Vex.Prefix(t)),n&&n.pointerBBox&&i.setAttribute("pointer-events","bounding-box"),i}closeGroup(){this.groups.pop(),this.parent=this.groups[this.groups.length-1]}add(e){this.parent.appendChild(e)}iePolyfill(){"undefined"!=typeof navigator&&(this.ie=/MSIE 9/i.test(navigator.userAgent)||/MSIE 10/i.test(navigator.userAgent)||/rv:11\.0/i.test(navigator.userAgent)||/Trident/i.test(navigator.userAgent))}setFont(e,t,n){let i=!1,r=!1,o="normal";"string"==typeof n&&(-1!==n.indexOf("italic")&&(n=n.replace(/italic/g,""),r=!0),-1!==n.indexOf("bold")&&(n=n.replace(/bold/g,""),i=!0),n=n.replace(/ /g,"")),o=r?"italic":o;const s={"font-family":e,"font-size":t+"pt","font-weight":n=void 0===(n=i?"bold":n)||""===n?"normal":n,"font-style":o};return this.fontSize=Number(t),Vex.Merge(this.attributes,s),Vex.Merge(this.state,s),this}setRawFont(e){const t=(e=e.trim()).split(" ");return this.attributes["font-family"]=t[1],this.state["font-family"]=t[1],this.attributes["font-size"]=t[0],this.state["font-size"]=t[0],this.fontSize=Number(t[0].match(/\d+/)),this}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.background_attributes.fill=e,this.background_attributes.stroke=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.shadow_attributes.color=e,this}setShadowBlur(e){return this.shadow_attributes.width=e,this}setLineWidth(e){this.attributes["stroke-width"]=e,this.lineWidth=e}setLineDash(e){if("[object Array]"===Object.prototype.toString.call(e))return e=e.join(", "),this.attributes["stroke-dasharray"]=e,this;throw new Vex.RERR("ArgumentError","lineDash must be an array of integers.")}setLineCap(e){return this.attributes["stroke-linecap"]=e,this}resize(e,t){this.width=e,this.height=t,this.element.style.width=e;const n={width:e,height:t};return this.applyAttributes(this.svg,n),this.scale(this.state.scale.x,this.state.scale.y),this}scale(e,t){this.state.scale={x:e,y:t};const n=this.width/e,i=this.height/t;return this.setViewBox(0,0,n,i),this}setViewBox(...e){if(1===e.length){const[t]=e;this.svg.setAttribute("viewBox",t)}else{const[t,n,i,r]=e,o=t+" "+n+" "+i+" "+r;this.svg.setAttribute("viewBox",o)}}applyAttributes(e,t){const n=attrNamesToIgnoreMap[e.nodeName];return Object.keys(t).forEach((i=>{var r;n&&n[i]||!i||!t[i]||"d"===i&&(null===(r=t[i])||void 0===r?void 0:r.indexOf("NaN"))>-1||e.setAttributeNS(null,i,t[i])})),e}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild);this.scale(this.state.scale.x,this.state.scale.y)}rect(e,t,n,i,r){i<0&&(t+=i,i*=-1);const o=this.create("rect");return void 0===r&&(r={fill:"none","stroke-width":this.lineWidth,stroke:"black"}),Vex.Merge(r,{x:e,y:t,width:n,height:i}),this.applyAttributes(o,r),this.add(o),this}fillRect(e,t,n,i){return i<0&&(t+=i,i*=-1),this.rect(e,t,n,i,this.attributes),this}clearRect(e,t,n,i){return this.rect(e,t,n,i,this.background_attributes),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(e,t){return this.path+="M"+e+" "+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return this.path+="L"+e+" "+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,n,i,r,o){return this.path+="C"+e+" "+t+","+n+" "+i+","+r+" "+o,this.pen.x=r,this.pen.y=o,this}quadraticCurveTo(e,t,n,i){return this.path+="Q"+e+" "+t+","+n+" "+i,this.pen.x=n,this.pen.y=i,this}arc(e,t,n,i,r,o){function s(e){for(;e<0;)e+=2*Math.PI;for(;e>2*Math.PI;)e-=2*Math.PI;return e}if((i=s(i))>(r=s(r))){const e=i;i=r,r=e,o=!o}const a=r-i;return a>Math.PI?(this.arcHelper(e,t,n,i,i+a/2,o),this.arcHelper(e,t,n,i+a/2,r,o)):this.arcHelper(e,t,n,i,r,o),this}arcHelper(e,t,n,i,r,o){const s=e+n*Math.cos(i),a=t+n*Math.sin(i),l=e+n*Math.cos(r),c=t+n*Math.sin(r);let u=0,h=0;o?(h=1,r-iMath.PI&&(u=1),this.path+="M"+s+" "+a+" A"+n+" "+n+" 0 "+u+" "+h+" "+l+" "+c,isNaN(this.pen.x)||isNaN(this.pen.y)||(this.peth+="M"+this.pen.x+" "+this.pen.y)}closePath(){return this.path+="Z",this}glow(){if(this.shadow_attributes.width>0){const e=this.shadow_attributes,t=e.width/2;for(let n=1;n<=t;n++){const i={stroke:e.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(.4*e.width/t*n).toFixed(3),opacity:+((e.opacity||.3)/t).toFixed(3)},r=this.create("path");i.d=this.path,this.applyAttributes(r,i),this.add(r)}}return this}fill(e){this.glow();const t=this.create("path");let n=e;return void 0===e?(e={},Vex.Merge(e,this.attributes),e.stroke="none",n=e):(n=e,Vex.Merge(n,this.attributes),e.class&&(n.class=e.class),e.id&&(n.id=e.id)),e.d=this.path,this.applyAttributes(t,e),this.add(t),this}stroke(e=undefined){this.glow();const t=this.create("path"),n={};return Vex.Merge(n,this.attributes),e&&Vex.Merge(n,e),n.fill="none",n["stroke-width"]=this.lineWidth,n.d=this.path,this.applyAttributes(t,n),this.add(t),this}measureText(e){const t=this.create("text");if("function"!=typeof t.getBBox)return{x:0,y:0,width:0,height:0};t.textContent=e,this.applyAttributes(t,this.attributes),this.svg.appendChild(t);let n=t.getBBox();return this.ie&&""!==e&&"italic"===this.attributes["font-style"]&&(n=this.ieMeasureTextFix(n,e)),this.svg.removeChild(t),n}ieMeasureTextFix(e){const t=1.196*Number(this.fontSize)+1.9598,n=e.width-t,i=e.height-1.5;return{x:e.x,y:e.y,width:n,height:i}}fillText(e,t,n){if(!e||e.length<=0)return;const i={};Vex.Merge(i,this.attributes),i.stroke="none",i.x=t,i.y=n;const r=this.create("text");r.textContent=e,this.applyAttributes(r,i),this.add(r)}save(){return this.state_stack.push({state:{"font-family":this.state["font-family"],"font-weight":this.state["font-weight"],"font-style":this.state["font-style"],"font-size":this.state["font-size"],scale:this.state.scale},attributes:{"font-family":this.attributes["font-family"],"font-weight":this.attributes["font-weight"],"font-style":this.attributes["font-style"],"font-size":this.attributes["font-size"],fill:this.attributes.fill,stroke:this.attributes.stroke,"stroke-width":this.attributes["stroke-width"],"stroke-dasharray":this.attributes["stroke-dasharray"]},shadow_attributes:{width:this.shadow_attributes.width,color:this.shadow_attributes.color},lineWidth:this.lineWidth}),this}restore(){const e=this.state_stack.pop();return this.state["font-family"]=e.state["font-family"],this.state["font-weight"]=e.state["font-weight"],this.state["font-style"]=e.state["font-style"],this.state["font-size"]=e.state["font-size"],this.state.scale=e.state.scale,this.attributes["font-family"]=e.attributes["font-family"],this.attributes["font-weight"]=e.attributes["font-weight"],this.attributes["font-style"]=e.attributes["font-style"],this.attributes["font-size"]=e.attributes["font-size"],this.attributes.fill=e.attributes.fill,this.attributes.stroke=e.attributes.stroke,this.attributes["stroke-width"]=e.attributes["stroke-width"],this.attributes["stroke-dasharray"]=e.attributes["stroke-dasharray"],this.shadow_attributes.width=e.shadow_attributes.width,this.shadow_attributes.color=e.shadow_attributes.color,this.lineWidth=e.lineWidth,this}}let lastContext=null;class Renderer{static get Backends(){return{CANVAS:1,RAPHAEL:2,SVG:3,VML:4}}static get LineEndType(){return{NONE:1,UP:2,DOWN:3}}static get USE_CANVAS_PROXY(){return!1}static get lastContext(){return lastContext}static set lastContext(e){lastContext=e}static buildContext(e,t,n,i,r){const o=new Renderer(e,t);n&&i&&o.resize(n,i),r||(r="#FFF");const s=o.getContext();return s.setBackgroundFillStyle(r),Renderer.lastContext=s,s}static getCanvasContext(e,t,n,i){return Renderer.buildContext(e,Renderer.Backends.CANVAS,t,n,i)}static getRaphaelContext(e,t,n,i){return Renderer.buildContext(e,Renderer.Backends.RAPHAEL,t,n,i)}static getSVGContext(e,t,n,i){return Renderer.buildContext(e,Renderer.Backends.SVG,t,n,i)}static bolsterCanvasContext(e){if(Renderer.USE_CANVAS_PROXY)return new CanvasContext(e);return e.vexFlowCanvasContext=e,["clear","setFont","setRawFont","setFillStyle","setBackgroundFillStyle","setStrokeStyle","setShadowColor","setShadowBlur","setLineWidth","setLineCap","setLineDash","openGroup","closeGroup","getGroup"].forEach((t=>{e[t]=e[t]||CanvasContext.prototype[t]})),e}static drawDashedLine(e,t,n,i,r,o){e.beginPath();const s=i-t,a=r-n,l=Math.atan2(a,s);let c=t,u=n;e.moveTo(t,n);let h=0,d=!0;for(;!(s<0?c<=i:c>=i)||!(a<0?u<=r:u>=r);){const t=o[h++%o.length],n=c+Math.cos(l)*t;c=s<0?Math.max(i,n):Math.min(i,n);const p=u+Math.sin(l)*t;u=a<0?Math.max(r,p):Math.min(r,p),d?e.lineTo(c,u):e.moveTo(c,u),d=!d}e.closePath(),e.stroke()}constructor(e,t){if(this.elementId=e,!this.elementId)throw new Vex.RERR("BadArgument","Invalid id for renderer.");if(this.element=document.getElementById(e),this.element||(this.element=e),this.ctx=null,this.paper=null,this.backend=t,this.backend===Renderer.Backends.CANVAS){if(!this.element.getContext)throw new Vex.RERR("BadElement",`Can't get canvas context from element: ${e}`);this.ctx=Renderer.bolsterCanvasContext(this.element.getContext("2d"))}else if(this.backend===Renderer.Backends.RAPHAEL)this.ctx=new RaphaelContext(this.element);else{if(this.backend!==Renderer.Backends.SVG)throw new Vex.RERR("InvalidBackend",`No support for backend: ${this.backend}`);this.ctx=new SVGContext(this.element)}}resize(e,t){if(this.backend===Renderer.Backends.CANVAS){if(!this.element.getContext)throw new Vex.RERR("BadElement",`Can't get canvas context from element: ${this.elementId}`);[e,t]=CanvasContext.SanitizeCanvasDims(e,t);const n=window.devicePixelRatio||1;this.element.width=e*n,this.element.height=t*n,this.element.style.width=e+"px",this.element.style.height=t+"px",this.ctx=Renderer.bolsterCanvasContext(this.element.getContext("2d")),this.ctx.scale(n,n)}else this.ctx.resize(e,t);return this}getContext(){return this.ctx}}function L$j(...e){Stem.DEBUG&&Vex.L("Vex.Flow.Stem",e)}class Stem extends Element$1{static get CATEGORY(){return"stem"}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return Flow.STEM_WIDTH}static get HEIGHT(){return Flow.STEM_HEIGHT}constructor(e={}){super(),this.setAttribute("type","Stem"),this.x_begin=e.x_begin||0,this.x_end=e.x_end||0,this.y_top=e.y_top||0,this.y_bottom=e.y_bottom||0,this.stem_extension=e.stem_extension||0,this.stem_direction=e.stem_direction||0,this.hide=e.hide||!1,this.isStemlet=e.isStemlet||!1,this.stemletHeight=e.stemletHeight||0,this.resetHeight=0,this.renderHeightAdjustment=0,this.setOptions(e)}setResetHeight(e){this.resetHeight=e}setOptions(e){this.stem_up_y_offset=e.stem_up_y_offset||0,this.stem_down_y_offset=e.stem_down_y_offset||0}setNoteHeadXBounds(e,t){return this.x_begin=e,this.x_end=t,this}setDirection(e){this.stem_direction=e}setExtension(e){this.stem_extension=e}getExtension(){return this.stem_extension}setYBounds(e,t){this.y_top=e,this.y_bottom=t}getCategory(){return Stem.CATEGORY}getHeight(){const e=this.stem_direction===Stem.UP?this.stem_up_y_offset:this.stem_down_y_offset;return(this.y_bottom-this.y_top)*this.stem_direction+(Stem.HEIGHT-e+this.stem_extension)*this.stem_direction}getBoundingBox(){throw new Vex.RERR("NotImplemented","getBoundingBox() not implemented.")}getExtents(){const e=this.stem_direction===Stem.UP,t=[this.y_top,this.y_bottom],n=Stem.HEIGHT+this.stem_extension,i=(e?Math.min:Math.max)(...t),r=(e?Math.max:Math.min)(...t);return{topY:i+n*-this.stem_direction+this.resetHeight*-this.stem_direction,baseY:r}}setVisibility(e){return this.hide=!e,this}setStemlet(e,t){return this.isStemlet=e,this.stemletHeight=t,this}draw(){if(this.setRendered(),this.hide)return;const e=this.checkContext();let t,n;const i=this.stem_direction;i===Stem.DOWN?(t=this.x_begin,n=this.y_top+this.stem_down_y_offset):(t=this.x_end,n=this.y_bottom-this.stem_up_y_offset);const r=this.getHeight();L$j("Rendering stem - ","Top Y: ",this.y_top,"Bottom Y: ",this.y_bottom);const o=this.isStemlet?r-this.stemletHeight*this.stem_direction:0;if(e.save(),this.applyStyle(e),e.beginPath(),e.setLineWidth(Stem.WIDTH),e.moveTo(t,n-o),e.lineTo(t,n-r-this.renderHeightAdjustment*i-this.resetHeight*i),e.svg){const t={class:Vex.Prefix("stem")};this.id&&(t.id=this.id),e.stroke(t)}else e.stroke();this.restoreStyle(e),e.restore()}}let Tuplet$1=class e extends Element$1{static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(t,n){if(super(),this.setAttribute("type","Tuplet"),!t||!t.length)throw new Vex.RuntimeError("BadArguments","No notes provided for tuplet.");this.options=Vex.Merge({},n),this.notes=t,this.num_notes="num_notes"in this.options?this.options.num_notes:t.length,this.options.beats_occupied&&this.beatsOccupiedDeprecationWarning(),this.notes_occupied=this.options.notes_occupied||this.options.beats_occupied||2,"bracketed"in this.options?this.bracketed=this.options.bracketed:this.bracketed=t.some((e=>null===e.beam)),this.ratioed="ratioed"in this.options?this.options.ratioed:Math.abs(this.notes_occupied-this.num_notes)>1,this.point=28,this.y_pos=16,this.x_pos=100,this.width=200,this.location=this.options.location||e.LOCATION_TOP,Formatter.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let e=0;e=1;)this.numerator_glyphs.unshift(new Glyph("v"+e%10,this.point)),e=parseInt(e/10,10);for(this.denom_glyphs=[],e=this.notes_occupied;e>=1;)this.denom_glyphs.unshift(new Glyph("v"+e%10,this.point)),e=parseInt(e/10,10)}getNestedTupletCount(){const e=this.location,t=this.notes[0];let n=r(t,e),i=r(t,e);function r(e,t){return e.tupletStack.filter((e=>e.location===t)).length}return this.notes.forEach((t=>{const o=r(t,e);n=o>n?o:n,i=or&&(r=t)}}return r+t+n}draw(){this.checkContext(),this.setRendered();const t=this.notes[0],n=this.notes[this.notes.length-1];this.bracketed?(this.x_pos=t.getTieLeftX()-5,this.width=n.getTieRightX()-this.x_pos+5):(this.x_pos=t.getStemX(),this.width=n.getStemX()-this.x_pos),this.y_pos=this.getYPosition();const i=(e,t)=>e+t.getMetrics().width;let r=this.numerator_glyphs.reduce(i,0);this.ratioed&&(r=this.denom_glyphs.reduce(i,r),r+=.32*this.point);const o=this.x_pos+this.width/2-r/2;if(this.bracketed){const t=this.width/2-r/2-5;t>0&&(this.context.fillRect(this.x_pos,this.y_pos,t,1),this.context.fillRect(this.x_pos+this.width/2+r/2+5,this.y_pos,t,1),this.context.fillRect(this.x_pos,this.y_pos+(this.location===e.LOCATION_BOTTOM),1,10*this.location),this.context.fillRect(this.x_pos+this.width,this.y_pos+(this.location===e.LOCATION_BOTTOM),1,10*this.location))}let s=0;if(this.numerator_glyphs.forEach((e=>{e.render(this.context,o+s,this.y_pos+this.point/3-2),s+=e.getMetrics().width})),this.ratioed){const e=o+s+.16*this.point,t=.06*this.point;this.context.beginPath(),this.context.arc(e,this.y_pos-.08*this.point,t,0,2*Math.PI,!0),this.context.closePath(),this.context.fill(),this.context.beginPath(),this.context.arc(e,this.y_pos+.12*this.point,t,0,2*Math.PI,!0),this.context.closePath(),this.context.fill(),s+=.32*this.point,this.denom_glyphs.forEach((e=>{e.render(this.context,o+s,this.y_pos+this.point/3-2),s+=e.getMetrics().width}))}}};function calculateStemDirection(e){let t=0;return e.forEach((e=>{e.keyProps&&e.keyProps.forEach((e=>{t+=e.line-3}))})),t>=0?Stem.DOWN:Stem.UP}const getStemSlope=(e,t)=>{const n=e.getStemExtents().topY,i=e.getStemX();return(t.getStemExtents().topY-n)/(t.getStemX()-i)},BEAM_LEFT="L",BEAM_RIGHT="R",BEAM_BOTH="B";let Beam$1=class e extends Element$1{static getDefaultBeamGroups(e){e&&"c"!==e||(e="4/4");const t={"1/2":["1/2"],"2/2":["1/2"],"3/2":["1/2"],"4/2":["1/2"],"1/4":["1/4"],"2/4":["1/4"],"3/4":["1/4"],"4/4":["1/4"],"1/8":["1/8"],"2/8":["2/8"],"3/8":["3/8"],"4/8":["2/8"],"1/16":["1/16"],"2/16":["2/16"],"3/16":["3/16"],"4/16":["2/16"]}[e];if(void 0!==t)return t.map((e=>(new Fraction).parse(e)));{const t=parseInt(e.split("/")[0],10),n=parseInt(e.split("/")[1],10);if(t%3==0)return[new Fraction(3,n)];if(n>4)return[new Fraction(2,n)];if(n<=4)return[new Fraction(1,n)]}return[new Fraction(1,4)]}static applyAndGetBeams(t,n,i){return e.generateBeams(t.getTickables(),{groups:i,stem_direction:n})}static generateBeams(t,n){n||(n={}),n.groups&&n.groups.length||(n.groups=[new Fraction(2,8)]);const i=n.groups.map((e=>{if(!e.multiply)throw new Vex.RuntimeError("InvalidBeamGroups","The beam groups must be an array of Vex.Flow.Fractions");return e.clone().multiply(Flow.RESOLUTION,1)})),r=t;let o=0,s=[],a=[];function l(){i.length-1>o?o+=1:o=0}!function(){let e=[];r.forEach((t=>{if(e=[],t.shouldIgnoreTicks())return s.push(a),void(a=e);a.push(t);const n=i[o].clone(),r=a.reduce(((e,t)=>t.getTicks().clone().add(e)),new Fraction(0,1));const c=Flow.durationToNumber(t.duration)<8;c&&t.tuplet&&(n.numerator*=2),r.greaterThan(n)?(c||e.push(a.pop()),s.push(a),a=e,l()):r.equals(n)&&(s.push(a),a=e,l())})),a.length>0&&s.push(a)}(),function(){const e=[];s.forEach((t=>{let i=[];t.forEach(((t,r,o)=>{const s=0===r||r===o.length-1,a=o[r-1],l=!n.beam_rests&&t.isRest(),c=n.beam_rests&&n.beam_middle_only&&t.isRest()&&s;let u=!1;if(n.maintain_stem_directions&&a&&!t.isRest()&&!a.isRest()){const e=a.getStemDirection();u=t.getStemDirection()!==e}const h=parseInt(t.duration,10)<8;l||c||u||h?(i.length>0&&e.push(i),i=u?[t]:[]):i.push(t)})),i.length>0&&e.push(i)})),s=e}(),s.forEach((e=>{let t;if(n.maintain_stem_directions){const n=function(e){for(let t=0;t{e.setStemDirection(t)}))}(e,t)}));const c=s.filter((e=>{if(e.length>1){let t=!0;return e.forEach((e=>{e.getIntrinsicTicks()>=Flow.durationToTicks("4")&&(t=!1)})),t}return!1})),u=function(){const e=[];return s.forEach((t=>{let n=null;t.forEach((t=>{t.tuplet&&n!==t.tuplet&&(n=t.tuplet,e.push(n))}))})),e}(),h=[];return c.forEach((t=>{const i=new e(t);n.show_stemlets&&(i.render_options.show_stemlets=!0),n.secondary_breaks&&(i.render_options.secondary_break_ticks=Flow.durationToTicks(n.secondary_breaks)),!0===n.flat_beams&&(i.render_options.flat_beams=!0,i.render_options.flat_beam_offset=n.flat_beam_offset),h.push(i)})),u.forEach((e=>{const t=e.notes[0].stem_direction===Stem.DOWN?Tuplet$1.LOCATION_BOTTOM:Tuplet$1.LOCATION_TOP;e.setTupletLocation(t);let n=!1;for(let i=0;i=Flow.durationToTicks("4"))throw new Vex.RuntimeError("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let n,i;for(this.stem_direction=Stem.UP,n=0;ne+t.stem_direction),0);r=t>-1?Stem.UP:Stem.DOWN}for(n=0;ne.getGlyph().beam_count));return e.reduce(((e,t)=>t>e?t:e))}breakSecondaryAt(e){return this.break_on_indices=e,this}getSlopeY(e,t,n,i){return n+(e-t)*i}calculateSlope(){const{notes:e,stem_direction:t,render_options:{max_slope:n,min_slope:i,slope_iterations:r,slope_cost:o}}=this,s=e[0],a=getStemSlope(s,e[e.length-1]),l=(n-i)/r;let c=Number.MAX_VALUE,u=0,h=0;for(let d=i;d<=n;d+=l){let n=0,i=0;for(let o=1;oi)&&(l=i,s=Math.min(...n.getYs()),a=n.getBeamCount())}let c=o/e.length;const u=i+a*(1.5*n),h=s+u*-t;t===Stem.DOWN&&ch&&(c=s-u),r+this.render_options.flat_beam_offset_per_beam>0?(t===Stem.DOWN&&c>r&&!this.render_options.flat_beams||t===Stem.UP&&c0){let t=this.render_options.flat_beam_offset;this.render_options.flat_beam_offset_per_beam&&(t+=this.render_options.flat_beam_offset_per_beam*this.getBeamCount());let n=this.notes[0].note_heads[0].y;const i=this.stem_direction>0?Math.min:Math.max;for(const e of this.notes)for(const t of e.note_heads)n=i(n,t.y);e=n+t*-this.stem_direction}return e}applyStemExtensions(){const{notes:e,slope:t,y_shift:n,stem_direction:i,beam_count:r,render_options:{show_stemlets:o,stemlet_extension:s,beam_width:a}}=this,l=e[0],c=this.getBeamYToDraw(),u=l.getStemX();for(let h=0;h=8&&(u=-1!==this.break_on_indices.indexOf(c),this.render_options.secondary_break_ticks&&a>=this.render_options.secondary_break_ticks&&(a=0,u=!0));const h=l.getIntrinsicTicks(){e.getStem()&&(this.context.openGroup("stem",e.getAttribute("id")+"-stem"),e.getStem().setContext(this.context).draw(),this.context.closeGroup())}),this)}drawBeamLines(){this.checkContext();const e=["4","8","16","32","64"],t=this.notes[0];let n=this.getBeamYToDraw();const i=t.getStemX(),r=this.render_options.beam_width*this.stem_direction,o={};for(const s of this.notes)o[s.getAttribute("id")]=0;for(let s=0;s{e.getStave()||e.setStave(this.stave)})),this.preFormatted=!0),this}draw(e=this.context,t=this.stave){this.setRendered();let n=null;for(let i=0;i0&&n){const e=r.getBoundingBox();e&&n.mergeWith(e)}r.setContext(e),r.drawWithStyle()}this.boundingBox=n}};function drawBoldDoubleLine(e,t,n,i,r){if(t!==StaveConnector.type.BOLD_DOUBLE_LEFT&&t!==StaveConnector.type.BOLD_DOUBLE_RIGHT)throw new Vex.RERR("InvalidConnector","A REPEAT_BEGIN or REPEAT_END type must be provided.");let o=3,s=3.5;t===StaveConnector.type.BOLD_DOUBLE_RIGHT&&(o=-5,s=3),e.fillRect(n+o,i,1,r-i),e.fillRect(n-2,i,s,r-i)}class StaveConnector extends Element$1{static get type(){return{SINGLE_RIGHT:0,SINGLE_LEFT:1,SINGLE:1,DOUBLE:2,BRACE:3,BRACKET:4,BOLD_DOUBLE_LEFT:5,BOLD_DOUBLE_RIGHT:6,THIN_DOUBLE:7,NONE:8}}static get typeString(){return{singleRight:StaveConnector.type.SINGLE_RIGHT,singleLeft:StaveConnector.type.SINGLE_LEFT,single:StaveConnector.type.SINGLE,double:StaveConnector.type.DOUBLE,brace:StaveConnector.type.BRACE,bracket:StaveConnector.type.BRACKET,boldDoubleLeft:StaveConnector.type.BOLD_DOUBLE_LEFT,boldDoubleRight:StaveConnector.type.BOLD_DOUBLE_RIGHT,thinDouble:StaveConnector.type.THIN_DOUBLE,none:StaveConnector.type.NONE}}constructor(e,t){super(),this.setAttribute("type","StaveConnector"),this.thickness=Flow.STAVE_LINE_THICKNESS,this.width=3,this.top_stave=e,this.bottom_stave=t,this.type=StaveConnector.type.DOUBLE,this.font={family:"times",size:16,weight:"normal"},this.x_shift=0,this.texts=[]}setType(e){return(e="string"==typeof e?StaveConnector.typeString[e]:e)>=StaveConnector.type.SINGLE_RIGHT&&e<=StaveConnector.type.NONE&&(this.type=e),this}setText(e,t){return this.texts.push({content:e,options:Vex.Merge({shift_x:0,shift_y:0},t)}),this}setFont(e){Vex.Merge(this.font,e)}setXShift(e){if("number"!=typeof e)throw Vex.RERR("InvalidType","x_shift must be a Number");return this.x_shift=e,this}draw(){const e=this.checkContext();this.setRendered();let t=this.top_stave.getYForLine(0),n=this.bottom_stave.getYForLine(this.bottom_stave.getNumLines()-1)+this.thickness,i=this.width,r=this.top_stave.getX();(this.type===StaveConnector.type.SINGLE_RIGHT||this.type===StaveConnector.type.BOLD_DOUBLE_RIGHT||this.type===StaveConnector.type.THIN_DOUBLE)&&(r=this.top_stave.getX()+this.top_stave.width);let o=n-t;switch(this.type){case StaveConnector.type.SINGLE:case StaveConnector.type.SINGLE_LEFT:case StaveConnector.type.SINGLE_RIGHT:i=1;break;case StaveConnector.type.DOUBLE:r-=this.width+2;break;case StaveConnector.type.BRACE:{i=12;const r=this.top_stave.getX()-2+this.x_shift,s=t,a=r,l=n,c=r-i,u=s+o/2,h=c-.9*i,d=s+.2*o,p=r+1.1*i,f=u-.135*o,m=p,g=u+.135*o,v=h,b=l-.2*o,A=c-i,y=b,S=r+.4*i,x=u+.135*o,w=S,E=u-.135*o,_=A,M=d;e.beginPath(),e.moveTo(r,s),e.bezierCurveTo(h,d,p,f,c,u),e.bezierCurveTo(m,g,v,b,a,l),e.bezierCurveTo(A,y,S,x,c,u),e.bezierCurveTo(w,E,_,M,r,s),e.fill(),e.stroke();break}case StaveConnector.type.BRACKET:t-=4,n+=4,o=n-t,Glyph.renderGlyph(e,r-5,t-3,40,"v1b",!0),Glyph.renderGlyph(e,r-5,n+3,40,"v10",!0),r-=this.width+2;break;case StaveConnector.type.BOLD_DOUBLE_LEFT:drawBoldDoubleLine(e,this.type,r+this.x_shift,t,n);break;case StaveConnector.type.BOLD_DOUBLE_RIGHT:drawBoldDoubleLine(e,this.type,r,t,n);break;case StaveConnector.type.THIN_DOUBLE:i=1;break;case StaveConnector.type.NONE:break;default:throw new Vex.RERR("InvalidType",`The provided StaveConnector.type (${this.type}) is invalid`)}this.type!==StaveConnector.type.BRACE&&this.type!==StaveConnector.type.BOLD_DOUBLE_LEFT&&this.type!==StaveConnector.type.BOLD_DOUBLE_RIGHT&&this.type!==StaveConnector.type.NONE&&e.fillRect(r,t,i,o),this.type===StaveConnector.type.THIN_DOUBLE&&e.fillRect(r-3,t,i,o),e.save(),e.lineWidth=2,e.setFont(this.font.family,this.font.size,this.font.weight);for(let s=0;s0){const i=f.space.deviation,r=i>=0?"+":"";e.setFillStyle("red"),e.fillText(r+Math.round(i),s+t.getXShift(),n-10)}e.restore()}constructor(e){if(super(),this.setAttribute("type","Note"),!e)throw new Vex.RuntimeError("BadArguments","Note must have valid initialization data to identify duration and type.");const t=Flow.parseNoteStruct(e);if(!t)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization object: ${JSON.stringify(e)}`);if(this.duration=t.duration,this.dots=t.dots,this.noteType=t.type,this.customTypes=t.customTypes,this.DYMusicScoreType=e.DYMusicScoreType,e.duration_override?this.setDuration(e.duration_override):this.setIntrinsicTicks(t.ticks),this.modifiers=[],this.glyph=Flow.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map((e=>Flow.getGlyphProps(this.duration,e))),this.positions&&("object"!=typeof this.positions||!this.positions.length))throw new Vex.RuntimeError("BadArguments","Note keys must be array type.");this.playNote=null,this.tickContext=null,this.modifierContext=null,this.ignore_ticks=!1,this.width=0,this.extraLeftPx=0,this.extraRightPx=0,this.x_shift=0,this.left_modPx=0,this.right_modPx=0,this.voice=null,this.preFormatted=!1,this.ys=[],e.align_center&&this.setCenterAlignment(e.align_center),this.stave=null,this.render_options={annotation_spacing:5,stave_padding:Note.STAVEPADDING}}getPlayNote(){return this.playNote}setPlayNote(e){return this.playNote=e,this}isRest(){return!1}addStroke(e,t){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.setPreFormatted(!1),this}getStave(){return this.stave}setStave(e){return this.stave=e,this.setYs([e.getYForLine(0)]),this.context=this.stave.context,this}getCategory(){return Note.CATEGORY}setContext(e){return this.context=e,this}getExtraLeftPx(){return this.extraLeftPx}getExtraRightPx(){return this.extraRightPx}setExtraLeftPx(e){return this.extraLeftPx=e,this}setExtraRightPx(e){return this.extraRightPx=e,this}shouldIgnoreTicks(){return this.ignore_ticks}getLineNumber(){return 0}getLineForRest(){return 0}getGlyph(){return this.glyph}getGlyphWidth(){return this.glyph.getWidth?this.glyph.getWidth(this.render_options.glyph_font_scale):15}setYs(e){return this.ys=e,this}getYs(){if(0===this.ys.length)throw new Vex.RERR("NoYValues","No Y-values calculated for this note.");return this.ys}getYForTopText(e){if(!this.stave)throw new Vex.RERR("NoStave","No stave attached to this note.");return this.stave.getYForTopText(e)}getBoundingBox(){return null}getVoice(){if(!this.voice)throw new Vex.RERR("NoVoice","Note has no voice.");return this.voice}setVoice(e){return this.voice=e,this.preFormatted=!1,this}getTickContext(){return this.tickContext}setTickContext(e){return this.tickContext=e,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.dots>0}hasStem(){return!1}getDots(){return this.dots}getNoteType(){return this.noteType}setBeam(){return this}setModifierContext(e){return this.modifierContext=e,this}addModifier(e,t=0){return e.setNote(this),e.setIndex(t),this.modifiers.push(e),this.setPreFormatted(!1),this}getModifierStartXY(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");return{x:this.getAbsoluteX(),y:this.ys[0]}}getMetrics(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getMetrics on an unformatted note.");let e=0,t=0;null!=this.modifierContext&&(e=this.modifierContext.state.left_shift,t=this.modifierContext.state.right_shift);const n=this.getWidth();return{width:n,noteWidth:n-e-t-this.extraLeftPx-this.extraRightPx,left_shift:this.x_shift,modLeftPx:e,modRightPx:t,extraLeftPx:this.extraLeftPx,extraRightPx:this.extraRightPx}}setWidth(e){this.width=e}getWidth(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetWidth on an unformatted note.");return this.width+(this.modifierContext?this.modifierContext.getWidth():0)}setXShift(e){return this.x_shift=e,this}getXShift(){return this.x_shift}getX(){if(!this.tickContext)throw new Vex.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");return this.tickContext.getX()+this.x_shift}getAbsoluteX(){if(!this.tickContext)throw new Vex.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");let e=this.tickContext.getX();return this.stave&&(e+=this.stave.getNoteStartX()+this.render_options.stave_padding),this.isCenterAligned()&&("jianpu"===this.DYMusicScoreType||(e+=this.getCenterXShift())),e}setPreFormatted(e){if(this.preFormatted=e,this.preFormatted){const e=this.tickContext.getExtraPx();this.left_modPx=Math.max(this.left_modPx,e.left),this.right_modPx=Math.max(this.right_modPx,e.right)}}}function L$i(...e){NoteHead.DEBUG&&Vex.L("Vex.Flow.NoteHead",e)}function drawSlashNoteHead(e,t,n,i,r,o){const s=Flow.SLASH_NOTEHEAD_WIDTH;e.save(),e.setLineWidth(Flow.STEM_WIDTH);let a=!1;if(Flow.durationToNumber(t)>2&&(a=!0),a||(n-=Flow.STEM_WIDTH/2*r),e.beginPath(),e.moveTo(n,i+o),e.lineTo(n,i+1),e.lineTo(n+s,i-o),e.lineTo(n+s,i),e.lineTo(n,i+o),e.closePath(),a?e.fill():e.stroke(),Flow.durationToFraction(t).equals(.5)){const t=[-3,-1,s+1,s+3];for(let r=0;r{const n=e.getTickContext();e.setStave(t.stave),n.setXOffset(r)}))}}class Dot extends Modifier{static get CATEGORY(){return"dots"}static format(e,t){const n=t.right_shift;if(!e||0===e.length)return!1;const i=[],r={};for(let h=0;ht.line-e.line));let o=n,s=0,a=null,l=null,c=null,u=0;for(let h=0;hs?o:s,a=d,l=t}return t.right_shift+=s,!0}constructor(){super(),this.setAttribute("type","Dot"),this.note=null,this.index=null,this.position=Modifier.Position.RIGHT,this.radius=2,this.setWidth(5),this.dot_shiftY=0}getCategory(){return Dot.CATEGORY}setNote(e){this.note=e,"gracenotes"===this.note.getCategory()&&(this.radius*=.5,this.setWidth(3))}setDotShiftY(e){return this.dot_shiftY=e,this}draw(){if(this.checkContext(),this.setRendered(),!this.note||null===this.index)throw new Vex.RERR("NoAttachedNote","Can't draw dot without a note and index.");const e=this.note.stave.options.spacing_between_lines_px,t=this.note.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});"tabnotes"===this.note.getCategory()&&(t.y=this.note.getStemExtents().baseY+1);const n=t.x+this.x_shift+this.width-this.radius;let i=this.dot_shiftY*e;this.note&&"jianpu"==this.note.DYMusicScoreType&&(i=-5);const r=t.y+this.y_shift+i,o=this.context;o.beginPath(),o.arc(n,r,this.radius,0,2*Math.PI,!1),o.fill()}}function L$h(...e){StaveNote.DEBUG&&Vex.L("Vex.Flow.StaveNote",e)}const getStemAdjustment=e=>Stem.WIDTH/(2*-e.getStemDirection()),isInnerNoteIndex=(e,t)=>t===(e.getStemDirection()===Stem.UP?e.keyProps.length-1:0);function shiftRestVertical(e,t,n){const i=(t.isrest?0:1)*n;e.line+=i,e.maxLine+=i,e.minLine+=i,e.note.setKeyLine(0,e.note.getKeyLine(0)+i)}function centerRest(e,t,n){const i=e.line-Vex.MidLine(t.minLine,n.maxLine);e.note.setKeyLine(0,e.note.getKeyLine(0)-i),e.line-=i,e.maxLine-=i,e.minLine-=i}class StaveNote extends StemmableNote{static get CATEGORY(){return"stavenotes"}static get STEM_UP(){return Stem.UP}static get STEM_DOWN(){return Stem.DOWN}static get DEFAULT_LEDGER_LINE_OFFSET(){return 3}static renderVibrato(e,t,n,i){let{width:r,height:o,wave_width:s,wave_girth:a,wave_height:l,stem_direction:c}=i;const u=Math.floor(r/s);let h=o/(u/2)*c;0==h&&(c=1,h=.3),e.beginPath(),e.moveTo(t,n+a);for(let d=0;d2?n[1]:null;let a=r>2?n[2]:n[1];2===r&&-1===o.stemDirection&&1===a.stemDirection&&(o=n[1],a=n[0]);const l=Math.max(o.voice_shift,a.voice_shift);let c,u=0;if(2===r){const e=o.stemDirection===a.stemDirection?0:.5;if(o.stemDirection===a.stemDirection&&o.minLine<=a.maxLine&&(o.isrest||(c=Math.abs(o.line-(a.maxLine+.5)),c=Math.max(c,o.stemMin),o.minLine=o.line-c,o.note.setStemLength(10*c))),o.minLine<=a.maxLine+e)if(o.isrest)shiftRestVertical(o,a,1);else if(a.isrest)shiftRestVertical(a,o,-1);else{u=l;const e=Math.abs(o.line-a.line);let t=0,n=0;"h"===o.note.duration?t++:"w"===o.note.duration&&n++,"h"===a.note.duration?t++:"w"===a.note.duration&&n++;let r=1===t||1===n||o.note.dots!==a.note.dots;if(i&&(r=r||2===n),0===e&&r){if(a.note.setXShift(u),o.note.dots>0){let e=0;for(const t of o.note.modifiers)if(t instanceof Dot&&(e++,t.setYShift(-10*(a.maxLine-o.line+1)),e===o.note.dots))break}}else e<1&&e>0?a.note.setXShift(u):o.note.voice!==a.note.voice&&o.stemDirection===a.stemDirection&&(o.line>a.line?1===o.stemDirection?a.note.renderFlag=!1:o.note.renderFlag=!1:a.line>o.line?1===a.stemDirection?o.note.renderFlag=!1:a.note.renderFlag=!1:1===a.stemDirection&&(a.stemDirection=-1,a.note.setStemDirection(-1)))}return!0}if(null!==s&&s.minLinee.postFormat())),!0)}constructor(e){if(super(e),this.setAttribute("type","StaveNote"),this.keys=e.keys,this.clef=e.clef,this.octave_shift=e.octave_shift,this.beam=null,this.vibrato=null,this.slideNote=null,this.glyph=Flow.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(e)}`);this.displaced=!1,this.dot_shiftY=0,this.addDotsCount=0,this.keyProps=[],this.use_default_head_x=!1,this.note_heads=[],this.modifiers=[],Vex.Merge(this.render_options,{glyph_font_scale:e.glyph_font_scale||Flow.DEFAULT_NOTATION_FONT_SCALE,stroke_px:e.stroke_px||StaveNote.DEFAULT_LEDGER_LINE_OFFSET}),this.calculateKeyProps(),this.buildStem(),e.auto_stem?this.autoStem():this.setStemDirection(e.stem_direction),this.reset(),this.buildFlag()}reset(){super.reset();const e=this.note_heads.map((e=>e.getStyle()));this.buildNoteHeads(),this.note_heads.forEach(((t,n)=>t.setStyle(e[n]))),this.stave&&this.note_heads.forEach((e=>e.setStave(this.stave))),this.calcExtraPx()}setBeam(e){return this.beam=e,this.calcExtraPx(),this}setVibrato(e){this.vibrato=e}setSlideNote(e){this.slideNote=e}getCategory(){return StaveNote.CATEGORY}buildStem(){this.setStem(new Stem({hide:!!this.isRest()})),this.stem.id=Vex.Prefix(`${this.getAttribute("id")}-stem`)}buildNoteHeads(){this.note_heads=[];const e=this.getStemDirection(),t=this.getKeys();let n,i,r,o=null,s=null,a=!1;e===Stem.UP?(n=0,i=t.length,r=1):e===Stem.DOWN&&(n=t.length-1,i=-1,r=-1);for(let l=n;l!==i;l+=r){const t=this.keyProps[l],n=t.line;null===o?o=n:(s=Math.abs(o-n),0===s||.5===s?a=!a:(a=!1,this.use_default_head_x=!0)),o=n;const i=new NoteHead({duration:this.duration,note_type:this.noteType,displaced:a,stem_direction:e,custom_glyph_code:t.code,glyph_font_scale:this.render_options.glyph_font_scale,x_shift:t.shift_right,stem_up_x_offset:t.stem_up_x_offset,stem_down_x_offset:t.stem_down_x_offset,line:t.line});this.note_heads[l]=i}}autoStem(){this.minLine=this.keyProps[0].line,this.maxLine=this.keyProps[this.keyProps.length-1].line;const e=(this.minLine+this.maxLine)/2<3?Stem.UP:Stem.DOWN;this.setStemDirection(e)}calculateKeyProps(){let e=null;for(let t=0;t0&&(this.keyProps[t-1].displaced=!0)),e=o,this.keyProps.push(r)}e=-1/0,this.keyProps.forEach((t=>{t.linee.line-t.line))}getBoundingBox(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const{width:e,modLeftPx:t,extraLeftPx:n}=this.getMetrics(),i=this.getAbsoluteX()-t-n;let r=0,o=0;const s=this.getStave().getSpacingBetweenLines()/2,a=2*s;if(this.isRest()){const e=this.ys[0],t=Flow.durationToFraction(this.duration);t.equals(1)||t.equals(2)?(r=e-s,o=e+s):(r=e-this.glyph.line_above*a,o=e+this.glyph.line_below*a)}else if(this.glyph.stem){const e=this.getStemExtents();e.baseY+=s*this.stem_direction,r=Math.min(e.topY,e.baseY),o=Math.max(e.topY,e.baseY)}else{r=null,o=null;for(let e=0;et&&(t=i):i1}hasStem(){return this.glyph.stem}hasFlag(){return super.hasFlag()&&!this.isRest()&&this.renderFlag}getStemX(){return"r"===this.noteType?this.getCenterGlyphX():super.getStemX()+getStemAdjustment(this)}getYForTopText(e){const t=this.getStemExtents();return Math.min(this.stave.getYForTopText(e),t.topY-this.render_options.annotation_spacing*(e+1))}getYForBottomText(e){const t=this.getStemExtents();return Math.max(this.stave.getYForTopText(e),t.baseY+this.render_options.annotation_spacing*e)}setStave(e){super.setStave(e);const t=this.note_heads.map((t=>(t.setStave(e),t.getY())));if(this.setYs(t),this.stem){const{y_top:e,y_bottom:t}=this.getNoteHeadBounds();this.stem.setYBounds(e,t)}return this}getKeys(){return this.keys}getKeyProps(){return this.keyProps}isDisplaced(){return this.displaced}setNoteDisplaced(e){return this.displaced=e,this}getTieRightX(){let e=this.getAbsoluteX();return e+=this.getGlyphWidth()+this.x_shift+this.extraRightPx,this.modifierContext&&(e+=this.modifierContext.getExtraRightPx()),e}getTieLeftX(){let e=this.getAbsoluteX();return e+=this.x_shift-this.extraLeftPx,e}getLineForRest(){let e=this.keyProps[0].line;if(this.keyProps.length>1){const t=this.keyProps[this.keyProps.length-1].line,n=Math.max(e,t),i=Math.min(e,t);e=Vex.MidLine(n,i)}return e}getModifierStartXY(e,t,n){if(n=n||{},!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new Vex.RERR("NoYValues","No Y-Values calculated for this note.");const{ABOVE:i,BELOW:r,LEFT:o,RIGHT:s}=Modifier.Position;let a=0;return e===o?a=-2:e===s?(a=this.getGlyphWidth()+this.x_shift+2,this.stem_direction===Stem.UP&&this.hasFlag()&&(n.forceFlagRight||isInnerNoteIndex(this,t))&&(a+=this.flag.getMetrics().width)):e!==r&&e!==i||(a=this.getGlyphWidth()/2),{x:this.getAbsoluteX()+a,y:this.ys[t]}}setStyle(e){super.setStyle(e),this.note_heads.forEach((t=>t.setStyle(e))),this.stem&&this.stem.setStyle(e)}setStemStyle(e){if(this.stem){this.getStem().setStyle(e)}}getStemStyle(){return this.stem.getStyle()}setLedgerLineStyle(e){this.ledgerLineStyle=e}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(e){this.flagStyle=e}getFlagStyle(){return this.flagStyle}setKeyStyle(e,t){return this.note_heads[e].setStyle(t),this}setKeyLine(e,t){return this.keyProps[e].line=t,this.reset(),this}getKeyLine(e){return this.keyProps[e].line}addToModifierContext(e){this.setModifierContext(e);for(let t=0;t{const h=u.getLine(),d=u.getY();(null===e||dt)&&(t=d),null===i&&u.isDisplaced()&&(i=u.getAbsoluteX()),null!==n||u.isDisplaced()||(n=u.getAbsoluteX()),r=h>r?h:r,o=h{let a;a=s&&t?f-n:t?p-n:d-n;const l=t&&s?o:r;i.beginPath(),i.moveTo(a,e),i.lineTo(a+l,e),i.stroke()},g={...e.getStyle()||{},...this.getLedgerLineStyle()||{}};this.applyStyle(i,g);for(let v=6;v<=s;++v){const t=null!==p&&v<=c,n=null!==d&&v<=l;m(e.getYForNote(v),t,n)}for(let v=0;v>=a;--v){const t=null!==p&&v>=h,n=null!==d&&v>=u;m(e.getYForNote(v),t,n)}this.restoreStyle(i,g)}drawVibrato(){if(this.vibrato){const e=this.context,t=this.vibrato.getNoteHeadEndX()+2;let{y_bottom:n}=this.vibrato.getNoteHeadBounds(),{y_top:i}=this.getNoteHeadBounds();const r=n6.5||e<-.5)&&(a+=e>6.5?10*(e-6.5):10*(e+.5))}n.openGroup("flag",null,{pointerBBox:!0}),this.applyStyle(n,this.getFlagStyle()||!1),this.flag.render(n,s,a),this.restoreStyle(n,this.getFlagStyle()||!1),n.closeGroup()}}drawNoteHeads(){this.note_heads.forEach((e=>{this.context.openGroup("notehead",null,{pointerBBox:!0});try{if(this.isRest()&&"w"===this.duration){const t=this.stave.options.line_config.filter((e=>e.visible)).length;4===this.keyProps[0].line&&t<5&&e.setY(e.getY()+10),1===t&&e.setLine(3)}}catch(t){}e.setContext(this.context).draw(),this.context.closeGroup()}))}drawStem(e){if(!this.context)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");e&&this.setStem(new Stem(e)),this.stem.id=Vex.Prefix(`${this.getAttribute("id")}-stem`),this.stem&&(this.context.openGroup("stem",null,{pointerBBox:!0}),this.stem.setContext(this.context).draw(),this.context.closeGroup())}draw(){if(!this.context)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");if(!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");if(0===this.ys.length)throw new Vex.RERR("NoYValues","Can't draw note without Y values.");const e=this.stave.getLines();if(2===e||3===e||4===e)for(let i=0;ie.setX(t))),this.stem){let e=this.getStemX();const t=this.keyProps[0].line;(t>6.5||t<-.5)&&(this.beam||(this.stem.renderHeightAdjustment=t>6.5?10*(t-6.5):10*Math.abs(t+.5))),this.stem.setNoteHeadXBounds(e,e)}L$h("Rendering ",this.isChord()?"chord :":"note :",this.keys),this.drawLedgerLines(),this.applyStyle(),this.setAttribute("el",this.context.openGroup("stavenote",this.getAttribute("id"))),this.context.openGroup("note",null,{pointerBBox:!0}),n&&this.drawStem(),this.drawNoteHeads(),this.drawFlag(),this.context.closeGroup(),this.drawModifiers(),this.context.closeGroup(),this.restoreStyle(),this.setRendered()}}class FretHandFinger extends Modifier{static get CATEGORY(){return"frethandfinger"}static format(e,t){const{left_shift:n,right_shift:i}=t;if(!e||0===e.length)return!1;const r=[];let o=null,s=0,a=0;for(let f=0;ft.line-e.line));let l=0,c=0,u=0,h=0,d=null,p=null;for(let f=0;fu?e:u):o===Modifier.Position.RIGHT&&(s.setXShift(c),e=a+b,h=e>h?e:h),d=m,p=t}return t.left_shift+=u,t.right_shift+=h,!0}constructor(e){super(),this.setAttribute("type","FretHandFinger"),this.note=null,this.index=null,this.finger=e,this.width=7,this.position=Modifier.Position.LEFT,this.x_shift=0,this.y_shift=0,this.x_offset=0,this.y_offset=0,this.font={family:"sans-serif",size:9,weight:"bold"}}getCategory(){return FretHandFinger.CATEGORY}setFretHandFinger(e){return this.finger=e,this}setOffsetX(e){return this.x_offset=e,this}setOffsetY(e){return this.y_offset=e,this}draw(){if(this.checkContext(),!this.note||null==this.index)throw new Vex.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const e=this.context,t=this.note.getModifierStartXY(this.position,this.index);let n=t.x+this.x_shift+this.x_offset,i=t.y+this.y_shift+this.y_offset+5;switch(this.position){case Modifier.Position.ABOVE:n-=4,i-=12;break;case Modifier.Position.BELOW:n-=2,i+=10;break;case Modifier.Position.LEFT:n-=this.width;break;case Modifier.Position.RIGHT:n+=1;break;default:throw new Vex.RERR("InvalidPostion",`The position ${this.position} does not exist`)}e.save(),e.setFont(this.font.family,this.font.size,this.font.weight),e.fillText(""+this.finger,n,i),e.restore()}}class Music{static get NUM_TONES(){return 12}static get roots(){return["c","d","e","f","g","a","b"]}static get root_values(){return[0,2,4,5,7,9,11]}static get root_indices(){return{c:0,d:1,e:2,f:3,g:4,a:5,b:6}}static get canonical_notes(){return["c","c#","d","d#","e","f","f#","g","g#","a","a#","b"]}static get diatonic_intervals(){return["unison","m2","M2","m3","M3","p4","dim5","p5","m6","M6","b7","M7","octave"]}static get diatonic_accidentals(){return{unison:{note:0,accidental:0},m2:{note:1,accidental:-1},M2:{note:1,accidental:0},m3:{note:2,accidental:-1},M3:{note:2,accidental:0},p4:{note:3,accidental:0},dim5:{note:4,accidental:-1},p5:{note:4,accidental:0},m6:{note:5,accidental:-1},M6:{note:5,accidental:0},b7:{note:6,accidental:-1},M7:{note:6,accidental:0},octave:{note:7,accidental:0}}}static get intervals(){return{u:0,unison:0,m2:1,b2:1,min2:1,S:1,H:1,2:2,M2:2,maj2:2,T:2,W:2,m3:3,b3:3,min3:3,M3:4,3:4,maj3:4,4:5,p4:5,"#4":6,b5:6,aug4:6,dim5:6,5:7,p5:7,"#5":8,b6:8,aug5:8,6:9,M6:9,maj6:9,b7:10,m7:10,min7:10,dom7:10,M7:11,maj7:11,8:12,octave:12}}static get scales(){return{major:[2,2,1,2,2,2,1],dorian:[2,1,2,2,2,1,2],mixolydian:[2,2,1,2,2,1,2],minor:[2,1,2,2,1,2,2]}}static get scaleTypes(){return{M:Music.scales.major,m:Music.scales.minor}}static get accidentals(){return["bb","b","n","#","##"]}static get noteValues(){return{c:{root_index:0,int_val:0},cn:{root_index:0,int_val:0},"c#":{root_index:0,int_val:1},"c##":{root_index:0,int_val:2},cb:{root_index:0,int_val:11},cbb:{root_index:0,int_val:10},d:{root_index:1,int_val:2},dn:{root_index:1,int_val:2},"d#":{root_index:1,int_val:3},"d##":{root_index:1,int_val:4},db:{root_index:1,int_val:1},dbb:{root_index:1,int_val:0},e:{root_index:2,int_val:4},en:{root_index:2,int_val:4},"e#":{root_index:2,int_val:5},"e##":{root_index:2,int_val:6},eb:{root_index:2,int_val:3},ebb:{root_index:2,int_val:2},f:{root_index:3,int_val:5},fn:{root_index:3,int_val:5},"f#":{root_index:3,int_val:6},"f##":{root_index:3,int_val:7},fb:{root_index:3,int_val:4},fbb:{root_index:3,int_val:3},g:{root_index:4,int_val:7},gn:{root_index:4,int_val:7},"g#":{root_index:4,int_val:8},"g##":{root_index:4,int_val:9},gb:{root_index:4,int_val:6},gbb:{root_index:4,int_val:5},a:{root_index:5,int_val:9},an:{root_index:5,int_val:9},"a#":{root_index:5,int_val:10},"a##":{root_index:5,int_val:11},ab:{root_index:5,int_val:8},abb:{root_index:5,int_val:7},b:{root_index:6,int_val:11},bn:{root_index:6,int_val:11},"b#":{root_index:6,int_val:0},"b##":{root_index:6,int_val:1},bb:{root_index:6,int_val:10},bbb:{root_index:6,int_val:9}}}isValidNoteValue(e){return!(null==e||e<0||e>=Music.NUM_TONES)}isValidIntervalValue(e){return this.isValidNoteValue(e)}getNoteParts(e){if(!e||e.length<1)throw new Vex.RERR("BadArguments","Invalid note name: "+e);if(e.length>3)throw new Vex.RERR("BadArguments","Invalid note name: "+e);const t=e.toLowerCase(),n=/^([cdefgab])(b|bb|n|#|##)?$/.exec(t);if(null!=n){return{root:n[1],accidental:n[2]}}throw new Vex.RERR("BadArguments","Invalid note name: "+e)}getKeyParts(e){if(!e||e.length<1)throw new Vex.RERR("BadArguments","Invalid key: "+e);const t=e.toLowerCase(),n=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(t);if(null!=n){const e=n[1],t=n[2];let i=n[3];return i||(i="M"),{root:e,accidental:t,type:i}}throw new Vex.RERR("BadArguments",`Invalid key: ${e}`)}getNoteValue(e){const t=Music.noteValues[e];if(null==t)throw new Vex.RERR("BadArguments",`Invalid note name: ${e}`);return t.int_val}getIntervalValue(e){const t=Music.intervals[e];if(null==t)throw new Vex.RERR("BadArguments",`Invalid interval name: ${e}`);return t}getCanonicalNoteName(e){if(!this.isValidNoteValue(e))throw new Vex.RERR("BadArguments",`Invalid note value: ${e}`);return Music.canonical_notes[e]}getCanonicalIntervalName(e){if(!this.isValidIntervalValue(e))throw new Vex.RERR("BadArguments",`Invalid interval value: ${e}`);return Music.diatonic_intervals[e]}getRelativeNoteValue(e,t,n){if(null==n&&(n=1),1!==n&&-1!==n)throw new Vex.RERR("BadArguments",`Invalid direction: ${n}`);let i=(e+n*t)%Music.NUM_TONES;return i<0&&(i+=Music.NUM_TONES),i}getRelativeNoteName(e,t){const n=this.getNoteParts(e),i=this.getNoteValue(n.root);let r=t-i;if(Math.abs(r)>Music.NUM_TONES-3){let n=1;r>0&&(n=-1);const o=(t+1+(i+1))%Music.NUM_TONES*n;if(Math.abs(o)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${t})`);r=o}if(Math.abs(r)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${t})`);let o=n.root;if(r>0)for(let s=1;s<=r;++s)o+="#";else if(r<0)for(let s=-1;s>=r;--s)o+="b";return o}getScaleTones(e,t){const n=[e];let i=e;for(let r=0;re.getMetrics().width;class Accidental extends Modifier{static get CATEGORY(){return"accidentals"}static format(e,t){const n=t.left_shift+1;if(!e||0===e.length)return;const i=[];let r,o=null,s=0;for(let m=0;mt.line-e.line));const a=[];let l=0,c=null;for(let m=0;ml?e.shift:l,c=e.line}let u=0;for(let m=0;ma[t+e],r=e=>e.map(i),o=(e,t)=>{const[n,i]=r([e,t]).map((e=>e.line));return n-i},s=(...e)=>e.map(r).every((e=>!this.checkCollision(...e))),l=n-t+1;let c,h,d=this.checkCollision(a[t],a[n])?"a":"b";switch(l){case 3:"a"===d&&.5===o(1,2)&&.5!==o(0,1)&&(d="second_on_bottom");break;case 4:s([0,2],[1,3])&&(d="spaced_out_tetrachord");break;case 5:"b"===d&&s([1,3])&&(d="spaced_out_pentachord",s([0,2],[2,4])&&(d="very_spaced_out_pentachord"));break;case 6:s([0,3],[1,4],[2,5])&&(d="spaced_out_hexachord"),s([0,2],[2,4],[1,3],[3,5])&&(d="very_spaced_out_hexachord")}if(l>=7){let e=2,t=!0;for(;!0===t;){t=!1;for(let n=0;n+eh?u:h}else for(c=m;c<=n;c++)h=Flow.accidentalColumnsTable[l][d][c-m],a[c].column=h,u=u>h?u:h;m=n}const h=[],d=[];for(let m=0;m<=u;m++)h[m]=0,d[m]=0;h[0]=l+n,d[0]=l+n,a.forEach((e=>{e.width>h[e.column]&&(h[e.column]=e.width)}));for(let m=1;m{let t=0;const n=f+e.numAcc;for(;f0?(i=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(n-=.5)):(i=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(n-=.5));const r=Math.abs(n){const t=new Fraction(0,1);e.getTickables().forEach((e=>{if(e.shouldIgnoreTicks())return;const r=i[t.value()];r?r.push(e):(n.push(t.value()),i[t.value()]=[e]),t.add(e.getTicks())}))}));const r=new Music;t||(t="C");const o=r.createScaleMap(t);n.forEach((e=>{const t=i[e],n=[],s=e=>{e.isRest()||e.shouldIgnoreTicks()||(e.keys.forEach(((t,i)=>{const s=r.getNoteParts(t.split("/")[0]),a=s.accidental||"n",l=s.root+a,c=o[s.root]===l,u=n.indexOf(l)>-1;if(!c||c&&u){o[s.root]=l;const t=new Accidental(a);e.addAccidental(i,t),n.push(l)}})),e.getModifiers().forEach((e=>{"gracenotegroups"===e.getCategory()&&e.getGraceNotes().forEach(s)})))};t.forEach(s)}))}constructor(e=null){if(super(),this.setAttribute("type","Accidental"),L$g("New accidental: ",e),this.note=null,this.index=null,this.type=e,this.position=Modifier.Position.LEFT,this.render_options={font_scale:38,stroke_px:3,parenLeftPadding:2,parenRightPadding:2},this.accidental=Flow.accidentalCodes(this.type),!this.accidental)throw new Vex.RERR("ArgumentError",`Unknown accidental type: ${e}`);this.cautionary=!1,this.parenLeft=null,this.parenRight=null,this.reset()}reset(){const e=this.render_options.font_scale;this.glyph=new Glyph(this.accidental.code,e),this.glyph.setOriginX(1),this.cautionary&&(this.parenLeft=new Glyph(Flow.accidentalCodes("{").code,e),this.parenRight=new Glyph(Flow.accidentalCodes("}").code,e),this.parenLeft.setOriginX(1),this.parenRight.setOriginX(1))}getCategory(){return Accidental.CATEGORY}getWidth(){const e=this.cautionary?getGlyphWidth(this.parenLeft)+getGlyphWidth(this.parenRight)+this.render_options.parenLeftPadding+this.render_options.parenRightPadding:0;return getGlyphWidth(this.glyph)+e}setNote(e){if(!e)throw new Vex.RERR("ArgumentError",`Bad note value: ${e}`);this.note=e,"gracenotes"===this.note.getCategory()&&(this.render_options.font_scale=25,this.reset())}setAsCautionary(){return this.cautionary=!0,this.render_options.font_scale=28,this.reset(),this}draw(){const{context:e,type:t,position:n,note:i,index:r,cautionary:o,x_shift:s,y_shift:a,glyph:l,parenLeft:c,parenRight:u,render_options:{parenLeftPadding:h,parenRightPadding:d}}=this;if(this.checkContext(),!i||null==r)throw new Vex.RERR("NoAttachedNote","Can't draw accidental without a note and index.");const p=i.getModifierStartXY(n,r);let f=p.x+s;const m=p.y+a;L$g("Rendering: ",t,f,m),o?(u.render(e,f,m),f-=getGlyphWidth(u),f-=d,f-=this.accidental.parenRightPaddingAdjustment,l.render(e,f,m),f-=getGlyphWidth(l),f-=h,c.render(e,f,m)):l.render(e,f,m),this.setRendered()}}let NoteSubGroup$1=class e extends Modifier{static get CATEGORY(){return"notesubgroup"}static format(e,t){if(!e||0===e.length)return!1;let n=0;for(let i=0;i{e.ignore_ticks=!1})),this.width=0,this.preFormatted=!1,this.formatter=new Formatter,this.voice=new Voice$1({num_beats:4,beat_value:4,resolution:Flow.RESOLUTION}).setStrict(!1),this.voice.addTickables(this.subNotes),this}getCategory(){return e.CATEGORY}preFormat(){this.preFormatted||(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}setNote(e){this.note=e}setWidth(e){this.width=e}getWidth(){return this.width}draw(){this.checkContext();const e=this.getNote();if(!e||null===this.index)throw new Vex.RuntimeError("NoAttachedNote","Can't draw notes without a parent note and parent note index.");this.setRendered(),this.alignSubNotesWithNote(this.subNotes,e),this.subNotes.forEach((e=>e.setContext(this.context).drawWithStyle()))}};class StaveTie extends Element$1{constructor(e,t){super(),this.setAttribute("type","StaveTie"),this.notes=e,this.context=null,this.text=t,this.direction=null,this.render_options={cp1:8,cp2:12,text_shift_x:0,first_x_shift:0,last_x_shift:0,y_shift:7,tie_spacing:0,font:{family:"Arial",size:15,style:""}},this.font=this.render_options.font,this.setNotes(e)}setFont(e){return this.font=e,this}setDirection(e){return this.direction=e,this}setNotes(e){if(!e.first_note&&!e.last_note)throw new Vex.RuntimeError("BadArguments","Tie needs to have either first_note or last_note set.");if(e.first_indices||(e.first_indices=[0]),e.last_indices||(e.last_indices=[0]),e.first_indices.length!==e.last_indices.length)throw new Vex.RuntimeError("BadArguments","Tied notes must have similar index sizes");return this.first_note=e.first_note,this.first_indices=e.first_indices,this.last_note=e.last_note,this.last_indices=e.last_indices,this}isPartial(){return!this.first_note||!this.last_note}renderTie(e){if(0===e.first_ys.length||0===e.last_ys.length)throw new Vex.RERR("BadArguments","No Y-values to render");const t=this.context;let n=this.render_options.cp1,i=this.render_options.cp2;Math.abs(e.last_x_px-e.first_x_px)<10&&(n=2,i=8);const r=this.render_options.first_x_shift,o=this.render_options.last_x_shift,s=this.render_options.y_shift*e.direction;for(let a=0;ah&&Math.abs(c-h)<10?-6:0;if(this.first_note&&"jianpu"===this.first_note.DYMusicScoreType){if("TabTie"===this.getAttribute("type"))continue;c1){const t=new Beam$1(e);t.render_options.beam_width=3,t.render_options.partial_beam_length=4,this.beams.push(t)}return this}setNote(e){this.note=e}setWidth(e){this.width=e}getWidth(){return this.width}getGraceNotes(){return this.grace_notes}draw(){this.checkContext();const e=this.getNote();if(L$f("Drawing grace note group for:",e),!e||null===this.index)throw new Vex.RuntimeError("NoAttachedNote","Can't draw grace note without a parent note and parent note index.");if(this.setRendered(),this.alignSubNotesWithNote(this.getGraceNotes(),e),this.grace_notes.forEach((e=>{e.setContext(this.context).draw()})),this.beams.forEach((e=>{e.setContext(this.context).draw()})),this.show_slur){const t=this.getNote().getCategory()===StaveNote.CATEGORY,n=t?StaveTie:TabTie;this.slur=new n({last_note:this.grace_notes[0],first_note:e,first_indices:[0],last_indices:[0]}),this.slur.render_options.cp2=12,this.slur.render_options.y_shift=(t?7:5)+this.render_options.slur_y_shift,this.slur.setContext(this.context).draw()}}}class Stroke extends Modifier{static get CATEGORY(){return"strokes"}static get Type(){return{BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASQUEDO_DOWN:5,RASQUEDO_UP:6,ARPEGGIO_DIRECTIONLESS:7}}static format(e,t){const n=t.left_shift;if(!e||0===e.length)return this;const i=e.map((e=>{const t=e.getNote();if(t instanceof StaveNote){const{line:n,displaced:i}=t.getKeyProps()[e.getIndex()];return{line:n,shift:i?t.getExtraLeftPx():0,stroke:e}}{const{str:n}=t.getPositions()[e.getIndex()];return{line:n,shift:0,stroke:e}}})),r=n,o=i.reduce(((e,{stroke:t,shift:n})=>(t.setXShift(r+n),Math.max(t.getWidth()+0,e))),0);return t.left_shift+=o,!0}constructor(e,t){super(),this.setAttribute("type","Stroke"),this.note=null,this.options=Vex.Merge({},t),this.all_voices=!("all_voices"in this.options)||this.options.all_voices,this.note_end=null,this.index=null,this.type=e,this.position=Modifier.Position.LEFT,this.render_options={font_scale:38,stroke_px:3,stroke_spacing:10},this.font={family:"serif",size:10,weight:"bold italic"},this.setXShift(0),this.setWidth(10)}getCategory(){return Stroke.CATEGORY}getPosition(){return this.position}addEndNote(e){return this.note_end=e,this}draw(){if(this.checkContext(),this.setRendered(),!this.note||null==this.index)throw new Vex.RERR("NoAttachedNote","Can't draw stroke without a note and index.");const e=this.note.getModifierStartXY(this.position,this.index);let t=this.note.getYs(),n=e.y,i=e.y;const r=e.x-5,o=this.note.stave.options.spacing_between_lines_px,s=this.getModifierContext().getModifiers(this.note.getCategory());for(let d=0;dt.line-e.line));let p=0,f=0,m=0,g=null,v=null;for(o=0;of?e:f):l===Modifier.Position.RIGHT&&(s.setXShift(p),e+=u,m=e>m?e:m),g=t,v=a}return t.left_shift+=f,t.right_shift+=m,!0}constructor(e){super(),this.setAttribute("type","StringNumber"),this.note=null,this.last_note=null,this.index=null,this.string_number=e,this.setWidth(20),this.position=Modifier.Position.ABOVE,this.x_shift=0,this.y_shift=0,this.x_offset=0,this.y_offset=0,this.dashed=!0,this.leg=Renderer.LineEndType.NONE,this.radius=8,this.font={family:"sans-serif",size:10,weight:"bold"}}getCategory(){return StringNumber.CATEGORY}getNote(){return this.note}setNote(e){return this.note=e,this}getIndex(){return this.index}setIndex(e){return this.index=e,this}setLineEndType(e){return e>=Renderer.LineEndType.NONE&&e<=Renderer.LineEndType.DOWN&&(this.leg=e),this}setStringNumber(e){return this.string_number=e,this}setOffsetX(e){return this.x_offset=e,this}setOffsetY(e){return this.y_offset=e,this}setLastNote(e){return this.last_note=e,this}setDashed(e){return this.dashed=e,this}draw(){const e=this.checkContext();if(!this.note||null==this.index)throw new Vex.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const t=this.note.stave.options.spacing_between_lines_px,n=this.note.getModifierStartXY(this.position,this.index);let i=n.x+this.x_shift+this.x_offset,r=n.y+this.y_shift+this.y_offset;switch(this.position){case Modifier.Position.ABOVE:case Modifier.Position.BELOW:{const e=this.note.getStemExtents();let i=e.topY,o=e.baseY+2;this.note.stem_direction===StaveNote.STEM_DOWN&&(i=e.baseY,o=e.topY-2),r=this.position===Modifier.Position.ABOVE?this.note.hasStem()?i-1.75*t:n.y-1.75*t:this.note.hasStem()?o+1.5*t:n.y+1.75*t,r+=this.y_shift+this.y_offset;break}case Modifier.Position.LEFT:i-=this.radius/2+5;break;case Modifier.Position.RIGHT:i+=this.radius/2+6;break;default:throw new Vex.RERR("InvalidPosition",`The position ${this.position} is invalid`)}e.save(),e.beginPath(),e.arc(i,r,this.radius,0,2*Math.PI,!1),e.lineWidth=1.5,e.stroke(),e.setFont(this.font.family,this.font.size,this.font.weight);const o=i-e.measureText(this.string_number).width/2;if(e.fillText(""+this.string_number,o,r+4.5),null!=this.last_note){const t=this.last_note.getStemX()-this.note.getX()+5;let n,o;switch(e.strokeStyle="#000000",e.lineCap="round",e.lineWidth=.6,this.dashed?Renderer.drawDashedLine(e,i+10,r,i+t,r,[3,3]):Renderer.drawDashedLine(e,i+10,r,i+t,r,[3,0]),this.leg){case Renderer.LineEndType.UP:n=-10,o=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,i+t,r,i+t,r+n,o);break;case Renderer.LineEndType.DOWN:n=10,o=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,i+t,r,i+t,r+n,o)}}e.restore()}}function L$e(...e){Articulation$1.DEBUG&&Vex.L("Vex.Flow.Articulation",e)}const{ABOVE:ABOVE,BELOW:BELOW}=Modifier.Position,roundToNearestHalf=(e,t)=>.5*e(t/.5),isWithinLines=(e,t)=>t===ABOVE?e<=5:e>=1,getRoundingFunction=(e,t)=>isWithinLines(e,t)?t===ABOVE?Math.ceil:Math.floor:Math.round,snapLineToStaff=(e,t,n,i)=>{const r=roundToNearestHalf(getRoundingFunction(t,n),t);if(e&&isWithinLines(r,n)&&r%1==0){return r+.5*-i}return r},isStaveNote=e=>{const t=e.getCategory();return"stavenotes"===t||"gracenotes"===t},isTabNote=e=>{const t=e.getCategory();return"tabnotes"===t||"numberednotes"===t},getTopY=(e,t)=>{const n=e.getStave(),i=e.getStemDirection(),{topY:r,baseY:o}=e.getStemExtents();if(isStaveNote(e))return e.hasStem()?i===Stem.UP?r:o:Math.min(...e.getYs());if(isTabNote(e))return e.hasStem()&&i===Stem.UP?r:n.getYForTopText(t);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getBottomY=(e,t)=>{const n=e.getStave(),i=e.getStemDirection(),{topY:r,baseY:o}=e.getStemExtents();if(isStaveNote(e))return e.hasStem()?i===Stem.UP?o:r:Math.max(...e.getYs());if(isTabNote(e))return e.hasStem()?i===Stem.UP?n.getYForBottomText(t):r:n.getYForBottomText(t);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getInitialOffset=(e,t)=>{const n=t===ABOVE&&e.getStemDirection()===Stem.UP||t===BELOW&&e.getStemDirection()===Stem.DOWN;return isStaveNote(e)?e.hasStem()&&n?.5:1:e.hasStem()&&n?1:0};let Articulation$1=class e extends Modifier{static get CATEGORY(){return"articulations"}static get INITIAL_OFFSET(){return-.5}static format(e,t){if(!e||0===e.length)return!1;const n=(e,t,n)=>roundToNearestHalf(getRoundingFunction(t,n),e.glyph.getMetrics().height/10+.5);e.filter((e=>e.getPosition()===ABOVE)).forEach((e=>{e.setTextLine(t.top_text_line),t.top_text_line+=n(e,t.top_text_line,ABOVE)})),e.filter((e=>e.getPosition()===BELOW)).forEach((e=>{e.setTextLine(t.text_line),t.text_line+=n(e,t.text_line,BELOW)}));const i=e.map((e=>e.getWidth())).reduce(((e,t)=>Math.max(t,e)));return t.left_shift+=i/2,t.right_shift+=i/2,!0}static easyScoreHook({articulations:e},t,n){if(!e)return;const i={staccato:"a.",tenuto:"a-"};e.split(",").map((e=>e.trim().split("."))).map((([e,t])=>{const r={type:i[e]};return t&&(r.position=Modifier.PositionString[t]),n.getFactory().Articulation(r)})).map((e=>t.addModifier(0,e)))}constructor(e){if(super(),this.setAttribute("type","Articulation"),this.note=null,this.index=null,this.type=e,this.position=BELOW,this.render_options={font_scale:38},this.articulation=Flow.articulationCodes(this.type),!this.articulation)throw new Vex.RERR("ArgumentError",`Articulation not found: ${this.type}`);this.glyph=new Glyph(this.articulation.code,this.render_options.font_scale),this.setWidth(this.glyph.getMetrics().width)}getCategory(){return e.CATEGORY}draw(){const{note:t,index:n,position:i,glyph:r,articulation:{between_lines:o},text_line:s,context:a}=this;if(this.checkContext(),!t||null==n)throw new Vex.RERR("NoAttachedNote","Can't draw Articulation without a note and index.");this.setRendered();const l=t.getStave(),c=l.getSpacingBetweenLines(),u="tabnotes"===t.getCategory(),{x:h}=t.getModifierStartXY(i,n),d=!o||u,p=getInitialOffset(t,i);let f={[ABOVE]:()=>{r.setOrigin(.5,1);const n=getTopY(t,s)-(s+p)*c+(this.y_shift||0);return d?Math.min(l.getYForTopText(e.INITIAL_OFFSET),n):n},[BELOW]:()=>{r.setOrigin(.5,0);const n=getBottomY(t,s)+(s+p)*c;return d?Math.max(l.getYForBottomText(e.INITIAL_OFFSET),n):n}}[i]();if(!u){const e=i===ABOVE?-1:1,s=u?t.positions[n].str:t.getKeyProps()[n].line,a=(t.getYs()[n]-f)/c+s,l=snapLineToStaff(o,a,i,e);isWithinLines(l,i)&&r.setOrigin(.5,.5),f+=Math.abs(l-a)*c*e}L$e(`Rendering articulation at (x: ${h}, y: ${f})`),r.render(a,h,f)}};class TickContext extends Tickable{static getNextContext(e){const t=e.tContexts,n=t.indexOf(e);return t[n+1]}constructor(){super(),this.setAttribute("type","TickContext"),this.currentTick=new Fraction(0,1),this.maxTicks=new Fraction(0,1),this.minTicks=null,this.padding=3,this.x=0,this.xBase=0,this.xOffset=0,this.tickables=[],this.notePx=0,this.extraLeftPx=0,this.extraRightPx=0,this.tContexts=[]}getX(){return this.x}setX(e){return this.x=e,this.xBase=e,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(e){this.xBase=e,this.x=e+this.xOffset}getXOffset(){return this.xOffset}setXOffset(e){this.xOffset=e,this.x=this.xBase+e}getWidth(){return this.width+2*this.padding}setPadding(e){return this.padding=e,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getTickables(){return this.tickables}getCenterAlignedTickables(){return this.tickables.filter((e=>e.isCenterAligned()))}getMetrics(){const{width:e,notePx:t,extraLeftPx:n,extraRightPx:i}=this;return{width:e,notePx:t,extraLeftPx:n,extraRightPx:i}}getCurrentTick(){return this.currentTick}setCurrentTick(e){this.currentTick=e,this.preFormatted=!1}getExtraPx(){let e=0,t=0,n=0,i=0;for(let r=0;r0&&i--;for(let a=0;a{L$b("Preformatting ModifierContext: ",e.CATEGORY),e.format(this.getModifiers(e.CATEGORY),this.state,this)})),this.width=this.state.left_shift+this.state.right_shift,this.preFormatted=!0)}postFormat(){this.postFormatted||this.POSTFORMAT.forEach((e=>{L$b("Postformatting ModifierContext: ",e.CATEGORY),e.postFormat(this.getModifiers(e.CATEGORY),this)}))}}function L$a(...e){Formatter.DEBUG&&Vex.L("Vex.Flow.Formatter",e)}function getNext(e,t){var n,i;const r=e[t+1];return r&&null!=r&&null!==(n=r.keys)&&void 0!==n&&n.includes("b/4")||null!=r&&null!==(i=r.keys)&&void 0!==i&&i.includes("r/4")?getNext(e,t+1):r}function createContexts(e,t,n){if(!e||!e.length)throw new Vex.RERR("BadArgument","No voices to format");const i=e[0].getTotalTicks(),r=e.reduce(((e,t)=>{if(!t.getTotalTicks().equals(i))throw new Vex.RERR("TickMismatch","Voices should have same total note duration in ticks.");if(t.getMode()===Voice$1.Mode.STRICT&&!t.isComplete())throw new Vex.RERR("IncompleteVoice","Voice does not have enough notes.");return Math.max(e,Fraction.LCM(e,t.getResolutionMultiplier()))}),1),o={},s=[],a=[];return e.forEach((e=>{const i=new Fraction(0,r);e.getTickables().forEach((e=>{const r=i.numerator;if(!o[r]){const e=new t;a.push(e),o[r]=e}n(e,o[r]),s.push(r),i.add(e.getTicks())}))})),{map:o,array:a,list:Vex.SortAndUnique(s,((e,t)=>e-t),((e,t)=>e===t)),resolutionMultiplier:r}}class Formatter{static SimpleFormat(e,t=0,{paddingBetween:n=10}={}){e.reduce(((e,t)=>{t.addToModifierContext(new ModifierContext);const i=(new TickContext).addTickable(t).preFormat(),r=i.getExtraPx();return i.setX(e+r.left),e+i.getWidth()+r.right+n}),t)}static plotDebugging(e,t,n,i,r){const o=n+Note.STAVEPADDING,s=t.contextGaps;e.save(),e.setFont("Arial",8,""),s.gaps.forEach((t=>{var n,s,a;n=o+t.x1,s=o+t.x2,a="#aaa",e.beginPath(),e.setStrokeStyle(a),e.setFillStyle(a),e.setLineWidth(1),e.fillRect(n,i,s-n,r-i),e.fillText(Math.round(t.x2-t.x1),o+t.x1,r+12)})),e.fillText(Math.round(s.total)+"px",o-20,r+12),e.setFillStyle("red"),e.fillText("Loss: "+t.lossHistory.map((e=>Math.round(e))),o-20,r+22),e.restore()}static FormatAndDraw(e,t,n,i){const r={auto_beam:!1,align_rests:!1};"object"==typeof i?Vex.Merge(r,i):"boolean"==typeof i&&(r.auto_beam=i);const o=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(n),s=r.auto_beam?Beam$1.applyAndGetBeams(o):[];return(new Formatter).joinVoices([o],{align_rests:r.align_rests}).formatToStave([o],t,{align_rests:r.align_rests,stave:t}),o.setStave(t).draw(e,t),s.forEach((t=>t.setContext(e).draw())),o.getBoundingBox()}static FormatAndDrawTab(e,t,n,i,r,o,s){const a={auto_beam:o,align_rests:!1};"object"==typeof s?Vex.Merge(a,s):"boolean"==typeof s&&(a.auto_beam=s);const l=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(r),c=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(i),u=a.auto_beam?Beam$1.applyAndGetBeams(l):[];(new Formatter).joinVoices([l],{align_rests:a.align_rests}).joinVoices([c]).formatToStave([l,c],n,{align_rests:a.align_rests}),l.draw(e,n),c.draw(e,t),u.forEach((t=>t.setContext(e).draw())),new StaveConnector(n,t).setContext(e).draw()}static AlignRestsToNotes(e,t,n){return e.forEach(((t,i)=>{if(t instanceof StaveNote&&t.isRest()){if(t.tuplet&&!n)return;if(["va5","v3c"].includes(t.glyph.code_head)){const n="va5"===t.glyph.code_head?10:14,r=e[i-1],o=getNext(e,i);let s=!1;if(r&&o&&r.beam&&o.beam&&(s=r.beam.notes.includes(o)),s){t.setKeyLine(0,3);let e=[...r.beam.notes,...o.beam.notes];t.beam&&t.beam.notes&&e.push(...t.beam.notes),e=Array.from(new Set(e));for(let t=0;t0){const e=i<1.5?Math.abs(i-1.5)*n:0;r.setResetHeight(e)}else{const e=i>4.5?Math.abs(i-4.5)*n:0;r.setResetHeight(e)}}}}}})),this}constructor(){this.minTotalWidth=0,this.hasMinTotalWidth=!1,this.totalTicks=new Fraction(0,1),this.tickContexts=null,this.modiferContexts=null,this.contextGaps={total:0,gaps:[]},this.voices=[]}alignRests(e,t){if(!e||!e.length)throw new Vex.RERR("BadArgument","No voices to format rests");e.forEach((e=>Formatter.AlignRestsToNotes(e.getTickables(),t)))}preCalculateMinTotalWidth(e){if(this.hasMinTotalWidth)return this.minTotalWidth;if(!this.tickContexts){if(!e)throw new Vex.RERR("BadArgument","'voices' required to run preCalculateMinTotalWidth");this.createTickContexts(e)}const{list:t,map:n}=this.tickContexts;return this.minTotalWidth=t.map((e=>{const t=n[e];return t.preFormat(),t.getWidth()})).reduce(((e,t)=>e+t),0),this.hasMinTotalWidth=!0,this.minTotalWidth}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new Vex.RERR("NoMinTotalWidth","Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'");return this.minTotalWidth}createModifierContexts(e){const t=createContexts(e,ModifierContext,((e,t)=>e.addToModifierContext(t)));return this.modiferContexts=t,t}createTickContexts(e){const t=createContexts(e,TickContext,((e,t)=>t.addTickable(e)));return t.array.forEach((e=>{e.tContexts=t.array})),this.totalTicks=e[0].getTicksUsed().clone(),this.tickContexts=t,t}preFormat(e=0,t,n,i){const r=this.tickContexts,{list:o,map:s,resolutionMultiplier:a}=r;n&&i&&n.forEach((e=>e.setStave(i).preFormat()));let l=0,c=0;const u=e/2;if(this.minTotalWidth=0,o.forEach((e=>{const n=s[e];t&&n.setContext(t),n.preFormat();const i=n.getWidth();this.minTotalWidth+=i;const r=n.getMetrics();l=l+c+r.extraLeftPx,n.setX(l),c=i-r.extraLeftPx})),this.minTotalWidth=l+c,this.hasMinTotalWidth=!0,e<=0)return;const h=(e-this.minTotalWidth)/(this.totalTicks.value()*a);let d=0;o.forEach(((e,t)=>{const n=o[t-1]||0,i=s[e];d+=(e-n)*h,i.setX(i.getX()+d),i.getCenterAlignedTickables().forEach((e=>{e.center_x_shift=u-i.getX()}))})),1!==o.length&&(this.justifyWidth=e,this.lossHistory=[],this.evaluate())}evaluate(){const e=this.justifyWidth;this.contextGaps={total:0,gaps:[]},this.tickContexts.list.forEach(((e,t)=>{if(0===t)return;const n=this.tickContexts.list[t-1],i=this.tickContexts.map[n],r=this.tickContexts.map[e],o=i.getMetrics(),s=i.getX()+o.width,a=r.getX(),l=a-s;this.contextGaps.total+=l,this.contextGaps.gaps.push({x1:s,x2:a}),r.getFormatterMetrics().freedom.left=l,i.getFormatterMetrics().freedom.right=l}));const t=this.durationStats={};this.voices.forEach((n=>{n.getTickables().forEach(((n,i,r)=>{const o=n.getTicks().clone().simplify().toString(),s=n.getMetrics(),a=n.getFormatterMetrics(),l=n.getX()+s.noteWidth+s.modRightPx+s.extraRightPx;let c=0;if(i{e.getTickables().forEach((e=>{const i=e.getTicks().clone().simplify().toString(),r=e.getFormatterMetrics();r.iterations+=1,r.space.deviation=r.space.used-t[i].mean,r.duration=i,r.space.mean=t[i].mean,n+=Math.pow(t[i].mean,2)}))})),this.totalCost=Math.sqrt(n),this.lossHistory.push(this.totalCost),this}tune(){let e=0;return this.tickContexts.list.forEach(((t,n,i)=>{const r=this.tickContexts.map[t],o=n>0?this.tickContexts.map[i[n-1]]:null,s=ne.getFormatterMetrics().space.deviation)).reduce(((e,t)=>e+t));a>0?e=-Math.min(r.getFormatterMetrics().freedom.right,Math.abs(a)):a<0&&(e=s?Math.min(s.getFormatterMetrics().freedom.right,Math.abs(a)):0);const l=Math.min(5,Math.abs(e));e=e>0?l:-l})),this.evaluate()}postFormat(){const e=e=>e.list.forEach((t=>e.map[t].postFormat()));return e(this.modiferContexts),e(this.tickContexts),this}joinVoices(e){return this.createModifierContexts(e),this.hasMinTotalWidth=!1,this}format(e,t,n){const i={align_rests:!1,context:null,stave:null};return Vex.Merge(i,n),this.voices=e,this.alignRests(e,i.align_rests),this.createTickContexts(e),this.preFormat(t,i.context,e,i.stave),this}formatToStave(e,t,n){const i=t.getNoteEndX()-t.getNoteStartX()-10;L$a("Formatting voices to width: ",i);const r={context:t.getContext()};return Vex.Merge(r,n),this.format(e,i,r)}}class StaveModifier extends Element$1{static get Position(){return{LEFT:1,RIGHT:2,ABOVE:3,BELOW:4,BEGIN:5,END:6}}constructor(){super(),this.setAttribute("type","StaveModifier"),this.padding=10,this.position=StaveModifier.Position.ABOVE,this.layoutMetrics=null}getPosition(){return this.position}setPosition(e){return this.position=e,this}getStave(){return this.stave}setStave(e){return this.stave=e,this}getWidth(){return this.width}setWidth(e){return this.width=e,this}getX(){return this.x}setX(e){return this.x=e,this}getCategory(){return""}makeSpacer(e){return{getContext:()=>!0,setStave(){},renderToStave(){},getMetrics:()=>({width:e})}}placeGlyphOnLine(e,t,n){e.setYShift(t.getYForLine(n)-t.getYForGlyphs())}getPadding(e){return void 0!==e&&e<2?0:this.padding}setPadding(e){return this.padding=e,this}setLayoutMetrics(e){return this.layoutMetrics=e,this}getLayoutMetrics(){return this.layoutMetrics}}class Barline extends StaveModifier{static get CATEGORY(){return"barlines"}static get type(){return{SINGLE:1,DOUBLE:2,END:3,REPEAT_BEGIN:4,REPEAT_END:5,REPEAT_BOTH:6,NONE:7}}static get typeString(){return{single:Barline.type.SINGLE,double:Barline.type.DOUBLE,end:Barline.type.END,repeatBegin:Barline.type.REPEAT_BEGIN,repeatEnd:Barline.type.REPEAT_END,repeatBoth:Barline.type.REPEAT_BOTH,none:Barline.type.NONE}}constructor(e){super(),this.setAttribute("type","Barline"),this.thickness=Flow.STAVE_LINE_THICKNESS;const t=Barline.type;this.widths={},this.widths[t.SINGLE]=5,this.widths[t.DOUBLE]=5,this.widths[t.END]=5,this.widths[t.REPEAT_BEGIN]=5,this.widths[t.REPEAT_END]=5,this.widths[t.REPEAT_BOTH]=5,this.widths[t.NONE]=5,this.paddings={},this.paddings[t.SINGLE]=0,this.paddings[t.DOUBLE]=0,this.paddings[t.END]=0,this.paddings[t.REPEAT_BEGIN]=15,this.paddings[t.REPEAT_END]=15,this.paddings[t.REPEAT_BOTH]=15,this.paddings[t.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[t.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(StaveModifier.Position.BEGIN),this.setType(e)}getCategory(){return Barline.CATEGORY}getType(){return this.type}setType(e){return this.type="string"==typeof e?Barline.typeString[e]:e,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(e){switch(e.checkContext(),this.setRendered(),this.type){case Barline.type.SINGLE:this.drawVerticalBar(e,this.x,!1);break;case Barline.type.DOUBLE:this.drawVerticalBar(e,this.x,!0);break;case Barline.type.END:this.drawVerticalEndBar(e,this.x);break;case Barline.type.REPEAT_BEGIN:this.drawRepeatBar(e,this.x,!0),e.getX()!==this.x&&this.drawVerticalBar(e,e.getX());break;case Barline.type.REPEAT_END:this.drawRepeatBar(e,this.x,!1);break;case Barline.type.REPEAT_BOTH:this.drawRepeatBar(e,this.x,!1),this.drawRepeatBar(e,this.x,!0)}}drawVerticalBar(e,t,n){e.checkContext();const i=e.getTopLineTopY(),r=e.getBottomLineBottomY();n&&e.context.fillRect(t-3,i,1,r-i),e.context.fillRect(t,i,1,r-i)}drawVerticalEndBar(e,t){e.checkContext();const n=e.getTopLineTopY(),i=e.getBottomLineBottomY();e.context.fillRect(t-5,n,1,i-n),e.context.fillRect(t-2,n,3,i-n)}drawRepeatBar(e,t,n){e.checkContext();const i=e.getTopLineTopY(),r=e.getBottomLineBottomY();let o=3;n||(o=-5),e.context.fillRect(t+o,i,1,r-i),e.context.fillRect(t-2,i,3,r-i);n?o+=4:o-=4;const s=t+o+1;let a=(e.getNumLines()-1)*e.getSpacingBetweenLines();a=a/2-e.getSpacingBetweenLines()/2;let l=i+a+1;e.context.beginPath(),e.context.arc(s,l,2,0,2*Math.PI,!1),e.context.fill(),l+=e.getSpacingBetweenLines(),e.context.beginPath(),e.context.arc(s,l,2,0,2*Math.PI,!1),e.context.fill()}}let Repetition$1=class e extends StaveModifier{static get CATEGORY(){return"repetitions"}static get type(){return{NONE:1,CODA_LEFT:2,CODA_RIGHT:3,SEGNO_LEFT:4,SEGNO_RIGHT:5,DC:6,DC_AL_CODA:7,DC_AL_FINE:8,DS:9,DS_AL_CODA:10,DS_AL_FINE:11,FINE:12,TO_CODA:13}}constructor(e,t,n){super(),this.setAttribute("type","Repetition"),this.symbol_type=e,this.x=t,this.x_shift=0,this.y_shift=n,this.font={family:"times",size:12,weight:"bold italic"}}getCategory(){return e.CATEGORY}setShiftX(e){return this.x_shift=e,this}setShiftY(e){return this.y_shift=e,this}setX(e){return this.x=e,this}draw(t,n){switch(this.setRendered(),this.symbol_type){case e.type.CODA_RIGHT:this.drawCodaFixed(t,n+t.width);break;case e.type.CODA_LEFT:this.drawSymbolText(t,n,"Coda",!1);break;case e.type.SEGNO_LEFT:this.drawSignoFixed(t,n);break;case e.type.SEGNO_RIGHT:this.drawSignoFixed(t,n+t.width);break;case e.type.DC:this.drawSymbolText(t,n,"D.C.",!1);break;case e.type.DC_AL_CODA:this.drawSymbolText(t,n,"D.C. al Coda",!0);break;case e.type.DC_AL_FINE:this.drawSymbolText(t,n,"D.C. al Fine",!1);break;case e.type.DS:this.drawSymbolText(t,n,"D.S.",!1);break;case e.type.DS_AL_CODA:this.drawSymbolText(t,n,"D.S. al Coda",!0);break;case e.type.DS_AL_FINE:this.drawSymbolText(t,n,"D.S. al Fine",!1);break;case e.type.FINE:this.drawSymbolText(t,n,"Fine",!1);break;case e.type.TO_CODA:this.drawSymbolText(t,n,"To Coda",!0)}return this}drawCodaFixed(e,t){const n=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+t+this.x_shift,n+25,40,"v4d",!0),this}drawSignoFixed(e,t){const n=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+t+this.x_shift,n+25,30,"v8c",!0),this}drawSymbolText(t,n,i,r){const o=t.checkContext();o.save(),o.setFont(this.font.family,this.font.size,this.font.weight);let s=0+this.x_shift,a=n+this.x_shift;this.symbol_type===e.type.CODA_LEFT?(s=this.x+t.options.vertical_bar_width,a=s+o.measureText(i).width+12):(this.x_shift=-(s+o.measureText(i).width+12+t.options.vertical_bar_width+12),s=this.x+this.x_shift+t.options.vertical_bar_width,a=s+o.measureText(i).width+12);const l=t.getYForTopText(t.options.num_lines)+this.y_shift+25;return r&&Glyph.renderGlyph(o,a,l,40,"v4d",!0),o.fillText(i,s,l+5),o.restore(),this}};class StaveSection extends StaveModifier{static get CATEGORY(){return"stavesection"}constructor(e,t,n){super(),this.setAttribute("type","StaveSection"),this.setWidth(16),this.section=e,this.x=t,this.shift_x=0,this.shift_y=n,this.font={family:"sans-serif",size:12,weight:"bold"}}getCategory(){return StaveSection.CATEGORY}setStaveSection(e){return this.section=e,this}setShiftX(e){return this.shift_x=e,this}setShiftY(e){return this.shift_y=e,this}draw(e,t){const n=e.checkContext();this.setRendered(),n.save(),n.lineWidth=2,n.setFont(this.font.family,this.font.size,this.font.weight);const i=n.measureText(""+this.section),r=i.width,o=i.height;let s=r+6;s<18&&(s=18);const a=o,l=e.getYForTopText(3)+this.shift_y;let c=this.x+t;return n.beginPath(),n.lineWidth=2,n.rect(c,l+o/4,s,a),n.stroke(),c+=(s-r)/2,n.fillText(""+this.section,c,l+16),n.restore(),this}}class StaveTempo extends StaveModifier{static get CATEGORY(){return"stavetempo"}constructor(e,t,n){super(),this.setAttribute("type","StaveTempo"),this.tempo=e,this.position=Modifier.Position.ABOVE,this.x=t,this.shift_x=10,this.shift_y=n,this.font={family:"times",size:14,weight:"bold"},this.render_options={glyph_font_scale:30}}getCategory(){return StaveTempo.CATEGORY}setTempo(e){return this.tempo=e,this}setShiftX(e){return this.shift_x=e,this}setShiftY(e){return this.shift_y=e,this}draw(e,t){const n=e.checkContext();this.setRendered();const i=this.render_options,r=i.glyph_font_scale/38,o=this.tempo.name,s=this.tempo.duration,a=this.tempo.dots,l=this.tempo.bpm,c=this.font;let u=this.x+this.shift_x+t;const h=e.getYForTopText(1)+this.shift_y;if(n.save(),n.openGroup("stavetempo",null,{}),o&&(n.setFont(c.family,c.size,c.weight),n.fillText(o,u,h),u+=n.measureText(o).width),s&&l){n.setFont(c.family,c.size,"normal"),o&&(u+=n.measureText(" ").width,n.fillText("(",u,h),u+=n.measureText("(").width);const e=Flow.getGlyphProps(s);if(u+=3*r,Glyph.renderGlyph(n,u,h,i.glyph_font_scale,e.code_head),u+=e.getWidth()*r,e.stem){let t=30;e.beam_count&&(t+=3*(e.beam_count-1)),t*=r;const o=h-t;n.fillRect(u-r,o,r,t),e.flag&&(Glyph.renderGlyph(n,u,o,i.glyph_font_scale,e.code_flag_upstem),a||(u+=6*r))}for(let t=0;t=e.line?n.above:n.below}}this.placeGlyphOnLine(i,this.stave,e.line),this.glyphs.push(i);const o=this.xPositions[this.xPositions.length-1],s=i.getMetrics().width+r;this.xPositions.push(o+s),this.width+=s}cancelKey(e){return this.formatted=!1,this.cancelKeySpec=e,this}convertToCancelAccList(e){const t=Flow.keySignature(e),n=this.accList.length>0&&t.length>0&&t[0].type!==this.accList[0].type,i=n?t.length:t.length-this.accList.length;if(i<1)return;const r=[];for(let o=0;o0?e[0].type:null;let n;if(this.cancelKeySpec&&(n=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){const i=(this.position===StaveModifier.Position.END?this.stave.endClef:this.stave.clef)||this.stave.clef;n&&this.convertAccLines(i,n.type,n.accList),this.convertAccLines(i,t,e);for(let e=0;e0){this.stave.context.openGroup("keysignature");for(let e=0;e{const t=e.split("/").filter((e=>""!==e));if(2!==t.length)throw new Vex.RERR("BadTimeSignature",`Invalid time spec: ${e}. Must be in the form "/"`);t.forEach((t=>{if(isNaN(Number(t)))throw new Vex.RERR("BadTimeSignature",`Invalid time spec: ${e}. Must contain two valid numbers.`)}))};class TimeSignature extends StaveModifier{static get CATEGORY(){return"timesignatures"}static get glyphs(){return{C:{code:"v41",point:40,line:2},"C|":{code:"vb6",point:40,line:2}}}constructor(e=null,t=15,n=!0){if(super(),this.setAttribute("type","TimeSignature"),this.validate_args=n,null===e)return;const i=t;this.point=40,this.topLine=2,this.bottomLine=4,this.setPosition(StaveModifier.Position.BEGIN),this.setTimeSig(e),this.setWidth(this.timeSig.glyph.getMetrics().width),this.setPadding(i)}getCategory(){return TimeSignature.CATEGORY}parseTimeSpec(e){if("C"===e||"C|"===e){const{line:t,code:n,point:i}=TimeSignature.glyphs[e];return{line:t,num:!1,glyph:new Glyph(n,i)}}this.validate_args&&assertIsValidFraction(e);const[t,n]=e.split("/").map((e=>e.split("")));return{num:!0,glyph:this.makeTimeSignatureGlyph(t,n)}}makeTimeSignatureGlyph(e,t){const n=new Glyph("v0",this.point);n.topGlyphs=[],n.botGlyphs=[];let i=0;for(let u=0;ur?i:r,s=n.getMetrics().x_min;n.getMetrics=()=>({x_min:s,x_max:s+o,width:o});const a=(o-i)/2,l=(o-r)/2,c=this;return n.renderToStave=function(e){let t=e+a;for(let n=0;ne.visible)).filter(Boolean);return e.length}getOptions(){return this.options}setNoteStartX(e){this.formatted||this.format(),this.setStartX(e);const t=this.modifiers[0];return t.setX(this.start_x-t.getWidth()),this}setStartX(e){this.start_x=e}getNoteStartX(){return this.formatted||this.format(),this.start_x}getNoteEndX(){return this.formatted||this.format(),this.end_x}getTieStartX(){return this.start_x}getTieEndX(){return this.x+this.width}getX(){return this.x}getNumLines(){return this.options.num_lines}setNumLines(e){return this.options.num_lines=parseInt(e,10),this.resetLines(),this}setY(e){return this.y=e,this}getTopLineTopY(){return this.getYForLine(0)-Flow.STAVE_LINE_THICKNESS/2}getBottomLineBottomY(){return 2===this.getLines()?this.getYForLine(6)+Flow.STAVE_LINE_THICKNESS/2:this.getYForLine(this.getNumLines()-1)+Flow.STAVE_LINE_THICKNESS/2}setX(e){const t=e-this.x;this.formatted=!1,this.x=e,this.start_x+=t,this.end_x+=t;for(let n=0;nn.getWidth()&&(t-=n.getWidth()),t}setRepetitionTypeLeft(e,t){return this.modifiers.push(new Repetition$1(e,this.x,t)),this}setRepetitionTypeRight(e,t){return this.modifiers.push(new Repetition$1(e,this.x,t)),this}setVoltaType(e,t,n){if(2===e)2===volta.type&&volta.stave.modifiers.push(new Volta(volta.type,volta.number_t,volta.x,volta.y)),volta={stave:this,type:e,number_t:t,MeasureNumber:this.MeasureNumber,y:n,x:this.x};else if(4===e){let e=this.MeasureNumber-volta.MeasureNumber,i=Math.max(volta.y,n);for(let n=0;n<=e;n++)voltaMeasureNumber[volta.MeasureNumber+n]={type:0===n?2:n===e?4:0,number_t:t,y:i};volta={}}else this.modifiers.push(new Volta(e,t,this.x,n));return this}drawVolta(){let e=voltaMeasureNumber[this.MeasureNumber];e&&(this.modifiers.push(new Volta(e.type,e.number_t,this.x,e.y)),delete voltaMeasureNumber[this.MeasureNumber]),volta.type&&volta.MeasureNumber==this.MeasureNumber&&(this.modifiers.push(new Volta(volta.type,volta.number_t,this.x,volta.y)),volta={})}setSection(e,t,n=0,i=12){const r=new StaveSection(e,this.x+n,t);return r.font.size=i,this.modifiers.push(r),this}setTempo(e,t){return this.modifiers.push(new StaveTempo(e,this.x,t)),this}setText(e,t,n){let i=new StaveText(e,t,n);return i.setFont({family:"Arial",size:14,weight:"normal"}),this.modifiers.push(i),this}getHeight(){return this.height}getSpacingBetweenLines(){return this.options.spacing_between_lines_px}getBoundingBox(){return new BoundingBox(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){const e=this.options,t=e.spacing_between_lines_px;return this.getYForLine(e.num_lines)+e.space_below_staff_ln*t}getBottomLineY(){return this.getYForLine(this.options.num_lines)}getYForLine(e){const t=this.options,n=t.spacing_between_lines_px,i=t.space_above_staff_ln;return this.y+e*n+i*n}getLineForY(e){const t=this.options,n=t.spacing_between_lines_px,i=t.space_above_staff_ln;return(e-this.y)/n-i}getYForTopText(e){const t=e||0;return this.getYForLine(-t-this.options.top_text_position)}getYForBottomText(e){const t=e||0;return this.getYForLine(this.options.bottom_text_position+t)}getYForNote(e){const t=this.options,n=t.spacing_between_lines_px,i=t.space_above_staff_ln;return this.y+i*n+5*n-e*n}getYForGlyphs(){return this.getYForLine(3)}addModifier(e,t,n){return void 0!==t&&e.setPosition(t),n&&(this.timeSignature.numerator=n.numerator,this.timeSignature.denominator=n.denominator),e.setStave(this),this.formatted=!1,this.modifiers.push(e),this}addEndModifier(e){return this.addModifier(e,StaveModifier.Position.END),this}setBegBarType(e){const{SINGLE:t,REPEAT_BEGIN:n,NONE:i}=Barline.type;return e!==t&&e!==n&&e!==i||(this.modifiers[0].setType(e),this.formatted=!1),this}setEndBarType(e){return e!==Barline.type.REPEAT_BEGIN&&(this.modifiers[1].setType(e),this.formatted=!1),this}setClef(e,t,n,i){void 0===i&&(i=StaveModifier.Position.BEGIN),i===StaveModifier.Position.END?this.endClef=e:this.clef=e;const r=this.getModifiers(i,Clef.CATEGORY);return 0===r.length?this.addClef(e,t,n,i):r[0].setType(e,t,n),this}setEndClef(e,t,n){return this.setClef(e,t,n,StaveModifier.Position.END),this}setKeySignature(e,t,n){this.options.keySignature=e,void 0===n&&(n=StaveModifier.Position.BEGIN);const i=this.getModifiers(n,KeySignature.CATEGORY);return 0===i.length?"jianpu"!==this.options.DYMusicScoreType&&this.addKeySignature(e,t,n):i[0].setKeySig(e,t),this}setEndKeySignature(e,t){return this.setKeySignature(e,t,StaveModifier.Position.END),this}setTimeSignature(e,t,n){void 0===n&&(n=StaveModifier.Position.BEGIN);const i=this.getModifiers(n,TimeSignature.CATEGORY);return 0===i.length?this.addTimeSignature(e,t,n):i[0].setTimeSig(e),this}setEndTimeSignature(e,t){return this.setTimeSignature(e,t,StaveModifier.Position.END),this}addKeySignature(e,t,n){return void 0===n&&(n=StaveModifier.Position.BEGIN),this.addModifier(new KeySignature(e,t).setPosition(n),n),this}addClef(e,t,n,i){return void 0===i||i===StaveModifier.Position.BEGIN?this.clef=e:i===StaveModifier.Position.END&&(this.endClef=e),this.addModifier(new Clef(e,t,n),i),this}addEndClef(e,t,n){return this.addClef(e,t,n,StaveModifier.Position.END),this}addTimeSignature(e,t,n){return this.addModifier(new TimeSignature(e,t),n),this}addEndTimeSignature(e,t){return this.addTimeSignature(e,t,StaveModifier.Position.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(e,t){return void 0===e&&void 0===t?this.modifiers:this.modifiers.filter((n=>!(void 0!==e&&e!==n.getPosition()||void 0!==t&&t!==n.getCategory())))}sortByCategory(e,t){for(let n=e.length-1;n>=0;n--)for(let i=0;it[e[i+1].getCategory()]){const t=e[i];e[i]=e[i+1],e[i+1]=t}}format(){const e=this.modifiers[0],t=this.modifiers[1],n=this.getModifiers(StaveModifier.Position.BEGIN),i=this.getModifiers(StaveModifier.Position.END);let r,o,s;this.sortByCategory(n,{barlines:0,clefs:1,keysignatures:2,timesignatures:3}),this.sortByCategory(i,{timesignatures:0,keysignatures:1,barlines:2,clefs:3}),n.length>1&&e.getType()===Barline.type.REPEAT_BEGIN&&(n.push(n.splice(0,1)[0]),n.splice(0,0,new Barline(Barline.type.SINGLE))),i.indexOf(t)>0&&i.splice(0,0,new Barline(Barline.type.NONE));let a=0,l=this.x;for(let h=0;h{e.includes(n)?t.visible=!0:t.visible=!1}))}for(let o=0;othis.drawStaveTempo())),this.measure>0){this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight);const e=this.context.measureText(""+this.measure).width;i=this.getYForTopText(0)+3,this.context.fillText(""+this.measure,this.x-e/2,i),this.context.restore()}return this}drawStaveTempo(){if(!this.staveTempos.length)return;const e=document.querySelector(`#${this.attrs.id}`);if(!e)return;const t=e.parentElement.getBBox(),n=this.getYForLine(0),i=e.parentElement.parentElement.querySelectorAll(".vf-curve");if(i.length){const e=this.x+this.staveTempos[0].shift_x+this.getModifierXShift(0),r=this.getYForTopText(1)+t.y-n+5;i.forEach((n=>{const i=n.getBBox();i.x-10e&&i.y-10r&&(t.y=i.y+5)}))}for(let r=0;r=0&&this.timeSignature.numerator){let e=40,t=0;this.MeasureNumber<2&&(e=70,t=-72),this.setText(`${this.timeSignature.numerator}`,1,{justification:1,shift_x:e,shift_y:t-13}),this.setText("ᅳ",1,{justification:1,shift_x:e+3,shift_y:t-2}),this.setText(`${this.timeSignature.denominator}`,1,{justification:1,shift_x:e,shift_y:t+8})}}drawVertical(e,t){this.drawVerticalFixed(this.x+e,t)}drawVerticalFixed(e,t){this.checkContext();const n=this.getYForLine(0),i=this.getYForLine(this.options.num_lines-1);t&&this.context.fillRect(e-3,n,1,i-n+1),this.context.fillRect(e,n,1,i-n+1)}drawVerticalBar(e){this.drawVerticalBarFixed(this.x+e,!1)}drawVerticalBarFixed(e){this.checkContext();const t=this.getYForLine(0),n=this.getYForLine(this.options.num_lines-1);this.context.fillRect(e,t,1,n-t+1)}getConfigForLines(){return this.options.line_config}setConfigForLine(e,t){if(e>=this.options.num_lines||e<0)throw new Vex.RERR("StaveConfigError","The line number must be within the range of the number of lines in the Stave.");if(void 0===t.visible)throw new Vex.RERR("StaveConfigError","The line configuration object is missing the 'visible' property.");if("boolean"!=typeof t.visible)throw new Vex.RERR("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.line_config[e]=t,this}setConfigForLines(e){if(e.length!==this.options.num_lines)throw new Vex.RERR("StaveConfigError","The length of the lines configuration array must match the number of lines in the Stave");for(const t in e)e[t]||(e[t]=this.options.line_config[t]),Vex.Merge(this.options.line_config[t],e[t]);return this.options.line_config=e,this}}class TabStave extends Stave{constructor(e,t,n,i){const r={spacing_between_lines_px:13,num_lines:6,top_text_position:1};Vex.Merge(r,i),super(e,t,n,r),this.setAttribute("type","TabStave")}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}function getUnusedStringGroups(e,t){const n=[];let i=[];for(let r=1;r<=e;r++){t.indexOf(r)>-1?(n.push(i),i=[]):i.push(r)}return i.length>0&&n.push(i),n}function getPartialStemLines(e,t,n,i){const r=1!==i,o=-1!==i,s=n.getSpacingBetweenLines(),a=n.getNumLines(),l=[];return t.forEach((t=>{const c=t.indexOf(a)>-1,u=t.indexOf(1)>-1;if(r&&u||o&&c)return;1===t.length&&t.push(t[0]);const h=[];t.forEach(((t,r,o)=>{const l=1===t,c=t===a;let u=n.getYForLine(t-1);0!==r||l?r!==o.length-1||c||(u+=s/2-1):u-=s/2-1,h.push(u),1===i&&l?h.push(e-2):-1===i&&c&&h.push(e+2)})),l.push(h.sort(((e,t)=>e-t)))})),l}let TabNote$1=class e extends StemmableNote{static get CATEGORY(){return"tabnotes"}constructor(e,t){if(super(e),this.setAttribute("type","TabNote"),this.ghost=!1,this.positions=e.positions,Vex.Merge(this.render_options,{glyph_font_scale:Flow.DEFAULT_TABLATURE_FONT_SCALE,draw_stem:t,draw_dots:t,draw_stem_through_stave:!1,y_shift:0,scale:1,font:"10pt Arial"}),this.glyph=Flow.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(e)}`);this.buildStem(),e.stem_direction?this.setStemDirection(e.stem_direction):this.setStemDirection(Stem.UP),this.ghost=!1,this.updateWidth()}reset(){this.stave&&this.setStave(this.stave)}getCategory(){return e.CATEGORY}setGhost(e){return this.ghost=e,this.updateWidth(),this}hasStem(){return this.render_options.draw_stem}getStemExtension(){const e=this.getGlyph();return null!=this.stem_extension_override?this.stem_extension_override:e?1===this.getStemDirection()?e.tabnote_stem_up_extension:e.tabnote_stem_down_extension:0}addDot(){const e=new Dot;return this.dots+=1,this.addModifier(e,0)}updateWidth(){this.glyphs=[],this.width=0;for(let e=0;ethis.width}setStave(e){let t;if(super.setStave(e),this.context=e.context,this.context){const e=this.context;for(this.width=0,t=0;tn.width),this.width=Math.max(n.getWidth(),this.width)}this.glyph.getWidth=()=>this.width}const n=this.positions.map((({str:t})=>e.getYForLine(t-1)));return this.setYs(n),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}addToModifierContext(e){this.setModifierContext(e);for(let t=0;t{("dots"!==e.getCategory()||this.render_options.draw_dots)&&(e.setContext(this.context),e.drawWithStyle())}))}drawStemThrough(){const e=this.getStemX(),t=this.getStemY(),n=this.context,i=this.render_options.draw_stem_through_stave;if(this.render_options.draw_stem&&i){const i=this.stave.getNumLines(),r=this.positions.map((e=>e.str)),o=getPartialStemLines(t,getUnusedStringGroups(i,r),this.getStave(),this.getStemDirection());n.save(),n.setLineWidth(Stem.WIDTH),o.forEach((t=>{0!==t.length&&(n.beginPath(),n.moveTo(e,t[0]),n.lineTo(e,t[t.length-1]),n.stroke(),n.closePath())})),n.restore()}}drawPositions(){const e=this.context,t=this.getAbsoluteX(),n=this.ys;for(let i=0;iparseInt(i,10)?TabSlide.SLIDE_DOWN:TabSlide.SLIDE_UP}this.slide_direction=t,this.render_options.cp1=11,this.render_options.cp2=14,this.render_options.y_shift=.5,this.setFont({font:"Times",size:10,style:"bold italic"}),this.setNotes(e)}renderTie(e){if(0===e.first_ys.length||0===e.last_ys.length)throw new Vex.RERR("BadArguments","No Y-values to render");const t=this.context,n=e.first_x_px,i=e.first_ys,r=e.last_x_px,o=this.slide_direction;if(o!==TabSlide.SLIDE_UP&&o!==TabSlide.SLIDE_DOWN)throw new Vex.RERR("BadSlide","Invalid slide direction");for(let s=0;sthis.numStrings)throw new Vex.RERR("BadArguments",`String number must be between 1 and ${this.numStrings}:${e}`);return this.tuningValues[t-1]}getValueForFret(e,t){const n=this.getValueForString(t),i=parseInt(e,10);if(i<0)throw new Vex.RERR("BadArguments","Fret number must be 0 or higher: "+e);return n+i}getNoteForFret(e,t){const n=this.getValueForFret(e,t),i=Math.floor(n/12),r=n%12;return Flow.integerToNote(r)+"/"+i}}class KeyManager{constructor(e){this.music=new Music,this.setKey(e)}setKey(e){return this.key=e,this.reset(),this}getKey(){return this.key}reset(){this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental);if(!Music.scaleTypes[this.keyParts.type])throw new Vex.RERR("BadArguments",`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),Music.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};const e=Music.root_indices[this.keyParts.root];for(let t=0;t{const n=TextDynamics.GLYPHS[t];if(!n)throw new Vex.RERR("Invalid dynamics character: "+t);const i=this.render_options.glyph_font_size,r=new Glyph(n.code,i);this.glyphs.push(r),e+=n.width})),this.setWidth(e),this.preFormatted=!0,this}draw(){this.setRendered();const e=this.getAbsoluteX(),t=this.stave.getYForLine(this.line+-3);L$7("Rendering Dynamics: ",this.sequence);let n=e;this.glyphs.forEach(((e,i)=>{const r=this.sequence[i];e.render(this.context,n,t),n+=TextDynamics.GLYPHS[r].width}))}}function drawArrowHead(e,t,n,i,r,o,s){e.beginPath(),e.moveTo(t,n),e.lineTo(i,r),e.lineTo(o,s),e.lineTo(t,n),e.closePath(),e.fill()}function drawArrowLine(e,t,n,i){const r=i.draw_start_arrow&&i.draw_end_arrow,o=t.x,s=t.y,a=n.x,l=n.y,c=Math.sqrt((a-o)*(a-o)+(l-s)*(l-s)),u=(c-i.arrowhead_length/3)/c;let h,d,p,f;i.draw_end_arrow||r?(h=Math.round(o+(a-o)*u),d=Math.round(s+(l-s)*u)):(h=a,d=l),i.draw_start_arrow||r?(p=o+(a-o)*(1-u),f=s+(l-s)*(1-u)):(p=o,f=s),i.color&&(e.setStrokeStyle(i.color),e.setFillStyle(i.color)),e.beginPath(),e.moveTo(p,f),e.lineTo(h,d),e.stroke(),e.closePath();const m=Math.atan2(l-s,a-o),g=Math.abs(i.arrowhead_length/Math.cos(i.arrowhead_angle));let v,b,A,y,S,x;(i.draw_end_arrow||r)&&(v=m+Math.PI+i.arrowhead_angle,A=a+Math.cos(v)*g,y=l+Math.sin(v)*g,b=m+Math.PI-i.arrowhead_angle,S=a+Math.cos(b)*g,x=l+Math.sin(b)*g,drawArrowHead(e,A,y,a,l,S,x)),(i.draw_start_arrow||r)&&(v=m+i.arrowhead_angle,A=o+Math.cos(v)*g,y=s+Math.sin(v)*g,b=m-i.arrowhead_angle,S=o+Math.cos(b)*g,x=s+Math.sin(b)*g,drawArrowHead(e,A,y,o,s,S,x))}class StaveLine extends Element$1{static get TextVerticalPosition(){return{TOP:1,BOTTOM:2}}static get TextJustification(){return{LEFT:1,CENTER:2,RIGHT:3}}constructor(e){super(),this.setAttribute("type","StaveLine"),this.notes=e,this.text="",this.font={family:"Arial",size:10,weight:""},this.render_options={padding_left:4,padding_right:3,line_width:1,line_dash:null,rounded_end:!0,color:null,draw_start_arrow:!1,draw_end_arrow:!1,arrowhead_length:10,arrowhead_angle:Math.PI/8,text_position_vertical:StaveLine.TextVerticalPosition.TOP,text_justification:StaveLine.TextJustification.CENTER},this.setNotes(e)}setFont(e){return this.font=e,this}setText(e){return this.text=e,this}setNotes(e){if(!e.first_note&&!e.last_note)throw new Vex.RuntimeError("BadArguments","Notes needs to have either first_note or last_note set.");if(e.first_indices||(e.first_indices=[0]),e.last_indices||(e.last_indices=[0]),e.first_indices.length!==e.last_indices.length)throw new Vex.RuntimeError("BadArguments","Connected notes must have similar index sizes");return this.first_note=e.first_note,this.first_indices=e.first_indices,this.last_note=e.last_note,this.last_indices=e.last_indices,this}applyLineStyle(){const e=this.checkContext(),t=this.render_options;t.line_dash&&e.setLineDash(t.line_dash),t.line_width&&e.setLineWidth(t.line_width),t.rounded_end?e.setLineCap("round"):e.setLineCap("square")}applyFontStyle(){const e=this.checkContext();this.font&&e.setFont(this.font.family,this.font.size,this.font.weight),this.render_options.color&&(e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color))}draw(){const e=this.checkContext();this.setRendered();const t=this.first_note,n=this.last_note,i=this.render_options;let r,o;e.save(),this.applyLineStyle(),this.first_indices.forEach(((s,a)=>{const l=this.last_indices[a];r=t.getModifierStartXY(2,s),o=n.getModifierStartXY(1,l);const c=r.y>o.y;r.x+=t.getMetrics().modRightPx+i.padding_left,o.x-=n.getMetrics().modLeftPx+i.padding_right;const u=t.getGlyph().getWidth();t.getKeyProps()[s].displaced&&1===t.getStemDirection()&&(r.x+=u+i.padding_left);n.getKeyProps()[l].displaced&&-1===n.getStemDirection()&&(o.x-=u+i.padding_right),r.y+=c?-3:1,o.y+=c?2:0,drawArrowLine(e,r,o,this.render_options)})),e.restore();const s=e.measureText(this.text).width,a=i.text_justification;let l,c=0;if(a===StaveLine.TextJustification.LEFT)c=r.x;else if(a===StaveLine.TextJustification.CENTER){c=(o.x-r.x)/2+r.x-s/2}else a===StaveLine.TextJustification.RIGHT&&(c=o.x-s);const u=i.text_position_vertical;return u===StaveLine.TextVerticalPosition.TOP?l=t.getStave().getYForTopText():u===StaveLine.TextVerticalPosition.BOTTOM&&(l=t.getStave().getYForBottomText(Flow.TEXT_HEIGHT_OFFSET_HACK)),e.save(),this.applyFontStyle(),e.fillText(this.text,c,l),e.restore(),this}}function L$6(...e){PedalMarking.DEBUG&&Vex.L("Vex.Flow.PedalMarking",e)}function drawPedalGlyph(e,t,n,i,r){const o=PedalMarking.GLYPHS[e];new Glyph(o.code,r).render(t,n+o.x_shift,i+o.y_shift)}class PedalMarking extends Element$1{static get GLYPHS(){return{pedal_depress:{code:"v36",x_shift:-10,y_shift:0},pedal_release:{code:"v5d",x_shift:-2,y_shift:3}}}static get Styles(){return{TEXT:1,BRACKET:2,MIXED:3,MIXED_OPEN_END:4,BRACKET_OPEN_BEGIN:5,BRACKET_OPEN_END:6,BRACKET_OPEN_BOTH:7}}static get StylesString(){return{text:PedalMarking.Styles.TEXT,bracket:PedalMarking.Styles.BRACKET,mixed:PedalMarking.Styles.MIXED,mixed_open_end:PedalMarking.Styles.MIXED_OPEN_END,bracket_open_begin:PedalMarking.Styles.BRACKET_OPEN_BEGIN,bracket_open_end:PedalMarking.Styles.BRACKET_OPEN_END,bracket_open_both:PedalMarking.Styles.BRACKET_OPEN_BOTH}}static createSustain(e){return new PedalMarking(e)}static createSostenuto(e){const t=new PedalMarking(e);return t.setStyle(PedalMarking.Styles.MIXED),t.setCustomText("Sost. Ped."),t}static createUnaCorda(e){const t=new PedalMarking(e);return t.setStyle(PedalMarking.Styles.TEXT),t.setCustomText("una corda","tre corda"),t}constructor(e){super(),this.setAttribute("type","PedalMarking"),this.EndsStave=!1,this.ChangeBegin=!1,this.ChangeEnd=!1,this.notes=e,this.style=PedalMarking.TEXT,this.line=0,this.custom_depress_text="",this.custom_release_text="",this.font={family:"Times New Roman",size:12,weight:"italic bold"},this.render_options={bracket_height:10,text_margin_right:6,bracket_line_width:1,glyph_point_size:40,color:"black"}}setEndStave(e){if(this.endStave=e,this.endStaveAddedWidth=0,this.startMargin=0,this.endMargin=0,Array.isArray(this.endStave.modifiers))for(let t=0;t3)throw new Vex.RERR("InvalidParameter","The style must be one found in PedalMarking.Styles");return this.style=e,this}setLine(e){return this.line=e,this}drawBracketed(){const e=this.context;let t,n,i=!1;const r=this;this.notes.forEach(((o,s,a)=>{i=!i;let l=0;if(l=o?o.getNoteHeadBeginX():this.endStave.end_x+this.endStaveAddedWidth,this.EndsStave)i?this.ChangeBegin&&(l=o.getAbsoluteX()):(l=o?this.ChangeEnd?o.getAbsoluteX():o.getStave().end_x+this.endStaveAddedWidth-r.render_options.text_margin_right:this.endStave.end_x+this.endStaveAddedWidth-r.render_options.text_margin_right,this.endMargin=-r.render_options.text_margin_right);else if(o)if(i)this.ChangeBegin&&(l=o.getAbsoluteX());else switch(r.style){case PedalMarking.Styles.BRACKET_OPEN_END:case PedalMarking.Styles.BRACKET_OPEN_BOTH:case PedalMarking.Styles.MIXED_OPEN_END:l=o.getNoteHeadEndX();break;default:this.ChangeEnd?l=o.getAbsoluteX():(l=o.getNoteHeadBeginX()-r.render_options.text_margin_right,this.startMargin=-r.render_options.text_margin_right)}let c=this.endStave;o&&(c=o.getStave());let u=c.getYForBottomText(r.line+3);n&&n>u&&(u=n);const h=a[s+1]===o,d=a[s-1]===o;let p=0;if(i)if(p=d?5:0,r.style!==PedalMarking.Styles.MIXED&&r.style!==PedalMarking.Styles.MIXED_OPEN_END||d)e.beginPath(),r.style===PedalMarking.Styles.BRACKET_OPEN_BEGIN||r.style===PedalMarking.Styles.BRACKET_OPEN_BOTH?e.moveTo(l+p,u):(this.ChangeBegin&&(l+=5),e.moveTo(l,u-r.render_options.bracket_height),this.ChangeBegin&&(l+=5),e.lineTo(l+p,u)),e.stroke(),e.closePath();else if(r.custom_depress_text){const t=e.measureText(r.custom_depress_text).width;e.fillText(r.custom_depress_text,l-t/2,u),p=t/2+r.render_options.text_margin_right}else drawPedalGlyph("pedal_depress",e,l,u,r.render_options.glyph_point_size),p=20+r.render_options.text_margin_right;else p=h&&!this.EndsStave?-5:0,e.beginPath(),e.moveTo(t,n),e.lineTo(l+p,u),r.style!==PedalMarking.Styles.BRACKET_OPEN_END&&r.style!==PedalMarking.Styles.MIXED_OPEN_END&&r.style!==PedalMarking.Styles.BRACKET_OPEN_BOTH&&(this.ChangeEnd&&(l+=5),e.lineTo(l,u-r.render_options.bracket_height)),e.stroke(),e.closePath();t=l+p,n=u}))}drawText(){const e=this.context;let t=!1;const n=this,i=n.render_options.glyph_point_size;this.notes.forEach((r=>{t=!t;const o=r.getStave(),s=r.getAbsoluteX(),a=o.getYForBottomText(n.line+3);let l=0;t?n.custom_depress_text?(l=e.measureText(n.custom_depress_text).width,e.fillText(n.custom_depress_text,s-l/2,a)):drawPedalGlyph("pedal_depress",e,s,a,i):n.custom_release_text?(l=e.measureText(n.custom_release_text).width,e.fillText(n.custom_release_text,s-l/2,a)):drawPedalGlyph("pedal_release",e,s,a,i)}))}draw(){const e=this.checkContext();this.setRendered(),e.save(),e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color),e.setFont(this.font.family,this.font.size,this.font.weight),L$6("Rendering Pedal Marking"),this.style===PedalMarking.Styles.BRACKET||this.style===PedalMarking.Styles.MIXED||this.style===PedalMarking.Styles.MIXED_OPEN_END||this.style===PedalMarking.Styles.BRACKET_OPEN_BEGIN||this.style===PedalMarking.Styles.BRACKET_OPEN_END||this.style===PedalMarking.Styles.BRACKET_OPEN_BOTH?(e.setLineWidth(this.render_options.bracket_line_width),this.drawBracketed()):this.style===PedalMarking.Styles.TEXT&&this.drawText(),e.restore()}}function L$5(...e){TextBracket.DEBUG&&Vex.L("Vex.Flow.TextBracket",e)}class TextBracket extends Element$1{static get Positions(){return{TOP:1,BOTTOM:-1}}static get PositionString(){return{top:TextBracket.Positions.TOP,bottom:TextBracket.Positions.BOTTOM}}constructor({start:e,stop:t,text:n="",superscript:i="",position:r=TextBracket.Positions.TOP}){super(),this.setAttribute("type","TextBracket"),this.start=e,this.stop=t,this.text=n,this.superscript=i,this.position="string"==typeof r?TextBracket.PositionString[r]:r,this.line=1,this.font={family:"Serif",size:15,weight:"italic"},this.render_options={dashed:!0,dash:[5],color:"black",line_width:1,show_bracket:!0,bracket_height:8,underline_superscript:!0}}applyStyle(e){return e.setFont(this.font.family,this.font.size,this.font.weight),e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color),e.setLineWidth(this.render_options.line_width),this}setDashed(e,t){return this.render_options.dashed=e,t&&(this.render_options.dash=t),this}setFont(e){return this.font={...this.font,...e},this}setLine(e){return this.line=e,this}draw(){const e=this.context;this.setRendered();let t=0;switch(this.position){case TextBracket.Positions.TOP:t=this.start.getStave().getYForTopText(this.line);break;case TextBracket.Positions.BOTTOM:t=this.start.getStave().getYForBottomText(this.line+Flow.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new Vex.RERR("InvalidPosition",`The position ${this.position} is invalid`)}const n={x:this.start.getAbsoluteX(),y:t},i={x:this.stop.getAbsoluteX(),y:t};L$5("Rendering TextBracket: start:",n,"stop:",i,"y:",t);const r=this.render_options.bracket_height*this.position;e.save(),this.applyStyle(e),e.fillText(this.text,n.x,n.y);const o=e.measureText(this.text).width,s=e.measureText("M").width,a=n.y-s/2.5;e.setFont(this.font.family,this.font.size/1.4,this.font.weight),e.fillText(this.superscript,n.x+o+1,a);const l=e.measureText(this.superscript).width,c=e.measureText("M").width;let u=n.x,h=a;const d=i.x+this.stop.getGlyph().getWidth();this.position===TextBracket.Positions.TOP?(u+=o+l+5,h-=c/2.7):this.position===TextBracket.Positions.BOTTOM&&(h+=c/2.7,u+=o+2,this.render_options.underline_superscript||(u+=l)),this.render_options.dashed?(Renderer.drawDashedLine(e,u,h,d,h,this.render_options.dash),this.render_options.show_bracket&&Renderer.drawDashedLine(e,d,h+1*this.position,d,h+r,this.render_options.dash)):(e.beginPath(),e.moveTo(u,h),e.lineTo(d,h),this.render_options.show_bracket&&e.lineTo(d,h+r),e.stroke(),e.closePath()),e.restore()}}function L$4(...e){BarNote.DEBUG&&Vex.L("Vex.Flow.BarNote",e)}class BarNote extends Note{constructor(e=Barline.type.SINGLE){super({duration:"b"}),this.setAttribute("type","BarNote"),this.metrics={widths:{}};const t=Barline.type;this.metrics.widths={[t.SINGLE]:8,[t.DOUBLE]:12,[t.END]:15,[t.REPEAT_BEGIN]:14,[t.REPEAT_END]:14,[t.REPEAT_BOTH]:18,[t.NONE]:0},this.ignore_ticks=!0,this.setType(e)}getType(){return this.type}setType(e){return this.type="string"==typeof e?Barline.typeString[e]:e,this.setWidth(this.metrics.widths[this.type]),this}getBoundingBox(){return super.getBoundingBox()}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");L$4("Rendering bar line at: ",this.getAbsoluteX());const e=new Barline(this.type);e.setX(this.getAbsoluteX()),e.draw(this.stave),this.setRendered()}}class GhostNote extends StemmableNote{constructor(e){if(!e)throw new Vex.RuntimeError("BadArguments","Ghost note must have valid initialization data to identify duration.");let t;if("string"==typeof e)t={duration:e};else{if("object"!=typeof e)throw new Vex.RuntimeError("BadArguments","Ghost note must have valid initialization data to identify duration.");t=e}super(t),this.setAttribute("type","GhostNote"),this.setWidth(0)}isRest(){return!0}setStave(e){super.setStave(e)}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this}draw(){if(!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");this.setRendered();for(let e=0;e0||!0===t;return!t||r>0||(this.pos=i),s?this.matchSuccess():this.matchFail(i),{success:s,results:n,numMatches:r}}expectZeroOrMore(e){return this.expectOneOrMore(e,!0)}expect(e){let t;if(L$2("Evaluating rules:",e),!e)throw new X$2("Invalid Rule: "+e,e);const n=e.bind(this.grammar)();if(n.token)t=this.matchToken(n.token,!0===n.noSpace),t.success&&(this.pos+=t.incrementPos);else{if(!n.expect)throw new X$2("Bad grammar! No `token` or `expect` property",n);t=n.oneOrMore?this.expectOneOrMore(n):n.zeroOrMore?this.expectZeroOrMore(n):this.expectOne(n)}return t.matches=[],t.results&&t.results.forEach((e=>t.matches.push(flattenMatches(e)))),n.run&&t.success&&n.run(t),t}}function L$1(...e){EasyScore.DEBUG&&Vex.L("Vex.Flow.EasyScore",e)}const X$1=Vex.MakeException("EasyScoreError");class Grammar{constructor(e){this.builder=e}begin(){return this.LINE}LINE(){return{expect:[this.PIECE,this.PIECES,this.EOL]}}PIECE(){return{expect:[this.CHORDORNOTE,this.PARAMS],run:()=>this.builder.commitPiece()}}PIECES(){return{expect:[this.COMMA,this.PIECE],zeroOrMore:!0}}PARAMS(){return{expect:[this.DURATION,this.TYPE,this.DOTS,this.OPTS]}}CHORDORNOTE(){return{expect:[this.CHORD,this.SINGLENOTE],or:!0}}CHORD(){return{expect:[this.LPAREN,this.NOTES,this.RPAREN],run:e=>this.builder.addChord(e.matches[1])}}NOTES(){return{expect:[this.NOTE],oneOrMore:!0}}NOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE]}}SINGLENOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE],run:e=>this.builder.addSingleNote(e.matches[0],e.matches[1],e.matches[2])}}ACCIDENTAL(){return{expect:[this.ACCIDENTALS],maybe:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:e=>this.builder.setNoteDots(e.matches[0])}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:e=>this.builder.setNoteType(e.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:e=>this.builder.setNoteDuration(e.matches[1])}}OPTS(){return{expect:[this.LBRACKET,this.KEYVAL,this.KEYVALS,this.RBRACKET],maybe:!0}}KEYVALS(){return{expect:[this.COMMA,this.KEYVAL],zeroOrMore:!0}}KEYVAL(){return{expect:[this.KEY,this.EQUALS,this.VAL],run:e=>this.builder.addNoteOption(e.matches[0],e.matches[2].slice(1,-1))}}VAL(){return{expect:[this.SVAL,this.DVAL],or:!0}}KEY(){return{token:"[a-zA-Z][a-zA-Z0-9]*"}}DVAL(){return{token:'["][^"]*["]'}}SVAL(){return{token:"['][^']*[']"}}NOTENAME(){return{token:"[a-gA-G]"}}OCTAVE(){return{token:"[0-9]+"}}ACCIDENTALS(){return{token:"bbs|bb|bss|bs|b|db|d|##|#|n|\\+\\+-|\\+-|\\+\\+|\\+|k|o"}}DURATIONS(){return{token:"[0-9whq]+"}}TYPES(){return{token:"[rRsSxX]"}}LPAREN(){return{token:"[(]"}}RPAREN(){return{token:"[)]"}}COMMA(){return{token:"[,]"}}DOT(){return{token:"[.]"}}SLASH(){return{token:"[/]"}}MAYBESLASH(){return{token:"[/]?"}}EQUALS(){return{token:"[=]"}}LBRACKET(){return{token:"\\["}}RBRACKET(){return{token:"\\]"}}EOL(){return{token:"$"}}}class Builder{constructor(e){this.factory=e,this.commitHooks=[],this.reset()}reset(e={}){this.options={stem:"auto",clef:"treble"},this.elements={notes:[],accidentals:[]},this.rollingDuration="8",this.resetPiece(),Object.assign(this.options,e)}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(e){this.commitHooks.push(e)}resetPiece(){L$1("resetPiece"),this.piece={chord:[],duration:this.rollingDuration,dots:0,type:void 0,options:{}}}setNoteDots(e){L$1("setNoteDots:",e),e&&(this.piece.dots=e.length)}setNoteDuration(e){L$1("setNoteDuration:",e),this.rollingDuration=this.piece.duration=e||this.rollingDuration}setNoteType(e){L$1("setNoteType:",e),e&&(this.piece.type=e)}addNoteOption(e,t){L$1("addNoteOption: key:",e,"value:",t),this.piece.options[e]=t}addNote(e,t,n){L$1("addNote:",e,t,n),this.piece.chord.push({key:e,accid:t,octave:n})}addSingleNote(e,t,n){L$1("addSingleNote:",e,t,n),this.addNote(e,t,n)}addChord(e){L$1("startChord"),"object"!=typeof e[0]?this.addSingleNote(e[0]):e.forEach((e=>{e&&this.addNote(...e)})),L$1("endChord")}commitPiece(){L$1("commitPiece");const{factory:e}=this;if(!e)return;const t={...this.options,...this.piece.options},{stem:n,clef:i}=t,r="auto"===n.toLowerCase(),o=r||"up"!==n.toLowerCase()?StaveNote.STEM_DOWN:StaveNote.STEM_UP,{chord:s,duration:a,dots:l,type:c}=this.piece,u=s.map((e=>e.key+"/"+e.octave)),h=e.StaveNote({keys:u,duration:a,dots:l,type:c,clef:i,auto_stem:r});r||h.setStemDirection(o);const d=s.map((e=>e.accid||null));d.forEach(((t,n)=>{t&&h.addAccidental(n,e.Accidental({type:t}))}));for(let p=0;pe(t,h,this))),this.elements.notes.push(h),this.elements.accidentals.concat(d),this.resetPiece()}}function setId({id:e},t){void 0!==e&&t.setAttribute("id",e)}function setClass(e,t){if(!e.class)return;e.class.split(/\s*,\s*/).forEach((e=>t.addClass(e)))}class EasyScore{constructor(e={}){this.setOptions(e),this.defaults={clef:"treble",time:"4/4",stem:"auto"}}set(e){return Object.assign(this.defaults,e),this}setOptions(e){return this.options={factory:null,builder:null,commitHooks:[setId,setClass,Articulation$1.easyScoreHook],throwOnError:!1,...e},this.factory=this.options.factory,this.builder=this.options.builder||new Builder(this.factory),this.grammar=new Grammar(this.builder),this.parser=new Parser(this.grammar),this.options.commitHooks.forEach((e=>this.addCommitHook(e))),this}setContext(e){return this.factory&&this.factory.setContext(e),this}parse(e,t={}){this.builder.reset(t);const n=this.parser.parse(e);if(!n.success&&this.options.throwOnError)throw new X$1("Error parsing line: "+e,n);return n}beam(e,t={}){return this.factory.Beam({notes:e,options:t}),e}tuplet(e,t={}){return this.factory.Tuplet({notes:e,options:t}),e}notes(e,t={}){return t={clef:this.defaults.clef,stem:this.defaults.stem,...t},this.parse(e,t),this.builder.getElements().notes}voice(e,t){return t={time:this.defaults.time,...t},this.factory.Voice(t).addTickables(e)}addCommitHook(e){return this.builder.addCommitHook(e)}}function initGroup(){return{notes:[],finish:!1,total:0,staveId:""}}let _text_width=null,tone="C",group=initGroup(),_denominator="",_numerator="",ornamentGroup="";class NumberedNote extends StaveNote{static get CATEGORY(){return"numberednotes"}static accidentalAndKey(e){switch(e){case"G":return{4:"#"};case"D":return{1:"#",4:"#"};case"A":return{1:"#",4:"#",5:"#"};case"E":return{1:"#",2:"#",4:"#",5:"#"};case"B":return{1:"#",2:"#",4:"#",5:"#",6:"#"};case"F#":return{1:"#",2:"#",3:"#",4:"#",5:"#",6:"#"};case"C#":return{1:"#",2:"#",3:"#",4:"#",5:"#",6:"#",7:"#"};case"F":return{7:"b"};case"Bb":return{7:"b",3:"b"};case"Eb":return{7:"b",3:"b",6:"b"};case"Ab":return{7:"b",2:"b",3:"b",6:"b"};case"Db":return{7:"b",2:"b",3:"b",5:"b",6:"b"};case"Gb":return{7:"b",1:"b",2:"b",3:"b",5:"b",6:"b"};case"Cb":return{7:"b",1:"b",2:"b",3:"b",4:"b",5:"b",6:"b"};default:return{}}}static accidentalMap(e){switch(e){case"C":return"";case"F":case"Bb":case"Eb":case"Ab":case"Db":case"Gb":case"Cb":return{bb:"b",b:"",n:"#","#":"##"};default:return{b:"bb",n:"b","#":"","##":"#"}}}static get noteLift(){switch(tone){case"G":return["7"];case"D":return["7","3"];case"A":return["7","3","6"];case"E":return["2","6","3","7"];case"B":return["5","2","6","3","7"];case"F#":return["1","5","2","6","3","7"];case"C#":return["4","1","5","2","6","3","7"];case"F":return["4"];case"Bb":return["1","4"];case"Eb":return["5","1","4"];case"Ab":return["2","5","1","4"];case"Db":return["6","2","5","1","4"];case"Gb":return["3","6","2","5","1","4"];case"Cb":return["7","3","6","2","5","1","4"]}}static get longDurationLine(){return{1:3,2:1,6:2}}static get numberedDurationLine(){return{8:1,16:2,32:3,64:4,128:5}}static get durationTime(){return{8:6144,4:4096}}constructor(e){super(e),this.setAttribute("type","NumberedNote"),tone=e.keyString,this.ornament=!!e.ornament,this.line=0,this.keys=e.keys||[],this.fontSize=20,this.offset_x=0,this.offset_y=0,this.note_tones=[],this.duration_lines=0,this.long_duration_lines=0,this.note_size=e.note_size||16;const t=Flow.sanitizeDuration(this.duration);var n=NumberedNote.numberedDurationLine[t.toString()];if(n&&(this.duration_lines=n),(n=NumberedNote.longDurationLine[t.toString()])&&(this.long_duration_lines=n),!_text_width){var i="__$text_wraper$$__";let e=document.createElement("canvas");e.id=i,document.body.append(e);const t=document.getElementById(i),n=t.getContext("2d");n.font="Arial 22px";var r=n.measureText("5");_text_width=r.width+2,document.body.removeChild(t)}}getCategory(){return NumberedNote.CATEGORY}setKeySignature(e){this.keySignature=e}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.setWidth(this.full_width),this.setPreFormatted(!0))}filterNote(){if(window&&window.sett&&window.sett.keySignature)return;if(!this.keys||!this.keys.length)return;const e=NumberedNote.accidentalMap(tone);if(!e)return;const t=NumberedNote.noteLift;if(!t)return;var n=this.keys[0].split("/")[0];"b"===n&&(n="R"),(n=(n=n.replace(new RegExp("#","g"),"")).replace(new RegExp("n","g"),"")).length>1&&(n=n.replace(new RegExp("b","g"),""));const i=NumberedNoteHead.numberedNotationMapping[n.toUpperCase()];if(t.includes(i))for(let r=0;r{switch(n.getAttribute("type")){case"Accidental":n.render_options.font_scale=1.4*this.note_width,n.x_shift=2,n.y_shift=this.unit_height/2,this.ornament&&(n.render_options.font_scale=this.note_width,n.x_shift=14,n.y_shift=-10);break;case"Stroke":n.x_shift=-1*e,n.y_shift=1*this.unit_height;break;case"Dot":n.x_shift=t*this.duration_dot_width+7,n.y_shift=1*this.unit_height,t++;break;case"Ornament":n.y_shift=-3;break;default:n.y_shift=1*this.unit_height}n.reset&&n.reset(),e+=n.getWidth()/2}))}handleDeleteDot(){for(let e=0;ee)),n=t.length?t[0]/t[1]:0;if(this.ornament)return;if(0===n){if(this.long_duration_lines=this.intrinsicTicks/e-1,this.long_duration_lines>=_numerator&&(this.long_duration_lines=_numerator-1),8==_denominator&&(this.long_duration_lines=0,3==_numerator&&this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),6==_numerator)){this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),new Glyph("v0",40).render(this.context,this.bottom_x+40,this.top_y),this.draw_dot(this.context,this.bottom_x+65,this.bottom_y-30,this.dot_width)}return group=initGroup()}let i={lines:this.duration_lines,duration:n,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,y:this.y,width:this.full_width};n>2*e&&(this.long_duration_lines=parseInt(n/e)-1,this.handleDeleteDot()),ornamentGroup&&(i.x+=this.note_width),group.notes.push(i);let r=group.notes.reduce(((e,t)=>e+t.duration),0);if(r=parseInt(r),r>e&&(r-=e),r>e-10&&r0===e.lines));e.length&&(this.drawDurationLoneLine(),group=initGroup())}}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");let e=this.context;e.save(),e.setFont("Arial",this.note_height,"normal"),this.setAttribute("el",e.openGroup("stavenote",this.getAttribute("id"))),e.openGroup("note",null,{pointerBBox:!0});let t=this.getAbsoluteX()+2.5;this.x=t;let n=this.stave.getYForLine(2)+this.note_height/2;this.y=n,this.buildToneHeads(),this.preFormatModifier(),this.applyStyle(),this.note_tones.forEach((t=>{t.draw(e)})),e.openGroup("modifier",null,{pointerBBox:!0}),this.drawModifiers(),e.closeGroup(),e.closeGroup(),e.closeGroup(),this.calcGroup(),group.staveId=this.stave.attrs.id,this.drawDurationLine(e,{}),this.drawLongDurationLines(e),this.restoreStyle(),this.setRendered(),ornamentGroup=this.ornament?ornamentGroup?Object.assign(ornamentGroup,{lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}):{lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}:""}drawDurationLoneLine(e,t){e=e||this.context;let n=t||this.y+this.duration_line_space;for(let i=0;i<5;i++){let t=[],r=0;for(let o=0;oi)t.push(s),r++;else{if(t.length>1){let r=t.length-1;n=t[0].y+this.duration_line_space,e.rect(t[0].x,n+3*i,t[r].x-t[0].x+t[r].width,.5)}t=[],r=o+1}}if(t.length>1){let r=t.length-1;n=t[0].y+this.duration_line_space,e.rect(t[0].x,n+3*i,t[r].x-t[0].x+t[r].width,.5)}}}draw_dot(e,t,n,i){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.closePath(),e.fill(),e.closeGroup()}drawDurationLine(e,t){var n,i,r=this.attrs.id+"-lines";if(e.openGroup("numbered_note_lines",r),this.duration_lines>0){const r=this.duration_line_space;var o=this.full_width;if(t&&t.width&&(o=t.width),o<0&&(o=this.note_width),n=t&&void 0!==t.startX?t.startX:this.x-r/2-this.left_width,i=t&&void 0!==t.startY?t.startY:this.y+this.duration_line_space,group.finish&&(this.drawDurationLoneLine(e,i),group=initGroup()),this.ornament?(n+=12,i-=22,o=15,ornamentGroup&&(n-=10,o+=10)):ornamentGroup&&(n+=this.note_width,o-=this.note_width),o>0){for(var s=0;s"Accidental"===e.getAttribute("type"))),this.modifiers.findIndex((e=>"Accidental"===e.getAttribute("type"))));e&&t>-1?this.modifiers[t].accidental.code="#"===e?"v18":"v44":this.modifiers.splice(t,1)}}catch(t){console.log("🚀 ~ error",t)}}this.setYs(e)}getFullWidth(){return this.full_width}getFullHeight(){return this.full_height}getLine(){return this.keyProps[0].line}get full_width(){return this.note_width+this.left_width+this.right_width+this.long_duration_line_width}get long_duration_line_width(){return(this.long_duration_width+this.long_duration_space)*this.long_duration_lines}get full_height(){return this.bottom_y-this.top_y}get note_width(){return this.note_size||0}get note_dot_width(){return 6}get note_height(){return this.unit_height}get unit_height(){return this.note_size||0}get note_x(){return this.x||0}get top_x(){return this.x||0}get top_y(){var e=this;return(this.y||0)-(e.note_tones.map((t=>(t.td+t.bd)*(e.dot_space+e.dot_width))).reduce(((e,t)=>e+t),0)+this.note_height*this.note_tones.length-this.unit_height-this.note_tones[0].bd*(e.dot_space+e.dot_width)+(this.note_tones.length-1)*this.head_space)}get bottom_x(){return this.x||0}get bottom_y(){return(this.y||0)+this.unit_height+this.duration_lines*(this.duration_line_height+this.duration_line_space)+this.note_tones[0].meta.bd*(this.dot_width+this.dot_space)}get left_width(){return this.modifiers_width}get right_width(){return this.full_duration_dot_width}get duration_dot_width(){return 6}get full_duration_dot_width(){return this.duration_dot_width*this.getModifiersByCategory(Dot.CATEGORY).length}getModifiersByCategory(e){var t=[];return this.modifiers.forEach((n=>{n.getCategory()===e&&t.push(n)})),t}get head_space(){return 6}get duration_line_height(){return 2}get duration_line_space(){return 4}get dot_width(){return 2}get dot_space(){return 2}get long_duration_space(){return 10}get long_duration_width(){return 20}getWidth(){return this.full_width}get modifiers_width(){let e=0;return this.modifiers.forEach((t=>{e+=t.getWidth()})),e}}class NumberedNoteHead{static get numberedNotationMapping(){let e=tone;switch(window&&window.sett&&window.sett.keySignature&&(e="C"),e){case"A":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",min:2.5,max:5.5};case"B":case"Bb":case"A#":return{C:"2",D:"3",E:"4",F:"5",G:"6",A:"7",B:"1",R:"0",min:-.5,max:2.5};case"D":case"D#":case"Db":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",min:.5,max:3.5};case"E":case"Eb":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",min:1,max:4};case"F":case"F#":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",min:1.5,max:4.5};case"G":case"Gb":return{C:"4",D:"5",E:"6",F:"7",G:"1",A:"2",B:"3",R:"0",min:2,max:5};case"Ab":case"G#":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",min:-1,max:2};default:return{C:"1",D:"2",E:"3",F:"4",G:"5",A:"6",B:"7",R:"0",min:0,max:3}}}tone_to_numbered_key(){var e=this.key.split("/")[0];"b"===e&&(e="R"),(e=(e=e.replace(new RegExp("#","g"),"")).replace(new RegExp("n","g"),"")).length>1&&(e=e.replace(new RegExp("b","g"),""));let t=0,n=0;this.note.stave&&this.note.stave.options&&this.note.stave.options.keySignature&&(tone=this.note.stave.options.keySignature);const i=this.note.getLine();return iNumberedNoteHead.numberedNotationMapping.max&&(n=Math.ceil((i-NumberedNoteHead.numberedNotationMapping.max)/3.5)),"R"===e.toUpperCase()&&(t=0,n=0),{key:NumberedNoteHead.numberedNotationMapping[e.toUpperCase()],td:n,bd:t}}constructor(e){this.key=e.key,this.x=e.x||0,this.y=e.y||0,this.idx=e.idx||0,this.note=e.note||0,this.meta=this.tone_to_numbered_key(),this.noteSize=e.noteSize||16,this.td=this.meta.td,this.bd=this.meta.bd}draw(e){let t=this.y;e.openGroup("numbered-note-head");var n=this.x+(this.note.ornament?-2:0);let i=t-this.note.unit_height-this.note.dot_space-(this.note.ornament?-4:2);for(let r=0;r1&&(e-=this.note.duration_line_space),t+=e}this.draw_dot(e,n+_text_width,t,this.note.dot_width),t+=this.note.dot_width+this.note.dot_space}e.closeGroup()}get height(){return this.note.note_height+(this.meta.bd+this.meta.td)*(this.note.dot_width+this.note.dot_space)}draw_dot(e,t,n,i){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.closePath(),e.fill(),e.closeGroup()}}function L(...e){Factory.DEBUG&&Vex.L("Vex.Flow.Factory",e)}const X=Vex.MakeException("FactoryError");function setDefaults$1(e={},t){const n=t.options;return(e=Object.assign(t,e)).options=Object.assign(n,e.options),e}class Factory{constructor(e){L("New factory: ",e);const t={stave:{space:10},renderer:{context:null,elementId:"",backend:Renderer.Backends.SVG,width:500,height:200,background:"#FFF"},font:{face:"Arial",point:10,style:""}};this.options=t,this.setOptions(e)}static newFromElementId(e,t=500,n=200){return new Factory({renderer:{elementId:e,width:t,height:n}})}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=null}getOptions(){return this.options}setOptions(e){for(const t of["stave","renderer","font"])Object.assign(this.options[t],e[t]);(null!==this.options.renderer.elementId||this.options.renderer.context)&&this.initRenderer(),this.reset()}initRenderer(){const{elementId:e,backend:t,width:n,height:i,background:r}=this.options.renderer;if(""===e)throw new X("HTML DOM element not set in Factory");this.context=Renderer.buildContext(e,t,n,i,r)}getContext(){return this.context}setContext(e){return this.context=e,this}getStave(){return this.stave}getVoices(){return this.voices}space(e){return this.options.stave.space*e}Stave(e){e=setDefaults$1(e,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:this.options.stave.space}});const t=new Stave(e.x,e.y,e.width,e.options);return this.staves.push(t),t.setContext(this.context),this.stave=t,t}TabStave(e){e=setDefaults$1(e,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:1.3*this.options.stave.space}});const t=new TabStave(e.x,e.y,e.width,e.options);return this.staves.push(t),t.setContext(this.context),this.stave=t,t}StaveNote(e){const t=new StaveNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GhostNote(e){const t=new GhostNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TextNote(e){const t=new TextNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}NumberedNote(e){const t=new NumberedNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}BarNote(e){e=setDefaults$1(e,{type:"single",options:{}});const t=new BarNote(e.type);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}ClefNote(e){e=setDefaults$1(e,{type:"treble",options:{size:"default"}});const t=new ClefNote(e.type,e.options.size,e.options.annotation);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TimeSigNote(e){e=setDefaults$1(e,{time:"4/4",options:{}});const t=new TimeSigNote(e.time);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}KeySigNote(e){const t=new KeySigNote(e.key,e.cancelKey,e.alterKey);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TabNote(e){const t=new TabNote$1(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GraceNote(e){const t=new GraceNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),t}GraceNoteGroup(e){const t=new GraceNoteGroup(e.notes,e.slur);return t.setContext(this.context),t}Accidental(e){e=setDefaults$1(e,{type:null,options:{}});const t=new Accidental(e.type);return t.setContext(this.context),t}Annotation(e){e=setDefaults$1(e,{text:"p",vJustify:"below",hJustify:"center",fontFamily:"Times",fontSize:14,fontWeight:"bold italic",options:{}});const t=new Annotation(e.text);return t.setJustification(e.hJustify),t.setVerticalJustification(e.vJustify),t.setFont(e.fontFamily,e.fontSize,e.fontWeight),t.setContext(this.context),t}Articulation(e){e=setDefaults$1(e,{type:"a.",position:"above",options:{}});const t=new Articulation$1(e.type);return t.setPosition(e.position),t.setContext(this.context),t}TextDynamics(e){e=setDefaults$1(e,{text:"p",duration:"q",dots:0,line:0,options:{}});const t=new TextDynamics({text:e.text,line:e.line,duration:e.duration,dots:e.dots});return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}Fingering(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const t=new FretHandFinger(e.number);return t.setPosition(e.position),t.setContext(this.context),t}StringNumber(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const t=new StringNumber(e.number);return t.setPosition(e.position),t.setContext(this.context),t}TickContext(){return(new TickContext).setContext(this.context)}ModifierContext(){return new ModifierContext}MultiMeasureRest(e){const t=new MultiMeasureRest(e.number_of_measures,e);return t.setContext(this.context),this.renderQ.push(t),t}Voice(e){e=setDefaults$1(e,{time:"4/4",options:{}});const t=new Voice$1(e.time);return this.voices.push(t),t}StaveConnector(e){e=setDefaults$1(e,{top_stave:null,bottom_stave:null,type:"double",options:{}});const t=new StaveConnector(e.top_stave,e.bottom_stave);return t.setType(e.type).setContext(this.context),this.renderQ.push(t),t}Formatter(){return new Formatter}Tuplet(e){e=setDefaults$1(e,{notes:[],options:{}});const t=new Tuplet$1(e.notes,e.options).setContext(this.context);return this.renderQ.push(t),t}Beam(e){e=setDefaults$1(e,{notes:[],options:{autoStem:!1,secondaryBeamBreaks:[]}});const t=new Beam$1(e.notes,e.options.autoStem).setContext(this.context);return t.breakSecondaryAt(e.options.secondaryBeamBreaks),this.renderQ.push(t),t}Curve(e){e=setDefaults$1(e,{from:null,to:null,options:{}});const t=new Curve(e.from,e.to,e.options).setContext(this.context);return this.renderQ.push(t),t}StaveTie(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],text:null,options:{direction:void 0}});const t=new StaveTie({first_note:e.from,last_note:e.to,first_indices:e.first_indices,last_indices:e.last_indices},e.text);return e.options.direction&&t.setDirection(e.options.direction),t.setContext(this.context),this.renderQ.push(t),t}StaveLine(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],options:{}});const t=new StaveLine({first_note:e.from,last_note:e.to,first_indices:e.first_indices,last_indices:e.last_indices});return e.options.text&&t.setText(e.options.text),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}VibratoBracket(e){e=setDefaults$1(e,{from:null,to:null,options:{harsh:!1}});const t=new VibratoBracket({start:e.from,stop:e.to});return e.options.line&&t.setLine(e.options.line),e.options.harsh&&t.setHarsh(e.options.harsh),t.setContext(this.context),this.renderQ.push(t),t}TextBracket(e){e=setDefaults$1(e,{from:null,to:null,text:"",options:{superscript:"",position:1}});const t=new TextBracket({start:e.from,stop:e.to,text:e.text,superscript:e.options.superscript,position:e.options.position});return e.options.line&&t.setLine(e.options.line),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}System(e={}){e.factory=this;const t=new System(e).setContext(this.context);return this.systems.push(t),t}EasyScore(e={}){return e.factory=this,new EasyScore(e)}PedalMarking(e={}){e=setDefaults$1(e,{notes:[],options:{style:"mixed"}});const t=new PedalMarking(e.notes);return t.setStyle(PedalMarking.StylesString[e.options.style]),t.setContext(this.context),this.renderQ.push(t),t}NoteSubGroup(e={}){e=setDefaults$1(e,{notes:[],options:{}});const t=new NoteSubGroup$1(e.notes);return t.setContext(this.context),t}draw(){this.systems.forEach((e=>e.setContext(this.context).format())),this.staves.forEach((e=>e.setContext(this.context).draw())),this.voices.forEach((e=>e.setContext(this.context).draw())),this.renderQ.forEach((e=>{e.isRendered()||e.setContext(this.context).draw()})),this.systems.forEach((e=>e.setContext(this.context).draw())),this.reset()}}function setDefaults(e,t){const n=t.options;return(e=Object.assign(t,e)).options=Object.assign(n,e.options),e}class System extends Element$1{constructor(e={}){super(),this.setAttribute("type","System"),this.setOptions(e),this.parts=[]}setOptions(e={}){this.options=setDefaults(e,{x:10,y:10,width:500,connector:null,spaceBetweenStaves:12,factory:null,debugFormatter:!1,formatIterations:0,options:{}}),this.factory=this.options.factory||new Factory({renderer:{el:null}})}setContext(e){return super.setContext(e),this.factory.setContext(e),this}addConnector(e="double"){return this.connector=this.factory.StaveConnector({top_stave:this.parts[0].stave,bottom_stave:this.parts[this.parts.length-1].stave,type:e}),this.connector}addStave(e){return(e=setDefaults(e,{stave:null,voices:[],spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,options:{left_bar:!1}})).stave||(e.stave=this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:e.options})),e.voices.forEach((t=>t.setContext(this.context).setStave(e.stave).getTickables().forEach((t=>t.setStave(e.stave))))),this.parts.push(e),e.stave}format(){const e=new Formatter;this.formatter=e;let t=this.options.y,n=0,i=[];const r=[];this.parts.forEach((o=>{t+=o.stave.space(o.spaceAbove),o.stave.setY(t),e.joinVoices(o.voices),t+=o.stave.space(o.spaceBelow),t+=o.stave.space(this.options.spaceBetweenStaves),o.debugNoteMetrics&&(r.push({y:t,voice:o.voices[0]}),t+=15),i=i.concat(o.voices),n=Math.max(n,o.stave.getNoteStartX())})),this.parts.forEach((e=>e.stave.setNoteStartX(n)));const o=this.options.width-(n-this.options.x)-Note.STAVEPADDING;e.format(i,o);for(let s=0;s{t.voice.getTickables().forEach((n=>Note.plotMetrics(e,n,t.y)))}))}}Vex.Flow=Flow,Vex.Flow.Element=Element$1,Vex.Flow.Fraction=Fraction,Vex.Flow.Renderer=Renderer,Vex.Flow.Formatter=Formatter,Vex.Flow.Music=Music,Vex.Flow.Glyph=Glyph,Vex.Flow.Stave=Stave,Vex.Flow.StaveNote=StaveNote,Vex.Flow.StaveModifier=StaveModifier,Vex.Flow.StaveTempo=StaveTempo,Vex.Flow.Voice=Voice$1,Vex.Flow.Accidental=Accidental,Vex.Flow.Beam=Beam$1,Vex.Flow.StaveTie=StaveTie,Vex.Flow.TabStave=TabStave,Vex.Flow.TabNote=TabNote$1,Vex.Flow.Bend=Bend,Vex.Flow.Vibrato=Vibrato,Vex.Flow.VibratoBracket=VibratoBracket,Vex.Flow.Note=Note,Vex.Flow.ModifierContext=ModifierContext,Vex.Flow.MultiMeasureRest=MultiMeasureRest,Vex.Flow.TickContext=TickContext,Vex.Flow.Articulation=Articulation$1,Vex.Flow.Annotation=Annotation,Vex.Flow.Barline=Barline,Vex.Flow.NoteHead=NoteHead,Vex.Flow.StaveConnector=StaveConnector,Vex.Flow.ClefNote=ClefNote,Vex.Flow.KeySignature=KeySignature,Vex.Flow.KeySigNote=KeySigNote,Vex.Flow.TimeSignature=TimeSignature,Vex.Flow.TimeSigNote=TimeSigNote,Vex.Flow.Stem=Stem,Vex.Flow.TabTie=TabTie,Vex.Flow.Clef=Clef,Vex.Flow.Dot=Dot,Vex.Flow.Modifier=Modifier,Vex.Flow.TabSlide=TabSlide,Vex.Flow.Tuplet=Tuplet$1,Vex.Flow.GraceNote=GraceNote,Vex.Flow.GraceTabNote=GraceTabNote,Vex.Flow.Tuning=Tuning,Vex.Flow.KeyManager=KeyManager,Vex.Flow.StaveHairpin=StaveHairpin,Vex.Flow.BoundingBox=BoundingBox,Vex.Flow.Stroke=Stroke,Vex.Flow.TextNote=TextNote,Vex.Flow.Curve=Curve,Vex.Flow.TextDynamics=TextDynamics,Vex.Flow.StaveLine=StaveLine,Vex.Flow.Ornament=Ornament,Vex.Flow.PedalMarking=PedalMarking,Vex.Flow.TextBracket=TextBracket,Vex.Flow.FretHandFinger=FretHandFinger,Vex.Flow.Repetition=Repetition$1,Vex.Flow.BarNote=BarNote,Vex.Flow.GhostNote=GhostNote,Vex.Flow.NoteSubGroup=NoteSubGroup$1,Vex.Flow.GraceNoteGroup=GraceNoteGroup,Vex.Flow.Tremolo=Tremolo,Vex.Flow.StringNumber=StringNumber,Vex.Flow.Crescendo=Crescendo,Vex.Flow.Volta=Volta,Vex.Flow.Font=Font,Vex.Flow.System=System,Vex.Flow.Factory=Factory,Vex.Flow.Parser=Parser,Vex.Flow.EasyScore=EasyScore,Vex.Flow.Registry=Registry;var SystemLinesEnum=(e=>(e[e.SingleThin=0]="SingleThin",e[e.DoubleThin=1]="DoubleThin",e[e.ThinBold=2]="ThinBold",e[e.BoldThinDots=3]="BoldThinDots",e[e.DotsThinBold=4]="DotsThinBold",e[e.DotsBoldBoldDots=5]="DotsBoldBoldDots",e[e.None=6]="None",e[e.Dotted=7]="Dotted",e[e.Dashed=8]="Dashed",e[e.Bold=9]="Bold",e[e.BoldThin=10]="BoldThin",e[e.DoubleBold=11]="DoubleBold",e[e.Tick=12]="Tick",e[e.Short=13]="Short",e))(SystemLinesEnum||{});class SystemLinesEnumHelper{static xmlBarlineStyleToSystemLinesEnum(e){return"regular"===e?0:"dotted"===e?7:"dashed"===e?8:"heavy"===e?9:"light-light"===e?1:"light-heavy"===e?2:"heavy-light"===e?10:"heavy-heavy"===e?11:"tick"===e?12:"short"===e?13:"none"===e?6:0}}class Matrix2D{constructor(){this.matrix=[];for(let e=0;e<2;e++){this.matrix[e]=[];for(let t=0;t<2;t++)this.matrix[e][t]=0}}static getRotationMatrix(e){const t=new Matrix2D,n=Math.cos(e),i=Math.sin(e);return t.matrix[0][0]=n,t.matrix[0][1]=-i,t.matrix[1][0]=i,t.matrix[1][1]=n,t}scalarMultiplication(e){for(let t=0;t<2;t++)for(let n=0;n<2;n++)this.matrix[t][n]*=e}getTransposeMatrix(){const e=new Matrix2D;for(let t=0;t<2;t++)for(let n=0;n<2;n++)e.matrix[t][n]=this.matrix[n][t];return e}vectorMultiplication(e){const t=new PointF2D;return t.x=e.x*this.matrix[0][0]+e.y*this.matrix[0][1],t.y=e.x*this.matrix[1][0]+e.y*this.matrix[1][1],t}}class MusicSheetErrors{constructor(){this.measureErrors={},this.errors=[],this.tempErrors=[]}finalizeMeasure(e){let t=this.measureErrors[e];t||(t=[]),this.measureErrors[e]=t.concat(this.tempErrors),this.tempErrors=[]}pushMeasureError(e){this.tempErrors.push(e)}push(e){this.errors.push(e)}}class Arpeggio{constructor(e,t=7){this.parentVoiceEntry=e,this.type=t,this.notes=[]}addNote(e){this.notes.push(e),e.Arpeggio=this}}var ArpeggioType=(e=>(e[e.BRUSH_DOWN=1]="BRUSH_DOWN",e[e.BRUSH_UP=2]="BRUSH_UP",e[e.ROLL_DOWN=3]="ROLL_DOWN",e[e.ROLL_UP=4]="ROLL_UP",e[e.RASQUEDO_DOWN=5]="RASQUEDO_DOWN",e[e.RASQUEDO_UP=6]="RASQUEDO_UP",e[e.ARPEGGIO_DIRECTIONLESS=7]="ARPEGGIO_DIRECTIONLESS",e))(ArpeggioType||{});class Beam{constructor(e=1,t=0){this.notes=[],this.extendedNoteList=[],this.BeamNumberOffsetToXML=0,this.BeamNumber=e,this.BeamNumberOffsetToXML=t}get Notes(){return this.notes}set Notes(e){this.notes=e}get ExtendedNoteList(){return this.extendedNoteList}set ExtendedNoteList(e){this.extendedNoteList=e}addNoteToBeam(e){e&&(e.NoteBeam=this,this.notes.push(e),this.extendedNoteList.push(e))}}class Voice{constructor(e,t){this.voiceEntries=[],this.volume=1,this.parent=e,this.visible=!0,this.audible=!0,this.following=!0,this.voiceId=t,this.uniqueVoiceId="I:"+this.parent.Id+" V: "+this.voiceId}get VoiceEntries(){return this.voiceEntries}get Parent(){return this.parent}get Visible(){return this.visible}set Visible(e){this.visible=e}get Audible(){return this.audible}set Audible(e){this.audible=e}get Following(){return this.following}set Following(e){this.following=e}get Solo(){return this.solo}set Solo(e){this.solo=e}get VoiceId(){return this.voiceId}get Volume(){return this.volume}set Volume(e){this.volume=e}toString(){return this.uniqueVoiceId}}class LinkedVoice extends Voice{constructor(e,t,n){super(e,t),this.master=n}get Master(){return this.master}}class Notehead{constructor(e,t,n=undefined){this.sourceNote=e,this.setShapeFromXml(t,n)}setShapeFromXml(e,t=undefined){this.shape=Notehead.ShapeTypeXmlToShape(e);let n=t;void 0===n&&(this.sourceNote?n=this.sourceNote.Length.Denominator>2:(loglevelExports.warn("notehead: sourceNote and filledXmlAttribute undefined."),n=!0)),this.filled=n}get SourceNote(){return this.sourceNote}get Shape(){return this.shape}get Filled(){return this.filled}static ShapeTypeXmlToShape(e){switch(e.toLowerCase()){case"normal":return 2;case"x":return 7;case"slash":return 4;case"diamond":return 1;case"square":case"la":return 5;case"do":case"triangle":return 6;case"rectangle":return 3;case"circle-x":return 0;default:return loglevelExports.info("unsupported/unhandled xml notehead '"+e+"'. Using normal notehead."),2}}}var NoteHeadShape=(e=>(e[e.CIRCLEX=0]="CIRCLEX",e[e.DIAMOND=1]="DIAMOND",e[e.NORMAL=2]="NORMAL",e[e.RECTANGLE=3]="RECTANGLE",e[e.SLASH=4]="SLASH",e[e.SQUARE=5]="SQUARE",e[e.TRIANGLE=6]="TRIANGLE",e[e.X=7]="X",e))(NoteHeadShape||{});class ITextTranslation{static translateText(e,t){if(!this.defaultTextTranslation)return t}}var NoteType=(e=>(e[e.UNDEFINED=0]="UNDEFINED",e[e._1024th=1]="_1024th",e[e._512th=2]="_512th",e[e._256th=3]="_256th",e[e._128th=4]="_128th",e[e._64th=5]="_64th",e[e._32nd=6]="_32nd",e[e._16th=7]="_16th",e[e.EIGTH=8]="EIGTH",e[e.QUARTER=9]="QUARTER",e[e.HALF=10]="HALF",e[e.WHOLE=11]="WHOLE",e[e.BREVE=12]="BREVE",e[e.LONG=13]="LONG",e[e.MAXIMA=14]="MAXIMA",e))(NoteType||{});class NoteTypeHandler{static NoteTypeToString(e){return this.NoteTypeXmlValues[e]}static StringToNoteType(e){const t=this.NoteTypeXmlValues.indexOf(e);return-1!==t?t:0}static getNoteDurationFromType(e){switch(e){case"1024th":return new Fraction$1(1,1024);case"512th":return new Fraction$1(1,512);case"256th":return new Fraction$1(1,256);case"128th":return new Fraction$1(1,128);case"64th":return new Fraction$1(1,64);case"32th":case"32nd":return new Fraction$1(1,32);case"16th":return new Fraction$1(1,16);case"eighth":return new Fraction$1(1,8);case"quarter":return new Fraction$1(1,4);case"half":return new Fraction$1(1,2);case"whole":return new Fraction$1(1,1);case"breve":return new Fraction$1(2,1);case"long":return new Fraction$1(4,1);case"maxima":return new Fraction$1(8,1);default:{const e=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid note duration.");throw new MusicSheetReadingException(e)}}}}NoteTypeHandler.NoteTypeXmlValues=["","1024th","512th","256th","128th","64th","32nd","16th","eigth","quarter","half","whole","breve","long","maxima"];class OrnamentContainer{constructor(e){this.placement=PlacementEnum.Above,this.accidentalAbove=AccidentalEnum.NONE,this.accidentalBelow=AccidentalEnum.NONE,this.ornament=e}get GetOrnament(){return this.ornament}get AccidentalAbove(){return this.accidentalAbove}set AccidentalAbove(e){this.accidentalAbove=e}get AccidentalBelow(){return this.accidentalBelow}set AccidentalBelow(e){this.accidentalBelow=e}}var OrnamentEnum=(e=>(e[e.Trill=0]="Trill",e[e.Turn=1]="Turn",e[e.InvertedTurn=2]="InvertedTurn",e[e.DelayedTurn=3]="DelayedTurn",e[e.DelayedInvertedTurn=4]="DelayedInvertedTurn",e[e.Mordent=5]="Mordent",e[e.InvertedMordent=6]="InvertedMordent",e))(OrnamentEnum||{});class VerticalSourceStaffEntryContainer{constructor(e,t,n){this.staffEntries=[],this.comments=[],this.timestamp=t,this.staffEntries=new Array(n),this.parentMeasure=e}$get$(e){return this.staffEntries[e]}$set$(e,t){this.staffEntries[e]=t}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get StaffEntries(){return this.staffEntries}set StaffEntries(e){this.staffEntries=e}get Comments(){return this.comments}set Comments(e){this.comments=e}get ParentMeasure(){return this.parentMeasure}set ParentMeasure(e){this.parentMeasure=e}getAbsoluteTimestamp(){return Fraction$1.plus(this.timestamp,this.parentMeasure.AbsoluteTimestamp)}}class SourceStaffEntry{constructor(e,t){this.voiceEntries=[],this.instructions=[],this.chordSymbolContainers=[],this.verticalContainerParent=e,this.parentStaff=t}get ParentStaff(){return this.parentStaff}get VerticalContainerParent(){return this.verticalContainerParent}get Timestamp(){if(this.VerticalContainerParent)return this.VerticalContainerParent.Timestamp}get AbsoluteTimestamp(){if(this.VerticalContainerParent)return Fraction$1.plus(this.VerticalContainerParent.ParentMeasure.AbsoluteTimestamp,this.VerticalContainerParent.Timestamp)}get VoiceEntries(){return this.voiceEntries}set VoiceEntries(e){this.voiceEntries=e}get Link(){return this.staffEntryLink}set Link(e){this.staffEntryLink=e}get Instructions(){return this.instructions}set Instructions(e){this.instructions=e}get ChordContainers(){return this.chordSymbolContainers}set ChordContainers(e){this.chordSymbolContainers=e}removeAllInstructionsOfTypeClefInstruction(){let e=0,t=0;for(;e0)return!0}return!1}hasTie(){for(let e=0,t=this.VoiceEntries.length;et.parentRepetition.StartIndex)return-1}if(0===e.alignment&&0===t.alignment){if(e.parentRepetition.EndIndext.parentRepetition.EndIndex)return-1}}return 0}}class RepetitionInstruction{constructor(e,t,n=1,i=undefined,r=undefined){this.endingIndices=void 0,this.measureIndex=e,r&&(this.endingIndices=r.slice()),this.type=t,this.alignment=n,this.parentRepetition=i}CompareTo(e){const t=e;if(this.measureIndex>t.measureIndex)return 1;if(this.measureIndex(e[e.StartLine=0]="StartLine",e[e.ForwardJump=1]="ForwardJump",e[e.BackJumpLine=2]="BackJumpLine",e[e.Ending=3]="Ending",e[e.DaCapo=4]="DaCapo",e[e.DalSegno=5]="DalSegno",e[e.Fine=6]="Fine",e[e.ToCoda=7]="ToCoda",e[e.DalSegnoAlFine=8]="DalSegnoAlFine",e[e.DaCapoAlFine=9]="DaCapoAlFine",e[e.DalSegnoAlCoda=10]="DalSegnoAlCoda",e[e.DaCapoAlCoda=11]="DaCapoAlCoda",e[e.Coda=12]="Coda",e[e.Segno=13]="Segno",e[e.None=14]="None",e))(RepetitionInstructionEnum||{}),AlignmentType=(e=>(e[e.Begin=0]="Begin",e[e.End=1]="End",e))(AlignmentType||{});let prevSourceMeasure=null;class SourceMeasure{constructor(e,t){this.printNewSystemXml=!1,this.printNewPageXml=!1,this.IsSystemStartMeasure=!1,this.hasLyrics=!1,this.hasMoodExpressions=!1,this.allRests=!1,this.isReducedToMultiRest=!1,this.multipleRestMeasureNumber=0,this.staffLinkedExpressions=[],this.tempoExpressions=[],this.verticalSourceStaffEntryContainers=[],this.graphicalMeasureErrors=[],this.firstRepetitionInstructions=[],this.lastRepetitionInstructions=[],this.metronomeNoteIndex=0,this.completeNumberOfStaves=e,this.implicitMeasure=!1,this.hasEndLine=!1,this.endingBarStyleXml="",this.endingBarStyleEnum=SystemLinesEnum.SingleThin,this.firstInstructionsStaffEntries=new Array(e),this.lastInstructionsStaffEntries=new Array(e),this.rules=t,this.TempoInBPM=0;for(let n=0;n1)return e[this.measureListIndex-1]}get Rules(){return this.rules}get VerticalMeasureList(){return this.verticalMeasureList}set VerticalMeasureList(e){this.verticalMeasureList=e}get TempoInBPM(){return this.tempoInBPM}set TempoInBPM(e){this.tempoInBPM=e}findOrCreateStaffEntry(e,t,n){let i,r;for(const s of this.verticalSourceStaffEntryContainers)if(s.Timestamp.Equals(e)){r=s;break}if(r)return r.StaffEntries[t]?i=r.StaffEntries[t]:(i=new SourceStaffEntry(r,n),r.StaffEntries[t]=i),{createdNewContainer:!1,staffEntry:i};const o=this.verticalSourceStaffEntryContainers[this.verticalSourceStaffEntryContainers.length-1];if(0===this.verticalSourceStaffEntryContainers.length||o.Timestamp.lt(e)){const r=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.push(r),i=new SourceStaffEntry(r,n),r.StaffEntries[t]=i}else for(let s=this.verticalSourceStaffEntryContainers.length-1;s>=0;s--){if(this.verticalSourceStaffEntryContainers[s].Timestamp.lt(e)){const r=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(s+1,0,r),i=new SourceStaffEntry(r,n),r.StaffEntries[t]=i;break}if(0===s){const r=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(s,0,r),i=new SourceStaffEntry(r,n),r.StaffEntries[t]=i;break}}return{createdNewContainer:!0,staffEntry:i}}findOrCreateVoiceEntry(e,t){let n,i=!1;for(const r of e.VoiceEntries)if(r.ParentVoice===t){n=r;break}return n||(n=new VoiceEntry(e.Timestamp,t,e),i=!0),{createdVoiceEntry:i,voiceEntry:n}}getPreviousSourceStaffEntryFromIndex(e,t){for(let n=t-1;n>=0;n--)if(this.verticalSourceStaffEntryContainers[n][e])return this.verticalSourceStaffEntryContainers[n][e]}getVerticalContainerIndexByTimestamp(e){for(let t=0,n=this.VerticalSourceStaffEntryContainers.length;t=0;r--){const e=this.verticalSourceStaffEntryContainers[r][n+i];if(void 0!==e&&e.hasTie()&&t.lt(Fraction$1.plus(e.Timestamp,e.calculateMaxNoteLength()))){t=Fraction$1.plus(e.Timestamp,e.calculateMaxNoteLength());break}}}}i.push(t)}for(let r=0,o=i.length;r0)return!0}return!1}beginsWithLineRepetition(){for(let e=0,t=this.FirstRepetitionInstructions.length;e=0&&(t=this.verticalSourceStaffEntryContainers[n].StaffEntries[e],!t);n--);return t}canBeReducedToMultiRest(){var e,t,n,i,r,o,s,a;let l=!0,c=!1;for(const u of this.verticalSourceStaffEntryContainers)if(u)for(const e of u.StaffEntries)if(e&&e.ParentStaff.ParentInstrument.Visible){if(e.ChordContainers.length>0)return!1;if(e.ParentStaff.hasLyrics&&(c=!0),this.firstRepetitionInstructions.length>0||this.lastRepetitionInstructions.length>0)return!1;for(const t of e.VoiceEntries){for(const e of t.Notes)if(!e.isRest()){l=!1;break}if(!l)break}}if(!l||c||this.hasMoodExpressions||this.tempoExpressions.length>0)return!1;for(const u of this.staffLinkedExpressions)if(u.length>0)return!1;for(const u of this.lastInstructionsStaffEntries)for(let e=0,t=null==u?void 0:u.Instructions.length;e=0;t--)for(let n=0;n(e[e.Fingering=0]="Fingering",e[e.String=1]="String",e))(TechnicalInstructionType||{});class TechnicalInstruction{}class PlaybackNote{constructor(e,t){if(this.parentEntry=e,this.parentNote=t,this.ParentNote.PlaybackNote=this,this.Length=this.ParentNote.Length,void 0!==t.Pitch){const e=this.ParentNote.ParentStaff.ParentInstrument.MidiInstrumentId===MidiInstrument.Percussion;this.MidiKey=e?PlaybackNote.noteToMidiDrumKey(t):t.Pitch.getHalfTone()+12}else this.MidiKey=0}setLength(){void 0!==this.ParentNote.NoteTie&&this.ParentNote.NoteTie.StartNote===this.ParentNote&&(this.Length=this.ParentNote.NoteTie.Duration)}get ParentEntry(){return this.parentEntry}get ParentNote(){return this.parentNote}static noteToMidiDrumKey(e){var t;const n=e.Pitch.getHalfTone()-12,i=null===(t=e.Notehead)||void 0===t?void 0:t.Shape;switch(e.Pitch.Octave){case 1:switch(e.Pitch.FundamentalNote){case NoteEnum.D:return 44;case NoteEnum.E:return 35;case NoteEnum.F:return 36;case NoteEnum.G:return 41;case NoteEnum.A:return 43;case NoteEnum.B:return i===NoteHeadShape.TRIANGLE?54:47;default:return n}case 2:switch(e.Pitch.FundamentalNote){case NoteEnum.C:return i===NoteHeadShape.X?37:38;case NoteEnum.D:return i===NoteHeadShape.X?59:48;case NoteEnum.E:switch(i){case NoteHeadShape.X:return 42;case NoteHeadShape.CIRCLEX:return 46;case NoteHeadShape.TRIANGLE:return 56;default:return 50}case NoteEnum.F:return i===NoteHeadShape.DIAMOND?53:51;case NoteEnum.G:switch(i){case NoteHeadShape.CIRCLEX:case NoteHeadShape.DIAMOND:return 46;default:return 42}case NoteEnum.A:return 49;case NoteEnum.B:return 57;default:return n}case 3:return e.Pitch.FundamentalNote===NoteEnum.C?i===NoteHeadShape.CIRCLEX?52:55:n;default:return n}}}class PlaybackEntry{constructor(e){this.notes=[],this.TimestampShift=new Fraction$1,this.parentVoiceEntry=e;for(const t of e.Notes)this.Notes.push(new PlaybackNote(this,t))}get ParentVoiceEntry(){return this.parentVoiceEntry}get Notes(){return this.notes}get Length(){if(this.Notes.length>0)return this.Notes[0].Length}set Length(e){for(const t of this.Notes)t.Length=e}get HasNotes(){return this.Notes.length>0}}class VoiceEntry{constructor(e,t,n,i=!0,r=!1,o=!1,s=!1){if(this.notes=[],this.graceVoiceEntriesBefore=[],this.graceVoiceEntriesAfter=[],this.articulations=[],this.playbackEntries=[],this.technicalInstructions=[],this.lyricsEntries=new Dictionary,this.wantedStemDirection=-1,this.stemDirectionXml=-1,this.stemDirection=-1,this.timestamp=e,this.parentVoice=t,this.parentSourceStaffEntry=n,this.isGrace=r,this.graceAfterMainNote=!1,this.graceNoteSlash=o,this.graceSlur=s,r||t.VoiceEntries.push(this),i&&void 0!==n){const e=n.VoiceEntries;-1===e.indexOf(this)&&e.push(this)}this.mainPlaybackEntry=new PlaybackEntry(this),this.PlaybackEntries.push(this.mainPlaybackEntry)}get ParentSourceStaffEntry(){return this.parentSourceStaffEntry}get ParentVoice(){return this.parentVoice}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get Notes(){return this.notes}addNote(e){this.notes.push(e),e.isRest()||void 0!==e.NoteTie&&e.NoteTie.StartNote!==e||this.MainPlaybackEntry.Notes.push(new PlaybackNote(this.MainPlaybackEntry,e))}get GraceVoiceEntriesBefore(){return this.graceVoiceEntriesBefore}set GraceVoiceEntriesBefore(e){this.graceVoiceEntriesBefore=e;for(const t of this.graceVoiceEntriesBefore)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get GraceVoiceEntriesAfter(){return this.graceVoiceEntriesAfter}set GraceVoiceEntriesAfter(e){this.graceVoiceEntriesAfter=e;for(const t of this.graceVoiceEntriesAfter)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get IsGrace(){return this.isGrace}set IsGrace(e){this.isGrace=e}get GraceAfterMainNote(){return this.graceAfterMainNote}set GraceAfterMainNote(e){this.graceAfterMainNote=e}get GraceNoteSlash(){return this.graceNoteSlash}set GraceNoteSlash(e){this.graceNoteSlash=e}get GraceSlur(){return this.graceSlur}set GraceSlur(e){this.graceSlur=e}get Articulations(){return this.articulations}get PlaybackEntries(){return this.playbackEntries}get Fermata(){return this.fermata}get MainPlaybackEntry(){return this.mainPlaybackEntry}set MainPlaybackEntry(e){this.mainPlaybackEntry=e}removeMainPlaybackEntry(){void 0!==this.mainPlaybackEntry&&this.removePlaybackEntry(this.mainPlaybackEntry)}removePlaybackEntry(e){this.mainPlaybackEntry===e&&(this.mainPlaybackEntry=void 0);const t=this.playbackEntries.indexOf(e);t>-1&&this.playbackEntries.splice(t,1)}get TechnicalInstructions(){return this.technicalInstructions}get LyricsEntries(){return this.lyricsEntries}get Arpeggio(){return this.arpeggio}set Arpeggio(e){this.arpeggio=e}get OrnamentContainer(){return this.ornamentContainer}set OrnamentContainer(e){this.ornamentContainer=e}set WantedStemDirection(e){this.wantedStemDirection=e}get WantedStemDirection(){return this.wantedStemDirection}set StemDirectionXml(e){this.stemDirectionXml=e}get StemDirectionXml(){return this.stemDirectionXml}set StemDirection(e){this.stemDirection=e}get StemDirection(){return this.stemDirection}get StemColorXml(){return this.stemColorXml}set StemColorXml(e){this.stemColorXml=e}get StemColor(){return this.stemColor}set StemColor(e){this.stemColor=e}get VolumeModifier(){return this.volumeModifier}set VolumeModifier(e){this.volumeModifier=e}get DurationModifier(){return this.durationModifier}set DurationModifier(e){this.durationModifier=e}hasArticulation(e){for(const t of this.articulations)if(t.Equals(e))return!0;return!1}static isSupportedArticulation(e){switch(e){case 0:case 1:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 26:case 24:return!0;default:return!1}}hasTie(){for(let e=0,t=this.Notes.length;e0)return!0}return!1}isStaccato(){for(const e of this.Articulations)if(5===e.articulationEnum)return!0;return!1}isAccent(){for(const e of this.Articulations)if(0===e.articulationEnum||1===e.articulationEnum)return!0;return!1}getVerseNumberForLyricEntry(e){let t=1;return this.lyricsEntries.forEach(((n,i)=>{e===i&&(t=n)})),t}}var ArticulationEnum=(e=>(e[e.accent=0]="accent",e[e.strongaccent=1]="strongaccent",e[e.marcatoup=2]="marcatoup",e[e.marcatodown=3]="marcatodown",e[e.invertedstrongaccent=4]="invertedstrongaccent",e[e.staccato=5]="staccato",e[e.staccatissimo=6]="staccatissimo",e[e.spiccato=7]="spiccato",e[e.tenuto=8]="tenuto",e[e.fermata=9]="fermata",e[e.invertedfermata=10]="invertedfermata",e[e.breathmark=11]="breathmark",e[e.caesura=12]="caesura",e[e.lefthandpizzicato=13]="lefthandpizzicato",e[e.naturalharmonic=14]="naturalharmonic",e[e.snappizzicato=15]="snappizzicato",e[e.upbow=16]="upbow",e[e.downbow=17]="downbow",e[e.scoop=18]="scoop",e[e.plop=19]="plop",e[e.doit=20]="doit",e[e.falloff=21]="falloff",e[e.stress=22]="stress",e[e.unstress=23]="unstress",e[e.detachedlegato=24]="detachedlegato",e[e.otherarticulation=25]="otherarticulation",e[e.bend=26]="bend",e))(ArticulationEnum||{}),StemDirectionType=(e=>(e[e.Undefined=-1]="Undefined",e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.None=2]="None",e[e.Double=3]="Double",e))(StemDirectionType||{}),SystemLinePosition=(e=>(e[e.MeasureBegin=0]="MeasureBegin",e[e.MeasureEnd=1]="MeasureEnd",e))(SystemLinePosition||{});class GraphicalLabel extends Clickable{constructor(e,t,n,i,r=undefined){super(),this.label=e,this.boundingBox=new BoundingBox$1(this,r),this.label.fontHeight=t,this.label.textAlignment=n,this.rules=i,this.rules.MpatMode&&"TRIO"===this.label.text&&(this.label.fontFamily="Arial")}get Label(){return this.label}toString(){return`${this.label.text} (${this.boundingBox.RelativePosition.x},${this.boundingBox.RelativePosition.y})`}setLabelPositionAndShapeBorders(){var e,t;if(""===this.Label.text.trim())return;this.TextLines=[];const n=null!==(e=null===(t=this.rules)||void 0===t?void 0:t.LabelMarginBorderFactor)&&void 0!==e?e:.1,i=this.Label.text.split(/[\n\r]+/g),r=i.length;let o=0;for(let l=0;l0&&this.TextLines.length>1&&(s+=this.rules.SpacingBetweenTextLines*r/10);const a=this.PositionAndShape;switch(this.Label.textAlignment){case TextAlignmentEnum.CenterBottom:a.BorderTop=-s,a.BorderLeft=-o/2,a.BorderBottom=0,a.BorderRight=o/2;break;case TextAlignmentEnum.CenterCenter:a.BorderTop=-s/2,a.BorderLeft=-o/2,a.BorderBottom=s/2,a.BorderRight=o/2;break;case TextAlignmentEnum.CenterTop:a.BorderTop=0,a.BorderLeft=-o/2,a.BorderBottom=s,a.BorderRight=o/2;break;case TextAlignmentEnum.LeftBottom:a.BorderTop=-s,a.BorderLeft=0,a.BorderBottom=0,a.BorderRight=o;break;case TextAlignmentEnum.LeftCenter:a.BorderTop=-s/2,a.BorderLeft=0,a.BorderBottom=s/2,a.BorderRight=o;break;case TextAlignmentEnum.LeftTop:a.BorderTop=0,a.BorderLeft=0,a.BorderBottom=s,a.BorderRight=o;break;case TextAlignmentEnum.RightBottom:a.BorderTop=-s,a.BorderLeft=-o,a.BorderBottom=0,a.BorderRight=0;break;case TextAlignmentEnum.RightCenter:a.BorderTop=-s/2,a.BorderLeft=-o,a.BorderBottom=s/2,a.BorderRight=0;break;case TextAlignmentEnum.RightTop:a.BorderTop=0,a.BorderLeft=-o,a.BorderBottom=s,a.BorderRight=0}a.BorderMarginTop=a.BorderTop-s*n,a.BorderMarginLeft=a.BorderLeft-s*n,a.BorderMarginBottom=a.BorderBottom+s*n,a.BorderMarginRight=a.BorderRight+s*n}}class Label{constructor(e="",t=TextAlignmentEnum.CenterBottom,n=undefined,i=!0){this.IsCreditLabel=!1,this.text=e,this.print=i,this.textAlignment=t,this.font=n,this.fontFamily=void 0}set font(e){this.fontEnumValue=e,this.fontFamily=FontStringNames[e]}get font(){return this.fontEnumValue}ToString(){return this.text}}const SpeedTag={Grava:40,Largo:46,Lento:52,Adagio:56,Larghetto:60,Andante:66,Anderato:69,Andantino:69,Moderato:88,Allegretto:108,"Allegro Moderato":108,Allegro:132,Vivace:152,Vivo:160,Vivacissimo:168,Presto:184,Prestissimo:208},SpecialMarks=["纯律","纯律结束"],HideWords=["跳过下一个","b","#","§","º","X"],GradientWords=["poco rit.","rall.","rit.","accel.","molto rit.","molto rall","lentando","poco accel.","calando"],GRADIENT_SPEED_CLOSE_TAG="结束范围速度",GRADIENT_SPEED_RESET_TAG="a tempo",SpecialWords=[GRADIENT_SPEED_CLOSE_TAG],SpeedKeyword="速度 ",SpeedHiddenKeyword="仅文本速度 ";function isSpeedKeyword(e){return 0===e.indexOf(SpeedKeyword)}function isSpeedHiddenKeyword(e){return 0===e.indexOf(SpeedHiddenKeyword)}function formatSpeedKeyword(e){return e.replace(SpeedHiddenKeyword,"").replace(SpeedKeyword,"")}function isGradientWords(e){return GradientWords.includes(e)}function isSpecialMark(e){return[...Object.keys(SpeedTag),...SpecialMarks,...SpecialWords,...HideWords].map((e=>e.trim().toLocaleUpperCase())).includes(e.toLocaleUpperCase().trim())}function isTopFont(e){return[TextAlignmentEnum.CenterTop,TextAlignmentEnum.RightTop].includes(e)}var MusicSymbol=(e=>(e[e.Unused_first_Symbol=0]="Unused_first_Symbol",e[e.BLACK_HEAD=1]="BLACK_HEAD",e[e.UPWARDS_TAIL=2]="UPWARDS_TAIL",e[e.DOWNWARDS_TAIL=3]="DOWNWARDS_TAIL",e[e.UPWARDS_DOUBLE_TAIL=4]="UPWARDS_DOUBLE_TAIL",e[e.DOWNWARDS_DOUBLE_TAIL=5]="DOWNWARDS_DOUBLE_TAIL",e[e.UPWARDS_TRIPLE_TAIL=6]="UPWARDS_TRIPLE_TAIL",e[e.DOWNWARDS_TRIPLE_TAIL=7]="DOWNWARDS_TRIPLE_TAIL",e[e.UPWARDS_QUAD_TAIL=8]="UPWARDS_QUAD_TAIL",e[e.DOWNWARDS_QUAD_TAIL=9]="DOWNWARDS_QUAD_TAIL",e[e.ROUND_HEAD=10]="ROUND_HEAD",e[e.WHITE_HEAD=11]="WHITE_HEAD",e[e.G_CLEF=12]="G_CLEF",e[e.F_CLEF=13]="F_CLEF",e[e.C_CLEF=14]="C_CLEF",e[e.BREVE=15]="BREVE",e[e.BREVE_REST=16]="BREVE_REST",e[e.COMMON_TIME=17]="COMMON_TIME",e[e.CUT_TIME=18]="CUT_TIME",e[e.WHOLE_REST=19]="WHOLE_REST",e[e.HALF_REST=20]="HALF_REST",e[e.QUARTER_REST=21]="QUARTER_REST",e[e.EIGHTH_REST=22]="EIGHTH_REST",e[e.SIXTEENTH_REST=23]="SIXTEENTH_REST",e[e.THIRTYSECOND_REST=24]="THIRTYSECOND_REST",e[e.SIXTYFOURTH_REST=25]="SIXTYFOURTH_REST",e[e.FLAT=26]="FLAT",e[e.SHARP=27]="SHARP",e[e.NATURAL=28]="NATURAL",e[e.DOUBLE_FLAT=29]="DOUBLE_FLAT",e[e.DOUBLE_SHARP=30]="DOUBLE_SHARP",e[e.ZERO=31]="ZERO",e[e.ONE=32]="ONE",e[e.TWO=33]="TWO",e[e.THREE=34]="THREE",e[e.FOUR=35]="FOUR",e[e.FIVE=36]="FIVE",e[e.SIX=37]="SIX",e[e.SEVEN=38]="SEVEN",e[e.EIGHT=39]="EIGHT",e[e.NINE=40]="NINE",e[e.DOT=41]="DOT",e[e.FERMATA=42]="FERMATA",e[e.INVERTED_FERMATA=43]="INVERTED_FERMATA",e[e.SPICCATO=44]="SPICCATO",e[e.TENUTO=45]="TENUTO",e[e.MARCATO=46]="MARCATO",e[e.MARCATISSIMO=47]="MARCATISSIMO",e[e.INVERTED_MARCATISSIMO=48]="INVERTED_MARCATISSIMO",e[e.P=49]="P",e[e.F=50]="F",e[e.S=51]="S",e[e.Z=52]="Z",e[e.M=53]="M",e[e.R=54]="R",e[e.SEGNO=55]="SEGNO",e[e.CODA=56]="CODA",e[e.DRUM_CLEF=57]="DRUM_CLEF",e[e.G_CLEF_SUB8=58]="G_CLEF_SUB8",e[e.G_CLEF_SUPER8=59]="G_CLEF_SUPER8",e[e.G_CLEF_SUB15=60]="G_CLEF_SUB15",e[e.G_CLEF_SUPER15=61]="G_CLEF_SUPER15",e[e.F_CLEF_SUB8=62]="F_CLEF_SUB8",e[e.F_CLEF_SUPER8=63]="F_CLEF_SUPER8",e[e.F_CLEF_SUB15=64]="F_CLEF_SUB15",e[e.F_CLEF_SUPER15=65]="F_CLEF_SUPER15",e[e.DOWN_BOW=66]="DOWN_BOW",e[e.MORDENT=67]="MORDENT",e[e.INVERTED_MORDENT=68]="INVERTED_MORDENT",e[e.TURN=69]="TURN",e[e.INVERTED_TURN=70]="INVERTED_TURN",e[e.LEFTHAND_PIZZICATO=71]="LEFTHAND_PIZZICATO",e[e.RELEASE_PED=72]="RELEASE_PED",e[e.ENGAGE_PED=73]="ENGAGE_PED",e[e.VA8=74]="VA8",e[e.VB8=75]="VB8",e[e.TRILL=76]="TRILL",e[e.MA15=77]="MA15",e[e.MB15=78]="MB15",e[e.HIGH=79]="HIGH",e[e.PLAY=80]="PLAY",e[e.MIC=81]="MIC",e[e.SNAP_PIZZICATO=82]="SNAP_PIZZICATO",e[e.NATURAL_HARMONIC=83]="NATURAL_HARMONIC",e[e.EditPen=84]="EditPen",e[e.PEDAL_BRACKET=85]="PEDAL_BRACKET",e[e.PEDAL_MIXED=86]="PEDAL_MIXED",e[e.PEDAL_SYMBOL=87]="PEDAL_SYMBOL",e))(MusicSymbol||{}),MusicSymbolDrawingStyle=(e=>(e[e.Normal=0]="Normal",e[e.Disabled=1]="Disabled",e[e.Selected=2]="Selected",e[e.Clickable=3]="Clickable",e[e.PlaybackSymbols=4]="PlaybackSymbols",e[e.FollowSymbols=5]="FollowSymbols",e[e.QFeedbackNotFound=6]="QFeedbackNotFound",e[e.QFeedbackOk=7]="QFeedbackOk",e[e.QFeedbackPerfect=8]="QFeedbackPerfect",e[e.Debug1=9]="Debug1",e[e.Debug2=10]="Debug2",e[e.Debug3=11]="Debug3",e))(MusicSymbolDrawingStyle||{}),PhonicScoreModes=(e=>(e[e.Following=0]="Following",e[e.Midi=1]="Midi",e[e.Manual=2]="Manual",e))(PhonicScoreModes||{});class LabelRenderSpecs{}class MusicSheetDrawer{constructor(e,t){this.drawableBoundingBoxElement="None",this.skyLineVisible=!1,this.bottomLineVisible=!1,this.phonicScoreMode=PhonicScoreModes.Manual,this.textMeasurer=e,this.splitScreenLineColor=-1,this.drawingParameters=t,this.rules=t.Rules}set Mode(e){this.phonicScoreMode=e}drawSheet(e){if(this.graphicalMusicSheet=e,this.rules=e.ParentMusicSheet.Rules,this.drawSplitScreenLine(),this.drawingParameters.drawCursors)for(const n of e.Cursors){if(!n)continue;const e=new BoundingBox$1(n);e.AbsolutePosition=n.Start,e.BorderBottom=n.End.y-n.Start.y,e.BorderRight=n.Width/2,e.BorderLeft=-n.Width/2,this.isVisible(e)&&this.drawLineAsVerticalRectangle(n,GraphicalLayers.Cursor)}this.drawingParameters.drawScrollIndicator&&this.drawScrollIndicator();const t=Math.min(this.graphicalMusicSheet.MusicPages.length,this.rules.MaxPageToDrawNumber);for(let n=0;ne[0])).filter(Boolean))||[],n=[];let r=!1;for(let o=0;oe.x-t.x)))||void 0===p||null===(f=p[0])||void 0===f?void 0:f.measure;break}}}catch(_){console.log("🚀 ~ error",_)}let r=0;if(i){var b;r=(null===(b=i.stave)||void 0===b?void 0:b.end_x)||0}else{var A;r=(null===(A=o.sourceNote.SourceMeasure.VerticalMeasureList[0])||void 0===A?void 0:A.getVFStave()).end_x}const s=0;a.ScreenPosition.x=r,a.ScreenPosition.y=0===t?10*(e.PositionAndShape.Parent.AbsolutePosition.y-3-s):10*t}const y=["C","G","D","A","E","B","F#","C#","G#","F","Bb","Eb","Ab","Db","Gb","Cb","Fb","D#","A#","E#"];y.includes(s.text)&&(a.ScreenPosition.y=10*(e.PositionAndShape.Parent.AbsolutePosition.y+e.PositionAndShape.Parent.BorderTop+e.PositionAndShape.Parent.BorderMarginTop)),["play","listen"].includes(s.text.toLocaleLowerCase())&&s.textAlignment===TextAlignmentEnum.LeftBottom&&(a.ScreenPosition.y=10*(e.PositionAndShape.Parent.AbsolutePosition.y-1+e.PositionAndShape.Parent.BorderBottom));const S=["ffp","p-f","sfzp","szf","sffzp"];for(let M=0;M0&&(isTopFont(e.Label.textAlignment)||[TextAlignmentEnum.CenterBottom].includes(e.Label.textAlignment))){let t=-1,n=!1;for(const i of(null==c?void 0:c.AbstractExpressions)||[]){var w,E;if(i.Label===e)t=null==i||null===(E=i.parentMeasure)||void 0===E?void 0:E.measureListIndex;else null!==(w=i.expression)&&void 0!==w&&w.TempoInBpm&&(n=i.expression.TempoInBpm>0);if(n&&t>-1){a.ScreenPosition.y-=40;break}}}"jianpu"===this.rules.DYMusicScoreType?isNaN(parseInt(e.Label.text,10))&&this.renderLabel(e,t,a):this.renderLabel(e,t,a)}calculateLabel(e){const t=new LabelRenderSpecs,n=e.Label,i=new BoundingBox$1(this);i.AbsolutePosition.x=e.PositionAndShape.AbsolutePosition.x,i.AbsolutePosition.y=e.PositionAndShape.AbsolutePosition.y||e.PositionAndShape.Parent.AbsolutePosition.y,t.ScreenPosition=this.applyScreenTransformation(i.AbsolutePosition),t.FontHeightInPixel=this.calculatePixelDistance(n.fontHeight);const r=this.calculatePixelDistance(e.PositionAndShape.Size.width);switch(t.BitmapWidth=Math.ceil(r),t.BitmapHeight=e.TextLines?Math.ceil(t.FontHeightInPixel*(.2+e.TextLines.length)):10,n.textAlignment){case TextAlignmentEnum.LeftTop:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y+=1.5*t.BitmapHeight;break;case TextAlignmentEnum.LeftCenter:t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.LeftBottom:t.ScreenPosition.y-=t.BitmapHeight;break;case TextAlignmentEnum.CenterTop:t.ScreenPosition.x-=t.BitmapWidth/2;break;case TextAlignmentEnum.CenterCenter:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.CenterBottom:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y-=t.BitmapHeight;break;case TextAlignmentEnum.RightTop:t.ScreenPosition.x-=t.BitmapWidth;break;case TextAlignmentEnum.RightCenter:t.ScreenPosition.x-=t.BitmapWidth,t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.RightBottom:t.ScreenPosition.x-=t.BitmapWidth,t.ScreenPosition.y-=t.BitmapHeight;break;default:throw new ArgumentOutOfRangeException("")}return t}applyScreenTransformations(e){const t=[];for(const n of e)t.push(this.applyScreenTransformation(n));return t}drawSplitScreenLine(){}renderRectangle(e,t,n,i=undefined,r=1){throw new Error("not implemented")}drawScrollIndicator(){}drawSelectionStartSymbol(e){}drawSelectionEndSymbol(e){}renderLabel(e,t,n){throw new Error("not implemented")}renderSystemToScreen(e,t,n){}drawSkyLine(e){}drawBottomLine(e){}drawInstrumentBrace(e,t){}drawGroupBracket(e,t){}isVisible(e){return!0}drawMusicSystem(e){const t=this.getSystemAbsBoundingRect(e),n=this.getSytemBoundingBoxInPixels(t);this.drawMusicSystemComponents(e,n,t)}getSytemBoundingBoxInPixels(e){const t=this.applyScreenTransformationForRect(e);return t.x=Math.round(t.x),t.y=Math.round(t.y),t}getSystemAbsBoundingRect(e){const t=e.PositionAndShape.BoundingRectangle;return new RectangleF2D(e.PositionAndShape.AbsolutePosition.x+e.PositionAndShape.BorderLeft-1,e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderTop-1,t.width+6,t.height+2)}drawMusicSystemComponents(e,t,n){const i=this.graphicalMusicSheet.SelectionStartSymbol,r=this.graphicalMusicSheet.SelectionEndSymbol;this.drawingParameters.drawSelectionStartSymbol&&void 0!==i&&this.isVisible(i.PositionAndShape)&&this.drawSelectionStartSymbol(i),this.drawingParameters.drawSelectionEndSymbol&&void 0!==r&&this.isVisible(r.PositionAndShape)&&this.drawSelectionEndSymbol(r);for(const a of e.StaffLines)this.drawStaffLine(a),this.rules.RenderLyrics&&(a.LyricsDashes.length>0&&this.drawDashes(a.LyricsDashes),a.LyricLines.length>0&&this.drawLyricLines(a.LyricLines,a));for(const a of e.SystemLines)this.drawSystemLineObject(a);if(e.Parent===e.Parent.Parent.MusicPages[0])for(const a of e.Labels)a.SVGNode=this.drawLabel(a,GraphicalLayers.Notes);const o=this.graphicalMusicSheet.ParentMusicSheet.Instruments,s=o.filter((e=>e.Visible)).length;for(const a of e.InstrumentBrackets)this.drawInstrumentBrace(a,e);if(o.length>0)if(s>1)for(const a of e.GroupBrackets)this.drawGroupBracket(a,e);else for(const a of e.GroupBrackets)a.Visible=!1;if(!this.leadSheet)for(const a of e.MeasureNumberLabels)a.SVGNode=this.drawLabel(a,GraphicalLayers.Notes);for(const a of e.StaffLines)this.drawStaffLineSymbols(a);this.drawingParameters.drawMarkedAreas&&this.drawMarkedAreas(e)}activateSystemRendering(e,t,n,i){return!0}drawSystemLineObject(e){}drawStaffLine(e){for(const t of e.Measures)this.drawMeasure(t);this.rules.RenderLyrics&&e.LyricsDashes.length>0&&this.drawDashes(e.LyricsDashes),this.drawOctaveShifts(e),this.drawPedals(e),this.drawWavyLines(e),this.drawExpressions(e),this.skyLineVisible&&this.drawSkyLine(e),this.bottomLineVisible&&this.drawBottomLine(e)}drawLyricLines(e,t){t.LyricLines.forEach((e=>{e.Start.y+=t.PositionAndShape.AbsolutePosition.y,e.End.y+=t.PositionAndShape.AbsolutePosition.y,e.Start.x+=t.PositionAndShape.AbsolutePosition.x,e.End.x+=t.PositionAndShape.AbsolutePosition.x,this.drawGraphicalLine(e,this.rules.LyricUnderscoreLineWidth)}))}drawExpressions(e){}drawGraphicalLine(e,t,n="black"){return this.drawLine(e.Start,e.End,n,t)}drawLine(e,t,n="#FF0000FF",i){}drawDashes(e){e.forEach((e=>e.SVGNode=this.drawLabel(e,GraphicalLayers.Notes)))}drawOctaveShifts(e){}drawStaffLines(e){if(e.StaffLines){const t=e.PositionAndShape.AbsolutePosition;for(let n=0;n<5;n++)this.drawLineAsHorizontalRectangleWithOffset(e.StaffLines[n],t,GraphicalLayers.Notes)}}drawSymbol(e,t,n,i=1,r=GraphicalLayers.Notes){}get leadSheet(){return this.graphicalMusicSheet.LeadSheet}set leadSheet(e){this.graphicalMusicSheet.LeadSheet=e}drawPage(e){if(this.isVisible(e.PositionAndShape)){for(const t of e.MusicSystems)this.isVisible(t.PositionAndShape)&&this.drawMusicSystem(t);if(e===e.Parent.MusicPages[0])for(const t of e.Labels)t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes);this.drawableBoundingBoxElement&&this.drawBoundingBoxes(e.PositionAndShape,0,this.drawableBoundingBoxElement)}}drawBoundingBoxes(e,t=0,n="all"){const i=e.DataObject.constructor.name;let r=!1;"all"===n&&(r=!0),(r||i===n)&&this.drawBoundingBox(e,void 0,!0,i,t),t++,e.ChildElements.forEach((e=>this.drawBoundingBoxes(e,t,n)))}drawBoundingBox(e,t=undefined,n=!1,i=undefined,r=0){let o=new RectangleF2D(e.AbsolutePosition.x+e.BorderMarginLeft,e.AbsolutePosition.y+e.BorderMarginTop,e.BorderMarginRight-e.BorderMarginLeft,e.BorderMarginBottom-e.BorderMarginTop);n&&(this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(e.AbsolutePosition.x-1,e.AbsolutePosition.y),new PointF2D(e.AbsolutePosition.x+1,e.AbsolutePosition.y),.1,OutlineAndFillStyleEnum.BaseWritingColor,t),r-1),this.drawLineAsVerticalRectangle(new GraphicalLine(new PointF2D(e.AbsolutePosition.x,e.AbsolutePosition.y-1),new PointF2D(e.AbsolutePosition.x,e.AbsolutePosition.y+1),.1,OutlineAndFillStyleEnum.BaseWritingColor,t),r-1)),o=this.applyScreenTransformationForRect(o);const s=this.renderRectangle(o,GraphicalLayers.Background,r,t,.5);if(i){const e=new Label(i),t=new LabelRenderSpecs;t.BitmapWidth=o.width,t.BitmapHeight=o.height,t.FontHeightInPixel=o.height,t.ScreenPosition=new PointF2D(o.x,o.y+12),this.renderLabel(new GraphicalLabel(e,.8,TextAlignmentEnum.CenterCenter,this.rules),r,t)}return s}drawMarkedAreas(e){for(const t of e.GraphicalMarkedAreas)t&&(t.systemRectangle&&this.drawRectangle(t.systemRectangle,GraphicalLayers.Background),t.settings&&(t.settings.SVGNode=this.drawLabel(t.settings,GraphicalLayers.Comment)),t.labelRectangle&&this.drawRectangle(t.labelRectangle,GraphicalLayers.Background),t.label&&(t.label.SVGNode=this.drawLabel(t.label,GraphicalLayers.Comment)))}drawStaffLineSymbols(e){const t=e.ParentStaff.ParentInstrument,n=e.PositionAndShape.AbsolutePosition.x,i=e.PositionAndShape.AbsolutePosition.y+2,r=e.PositionAndShape.BorderRight;t.highlight&&this.drawingParameters.drawHighlights&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(n,i),new PointF2D(n+r,i),4,OutlineAndFillStyleEnum.Highlighted),GraphicalLayers.Highlight);let o=MusicSymbolDrawingStyle.Disabled,s=MusicSymbol.PLAY,a=this.drawingParameters.drawActivitySymbols;switch(this.phonicScoreMode){case PhonicScoreModes.Midi:s=MusicSymbol.PLAY,this.midiPlaybackAvailable&&e.ParentStaff.audible&&(o=MusicSymbolDrawingStyle.PlaybackSymbols);break;case PhonicScoreModes.Following:s=MusicSymbol.MIC,e.ParentStaff.following&&(o=MusicSymbolDrawingStyle.FollowSymbols);break;default:a=!1}if(a){const e=new PointF2D(n+r+2,i);this.drawSymbol(s,o,e)}if(this.drawingParameters.drawErrors)for(const l of e.Measures){const e=l.PositionAndShape,t=e.AbsolutePosition.x,n=e.AbsolutePosition.y+2;l.hasError&&this.graphicalMusicSheet.ParentMusicSheet.DrawErroneousMeasures&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(t,n),new PointF2D(t+e.BorderRight,n),4,OutlineAndFillStyleEnum.ErrorUnderlay),GraphicalLayers.MeasureError)}}}class VexFlowTextMeasurer{constructor(e){this.fontSize=20,this.fontSizeStandard=this.fontSize;const t=document.createElement("canvas");this.context=t.getContext("2d"),this.rules=e}computeTextWidthToHeightRatio(e,t,n,i=undefined,r=this.fontSize){return this.context.font=VexFlowConverter.font(r,n,t,this.rules,i),this.context.measureText(e).width/r}setFontSize(e=this.fontSizeStandard){return this.fontSize=e,e}}class AbstractGraphicalExpression extends GraphicalObject{constructor(e,t,n){super(),this.expression=t,this.parentMeasure=n,this.boundingBox=new BoundingBox$1(this,e.PositionAndShape),this.parentStaffLine=e,this.parentStaffLine.AbstractExpressions.push(this),this.rules=e.ParentMusicSystem.rules}get Label(){return this.label}get ParentStaffLine(){return this.parentStaffLine}get SourceExpression(){return this.expression}get Placement(){return this.expression.Placement}}class GraphicalInstantaneousTempoExpression extends AbstractGraphicalExpression{constructor(e,t){super(t.PositionAndShape.Parent.DataObject,e,e.parentMeasure),this.label=t}get GraphicalLabel(){return this.label}updateSkyBottomLine(){}}class GraphicalInstantaneousDynamicExpression extends AbstractGraphicalExpression{constructor(e,t,n){super(t,e,n.parentSourceMeasure),this.mInstantaneousDynamicExpression=e,this.mMeasure=n}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,t=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginLeft,n=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginRight;let i=0;switch(this.Placement){case PlacementEnum.Above:i=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginTop,e.updateSkyLineInRange(t,n,i);break;case PlacementEnum.Below:i=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginBottom,e.updateBottomLineInRange(t,n,i);break;default:loglevelExports.error("Placement for GraphicalInstantaneousDynamicExpression is unknown")}}}class GraphicalContinuousDynamicExpression extends AbstractGraphicalExpression{constructor(e,t,n){super(t,e,n),this.lines=[],this.isSplittedPart=!1,this.notToBeRemoved=!1}get StartMeasure(){return this.startMeasure}set StartMeasure(e){this.startMeasure=e}get EndMeasure(){return this.endMeasure}set EndMeasure(e){this.endMeasure=e}get EndStaffLine(){return this.endMeasure?this.endMeasure.ParentStaffLine:void 0}get IsSplittedPart(){return this.isSplittedPart}set IsSplittedPart(e){this.isSplittedPart=e}get IsVerbal(){return this.ContinuousDynamic.Label&&this.ContinuousDynamic.Label.length>0}get NotToBeRemoved(){return this.notToBeRemoved}set NotToBeRemoved(e){this.notToBeRemoved=e}get Lines(){return this.lines}get ContinuousDynamic(){return this.SourceExpression}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,t=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft:0,n=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight:0;var i;(!this.IsVerbal&&this.lines.length<2&&loglevelExports.warn("Not enough lines for SkyBottomLine calculation"),this.IsVerbal)||this.ContinuousDynamic.DynamicType!==ContDynamicEnum.crescendo&&this.ContinuousDynamic.DynamicType!==ContDynamicEnum.diminuendo&&loglevelExports.warn("GraphicalContinuousDynamicExpression.updateSkyBottomLine(): unhandled continuous dynamic type. start measure: "+(null===(i=this.startMeasure)||void 0===i?void 0:i.MeasureNumber));switch(this.Placement){case PlacementEnum.Above:if(this.IsVerbal){const i=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(t,n,i)}else this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?e.updateSkyLineWithWedge(this.lines[0].Start,this.lines[0].End):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&e.updateSkyLineWithWedge(this.lines[0].End,this.lines[0].Start);break;case PlacementEnum.Below:if(this.IsVerbal){const i=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(t,n,i)}else this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?e.updateBottomLineWithWedge(this.lines[1].Start,this.lines[1].End):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&e.updateBottomLineWithWedge(this.lines[1].End,this.lines[1].Start);break;default:loglevelExports.error("Placement for GraphicalContinuousDynamicExpression is unknown")}}createCrescendoLines(e,t,n,i=this.rules.WedgeOpeningLength,r=this.rules.WedgeLineWidth){const o=new PointF2D(e,n),s=new PointF2D(t,n-i/2),a=new PointF2D(t,n+i/2);this.addWedgeLines(o,s,a,r)}createFirstHalfCrescendoLines(e,t,n,i=this.rules.WedgeMeasureEndOpeningLength,r=this.rules.WedgeLineWidth){const o=new PointF2D(e,n),s=new PointF2D(t,n-i/2),a=new PointF2D(t,n+i/2);this.addWedgeLines(o,s,a,r)}createSecondHalfCrescendoLines(e,t,n,i=this.rules.WedgeMeasureBeginOpeningLength,r=this.rules.WedgeOpeningLength,o=this.rules.WedgeLineWidth){const s=new PointF2D(e,n-i/2),a=new PointF2D(e,n+i/2),l=new PointF2D(t,n-r/2),c=new PointF2D(t,n+r/2);this.addDoubleLines(s,l,a,c,o)}recalculateCrescendoLines(e,t,n){const i=Math.abs(this.lines[0].Start.y-this.lines[1].Start.y)>1e-4;this.lines.clear(),i?this.createSecondHalfCrescendoLines(e,t,n):this.isSplittedPart?this.createFirstHalfCrescendoLines(e,t,n):this.createCrescendoLines(e,t,n)}createDiminuendoLines(e,t,n,i=this.rules.WedgeOpeningLength,r=this.rules.WedgeLineWidth){const o=new PointF2D(e,n-i/2),s=new PointF2D(e,n+i/2),a=new PointF2D(t,n);this.addWedgeLines(a,o,s,r)}createFirstHalfDiminuendoLines(e,t,n,i=this.rules.WedgeOpeningLength,r=this.rules.WedgeMeasureEndOpeningLength,o=this.rules.WedgeLineWidth){const s=new PointF2D(e,n-i/2),a=new PointF2D(e,n+i/2),l=new PointF2D(t,n-r/2),c=new PointF2D(t,n+r/2);this.addDoubleLines(s,l,a,c,o)}createSecondHalfDiminuendoLines(e,t,n,i=this.rules.WedgeMeasureBeginOpeningLength,r=this.rules.WedgeLineWidth){const o=new PointF2D(e,n-i/2),s=new PointF2D(e,n+i/2),a=new PointF2D(t,n);this.addWedgeLines(a,o,s,r)}recalculateDiminuendoLines(e,t,n){const i=Math.abs(this.lines[0].End.y-this.lines[1].End.y)>1e-4;this.lines.clear(),i?this.createFirstHalfDiminuendoLines(e,t,n):this.isSplittedPart?this.createSecondHalfDiminuendoLines(e,t,n):this.createDiminuendoLines(e,t,n)}calcPsi(){this.IsVerbal?this.PositionAndShape.calculateBoundingBox():(this.PositionAndShape.RelativePosition=this.lines[0].Start,this.PositionAndShape.BorderMarginTop=this.lines[0].End.y-this.lines[0].Start.y,this.PositionAndShape.BorderMarginBottom=this.lines[1].End.y-this.lines[1].Start.y,this.PositionAndShape.Center.y=(this.PositionAndShape.BorderMarginTop+this.PositionAndShape.BorderMarginBottom)/2,this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?(this.PositionAndShape.BorderMarginLeft=0,this.PositionAndShape.BorderMarginRight=this.lines[0].End.x-this.lines[0].Start.x):(this.PositionAndShape.BorderMarginLeft=this.lines[0].End.x-this.lines[0].Start.x,this.PositionAndShape.BorderMarginRight=0))}cleanUp(){this.lines.clear()}shiftYPosition(e){this.IsVerbal?(this.PositionAndShape.RelativePosition.y+=e,this.PositionAndShape.calculateBoundingBox()):(this.lines[0].Start.y+=e,this.lines[0].End.y+=e,this.lines[1].End.y+=e)}squeeze(e){if(this.IsVerbal)return;Math.abs(this.lines[0].End.x-this.lines[0].Start.x)0?this.lines[0].Start.x+=e:(this.lines[0].End.x+=e,this.lines[1].End.x+=e):e<0?this.lines[0].Start.x+=e:(this.lines[0].End.x+=e,this.lines[1].End.x+=e),this.calcPsi())}addWedgeLines(e,t,n,i){const r=new GraphicalLine(e,t,i),o=new GraphicalLine(e,n,i);this.lines.push(r),this.lines.push(o)}addDoubleLines(e,t,n,i,r){const o=new GraphicalLine(e,t,r),s=new GraphicalLine(n,i,r);this.lines.push(o),this.lines.push(s)}}class GraphicalUnknownExpression extends AbstractGraphicalExpression{constructor(e,t,n,i,r=undefined){super(e,new AbstractExpression(n),i),this.label=t,this.sourceMultiExpression=r}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,t=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft,n=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight;switch(this.Placement){case PlacementEnum.Above:const i=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(t,n,i);break;case PlacementEnum.Below:const r=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(t,n,r);break;default:loglevelExports.error("Placement for GraphicalUnknownExpression is unknown")}}}const unitInPixels=10;class VexFlowMusicSheetDrawer extends MusicSheetDrawer{constructor(e=new DrawingParameters){super(new VexFlowTextMeasurer(e.Rules),e),this.backends=[],this.zoom=1,this.pageIdx=0,this.getDotId=(e,t)=>t?String(e.Label.PositionAndShape.RelativePosition[t]):String(e.Label.PositionAndShape.RelativePosition.x)+String(e.Label.PositionAndShape.RelativePosition.y),this.hasDot=(e,t,n,i)=>{const r=t||Object.values(i);for(const o of r){if(n)return e.x===o.x&&e.y===o.y;if(e.x===o.x)return!0}return!1}}get Zoom(){return this.zoom}get Backends(){return this.backends}initializeBackendForPage(e){this.backend=this.backends[e.PageNumber-1]}drawSheet(e){var t,n,i;"gonville"===this.rules.DefaultVexFlowNoteFont&&(Vex.Flow.DEFAULT_FONT_STACK=[null===(t=Vex.Flow.Fonts)||void 0===t?void 0:t.Gonville,null===(n=Vex.Flow.Fonts)||void 0===n?void 0:n.Bravura,null===(i=Vex.Flow.Fonts)||void 0===i?void 0:i.Custom]);Vex.Flow.STAVE_LINE_THICKNESS=this.rules.StaffLineWidth*unitInPixels,Vex.Flow.STEM_WIDTH=this.rules.StemWidth*unitInPixels,Vex.Flow.DEFAULT_NOTATION_FONT_SCALE=this.rules.VexFlowDefaultNotationFontScale,Vex.Flow.DEFAULT_TAB_FONT_SCALE=this.rules.VexFlowDefaultTabFontScale,this.pageIdx=0;for(const r of e.MusicPages){if(r.PageNumber>this.rules.MaxPageToDrawNumber)break;const e=this.backends[this.pageIdx];e.graphicalMusicPage=r,e.scale(this.zoom),this.pageIdx+=1}this.pageIdx=0,this.backend=this.backends[0],super.drawSheet(e)}drawPage(e){e&&(this.backend=this.backends[e.PageNumber-1],super.drawPage(e),this.pageIdx+=1)}clear(){for(const e of this.backends)e.clear()}setZoom(e){this.zoom=e}calculatePixelDistance(e){return e*unitInPixels}drawStaffLine(e){const t=this.backend.getContext().openGroup();t&&t.classList.add("staffline"),super.drawStaffLine(e);const n=e.PositionAndShape.AbsolutePosition;this.rules.RenderSlurs&&this.drawSlurs(e,n),this.backend.getContext().closeGroup()}drawSlurs(e,t){var n;const i=null===(n=window.GYM)||void 0===n?void 0:n.vfcurveItem;for(let l=0;l(!e.index||e.index===l)&&e.MeasureNumberXML==n.staffEntries[n.staffEntries.length-1].parentMeasure.MeasureNumber));var r,o,s;if(e)n.bezierEndControlPt.y+=null!=e&&null!==(r=e.bezierEndControlPt)&&void 0!==r&&r.y?e.bezierEndControlPt.y:0,n.bezierEndPt.y+=null!=e&&null!==(o=e.bezierEndPt)&&void 0!==o&&o.y?e.bezierEndPt.y:0,n.bezierStartControlPt.y+=null!=e&&null!==(s=e.bezierStartControlPt)&&void 0!==s&&s.y?e.bezierStartControlPt.y:0}catch(a){console.log(a)}this.drawSlur(n,t)}}}drawSlur(e,t){const n=[];let i,r,o,s;"jianpu"===this.rules.DYMusicScoreType?((e.placement>0||e.bezierStartPt.y>0)&&(e.bezierStartPt.y=-.8,e.bezierStartControlPt.y=-2.5),i=new PointF2D(e.bezierStartPt.x+t.x,e.bezierStartPt.y+t.y),r=new PointF2D(e.bezierStartControlPt.x+t.x,e.bezierStartControlPt.y+t.y),o=new PointF2D(e.bezierEndControlPt.x+t.x,e.bezierStartControlPt.y+t.y),s=new PointF2D(e.bezierEndPt.x+t.x,e.bezierStartPt.y+t.y)):(i=new PointF2D(e.bezierStartPt.x+t.x,e.bezierStartPt.y+t.y),r=new PointF2D(e.bezierStartControlPt.x+t.x,e.bezierStartControlPt.y+t.y),o=new PointF2D(e.bezierEndControlPt.x+t.x,e.bezierEndControlPt.y+t.y),s=new PointF2D(e.bezierEndPt.x+t.x,e.bezierEndPt.y+t.y)),n.push(this.applyScreenTransformation(i)),n.push(this.applyScreenTransformation(r)),n.push(this.applyScreenTransformation(o)),n.push(this.applyScreenTransformation(s)),e.placement===PlacementEnum.Above?(i.y-=.05,r.y-=.3,o.y-=.3,s.y-=.05):(i.y+=.05,r.y+=.3,o.y+=.3,s.y+=.05),n.push(this.applyScreenTransformation(i)),n.push(this.applyScreenTransformation(r)),n.push(this.applyScreenTransformation(o)),n.push(this.applyScreenTransformation(s)),e.SVGElement=this.backend.renderCurve(n)}drawMeasure(e){e.setAbsoluteCoordinates(e.PositionAndShape.AbsolutePosition.x*unitInPixels,e.PositionAndShape.AbsolutePosition.y*unitInPixels);const t=this.backend.getContext();try{e.draw(t)}catch(n){loglevelExports.warn("VexFlowMusicSheetDrawer.drawMeasure",n)}for(const i of e.staffEntries)this.drawStaffEntry(i)}drawLine(e,t,n="#FF0000FF",i=.2){return e=this.applyScreenTransformation(e),t=this.applyScreenTransformation(t),this.backend.renderLine(e,t,n,i*unitInPixels)}DrawOverlayLine(e,t,n,i="#FF0000FF",r=.2){if(!n.PageNumber||n.PageNumber>this.backends.length||n.PageNumber<1)return void console.log("VexFlowMusicSheetDrawer.drawOverlayLine: invalid page number / music page number doesn't correspond to an existing backend.");const o=n.PageNumber-1,s=this.backends[o];return e=this.applyScreenTransformation(e),t=this.applyScreenTransformation(t),s.renderLine(e,t,i,r*unitInPixels)}drawSkyLine(e){const t=e.PositionAndShape.AbsolutePosition,n=e.PositionAndShape.Size.width;this.drawSampledLine(e.SkyLine,t,n)}drawBottomLine(e){const t=new PointF2D(e.PositionAndShape.AbsolutePosition.x,e.PositionAndShape.AbsolutePosition.y),n=e.PositionAndShape.Size.width;this.drawSampledLine(e.BottomLine,t,n,"#0000FFFF")}drawSampledLine(e,t,n,i="#FF0000FF"){const r=[];let o=0;for(let a=0;a0){const t=this.rules.SamplingUnit;let o,a,l=new PointF2D(s.x,s.y),c=new PointF2D(r[0]/t+s.x,s.y);this.drawLine(l,c,i),e[0]>=0&&(o=new PointF2D(r[0]/t+s.x,s.y),a=new PointF2D(r[0]/t+s.x,s.y+e[r[0]]),this.drawLine(o,a,i));for(let n=1;n0)for(const t of e.FingeringEntries)t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes);if(void 0!==e.graphicalChordContainers&&e.graphicalChordContainers.length>0)for(const t of e.graphicalChordContainers){const e=t.GraphicalLabel;e.SVGNode=this.drawLabel(e,GraphicalLayers.Notes)}this.rules.RenderLyrics&&e.LyricsEntries.length>0&&this.drawLyrics(e.LyricsEntries,GraphicalLayers.Notes)}drawLyrics(e,t){e.forEach((e=>{const n=e.GraphicalLabel;n.SVGNode=this.drawLabel(n,t)}))}drawInstrumentBrace(e,t){e.draw(this.backend.getContext())}drawGroupBracket(e,t){e.draw(this.backend.getContext())}drawOctaveShifts(e){for(const n of e.OctaveShifts)if(n){const e=n,i=this.backend.getContext(),r=e.getTextBracket();r.setContext(i);try{r.draw()}catch(t){loglevelExports.warn(t)}}}drawPedals(e){for(const t of e.Pedals)if(t){const e=t,n=this.backend.getContext(),i=e.getPedalMarking();i.setContext(n),i.draw()}}drawWavyLines(e){for(const t of e.WavyLines)if(t){const e=t,n=this.backend.getContext(),i=e.getVibratoBracket();i.setContext(n),i.draw()}}getMaxExpressionsYAndDots(e){const t=[];let n=0;for(const c of e.measures)t.push(c.measureNumber);const i={},r={},o={};for(const c of e.AbstractExpressions)if(c instanceof GraphicalUnknownExpression&&t.includes(c.parentMeasure.MeasureNumber)){const e=this.getDotId(c),t=this.getDotId(c,"x");r[e]||(r[e]=[]),o[t]||(o[t]=[]),this.hasDot(c.Label.PositionAndShape.RelativePosition,r[e],!0)||(r[e].push(c.Label.PositionAndShape.RelativePosition),o[t].push(c.Label.PositionAndShape.RelativePosition)),i[e]=c.Label.PositionAndShape.RelativePosition}let s=0;for(const c of e.AbstractExpressions){var a;const e=null===(a=c.parentMeasure)||void 0===a?void 0:a.MeasureNumber;if(c instanceof GraphicalUnknownExpression&&t.includes(e)){var l;const t=null===(l=c.parentMeasure.verticalMeasureList[0])||void 0===l?void 0:l.stave,i=(null==t?void 0:t.end_x)-(null==t?void 0:t.x),r=this.getDotId(c,"x");if(1===(o[r]||[]).length&&s!==e){const e=c.Label.PositionAndShape.AbsolutePosition.y;n=0===n?e:Math.min(n,e)}1!==(o[r]||[]).length&&i/10Number.EPSILON){let t=Math.min(...e.Lines.map((e=>e.Start.x))),n=Math.min(...e.Lines.map((e=>e.Start.y)));e.Lines[0].Start.x=t,e.Lines[1].Start.x=t,e.Lines[0].Start.y=n+this.rules.WedgeOpeningLength/2,e.Lines[1].Start.y=n+2*this.rules.WedgeOpeningLength,e.Lines[0].End.y+=this.rules.WedgeOpeningLength/2,e.Lines[1].End.y+=this.rules.WedgeOpeningLength}}catch(t){}const n=this.backend.getContext();n.openGroup("lineGroup");for(const t of e.Lines){const n=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+t.Start.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+t.Start.y),i=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+t.End.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+t.End.y);this.drawLine(n,i,"black",t.Width)}n.closeGroup()}}renderLabel(e,t,n){return this._renderLabel(e,n)}_renderLabel(e,t){if(!e.Label.print)return;const n=e.Label.fontHeight*unitInPixels,{font:i}=e.Label;let r;this.rules.ColoringEnabled&&(r=e.Label.colorDefault,e.Label.color&&(r=e.Label.color.toString()),r||(r=this.rules.DefaultColorLabel));let o,{fontStyle:s,fontFamily:a}=e.Label;s||(s=this.rules.DefaultFontStyle),a||(a=this.rules.DefaultFontFamily);for(let c=0;c<(null===(l=e.TextLines)||void 0===l?void 0:l.length);c++){var l;const a=e.TextLines[c],u=this.calculatePixelDistance(a.xOffset),h=new PointF2D(t.ScreenPosition.x+u,t.ScreenPosition.y),d=this.backend.renderText(n,s,i,a.text,t.FontHeightInPixel,h,r,e.Label.fontFamily);o?o.appendChild(d):o=d,t.ScreenPosition.y=t.ScreenPosition.y+t.FontHeightInPixel,e.TextLines.length>1&&(t.ScreenPosition.y+=this.rules.SpacingBetweenTextLines)}return o}renderRectangle(e,t,n,i,r){return this.backend.renderRectangle(e,n,i,r)}applyScreenTransformation(e){return new PointF2D(e.x*unitInPixels,e.y*unitInPixels)}applyScreenTransformationForRect(e){return new RectangleF2D(e.x*unitInPixels,e.y*unitInPixels,e.width*unitInPixels,e.height*unitInPixels)}}const VF$c=Vex.Flow,_VexFlowConverter=class{static durations(e,t){const n=[],i=e.clone();for(;i.RealValue>0;){const e=i.RealValue;if(e>=2)n.push("1/2"),i.Sub(new Fraction$1(2,1));else if(e>=1)n.push("w"),i.Sub(new Fraction$1(1,1));else if(e<1&&e>=.5){if(t&&e>.5)return["w"];n.push("h"),i.Sub(new Fraction$1(1,2))}else if(e<.5&&e>=.25){if(t&&e>.25)return["h"];n.push("q"),i.Sub(new Fraction$1(1,4))}else if(e<.25&&e>=.125){if(t&&e>.125)return["q"];n.push("8"),i.Sub(new Fraction$1(1,8))}else if(e<.125&&e>=.0625){if(t&&e>.0625)return["8"];n.push("16"),i.Sub(new Fraction$1(1,16))}else if(e<.0625&&e>=.03125){if(t&&e>.03125)return["16"];n.push("32"),i.Sub(new Fraction$1(1,32))}else if(e<.03125&&e>=.015625){if(t&&e>.015625)return["32"];n.push("64"),i.Sub(new Fraction$1(1,64))}else{if(t)return["64"];n.push("128"),i.Sub(new Fraction$1(1,128))}}return n}static pitch(e,t,n,i=undefined,r=undefined){let o=r;void 0===r&&(o=3),t&&void 0===r&&(o=0,n.ClefType===ClefEnum.F&&(o=2),n.ClefType===ClefEnum.C&&(o=2));const s=NoteEnum[e.FundamentalNote].toLowerCase(),a=Pitch.accidentalVexflow(e.Accidental),l=e.Octave-n.OctaveOffset+o;let c="";return i&&(c=this.NoteHeadCode(i)),[s+"n/"+l+c,a,n]}static restToNotePitch(e,t){let n=e.Octave;switch(t){case ClefEnum.C:case ClefEnum.F:n+=2;case ClefEnum.G:}return new Pitch(e.FundamentalNote,n,AccidentalEnum.NONE)}static NoteHeadCode(e){const t=e.Filled?"2":"1";switch(e.Shape){case NoteHeadShape.NORMAL:return"";case NoteHeadShape.DIAMOND:return"/D"+t;case NoteHeadShape.TRIANGLE:return"/T"+t;case NoteHeadShape.X:return"/X"+t;case NoteHeadShape.CIRCLEX:return"/X3";case NoteHeadShape.RECTANGLE:return"/R"+t;case NoteHeadShape.SQUARE:return"/S"+t;case NoteHeadShape.SLASH:default:return""}}static GhostNotes(e){const t=[],n=_VexFlowConverter.durations(e,!1);for(const i of n)t.push(new VF$c.GhostNote({duration:i}));return t}static StaveNote(e){var t,n;e.sortForVexflow();const i=e.notes,r=e.parentStaffEntry.parentMeasure.parentSourceMeasure.Rules,o=i[0];let s,a=[];const l=[],c=o.graphicalNoteLength,u=void 0!==o.sourceNote.NoteTuplet;let h,d=_VexFlowConverter.durations(c,u)[0];void 0!==o.sourceNote.TypeLength&&o.sourceNote.TypeLength!==c&&0!==o.sourceNote.TypeLength.RealValue&&(d=_VexFlowConverter.durations(o.sourceNote.TypeLength,u)[0],o.numberOfDots=o.sourceNote.DotsXml);let p,f,m=o.numberOfDots,g=!1,v=0,b=!1,A=!1;for(const z of i){var y,S;if(m=1&&t.length-1>=r+1)if(n=null===(_=t[r-1])||void 0===_||null===(M=_.graphicalVoiceEntries[0])||void 0===M?void 0:M.parentVoiceEntry,i=null===(P=t[r+1])||void 0===P||null===(T=P.graphicalVoiceEntries[0])||void 0===T?void 0:T.parentVoiceEntry,n&&i){var C;const e=n.Notes[0],t=i.Notes[0];if(null!==(C=e.NoteBeam)&&void 0!==C&&C.Notes.includes(t)&&1!==t.ParentStaffEntry.ParentStaff.StafflineCount){const e=n.Notes.last().Pitch,t=z.Clef(),i=_VexFlowConverter.pitch(_VexFlowConverter.restToNotePitch(e.getTransposedPitch(-2),t.ClefType),!1,t);4===e.FundamentalNote&&(a=[i[0]])}}}}c.RealValue===z.sourceNote.SourceMeasure.ActiveTimeSignature.RealValue&&(a="staff"===r.DYMusicScoreType?["d/5"]:["R/5"],d="w",m=0,g=!0,v=r.WholeRestXShiftVexflow*unitInPixels);const e=[...z.sourceNote.ParentStaff.Voices].filter((e=>1!=(null==e?void 0:e.VoiceId)));if(e.length){const e=z.parentVoiceEntry.parentStaffEntry.graphicalVoiceEntries,t=z.parentVoiceEntry.parentVoiceEntry.ParentVoice.VoiceId;let n,i;for(const o of e)for(const e of o.notes){if(e===z||e.sourceNote.isRest()||!e.sourceNote.PrintObject){z.lineShift=-2;continue}const o=e.parentVoiceEntry.parentVoiceEntry.WantedStemDirection,s=1===t||5===t,a=s?1:-1,l=e.sourceNote.Pitch.getHalfTone();(!n||1===a&&l>n||-1===a&&l0){let e=3;const t=z.Clef();switch(t.ClefType){case ClefEnum.F:e=5;break;case ClefEnum.C:e=4}p=Pitch.fromHalftone(n),a=[_VexFlowConverter.pitch(p,!0,t,void 0,e)[0]]}}break}z.sourceNote.Notehead&&z.sourceNote.Notehead.Shape===NoteHeadShape.SLASH&&(b=!0);const e=z.vfpitch;if(null!==(y=e[2])&&void 0!==y&&null!==(S=y.Parent)&&void 0!==S&&S.Instructions)for(let t=0,n=e[2].Parent.Instructions.length;t1&&1==e.notes[0].sourceNote.ParentVoiceEntry.ParentVoice.VoiceId&&(f.getKeyProps()[0].line=4.5));const N=null===(n=window.GYM)||void 0===n?void 0:n.customBassDrum;if(N&&f.isRest()&&("q"===f.getDuration()&&(f.getKeyProps()[0].line=N),"h"===f.getDuration()&&(f.getKeyProps()[0].line=N-1)),f.getKeyProps().forEach((({line:t},n)=>e.notes[n].staffLine=t)),(r.LedgerLineWidth||r.LedgerLineStrokeStyle)&&(f.ledgerLineStyle||(f.ledgerLineStyle={}),r.LedgerLineWidth&&(f.ledgerLineStyle.lineWidth=r.LedgerLineWidth),r.LedgerLineStrokeStyle&&(f.ledgerLineStyle.strokeStyle=r.LedgerLineStrokeStyle)),r.ColoringEnabled){const t=r.DefaultColorStem;let n=e.parentVoiceEntry.StemColor;!n&&t&&(n=t);const i={fillStyle:n,strokeStyle:n};n&&(f.setStemStyle(i),f.flag&&r.ColorFlags&&f.setFlagStyle(i))}if(f.x_shift=v,e.parentVoiceEntry.IsGrace&&e.notes[0].sourceNote.NoteBeam&&(e.parentVoiceEntry.WantedStemDirection=e.notes[0].sourceNote.NoteBeam.Notes[0].ParentVoiceEntry.WantedStemDirection),e.parentVoiceEntry){var D;let t=e.parentVoiceEntry.WantedStemDirection;const n=(null===(D=window.GYM)||void 0===D?void 0:D.stemDirectionNote)||[],i=null==n?void 0:n.find((t=>t.id===e.notes[0].sourceNote.NoteToGraphicalNoteObjectId));switch(i&&"number"==typeof(null==i?void 0:i.direction)&&(t=i.direction),t){case StemDirectionType.Up:f.setStemDirection(VF$c.Stem.UP),e.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case StemDirectionType.Down:f.setStemDirection(VF$c.Stem.DOWN),e.parentVoiceEntry.StemDirection=StemDirectionType.Down}}for(let z=0,G=i.length;z0&&"single"===t){const t=new VF$c.Tremolo(e);t.extra_stroke_scale=r.TremoloStrokeScale,t.y_spacing_scale=r.TremoloYSpacingScale,f&&"w"===f.duration&&f.stem.setExtension(-9),f.addModifier(z,t)}if(e>0&&"start"===t&&this.noteTremoloList.push(f),e>0&&"stop"===t){this.noteTremoloList.push(f);const t=this.noteTremoloList.filter((e=>"w"===e.duration)).length===this.noteTremoloList.length;if(t)try{if(this.noteTremoloList[0].keyProps&&this.noteTremoloList[1].keyProps){var F;null===(F=(this.noteTremoloList[0].keyProps[0].line>this.noteTremoloList[1].keyProps[0].line?this.noteTremoloList[1]:this.noteTremoloList[0]).stem)||void 0===F||F.setResetHeight(30)}}catch(V){console.error("设置都是全音符,stem的高度失败")}const n=new VF$c.Tremolo(e,[...this.noteTremoloList]);n.extra_stroke_scale=1.2,n.y_spacing_scale=1.2,n.x_shift=-30,f.addModifier(z,n),this.noteTremoloList=[]}this.glissandoList.length&&(f.setVibrato(this.glissandoList[0].vfnote[0]),this.glissandoList=[]),"start"===i[z].sourceNote.glissandoType&&this.glissandoList.push(i[z])}if(this.slideNote){try{f.setSlideNote(this.slideNote)}catch(V){console.error(V)}this.slideNote=null}if("start"===e.notes[0].sourceNote.slideType&&(this.slideNote=f),.25===k.Length.RealValue&&k.Notehead&&!1===k.Notehead.Filled){const e=f.getKeyProps();for(let t=0;t1){var O;let e=f.getKeyProps().filter((e=>!e.code&&e.line>3));(null===(O=window.GYM)||void 0===O?void 0:O.stemDirectionNote)||e.length!==a.length||f.setStemDirection(-1)}"jianpu"===r.DYMusicScoreType&&window&&window.sett&&window.sett.keySignature&&f.addAccidental(0,new VF$c.Accidental("#"));try{const e=["b","#","§","º","X"],t={b:"b","#":"#","§":"n","º":"bb",X:"##"};for(const n of i){const i=n.sourceNote.voiceEntry.Timestamp;for(const r of n.sourceNote.SourceMeasure.StaffLinkedExpressions)for(const n of r){const r=Fraction$1.Equal(i,n.Timestamp),o=n.EntriesList.map((e=>e.label)).filter((t=>e.includes(t))).map((e=>t[e]));if(r){for(const e of o)e&&f.addAnnotation(0,new VF$c.Annotation(e));break}}}}catch(V){}return f}static generateArticulations(e,t,n){if(e&&"GhostNote"!==e.getAttribute("type"))for(const c of t){let t,u=VF$c.Modifier.Position.ABOVE;e.getStemDirection()===VF$c.Stem.UP&&(u=VF$c.Modifier.Position.BELOW);const h=c.articulationEnum;switch(n.ArticulationPlacementFromXML&&(c.placement===PlacementEnum.Above?u=VF$c.Modifier.Position.ABOVE:c.placement===PlacementEnum.Below&&(u=VF$c.Modifier.Position.BELOW)),h){case ArticulationEnum.accent:t=new VF$c.Articulation("a>");break;case ArticulationEnum.downbow:t=new VF$c.Articulation("am"),void 0===c.placement&&(u=VF$c.Modifier.Position.ABOVE);break;case ArticulationEnum.fermata:t=new VF$c.Articulation("a@a"),u=VF$c.Modifier.Position.ABOVE;break;case ArticulationEnum.marcatodown:t=new VF$c.Articulation("a|");break;case ArticulationEnum.marcatoup:t=new VF$c.Articulation("a^");break;case ArticulationEnum.invertedfermata:t=new VF$c.Articulation("a@u"),u=VF$c.Modifier.Position.BELOW;break;case ArticulationEnum.lefthandpizzicato:t=new VF$c.Articulation("a+");break;case ArticulationEnum.naturalharmonic:t=new VF$c.Articulation("ah");break;case ArticulationEnum.snappizzicato:t=new VF$c.Articulation("ao");break;case ArticulationEnum.staccatissimo:t=new VF$c.Articulation("av");break;case ArticulationEnum.staccato:t=new VF$c.Articulation("a.");break;case ArticulationEnum.tenuto:t=new VF$c.Articulation("a-");break;case ArticulationEnum.upbow:t=new VF$c.Articulation("a|"),void 0===c.placement&&(u=VF$c.Modifier.Position.ABOVE);break;case ArticulationEnum.strongaccent:t=new VF$c.Articulation("a^")}if(t){var i,r,o,s;if(!e.hasStem()&&!e.isRest()&&h==ArticulationEnum.accent&&e.getLineNumber()>=3)u=VF$c.Modifier.Position.ABOVE,null!=e&&null!==(o=e.modifiers)&&void 0!==o&&null!==(s=o.filter((e=>["TREMOLO"].includes(e.getCategory().toLocaleUpperCase()))))&&void 0!==s&&s.length&&t.setYShift(-16);if(h===ArticulationEnum.strongaccent){var a;u=VF$c.Modifier.Position.ABOVE;(null===(a=window.GYM)||void 0===a?void 0:a.customArtPosition)&&(1===e.getStemDirection()?u=VF$c.Modifier.Position.ABOVE:(u=VF$c.Modifier.Position.BELOW,t=new VF$c.Articulation("a|")))}(null===(i=window.GYM)||void 0===i?void 0:i.customAccentItem)&&h===ArticulationEnum.accent&&(u=VF$c.Modifier.Position.ABOVE);if(!(null===(r=window.GYM)||void 0===r?void 0:r.customLefthandpizzicatoItem)||h!==ArticulationEnum.lefthandpizzicato&&h!==ArticulationEnum.naturalharmonic||(u=VF$c.Modifier.Position.ABOVE),h===ArticulationEnum.tenuto&&"w"===e.getDuration()){var l;(null===(l=window.GYM)||void 0===l?void 0:l.customTenutoItem)&&(u=VF$c.Modifier.Position.ABOVE)}t.setPosition(u),e.addModifier(0,t)}}}static generateOrnaments(e,t){let n,i=VF$c.Modifier.Position.ABOVE;switch(t.placement===PlacementEnum.Below&&(i=VF$c.Modifier.Position.BELOW),t.GetOrnament){case OrnamentEnum.DelayedInvertedTurn:n=new VF$c.Ornament("turn_inverted"),n.setDelayed(!0);break;case OrnamentEnum.DelayedTurn:n=new VF$c.Ornament("turn"),n.setDelayed(!0);break;case OrnamentEnum.InvertedMordent:n=new VF$c.Ornament("mordent"),n.setDelayed(!1);break;case OrnamentEnum.InvertedTurn:n=new VF$c.Ornament("turn_inverted"),n.setDelayed(!1);break;case OrnamentEnum.Mordent:n=new VF$c.Ornament("mordent_inverted"),n.setDelayed(!1);break;case OrnamentEnum.Trill:n=new VF$c.Ornament("tr"),n.setDelayed(!1);break;case OrnamentEnum.Turn:n=new VF$c.Ornament("turn"),n.setDelayed(!1);break;default:return void loglevelExports.warn("unhandled OrnamentEnum type: "+t.GetOrnament)}n&&(t.AccidentalBelow!==AccidentalEnum.NONE&&n.setLowerAccidental(Pitch.accidentalVexflow(t.AccidentalBelow)),t.AccidentalAbove!==AccidentalEnum.NONE&&n.setUpperAccidental(Pitch.accidentalVexflow(t.AccidentalAbove)),n.setPosition(i),e.addModifier(0,n))}static StrokeTypeFromArpeggioType(e){switch(e){case ArpeggioType.ARPEGGIO_DIRECTIONLESS:return VF$c.Stroke.Type.ARPEGGIO_DIRECTIONLESS;case ArpeggioType.BRUSH_DOWN:return VF$c.Stroke.Type.BRUSH_UP;case ArpeggioType.BRUSH_UP:return VF$c.Stroke.Type.BRUSH_DOWN;case ArpeggioType.RASQUEDO_DOWN:return VF$c.Stroke.Type.RASQUEDO_UP;case ArpeggioType.RASQUEDO_UP:return VF$c.Stroke.Type.RASQUEDO_DOWN;case ArpeggioType.ROLL_DOWN:return VF$c.Stroke.Type.ROLL_UP;case ArpeggioType.ROLL_UP:return VF$c.Stroke.Type.ROLL_DOWN;default:return VF$c.Stroke.Type.ARPEGGIO_DIRECTIONLESS}}static CreateTabNote(e){const t=[],n=e.notes.reverse(),i=[],r=e.notes[0].graphicalNoteLength,o=void 0!==e.notes[0].sourceNote.NoteTuplet;let s=_VexFlowConverter.durations(r,o)[0],a=0;for(const c of e.notes){const e=c.sourceNote,n={str:e.StringNumberTab,fret:e.FretNumber};t.push(n),e.BendArray&&e.BendArray.forEach((function(e){let t;const r=e.bendalter-n.fret;t=r>1?"Full":1===r?"1/2":"1/4","up"===e.direction?i.push({type:VF$c.Bend.UP,text:t,width:10}):i.push({type:VF$c.Bend.DOWN,text:t,width:10})})),a(e[e.VA8=0]="VA8",e[e.VB8=1]="VB8",e[e.MA15=2]="MA15",e[e.MB15=3]="MB15",e[e.NONE=4]="NONE",e))(OctaveEnum||{});class AbstractTempoExpression extends AbstractExpression{constructor(e,t,n,i){super(t),this.label=e,this.staffNumber=n,this.parentMultiTempoExpression=i}get Label(){return this.label}set Label(e){this.label=e}get Placement(){return this.placement}set Placement(e){this.placement=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}static isStringInStringList(e,t){for(const n of e)if(AbstractTempoExpression.stringContainsSeparatedWord(t.toLowerCase().trim(),n.toLowerCase().trim()))return!0;return!1}static stringContainsSeparatedWord(e,t){return e===t||-1!==e.indexOf(" "+t)||-1!==e.indexOf(t+" ")}}const _InstantaneousTempoExpression=class extends AbstractTempoExpression{constructor(e,t,n,i,r,o=!1){super(e,t,n,r),this.setTempoAndTempoType(i)}static getDefaultValueForTempoType(e){switch(e){case 1:return 20;case 2:return 30;case 3:return 48;case 4:return 52;case 5:return 63;case 6:return 70;case 7:return 75;case 8:return 88;case 9:return 92;case 10:return 96;case 11:return 106;case 12:return 112;case 13:return 118;case 14:return 130;case 15:return 140;case 16:return 155;case 17:return 170;case 18:return 184;case 19:return 200;default:throw new ArgumentOutOfRangeException("tempoEnum")}}static isInputStringInstantaneousTempo(e){return!!e&&(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghissimo,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoGrave,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLento,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLargo,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghetto,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagio,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagietto,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndante,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndantino,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoModerato,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegretto,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegro,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivace,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivacissimo,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPresto,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPrestissimo,e)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral,e))}get Label(){return this.label}set Label(e){this.label=e}get Placement(){return this.placement}set Placement(e){this.placement=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get Enum(){return this.tempoEnum}get TempoInBpm(){return this.tempoInBpm}set TempoInBpm(e){this.tempoInBpm=e}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}getAbsoluteTimestamp(){return Fraction$1.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp)}getAbsoluteFloatTimestamp(){return Fraction$1.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp).RealValue}setTempoAndTempoType(e){return this.label?_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghissimo,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(1)),this.tempoInBpm=e,void(this.tempoEnum=1)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoGrave,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(2)),this.tempoInBpm=e,void(this.tempoEnum=2)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLento,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(3)),this.tempoInBpm=e,void(this.tempoEnum=3)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLargo,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(4)),this.tempoInBpm=e,void(this.tempoEnum=4)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghetto,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(5)),this.tempoInBpm=e,void(this.tempoEnum=5)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagio,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(6)),this.tempoInBpm=e,void(this.tempoEnum=6)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagietto,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(7)),this.tempoInBpm=e,void(this.tempoEnum=7)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(8)),this.tempoInBpm=e,void(this.tempoEnum=8)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndante,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(9)),this.tempoInBpm=e,void(this.tempoEnum=9)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndantino,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(10)),this.tempoInBpm=e,void(this.tempoEnum=10)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoModerato,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(11)),this.tempoInBpm=e,void(this.tempoEnum=11)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegretto,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(12)),this.tempoInBpm=e,void(this.tempoEnum=12)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(13)),this.tempoInBpm=e,void(this.tempoEnum=13)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegro,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(14)),this.tempoInBpm=e,void(this.tempoEnum=14)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivace,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(15)),this.tempoInBpm=e,void(this.tempoEnum=15)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivacissimo,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(16)),this.tempoInBpm=e,void(this.tempoEnum=16)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(17)),this.tempoInBpm=e,void(this.tempoEnum=17)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPresto,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(18)),this.tempoInBpm=e,void(this.tempoEnum=18)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPrestissimo,this.label)?(0===e&&(e=_InstantaneousTempoExpression.getDefaultValueForTempoType(19)),this.tempoInBpm=e,void(this.tempoEnum=19)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAddons,this.label)?(this.tempoInBpm=0,void(this.tempoEnum=21)):_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral,this.label)?(this.tempoInBpm=0,void(this.tempoEnum=22)):void 0:(this.tempoInBpm=e,void(this.tempoEnum=23))}};let InstantaneousTempoExpression=_InstantaneousTempoExpression;InstantaneousTempoExpression.listInstantaneousTempoLarghissimo=["Larghissimo","Sehr breit","very, very slow"],InstantaneousTempoExpression.listInstantaneousTempoGrave=["Grave","Schwer","slow and solemn"],InstantaneousTempoExpression.listInstantaneousTempoLento=["Lento","Lent","Langsam","slowly"],InstantaneousTempoExpression.listInstantaneousTempoLargo=["Largo","Breit","broadly"],InstantaneousTempoExpression.listInstantaneousTempoLarghetto=["Larghetto","Etwas breit","rather broadly"],InstantaneousTempoExpression.listInstantaneousTempoAdagio=["Adagio","Langsam","Ruhig","slow and stately"],InstantaneousTempoExpression.listInstantaneousTempoAdagietto=["Adagietto","Ziemlich ruhig","Ziemlich langsam","rather slow"],InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato=["Andante moderato"],InstantaneousTempoExpression.listInstantaneousTempoAndante=["Andante","Gehend","Schreitend","at a walking pace"],InstantaneousTempoExpression.listInstantaneousTempoAndantino=["Andantino"],InstantaneousTempoExpression.listInstantaneousTempoModerato=["Moderato","Mäßig","Mod�r�","moderately"],InstantaneousTempoExpression.listInstantaneousTempoAllegretto=["Allegretto","fast"],InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato=["Allegro moderato"],InstantaneousTempoExpression.listInstantaneousTempoAllegro=["Allegro","Rapide","Vite","Rasch","Schnell","Fr�hlich"],InstantaneousTempoExpression.listInstantaneousTempoVivace=["Vivace","Lebhaft","Lebendig","lively and fast"],InstantaneousTempoExpression.listInstantaneousTempoVivacissimo=["Vivacissimo","Sehr lebhaft","Sehr lebendig"],InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo=["Allegrissimo","very fast"],InstantaneousTempoExpression.listInstantaneousTempoPresto=["Presto","Sehr schnell","Geschwind"],InstantaneousTempoExpression.listInstantaneousTempoPrestissimo=["Prestissimo","äußerst schnell"],InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral=["tempo primo","a tempo","tempo i","rubato","doppio movimento"],InstantaneousTempoExpression.listInstantaneousTempoAddons=["assai","amoroso","cantabile","con brio","con dolore","con espressione","con fuoco","con moto","con spirito","spiritoso","espressivo","giocoso","giusto","grazioso","lesto","lugubre","maestoso","ma non troppo","marcato","molto","morendo","mosso","non tanto","piu","un poco","poco","quasi","risoluto","scherzando","sostenuto","teneramente","tempo giusto","tranquillo","sehr","lieblich","liebevoll","mit Leidenschaft","mit Liebe","amourös","gesanglich","mit Schwung","mit Feuer","mit Schmerz","mit Ausdruck","mit Bewegung","geistvoll","ausdrucksvoll","freudig","verspielt","angemessen","graziös","mit Grazie","flink","behände","traurig","klagend","majestätisch","aber nicht zu sehr","markant","gemäßigt","viel","sehr","ersterbend","bewegt","nicht zu sehr","mehr","ein wenig","gleichsam","entschlossen","zupackend","heiter","nachdrücklich","getragen","gewichtig","zart","zärtlich","im angemessenen Zeitmaß","ruhig","ein wenig","alla marcia","ad libitum","alla breve"];var TempoEnum=(e=>(e[e.none=0]="none",e[e.larghissimo=1]="larghissimo",e[e.grave=2]="grave",e[e.lento=3]="lento",e[e.largo=4]="largo",e[e.larghetto=5]="larghetto",e[e.adagio=6]="adagio",e[e.adagietto=7]="adagietto",e[e.andanteModerato=8]="andanteModerato",e[e.andante=9]="andante",e[e.andantino=10]="andantino",e[e.moderato=11]="moderato",e[e.allegretto=12]="allegretto",e[e.allegroModerato=13]="allegroModerato",e[e.allegro=14]="allegro",e[e.vivace=15]="vivace",e[e.vivacissimo=16]="vivacissimo",e[e.allegrissimo=17]="allegrissimo",e[e.presto=18]="presto",e[e.prestissimo=19]="prestissimo",e[e.lastRealTempo=20]="lastRealTempo",e[e.addon=21]="addon",e[e.changes=22]="changes",e[e.metronomeMark=23]="metronomeMark",e))(TempoEnum||{});const _MoodExpression=class extends AbstractExpression{constructor(e,t,n){super(t),this.label=e,this.staffNumber=n,this.setMoodType()}static isInputStringMood(e){return!!e&&(_MoodExpression.isStringInStringList(_MoodExpression.listMoodAffettuoso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAgitato,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAnimato,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAppassionato,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodBrillante,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodCantabile,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodDolce,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEnergico,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEroico,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEspressivo,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodFurioso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGiocoso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGioioso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrandioso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrazioso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodLacrimoso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodLeggiero,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMaestoso,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMalinconico,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarcato,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarziale,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMesto,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMorendo,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodNobilmente,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodPatetico,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodPesante,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSaltando,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSautille,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodScherzando,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSostenuto,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSpiccato,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTenerezza,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTranquillamente,e)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTrionfante,e))}get Label(){return this.label}set Label(e){this.label=e}get Mood(){return this.moodType}set Mood(e){this.moodType=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get Placement(){return this.placement}set Placement(e){this.placement=e}setMoodType(){_MoodExpression.isStringInStringList(_MoodExpression.listMoodAffettuoso,this.label)?this.moodType=0:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAgitato,this.label)?this.moodType=1:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAnimato,this.label)?this.moodType=3:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAppassionato,this.label)?this.moodType=2:_MoodExpression.isStringInStringList(_MoodExpression.listMoodBrillante,this.label)?this.moodType=4:_MoodExpression.isStringInStringList(_MoodExpression.listMoodCantabile,this.label)?this.moodType=5:_MoodExpression.isStringInStringList(_MoodExpression.listMoodDolce,this.label)?this.moodType=6:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEnergico,this.label)?this.moodType=7:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEroico,this.label)?this.moodType=8:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEspressivo,this.label)?this.moodType=9:_MoodExpression.isStringInStringList(_MoodExpression.listMoodFurioso,this.label)?this.moodType=10:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGiocoso,this.label)?this.moodType=11:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGioioso,this.label)?this.moodType=12:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrandioso,this.label)?this.moodType=14:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrazioso,this.label)?this.moodType=15:_MoodExpression.isStringInStringList(_MoodExpression.listMoodLacrimoso,this.label)?this.moodType=13:_MoodExpression.isStringInStringList(_MoodExpression.listMoodLeggiero,this.label)?this.moodType=16:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMaestoso,this.label)?this.moodType=17:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMalinconico,this.label)?this.moodType=18:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarcato,this.label)?this.moodType=19:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarziale,this.label)?this.moodType=20:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMesto,this.label)?this.moodType=21:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMorendo,this.label)?this.moodType=22:_MoodExpression.isStringInStringList(_MoodExpression.listMoodNobilmente,this.label)?this.moodType=23:_MoodExpression.isStringInStringList(_MoodExpression.listMoodPatetico,this.label)?this.moodType=24:_MoodExpression.isStringInStringList(_MoodExpression.listMoodPesante,this.label)?this.moodType=25:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSaltando,this.label)?this.moodType=27:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSautille,this.label)?this.moodType=26:_MoodExpression.isStringInStringList(_MoodExpression.listMoodScherzando,this.label)?this.moodType=28:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSostenuto,this.label)?this.moodType=29:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSpiccato,this.label)?this.moodType=30:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTenerezza,this.label)?this.moodType=31:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTranquillamente,this.label)?this.moodType=32:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTrionfante,this.label)&&(this.moodType=33)}};let MoodExpression=_MoodExpression;MoodExpression.listMoodAffettuoso=["affettuoso"],MoodExpression.listMoodAgitato=["agitato"],MoodExpression.listMoodAppassionato=["appassionato"],MoodExpression.listMoodAnimato=["animato","lively"],MoodExpression.listMoodBrillante=["brillante"],MoodExpression.listMoodCantabile=["cantabile"],MoodExpression.listMoodDolce=["dolce"],MoodExpression.listMoodEnergico=["energico"],MoodExpression.listMoodEroico=["eroico"],MoodExpression.listMoodEspressivo=["espressivo"],MoodExpression.listMoodFurioso=["furioso"],MoodExpression.listMoodGiocoso=["giocoso"],MoodExpression.listMoodGioioso=["gioioso"],MoodExpression.listMoodLacrimoso=["lacrimoso"],MoodExpression.listMoodGrandioso=["grandioso"],MoodExpression.listMoodGrazioso=["grazioso"],MoodExpression.listMoodLeggiero=["leggiero"],MoodExpression.listMoodMaestoso=["maestoso"],MoodExpression.listMoodMalinconico=["malinconico"],MoodExpression.listMoodMarcato=["marcato"],MoodExpression.listMoodMarziale=["marziale"],MoodExpression.listMoodMesto=["mesto"],MoodExpression.listMoodMorendo=["morendo"],MoodExpression.listMoodNobilmente=["nobilmente"],MoodExpression.listMoodPatetico=["patetico"],MoodExpression.listMoodPesante=["pesante"],MoodExpression.listMoodSautille=["sautille"],MoodExpression.listMoodSaltando=["saltando"],MoodExpression.listMoodScherzando=["scherzando"],MoodExpression.listMoodSostenuto=["sostenuto"],MoodExpression.listMoodSpiccato=["spiccato"],MoodExpression.listMoodTenerezza=["tenerezza"],MoodExpression.listMoodTranquillamente=["tranquillamente"],MoodExpression.listMoodTrionfante=["trionfante"];class UnknownExpression extends AbstractExpression{constructor(e,t,n,i){super(t),this.label=e,this.staffNumber=i,void 0===n&&(n=TextAlignmentEnum.LeftBottom),this.textAlignment=n}get Label(){return this.label}get Placement(){return this.placement}set Placement(e){this.placement=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get TextAlignment(){return this.textAlignment}}class MultiExpression{constructor(e,t){this.unknownList=[],this.moodList=[],this.expressions=[],this.sourceMeasure=e,this.timestamp=t}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(e){this.sourceMeasure=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get AbsoluteTimestamp(){return Fraction$1.plus(this.timestamp,this.sourceMeasure.AbsoluteTimestamp)}get InstantaneousDynamic(){return this.instantaneousDynamic}set InstantaneousDynamic(e){this.instantaneousDynamic=e}get EndingContinuousDynamic(){return this.endingContinuousDynamic}set EndingContinuousDynamic(e){this.endingContinuousDynamic=e}get StartingContinuousDynamic(){return this.startingContinuousDynamic}set StartingContinuousDynamic(e){this.startingContinuousDynamic=e}get MoodList(){return this.moodList}get UnknownList(){return this.unknownList}get EntriesList(){return this.expressions}get OctaveShiftStart(){return this.octaveShiftStart}set OctaveShiftStart(e){this.octaveShiftStart=e}get OctaveShiftEnd(){return this.octaveShiftEnd}set OctaveShiftEnd(e){this.octaveShiftEnd=e}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(e){this.combinedExpressionsText=e}getPlacementOfFirstEntry(){let e=PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].expression instanceof InstantaneousDynamicExpression||this.expressions[0].expression instanceof ContinuousDynamicExpression||this.expressions[0].expression instanceof MoodExpression||this.expressions[0].expression instanceof UnknownExpression)&&(e=this.expressions[0].expression.Placement),e}getFontstyleOfFirstEntry(){let e=FontStyles.Regular;if(this.expressions.length>0)if(this.expressions[0].expression instanceof ContinuousDynamicExpression)e=FontStyles.Italic;else if(this.expressions[0].expression instanceof MoodExpression)e=FontStyles.Italic;else if(this.expressions[0].expression instanceof UnknownExpression){var t;e=null!==(t=this.expressions[0].expression.fontStyle)&&void 0!==t?t:FontStyles.Regular}return e}addExpression(e,t){e instanceof InstantaneousDynamicExpression?(this.instantaneousDynamic&&this.removeExpressionFromEntryList(this.InstantaneousDynamic),this.instantaneousDynamic=e,this.instantaneousDynamic.ParentMultiExpression=this):e instanceof ContinuousDynamicExpression?this.startingContinuousDynamic=e:e instanceof MoodExpression?this.moodList.push(e):e instanceof UnknownExpression&&this.unknownList.push(e),this.addExpressionToEntryList(e,t)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue=5&&e<=12}get TempoType(){return this.tempoType}set TempoType(e){this.tempoType=e}get StartTempo(){return this.startTempo}set StartTempo(e){this.startTempo=e}get EndTempo(){return this.endTempo}set EndTempo(e){this.endTempo=e}get AbsoluteEndTimestamp(){return this.absoluteEndTimestamp}set AbsoluteEndTimestamp(e){this.absoluteEndTimestamp=e}get AbsoluteTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp}getAbsoluteFloatTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp.RealValue}getInterpolatedTempo(e){const t=Fraction$1.plus(this.parentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.parentMultiTempoExpression.Timestamp);if(e.lt(t))return-1;if(this.absoluteEndTimestamp.lt(e))return-2;const n=Fraction$1.minus(e,t).RealValue/Fraction$1.minus(this.absoluteEndTimestamp,t).RealValue;return Math.max(0,Math.min(250,this.startTempo+(this.endTempo-this.startTempo)*n))}setTempoType(){_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoFaster,this.label)?this.tempoType=0:_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoSlower,this.label)&&(this.tempoType=9)}};let ContinuousTempoExpression=_ContinuousTempoExpression;ContinuousTempoExpression.listContinuousTempoFaster=["accelerando","piu mosso","poco piu","stretto"],ContinuousTempoExpression.listContinuousTempoSlower=["poco meno","meno mosso","piu lento","rallentando","ritardando","ritenuto","ritard.","ritard","riten.","riten"];class MultiTempoExpression{constructor(e,t){this.expressions=[],this.sourceMeasure=e,this.timestamp=t}get Timestamp(){return this.timestamp}get AbsoluteTimestamp(){return Fraction$1.plus(this.sourceMeasure.AbsoluteTimestamp,this.timestamp)}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(e){this.sourceMeasure=e}get InstantaneousTempo(){return this.instantaneousTempo}get ContinuousTempo(){return this.continuousTempo}get EntriesList(){return this.expressions}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(e){this.combinedExpressionsText=e}getPlacementOfFirstEntry(){let e=PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].Expression instanceof InstantaneousTempoExpression||this.expressions[0].Expression instanceof ContinuousTempoExpression)&&(e=this.expressions[0].Expression.Placement),e}getFontstyleOfFirstEntry(){let e=FontStyles.Regular;return this.expressions[0].Expression instanceof InstantaneousTempoExpression?e=FontStyles.Bold:this.expressions[0].Expression instanceof ContinuousTempoExpression&&(e=FontStyles.Italic),e}addExpression(e,t){if(this.checkIfAlreadyExists(e))return;e instanceof InstantaneousTempoExpression?this.instantaneousTempo=e:e instanceof ContinuousTempoExpression&&(this.continuousTempo=e);const n=new TempoExpressionEntry;n.prefix=t,n.Expression=e,n.label=e.Label,this.expressions.push(n)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue0){if(this.rules.MaxSystemToDrawNumber===this.musicSystems.length)return this.finalizeCurrentSystem(this.measureList[this.measureList.length-1],!this.rules.StretchLastSystemLine,!1),this.musicSystems;this.finalizeCurrentAndCreateNewSystem(this.measureList[this.measureList.length-1],!this.rules.StretchLastSystemLine,!1)}return this.musicSystems}calculateSystemYLayout(){for(const e of this.musicSystems)this.optimizeDistanceBetweenStaffLines(e);this.calculateMusicSystemsRelativePositions()}setMeasureWidth(e,t,n,i){for(let r=0,o=e.length;r0&&(o.beginInstructionsWidth=n),i>0&&(o.endInstructionsWidth=i)}}finalizeCurrentAndCreateNewSystem(e,t=!1,n=!0,i=!1){this.finalizeCurrentSystem(e,t,n,i),this.currentSystemParams=new SystemBuildParameters,void 0!==e&&this.measureListIndex=1){const t=this.currentSystemParams.currentSystem.GraphicalMeasures[this.currentSystemParams.currentSystem.GraphicalMeasures.length-1];let n=0;const i=e[e.length-1];i.endLine===SystemLinesEnum.DotsBoldBoldDots&&(i.endLine=SystemLinesEnum.DotsThinBold,n=t[0].getLineWidth(SystemLinesEnum.DotsBoldBoldDots)/2-t[0].getLineWidth(SystemLinesEnum.DotsThinBold)),this.currentSystemParams.currentSystemFixWidth-=n;for(let e=0,r=t.length;e1){o=!0;break}}let s=0;for(let a=0;a=0&&this.measureList[n]){var b;const t=null===(b=this.measureList[n][0])||void 0===b?void 0:b.parentSourceMeasure;null!=t&&t.ImplicitMeasure&&null!=t&&t.RhythmPrinted&&(e=!1)}e&&(t.addRhythmAtBegin(l),t.parentSourceMeasure.RhythmPrinted=l,f=!0)}return(d||p||f)&&(c+=t.beginInstructionsWidth,f&&(c+=this.rules.RhythmRightMargin)),c}addInstructionsAtMeasureEnd(e,t,n){if(!e||!e.Instructions||0===e.Instructions.length)return 0;for(let i=0,r=e.Instructions.length;i0&&(this.currentSystemParams.systemMeasures.push({beginLine:SystemLinesEnum.None,endLine:SystemLinesEnum.None}),this.currentSystemParams.currentWidth+=i,this.currentSystemParams.currentSystemFixWidth+=i)}addExtraInstructionMeasure(e,t,n){const i=this.currentSystemParams.currentSystem,r=MusicSheetCalculator.symbolFactory.createExtraGraphicalMeasure(i.StaffLines[e]);t&&r.addKeyAtBegin(t,this.activeKeys[e],this.activeClefs[e]),void 0!==n&&n.PrintObject&&r.addRhythmAtBegin(n),r.PositionAndShape.BorderLeft=0,r.PositionAndShape.BorderTop=0,r.PositionAndShape.BorderBottom=this.rules.StaffHeight;const o=this.rules.MeasureLeftMargin+r.beginInstructionsWidth+this.rules.MeasureRightMargin;return r.PositionAndShape.BorderRight=o,i.StaffLines[e].Measures.push(r),o}addStaveMeasuresToSystem(e){if(e[0]){const t=[];for(let i=0;i1){const t=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,e.measureListIndex+e.multipleRestMeasures-1);e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[t]}}finally{}const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures,n=t[this.measureListIndex];let i=!1;var r,o;n.allRests&&(i=null===(r=t[this.measureListIndex+n.multipleRestMeasures-1])||void 0===r||null===(o=r.endsWithLineRepetition)||void 0===o?void 0:o.call(r));return this.nextMeasureBeginsLineRepetition()&&this.thisMeasureEndsLineRepetition()?SystemLinesEnum.DotsBoldBoldDots:this.thisMeasureEndsLineRepetition()||i?SystemLinesEnum.DotsThinBold:this.nextMeasureHasKeyInstructionChange()||this.thisMeasureEndsWordRepetition()||this.nextMeasureBeginsWordRepetition()?SystemLinesEnum.DoubleThin:e&&void 0!==e.endingBarStyleEnum?e.endingBarStyleEnum:SystemLinesEnum.SingleThin}getLineWidth(e,t,n){let i=e.getLineWidth(t);return t===SystemLinesEnum.DotsBoldBoldDots&&(i/=2),n&&t===SystemLinesEnum.BoldThinDots&&(i+=this.rules.DistanceBetweenLastInstructionAndRepetitionBarline),i}previousMeasureEndsLineRepetition(){if(0===this.measureListIndex)return!1;for(let e=0,t=this.measureList[this.measureListIndex-1].length;e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||!this.measureList[e])return!1;for(let t=0,n=this.measureList[e].length;t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||e>this.measureList.length-1)return!1;for(let t=0,n=this.measureList[e].length;t1)for(let a=1;ar&&(r=n)}for(let a=0;athis.rules.PageHeight-this.rules.PageBottomMargin&&(i++,i<=4&&console.log(`warning: could not fit a single system on page ${e.PageNumber} and measure number ${n.GraphicalMeasures[0][0].MeasureNumber}.\n The PageFormat may be too small for this sheet."\n Will not give further warnings for all pages, only total.`))}else{var o,s;const i=this.musicSystems[a-1],l=i.StaffLines[i.StaffLines.length-1],c=l.PositionAndShape;let u=this.findRequiredDistanceWithSkyBottomLine(i,n);u=Math.max(r,u),u+=this.rules.MinSkyBottomDistBetweenSystems,"GYM"===(null===(o=window)||void 0===o||null===(s=o.appName)||void 0===s?void 0:s.toLocaleUpperCase())&&(u=u<16?16:u);const h=this.hasExpressionCounts(n);h.TempoCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),h.OtherCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),u=Math.max(u,this.rules.MinimumDistanceBetweenSystems+l.StaffHeight);const d=t+c.RelativePosition.y+u,p=d+n.PositionAndShape.BorderMarginBottom;if(this.rules.NewPageAtXMLNewPageAttribute&&i.breaksPage||!(p0&&console.log(`total amount of pages that couldn't fit a single music system: ${i} of ${e.PageNumber}`)}findRequiredDistanceWithSkyBottomLine(e,t){const n=e.StaffLines[e.StaffLines.length-1],i=t.StaffLines[0],r=n.BottomLine,o=i.SkyLine,s=n.PositionAndShape,a=i.PositionAndShape,l=1/this.rules.SamplingUnit;let c=0;for(let u=0;u=o.length)break;const n=Math.max(0,t-6),i=Math.min(o.length-1,t+6);let h=0;for(let r=n;r<=i;r++)h=Math.min(h,o[r]);const d=e-h;c=Math.max(d,c)}return 0===c&&(c=s.BorderBottom-a.BorderTop),c}}class SystemBuildParameters{constructor(){this.systemMeasures=[],this.systemMeasureIndex=0,this.currentWidth=0,this.currentSystemFixWidth=0,this.currentSystemVarWidth=0,this.maxLabelLength=0}IsSystemStartMeasure(){return 0===this.systemMeasureIndex}}class OctaveShiftParams{constructor(e,t,n){this.getOpenOctaveShift=e,this.getAbsoluteStartTimestamp=t,this.getAbsoluteEndTimestamp=n}}class AccidentalCalculator{constructor(){this.keySignatureNoteAlterationsDict=new Dictionary,this.currentAlterationsComparedToKeyInstructionList=[],this.currentInMeasureNoteAlterationsDict=new Dictionary}get ActiveKeyInstruction(){return this.activeKeyInstruction}set ActiveKeyInstruction(e){this.activeKeyInstruction=e,this.reactOnKeyInstructionChange()}doCalculationsAtEndOfMeasure(){this.currentInMeasureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.clear();for(const e of this.keySignatureNoteAlterationsDict.keys())this.currentInMeasureNoteAlterationsDict.setValue(e,this.keySignatureNoteAlterationsDict.getValue(e))}checkAccidental(e,t){if(!t)return;const n=t.FundamentalNote+12*t.Octave,i=this.currentAlterationsComparedToKeyInstructionList.indexOf(n)>=0;if(this.currentInMeasureNoteAlterationsDict.containsKey(n)){if(i&&this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(n),1),this.currentInMeasureNoteAlterationsDict.getValue(n)!==t.AccidentalHalfTones){this.keySignatureNoteAlterationsDict.containsKey(n)&&this.keySignatureNoteAlterationsDict.getValue(n)!==t.AccidentalHalfTones?(this.currentAlterationsComparedToKeyInstructionList.push(n),this.currentInMeasureNoteAlterationsDict.setValue(n,t.AccidentalHalfTones)):t.Accidental!==AccidentalEnum.NONE&&this.currentInMeasureNoteAlterationsDict.remove(n);const i=this.currentInMeasureNoteAlterationsDict.getValue(n);if(t.Accidental===AccidentalEnum.NONE&&(t=.5===Math.abs(i)?new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NONE):new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NATURAL)),this.isAlterAmbiguousAccidental(t.Accidental)&&!t.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t)}}else if(t.Accidental!==AccidentalEnum.NONE){if(i||this.currentAlterationsComparedToKeyInstructionList.push(n),this.currentInMeasureNoteAlterationsDict.setValue(n,t.AccidentalHalfTones),this.isAlterAmbiguousAccidental(t.Accidental)&&!t.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t)}else i&&(t=new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NATURAL),this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(n),1),MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t))}isAlterAmbiguousAccidental(e){return e===AccidentalEnum.SLASHFLAT||e===AccidentalEnum.QUARTERTONEFLAT}reactOnKeyInstructionChange(){const e=this.activeKeyInstruction.AlteratedNotes;let t;t=this.activeKeyInstruction.Key>0?AccidentalEnum.SHARP:AccidentalEnum.FLAT,this.keySignatureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.length=0;for(let n=-9;n<9;n++)for(let i=0;i0)n=u-1,e.push({startIndex:t,endIndex:n}),t=u;else{r.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(n=u,e.push({startIndex:t,endIndex:n}),t=u+1)}}t0?Number(e):6,m===e||f+u>n&&m%2==0?(r.push(m),f=t,m=1):m++}else f>n?(r.push(m),f=t,m=1):m++;g=t>n?a+1:Math.ceil(g),d===g?p+=1:(i.push(p),d=g,p=1)}i.push(p),r.push(m),r=r.filter(Boolean)}return r.length>1&&1===r[r.length-1]&&(r[r.length-2]=r[r.length-2]-1,r[r.length-1]=r[r.length-1]+1),console.log(r,i),this.buildPreparedMusicSystems(r)}buildPreparedMusicSystems(e){let t=!1;this.currentSystemParams=new SystemBuildParameters,this.currentSystemParams.currentSystem=this.initMusicSystem();for(let n=0,i=this.measureList.length;n0&&this.rules.RenderMultipleRestMeasures){o.isReducedToMultiRest=!0,o.multipleRestMeasureNumber=1;const n=o.multipleRestMeasures-1;l+=n;for(let i=1;i<=n;i++){const n=e.SourceMeasures[o.MeasureNumber-1+i];n.multipleRestMeasureNumber=i+1,n.isReducedToMultiRest=!0,t.push([void 0])}}}if(this.rules.AutoGenerateMutipleRestMeasuresFromRestMeasures&&this.rules.RenderMultipleRestMeasures){let o,a=0;for(let l=0,c=e.SourceMeasures.length;l0){o.isReducedToMultiRest=!0,o.multipleRestMeasureNumber=1,a++,c.multipleRestMeasureNumber=a,c.isReducedToMultiRest=!0;for(let e=0;e1){o.multipleRestMeasures=a;const e=this.createGraphicalMeasuresForSourceMeasure(o,n,r,s,i);t[o.measureListIndex]=e,a=0,o=void 0}else a=0,o=void 0}if(a>1){o.multipleRestMeasures=a,o.isReducedToMultiRest=!0;const e=this.createGraphicalMeasuresForSourceMeasure(o,n,r,s,i);t[o.measureListIndex]=e,a=0,o=void 0}}const a=i.map((e=>e.ClefType===ClefEnum.percussion));this.handleStaffEntries(a),this.calculateVerticalContainersList(),this.setIndicesToVerticalGraphicalContainers()}calculate(){this.musicSystems=[],this.clearSystemsAndMeasures(),this.clearRecreatedObjects(),this.createGraphicalTies(),this.calculateSheetLabelBoundingBoxes(),this.calculateXLayout(this.graphicalMusicSheet,this.maxInstrNameLabelLength()),this.graphicalMusicSheet.MusicPages.length=0,this.calculateMusicSystems(),GraphicalMusicSheet.transformRelativeToAbsolutePosition(this.graphicalMusicSheet)}calculateXLayout(e,t){let n=0;const i=this.rules.MaxInstructionsConstValue;if(this.graphicalMusicSheet.MeasureList.length>0){let e=this.graphicalMusicSheet.MeasureList[0],r=this.calculateMeasureXLayout(e);r=this.calculateMeasureWidthFromStaffEntries(e,r),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(e,r),n=1.2*r+t+i;for(let t=1;t0)return;const o=t.Measures[r];0!==o.MeasureNumber&&1!==o.MeasureNumber||(n=o.MeasureNumber),i=o!==t.Measures[0]&&this.rules.MeasureNumberLabelXOffset?this.rules.MeasureNumberLabelXOffset:0;const s=this.rules.UseXMLMeasureNumbers&&1===o.MeasureNumber&&1!==o.parentSourceMeasure.getPrintedMeasureNumber();((o.MeasureNumber===n||o.MeasureNumber>=n+this.rules.MeasureNumberLabelOffset)&&!o.parentSourceMeasure.ImplicitMeasure||s)&&((1!==o.MeasureNumber||1===o.MeasureNumber&&o!==t.Measures[0]||s)&&this.calculateSingleMeasureNumberPlacement(o,t,e,i),n=o.MeasureNumber)}}calculateSingleMeasureNumberPlacement(e,t,n,i=0){const r=e.parentSourceMeasure.getPrintedMeasureNumber().toString(),o=new Label(r),s=new GraphicalLabel(o,this.rules.MeasureNumberLabelHeight,TextAlignmentEnum.LeftBottom,this.rules),a=t.SkyBottomLineCalculator;s.setLabelPositionAndShapeBorders(),s.PositionAndShape.Parent=n.PositionAndShape;const l=t.PositionAndShape.RelativePosition.x+e.PositionAndShape.RelativePosition.x-s.PositionAndShape.BorderMarginLeft+i;let c,u=l,h=l-s.PositionAndShape.BorderLeft+s.PositionAndShape.BorderRight;u-=t.PositionAndShape.RelativePosition.x,h-=t.PositionAndShape.RelativePosition.x;const d=u+.5,p=h-.5,f=a.getSkyLineMinInRange(d,p);if(e===t.Measures[0]){let e=0;if(n.GroupBrackets.length>0)for(const t of n.GroupBrackets)e=Math.min(e,t.PositionAndShape.BorderTop);c=Math.min(f,e)}else c=f;c=Math.min(0,c),s.PositionAndShape.RelativePosition=new PointF2D(l,c),n.MeasureNumberLabels.push(s)}calculateMeasureNumberSkyline(e){const t=e.StaffLines[0];for(const n of e.MeasureNumberLabels){let e=n.PositionAndShape.RelativePosition.x,i=e-n.PositionAndShape.BorderLeft+n.PositionAndShape.BorderRight;e-=t.PositionAndShape.RelativePosition.x,i-=t.PositionAndShape.RelativePosition.x,t.SkyBottomLineCalculator.updateSkyLineInRange(e,i,n.PositionAndShape.RelativePosition.y+n.PositionAndShape.BorderMarginTop)}}layoutGraphicalTie(e,t,n){throw new Error(this.abstractNotImplementedErrorMessage)}calculateSingleStaffLineLyricsPosition(e,t){let n=0,i=this.rules.StaffHeight;const r=[],o=e.SkyBottomLineCalculator;let s=e.Measures.length;for(let l=0;l0){r.push(a),n=Math.max(n,a.LyricsEntries.length);const e=a.PositionAndShape.RelativePosition.x+s.x;let t=Number.MAX_VALUE,l=Number.MIN_VALUE;for(let n=0;n0){const t=e.PositionAndShape.Size.width;let n=r[0].PositionAndShape.RelativePosition.x+r[0].PositionAndShape.BorderMarginLeft+r[0].parentMeasure.PositionAndShape.RelativePosition.x;n=n>t?t:n,o.updateBottomLineInRange(n,t,a)}return r}calculateLyricsExtendsAndDashes(e){for(let t=0,n=e.length;t0||e.UnknownList.length>0){var s;let t="";for(let n=0,i=e.EntriesList.length;ne.length-1&&(loglevelExports.debug("minimum measure to draw index out of range. resetting min measure index to limit."),this.rules.MinMeasureToDrawIndex=e.length-1);const t=[];for(let r=this.rules.MinMeasureToDrawIndex,o=e.length;r0)&&(n=e.getSkyLineMinInRange(a,l));let c=0;0===i?(c+=this.rules.ChordSymbolYOffset,c+=.1):c+=this.rules.ChordSymbolYPadding,c*=-1;const u=r.GraphicalLabel;u.PositionAndShape.RelativePosition.y=n+c,u.setLabelPositionAndShapeBorders(),u.PositionAndShape.calculateBoundingBox(),e.updateSkyLineInRange(a,l,n+u.PositionAndShape.BorderMarginTop)}}}}calculateAlignedChordSymbolsOffset(e,t){let n=Number.MAX_SAFE_INTEGER;for(const i of e)for(const e of i.graphicalChordContainers){const r=i.PositionAndShape,o=e.PositionAndShape,s=o.BorderMarginLeft+r.AbsolutePosition.x,a=o.BorderMarginRight+r.AbsolutePosition.x;n=Math.min(n,t.getSkyLineMinInRange(s,a))}return n}layoutMeasureWithWholeRest(e,t,n){}layoutBeams(e){}layoutArticulationMarks(e,t,n){}layoutOrnament(e,t,n){}calculateRestNotePlacementWithinGraphicalBeam(e,t,n,i,r){}calculateTupletNumbers(){}calculateSlurs(){}calculateDynamicExpressionsForMultiExpression(e,t,n){}calculateGraphicalVerbalContinuousDynamic(e,t){const n=e.Label,i=t.x+n.PositionAndShape.BorderMarginLeft,r=t.x+n.PositionAndShape.BorderMarginRight,o=e.ContinuousDynamic.Placement,s=e.ParentStaffLine.SkyBottomLineCalculator;let a;o===PlacementEnum.Below?(a=s.getBottomLineMaxInRange(i,r),n.PositionAndShape.RelativePosition=new PointF2D(t.x,a-n.PositionAndShape.BorderMarginTop)):(a=s.getSkyLineMinInRange(i,r),n.PositionAndShape.RelativePosition=new PointF2D(t.x,a-n.PositionAndShape.BorderMarginBottom))}calculateGraphicalContinuousDynamic(e,t){var n,i;const r=e.ParentStaffLine.ParentStaff.idInMusicSheet,o=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(e.ContinuousDynamic.EndMultiExpression.SourceMeasureParent,r);if(!o)return void loglevelExports.warn("MusicSheetCalculator.calculateGraphicalContinuousDynamic: No endMeasure found");e.EndMeasure=o;const s=e.ParentStaffLine,a=o.ParentStaffLine,l=a&&s===a;let c=!1;a?c=null==a?void 0:a.isPartOfMultiStaffInstrument():s&&(c=null==s?void 0:s.isPartOfMultiStaffInstrument());const u=Fraction$1.createFromFraction(e.ContinuousDynamic.EndMultiExpression.AbsoluteTimestamp),h=this.graphicalMusicSheet.GetVerticalContainerFromTimestamp(u),d=h.getFirstNonNullStaffEntry().parentMeasure,p=d.PositionAndShape.AbsolutePosition.x+d.PositionAndShape.BorderRight;let f=new Fraction$1(0,0,0);for(const B of h.StaffEntries){var m;const e=null==B||null===(m=B.sourceStaffEntry)||void 0===m?void 0:m.calculateMaxNoteLength();null!=e&&e.gt(f)&&(f=e)}const g=this.getRelativePositionInStaffLineFromTimestamp(u,r,a,c,0),v=Fraction$1.plus(u,f),b=this.getRelativePositionInStaffLineFromTimestamp(v,r,a,c,0);b.x>g.x&&b.xS){const t=y.StaffLines[e].PositionAndShape.RelativePosition.y-s.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;I=this.rules.StaffHeight+t/2}else I=this.rules.WedgePlacementBelowY;I-=this.rules.WedgeOpeningLength/2,l||(k=I);let t=x.getBottomLineMaxInRange(M,T);if(t>I&&(I=t),Sk&&(k=t),k+=this.rules.WedgeOpeningLength/2,k+=this.rules.WedgeVerticalMargin),I+=this.rules.WedgeOpeningLength/2,I+=this.rules.WedgeVerticalMargin}else if(w===PlacementEnum.Above){if(1===s.ParentStaff.ParentInstrument.Staves.length)I=this.rules.WedgePlacementAboveY;else{let e=0;S>0&&(e=S-1);const t=y.StaffLines[e];I=-(s.PositionAndShape.RelativePosition.y-t.PositionAndShape.RelativePosition.y-this.rules.StaffHeight)/2}I+=this.rules.WedgeOpeningLength/2,l||(k=I);let e=x.getSkyLineMinInRange(M,T);if(e1&&S>0){const e=s.findClosestStaffEntry(M),t=s.findClosestStaffEntry(T);e&&t&&e.parentVerticalContainer}l||(e=a.SkyBottomLineCalculator.getSkyLineMinInRange(P,C),e-r/2?-r/2:n-e.PositionAndShape.BorderMarginBottom}else a=n-e.PositionAndShape.BorderMarginBottom;e.PositionAndShape.RelativePosition=new PointF2D(t.x,a)}else if(e.Placement===PlacementEnum.Below){const n=s.getBottomLineMaxInRange(r,o),l=i.ParentStaff.ParentInstrument.Staves[i.ParentStaff.ParentInstrument.Staves.length-1];if(i.isPartOfMultiStaffInstrument()&&i.ParentStaff!==l){const t=i.ParentMusicSystem.StaffLines[i.ParentMusicSystem.StaffLines.indexOf(i)+1].PositionAndShape.RelativePosition.y-i.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;a=n+e.PositionAndShape.BorderMarginBottome.PositionAndShape.Size.width&&(d=e.PositionAndShape.Size.width-this.rules.MeasureRightMargin,h=d-l.PositionAndShape.MarginSize.width,t.x=h-l.PositionAndShape.BorderMarginLeft);const p=e.SkyBottomLineCalculator;return u=r===PlacementEnum.Below?p.getBottomLineMaxInRange(h,d):p.getSkyLineMinInRange(h,d),l.PositionAndShape.RelativePosition=new PointF2D(t.x,u),r===PlacementEnum.Below?p.updateBottomLineInRange(h,d,l.PositionAndShape.BorderMarginBottom+u):p.updateSkyLineInRange(h,d,l.PositionAndShape.BorderMarginTop+u),l}calculateTempoExpressionsForMultiTempoExpression(e,t,n,i){metronomeMarks={};const r=Fraction$1.plus(e.AbsoluteTimestamp,t.Timestamp),o=this.graphicalMusicSheet.MeasureList[n];let s=new PointF2D;if(t.ContinuousTempo||t.InstantaneousTempo){if(this.rules.MinMeasureToDrawIndex>0)return;if(!o[0])return;let a=o[0].ParentStaffLine,l=o[0].PositionAndShape.RelativePosition.x,c=0;for(let e=0;e0){a=o[e].ParentStaffLine,l=o[e].PositionAndShape.RelativePosition.x,c=e;break}if(s=this.getRelativePositionInStaffLineFromTimestamp(r,c,a,a.isPartOfMultiStaffInstrument(),l),t.EntriesList.length>0&&t.EntriesList[0].Expression instanceof InstantaneousTempoExpression){if(t.EntriesList[0].Expression.Placement=PlacementEnum.Above,a.Measures[0].staffEntries.length>0&&0===Math.abs(s.x-a.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x)&&a.ParentMusicSystem===this.musicSystems[0]){const e=a.Measures[0].FirstInstructionStaffEntry;if(e){const t=e.GraphicalInstructions.last();s.x=t.PositionAndShape.RelativePosition.x}this.rules.CompactMode&&(s.x=a.PositionAndShape.RelativePosition.x+a.Measures[0].PositionAndShape.RelativePosition.x)}}for(const r of t.EntriesList){let o=TextAlignmentEnum.CenterBottom;this.rules.CompactMode&&(o=TextAlignmentEnum.LeftBottom);const l=this.calculateLabel(a,s,r.label,t.getFontstyleOfFirstEntry(),r.Expression.Placement,this.rules.UnknownTextHeight,o);if(r.Expression instanceof InstantaneousTempoExpression){for(const e of a.AbstractExpressions)e instanceof GraphicalInstantaneousTempoExpression&&(e.SourceExpression.Label,r.Expression.Label);new GraphicalInstantaneousTempoExpression(r.Expression,l).ParentStaffLine||loglevelExports.warn("Adding staffline didn't work"),r.Expression.Enum===TempoEnum.metronomeMark&&(metronomeMarks[n]=r.Expression)}else r.Expression;if(i===e.TempoExpressions.length-1)for(const e of Object.values(metronomeMarks))this.createMetronomeMark(e,n)}}}createMetronomeMark(e,t){throw new Error(this.abstractNotImplementedErrorMessage)}graphicalMeasureCreatedCalculations(e){}clearSystemsAndMeasures(){for(let e=0,t=this.graphicalMusicSheet.MusicPages.length;e-1&&n.PositionAndShape.ChildElements.splice(e,1),n.FirstInstructionStaffEntry=void 0,n.beginInstructionsWidth=0}if(n.LastInstructionStaffEntry){const e=n.PositionAndShape.ChildElements.indexOf(n.LastInstructionStaffEntry.PositionAndShape);e>-1&&n.PositionAndShape.ChildElements.splice(e,1),n.LastInstructionStaffEntry=void 0,n.endInstructionsWidth=0}}t.Measures=[],t.PositionAndShape.ChildElements=[]}n.StaffLines.length=0,n.PositionAndShape.ChildElements=[]}t.MusicSystems=[],t.PositionAndShape.ChildElements=[]}this.graphicalMusicSheet.MusicPages=[]}handleVoiceEntry(e,t,n,i,r,o,s,a,l,c=undefined,u=undefined){e.StemDirectionXml!==StemDirectionType.Undefined&&this.rules.SetWantedStemDirectionByXml&&void 0!==e.StemDirectionXml?e.WantedStemDirection=e.StemDirectionXml:this.calculateStemDirectionFromVoices(e);const h=t.findOrCreateGraphicalVoiceEntry(e);h.octaveShiftValue=a;const d=t.tabStaffEntry;let p;d&&(p=d.findOrCreateGraphicalVoiceEntry(e));for(let f=0,m=e.Notes.length;f-1)continue;let l;if(e.IsGrace?l=MusicSheetCalculator.symbolFactory.createGraceNote(i,h,r,this.rules,a):(l=MusicSheetCalculator.symbolFactory.createNote(i,h,r,a,this.rules,void 0),MusicSheetCalculator.stafflineNoteCalculator.trackNote(l)),i.Pitch&&this.checkNoteForAccidental(l,n,r,a),this.resetYPositionForLeadSheet(l.PositionAndShape),t.addGraphicalNoteToListAtCorrectYPosition(h,l),l.PositionAndShape.calculateBoundingBox(),this.leadSheet||(void 0!==i.NoteBeam&&i.PrintObject&&this.handleBeam(l,i.NoteBeam,s),void 0!==i.NoteTuplet&&i.PrintObject&&this.handleTuplet(l,i.NoteTuplet,o)),p){const e=MusicSheetCalculator.symbolFactory.createNote(i,p,r,a,this.rules,void 0);d.addGraphicalNoteToListAtCorrectYPosition(p,e),e.PositionAndShape.calculateBoundingBox(),this.leadSheet||i.NoteTuplet&&this.handleTuplet(e,i.NoteTuplet,o)}}return e.Articulations.length>0&&this.handleVoiceEntryArticulations(e.Articulations,e,t),e.TechnicalInstructions.length>0&&this.handleVoiceEntryTechnicalInstructions(e.TechnicalInstructions,e,t),e.LyricsEntries.size()>0&&this.handleVoiceEntryLyrics(e,t,i),e.OrnamentContainer&&this.handleVoiceEntryOrnaments(e.OrnamentContainer,e,t),a}resetYPositionForLeadSheet(e){this.leadSheet&&(e.RelativePosition=new PointF2D(e.RelativePosition.x,0))}layoutVoiceEntries(e,t){if(e.PositionAndShape.RelativePosition=new PointF2D(0,0),!this.leadSheet)for(const n of e.graphicalVoiceEntries){const t=n.notes;if(0===t.length)continue;const i=t[0].sourceNote.ParentVoiceEntry,r=void 0!==t[0].sourceNote.Pitch;this.layoutVoiceEntry(i,t,e,r)}}maxInstrNameLabelLength(){let e=0;for(const n of this.graphicalMusicSheet.ParentMusicSheet.Instruments){var t;if(null!==(t=n.NameLabel)&&void 0!==t&&t.print&&n.Voices.length>0&&n.Voices[0].Visible){let t=n.NameLabel;this.rules.RenderPartNames||(t=new Label("",t.textAlignment,t.font));const i=new GraphicalLabel(t,this.rules.InstrumentLabelTextHeight,TextAlignmentEnum.LeftCenter,this.rules);i.setLabelPositionAndShapeBorders(),e=Math.max(e,i.PositionAndShape.MarginSize.width)}}return this.rules.RenderPartNames?e:0}calculateSheetLabelBoundingBoxes(){var e;const t=this.graphicalMusicSheet.ParentMusicSheet,n=this.rules.DefaultColorTitle;if(void 0!==t.Title&&this.rules.RenderTitle){const e=new GraphicalLabel(t.Title,this.rules.SheetTitleHeight,TextAlignmentEnum.CenterBottom,this.rules);e.Label.IsCreditLabel=!0,e.Label.colorDefault=n,this.graphicalMusicSheet.Title=e,e.setLabelPositionAndShapeBorders()}else this.rules.RenderTitle||(this.graphicalMusicSheet.Title=void 0);if(void 0!==t.Subtitle&&this.rules.RenderSubtitle){const e=new GraphicalLabel(t.Subtitle,this.rules.SheetSubtitleHeight,TextAlignmentEnum.CenterCenter,this.rules);e.Label.IsCreditLabel=!0,e.Label.colorDefault=n,this.graphicalMusicSheet.Subtitle=e,e.setLabelPositionAndShapeBorders()}else this.rules.RenderSubtitle||(this.graphicalMusicSheet.Subtitle=void 0);if(void 0!==t.Composer&&this.rules.RenderComposer){const e=new GraphicalLabel(t.Composer,this.rules.SheetComposerHeight,TextAlignmentEnum.RightCenter,this.rules);e.Label.IsCreditLabel=!0,e.Label.colorDefault=n,this.graphicalMusicSheet.Composer=e,e.setLabelPositionAndShapeBorders()}else this.rules.RenderComposer||(this.graphicalMusicSheet.Composer=void 0);if(void 0!==t.Lyricist&&this.rules.RenderLyricist){const e=new GraphicalLabel(t.Lyricist,this.rules.SheetAuthorHeight,TextAlignmentEnum.LeftCenter,this.rules);e.Label.IsCreditLabel=!0,e.Label.colorDefault=n,this.graphicalMusicSheet.Lyricist=e,e.setLabelPositionAndShapeBorders()}else this.rules.RenderLyricist||(this.graphicalMusicSheet.Lyricist=void 0);const i=null===(e=this.graphicalMusicSheet.musicSheet.sourceMeasures)||void 0===e?void 0:e[0];if(i&&i.FirstInstructionsStaffEntries.length>0){const e=i.FirstInstructionsStaffEntries[0];let r,o;for(let t=0,n=e.Instructions.length;t0&&1===e.graphicalVoiceEntries[0].notes.length){const n=e.graphicalVoiceEntries[0].notes[0];!n.sourceNote.Pitch&&new Fraction$1(1,2).lt(n.sourceNote.Length)&&this.layoutMeasureWithWholeRest(n,e,t)}}}}}}optimizeRestNotePlacement(e,t){if(0===e.graphicalVoiceEntries.length)return;const n=e.graphicalVoiceEntries[0].notes;if(0===n.length)return;const i=n[0],r=i.sourceNote.isRest();if(2===e.graphicalVoiceEntries.length){let t=!1;const n=e.graphicalVoiceEntries[1].notes;if(n.length>0){t=n[0].sourceNote.isRest()}r&&t?this.calculateTwoRestNotesPlacementWithCollisionDetection(e):(r||t)&&this.calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(e)}else if(r&&e!==t.staffEntries[0]&&e!==t.staffEntries[t.staffEntries.length-1]){const n=t.staffEntries.indexOf(e),r=t.staffEntries[n-1],o=t.staffEntries[n+1];if(1===r.graphicalVoiceEntries.length){const t=r.graphicalVoiceEntries[0].notes[0];if(void 0!==t.sourceNote.NoteBeam&&1===o.graphicalVoiceEntries.length){const n=o.graphicalVoiceEntries[0].notes[0];void 0!==n.sourceNote.NoteBeam&&t.sourceNote.NoteBeam===n.sourceNote.NoteBeam&&(this.calculateRestNotePlacementWithinGraphicalBeam(e,i,t,o,n),e.PositionAndShape.calculateBoundingBox())}}}}getRelativePositionInStaffLineFromTimestamp(e,t,n,i,r=0){let o,s,a=new PointF2D;const l=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,c=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),u=Math.min(Math.floor(c),l-1),h=Math.min(Math.ceil(c),l-1);if(u<0||t<0)return a;if(o=this.getFirstLeftNotNullStaffEntryFromContainer(u,t,i),s=this.getFirstRightNotNullStaffEntryFromContainer(h,t,i),o&&s){let t=o.parentMeasure.PositionAndShape.RelativePosition.x;r>0&&(t=r);let i=o.PositionAndShape.RelativePosition.x+t,l=s.PositionAndShape.RelativePosition.x+s.parentMeasure.PositionAndShape.RelativePosition.x;r>0&&(l=s.PositionAndShape.RelativePosition.x+t);let c=0;if(o!==s){const t=o.getAbsoluteTimestamp(),n=s.getAbsoluteTimestamp();c=Fraction$1.minus(e,t).RealValue/Fraction$1.minus(n,t).RealValue}o.parentMeasure.ParentStaffLine!==s.parentMeasure.ParentStaffLine&&(o.parentMeasure.ParentStaffLine===n?l=n.PositionAndShape.Size.width:i=n.PositionAndShape.RelativePosition.x),a=new PointF2D(i+(l-i)*c,0)}return a}getRelativeXPositionFromTimestamp(e){const t=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,n=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),i=Math.max(0,Math.min(Math.round(n),t-1)),r=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[i].getFirstNonNullStaffEntry();return r.PositionAndShape.RelativePosition.x+r.parentMeasure.PositionAndShape.RelativePosition.x}calculatePageLabels(e){this.rules.RenderSingleHorizontalStaffline&&(e.PositionAndShape.BorderRight=e.PositionAndShape.Size.width,e.PositionAndShape.calculateBoundingBox(),this.graphicalMusicSheet.ParentMusicSheet.pageWidth=e.PositionAndShape.Size.width);let t=10;if(e.MusicSystems.length>0){const n=e.MusicSystems[0];t=n.PositionAndShape.RelativePosition.y+n.PositionAndShape.BorderTop}if(this.graphicalMusicSheet.Title){const t=this.graphicalMusicSheet.Title;t.PositionAndShape.Parent=e.PositionAndShape;const n=new PointF2D;n.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,n.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight,t.PositionAndShape.RelativePosition=n,e.Labels.push(t)}if(this.graphicalMusicSheet.Subtitle){const t=this.graphicalMusicSheet.Subtitle;t.PositionAndShape.Parent=e.PositionAndShape;const n=new PointF2D;n.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,n.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight+this.rules.SheetMinimumDistanceBetweenTitleAndSubtitle,t.PositionAndShape.RelativePosition=n,e.Labels.push(t)}const n=this.graphicalMusicSheet.Composer;let i;if(n){var r;n.PositionAndShape.Parent=e.PositionAndShape,n.setLabelPositionAndShapeBorders();const o=new PointF2D;o.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,o.y=t,o.y-=this.rules.SystemComposerDistance;const s=null===(r=n.TextLines)||void 0===r?void 0:r.length;s>1&&(o.y-=n.PositionAndShape.BorderBottom*(s-1)/s),i=o.y,n.PositionAndShape.RelativePosition=o,e.Labels.push(n)}const o=this.graphicalMusicSheet.Lyricist;if(o){var s;o.PositionAndShape.Parent=e.PositionAndShape,o.setLabelPositionAndShapeBorders();const n=new PointF2D;n.x=this.rules.PageLeftMargin,n.y=t,n.y+=o.PositionAndShape.BorderBottom,n.y=Math.min(n.y,null!==(s=i)&&void 0!==s?s:Number.MAX_SAFE_INTEGER),o.PositionAndShape.RelativePosition=n,e.Labels.push(o)}}createGraphicalTies(){for(let e=0;e=0&&this.staffEntriesWithGraphicalTies.push(a)}a=o}}setTieDirections(e){if(!e)return;const t=e.ties;if(t.length>1){let e;for(const n of t){const t=n.Notes[0];(!e||t.Pitch.getHalfTone()>e.Pitch.getHalfTone())&&(e=t)}for(const n of t)n.TieDirection===PlacementEnum.NotYetDefined&&(n.Notes[0]===e?n.TieDirection=PlacementEnum.Above:n.TieDirection=PlacementEnum.Below)}}createAccidentalCalculators(){const e=[],t=this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();if(t)for(let n=0;n1)return;u=MusicSheetCalculator.symbolFactory.createGraphicalMeasure(e,c)}if(u.hasError=e.getErrorInMeasure(a),e.FirstInstructionsStaffEntries[a])for(let b=0,A=e.FirstInstructionsStaffEntries[a].Instructions.length;b0){const t=c.Instructions[0];MusicSheetCalculator.symbolFactory.createInStaffClef(e,t)}this.rules.RenderChordSymbols&&(null===(p=c.ChordContainers)||void 0===p?void 0:p.length)>0&&(c.ParentStaff.ParentInstrument.HasChordSymbols=!0,MusicSheetCalculator.symbolFactory.createChordSymbols(c,e,i.ActiveKeyInstruction,this.graphicalMusicSheet.ParentMusicSheet.Transpose))}}if(i.doCalculationsAtEndOfMeasure(),e.LastInstructionsStaffEntries[a]){const t=e.LastInstructionsStaffEntries[a];for(let e=0,n=t.Instructions.length;e=1&&0===u.staffEntries.length){const t=new SourceStaffEntry(new VerticalSourceStaffEntryContainer(u.parentSourceMeasure,u.parentSourceMeasure.AbsoluteTimestamp,u.parentSourceMeasure.CompleteNumberOfStaves),c),n=new VoiceEntry(new Fraction$1(0,1),c.Voices[0],t),i=new Note$1(n,t,Fraction$1.createFromFraction(e.Duration),void 0,e);i.PrintObject=this.rules.FillEmptyMeasuresWithWholeRest===FillEmptyMeasuresWithWholeRests.YesVisible,n.addNote(i);const r=MusicSheetCalculator.symbolFactory.createStaffEntry(t,u);u.addGraphicalStaffEntry(r),r.relInMeasureTimestamp=n.Timestamp;const o=MusicSheetCalculator.symbolFactory.createVoiceEntry(n,r);r.graphicalVoiceEntries.push(o);const s=MusicSheetCalculator.symbolFactory.createNote(i,o,new ClefInstruction,OctaveEnum.NONE,void 0);MusicSheetCalculator.stafflineNoteCalculator.trackNote(s),o.notes.push(s)}u.hasOnlyRests=!0;for(const b of u.staffEntries)if(u.hasOnlyRests=b.hasOnlyRests(),!u.hasOnlyRests)break;return u}checkNoteForAccidental(e,t,n,i){let r=e.sourceNote.Pitch;const o=e.parentVoiceEntry.parentStaffEntry.parentMeasure.getTransposedHalftones();0!==o&&e.sourceNote.ParentStaffEntry.ParentStaff.ParentInstrument.MidiInstrumentId!==MidiInstrument.Percussion&&(r=e.Transpose(t.ActiveKeyInstruction,n,o,i),e.sourceNote.TransposedPitch=r),e.sourceNote.halfTone=r.getHalfTone(),t.checkAccidental(e,r)}handleStaffEntries(e){for(let t=0,n=this.graphicalMusicSheet.MeasureList.length;t0&&e.graphicalVoiceEntries[0].notes.length>0&&(this.layoutVoiceEntries(e,t),this.layoutStaffEntry(e));this.graphicalMeasureCreatedCalculations(i)}}}}calculateSkyBottomLines(){for(const e of this.musicSystems)for(const t of e.StaffLines)t.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){}calculateStaffEntryArticulationMarks(){for(let e=0,t=this.musicSystems.length;e0&&this.layoutArticulationMarks(t.Articulations,t,n)}}}}}}calculateOrnaments(){for(let e=0,t=this.musicSystems.length;e0&&e.LyricVersesNumbers.sort()}for(let t=0,n=this.musicSystems.length;t=0&&(i=t.GraphicalLyricsEntries[n+1]),!i)return;const r=e.StaffEntryParent.parentMeasure.ParentStaffLine,o=i.StaffEntryParent.parentMeasure.ParentStaffLine,s=e.StaffEntryParent,a=i.StaffEntryParent;if(e.StaffEntryParent.parentMeasure.ParentStaffLine===i.StaffEntryParent.parentMeasure.ParentStaffLine){const t=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,n=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+i.GraphicalLabel.PositionAndShape.BorderMarginLeft,o=e.GraphicalLabel.PositionAndShape.RelativePosition.y;let l=1;n-t>3*this.rules.MinimumDistanceBetweenDashes&&(l=Math.floor((n-t)/this.rules.MinimumDistanceBetweenDashes)-1),1===l?this.calculateSingleDashForLyricWord(r,t,n,o):this.calculateDashes(r,t,n,o)}else{const t=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,n=r.Measures[r.Measures.length-1],l=n.PositionAndShape.RelativePosition.x+n.PositionAndShape.Size.width;let c=e.GraphicalLabel.PositionAndShape.RelativePosition.y;if(this.calculateDashes(r,t,l,c),o&&o.Measures[0]&&a.parentMeasure.ParentStaffLine&&(a!==a.parentMeasure.staffEntries[0]||a.parentMeasure!==a.parentMeasure.ParentStaffLine.Measures[0])){const e=o.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,t=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+i.GraphicalLabel.PositionAndShape.BorderMarginLeft;c=i.GraphicalLabel.PositionAndShape.RelativePosition.y,this.calculateDashes(o,e,t,c)}}}calculateDashes(e,t,n,i){let r=n-t;if(r<3*this.rules.MinimumDistanceBetweenDashes)this.calculateSingleDashForLyricWord(e,t,n,i);else{const o=Math.floor(r/this.rules.MinimumDistanceBetweenDashes)-1,s=r/(o+1);let a=0;for(t+=s,n-=s;a<=Math.floor(o/2)&&n>t;)r=this.calculateRightAndLeftDashesForLyricWord(e,t,n,i),t+=s,n-=s,a++;r>2*s&&this.calculateSingleDashForLyricWord(e,t,n,i)}}calculateSingleDashForLyricWord(e,t,n,i){const r=new Label("-"),o=new GraphicalLabel(r,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);o.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(o),-1===this.staffLinesWithLyricWords.indexOf(e)&&this.staffLinesWithLyricWords.push(e),o.PositionAndShape.Parent=e.PositionAndShape;const s=new PointF2D(t+(n-t)/2,i);o.PositionAndShape.RelativePosition=s}calculateLyricExtend(e){let t=e.GraphicalLabel.PositionAndShape.RelativePosition.y;const n=e.StaffEntryParent,i=n.parentMeasure.ParentStaffLine;let r,o;const s=n.parentMeasure.ParentStaff.idInMusicSheet;for(let a=n.parentVerticalContainer.Index+1;a0)break;r=e,o=r.parentMeasure.ParentStaffLine,o||(o=n.parentMeasure.ParentStaffLine)}}if(r&&o)if(i===o&&r.parentMeasure.ParentStaffLine){const o=n.parentMeasure.PositionAndShape.RelativePosition.x+n.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,s=r.parentMeasure.PositionAndShape.RelativePosition.x+r.PositionAndShape.RelativePosition.x+r.PositionAndShape.BorderMarginRight;t-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(i,o,s,t)}else{const s=i.Measures[i.Measures.length-1].PositionAndShape,a=n.parentMeasure.PositionAndShape.RelativePosition.x+n.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,l=s.RelativePosition.x+s.Size.width;if(t-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(i,a,l,t),!r)return;if(r.parentMeasure.ParentStaffLine&&r.parentMeasure.staffEntries&&(r!==r.parentMeasure.staffEntries[0]||r.parentMeasure!==r.parentMeasure.ParentStaffLine.Measures[0])){const e=o.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,n=r.parentMeasure.PositionAndShape.RelativePosition.x+r.PositionAndShape.RelativePosition.x+r.PositionAndShape.BorderMarginRight;this.calculateSingleLyricWordWithUnderscore(o,e,n,t)}}}calculateSingleLyricWordWithUnderscore(e,t,n,i){const r=new PointF2D(t,i),o=new PointF2D(n,i),s=new GraphicalLine(r,o,this.rules.LyricUnderscoreLineWidth);e.LyricLines.push(s),-1===this.staffLinesWithLyricWords.indexOf(e)&&this.staffLinesWithLyricWords.push(e)}calculateRightAndLeftDashesForLyricWord(e,t,n,i){const r=new Label("-"),o=new GraphicalLabel(r,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);o.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(o),-1===this.staffLinesWithLyricWords.indexOf(e)&&this.staffLinesWithLyricWords.push(e),o.PositionAndShape.Parent=e.PositionAndShape;const s=new PointF2D(t,i);o.PositionAndShape.RelativePosition=s;const a=new Label("-"),l=new GraphicalLabel(a,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);l.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(l),l.PositionAndShape.Parent=e.PositionAndShape;const c=new PointF2D(n,i);return l.PositionAndShape.RelativePosition=c,l.PositionAndShape.RelativePosition.x-o.PositionAndShape.RelativePosition.x}calculateDynamicExpressions(){const e=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,this.rules.MaxMeasureToDrawIndex);for(let t=Math.min(this.rules.MinMeasureToDrawIndex,this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length);t<=e;t++){const e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[t];this.dynamicExpressionMap.clear();for(let n=0;n=0;o--){var r;if(null!==(r=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[o])&&void 0!==r&&r.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[o].StaffEntries[t]}}getFirstRightNotNullStaffEntryFromContainer(e,t,n){var i;if(null!==(i=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e])&&void 0!==i&&i.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].StaffEntries[t];for(let o=e+1;o0||t.StaffLinkedExpressions[n][i].UnknownList.length>0)&&this.calculateMoodAndUnknownExpression(t.StaffLinkedExpressions[n][i],e,n)}}calculateStemDirectionFromVoices(e){if(void 0!==e.ParentSourceStaffEntry.Link)return e===e.ParentSourceStaffEntry.VoiceEntries[0]?void(e.WantedStemDirection=StemDirectionType.Up):void(e.WantedStemDirection=StemDirectionType.Down);e.ParentVoice instanceof LinkedVoice?e.WantedStemDirection=StemDirectionType.Down:e.ParentSourceStaffEntry.VoiceEntries.length>1&&(e.WantedStemDirection=StemDirectionType.Up)}setBeamNotesWantedStemDirections(e){if(!(e.Notes.length>0))return;const t=e.Notes[0].NoteBeam;if(t)for(const n of t.Notes)if(n.ParentVoiceEntry.WantedStemDirection!==StemDirectionType.Undefined&&n.ParentVoiceEntry.ParentSourceStaffEntry.ParentStaff.Id===e.ParentSourceStaffEntry.ParentStaff.Id){e.WantedStemDirection=n.ParentVoiceEntry.WantedStemDirection;break}}}class ChordSymbolContainer{constructor(e,t,n,i,r){this.rootPitch=e,this.chordKind=t,this.bassPitch=n,this.degrees=i,this.rules=r}get RootPitch(){return this.rootPitch}get ChordKind(){return this.chordKind}get BassPitch(){return this.bassPitch}get ChordDegrees(){return this.degrees}static calculateChordText(e,t,n){let i=e.RootPitch;if(MusicSheetCalculator.transposeCalculator&&(i=MusicSheetCalculator.transposeCalculator.transposePitch(e.RootPitch,n,t)),31===e.ChordKind)return e.getTextFromChordKindEnum(e.ChordKind);let r=Pitch.getNoteEnumString(i.FundamentalNote);i.Accidental!==AccidentalEnum.NONE&&(r+=this.getTextForAccidental(i.Accidental));const o={adds:[],alts:[],subs:[]};for(const c of e.ChordDegrees)if(c){let e="";switch(c.alteration!==AccidentalEnum.NONE&&(e+=this.getTextForAccidental(c.alteration)),e+=c.value,c.text){case 0:o.adds.push(e);break;case 1:o.alts.push(e);break;case 2:o.subs.push(e)}}let s=e.getTextFromChordKindEnum(e.ChordKind);const a=["adds","alts","subs"],l=e.rules.CustomChords;for(const c of l){if(c.chordKind!==e.chordKind)continue;let t=!0;for(const e of a){for(const n of c.degrees[e]||[])if(o[e].indexOf(n)<0){t=!1;break}if(!t)break}if(t){for(const e of a)for(const t of c.degrees[e]||[])o[e].splice(o[e].indexOf(t),1);s=c.alternateName}}if(r+=s,o.adds.length>0&&(r+="("+o.adds.join(",")+")"),o.alts.length>0&&(r+="(alt "+o.alts.join(",")+")"),o.subs.length>0&&(r+="(omit "+o.subs.join(",")+")"),e.BassPitch){let i=e.BassPitch;MusicSheetCalculator.transposeCalculator&&(i=MusicSheetCalculator.transposeCalculator.transposePitch(e.BassPitch,n,t)),r+="/",r+=Pitch.getNoteEnumString(i.FundamentalNote),r+=this.getTextForAccidental(i.Accidental)}return r}static getTextForAccidental(e){let t="";switch(e){case AccidentalEnum.DOUBLEFLAT:t+="bb";break;case AccidentalEnum.FLAT:t+="b";break;case AccidentalEnum.SHARP:t+="#";break;case AccidentalEnum.DOUBLESHARP:t+="x"}return t}getTextFromChordKindEnum(e){var t;return null!==(t=this.rules.ChordSymbolLabelTexts.getValue(e))&&void 0!==t?t:""}}class Degree{constructor(e,t,n){this.value=e,this.alteration=t,this.text=n}}class CustomChord{constructor(e,t,n){this.alternateName=e,this.chordKind=t,this.degrees=n}static createCustomChord(e,t,n){return new CustomChord(e,t,n)}static renameCustomChord(e,t,n){for(const i of n)i.alternateName===e&&(i.alternateName=t)}}var ChordDegreeText=(e=>(e[e.add=0]="add",e[e.alter=1]="alter",e[e.subtract=2]="subtract",e))(ChordDegreeText||{}),ChordSymbolEnum=(e=>(e[e.major=0]="major",e[e.minor=1]="minor",e[e.augmented=2]="augmented",e[e.diminished=3]="diminished",e[e.dominant=4]="dominant",e[e.majorseventh=5]="majorseventh",e[e.minorseventh=6]="minorseventh",e[e.diminishedseventh=7]="diminishedseventh",e[e.augmentedseventh=8]="augmentedseventh",e[e.halfdiminished=9]="halfdiminished",e[e.majorminor=10]="majorminor",e[e.majorsixth=11]="majorsixth",e[e.minorsixth=12]="minorsixth",e[e.dominantninth=13]="dominantninth",e[e.majorninth=14]="majorninth",e[e.minorninth=15]="minorninth",e[e.dominant11th=16]="dominant11th",e[e.major11th=17]="major11th",e[e.minor11th=18]="minor11th",e[e.dominant13th=19]="dominant13th",e[e.major13th=20]="major13th",e[e.minor13th=21]="minor13th",e[e.suspendedsecond=22]="suspendedsecond",e[e.suspendedfourth=23]="suspendedfourth",e[e.Neapolitan=24]="Neapolitan",e[e.Italian=25]="Italian",e[e.French=26]="French",e[e.German=27]="German",e[e.pedal=28]="pedal",e[e.power=29]="power",e[e.Tristan=30]="Tristan",e[e.none=31]="none",e))(ChordSymbolEnum||{});class GraphicalNote extends GraphicalObject{constructor(e,t,n,i=undefined){super(),this.DrawnAccidental=AccidentalEnum.NONE,this.lineShift=0,this.sourceNote=e,this.parentVoiceEntry=t,this.PositionAndShape=new BoundingBox$1(this,t.PositionAndShape),this.graphicalNoteLength=i||e.Length,this.numberOfDots=this.calculateNumberOfNeededDots(this.graphicalNoteLength),this.rules=n,this.rules.addGraphicalNoteToNoteMap(e,this)}Transpose(e,t,n,i){let r=this.sourceNote.Pitch;return MusicSheetCalculator.transposeCalculator&&(r=MusicSheetCalculator.transposeCalculator.transposePitch(this.sourceNote.Pitch,e,n)),r}calculateNumberOfNeededDots(e){return this.sourceNote&&this.sourceNote.NoteTuplet?0:e.calculateNumberOfNeededDots()}get ParentMusicPage(){return this.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentMusicSystem.Parent}static FromNote(e,t){return t.NoteToGraphicalNoteMap.getValue(e.NoteToGraphicalNoteObjectId)}}const _EngravingRules=class{constructor(){this.DYSlursStartingAtSameStaffEntryYOffset=0,this.DYMinNoteWidth=0,this.DYWorkId=0,this.DYWorkSpecial=!1,this.DYContainerId="osmdCanvasPage",this.DYSVGContainerId="osmdSvgPage",this.DYMusicScoreType="staff",this.NoteDistances=[1,1,1.3,1.6,2,2.5,3,4],this.NoteDistancesScalingFactors=[1,2,4,8,16,32,64,128],this.DurationDistanceDict={},this.DurationScalingDistanceDict={},this.NoteToGraphicalNoteMapObjectCount=0,this.PlayAlreadyStartedNotesFromCursorPosition=!1,this.PlaybackSkipNotesSafetyInterval=.02,this.UseDefaultVoiceInteractionListener=!0,this.loadDefaultValues()}loadDefaultValues(){this.SamplingUnit=3*_EngravingRules.unit,this.MpatMode=!0,this.SheetTitleHeight=4,this.SheetSubtitleHeight=2,this.SheetMinimumDistanceBetweenTitleAndSubtitle=1,this.SheetComposerHeight=2,this.SheetAuthorHeight=2,this.CompactMode=!1,this.PagePlacementEnum=PagePlacementEnum.Down,this.PageHeight=100001,this.PageTopMargin=5,this.PageTopMarginNarrow=0,this.PageBottomMargin=5,this.PageLeftMargin=5,this.PageRightMargin=5,this.TitleTopDistance=5,this.TitleBottomDistance=1,this.StaffDistance=7,this.BetweenStaffDistance=5,this.MinimumStaffLineDistance=4,this.MinSkyBottomDistBetweenStaves=1,this.StaffHeight=4,this.TabStaffInterlineHeight=1.1111,this.BetweenStaffLinesDistance=_EngravingRules.unit,this.SystemLeftMargin=0,this.SystemRightMargin=0,this.SystemLabelsRightMargin=2,this.SystemComposerDistance=2,this.InstrumentLabelTextHeight=2,this.MinimumDistanceBetweenSystems=7,this.MinSkyBottomDistBetweenSystems=5,this.LastSystemMaxScalingFactor=1.4,this.AutoBeamNotes=!1,this.AutoBeamOptions={beam_middle_rests_only:!1,beam_rests:!1,maintain_stem_directions:!1},this.AutoBeamTabs=!1,this.BeamWidth=_EngravingRules.unit/2,this.BeamSpaceWidth=_EngravingRules.unit/3,this.BeamForwardLength=1.25*_EngravingRules.unit,this.FlatBeams=!1,this.FlatBeamOffset=20,this.FlatBeamOffsetPerBeam=10,this.ClefLeftMargin=.5,this.ClefRightMargin=.75,this.PercussionOneLineCutoff=3,this.PercussionForceVoicesOneLineCutoff=1,this.PercussionUseXMLDisplayStep=!0,this.PercussionXMLDisplayStepNoteValueShift=0,this.PercussionOneLineXMLDisplayStepOctaveOffset=0,this.BetweenKeySymbolsDistance=.2,this.KeyRightMargin=.75,this.RhythmRightMargin=1.25,this.ShowRhythmAgainAfterPartEndOrFinalBarline=!0,this.NewPartAndSystemAfterFinalBarline=!1,this.InStaffClefScalingFactor=.8,this.DistanceBetweenNaturalAndSymbolWhenCancelling=.4,this.NoteHelperLinesOffset=.25,this.MeasureLeftMargin=.7,this.MeasureRightMargin=0,this.DistanceBetweenLastInstructionAndRepetitionBarline=1,this.ArpeggioDistance=.6,this.StaccatoShorteningFactor=2,this.IdealStemLength=3,this.StemNoteHeadBorderYOffset=.2,this.StemMargin=.2,this.StemMinLength=2.5,this.StemMaxLength=4.5,this.BeamSlopeMaxAngle=10,this.StemMinAllowedDistanceBetweenNoteHeadAndBeamLine=1,this.SetWantedStemDirectionByXml=!0,this.GraceNoteScalingFactor=.6,this.GraceNoteXOffset=.2,this.WedgeOpeningLength=1.2,this.WedgeMeasureEndOpeningLength=.75,this.WedgeMeasureBeginOpeningLength=.75,this.WedgePlacementAboveY=-1.5,this.WedgePlacementBelowY=1.5,this.WedgeHorizontalMargin=.6,this.WedgeVerticalMargin=.5,this.DistanceOffsetBetweenTwoHorizontallyCrossedWedges=.3,this.WedgeMinLength=2,this.WedgeEndDistanceBetweenTimestampsFactor=1.75,this.DistanceBetweenAdjacentDynamics=.75,this.TempoChangeMeasureValidity=4,this.TempoContinousFactor=.7,this.StaccatoScalingFactor=.8,this.BetweenDotsDistance=.8,this.OrnamentAccidentalScalingFactor=.65,this.ChordSymbolTextHeight=2,this.ChordSymbolTextAlignment=TextAlignmentEnum.LeftBottom,this.ChordSymbolRelativeXOffset=-1,this.ChordSymbolXSpacing=1,this.ChordOverlapAllowedIntoNextMeasure=0,this.ChordSymbolYOffset=.1,this.ChordSymbolYPadding=0,this.ChordSymbolYAlignment=!0,this.ChordSymbolYAlignmentScope="staffline",this.ChordSymbolLabelTexts=new Dictionary,this.resetChordSymbolLabelTexts(this.ChordSymbolLabelTexts),this.CustomChords=[],this.resetChordNames(),this.RepetitionSymbolsYOffset=0,this.RehearsalMarkXOffsetDefault=10,this.RehearsalMarkXOffset=0,this.RehearsalMarkXOffsetSystemStartMeasure=-20,this.RehearsalMarkYOffsetDefault=-15,this.RehearsalMarkYOffset=0,this.RehearsalMarkFontSize=10,this.MeasureNumberLabelHeight=1.5*_EngravingRules.unit,this.MeasureNumberLabelOffset=2,this.MeasureNumberLabelXOffset=-.5,this.TupletsRatioed=!1,this.TupletsBracketed=!1,this.TripletsBracketed=!1,this.TupletNumberLabelHeight=1.5*_EngravingRules.unit,this.TupletNumberYOffset=.5,this.LabelMarginBorderFactor=.1,this.TupletVerticalLineLength=.5,this.TupletNumbersInTabs=!1,this.SlurPlacementFromXML=!0,this.BezierCurveStepSize=1e3,this.calculateCurveParametersArrays(),this.TieGhostObjectWidth=.75,this.TieYPositionOffsetFactor=.3,this.MinimumNeededXspaceForTieGhostObject=1,this.TieHeightMinimum=.28,this.TieHeightMaximum=1.2,this.TieHeightInterpolationK=.0288,this.TieHeightInterpolationD=.136,this.SlurNoteHeadYOffset=.5,this.SlurStemXOffset=.3,this.SlurSlopeMaxAngle=15,this.SlurTangentMinAngle=30,this.SlurTangentMaxAngle=80,this.SlurHeightFactor=1,this.SlurHeightFlattenLongSlursFactorByWidth=.24,this.SlurHeightFlattenLongSlursFactorByAngle=.36,this.SlurHeightFlattenLongSlursCutoffAngle=47,this.SlurHeightFlattenLongSlursCutoffWidth=16,this.SlursStartingAtSameStaffEntryYOffset=.8,this.SlurMaximumYControlPointDistance=void 0,this.RepetitionEndingLabelHeight=2,this.RepetitionEndingLabelXOffset=.5,this.RepetitionEndingLabelYOffset=.3,this.RepetitionEndingLineYLowerOffset=.5,this.RepetitionEndingLineYUpperOffset=.3,this.VoltaOffset=2.5,this.LyricsAlignmentStandard=TextAlignmentEnum.LeftBottom,this.LyricsHeight=2,this.LyricsYOffsetToStaffHeight=0,this.VerticalBetweenLyricsDistance=.5,this.HorizontalBetweenLyricsDistance=.2,this.BetweenSyllableMaximumDistance=10,this.BetweenSyllableMinimumDistance=.5,this.LyricOverlapAllowedIntoNextMeasure=3.4,this.MinimumDistanceBetweenDashes=10,this.MaximumLyricsElongationFactor=2.5,this.InstantaneousTempoTextHeight=2.3,this.ContinuousDynamicTextHeight=2.3,this.MoodTextHeight=2.3,this.UnknownTextHeight=2,this.ContinuousTempoTextHeight=2.3,this.DynamicExpressionMaxDistance=2,this.DynamicExpressionSpacer=.5,this.VexFlowDefaultNotationFontScale=39,this.VexFlowDefaultTabFontScale=39,this.TremoloStrokeScale=1,this.TremoloYSpacingScale=1,this.StemWidth=.15,this.StaffLineWidth=.1,this.StaffLineColor=void 0,this.LedgerLineWidth=1,this.LedgerLineStrokeStyle=void 0,this.LedgerLineColorDefault="#000000",this.WedgeLineWidth=.12,this.TupletLineWidth=.12,this.LyricUnderscoreLineWidth=.12,this.SystemThinLineWidth=.12,this.SystemBoldLineWidth=_EngravingRules.unit/2,this.SystemRepetitionEndingLineWidth=.12,this.SystemDotWidth=_EngravingRules.unit/2,this.DistanceBetweenVerticalSystemLines=.35,this.DistanceBetweenDotAndLine=.7,this.RepeatEndStartPadding=2,this.OctaveShiftLineWidth=.12,this.OctaveShiftVerticalLineLength=_EngravingRules.unit,this.GraceLineWidth=this.StaffLineWidth*this.GraceNoteScalingFactor,this.MultipleRestMeasureDefaultWidth=4,this.MinimumCrossedBeamDifferenceMargin=1e-4,this.SheetMaximumWidth=32767,this.VoiceSpacingMultiplierVexflow=.85,this.VoiceSpacingAddendVexflow=3,this.PickupMeasureWidthMultiplier=1,this.DisplacedNoteMargin=.1,this.MinNoteDistance=2,this.SubMeasureXSpacingThreshold=35,this.MeasureDynamicsMaxScalingFactor=2.5,this.WholeRestXShiftVexflow=-1.5,this.MetronomeMarksDrawn=!0,this.MetronomeMarkXShift=-6,this.MetronomeMarkYShift=-.5,this.SoftmaxFactorVexFlow=15,this.StaggerSameWholeNotes=!0,this.AlignRests=AlignRestOption.Never,this.RestCollisionYPadding=0,this.FillEmptyMeasuresWithWholeRest=FillEmptyMeasuresWithWholeRests.No,this.ArpeggiosGoAcrossVoices=!1,this.RenderArpeggios=!0,this.RenderSlurs=!0,this.ColoringMode=ColoringModes.XML,this.ColoringEnabled=!0,this.ColorStemsLikeNoteheads=!1,this.ColorBeams=!0,this.ColorFlags=!0,this.applyDefaultColorMusic("#000000"),this.DefaultColorCursor="#33e02f",this.DefaultFontFamily="Times New Roman",this.DefaultFontStyle=FontStyles.Regular,this.DefaultVexFlowNoteFont="gonville",this.MaxMeasureToDrawIndex=Number.MAX_VALUE,this.MinMeasureToDrawIndex=0,this.MaxSystemToDrawNumber=Number.MAX_VALUE,this.MaxPageToDrawNumber=Number.MAX_VALUE,this.RenderComposer=!0,this.RenderTitle=!0,this.RenderSubtitle=!0,this.RenderLyricist=!0,this.RenderPartNames=!0,this.RenderPartAbbreviations=!0,this.RenderFingerings=!0,this.RenderMeasureNumbers=!0,this.RenderMeasureNumbersOnlyAtSystemStart=!1,this.UseXMLMeasureNumbers=!0,this.RenderLyrics=!0,this.RenderChordSymbols=!0,this.RenderMultipleRestMeasures=!0,this.AutoGenerateMutipleRestMeasuresFromRestMeasures=!0,this.RenderRehearsalMarks=!0,this.RenderClefsAtBeginningOfStaffline=!0,this.RenderKeySignatures=!0,this.RenderTimeSignatures=!0,this.ArticulationPlacementFromXML=!0,this.FingeringPosition=PlacementEnum.AboveOrBelow,this.FingeringPositionFromXML=!0,this.FingeringPositionGrace=PlacementEnum.Left,this.FingeringInsideStafflines=!1,this.FingeringLabelFontHeight=1.7,this.FingeringOffsetX=0,this.FingeringOffsetY=0,this.FingeringPaddingY=-.2,this.FingeringTextSize=1.5,this.RenderStringNumbersClassical=!0,this.StringNumberOffsetY=0,this.NewSystemAtXMLNewSystemAttribute=!1,this.NewPageAtXMLNewPageAttribute=!1,this.RestoreCursorAfterRerender=!0,this.StretchLastSystemLine=!1,_EngravingRules.FixStafflineBoundingBox=!1,this.PageFormat=PageFormat.UndefinedPageFormat,this.PageBackgroundColor=void 0,this.PerformanceMode=!1,this.RenderSingleHorizontalStaffline=!1,this.SpacingBetweenTextLines=0,this.NoteToGraphicalNoteMap=new Dictionary,this.NoteToGraphicalNoteMapObjectCount=0;try{this.MaxInstructionsConstValue=this.ClefLeftMargin+this.ClefRightMargin+this.KeyRightMargin+this.RhythmRightMargin+11}catch(e){loglevelExports.info("EngravingRules()",e)}this.MpatMode&&(this.NewPartAndSystemAfterFinalBarline=!0)}applyDefaultColorMusic(e){this.DefaultColorMusic=e,this.DefaultColorNotehead=this.DefaultColorMusic,this.DefaultColorRest=this.DefaultColorNotehead,this.DefaultColorStem=this.DefaultColorNotehead,this.DefaultColorLabel=this.DefaultColorNotehead,this.DefaultColorTitle=this.DefaultColorNotehead,this.LedgerLineColorDefault=this.DefaultColorNotehead}addGraphicalNoteToNoteMap(e,t){e.NoteToGraphicalNoteObjectId=this.NoteToGraphicalNoteMapObjectCount,this.NoteToGraphicalNoteMap.setValue(e.NoteToGraphicalNoteObjectId,t),this.NoteToGraphicalNoteMapObjectCount++}GNote(e){return GraphicalNote.FromNote(e,this)}clearMusicSheetObjects(){this.NoteToGraphicalNoteMap=new Dictionary,this.NoteToGraphicalNoteMapObjectCount=0}setChordSymbolLabelText(e,t){this.ChordSymbolLabelTexts.setValue(e,t)}resetChordSymbolLabelTexts(e){return e.setValue(ChordSymbolEnum.minor,"m"),e.setValue(ChordSymbolEnum.augmented,"aug"),e.setValue(ChordSymbolEnum.diminished,"dim"),e.setValue(ChordSymbolEnum.dominant,"7"),e.setValue(ChordSymbolEnum.majorseventh,"maj7"),e.setValue(ChordSymbolEnum.minorseventh,"m7"),e.setValue(ChordSymbolEnum.diminishedseventh,"dim7"),e.setValue(ChordSymbolEnum.augmentedseventh,"aug7"),e.setValue(ChordSymbolEnum.halfdiminished,"m7b5"),e.setValue(ChordSymbolEnum.majorminor,"m(maj7)"),e.setValue(ChordSymbolEnum.majorsixth,"maj6"),e.setValue(ChordSymbolEnum.minorsixth,"m6"),e.setValue(ChordSymbolEnum.dominantninth,"9"),e.setValue(ChordSymbolEnum.majorninth,"maj9"),e.setValue(ChordSymbolEnum.minorninth,"m9"),e.setValue(ChordSymbolEnum.dominant11th,"11"),e.setValue(ChordSymbolEnum.major11th,"maj11"),e.setValue(ChordSymbolEnum.minor11th,"m11"),e.setValue(ChordSymbolEnum.dominant13th,"13"),e.setValue(ChordSymbolEnum.major13th,"maj13"),e.setValue(ChordSymbolEnum.minor13th,"m13"),e.setValue(ChordSymbolEnum.suspendedsecond,"sus2"),e.setValue(ChordSymbolEnum.suspendedfourth,"sus4"),e.setValue(ChordSymbolEnum.power,"5"),e.setValue(ChordSymbolEnum.none,"N.C."),e}addChordName(e,t,n,i,r){if(void 0!==ChordSymbolEnum[t]){const o={adds:n,alts:i,subs:r};this.CustomChords.push(CustomChord.createCustomChord(e,ChordSymbolEnum[t],o))}}renameChord(e,t){CustomChord.renameCustomChord(e,t,this.CustomChords)}resetChordNames(){this.addChordName("alt","major",["#5","b9","#9"],["b5"],[]),this.addChordName("7alt","dominant",["#5","b9","#9"],["b5"],[]),this.addChordName("7sus4","dominant",["4"],[],["3"]),this.addChordName("7sus4","suspendedfourth",["7"],[],[]),this.addChordName("9sus4","dominantninth",["4"],[],["3"]),this.addChordName("9sus4","suspendedfourth",["9"],[],[]),this.addChordName("11sus4","dominant11th",["4"],[],["3"]),this.addChordName("11sus4","suspendedfourth",["11"],[],[]),this.addChordName("13sus4","dominant13th",["4"],[],["3"]),this.addChordName("13sus4","suspendedfourth",["13"],[],[]),this.addChordName("7sus2","dominant",["2"],[],["3"]),this.addChordName("7sus2","suspendedsecond",["7"],[],[]),this.addChordName("m7b5","minorseventh",[],["b5"],[]),this.addChordName("9sus2","dominantninth",["2"],[],["3"]),this.addChordName("9sus2","suspendedsecond",["9"],[],[]),this.addChordName("11sus2","dominant11th",["2"],[],["3"]),this.addChordName("11sus2","suspendedsecond",["11"],[],[]),this.addChordName("13sus2","dominant13th",["2"],[],["3"]),this.addChordName("13sus2","suspendedsecond",["13"],[],[]),this.addChordName("m(maj9)","majorminor",["9"],[],[]),this.addChordName("m(maj11)","majorminor",["11"],[],[]),this.addChordName("m(maj13)","majorminor",["13"],[],[]),this.addChordName("69","majorsixth",["9"],[],[]),this.addChordName("mi69","minorsixth",["9"],[],[])}calculateCurveParametersArrays(){this.TPower3=new Array(this.BezierCurveStepSize),this.OneMinusTPower3=new Array(this.BezierCurveStepSize),this.FactorOne=new Array(this.BezierCurveStepSize),this.FactorTwo=new Array(this.BezierCurveStepSize);for(let e=0;e(e[e.XML=0]="XML",e[e.AutoColoring=1]="AutoColoring",e[e.CustomColorSet=2]="CustomColorSet",e))(ColoringModes||{}),DrawingParametersEnum=(e=>(e.allon="allon",e.compact="compact",e.compacttight="compacttight",e.default="default",e.leadsheet="leadsheet",e.preview="preview",e.thumbnail="thumbnail",e))(DrawingParametersEnum||{});class DrawingParameters{constructor(e="default"){this.rules=new EngravingRules,this.drawCursors=!0,this.drawTitle=!0,this.drawSubtitle=!0,this.drawLyricist=!0,this.drawComposer=!0,this.drawCredits=!0,this.drawPartNames=!0,this.fingeringPosition=PlacementEnum.Left,this.drawHiddenNotes=!1,this.DrawingParametersEnum=e}set DrawingParametersEnum(e){switch(this.drawingParametersEnum=e,e){case"allon":this.setForAllOn();break;case"thumbnail":this.setForThumbnail();break;case"leadsheet":this.setForLeadsheet();break;case"compact":this.setForCompactMode();break;case"compacttight":this.setForCompactTightMode();break;default:this.setForDefault()}}get DrawingParametersEnum(){return this.drawingParametersEnum}setForAllOn(){this.drawHighlights=!0,this.drawErrors=!0,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!0,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.DrawTitle=!0,this.DrawSubtitle=!0,this.DrawComposer=!0,this.DrawLyricist=!0,this.drawCredits=!0,this.DrawPartNames=!0,this.drawHiddenNotes=!0,this.rules.CompactMode=!1}setForDefault(){this.rules.loadDefaultValues(),this.setForAllOn(),this.drawHiddenNotes=!1}setForThumbnail(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!1,this.drawSelectionStartSymbol=!1,this.drawCursors=!1,this.drawActivitySymbols=!1,this.drawScrollIndicator=!1,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.drawHiddenNotes=!1}setForCompactMode(){this.rules.CompactMode=!0,this.DrawCredits=!1,this.drawHiddenNotes=!1}setForCompactTightMode(){this.setForCompactMode(),this.DrawPartNames=!1,this.rules.VoiceSpacingMultiplierVexflow=.65,this.rules.VoiceSpacingAddendVexflow=2,this.rules.MinSkyBottomDistBetweenStaves=1,this.rules.MinSkyBottomDistBetweenSystems=1,this.rules.BetweenStaffDistance=2.5,this.rules.StaffDistance=3.5,this.rules.MinimumDistanceBetweenSystems=1,this.rules.PageBottomMargin=0,this.rules.PageLeftMargin=2,this.rules.PageRightMargin=2}setForLeadsheet(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!1,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0}get DrawCredits(){return this.drawCredits}set DrawCredits(e){this.drawCredits=e,this.DrawComposer=e,this.DrawTitle=e,this.DrawSubtitle=e,this.DrawLyricist=e}get DrawTitle(){return this.drawTitle}set DrawTitle(e){this.drawTitle=e,this.rules.RenderTitle=e,e||(this.DrawSubtitle=!1)}get DrawSubtitle(){return this.drawSubtitle}set DrawSubtitle(e){this.drawSubtitle=e,this.rules.RenderSubtitle=e,e&&(this.DrawTitle=!0)}get DrawComposer(){return this.drawComposer}set DrawComposer(e){this.drawComposer=e,this.rules.RenderComposer=e}get DrawLyricist(){return this.drawLyricist}set DrawLyricist(e){this.drawLyricist=e,this.rules.RenderLyricist=e}get DrawPartNames(){return this.drawPartNames}set DrawPartNames(e){this.drawPartNames=e,this.rules.RenderPartNames=e,this.rules.RenderPartNames||(this.rules.RenderPartAbbreviations=!1)}get FingeringPosition(){return this.fingeringPosition}set FingeringPosition(e){this.fingeringPosition=e,this.rules.FingeringPosition=e}get Rules(){return this.rules}set Rules(e){this.rules=e}}var AlignRestOption=(e=>(e[e.Never=0]="Never",e[e.Always=1]="Always",e[e.Auto=2]="Auto",e))(AlignRestOption||{}),FillEmptyMeasuresWithWholeRests=(e=>(e[e.No=0]="No",e[e.YesVisible=1]="YesVisible",e[e.YesInvisible=2]="YesInvisible",e))(FillEmptyMeasuresWithWholeRests||{}),BackendType=(e=>(e[e.SVG=0]="SVG",e[e.Canvas=1]="Canvas",e))(BackendType||{});class OSMDOptions{static OSMDOptionsStandard(){return{autoResize:!0,backend:"svg",drawingParameters:DrawingParametersEnum.default}}static BackendTypeFromString(e){return e&&"canvas"===e.toLowerCase()?1:0}}class IXmlElement{constructor(e){if(this.hasAttributes=!1,!e)throw new Error("IXmlElement: expected Element, got undefined");this.elem=e,this.name=e.nodeName.toLowerCase(),e.hasAttributes()&&(this.hasAttributes=!0,this.firstAttribute=e.attributes[0]),this.hasElements=e.hasChildNodes(),1===e.childNodes.length&&e.childNodes[0].nodeType===Node.TEXT_NODE?this.value=e.childNodes[0].nodeValue:this.value=""}attribute(e){return this.elem.attributes.getNamedItem(e)}attributes(){if(!this.attrs){const e=this.elem.attributes,t=[];for(let n=0;n0&&this.Voices[0].Visible}set Visible(e){for(let t=0,n=this.Voices.length;t-1&&this.parent.MusicSystems.splice(e,1)}this.parent=e,this.boundingBox.Parent=e.PositionAndShape}get NextSystem(){const e=this.Parent.MusicSystems.indexOf(this);return e!==this.Parent.MusicSystems.length?this.Parent.MusicSystems[e+1]:void 0}get StaffLines(){return this.staffLines}get GraphicalMeasures(){return this.graphicalMeasures}get MeasureNumberLabels(){return this.measureNumberLabels}get Labels(){return this.labels.values()}get ObjectsToRedraw(){return this.objectsToRedraw}get InstrumentBrackets(){return this.instrumentBrackets}get GroupBrackets(){return this.groupBrackets}get GraphicalMarkedAreas(){return this.graphicalMarkedAreas}get SystemLines(){return this.systemLines}get Id(){return this.id}createSystemLeftLine(e,t,n){let i=-e/2;n&&(i=this.maxLabelLength+t-e/2);const r=this.staffLines[0].Measures[0];let o;this.staffLines.length>1&&(o=this.staffLines[this.staffLines.length-1].Measures[0]);const s=this.createSystemLine(i,e,SystemLinesEnum.SingleThin,SystemLinePosition.MeasureBegin,this,r,o);this.SystemLines.push(s),s.PositionAndShape.RelativePosition=new PointF2D(i,0),s.PositionAndShape.BorderLeft=0,s.PositionAndShape.BorderRight=e,s.PositionAndShape.BorderTop=0,s.PositionAndShape.BorderBottom=this.boundingBox.Size.height,this.createLinesForSystemLine(s)}createVerticalLineForMeasure(e,t,n,i,r,o){const s=o.ParentStaffLine,a=new PointF2D(s.PositionAndShape.RelativePosition.x,s.PositionAndShape.RelativePosition.y),l=s.ParentStaff.ParentInstrument.Staves;if(s.ParentStaff===l[0]){let c;l.length>1&&(c=this.getBottomStaffLine(s).Measures[r]);const u=this.createSystemLine(e,t,n,i,this,o,c),h=a.x+e;u.PositionAndShape.RelativePosition=new PointF2D(h,0),u.PositionAndShape.BorderLeft=0,u.PositionAndShape.BorderRight=t,this.SystemLines.push(u)}}setYPositionsToVerticalLineObjectsAndCreateLines(e){}calculateBorders(e){}alignBeginInstructions(){}GetLeftBorderAbsoluteXPosition(){return this.StaffLines[0].PositionAndShape.AbsolutePosition.x+this.StaffLines[0].Measures[0].beginInstructionsWidth}GetRightBorderAbsoluteXPosition(){return this.StaffLines[0].PositionAndShape.AbsolutePosition.x+this.StaffLines[0].StaffLines[0].End.x}AddGraphicalMeasures(e){for(let t=0,n=e.length;t1){let e,n;for(let i=0,r=this.staffLines.length;ithis.maxLabelLength&&(this.maxLabelLength=e.PositionAndShape.Size.width,t=r))}this.updateMusicSystemStaffLineXPosition(t)}setMusicSystemLabelsYPosition(){this.labels.forEach(((e,t)=>{let n=0,i=0;for(let r=0;r0&&(t.PositionAndShape.RelativePosition=new PointF2D(0,n/i+2))}))}checkStaffEntriesForStaffEntryLink(){let e=!1,t=!1;for(let n=0;n=0;n--){if(t=e.InstrumentalGroups[n],!(t instanceof Instrument))return this.findLastVisibleInstrumentInInstrumentalGroup(t);if(!0===t.Visible)return t}}updateMusicSystemStaffLineXPosition(e){for(let t=0,n=this.StaffLines.length;t1}isVisible(){return this.ParentStaff.ParentInstrument.Visible}getGraphicalMeasureDurationFromStaffEntries(){let e=new Fraction$1(0,1);const t=[];for(let n=0,i=this.staffEntries.length;n0&&r.Add(t.notes[0].graphicalNoteLength);e.lt(r)&&(e=Fraction$1.createFromFraction(r))}return e}addGraphicalStaffEntry(e){this.staffEntries.push(e)}addGraphicalStaffEntryAtTimestamp(e){if(e)if(0===this.staffEntries.length||this.staffEntries[this.staffEntries.length-1].relInMeasureTimestamp.lt(e.relInMeasureTimestamp))this.staffEntries.push(e);else for(let t=this.staffEntries.length-1;t>=0;t--){if(this.staffEntries[t].relInMeasureTimestamp.lt(e.relInMeasureTimestamp)){this.staffEntries.splice(t+1,0,e);break}0===t&&this.staffEntries.splice(t,0,e)}}isPianoRightHand(){return this.isUpperStaffOfInstrument()}isPianoLeftHand(){return this.isLowerStaffOfInstrument()}isUpperStaffOfInstrument(){return 1===this.parentStaff.ParentInstrument.Staves.length||this.ParentStaff===this.parentStaff.ParentInstrument.Staves[0]}isLowerStaffOfInstrument(){return 1!==this.parentStaff.ParentInstrument.Staves.length&&this.ParentStaff===this.ParentStaff.ParentInstrument.Staves.last()}beginsWithLineRepetition(){const e=this.parentSourceMeasure;return!!e&&e.beginsWithLineRepetition()}endsWithLineRepetition(){const e=this.parentSourceMeasure;return!!e&&e.endsWithLineRepetition()}beginsWithWordRepetition(){const e=this.parentSourceMeasure;return!!e&&e.beginsWithWordRepetition()}endsWithWordRepetition(){const e=this.parentSourceMeasure;return!!e&&e.endsWithWordRepetition()}getTransposedHalftones(){return this.parentStaff.ParentInstrument.GetMusicSheet.Transpose+this.parentStaff.ParentInstrument.Transpose}}class VexFlowVoiceEntry extends GraphicalVoiceEntry{constructor(e,t){super(e,t)}applyBordersFromVexflow(){const e=this.vfStaveNote;if(!e.getNoteHeadBeginX)return;const t=e.getBoundingBox(),n=e.getNoteHeadBeginX()-t.x;this.PositionAndShape.RelativePosition.y=t.y/unitInPixels,this.PositionAndShape.BorderTop=0,this.PositionAndShape.BorderBottom=t.h/unitInPixels,this.PositionAndShape.BorderLeft=-(n+e.width/2)/unitInPixels,this.PositionAndShape.BorderRight=(t.w-n)/unitInPixels}set vfStaveNote(e){this.mVexFlowStaveNote=e}get vfStaveNote(){return this.mVexFlowStaveNote}color(){const e=this.rules.DefaultColorNotehead,t=this.rules.DefaultColorRest,n=this.rules.DefaultColorStem,i="#00000000";let r,o;const s=this.vfStaveNote;for(let d=0;de.symbol_type===t)))return;const e=new VF$9.Repetition(t,i,-this.rules.RepetitionSymbolsYOffset);this.stave.addModifier(e,n)}else this.addVolta(e)}addVolta(e){let t=VF$9.Volta.type.BEGIN;if(e.type===RepetitionInstructionEnum.Ending){switch(e.alignment){case AlignmentType.Begin:t=this.parentSourceMeasure.endsRepetitionEnding()?VF$9.Volta.type.BEGIN_END:VF$9.Volta.type.BEGIN;break;case AlignmentType.End:if(this.parentSourceMeasure.beginsRepetitionEnding())return;t=VF$9.Volta.type.END}const i=this.ParentStaffLine.SkyBottomLineCalculator,r=this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginLeft+.4,o=Math.max(this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginRight,r+.4),s=i.getSkyLineMinInRange(r,o)-2;let a,l=-6.1+this.rules.VoltaOffset,c=this.rules.VoltaOffset;if(s0){loglevelExports.trace(`Ghost Found in between (measure ${this.MeasureNumber})`);const t=this.createGhostGves(e);n.splice(o,0,...t),o+=t.length}}else{const e=Fraction$1.minus(i,this.parentSourceMeasure.AbsoluteTimestamp);if(e.RealValue>0){loglevelExports.trace(`Ghost Found at start (measure ${this.MeasureNumber})`);const t=this.createGhostGves(e);n.splice(0,0,...t),o+=t.length}}t=r}const i=Fraction$1.plus(this.parentSourceMeasure.AbsoluteTimestamp,this.parentSourceMeasure.Duration),r=Fraction$1.minus(i,t);if(r.RealValue>0){loglevelExports.trace(`Ghost Found at end (measure ${this.MeasureNumber})`);const e=this.createGhostGves(r);n=n.concat(e)}return n}createGhostGves(e){const t=VexFlowConverter.GhostNotes(e),n=[];for(const i of t){const e=new VexFlowVoiceEntry(void 0,void 0);e.vfStaveNote=i,n.push(e)}return n}handleBeam(e,t){const n=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;let i,r=this.beams[n];r||(r=this.beams[n]=[]);for(const s of r)s[0]===t&&(i=s);i||(i=[t,[]],r.push(i));const o=e.parentVoiceEntry;i[1].indexOf(o)<0&&i[1].push(o)}handleTuplet(e,t){const n=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;t=e.sourceNote.NoteTuplet;let i,r=this.tuplets[n];r||(r=this.tuplets[n]=[]);for(const s of r)s[0]===t&&(i=s);i||(i=[t,[]],r.push(i));const o=e.parentVoiceEntry;i[1].indexOf(o)<0&&i[1].push(o)}finalizeBeams(){this.vfbeams={};const e=[];for(const t in this.beams)if(this.beams.hasOwnProperty(t)){let n=this.vfbeams[t];n||(n=this.vfbeams[t]=[]);for(const i of this.beams[t]){let t=!1;for(const e of i[0].Notes)if(e.Length.RealValue>=new Fraction$1(1,4).RealValue&&(!e.TypeLength||e.TypeLength.RealValue>.125)){t=!0;break}if(t){loglevelExports.debug("Beam between note >= quarter, likely tremolo, currently unsupported. continuing.");continue}const r=[],o=i[0],s=i[1];let a=!0;for(const e of s)e.parentVoiceEntry.ParentVoice===o.Notes[0].ParentVoiceEntry.ParentVoice&&(a=e.parentVoiceEntry.WantedStemDirection===StemDirectionType.Undefined);let l,c=!1;const u=[];for(const n of s){const t=n.vfStaveNote;t&&(r.push(t),e.push(t)),n.parentVoiceEntry.IsGrace&&(c=!0),n.parentVoiceEntry.StemColor&&this.rules.ColoringEnabled&&u.push(n.parentVoiceEntry.StemColor)}if(r.length>1){const e=new VF$9.Beam(r,a);if(c&&(e.render_options.beam_width=3,e.render_options.partial_beam_length=4),u.length>=2&&this.rules.ColorBeams){l=u[0];for(const e of u)if(e!==l){l=void 0;break}e.setStyle({fillStyle:l,strokeStyle:l})}this.rules.FlatBeams&&(e.render_options.flat_beams=!0,e.render_options.flat_beam_offset=this.rules.FlatBeamOffset,e.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),n.push(e)}else loglevelExports.debug("Warning! Beam with no notes!")}}this.rules.AutoBeamNotes&&this.autoBeamNotes(e)}autoBeamNotes(e){if(!this.rules.AutoBeamTabs&&this.isTabMeasure)return;let t,n=[],i=[],r=[];this.autoTupletVfBeams=[];const o=[];this.autoVfBeams=[];let s=this.parentSourceMeasure.ActiveTimeSignature;s||(s=this.parentSourceMeasure.Duration);for(const c of this.staffEntries)for(const a of c.graphicalVoiceEntries){const l=a.vfStaveNote,u=a.notes[0],h=c.relInMeasureTimestamp.isOnBeat(s),d=i.length>=2,p=u.sourceNote.Length.RealValue-new Fraction$1(1,4).RealValue>-Fraction$1.FloatInaccuracyTolerance,f=a.parentVoiceEntry.IsGrace||p||e.contains(l);if(f||h){if(d){for(const e of i)n.push(e);o.push(n.slice()),n=[]}if(i=[],f)continue}const m=a.notes[0].sourceNote.NoteTuplet;if(m){let e=!1;for(const t of m.Notes){for(const n of t)if(n.NoteTypeXml>=NoteType.QUARTER||n.ParentVoiceEntry.IsGrace||n.isRest()&&!this.rules.AutoBeamOptions.beam_rests){e=!0;break}if(e)break}if(t){if(t!==m){if(r.length>1){const e=new VF$9.Beam(r,!0);this.rules.FlatBeams&&(e.render_options.flat_beams=!0,e.render_options.flat_beam_offset=this.rules.FlatBeamOffset,e.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(e)}r=[],t=m}}else t=m;e||r.push(l)}else t=void 0,i.push(l)}if(r.length>=2){const e=new VF$9.Beam(r,!0);this.rules.FlatBeams&&(e.render_options.flat_beams=!0,e.render_options.flat_beam_offset=this.rules.FlatBeamOffset,e.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(e)}if(i.length>=2){for(const e of i)n.push(e);o.push(n)}const a=this.rules.AutoBeamOptions,l={beam_middle_only:a.beam_middle_rests_only,beam_rests:a.beam_rests,maintain_stem_directions:a.maintain_stem_directions};if(a.groups&&a.groups.length){const e=[];for(const t of a.groups)e.push(new VF$9.Fraction(t[0],t[1]));l.groups=e}for(const c of o){const e=VF$9.Beam.generateBeams(c,l);for(const t of e)this.rules.FlatBeams&&(t.render_options.flat_beams=!0,t.render_options.flat_beam_offset=this.rules.FlatBeamOffset,t.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoVfBeams.push(t)}}finalizeTuplets(){this.vftuplets={};for(const e in this.tuplets)if(this.tuplets.hasOwnProperty(e)){let t=this.vftuplets[e];t||(t=this.vftuplets[e]=[]);for(const n of this.tuplets[e]){const e=[],i=n[1];for(const t of i)e.push(t.vfStaveNote);if(e.length>1){const i=n[0],r=i.Notes[0][0].NormalNotes,o=i.Bracket||3===i.TupletLabelNumber&&this.rules.TripletsBracketed||3!==i.TupletLabelNumber&&this.rules.TupletsBracketed;let s=VF$9.Tuplet.LOCATION_TOP;i.tupletLabelNumberPlacement===PlacementEnum.Below&&(s=VF$9.Tuplet.LOCATION_BOTTOM),t.push(new VF$9.Tuplet(e,{bracketed:o,location:s,notes_occupied:r,num_notes:i.TupletLabelNumber,ratioed:this.rules.TupletsRatioed}))}else loglevelExports.debug("Warning! Tuplet with no notes! Trying to ignore, but this is a serious problem.")}}}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){let e,t=[];const n=[];for(const r of this.staffEntries){e=!1,t=[];for(const i of r.graphicalVoiceEntries)if(i.parentVoiceEntry.IsGrace)t.push(i),n.push(i),e||(e=i.parentVoiceEntry.GraceSlur);else if(i.vfStaveNote=VexFlowConverter.StaveNote(i),t.length>0){const n=[];for(let e=0;e0&&(i.GraceSlash=!1);const r=VexFlowConverter.StaveNote(i);i.vfStaveNote=r,n.push(r)}const r=new VF$9.GraceNoteGroup(n,e);i.vfStaveNote.addModifier(0,r),t=[]}}if(t.length>0)for(const r of t)r.vfStaveNote=VexFlowConverter.StaveNote(r),r.parentVoiceEntry.GraceAfterMainNote=!0;this.finalizeBeams(),this.finalizeTuplets();const i=this.getVoicesWithinMeasure();if(this.rules.RenderFingerings)for(const r of this.staffEntries)r.setModifierXOffsets();for(const r of i){if(!r)continue;this.vfVoices[r.VoiceId]=new VF$9.Voice({beat_value:this.parentSourceMeasure.Duration.Denominator,num_beats:this.parentSourceMeasure.Duration.Numerator,resolution:VF$9.RESOLUTION}).setMode(VF$9.Voice.Mode.SOFT);const e=this.getRestFilledVexFlowStaveNotesPerVoice(r);for(const t of e){if(t.parentVoiceEntry&&t.parentVoiceEntry.IsGrace&&!t.parentVoiceEntry.GraceAfterMainNote)continue;const e=t;if(0===e.vfStaveNote.ticks.denominator)continue;if(0===t.notes.length||!t.notes[0]||!t.notes[0].sourceNote.PrintObject){this.vfVoices[r.VoiceId].addTickable(e.vfStaveNote);continue}const n=e.parentStaffEntry;if(n&&n.vfClefBefore){const t=new NoteSubGroup([n.vfClefBefore]);e.vfStaveNote.getCategory&&"stavenotes"===e.vfStaveNote.getCategory()&&e.vfStaveNote.addModifier(0,t)}t.parentVoiceEntry&&this.rules.RenderFingerings&&(this.rules.FingeringPosition!==PlacementEnum.Left&&this.rules.FingeringPosition!==PlacementEnum.Right||this.createFingerings(t),this.createStringNumber(t)),this.createArpeggio(t),this.vfVoices[r.VoiceId].addTickable(e.vfStaveNote)}}this.setStemDirectionFromVexFlow();for(const r of n)this.createFingerings(r),this.createStringNumber(r),this.createArpeggio(r);this.createArticulations(),this.createOrnaments()}createArpeggio(e){if(e.parentVoiceEntry&&e.parentVoiceEntry.Arpeggio){const t=e.parentVoiceEntry.Arpeggio;if(e.notes&&e.notes.length>1){const n=VexFlowConverter.StrokeTypeFromArpeggioType(t.type),i=new VF$9.Stroke(n,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&e.vfStaveNote.addStroke(0,i)}else loglevelExports.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.\n voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}}setStemDirectionFromVexFlow(){for(const e of this.staffEntries)for(const t of e.graphicalVoiceEntries)for(const e of t.notes){const n=e.vfnote;if(!n||!n[0])continue;switch(n[0].getStemDirection()){case VF$9.Stem.UP:t.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case VF$9.Stem.DOWN:t.parentVoiceEntry.StemDirection=StemDirectionType.Down}}}createArticulations(){for(let e=0,t=this.staffEntries.length;e1||e.parentStaffEntry.graphicalVoiceEntries.length>1?a=VF$9.StaveModifier.Position.LEFT:0===t.idInMusicSheet?(a=VF$9.StaveModifier.Position.ABOVE,s=PlacementEnum.Above):(a=VF$9.StaveModifier.Position.BELOW,s=PlacementEnum.Below)}const c=new VF$9.FretHandFinger(o.value);if(c.setPosition(a),c.setOffsetX(l),s===PlacementEnum.Above||s===PlacementEnum.Below){const e=s===PlacementEnum.Above?-1:1,r=s===PlacementEnum.Above?i:n-1-i;if(this.rules.FingeringInsideStafflines&&n>1){const t=c.getWidth()/2,i=2.5*n;c.setOffsetY(e*(r+i)*t)}else if(!this.rules.FingeringInsideStafflines){const n=new VF$9.StringNumber(o.value);n.radius=0,n.setPosition(a),n.setOffsetY(e*r*n.getWidth()*2/3),t.vfStaveNote.addModifier(i,n);continue}}t.vfStaveNote.addModifier(i,c)}}createStringNumber(e){if(!this.rules.RenderStringNumbersClassical)return;const t=e;e.notes.forEach(((n,i)=>{const r=n.sourceNote.StringInstruction;if(r){let o=r.value;switch(o){case"1":o="I";break;case"2":o="II";break;case"3":o="III";break;case"4":o="IV";break;case"5":o="V";break;case"6":o="VI"}const s=new VF$9.StringNumber(o);s.radius=0;const a=-this.rules.StringNumberOffsetY;e.notes.length>1||e.parentStaffEntry.graphicalVoiceEntries.length>1?(s.setOffsetX(13*n.baseStringNumberXOffset),s.setPosition(VF$9.Modifier.Position.RIGHT)):s.setPosition(VF$9.Modifier.Position.ABOVE),s.setOffsetY(a),t.vfStaveNote.addModifier(i,s)}}))}lineTo(e,t){const n=new VF$9.StaveConnector(e.getVFStave(),this.stave);n.setType(t),this.connectors.push(n)}getVFStave(){return this.stave}updateInstructionWidth(){var e,t;let n=0,i=0;const r=this.stave.getModifiers();for(const o of r)5===o.getPosition()?n+=o.getWidth()+o.getPadding(void 0):6===o.getPosition()&&(i+=o.getWidth()+o.getPadding(void 0));this.beginInstructionsWidth=(null!==(e=n)&&void 0!==e?e:0)/unitInPixels,this.endInstructionsWidth=(null!==(t=i)&&void 0!==t?t:0)/unitInPixels}addStaveTie(e,t){this.vfTies.push(e),t.vfTie=e}}class GraphicalStaffEntry extends GraphicalObject{constructor(e,t=undefined,n=undefined){super(),this.graphicalChordContainers=[],this.tabStaffEntry=void 0,this.MaxAccidentals=0,this.graphicalInstructions=[],this.ties=[],this.graphicalTies=[],this.lyricsEntries=[],this.parentMeasure=e,this.graphicalVoiceEntries=[],this.sourceStaffEntry=t,n?(this.staffEntryParent=n,this.parentVerticalContainer=n.parentVerticalContainer,this.PositionAndShape=new BoundingBox$1(this,n.PositionAndShape)):this.PositionAndShape=new BoundingBox$1(this,e.PositionAndShape),t&&(this.relInMeasureTimestamp=t.Timestamp),this.FingeringEntries=[]}get GraphicalInstructions(){return this.graphicalInstructions}get GraphicalTies(){return this.graphicalTies}get LyricsEntries(){return this.lyricsEntries}set LyricsEntries(e){this.lyricsEntries=e}getAbsoluteTimestamp(){const e=this.parentMeasure.parentSourceMeasure.AbsoluteTimestamp.clone();return this.relInMeasureTimestamp&&e.Add(this.relInMeasureTimestamp),e}findTieGraphicalNoteFromNote(e){var t;const n=(null===(t=window.GYM)||void 0===t?void 0:t.graceCustom)||!1;for(const i of this.graphicalVoiceEntries)for(const t of i.notes){const i=t.sourceNote;if(n){if(e.NoteToGraphicalNoteObjectId==i.NoteToGraphicalNoteObjectId)return t}else if(!i.isRest()&&i.Pitch.FundamentalNote===e.Pitch.FundamentalNote&&i.Pitch.Octave===e.Pitch.Octave&&i.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return t}}findEndTieGraphicalNoteFromNoteWithStartingSlur(e,t){if(e)for(const n of this.graphicalVoiceEntries)if(n.parentVoiceEntry===e.ParentVoiceEntry)for(const e of n.notes){const n=e.sourceNote;if(n.NoteTie&&-1!==n.NoteSlurs.indexOf(t))return e}}findGraphicalNoteFromGraceNote(e){if(e)for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e.ParentVoiceEntry)for(const n of t.notes)if(n.sourceNote===e)return n}findGraphicalNoteFromNote(e){if(e)for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e.ParentVoiceEntry)for(const n of t.notes)if(n.sourceNote===e&&this.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return n}getGraphicalNoteDurationFromVoice(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry.ParentVoice===e)return t.notes[0].graphicalNoteLength;return new Fraction$1(0,1)}findVoiceEntryGraphicalNotes(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e)return t.notes}isVoiceEntryPartOfLinkedVoiceEntry(e){if(this.sourceStaffEntry.Link)for(let t=0,n=this.sourceStaffEntry.Link.LinkStaffEntries.length;t0&&(e=t)}return e}findStaffEntryMaxNoteLength(){let e=new Fraction$1(0,1);for(const t of this.graphicalVoiceEntries)for(const n of t.notes){const t=n.graphicalNoteLength;e.lt(t)&&t.GetExpandedNumerator()>0&&(e=t)}return e}findOrCreateGraphicalVoiceEntry(e){for(const n of this.graphicalVoiceEntries)if(n.parentVoiceEntry===e)return n;const t=MusicSheetCalculator.symbolFactory.createVoiceEntry(e,this);return this.graphicalVoiceEntries.push(t),t}findOrCreateGraphicalVoiceEntryFromGraphicalNote(e){for(const n of this.graphicalVoiceEntries)if(n===e.parentVoiceEntry)return n;const t=MusicSheetCalculator.symbolFactory.createVoiceEntry(e.sourceNote.ParentVoiceEntry,this);return this.graphicalVoiceEntries.push(t),t}addGraphicalNoteToListAtCorrectYPosition(e,t){const n=e.notes;if(0===n.length||t.PositionAndShape.RelativePosition.y=0;i--){if(n[i].PositionAndShape.RelativePosition.y>t.PositionAndShape.RelativePosition.y){n.splice(i+1,0,t);break}if(0===i){n.splice(0,0,t);break}}}hasOnlyRests(){for(const e of this.graphicalVoiceEntries)for(const t of e.notes){if(!t.sourceNote.isRest())return!1}return!0}getSkylineMin(){var e;const t=null===(e=this.parentMeasure)||void 0===e?void 0:e.ParentStaffLine.SkyBottomLineCalculator;if(!t)return;const[n,i]=this.getAbsoluteStartAndEnd();return t.getSkyLineMinInRange(n,i)}getHighestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getSkylineMin()}getLowestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getBottomlineMax()}getBottomlineMax(){var e;const t=null===(e=this.parentMeasure)||void 0===e?void 0:e.ParentStaffLine.SkyBottomLineCalculator;if(!t)return;const[n,i]=this.getAbsoluteStartAndEnd();return t.getBottomLineMaxInRange(n,i)}getAbsoluteStartAndEnd(){let e=this.PositionAndShape.AbsolutePosition.x;e-=this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.x;return[e,e+this.PositionAndShape.Size.width]}}const VF$8=Vex.Flow;class VexFlowStaffEntry extends GraphicalStaffEntry{constructor(e,t,n){super(e,t,n)}calculateXPosition(){const e=this.parentMeasure.getVFStave();let t=0;for(const n of this.graphicalVoiceEntries)if(n.vfStaveNote){if(n.vfStaveNote.setStave(e),e&&e.getLines&&1===e.getLines()&&n.vfStaveNote.getStemDirection()<0&&(n.vfStaveNote.setStemDirection(VF$8.Stem.UP),n.parentVoiceEntry.StemDirection=StemDirectionType.Up),!n.vfStaveNote.preFormatted)continue;n.applyBordersFromVexflow(),this.parentMeasure.ParentStaff.isTab?this.PositionAndShape.RelativePosition.x=(n.vfStaveNote.getAbsoluteX()+n.vfStaveNote.glyph.getWidth())/unitInPixels:this.PositionAndShape.RelativePosition.x=n.vfStaveNote.getBoundingBox().getX()/unitInPixels;const i=n.notes[0].sourceNote;i.isRest()&&i.Length.RealValue===this.parentMeasure.parentSourceMeasure.ActiveTimeSignature.RealValue&&(this.PositionAndShape.RelativePosition.x+=this.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow-.1,n.PositionAndShape.BorderLeft=-.7,n.PositionAndShape.BorderRight=.7),n.PositionAndShape.BorderLefte.staffLine)),n=this.calculateModifierXOffsets(t,1),i=this.calculateModifierXOffsets(t,.5);e.forEach(((e,t)=>{e.baseFingeringXOffset=i[t],e.baseStringNumberXOffset=n[t]}))}calculateModifierXOffsets(e,t){const n=[];for(let i=0;i=0;s--){if(Math.abs(e[i]-e[s])<=t&&r===n[s]){r++,o=!0;break}o=!1}n.push(r)}return n}}class VexFlowGraphicalNote extends GraphicalNote{constructor(e,t,n,i=OctaveEnum.NONE,r,o=undefined){if(super(e,t,r,o),this.clef=n,this.octaveShift=i,e.Pitch){const t=e.isRest()?e.Pitch:OctaveShift.getPitchFromOctaveShift(e.Pitch,i);this.vfpitch=VexFlowConverter.pitch(t,e.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0}}setAccidental(e){const t=this.drawPitch(e);this.vfpitch=VexFlowConverter.pitch(t,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.DrawnAccidental=t.Accidental}drawPitch(e){return OctaveShift.getPitchFromOctaveShift(e,this.octaveShift)}Transpose(e,t,n,i){const r=super.Transpose(e,t,n,i),o=OctaveShift.getPitchFromOctaveShift(r,this.octaveShift);return this.vfpitch=VexFlowConverter.pitch(o,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0,o}setIndex(e,t){this.vfnote=[e,t],this.vfnoteIndex=t}notehead(e=undefined){let t=e;t||(t=this.vfnote[0]);const n=t.note_heads;return n&&n.length>this.vfnoteIndex&&n[this.vfnoteIndex]?t.note_heads[this.vfnoteIndex]:{line:0}}Clef(){return this.clef}getSVGId(){if(this.vfnote)return this.vfnote[0].getAttribute("id")}getSVGGElement(){if(this.vfnote)return this.vfnote[0].getAttribute("el")}getStemSVG(){return document.getElementById("vf-"+this.getSVGId()+"-stem")}getBeamSVGs(){const e=[];for(let t=0;;t++){const n=document.getElementById(`vf-${this.getSVGId()}-beam${t}`);if(!n)break;e.push(n)}return e}}class GraphicalChordSymbolContainer extends GraphicalObject{constructor(e,t,n,i,r,o){super(),this.chordSymbolContainer=e,this.boundingBox=new BoundingBox$1(this,t),this.rules=o,this.calculateLabel(n,r,i)}get GetChordSymbolContainer(){return this.chordSymbolContainer}get GraphicalLabel(){return this.graphicalLabel}calculateLabel(e,t,n){const i=ChordSymbolContainer.calculateChordText(this.chordSymbolContainer,t,n);this.graphicalLabel=new GraphicalLabel(new Label(i),e,this.rules.ChordSymbolTextAlignment,this.rules,this.boundingBox),this.graphicalLabel.PositionAndShape.RelativePosition=new PointF2D(this.rules.ChordSymbolRelativeXOffset,0),this.graphicalLabel.Label.colorDefault=this.rules.DefaultColorChordSymbol}}const VF$7=Vex.Flow;class VexFlowTabMeasure extends VexFlowMeasure{constructor(e,t=undefined,n=undefined){super(e,t,n),this.isTabMeasure=!0}resetLayout(){var e;const t=null!==(e=this.ParentStaff.StafflineCount)&&void 0!==e?e:6;this.stave=new VF$7.TabStave(0,0,0,{space_above_staff_ln:0,space_below_staff_ln:0,num_lines:t}),this.updateInstructionWidth()}graphicalMeasureCreatedCalculations(){for(let t=0,n=this.staffEntries.length;t1){const n=VexFlowConverter.StrokeTypeFromArpeggioType(t.type),i=new VF$7.Stroke(n,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&e.vfStaveNote.addStroke(0,i)}else loglevelExports.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.\n voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}this.vfVoices[t.VoiceId].addTickable(e.vfStaveNote)}else this.vfVoices[t.VoiceId].addTickable(e.vfStaveNote)}}}}class StaffLine extends GraphicalObject{constructor(e,t){super(),this.measures=[],this.staffLines=new Array(5),this.octaveShifts=[],this.lyricLines=[],this.lyricsDashes=[],this.abstractExpressions=[],this.graphicalSlurs=[],this.Pedals=[],this.WavyLines=[],this.parentMusicSystem=e,this.parentStaff=t,this.boundingBox=new BoundingBox$1(this,e.PositionAndShape),this.skyBottomLine=MusicSheetCalculator.symbolFactory.createSkyBottomLineCalculator(this),this.staffHeight=this.parentMusicSystem.rules.StaffHeight,this.topLineOffset=0,this.bottomLineOffset=4,this.calculateStaffLineOffsets()}calculateStaffLineOffsets(){if(this.ParentStaff.isTab)if(5===this.ParentStaff.StafflineCount)this.staffHeight=this.bottomLineOffset=6*this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight;else this.staffHeight=this.bottomLineOffset=this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight*this.ParentStaff.StafflineCount;else switch(this.ParentStaff.StafflineCount){case 4:this.bottomLineOffset=1;break;case 3:this.topLineOffset=1,this.bottomLineOffset=1;break;case 2:this.topLineOffset=2,this.bottomLineOffset=1;break;case 1:this.topLineOffset=2,this.bottomLineOffset=2}}get Measures(){return this.measures}set Measures(e){this.measures=e}get StaffLines(){return this.staffLines}set StaffLines(e){this.staffLines=e}get Index(){return this.parentMusicSystem.StaffLines.indexOf(this)}get NextStaffLine(){const e=this.Index;return e!==this.parentMusicSystem.StaffLines.length?this.parentMusicSystem.StaffLines[e+1]:void 0}get LyricLines(){return this.lyricLines}get AbstractExpressions(){return this.abstractExpressions}set AbstractExpressions(e){this.abstractExpressions=e}set LyricLines(e){this.lyricLines=e}get LyricsDashes(){return this.lyricsDashes}set LyricsDashes(e){this.lyricsDashes=e}get ParentMusicSystem(){return this.parentMusicSystem}set ParentMusicSystem(e){this.parentMusicSystem=e}get ParentStaff(){return this.parentStaff}set ParentStaff(e){this.parentStaff=e}get SkyBottomLineCalculator(){return this.skyBottomLine}get SkyLine(){return this.skyBottomLine.SkyLine}get BottomLine(){return this.skyBottomLine.BottomLine}get OctaveShifts(){return this.octaveShifts}set OctaveShifts(e){this.octaveShifts=e}get StaffHeight(){return this.staffHeight}get TopLineOffset(){return this.topLineOffset}get BottomLineOffset(){return this.bottomLineOffset}get GraphicalSlurs(){return this.graphicalSlurs}addSlurToStaffline(e){this.graphicalSlurs.push(e)}addActivitySymbolClickArea(){const e=new StaffLineActivitySymbol(this),t=this.PositionAndShape;e.PositionAndShape.RelativePosition=new PointF2D(t.RelativePosition.x+t.BorderRight+.5,t.RelativePosition.y+.5),e.PositionAndShape.Parent=this.parentMusicSystem.PositionAndShape}isPartOfMultiStaffInstrument(){return this.parentStaff.ParentInstrument.Staves.length>1}findClosestStaffEntry(e){let t;for(let n=0,i=this.Measures.length;n0){var r,o;const e=s.map((e=>e.PositionAndShape.Center.y)),t=Math.max(...e),n=(null===(r=window.GYM)||void 0===r?void 0:r.noNeedContinuousDynamic)||!1,i=(null===(o=window.GYM)||void 0===o?void 0:o.noNeedGraphicalContinuousDynamic)||!1;for(let r=0;r0?s[r-1]:void 0;if(e){const t=this.getOverlap(o.PositionAndShape,e.PositionAndShape);o.squeeze(-(t.x+this.rules.DynamicExpressionSpacer))}if(t){const e=this.getOverlap(t.PositionAndShape,o.PositionAndShape);o.squeeze(e.x+this.rules.DynamicExpressionSpacer)}}}}}getDistance(e,t){const n=e.RelativePosition.x+e.BorderMarginRight,i=t.RelativePosition.x+t.BorderMarginLeft,r=e.RelativePosition.y+e.BorderMarginBottom,o=t.RelativePosition.y+t.BorderMarginTop;return new PointF2D(i-n,o-r)}getOverlap(e,t){return new PointF2D(e.RelativePosition.x+e.BorderMarginRight-(t.RelativePosition.x+t.BorderMarginLeft),e.RelativePosition.y+e.BorderMarginBottom-(t.RelativePosition.y+t.BorderMarginTop))}}class VexFlowStaffLine extends StaffLine{constructor(e,t){super(e,t),this.slursInVFStaffLine=[],this.alignmentManager=new AlignmentManager(this)}get SlursInVFStaffLine(){return this.slursInVFStaffLine}addVFSlurToVFStaffline(e){this.slursInVFStaffLine.push(e)}get AlignmentManager(){return this.alignmentManager}}const VF$6=Vex.Flow;class VexFlowMultiRestMeasure extends VexFlowMeasure{constructor(e,t=undefined,n=undefined){super(e,t,n),this.minimumStaffEntriesWidth=-1,n?this.rules=n.ParentMusicSystem.rules:t&&(this.rules=t.Rules),this.resetLayout(),this.multiRestElement=new VF$6.MultiMeasureRest(t.multipleRestMeasures,{})}draw(e){var t,n,i,r,o;const s=e.openGroup();null==s||null===(t=s.classList)||void 0===t||t.add("vf-measure");const a=e.openGroup();null==a||null===(n=a.classList)||void 0===n||n.add("vf-stave"),null==a||a.setAttribute("id",null===(i=this.stave)||void 0===i||null===(r=i.attrs)||void 0===r?void 0:r.id),this.stave.setContext(e).draw(),e.closeGroup();const l=e.openGroup();null==l||null===(o=l.classList)||void 0===o||o.add("vf-voices"),this.multiRestElement.setStave(this.stave),this.multiRestElement.setContext(e),this.multiRestElement.draw(),e.closeGroup();for(const c of this.connectors)c.setContext(e).draw();return e.closeGroup(),s}format(){}getVoicesWithinMeasure(){return[]}getGraphicalVoiceEntriesPerVoice(e){return[]}getRestFilledVexFlowStaveNotesPerVoice(e){return[]}handleBeam(e,t){}handleTuplet(e,t){}finalizeBeams(){}finalizeTuplets(){}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){}createArticulations(){}createOrnaments(){}createFingerings(e){}getVFStave(){return this.stave}}const VF$5=Vex.Flow;class VexFlowBackend{getInnerElement(){return this.inner}getCanvas(){return this.canvas}getRenderElement(){let e=this.canvas;return this.getVexflowBackendType()===VF$5.Renderer.Backends.CANVAS&&(e=this.inner),e}getRenderer(){return this.renderer}removeAllChildrenFromContainer(e){for(;0!==e.children.length;)e.removeChild(e.children.item(0))}removeFromContainer(e){const t=this.getRenderElement();for(let n=0;n\n\r<")),r.download="opensheetmusicdisplay_download.svg",r.innerHTML=window.location.href+"/download",document.body.appendChild(r)}}class VexFlowInstantaneousDynamicExpression extends GraphicalInstantaneousDynamicExpression{constructor(e,t,n){super(e,t,n);const i=new Label(this.Expression);this.label=new GraphicalLabel(i,this.rules.ContinuousDynamicTextHeight,TextAlignmentEnum.CenterCenter,this.rules,this.PositionAndShape),this.label.Label.fontStyle=FontStyles.BoldItalic,this.label.setLabelPositionAndShapeBorders(),this.PositionAndShape.calculateBoundingBox()}get InstantaneousDynamic(){return this.mInstantaneousDynamicExpression}get Expression(){return DynamicEnum[this.mInstantaneousDynamicExpression.DynEnum]}}class GraphicalOctaveShift extends GraphicalObject{constructor(e,t){super(),this.getOctaveShift=e,this.setSymbol(),this.PositionAndShape=new BoundingBox$1(this,t)}setSymbol(){switch(this.getOctaveShift.Type){case OctaveEnum.VA8:this.octaveSymbol=MusicSymbol.VA8;break;case OctaveEnum.VB8:this.octaveSymbol=MusicSymbol.VB8;break;case OctaveEnum.MA15:this.octaveSymbol=MusicSymbol.MA15;break;case OctaveEnum.MB15:this.octaveSymbol=MusicSymbol.MB15;break;default:throw new ArgumentOutOfRangeException("")}}}const VF$2=Vex.Flow;class VexFlowOctaveShift extends GraphicalOctaveShift{constructor(e,t){switch(super(e,t),e.Type){case OctaveEnum.VA8:this.position=VF$2.TextBracket.Positions.TOP,this.supscript="va",this.text="8";break;case OctaveEnum.MA15:this.position=VF$2.TextBracket.Positions.TOP,this.supscript="ma",this.text="15";break;case OctaveEnum.VB8:this.position=VF$2.TextBracket.Positions.BOTTOM,this.supscript="vb",this.text="8";break;case OctaveEnum.MB15:this.position=VF$2.TextBracket.Positions.BOTTOM,this.supscript="mb",this.text="15";break;default:loglevelExports.error("Unknown or NONE octaveshift. This should not be called!")}}setStartNote(e){for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote)return this.startNote=e.vfStaveNote,!0}return!1}setEndNote(e){for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote)return this.endNote=e.vfStaveNote,!0}return!1}getTextBracket(){return new VF$2.TextBracket({position:this.position,start:this.startNote,stop:this.endNote,superscript:this.supscript,text:this.text})}}class VexflowStafflineNoteCalculator{constructor(e){this.staffPitchListMapping=new Dictionary,this.baseLineNote=NoteEnum.B,this.baseLineOctave=1,this.rules=e}trackNote(e){if(!(e instanceof VexFlowGraphicalNote)||e.Clef().ClefType!==ClefEnum.percussion||e.sourceNote.isRest()||0===this.rules.PercussionOneLineCutoff||-1===this.rules.PercussionForceVoicesOneLineCutoff)return;const t=e.parentVoiceEntry.parentStaffEntry.sourceStaffEntry.ParentStaff.idInMusicSheet;let n;this.staffPitchListMapping.containsKey(t)||this.staffPitchListMapping.setValue(t,new Array),n=this.staffPitchListMapping.getValue(t);const i=e.sourceNote.Pitch;VexflowStafflineNoteCalculator.findOrInsert(n,i)}static PitchIndexOf(e,t,n=0){if(n>e.length-1)return-1;for(let i=n;ithis.rules.PercussionOneLineCutoff&&!i)return e;const r=e,o=e.sourceNote.Pitch;let s=this.baseLineNote,a=this.baseLineOctave;if(this.rules.PercussionUseXMLDisplayStep&&void 0!==e.sourceNote.displayStepUnpitched&&(s=e.sourceNote.displayStepUnpitched,a=e.sourceNote.displayOctaveUnpitched+this.rules.PercussionOneLineXMLDisplayStepOctaveOffset),n.length<=this.rules.PercussionForceVoicesOneLineCutoff)r.setAccidental(new Pitch(s,a,o.Accidental));else{const e=VexflowStafflineNoteCalculator.PitchIndexOf(n,o);if(e>-1){const t=Math.ceil(n.length/2);if(!this.rules.PercussionUseXMLDisplayStep)if(e>=t)switch(a=2,(e-t)%5){case 1:s=NoteEnum.E;break;case 2:s=NoteEnum.G;break;case 3:s=NoteEnum.B;break;case 4:s=NoteEnum.D,a=3;break;default:s=NoteEnum.C}else switch(e%5){case 1:s=NoteEnum.F;break;case 2:s=NoteEnum.D;break;case 3:s=NoteEnum.B,a=0;break;case 4:s=NoteEnum.G,a=0;break;default:s=NoteEnum.A}const i=new Pitch(s,a,o.Accidental);r.setAccidental(i);const l=r.parentVoiceEntry.parentVoiceEntry;!this.rules.SetWantedStemDirectionByXml&&l.Notes.length<2&&(i.Octave>this.baseLineOctave||i.FundamentalNote===this.baseLineNote&&i.Octave===this.baseLineOctave?r.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Up:r.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Down)}}return r}getStafflineUniquePositionCount(e){return this.staffPitchListMapping.containsKey(e)?this.staffPitchListMapping.getValue(e).length:0}}class SkyBottomLineCalculator{constructor(e){this.mStaffLineParent=e,this.mRules=e.ParentMusicSystem.rules}calculateLines(){const e=Math.max(Math.ceil(this.StaffLineParent.PositionAndShape.Size.width*this.SamplingUnit),1);this.mSkyLine=[],this.mBottomLine=[];const t=new CanvasVexFlowBackend(this.StaffLineParent.ParentMusicSystem.rules);for(const s of this.StaffLineParent.Measures){s.PositionAndShape.calculateAbsolutePositionsRecursive(0,0);const e=s.getVFStave();let n=e.getWidth();if(n>0||s.IsExtraGraphicalMeasure||(loglevelExports.warn("SkyBottomLineCalculator: width not > 0 in measure "+s.MeasureNumber),n=50),!(n>=50)&&s.IsExtraGraphicalMeasure)continue;t.initializeHeadless(n);const i=t.getContext(),r=t.getCanvas();n=r.width;const a=r.height;"jianpu"===this.mRules.DYMusicScoreType?e.setY(e.y-50):e.setY(e.y+100);const l=e.getWidth();e.setWidth(n),s.format(),e.setWidth(l);try{s.draw(i)}catch(o){loglevelExports.warn("SkyBottomLineCalculator.calculateLines.draw",o)}const c=i.getImageData(0,0,n,a),u=4,h=Math.max(Math.ceil(s.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),d=new Array(h),p=new Array(h);for(let t=0;t0){d[t]=e;break}}for(let e=a;e>0;e--){const i=e*n*u+t*u;if(c.data[i+3]>0){p[t]=e;break}}}for(let t=0;t(e-Math.max(...this.mSkyLine))/unitInPixels+this.StaffLineParent.TopLineOffset)),this.mBottomLine=this.mBottomLine.map((e=>(e-Math.min(...this.mBottomLine))/unitInPixels+this.StaffLineParent.BottomLineOffset))}findPreviousValidNumber(e,t){for(let n=e;n>=0;n--)if(!isNaN(t[n]))return t[n];return 0}findNextValidNumber(e,t){if(e>=t.length)return t[e-1];for(let n=e;n=this.BottomLine.length&&(n=this.BottomLine.length-1),i<0&&(i=0),i>=this.BottomLine.length&&(i=this.BottomLine.length),this.SkyLine[n]=e.y;for(let o=n+1;o=this.BottomLine.length&&(n=this.BottomLine.length-1),i<0&&(i=0),i>=this.BottomLine.length&&(i=this.BottomLine.length),this.BottomLine[n]=e.y;for(let o=n+1;oe))}setBottomLineWithValue(e){this.BottomLine.forEach((t=>e))}getLeftIndexForPointX(e,t){const n=Math.floor(e*this.SamplingUnit);return n<0?0:n>=t?t-1:n}getRightIndexForPointX(e,t){const n=Math.ceil(e*this.SamplingUnit);return n<0?0:n>=t?t-1:n}updateStaffLineBorders(){this.mStaffLineParent.PositionAndShape.BorderTop=this.getSkyLineMin(),this.mStaffLineParent.PositionAndShape.BorderMarginTop=this.getSkyLineMin(),this.mStaffLineParent.PositionAndShape.BorderBottom=this.getBottomLineMax(),this.mStaffLineParent.PositionAndShape.BorderMarginBottom=this.getBottomLineMax()}getSkyLineMin(){return Math.min(...this.SkyLine.filter((e=>!isNaN(e))))}getSkyLineMinAtPoint(e){const t=Math.round(e*this.SamplingUnit);return this.mSkyLine[t]}getSkyLineMinInRange(e,t){return this.getMinInRange(this.SkyLine,e,t)}getBottomLineMax(){return Math.max(...this.BottomLine.filter((e=>!isNaN(e))))}getBottomLineMaxAtPoint(e){const t=Math.round(e*this.SamplingUnit);return this.mBottomLine[t]}getBottomLineMaxInRange(e,t){return this.getMaxInRange(this.BottomLine,e,t)}getBottomLineMaxInBoundingBox(e){const t=Math.floor(e.AbsolutePosition.x+e.BorderLeft),n=Math.ceil(e.AbsolutePosition.x+e.BorderRight);return this.getMaxInRange(this.mBottomLine,t,n)}updateWithBoundingBoxRecursively(e){if(e.ChildElements&&e.ChildElements.length>0)for(const t of e.ChildElements)this.updateWithBoundingBoxRecursively(t);else{const t=e.BorderTop+e.AbsolutePosition.y,n=e.BorderBottom+e.AbsolutePosition.y;if(t<0){const n=Math.floor(e.AbsolutePosition.x+e.BorderLeft),i=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mSkyLine,n,i,t)}else if(n>this.StaffLineParent.StaffHeight){const t=Math.floor(e.AbsolutePosition.x+e.BorderLeft),i=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mBottomLine,t,i,n)}}}updateInRange(e,t=0,n=e.length,i=0){if(t=Math.floor(t*this.SamplingUnit),(n=Math.ceil(n*this.SamplingUnit))e.length&&(n=e.length);for(let r=t;rMath.abs(e[r])?i:e[r]}setInRange(e,t=0,n=e.length,i=0){if(t=Math.floor(t*this.SamplingUnit),(n=Math.ceil(n*this.SamplingUnit))e.length&&(n=e.length);for(let r=t;r=e.length&&(t=e.length-1),n<0&&(n=0),n>=e.length&&(n=e.length),t>=0&&n<=e.length?Math.min(...e.slice(t,n+1)):void 0):Number.MAX_VALUE}getMaxInRange(e,t,n){return t=Math.floor(t*this.SamplingUnit),n=Math.ceil(n*this.SamplingUnit),e?(t<0&&(t=0),t>=e.length&&(t=e.length-1),n<0&&(n=0),n>=e.length&&(n=e.length),t>=0&&n<=e.length?Math.max(...e.slice(t,n+1)):void 0):Number.MIN_VALUE}get SamplingUnit(){return this.mRules.SamplingUnit}get StaffLineParent(){return this.mStaffLineParent}get SkyLine(){return this.mSkyLine}get BottomLine(){return this.mBottomLine}}var parserExports$1={},parser$2={get exports(){return parserExports$1},set exports(e){parserExports$1=e}}; /*! * d-path-parser - v1.0.0 * by Massimo Artizzu (MaxArt2501) * * https://github.com/MaxArt2501/d-path-parser * * Licensed under the MIT License * See LICENSE for details */ !function(e,t){e.exports=function(e){for(var t={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},n={number:function(e){return+u("number",e)},"coordinate pair":function(e){var t=u("number",e);return null!==t||e?(u("comma"),{x:+t,y:+u("number",!0)}):null},"arc definition":function(e){var t=n["coordinate pair"](e);if(!t&&!e)return null;u("comma");var i=+u("number",!0);u("comma",!0);var r=!!+u("flag",!0);u("comma");var o=!!+u("flag",!0);return u("comma"),{radii:t,rotation:i,large:r,clockwise:o,end:n["coordinate pair"](!0)}}},i=0,r=[];it.bottom)switch(e.tagName.toLowerCase()){case"g":for(const r of e.children)this.recursiveUpdate(r,t,n,i);break;case"circle":case"rect":case"line":case"path":let c=Math.floor((r.x-n.x)/unitInPixels*this.mRules.SamplingUnit);const u=c+Math.ceil(r.width/unitInPixels*this.mRules.SamplingUnit);if(e.parentElement.classList.contains("vf-beams")&&e.hasAttribute("d")){const t=parserExports$1(e.getAttribute("d"));if(5===t.length){const e=t[0],n=t[3],i=(n.end.y-e.end.y)/(n.end.x-e.end.x);let r=e.end.y/unitInPixels;for(;c<=u;c++)rl[c]&&(l[c]=r),r+=i/this.mRules.SamplingUnit}}else for(;c<=u;c++)ol[c]&&(l[c]=s)}}calculateLinesForMeasure(e,t){var n,i;const r=t.getBBox(),o=Math.max(Math.round(e.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),s=r.height/unitInPixels,a=t.getElementsByClassName("vf-stave")[0].getBBox();let l=(null==a?void 0:a.height)/unitInPixels,c=(null==a?void 0:a.y)/unitInPixels;const u=e.getVFStave();let h=(null!==(n=u.options)&&void 0!==n&&n.num_lines?u.options.num_lines:5)-1,d=-1,p=0;const f=[h];for(const x of null===(m=u.options)||void 0===m?void 0:m.line_config){var m;x.visible?(-1===d&&(d=p),f.push(p)):h--,p++}-1===d&&(d=0),h=f.pop()-d;const g=null===(i=u.options)||void 0===i?void 0:i.spacing_between_lines_px,v=h*g/unitInPixels;l-v>.2&&(l=v,c=d*g/unitInPixels);const b=c+l,A=new Array(o).fill(c),y=new Array(o).fill(b),S=[A,y];if(s>l)for(const x of t.children)this.recursiveUpdate(x,{top:c,bottom:b},r,[A,y]);return S}calculateLines(){this.mSkyLine=[],this.mBottomLine=[];const e=document.createElement("div");document.body.append(e);const t=new SvgVexFlowBackend(this.mRules);t.initialize(e,1,"0");const n=t.getContext(),i=n.openGroup();i.classList.add("staffline");for(const r of this.StaffLineParent.Measures){r.PositionAndShape.calculateAbsolutePositionsRecursive(0,0),r.setAbsoluteCoordinates(r.PositionAndShape.AbsolutePosition.x*unitInPixels,r.PositionAndShape.AbsolutePosition.y*unitInPixels);const e=r.draw(n),[t,i]=this.calculateLinesForMeasure(r,e);this.mSkyLine.push(...t),this.mBottomLine.push(...i)}n.closeGroup();for(const r of i.getElementsByClassName("vf-ties"))for(const e of r.childNodes)if("path"===e.nodeName.toLowerCase()){const t=e.getBBox();let n=Math.floor(t.x/unitInPixels*this.mRules.SamplingUnit);const i=n+Math.ceil(t.width/unitInPixels*this.mRules.SamplingUnit),r=t.y/unitInPixels,o=t.height/unitInPixels+r;for(;n<=i;n++)rthis.mBottomLine[n]&&(this.mBottomLine[n]=o)}t.clear(),e.remove()}}const VF$1=Vex.Flow;class VexFlowGraphicalSymbolFactory{constructor(){this.hasBBox=!1;void 0!==document.createElementNS("http://www.w3.org/2000/svg","g").getBBox&&(this.hasBBox=!0)}createMusicSystem(e,t){return new VexFlowMusicSystem(e,t)}createStaffLine(e,t){return new VexFlowStaffLine(e,t)}createSkyBottomLineCalculator(e){return e.ParentMusicSystem.rules.PerformanceMode&&this.hasBBox?new SkyBottomLineCalculatorSVG(e):new SkyBottomLineCalculator(e)}createGraphicalMeasure(e,t,n=!1){return new VexFlowMeasure(t,e,void 0)}createMultiRestMeasure(e,t,n){return new VexFlowMultiRestMeasure(t,e,n)}createTabStaffMeasure(e,t){return new VexFlowTabMeasure(t,e)}createExtraGraphicalMeasure(e){const t=new VexFlowMeasure(e.ParentStaff,void 0,e);return t.IsExtraGraphicalMeasure=!0,t.ExtraGraphicalMeasurePreviousMeasure=e.Measures.last(),t}createStaffEntry(e,t){return new VexFlowStaffEntry(t,e,void 0)}createVoiceEntry(e,t){return new VexFlowVoiceEntry(e,t)}createNote(e,t,n,i=OctaveEnum.NONE,r,o=undefined){return new VexFlowGraphicalNote(e,t,n,i,r,o)}createGraceNote(e,t,n,i,r=OctaveEnum.NONE){return new VexFlowGraphicalNote(e,t,n,r,i)}addGraphicalAccidental(e,t){e.setAccidental(t)}addFermataAtTiedEndNote(e,t){}createInStaffClef(e,t){const n=e,i=VexFlowConverter.Clef(t,"small");n.vfClefBefore=new VF$1.ClefNote(i.type,i.size,i.annotation)}createChordSymbols(e,t,n,i){const r=t.parentMeasure.parentSourceMeasure.Rules;let o=0;const s=r.ChordSymbolXSpacing;for(const a of e.ChordContainers){const e=new GraphicalChordSymbolContainer(a,t.PositionAndShape,r.ChordSymbolTextHeight,n,i,t.parentMeasure.parentSourceMeasure.Rules),l=e.GraphicalLabel;l.PositionAndShape.RelativePosition.y-=r.ChordSymbolYOffset,l.PositionAndShape.RelativePosition.x+=o,l.setLabelPositionAndShapeBorders(),e.PositionAndShape.calculateBoundingBox(),t.graphicalChordContainers.push(e),o+=l.PositionAndShape.Size.width+s}}createGraphicalTechnicalInstruction(e,t){}}class GraphicalTie{constructor(e,t=undefined,n=undefined){this.tie=e,this.startNote=t,this.endNote=n}get SVGElement(){return this.vfTie.getAttribute("el")}get GetTie(){return this.tie}get StartNote(){return this.startNote}get Tie(){return this.tie}set StartNote(e){this.startNote=e}get EndNote(){return this.endNote}set EndNote(e){this.endNote=e}}class GraphicalLyricEntry{constructor(e,t,n,i){this.lyricsEntry=e,this.graphicalStaffEntry=t;const r=t.parentMeasure.parentSourceMeasure.Rules.LyricsAlignmentStandard;e.Text.length>=4&&e.Parent.Notes[0].Length.Denominator>4&&TextAlignmentEnum.LeftBottom;const o=new Label(e.Text);this.graphicalLabel=new GraphicalLabel(o,n,r,this.graphicalStaffEntry.parentMeasure.parentSourceMeasure.Rules,t.PositionAndShape),this.graphicalLabel.PositionAndShape.RelativePosition=new PointF2D(0,i),r===TextAlignmentEnum.LeftBottom&&(this.graphicalLabel.PositionAndShape.RelativePosition.x-=1)}get LyricsEntry(){return this.lyricsEntry}get ParentLyricWord(){return this.graphicalLyricWord}set ParentLyricWord(e){this.graphicalLyricWord=e}get GraphicalLabel(){return this.graphicalLabel}set GraphicalLabel(e){this.graphicalLabel=e}get StaffEntryParent(){return this.graphicalStaffEntry}set StaffEntryParent(e){this.graphicalStaffEntry=e}}class GraphicalLyricWord{constructor(e){this.graphicalLyricsEntries=[],this.lyricWord=e,this.initialize()}get GetLyricWord(){return this.lyricWord}get GraphicalLyricsEntries(){return this.graphicalLyricsEntries}set GraphicalLyricsEntries(e){this.graphicalLyricsEntries=e}isFilled(){for(let e=0;e=_GraphicalCurve.bezierCurveStepSize?new PointF2D:new PointF2D(_GraphicalCurve.oneMinusTPow3[t]*this.bezierStartPt.x+_GraphicalCurve.bezierFactorOne[t]*this.bezierStartControlPt.x+_GraphicalCurve.bezierFactorTwo[t]*this.bezierEndControlPt.x+_GraphicalCurve.tPow3[t]*this.bezierEndPt.x,_GraphicalCurve.oneMinusTPow3[t]*this.bezierStartPt.y+_GraphicalCurve.bezierFactorOne[t]*this.bezierStartControlPt.y+_GraphicalCurve.bezierFactorTwo[t]*this.bezierEndControlPt.y+_GraphicalCurve.tPow3[t]*this.bezierEndPt.y)}};let GraphicalCurve=_GraphicalCurve;GraphicalCurve.bezierCurveStepSize=1e3;const _GraphicalSlur=class extends GraphicalCurve{constructor(e,t){super(),this.staffEntries=[],this.slur=e,this.rules=t}static Compare(e,t){if(e.staffEntries.length<1)return-1;if(t.staffEntries.length<1)return 1;const n=Fraction$1.minus(e.staffEntries[e.staffEntries.length-1].getAbsoluteTimestamp(),e.staffEntries[0].getAbsoluteTimestamp()),i=Fraction$1.minus(t.staffEntries[t.staffEntries.length-1].getAbsoluteTimestamp(),t.staffEntries[0].getAbsoluteTimestamp());return n.RealValue>i.RealValue?1:i.RealValue>n.RealValue?-1:0}calculateCurve(e){const t=this.staffEntries[0],n=this.staffEntries[this.staffEntries.length-1];let i=t.findGraphicalNoteFromNote(this.slur.StartNote);!i&&this.graceStart&&(i=t.findGraphicalNoteFromGraceNote(this.slur.StartNote)),i||(i=t.findEndTieGraphicalNoteFromNoteWithStartingSlur(this.slur.StartNote,this.slur));let r=n.findGraphicalNoteFromNote(this.slur.EndNote);!r&&this.graceEnd&&(r=n.findGraphicalNoteFromGraceNote(this.slur.EndNote));const o=t.parentMeasure.ParentStaffLine,s=o.SkyBottomLineCalculator;this.calculatePlacement(s,o);const a=this.calculateStartAndEnd(i,r,o,e,s),l=a.startX,c=a.endX;let u=a.startY,h=a.endY;const d=e.SlurTangentMinAngle,p=e.SlurTangentMaxAngle;let f;if(this.placement===PlacementEnum.Above){u-=e.SlurNoteHeadYOffset,h-=e.SlurNoteHeadYOffset;const t=new PointF2D(this.staffEntries[0].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[0].PositionAndShape.RelativePosition.x,u);i?t.x+=this.staffEntries[0].PositionAndShape.BorderRight:t.x=this.staffEntries[0].parentMeasure.beginInstructionsWidth,this.graceStart&&(t.x+=n.PositionAndShape.RelativePosition.x);const a=new PointF2D(this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].PositionAndShape.RelativePosition.x,h);if(r?a.x+=this.staffEntries[this.staffEntries.length-1].PositionAndShape.BorderLeft:a.x=this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.Size.width,this.graceEnd&&(a.x+=n.staffEntryParent.PositionAndShape.RelativePosition.x),f=this.calculateTopPoints(t,a,o,s),0===f.length){const e=new PointF2D((a.x-t.x)/2+t.x,(a.y-t.y)/2+t.y);f.push(e)}const m=Math.atan((h-u)/(c-l)),g=new PointF2D(0,0);let v=new PointF2D(c-l,-(h-u));const b=Matrix2D.getRotationMatrix(m),A=b.getTransposeMatrix();v=b.vectorMultiplication(v);const y=this.calculateTranslatedAndRotatedPointListAbove(f,l,u,b);let S=this.calculateMaxLeftSlope(y,g,v),x=this.calculateMaxRightSlope(y,g,v);const w=g.y-g.x*S,E=v.y-v.x*x,_=new PointF2D;let M=!1;Math.abs(Math.abs(S)-Math.abs(x))<1e-4?(_.x=v.x/2,_.y=0,M=!0):(_.x=(E-w)/(S-x),_.y=S*_.x+w);const P=this.calculateHeightWidthRatio(v.x,y);let T=0,C=0;if(Math.abs(P)>.001){const e=Math.abs(S/(2*P)),t=Math.abs(S);T=Math.max(0,t*(Math.min(10,e-1)/10)),S-=T;const n=Math.abs(x/(2*P)),i=Math.abs(x);C=Math.max(0,i*(Math.min(10,n-1)/10)),x+=C}let I=d,k=-d;if(!M){const e=this.calculateAngles(d,S,x,p);I=e.startAngle,k=e.endAngle}const B=this.calculateControlPoints(v.x,I,k,y,P,u,h);let R=B.startControlPoint,L=B.endControlPoint;R=A.vectorMultiplication(R),R.x+=l,R.y=-R.y+u,L=A.vectorMultiplication(L),L.x+=l,L.y=-L.y+u,this.bezierStartPt=new PointF2D(l,u-T),this.bezierStartControlPt=new PointF2D(R.x,R.y-T),this.bezierEndControlPt=new PointF2D(L.x,L.y-C),this.bezierEndPt=new PointF2D(c,h-C);const N=o.SkyLine.length,D=s.getLeftIndexForPointX(this.bezierStartPt.x,N),F=s.getLeftIndexForPointX(this.bezierEndPt.x,N),O=this.bezierEndPt.x-this.bezierStartPt.x,V=s.SamplingUnit;for(let e=D;e=D&&(o.SkyLine[i]=Math.min(o.SkyLine[i],n.y)),i++,i.001){const e=Math.abs(S/(2*P)),t=Math.abs(S);T=Math.max(0,t*(Math.min(10,e-1)/10)),S-=T;const n=Math.abs(x/(2*P)),i=Math.abs(x);C=Math.max(0,i*(Math.min(10,n-1)/10)),x+=C}let I=d,k=-d;if(!M){const e=this.calculateAngles(d,S,x,p);I=e.startAngle,k=e.endAngle}const B=this.calculateControlPoints(v.x,I,k,y,P,u,h);let R=B.startControlPoint,L=B.endControlPoint;R=A.vectorMultiplication(R),R.x+=l,R.y+=u,L=A.vectorMultiplication(L),L.x+=l,L.y+=u,this.bezierStartPt=new PointF2D(l,u+T),this.bezierStartControlPt=new PointF2D(R.x,R.y+T),this.bezierEndControlPt=new PointF2D(L.x,L.y+C),this.bezierEndPt=new PointF2D(c,h+C);const N=o.BottomLine.length,D=s.getLeftIndexForPointX(this.bezierStartPt.x,N),F=s.getLeftIndexForPointX(this.bezierEndPt.x,N),O=this.bezierEndPt.x-this.bezierStartPt.x,V=s.SamplingUnit;for(let e=D;e=D&&(o.BottomLine[i]=Math.max(o.BottomLine[i],n.y)),i++,i0)return void(this.placement=PlacementEnum.Above)}const n=this.staffEntries[0],i=this.staffEntries[this.staffEntries.length-1],r=n.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection;if(r===i.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection)this.placement=r===StemDirectionType.Up?PlacementEnum.Below:PlacementEnum.Above;else{let r=n.PositionAndShape.BorderLeft+n.PositionAndShape.RelativePosition.x+n.parentMeasure.PositionAndShape.RelativePosition.x,o=i.PositionAndShape.BorderRight+i.PositionAndShape.RelativePosition.x+i.parentMeasure.PositionAndShape.RelativePosition.x;this.graceStart&&(r+=i.PositionAndShape.RelativePosition.x),this.graceEnd&&(o+=i.staffEntryParent.PositionAndShape.RelativePosition.x);const s=-1*e.getSkyLineMinInRange(r,o),a=e.getBottomLineMaxInRange(r,o)-t.StaffHeight;this.placement=a>s?PlacementEnum.Above:PlacementEnum.Below}}calculateTopPoints(e,t,n,i){const r=[];let o=i.getRightIndexForPointX(e.x,n.SkyLine.length),s=i.getLeftIndexForPointX(t.x,n.SkyLine.length);o<0&&(o=0),s>=n.SkyLine.length&&(s=n.SkyLine.length-1);for(let a=o;a=n.BottomLine.length&&(s=n.BottomLine.length-1);for(let a=o;ac&&e>u&&(l+=e/70*this.rules.SlurHeightFlattenLongSlursFactorByWidth,l*=1+t/30*this.rules.SlurHeightFlattenLongSlursFactorByAngle,a/=l);const h=Math.min(.5,Math.max(.1,1.7*t/80*a*Math.pow(Math.max(r,.05),.4))),d=Math.min(.5,Math.max(.1,1.7*-n/80*a*Math.pow(Math.max(r,.05),.4))),p=new PointF2D;p.x=e*h*Math.cos(t*_GraphicalSlur.degreesToRadiansFactor),p.y=e*h*Math.sin(t*_GraphicalSlur.degreesToRadiansFactor);const f=new PointF2D;f.x=e-e*d*Math.cos(n*_GraphicalSlur.degreesToRadiansFactor),f.y=-e*d*Math.sin(n*_GraphicalSlur.degreesToRadiansFactor);let m=p.y-f.y;for(;this.rules.SlurMaximumYControlPointDistance&&Math.abs(m)>this.rules.SlurMaximumYControlPointDistance;)m<0?(p.y+=1,f.y-=1):(p.y-=1,f.y+=1),m=p.y-f.y;return{startControlPoint:p,endControlPoint:f}}calculateAngles(e,t,n,i){let r=Math.atan(t)/_GraphicalSlur.degreesToRadiansFactor;t>0?r+=20:r-=20;let o=Math.atan(n)/_GraphicalSlur.degreesToRadiansFactor;n<0?o-=20:o+=20;return{startAngle:Math.min(Math.max(e,r),i),endAngle:Math.max(Math.min(-e,o),-i)}}};let GraphicalSlur=_GraphicalSlur;GraphicalSlur.degreesToRadiansFactor=Math.PI/180;class GraphicalPedal extends GraphicalObject{constructor(e,t){super(),this.getPedal=e,this.setSymbol(),this.PositionAndShape=new BoundingBox$1(this,t)}setSymbol(){!this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=MusicSymbol.PEDAL_SYMBOL:this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=MusicSymbol.PEDAL_MIXED:this.pedalSymbol=MusicSymbol.PEDAL_BRACKET}}class VexFlowPedal extends GraphicalPedal{constructor(e,t,n=!1,i=!1){switch(super(e,t),this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET,this.ChangeBegin=!1,this.ChangeEnd=!1,this.line=-3,this.EndSymbolPositionAndShape=void 0,this.ChangeBegin=e.ChangeBegin,this.ChangeEnd=e.ChangeEnd,this.pedalSymbol){case MusicSymbol.PEDAL_SYMBOL:this.vfStyle=Vex.Flow.PedalMarking.Styles.TEXT,this.EndSymbolPositionAndShape=new BoundingBox$1(this,t);break;case MusicSymbol.PEDAL_MIXED:this.vfStyle=n&&i?Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:n?Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:i?Vex.Flow.PedalMarking.Styles.MIXED_OPEN_END:Vex.Flow.PedalMarking.Styles.MIXED;break;case MusicSymbol.PEDAL_BRACKET:default:this.vfStyle=n&&i?Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:n?Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:i?Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_END:Vex.Flow.PedalMarking.Styles.BRACKET}}setStartNote(e){if(!e)return!1;for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote)return this.startNote=e.vfStaveNote,this.startVfVoiceEntry=e,!0}return!1}setEndNote(e){if(!e)return!1;for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote)return this.endNote=e.vfStaveNote,this.endVfVoiceEntry=e,!0}return!1}setEndMeasure(e){this.endMeasure=e}CalculateBoundingBox(){}setLine(e){this.line=e}getPedalMarking(){var e,t,n,i;const r=new Vex.Flow.PedalMarking([this.startNote,this.endNote]);return this.endMeasure&&r.setEndStave(this.endMeasure.getVFStave()),r.setStyle(this.vfStyle),r.setLine(this.line),r.setCustomText(this.DepressText,this.ReleaseText),(null===(e=this.endVfVoiceEntry)||void 0===e?void 0:e.parentStaffEntry)!==(null===(t=this.endVfVoiceEntry)||void 0===t||null===(n=t.parentStaffEntry)||void 0===n||null===(i=n.parentMeasure)||void 0===i?void 0:i.staffEntries.last())&&this.endVfVoiceEntry||(r.EndsStave=!0),r.ChangeBegin=this.ChangeBegin,r.ChangeEnd=this.ChangeEnd,r}}class GraphicalWavyLine extends GraphicalObject{constructor(e,t){super(),this.getWavyLine=e,this.PositionAndShape=new BoundingBox$1(this,t)}}class VexflowVibratoBracket extends GraphicalWavyLine{constructor(e,t,n=!1){super(e,t),this.line=1,this.isVibrato=!1,this.toEndOfStopStave=!1,this.isVibrato=n}get ToEndOfStopStave(){return this.toEndOfStopStave}setStartNote(e){for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote)return this.startNote=e.vfStaveNote,this.startVfVoiceEntry=e,!0}return!1}setEndNote(e){for(const t of e.graphicalVoiceEntries){const e=t;if(null!=e&&e.vfStaveNote){this.endNote=e.vfStaveNote,this.endVfVoiceEntry=e;const t=this.endVfVoiceEntry.parentStaffEntry.parentMeasure.staffEntries,n=t[t.length-1];return this.toEndOfStopStave=n===this.endVfVoiceEntry.parentStaffEntry,!0}}return!1}CalculateBoundingBox(){const e=this.getVibratoBracket();this.boundingBox.Size.height=.2*e.render_options.wave_height}getVibratoBracket(){const e=new Vex.Flow.VibratoBracket({start:this.startNote,stop:this.endNote,toEndOfStopStave:this.toEndOfStopStave});return e.setLine(this.line),this.isVibrato?e.render_options.vibrato_width=20:e.render_options.wave_girth=4,e}}const VF=Vex.Flow;class VexFlowMusicSheetCalculator extends MusicSheetCalculator{constructor(e){var t,n,i,r,o;if(super(),this.beamsNeedUpdate=!1,this.rules=e,MusicSheetCalculator.symbolFactory=new VexFlowGraphicalSymbolFactory,MusicSheetCalculator.TextMeasurer=new VexFlowTextMeasurer(this.rules),MusicSheetCalculator.stafflineNoteCalculator=new VexflowStafflineNoteCalculator(this.rules),"gonville"===(null===(t=this.rules.DefaultVexFlowNoteFont)||void 0===t?void 0:t.toLowerCase()))Vex.Flow.DEFAULT_FONT_STACK=[null===(i=Vex.Flow.Fonts)||void 0===i?void 0:i.Gonville,null===(r=Vex.Flow.Fonts)||void 0===r?void 0:r.Bravura,null===(o=Vex.Flow.Fonts)||void 0===o?void 0:o.Custom];else if("petaluma"===(null===(n=this.rules.DefaultVexFlowNoteFont)||void 0===n?void 0:n.toLowerCase())){var s,a,l;Vex.Flow.DEFAULT_FONT_STACK=[null===(s=Vex.Flow.Fonts)||void 0===s?void 0:s.Petaluma,null===(a=Vex.Flow.Fonts)||void 0===a?void 0:a.Gonville,null===(l=Vex.Flow.Fonts)||void 0===l?void 0:l.Bravura]}}clearRecreatedObjects(){super.clearRecreatedObjects(),MusicSheetCalculator.stafflineNoteCalculator=new VexflowStafflineNoteCalculator(this.rules);for(const e of this.graphicalMusicSheet.MeasureList)for(const t of e)null==t||t.clean()}formatMeasures(){for(const e of this.graphicalMusicSheet.MeasureList){if(!e||!e[0])continue;e[0].format();for(const t of e){for(const e of t.staffEntries)e.calculateXPosition();t.finalizeBeams()}}this.beamsNeedUpdate=!1}calculateMeasureXLayout(e){const t=[];for(const l of e)l&&t.push(l);if(0===t.length)return 0;e=t;const n=[],i=new VF.Formatter({softmaxFactor:this.rules.SoftmaxFactorVexFlow});let r=e[0].staffEntries.length,o=1;for(const l of e){if(!l)continue;let e=0;for(const n of l.staffEntries)e+=n.setMaxAccidentals();l.parentSourceMeasure.ImplicitMeasure&&(r=Math.max(l.staffEntries.length,r),o=Math.max(l.staffEntries.length+e,o));const t=l.vfVoices,s=[];for(const i in t)t.hasOwnProperty(i)&&(s.push(t[i]),n.push(t[i]));0!==s.length?i.joinVoices(s):loglevelExports.debug("Found a measure with no voices. Continuing anyway.",t)}let s=12;const a=e[0].parentSourceMeasure;if(n.length>0){s=i.preCalculateMinTotalWidth(n)/unitInPixels*this.rules.VoiceSpacingMultiplierVexflow+this.rules.VoiceSpacingAddendVexflow+.3*r,null!=a&&a.ImplicitMeasure&&(s=a.Duration.RealValue/a.ActiveTimeSignature.RealValue*s,r>1&&(s+=.3*o*1.5),s*=this.rules.PickupMeasureWidthMultiplier),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(e,s);const t=(e,t)=>{i.formatToStave(n,t.getVFStave())},l=(e,t)=>{i.formatToStave(n,t.getVFStave(),{align_rests:!0,context:void 0})};for(const n of e){if(this.rules.AlignRests===AlignRestOption.Never)n.formatVoices=t;else if(this.rules.AlignRests===AlignRestOption.Always)n.formatVoices=l;else if(this.rules.AlignRests===AlignRestOption.Auto){let e=!1;for(const t of n.staffEntries){let n=0,i=0;for(const r of t.graphicalVoiceEntries)if(r.parentVoiceEntry.IsGrace||r&&r.notes&&r.notes[0]&&r.notes[0].sourceNote&&r.notes[0].sourceNote.PrintObject&&n++,r&&r.notes&&r.notes[0]&&r.notes[0].sourceNote&&r.notes[0].sourceNote.isRest()&&r.notes[0].sourceNote.PrintObject&&i++,n>1&&i>=1){e=!0;break}if(e)break}n.formatVoices=e?l:t}if(n===e[0]){const e=n;e.formatVoices(s*unitInPixels,e)}}}for(const l of e)if(l)for(const e of l.staffEntries)e.calculateXPosition();for(const l of e){if(!l)continue;const e=l.vfVoices,t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);0!==t.length?i.joinVoices(t):loglevelExports.debug("Found a measure with no voices. Continuing anyway.",e)}return s}calculateElongationFactor(e,t,n,i,r,o,s,a){let l=r,c=0;for(const u of e){const e=u.GraphicalLabel.Label.textAlignment;let h=s,d=a;if(u instanceof GraphicalLyricEntry&&u.ParentLyricWord){u.LyricsEntry.SyllableIndex>0&&(h=this.rules.BetweenSyllableMinimumDistance,TextAlignment.IsCenterAligned(e)&&(h+=1));const t=u.ParentLyricWord.GetLyricWord.Syllables;t.length>1&&u.LyricsEntry.SyllableIndex4&&(w*=1.1)}}else n[c]&&(w=g/v);S=Math.max(x,w),l=Math.max(l,S);let E=Math.max(g-v||0,0);n[c]&&(E+=n[c].cumulativeOverlap),n[c]={cumulativeOverlap:E,extend:u instanceof GraphicalLyricEntry&&u.LyricsEntry.extend,labelWidth:f,measureNumber:o,sourceNoteDuration:u instanceof GraphicalLyricEntry&&(u.LyricsEntry&&u.LyricsEntry.Parent.Notes[0].Length),text:u instanceof GraphicalLyricEntry?u.LyricsEntry.Text:u.GraphicalLabel.Label.text,xPosition:m},c++}return l}calculateElongationFactorFromStaffEntries(e,t,n,i){let r=n;const o={},s={};for(const a of e)a.LyricsEntries.length>0&&(r=this.calculateElongationFactor(a.LyricsEntries,a,o,t,r,i,this.rules.HorizontalBetweenLyricsDistance,this.rules.LyricOverlapAllowedIntoNextMeasure)),a.graphicalChordContainers.length>0&&(r=this.calculateElongationFactor(a.graphicalChordContainers,a,s,t,r,i,this.rules.ChordSymbolXSpacing,this.rules.ChordOverlapAllowedIntoNextMeasure));return r}calculateMeasureWidthFromStaffEntries(e,t){var n;let i=1;if(!(null===(n=window.GYM)||void 0===n?void 0:n.multitrack))for(const r of e)r&&0!==r.staffEntries.length&&(i=this.calculateElongationFactorFromStaffEntries(r.staffEntries,t,i,r.MeasureNumber),i=1);i=Math.min(i,this.rules.MaximumLyricsElongationFactor);return t*i}createGraphicalTie(e,t,n,i,r){return new GraphicalTie(e,i,r)}updateStaffLineBorders(e){e.SkyBottomLineCalculator.updateStaffLineBorders()}graphicalMeasureCreatedCalculations(e){e.rules=this.rules,e.graphicalMeasureCreatedCalculations()}layoutVoiceEntry(e,t,n,i){for(let r=0;r=2&&(o=i.vfnote[0],a=i.vfnote[1]);let l=0;if(r&&r.vfnote&&r.vfnote.length>=2&&(s=r.vfnote[0],l=r.vfnote[1]),t){if(o){const t=new VF.StaveTie({first_indices:[a],first_note:o}),n=i.parentVoiceEntry.parentStaffEntry.parentMeasure;if(s){var c,u,h;"w"===s.getDuration()&&(null===(c=s.keyProps)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.line)>=3&&s.setStemDirection(-1);let e=(null===(h=window.GYM)||void 0===h?void 0:h.tieDirection)||0;var d,p;if(1===Math.abs(e))(null===(d=s.keyProps)||void 0===d||null===(p=d[0])||void 0===p?void 0:p.line)>=3?s.setStemDirection(-e):s.setStemDirection(e);null==t||t.setDirection(s.getStemDirection())}if(n.vfTies.length>0){const e=n.vfTies[0].direction;null==t||t.setDirection(e?-e:1)}n.addStaveTie(t,e)}if(s){const t=new VF.StaveTie({last_indices:[l],last_note:s}),n=r.parentVoiceEntry.parentStaffEntry.parentMeasure;if(n.vfTies.length>0){const e=n.vfTies[0].direction;null==t||t.setDirection(e?-e:1)}n.addStaveTie(t,e)}}else if(o||s){var f;let t;if(n)if("S"===e.Tie.Type){const n=e.StartNote.sourceNote,i=e.EndNote.sourceNote;let r=1;n.FretNumber>i.FretNumber&&(r=-1),t=new VF.TabSlide({first_indices:[a],first_note:o,last_indices:[l],last_note:s},r)}else t=new VF.TabTie({first_indices:[a],first_note:o,last_indices:[l],last_note:s},e.Tie.Type);else{t=new VF.StaveTie({first_indices:[a],first_note:o,last_indices:[l],last_note:s});const n=e.Tie.getTieDirection(i.sourceNote);n===PlacementEnum.Below?t.setDirection(1):n===PlacementEnum.Above&&t.setDirection(-1);try{var m,g;Math.abs((null===(m=o)||void 0===m?void 0:m.getTieRightX())-(null===(g=s)||void 0===g?void 0:g.getTieLeftX()))<10&&(t.render_options.first_x_shift=-3,t.render_options.last_x_shift=3)}catch(v){console.log(v)}}const c=r.parentVoiceEntry.parentStaffEntry.parentMeasure,u=(null===(f=window.GYM)||void 0===f?void 0:f.graceCustom)||!1;u&&t.setDirection(u.direction),c.addStaveTie(t,e)}}calculateDynamicExpressionsForMultiExpression(t,n,i){if(nthis.rules.MaxMeasureToDrawIndex)return;const r=t.AbsoluteTimestamp,o=this.graphicalMusicSheet.MeasureList[n],s=o[i].ParentStaffLine,a=o[i];if(!s)return;const l=this.getRelativePositionInStaffLineFromTimestamp(r,i,s,null==s?void 0:s.isPartOfMultiStaffInstrument());if(l.x<=0&&(l.x=a.beginInstructionsWidth+this.rules.RhythmRightMargin),t.InstantaneousDynamic){const e=new VexFlowInstantaneousDynamicExpression(t.InstantaneousDynamic,s,a);this.calculateGraphicalInstantaneousDynamicExpression(e,l,r),this.dynamicExpressionMap.set(r.RealValue,e.PositionAndShape)}if(t.StartingContinuousDynamic){const n=t.StartingContinuousDynamic,i=new VexFlowContinuousDynamicExpression(t.StartingContinuousDynamic,s,a.parentSourceMeasure);if(i.StartMeasure=a,!i.IsVerbal&&n.EndMultiExpression)try{this.calculateGraphicalContinuousDynamic(i,l),i.updateSkyBottomLine()}catch(e){}else i.IsVerbal?this.calculateGraphicalVerbalContinuousDynamic(i,l):loglevelExports.warn("This continuous dynamic is not covered. measure"+t.SourceMeasureParent.MeasureNumber)}}createMetronomeMark(e,t){var n,i,r;const o=Math.max(e.ParentMultiTempoExpression.SourceMeasureParent.MeasureNumber-1,0),s=t||o,a=Math.max(e.StaffNumber-1,0),l=this.graphicalMusicSheet.MeasureList[s][a].getVFStave();let c="q";if(e.beatUnit){const t=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);c=VexFlowConverter.durations(t,!1)[0]}let u=this.rules.MetronomeMarkYShift,h=!1;const d=[];if(e.parentMeasure){for(const t of e.parentMeasure.StaffLinkedExpressions)for(const e of t)e&&e instanceof UnknownExpression&&d.push(e);for(const t of e.parentMeasure.TempoExpressions){var p;const n=(null===(p=t.InstantaneousTempo)||void 0===p?void 0:p.Enum)===TempoEnum.metronomeMark;if(!e.beatUnit&&t.InstantaneousTempo.beatUnit){const t=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);c=VexFlowConverter.durations(t,!1)[0]}if(t.getPlacementOfFirstEntry()===PlacementEnum.Above&&!n){h=!0;break}}}h&&(u-=1.4);const f=null===(n=this.graphicalMusicSheet.MeasureList[0][0].ParentStaffLine)||void 0===n?void 0:n.SkyLine;let m=e.TempoInBpm,g="",v="",b="";for(const P of this.graphicalMusicSheet.MeasureList[s][a].parentSourceMeasure.TempoExpressions){if(v=P.CombinedExpressionsText,isSpecialMark(P.CombinedExpressionsText)){g=P.CombinedExpressionsText;break}if(isSpeedKeyword(P.CombinedExpressionsText)||isSpeedHiddenKeyword(P.CombinedExpressionsText)){g=formatSpeedKeyword(P.CombinedExpressionsText),m=P.sourceMeasure.TempoInBPM,isSpeedKeyword(P.CombinedExpressionsText)&&(b=c);break}}const A={bpm:e.TempoInBpm,dots:e.dotted,duration:c,name:g};g&&(A.bpm=m/(A.dots?1.5:1),isSpeedKeyword(v)?A.duration=b:m!==SpeedTag[g]&&SpeedTag[g]||(A.duration=""));const y=(null===(i=this.graphicalMusicSheet.MeasureList[s][a].vfVoices)||void 0===i||null===(r=i[1])||void 0===r?void 0:r.boundingBox.y)||0;if(this.rules.MetronomeMarksDrawn){if(f){var S,x;const e=(null===(S=this.graphicalMusicSheet.MeasureList[0])||void 0===S||null===(x=S[a])||void 0===x?void 0:x.ParentStaffLine).Measures.map((e=>e.MeasureNumber-1));if(y&&e.includes(s)&&(isSpeedKeyword(v)||isSpeedHiddenKeyword(v))){const e=f.slice(0,9);let t=Math.min(...e);t=t<0?t-1:t,u+=t}e.includes(s)&&d.length?f[0]=Math.min(f[0],-4.5+u-4):f[0]=Math.min(f[0],-4.5+u)}l.options.line_config.reduce(((e,t)=>(t.visible&&e++,e)),0)<5&&(u-=2),l.setTempo(A,u*unitInPixels);let t=0;try{var w,E,_;t+=(null===(w=this.graphicalMusicSheet.MeasureList[s][a])||void 0===w||null===(E=w.vfVoices)||void 0===E||null===(_=E[1])||void 0===_?void 0:_.getTickables())[e.parentMeasure.metronomeNoteIndex].getBoundingBox().getX()-l.getNoteStartX()}catch(M){}l.getModifiers()[l.getModifiers().length-1].setShiftX(t)}}calculateRehearsalMark(e){var t,n,i,r,o;const s=e.rehearsalExpression;if(!s)return;const a=null===(t=e.VerticalMeasureList)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.getVFStave)||void 0===i?void 0:i.call(n);if(!a)return;const l=-this.rules.RehearsalMarkYOffsetDefault-this.rules.RehearsalMarkYOffset;let c=this.rules.RehearsalMarkXOffsetDefault+this.rules.RehearsalMarkXOffset;e.IsSystemStartMeasure&&(c+=this.rules.RehearsalMarkXOffsetSystemStartMeasure);const u=this.rules.RehearsalMarkFontSize,h=a.getModifiers(),d=h.find((e=>"repetitions"===e.getCategory().toLocaleLowerCase()));if(d&&d.setShiftY(d.y_shift-10),a.setSection(s.label,l,c,u),null!==(r=e.VerticalMeasureList)&&void 0!==r&&null!==(o=r[0])&&void 0!==o&&o.ParentStaffLine.AbstractExpressions){const t=h.find((e=>"stavesection"===e.getCategory().toLocaleLowerCase()));for(let n of(null==e||null===(p=e.VerticalMeasureList)||void 0===p||null===(f=p[0])||void 0===f||null===(m=f.ParentStaffLine)||void 0===m?void 0:m.AbstractExpressions)||[]){var p,f,m;n instanceof GraphicalUnknownExpression&&(t&&(n.Label.PositionAndShape.RelativePosition.y-=.5),d&&(n.Label.PositionAndShape.RelativePosition.y-=1.7))}}}calculateSingleOctaveShift(e,t,n,i){var r;const o=t.OctaveShiftStart,s=o.ParentStartMultiExpression.Timestamp,a=null===(r=o.ParentEndMultiExpression)||void 0===r?void 0:r.Timestamp,l=this.rules.MinMeasureToDrawIndex,c=this.rules.MaxMeasureToDrawIndex;let u,h,d=this.graphicalMusicSheet.MeasureList[n][i].ParentStaffLine;if(d||(d=this.graphicalMusicSheet.MeasureList[l][i].ParentStaffLine),u=o.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentEndMultiExpression.SourceMeasureParent,i):this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(i,!0),u.MeasureNumber>c+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(i,!0)),h=o.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,i):this.graphicalMusicSheet.MeasureList[l][i],h.MeasureNumberc||u.parentSourceMeasure.measureListIndexc)return;let p=u.ParentStaffLine;if(p||(p=d),u&&d&&p){const e=new VexFlowOctaveShift(o,d.PositionAndShape);if(!e.startNote){let t;for(const e of h.staffEntries)if(e){t=e;break}if(!t)return;if(e.setStartNote(t),!e.startNote)return}if(!e.endNote){let t;for(let e=u.staffEntries.length-1;e>=0;e++)if(u.staffEntries[e]){t=u.staffEntries[e];break}if(e.setEndNote(t),!e.endNote)return}let t=h.findGraphicalStaffEntryFromTimestamp(s);t||(t=h.staffEntries[0]);let n=u.findGraphicalStaffEntryFromTimestamp(a);if(n||(n=u.staffEntries[u.staffEntries.length-1]),e.setStartNote(t),p!==d){e.endsOnDifferentStaffLine=!0;let r=d.Measures[d.Measures.length-1];void 0===r&&(r=u);const s=r.staffEntries[r.staffEntries.length-1];e.setEndNote(s);const a=p.ParentMusicSystem.Id-d.ParentMusicSystem.Id;if(a>0)for(let e=d.ParentMusicSystem.Id;ec+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(i,!0)),o.ParentEndMultiExpression?h=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,i):(h=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,i),h||(h=this.graphicalMusicSheet.MeasureList[l][i])),h.MeasureNumberc||u.parentSourceMeasure.measureListIndexc)return;let p=u.ParentStaffLine;if(p||(p=d),u&&d&&p){let e=!1;d!==p&&(e=!0);const t=new VexFlowPedal(o,d.PositionAndShape,!1,e);let n=h.findGraphicalStaffEntryFromTimestamp(s);n||(n=h.staffEntries[0]);let r=u.findGraphicalStaffEntryFromTimestamp(a);if(r||(r=u.staffEntries[u.staffEntries.length-1]),!t.setStartNote(n))return;if(p!==d)if(t.pedalSymbol===MusicSymbol.PEDAL_SYMBOL){t.setEndNote(r),t.setEndMeasure(u),t.ReleaseText=" ",t.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(t.startVfVoiceEntry,t.endVfVoiceEntry,t,d);const e=p.Measures[0],n=new VexFlowPedal(o,e.PositionAndShape),i=e.staffEntries[0];if(!n.setStartNote(i))return;n.setEndNote(r),t.setEndMeasure(u),p.Pedals.push(n),n.CalculateBoundingBox(),n.DepressText=" ",this.calculatePedalSkyBottomLine(n.startVfVoiceEntry,n.endVfVoiceEntry,n,p)}else{let e=d.Measures[d.Measures.length-1];void 0===e&&(e=u);const n=e.staffEntries[e.staffEntries.length-1];t.setEndNote(n),t.setEndMeasure(u),t.ChangeEnd=!1;const s=p.ParentMusicSystem.Id-d.ParentMusicSystem.Id;if(s>0){let e=1;for(let n=d.ParentMusicSystem.Id;nc+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(i,!0)),h=o.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,i):this.graphicalMusicSheet.MeasureList[l][i],h.MeasureNumberc||u.parentSourceMeasure.measureListIndexc)return;let p=u.ParentStaffLine;if(p||(p=d),u&&d&&p){const e=new VexflowVibratoBracket(o,d.PositionAndShape,h.ParentStaff.isTab);let t=h.findGraphicalStaffEntryFromTimestamp(s);t||(t=h.staffEntries[0]);let n=u.findGraphicalStaffEntryFromTimestamp(a);if(n||(n=u.staffEntries[u.staffEntries.length-1]),e.setStartNote(t),p!==d){let t=d.Measures[d.Measures.length-1];void 0===t&&(t=u);const r=t.staffEntries[t.staffEntries.length-1];e.setEndNote(r);if(p.ParentMusicSystem.Id-d.ParentMusicSystem.Id>0)for(let e=d.ParentMusicSystem.Id;ec){const e=c;c=u,u=e}i.SkyBottomLineCalculator.updateBottomLineInRange(u,c,h+e)}for(const g of i.Pedals){const e=g,t=e.getPedalMarking();if(h>t.line+3+(i.StaffLines.length-1)){var p;const n=t.render_options.text_margin_right/10;let r,a=e.startVfVoiceEntry.PositionAndShape.AbsolutePosition.x-n;e.setLine(h-3-(i.StaffLines.length-1));let l=null===(p=e.endVfVoiceEntry)||void 0===p?void 0:p.PositionAndShape;if(l||(l=e.endMeasure.PositionAndShape),e.EndSymbolPositionAndShape){const e=s.render_options.glyph_point_size/20;r=a+3.4;const t=l.AbsolutePosition.x-n,o=t+1.5;i.SkyBottomLineCalculator.updateBottomLineInRange(a,r,h+e),i.SkyBottomLineCalculator.updateBottomLineInRange(t,o,h+e)}else{var f,m;const c=t.render_options.bracket_height/10;if(t.EndsStave)r=l.AbsolutePosition.x+l.Size.width-n;else switch(s.style){case o.BRACKET_OPEN_END:case o.BRACKET_OPEN_BOTH:case o.MIXED_OPEN_END:r=l.AbsolutePosition.x+l.BorderRight-n;break;default:r=l.AbsolutePosition.x+l.BorderLeft-n}const u=null===(f=e.endVfVoiceEntry)||void 0===f||null===(m=f.parentStaffEntry)||void 0===m?void 0:m.vfClefBefore;if(u){r+=u.getWidth()/10}if(a>r){const e=a;a=r,r=e}i.SkyBottomLineCalculator.updateBottomLineInRange(a,r,h+c)}}}}calculateOctaveShiftSkyBottomLine(e,t,n,i){if(!t)return void loglevelExports.warn("octaveshift: no endStaffEntry");let r=e.PositionAndShape.Size.width,o=t.PositionAndShape.Size.width;e.hasOnlyRests()?r=-r:r/=2,t.hasOnlyRests()?o*=2:o/=2,e===t&&(o*=2);const s=e.PositionAndShape.AbsolutePosition.x-r,a=t.PositionAndShape.AbsolutePosition.x+o;n.PositionAndShape.Size.width=s-a;const l=n.getTextBracket(),c=l.font.size/10;if(l.position===VF.TextBracket.Positions.TOP){const e=Math.ceil(i.SkyBottomLineCalculator.getSkyLineMinInRange(s,a));if(e===1/0)return;l.start.getStave().options.top_text_position=Math.abs(e),i.SkyBottomLineCalculator.updateSkyLineInRange(s,a,e-2*c)}else{const n=i.SkyBottomLineCalculator.getBottomLineMaxInRange(s,a);if(n===1/0)return;l.start.getStave().options.bottom_text_position=n,e.parentMeasure!==t.parentMeasure&&(l.stop.getStave().options.bottom_text_position=n),i.SkyBottomLineCalculator.updateBottomLineInRange(s,a,n+1.5*c)}}calculateWordRepetitionInstruction(e,t){let n;const i=this.graphicalMusicSheet.MeasureList[t];for(let r=0,o=i.length;r{e.updateSkyBottomLine()}))}catch(e){}}handleTiedGraphicalNote(e,t,n,i,r,o,s,a){}handleBeam(e,t,n){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleBeam(e,t)}handleVoiceEntryLyrics(e,t,n){e.LyricsEntries.forEach(((e,i)=>{const r=new GraphicalLyricEntry(i,t,this.rules.LyricsHeight,this.rules.StaffHeight);t.LyricsEntries.push(r);if(r.GraphicalLabel.setLabelPositionAndShapeBorders(),i.Word){const e=i.Word.Syllables.indexOf(i);let t=n.indexOf(i.Word);if(-1===t&&(n.push(i.Word),t=n.indexOf(i.Word)),0===this.graphicalLyricWords.length||t>this.graphicalLyricWords.length-1){const t=new GraphicalLyricWord(i.Word);r.ParentLyricWord=t,t.GraphicalLyricsEntries[e]=r,this.graphicalLyricWords.push(t)}else{const i=this.graphicalLyricWords[t];r.ParentLyricWord=i,i.GraphicalLyricsEntries[e]=r,i.isFilled()&&(n.splice(t,1),this.graphicalLyricWords.splice(this.graphicalLyricWords.indexOf(i),1))}}}))}handleVoiceEntryOrnaments(e,t,n){}handleVoiceEntryArticulations(e,t,n){}handleVoiceEntryTechnicalInstructions(e,t,n){}handleTuplet(e,t,n){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleTuplet(e,t)}findIndexGraphicalSlurFromSlur(e,t){for(let n=0;n=0){const e=t[n];-1===e.staffEntries.indexOf(i)&&e.staffEntries.push(i),t.splice(n,1)}}}for(const e of t)-1===e.staffEntries.indexOf(i)&&e.staffEntries.push(i)}}for(const t of this.musicSystems)for(const e of t.StaffLines){const t=e.GraphicalSlurs.sort(GraphicalSlur.Compare);for(const e of t)e.slur.isCrossed()||e.calculateCurve(this.rules)}}}class MusicPartManager{constructor(e){this.musicSheet=e}reInit(){this.init()}init(){this.parts=this.musicSheet.Repetitions.slice(),this.sheetStart=this.musicSheet.SelectionStart=new Fraction$1(0,1),this.sheetEnd=this.musicSheet.SelectionEnd=this.musicSheet.SheetEndTimestamp,this.calcMapping()}getCurrentRepetitionTimestampTransform(e){let t;for(let n=this.timestamps.length-1;n>=0;n--)if(t=this.timestamps[n],e.gte(t.from))return t;return this.timestamps[0]}absoluteEnrolledToSheetTimestamp(e){if(0===this.timestamps.length)return e;const t=this.getCurrentRepetitionTimestampTransform(e);return Fraction$1.plus(e,Fraction$1.minus(t.to,t.from))}get Parts(){return this.parts}get MusicSheet(){return this.musicSheet}getIterator(e){return e?new MusicPartManagerIterator(this.musicSheet,e,void 0):new MusicPartManagerIterator(this.musicSheet,this.musicSheet.SelectionStart,this.musicSheet.SelectionEnd)}setSelectionStart(e){this.musicSheet.SelectionStart=e,this.musicSheet.SelectionEnd=void 0}setSelectionRange(e,t){this.musicSheet.SelectionStart=null!=e?e:this.sheetStart,this.musicSheet.SelectionEnd=null!=t?t:this.sheetEnd}calcMapping(){this.timestamps=[];const e=this.getIterator();let t=e.CurrentRepetition,n=new TimestampTransform(e.CurrentEnrolledTimestamp.clone(),e.CurrentSourceTimestamp.clone(),void 0,0);for(this.timestamps.push(n);!e.EndReached;){if(e.JumpOccurred||t!==e.CurrentRepetition){if(t=e.CurrentRepetition,e.backJumpOccurred){const t=e.JumpResponsibleRepetition;n.nextBackJump=e.CurrentEnrolledTimestamp,n.curRepetition=t,n.curRepetitionIteration=e.CurrentJumpResponsibleRepetitionIterationBeforeJump;for(let e=this.timestamps.length-2;e>=0&&(!t.AbsoluteTimestamp.gt(this.timestamps[e].to)&&!this.timestamps[e].curRepetition);e--)this.timestamps[e].nextBackJump=n.nextBackJump,this.timestamps[e].curRepetition=t,this.timestamps[e].curRepetitionIteration=n.curRepetitionIteration}n=new TimestampTransform(e.CurrentEnrolledTimestamp.clone(),e.CurrentSourceTimestamp.clone(),void 0,0),this.timestamps.push(n)}e.moveToNext()}}}class TimestampTransform{constructor(e,t,n,i){this.from=e,this.to=t,this.curRepetition=n,this.curRepetitionIteration=i,this.nextBackJump=void 0,this.nextForwardJump=void 0}}class PartListEntry{constructor(e){this.enrolledTimestamps=[],this.visible=!0,this.musicSheet=e}get Visible(){return this.visible}set Visible(e){this.visible=e}getFirstSourceMeasure(){return this.musicSheet.SourceMeasures[this.startIndex]}getLastSourceMeasure(){return this.musicSheet.SourceMeasures[this.endIndex]}}class SourceMusicPart extends PartListEntry{constructor(e,t,n){super(e),this.musicSheet=e,this.startIndex=t,this.endIndex=n}get MeasuresCount(){return this.endIndex-this.startIndex+1}get StartIndex(){return this.startIndex}get EndIndex(){return this.endIndex}get ParentRepetition(){return this.parentRepetition}set ParentRepetition(e){this.parentRepetition=e}get AbsoluteTimestamp(){return Fraction$1.createFromFraction(this.musicSheet.SourceMeasures[this.startIndex].AbsoluteTimestamp)}setStartIndex(e){this.startIndex=e}setEndIndex(e){this.endIndex=e}}class Repetition extends PartListEntry{constructor(e,t=!1){super(e),this.backwardJumpInstructions=[],this.endingParts=[],this.endingIndexDict={},this.userNumberOfRepetitions=0,this.visibles=[],this.fromWords=!1,this.repetitonIterationOrder=[],this.numberOfEndings=1,this.musicSheet2=e,this.virtualOverallRepetition=t}get BackwardJumpInstructions(){return this.backwardJumpInstructions}get EndingIndexDict(){return this.endingIndexDict}get EndingParts(){return this.endingParts}get Visibles(){return this.visibles}set Visibles(e){this.visibles=e}get DefaultNumberOfRepetitions(){let e=2;return this.virtualOverallRepetition&&(e=1),Math.max(e,Object.keys(this.endingIndexDict).length,this.checkRepetitionForMultipleLyricVerses())}get UserNumberOfRepetitions(){return this.userNumberOfRepetitions}set UserNumberOfRepetitions(e){this.userNumberOfRepetitions=e,this.repetitonIterationOrder=[];const t=this.userNumberOfRepetitions-this.NumberOfEndings;for(let n=1;n<=this.userNumberOfRepetitions;n++)n<=t?this.repetitonIterationOrder.push(1):this.repetitonIterationOrder.push(n-t)}getForwardJumpTargetForIteration(e){const t=this.repetitonIterationOrder[e-1];return this.endingIndexDict[t]?this.endingIndexDict[t].part.StartIndex:-1}getBackwardJumpTarget(){return this.startMarker.measureIndex}setEndingsStartIndex(e,t){const n=new RepetitionEndingPart(new SourceMusicPart(this.musicSheet2,t,t));this.endingParts.push(n);for(const i of e)try{this.endingIndexDict[i]=n,n.endingIndices.push(i),this.numberOfEndings0&&(i=1),r.Add(new Fraction$1(i,t)),r}}class MusicSheet{constructor(){this.idString="random idString, not initialized",this.sourceMeasures=[],this.repetitions=[],this.dynListStaves=[],this.timestampSortedDynamicExpressionsList=[],this.timestampSortedTempoExpressionsList=[],this.instrumentalGroups=[],this.instruments=[],this.musicPartManager=void 0,this.musicSheetErrors=new MusicSheetErrors,this.staves=[],this.playbackDataDict=new Dictionary,this.transpose=0,this.defaultStartTempoInBpm=0,this.drawErroneousMeasures=!1,this.hasBeenOpenedForTheFirstTime=!1,this.currentEnrolledPosition=new Fraction$1(0,1),this.soundTempos=new Map,this.playbackSettings=new PlaybackSettings,this.playbackSettings.rhythm=new Fraction$1(4,4,0,!1),this.userStartTempoInBPM=100,this.pageWidth=120,this.MusicPartManager=new MusicPartManager(this),this.hasBPMInfo=!1}get SoundTempos(){return this.soundTempos}set SoundTempos(e){this.soundTempos=e}static getIndexFromStaff(e){return e.idInMusicSheet}get CurrentKeyInstruction(){return this.currentKeyInstruction}set CurrentKeyInstruction(e){this.currentKeyInstruction=e}get SourceMeasures(){return this.sourceMeasures}set SourceMeasures(e){this.sourceMeasures=e}get Repetitions(){return this.repetitions}set Repetitions(e){this.repetitions=e}get DynListStaves(){return this.dynListStaves}get TimestampSortedTempoExpressionsList(){return this.timestampSortedTempoExpressionsList}get TimestampSortedDynamicExpressionsList(){return this.timestampSortedDynamicExpressionsList}get InstrumentalGroups(){return this.instrumentalGroups}get Parts(){return this.instruments}get Instruments(){return this.instruments}get SheetPlaybackSetting(){return this.playbackSettings}set SheetPlaybackSetting(e){this.playbackSettings=e}get DrawErroneousMeasures(){return this.drawErroneousMeasures}set DrawErroneousMeasures(e){this.drawErroneousMeasures=e}get HasBeenOpenedForTheFirstTime(){return this.hasBeenOpenedForTheFirstTime}set HasBeenOpenedForTheFirstTime(e){this.hasBeenOpenedForTheFirstTime=e}InitializeStartTempoInBPM(e){this.playbackSettings.BeatsPerMinute=e,this.userStartTempoInBPM=e}get DefaultStartTempoInBpm(){return this.defaultStartTempoInBpm}set DefaultStartTempoInBpm(e){this.defaultStartTempoInBpm=e,this.InitializeStartTempoInBPM(e)}get Path(){return this.path}set Path(e){this.path=e}get Staves(){return this.staves}get TitleString(){return this.title?this.title.text:""}set TitleString(e){this.Title=new Label(e)}get SubtitleString(){return this.subtitle?this.subtitle.text:""}set SubtitleString(e){this.Subtitle=new Label(e)}get ComposerString(){return this.composer?this.composer.text:""}set ComposerString(e){this.Composer=new Label(e)}get LyricistString(){return this.lyricist?this.lyricist.text:""}set LyricistString(e){this.Lyricist=new Label(e)}get Title(){return this.title}set Title(e){this.title=e}get Subtitle(){return this.subtitle}set Subtitle(e){this.subtitle=e}get Composer(){return this.composer}set Composer(e){this.composer=e}get Lyricist(){return this.lyricist}set Lyricist(e){this.lyricist=e}get Rules(){return this.rules||(loglevelExports.debug("warning: sheet.Rules was undefined. Creating new EngravingRules."),this.rules=new EngravingRules),this.rules}set Rules(e){this.rules=e}get SheetErrors(){return this.musicSheetErrors}get PlaybackDataDict(){return this.playbackDataDict}get SelectionStart(){return this.selectionStart}set SelectionStart(e){this.selectionStart=e.clone(),this.currentEnrolledPosition=e.clone()}get SelectionEnd(){return this.selectionEnd}set SelectionEnd(e){this.selectionEnd=e}set HasBPMInfo(e){this.hasBPMInfo=e}get HasBPMInfo(){return this.hasBPMInfo}addMeasure(e){this.sourceMeasures.push(e),e.measureListIndex=this.sourceMeasures.length-1}checkForInstrumentWithNoVoice(){for(let e=0,t=this.instruments.length;e0){const e=this.TimestampSortedTempoExpressionsList[0];if(e.InstantaneousTempo)return e.InstantaneousTempo.TempoInBpm;if(e.ContinuousTempo)return e.ContinuousTempo.StartTempo}return this.userStartTempoInBPM}get Errors(){return this.musicSheetErrors.measureErrors}get FirstMeasureNumber(){try{return this.getFirstSourceMeasure().MeasureNumber}catch(e){return loglevelExports.info("MusicSheet.FirstMeasureNumber: ",e),0}}get LastMeasureNumber(){try{return this.getLastSourceMeasure().MeasureNumber}catch(e){return loglevelExports.info("MusicSheet.LastMeasureNumber: ",e),0}}get CurrentEnrolledPosition(){return this.currentEnrolledPosition.clone()}set CurrentEnrolledPosition(e){this.currentEnrolledPosition=e.clone()}get Transpose(){return this.transpose}set Transpose(e){this.transpose=e}get FullNameString(){return this.ComposerString+" "+this.TitleString}get IdString(){return this.idString}set IdString(e){this.idString=e}getEnrolledSelectionStartTimeStampWorkaround(){const e=this.MusicPartManager.getIterator(this.SelectionStart);return Fraction$1.createFromFraction(e.CurrentEnrolledTimestamp)}get SheetEndTimestamp(){const e=this.getLastSourceMeasure();return Fraction$1.plus(e.AbsoluteTimestamp,e.Duration)}getSourceMeasureFromTimeStamp(e){for(let t=0,n=this.sourceMeasures.length;t0&&n.Voices[0].Visible&&e.push(n)}return e}}MusicSheet.defaultTitle="[no title given]";class LyricWord{constructor(){this.syllables=[]}get Syllables(){return this.syllables}containsVoiceEntry(e){for(let t=0,n=this.Syllables.length;t=0&&(this.syllableIndex=r)}get Text(){return this.text}set Text(e){this.text=e}get Word(){return this.word}get Parent(){return this.parent}set Parent(e){this.parent=e}get VerseNumber(){return this.verseNumber}get SyllableIndex(){return this.syllableIndex}}class LyricsReader{constructor(e){this.openLyricWords={},this.musicSheet=e}addLyricEntry(e,t){if(e){const r=e;for(let e=0,o=r.length;e0)for(let e=s;e1&&(c=parseInt(e[1],10))}catch(err){const t=ITextTranslation.translateText("ReaderErrorMessages/LyricVerseNumberError","Invalid lyric verse number");this.musicSheet.SheetErrors.pushMeasureError(t);continue}}if("single"===e||"end"===e){if(this.openLyricWords[c]){this.currentLyricWord=this.openLyricWords[c];const e=this.currentLyricWord.Syllables.length;l=new LyricsEntry(s,c,this.currentLyricWord,t,e),this.currentLyricWord.Syllables.push(l),delete this.openLyricWords[c],this.currentLyricWord=void 0}else l=new LyricsEntry(s,c,void 0,t);l.extend=void 0!==o.element("extend")}else if("begin"===e)this.openLyricWords[c]&&(delete this.openLyricWords[c],this.currentLyricWord=void 0),this.currentLyricWord=new LyricWord,this.openLyricWords[c]=this.currentLyricWord,l=new LyricsEntry(s,c,this.currentLyricWord,t,0),this.currentLyricWord.Syllables.push(l);else if("middle"===e)if(this.openLyricWords[c]){this.currentLyricWord=this.openLyricWords[c];const e=this.currentLyricWord.Syllables.length;l=new LyricsEntry(s,c,this.currentLyricWord,t,e),this.currentLyricWord.Syllables.push(l)}else l=new LyricsEntry(s,c,void 0,t);if(l){var n,i;if(!t.LyricsEntries[c])t.LyricsEntries.setValue(c,l),null!==(n=t.ParentSourceStaffEntry)&&void 0!==n&&null!==(i=n.VerticalContainerParent)&&void 0!==i&&i.ParentMeasure&&(t.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.hasLyrics=!0);t.ParentVoice.Parent.LyricVersesNumbers[c]||t.ParentVoice.Parent.LyricVersesNumbers.push(c)}}}}catch(err){const t=ITextTranslation.translateText("ReaderErrorMessages/LyricError","Error while reading lyric entry.");this.musicSheet.SheetErrors.pushMeasureError(t);continue}}t.ParentVoice.Parent.LyricVersesNumbers=t.ParentVoice.Parent.LyricVersesNumbers.filter(((e,t,n)=>n.indexOf(e)===t))}}}class Articulation{constructor(e,t){this.articulationEnum=e,this.placement=t}Equals(e){return e.articulationEnum===this.articulationEnum&&e.placement===this.placement}}class ArticulationReader{constructor(e){this.rules=e}getAccEnumFromString(e){switch(e){case"sharp":return AccidentalEnum.SHARP;case"flat":return AccidentalEnum.FLAT;case"natural":return AccidentalEnum.NATURAL;case"double-sharp":case"sharp-sharp":return AccidentalEnum.DOUBLESHARP;case"double-flat":case"flat-flat":return AccidentalEnum.DOUBLEFLAT;case"triple-sharp":return AccidentalEnum.TRIPLESHARP;case"triple-flat":return AccidentalEnum.TRIPLEFLAT;case"quarter-sharp":return AccidentalEnum.QUARTERTONESHARP;case"quarter-flat":return AccidentalEnum.QUARTERTONEFLAT;case"three-quarters-sharp":return AccidentalEnum.THREEQUARTERSSHARP;case"three-quarters-flat":return AccidentalEnum.THREEQUARTERSFLAT;case"slash-quarter-sharp":return AccidentalEnum.SLASHQUARTERSHARP;case"slash-sharp":return AccidentalEnum.SLASHSHARP;case"double-slash-flat":return AccidentalEnum.DOUBLESLASHFLAT;case"sori":return AccidentalEnum.SORI;case"koron":return AccidentalEnum.KORON;default:return AccidentalEnum.NONE}}addArticulationExpression(e,t){if(void 0!==e&&e.elements().length>0){const o=e.elements();for(let e=0,s=o.length;e0&&t.Articulations[0].articulationEnum!==ArticulationEnum.staccato&&t.Articulations.splice(0,0,l),"strongaccent"===a){var i;const e=null==s||null===(i=s.attribute("type"))||void 0===i?void 0:i.value;"up"===e?l.articulationEnum=ArticulationEnum.marcatoup:"down"===e&&(l.articulationEnum=ArticulationEnum.marcatodown)}if("detachedlegato"===a){const e=new Articulation(ArticulationEnum.staccato,r),n=new Articulation(ArticulationEnum.tenuto,r);t.Articulations.push(e,n)}if(!t.hasArticulation(l))switch(t.Articulations.push(l),l.articulationEnum){case ArticulationEnum.staccato:case ArticulationEnum.staccatissimo:t.DurationModifier=l;break;case ArticulationEnum.accent:case ArticulationEnum.strongaccent:t.VolumeModifier=l}}}catch(r){const e="Invalid note articulation.";return void loglevelExports.debug("addArticulationExpression",e,r)}}}}addFermata(e,t){var n;let i=ArticulationEnum.fermata;e.attributes().length>0&&e.attribute("type")&&"inverted"===e.attribute("type").value&&(i=ArticulationEnum.invertedfermata);let r=PlacementEnum.Above;"below"===(null===(n=e.attribute("placement"))||void 0===n?void 0:n.value)&&(r=PlacementEnum.Below),t.Articulations.push(new Articulation(i,r))}addTechnicalArticulations(e,t,n){const i={bend:ArticulationEnum.bend,"down-bow":ArticulationEnum.downbow,"open-string":ArticulationEnum.naturalharmonic,"snap-pizzicato":ArticulationEnum.snappizzicato,stopped:ArticulationEnum.lefthandpizzicato,"up-bow":ArticulationEnum.upbow};for(const l in i){if(!i.hasOwnProperty(l))continue;const n=i[l],s=e.element(l);if(s){var r,o;let e;"above"===(null===(r=s.attribute("placement"))||void 0===r?void 0:r.value)&&(e=PlacementEnum.Above),"below"===(null===(o=s.attribute("placement"))||void 0===o?void 0:o.value)&&(e=PlacementEnum.Below);const i=new Articulation(n,e);t.hasArticulation(i)||t.Articulations.push(i)}}const s=e.element("fingering");if(s){const e=this.createTechnicalInstruction(s,n);e.type=TechnicalInstructionType.Fingering,n.Fingering=e,t.TechnicalInstructions.push(e)}const a=e.element("string");if(a){const e=this.createTechnicalInstruction(a,n);e.type=TechnicalInstructionType.String,n.StringInstruction=e,t.TechnicalInstructions.push(e)}}createTechnicalInstruction(e,t){const n=new TechnicalInstruction;n.sourceNote=t,n.value=e.value;const i=e.attribute("placement");return this.rules.FingeringPositionFromXML&&(n.placement=this.getPlacement(i)),n}getPlacement(e,t=PlacementEnum.NotYetDefined){if(t!==PlacementEnum.NotYetDefined)return t;if(!e)return PlacementEnum.NotYetDefined;switch(e.value){case"above":return PlacementEnum.Above;case"below":return PlacementEnum.Below;case"left":return PlacementEnum.Left;case"right":return PlacementEnum.Right;default:return PlacementEnum.NotYetDefined}}addOrnament(e,t){if(e){let n;const i={"delayed-inverted-turn":OrnamentEnum.DelayedInvertedTurn,"delayed-turn":OrnamentEnum.DelayedTurn,"inverted-mordent":OrnamentEnum.InvertedMordent,"inverted-turn":OrnamentEnum.InvertedTurn,mordent:OrnamentEnum.Mordent,"trill-mark":OrnamentEnum.Trill,turn:OrnamentEnum.Turn};for(const t in i){if(!i.hasOwnProperty(t))continue;const r=e.element(t);if(r){n=new OrnamentContainer(i[t]);const e=r.attribute("placement");if(e){"below"===e.value&&(n.placement=PlacementEnum.Below)}}}if(n){const i=e.elements("accidental-mark");if(i){let e=PlacementEnum.Below,t=AccidentalEnum.NONE;const r=i;for(let i=0,o=r.length;i0&&(this.currentVoiceEntry.GraceVoiceEntriesBefore=this.graceVoiceEntriesTempList,this.graceVoiceEntriesTempList=[]))}finalizeReadingMeasure(){this.graceVoiceEntriesTempList.length>0&&void 0!==this.currentNormalVoiceEntry&&this.currentNormalVoiceEntry.GraceVoiceEntriesAfter.concat(this.graceVoiceEntriesTempList),this.graceVoiceEntriesTempList=[],this.pluginManager.processVoiceMeasureReadPlugins(this.currMeasureVoiceEntries,this.activeKey,this.activeRhythm),this.currMeasureVoiceEntries.length=0,this.openBeams.length>1&&this.handleOpenBeam()}read(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g,v,b,A,y,S,x){this.currentStaffEntry=s,this.currentMeasure=a;try{this.currentNote=o?this.addRestNote(e.element("rest"),t,i,r,d,p,b):this.addSingleNote(e,t,i,n,r,u,h,d,p,f,m,g,v,b,y,S,x),this.currentNote.DotsXml=A;const s=e.elements("lyric");void 0!==this.lyricsReader&&s&&(this.lyricsReader.addLyricEntry(s,this.currentVoiceEntry),this.voice.Parent.HasLyrics=!0);let a=!1;const w=e.element("notations");if(w){this.articulationReader&&this.readArticulations(w,this.currentVoiceEntry,this.currentNote);const t=w.elements("slur");void 0!==this.slurReader&&t.length>0&&!this.currentNote.ParentVoiceEntry.IsGrace&&this.slurReader.addSlur(t,this.currentNote);const n=w.elements("tuplet");n.length>0&&(this.openTupletNumber=this.addTuplet(e,n),a=!0);const i=w.element("arpeggiate");if(void 0!==i){let e;if(this.currentVoiceEntry.Arpeggio)e=this.currentVoiceEntry.Arpeggio;else{let t=!1;for(const n of this.currentStaffEntry.VoiceEntries)if(n.Arpeggio){t=!0,e=n.Arpeggio;break}if(!t){let t=ArpeggioType.ARPEGGIO_DIRECTIONLESS;const n=i.attribute("direction");if(n)switch(n.value){case"up":t=ArpeggioType.ROLL_UP;break;case"down":t=ArpeggioType.ROLL_DOWN;break;default:t=ArpeggioType.ARPEGGIO_DIRECTIONLESS}e=new Arpeggio(this.currentVoiceEntry,t),this.currentVoiceEntry.Arpeggio=e}}e.addNote(this.currentNote)}const r=w.elements("tied");r.length>0&&this.addTie(r,l,c,TieTypes.SIMPLE);const o=w.elements("slide");o.length>0&&this.addTie(o,l,c,TieTypes.SLIDE);const s=w.element("technical");if(s){const e=s.elements("hammer-on");e.length>0&&this.addTie(e,l,c,TieTypes.HAMMERON);const t=s.elements("pull-off");t.length>0&&this.addTie(t,l,c,TieTypes.PULLOFF)}}void 0===e.element("time-modification")||a||this.handleTimeModificationNode(e)}catch(err){loglevelExports.warn(err);const t=ITextTranslation.translateText("ReaderErrorMessages/NoteError","Ignored erroneous Note.");this.musicSheet.SheetErrors.pushMeasureError(t),this.musicSheet.SheetErrors.pushMeasureError(err)}return this.currentNote}checkForStaffEntryLink(e,t,n,i){const r=new StaffEntryLink(this.currentVoiceEntry);r.LinkStaffEntries.push(n),n.Link=r;const o=this.currentVoiceEntry.Timestamp.clone(),s=i.getVerticalContainerByTimestamp(o);return(n=s.StaffEntries[e])||(n=new SourceStaffEntry(s,t),s.StaffEntries[e]=n),n.VoiceEntries.push(this.currentVoiceEntry),r.LinkStaffEntries.push(n),n.Link=r,n}checkForOpenBeam(){this.openBeams.length>0&&this.currentNote&&this.handleOpenBeam()}checkOpenTies(){const e=this.openTieDict;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];Fraction$1.plus(n.StartNote.ParentStaffEntry.Timestamp,n.Duration).lt(n.StartNote.SourceMeasure.Duration)&&delete e[t]}}hasVoiceEntry(){return void 0!==this.currentVoiceEntry}readArticulations(e,t,n){const i=e.element("articulations");i&&this.articulationReader.addArticulationExpression(i,t);const r=e.element("fermata");r&&this.articulationReader.addFermata(r,t);const o=e.element("technical");o&&this.articulationReader.addTechnicalArticulations(o,t,n);const s=e.element("ornaments");s&&this.articulationReader.addOrnament(s,t)}addSingleNote(e,t,n,i,r,o,s,a,l,c,u,h,d,p,f,m,g){let v,b,A,y,S=0,x=AccidentalEnum.NONE,w=NoteEnum.C,E=NoteEnum.C,_=0,M=0;const P=e.elements();for(let D=0,F=P.length;D0&&this.openBeams.last().ExtendedNoteList.push(p),p}addNoteInfo(e,t,n,i,r,o,s,a,l){e.NoteTypeXml=t,e.PrintObject=n,e.IsCueNote=i,e.NormalNotes=r,e.displayStepUnpitched=o,e.displayOctaveUnpitched=s,e.NoteheadColorXml=a,e.NoteheadColor=a}createBeam(t,n){try{const e=t.element("beam");let r;if(void 0!==e&&e.hasAttributes&&(r=e.attribute("number")),r){let e=parseInt(r.value,10);const o=t.elements("beam"),s=o[0].value;var i;if(o)if("begin"===s)e===(null===(i=this.openBeams.last())||void 0===i?void 0:i.BeamNumber)?(this.beamNumberOffset++,e+=this.beamNumberOffset):this.openBeams.last()&&this.handleOpenBeam(),this.openBeams.push(new Beam(e,this.beamNumberOffset));else e+=this.beamNumberOffset;let a=!1;if(!(e>0&&e<=this.openBeams.length&&this.openBeams[e-1]))return void loglevelExports.debug("[OSMD] invalid beamnumber");for(let t=0,n=this.openBeams[e-1].Notes.length;t1){let i=e.element("time-modification");i&&(i=i.element("actual-notes"));const r=t;for(let t=0,o=r.length;t1&&this.openTupletNumber--),this.tupletDict[t]=s;const l=[];l.push(this.currentNote),s.Notes.push(l),s.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=s,this.openTupletNumber=t}else if("stop"===r.value){let t=1;o.attribute("number")&&(t=parseInt(o.attribute("number").value,10));const n=this.tupletDict[t];if(n){const i=o.attribute("placement");i&&("below"===i.value?n.tupletLabelNumberPlacement=PlacementEnum.Below:n.tupletLabelNumberPlacement=PlacementEnum.Above,n.PlacementFromXml=!0);const r=[];if(r.push(this.currentNote),n.Notes.push(r),!n.PlacementFromXml){let e=!1;for(const t of n.Notes){for(const i of t)if(!i.isRest()){i.StemDirectionXml===StemDirectionType.Down?n.tupletLabelNumberPlacement=PlacementEnum.Below:n.tupletLabelNumberPlacement=PlacementEnum.Above,e=!0;break}if(e)break}}n.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=n,delete this.tupletDict[t],0===Object.keys(this.tupletDict).length?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--}}}}}else if(t[0]){const i=t[0];if(i.hasAttributes){const t=i.attribute("type").value;let r=1;i.attribute("number")&&(r=parseInt(i.attribute("number").value,10));const o=isNaN(r),s=i.attribute("bracket");if(s&&"yes"===s.value&&(n=!0),"start"===t){let t=0,s=e.element("time-modification");if(s&&(s=s.element("actual-notes")),s&&(t=parseInt(s.value,10),isNaN(t))){const e=ITextTranslation.translateText("ReaderErrorMessages/TupletNoteDurationError","Invalid tuplet note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(e),new MusicSheetReadingException(e)}o&&(this.openTupletNumber++,r=this.openTupletNumber);let a=this.tupletDict[r];a||(a=this.tupletDict[r]=new Tuplet(t,n),a.tupletLabelNumberPlacement=PlacementEnum.Above);const l=i.attribute("placement");l&&("below"===l.value?a.tupletLabelNumberPlacement=PlacementEnum.Below:a.tupletLabelNumberPlacement=PlacementEnum.Above,a.PlacementFromXml=!0);const c=[];c.push(this.currentNote),a.Notes.push(c),a.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=a,this.openTupletNumber=r}else if("stop"===t){o&&(r=this.openTupletNumber);const t=this.tupletDict[this.openTupletNumber];if(t){const n=i.attribute("placement");n&&("below"===n.value?t.tupletLabelNumberPlacement=PlacementEnum.Below:t.tupletLabelNumberPlacement=PlacementEnum.Above,t.PlacementFromXml=!0);const o=[];if(o.push(this.currentNote),t.Notes.push(o),!t.PlacementFromXml){let e=!1;for(const n of t.Notes){for(const i of n)if(!i.isRest()){i.StemDirectionXml===StemDirectionType.Down?t.tupletLabelNumberPlacement=PlacementEnum.Below:t.tupletLabelNumberPlacement=PlacementEnum.Above,e=!0;break}if(e)break}}t.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=t,0===Object.keys(this.tupletDict).length?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--,delete this.tupletDict[r]}}}}return this.openTupletNumber}handleTimeModificationNode(e){if(this.tupletDict[this.openTupletNumber])try{const t=this.tupletDict[this.openTupletNumber],n=CollectionUtil.last(t.Notes);let i;n[0].ParentVoiceEntry.Timestamp.Equals(this.currentVoiceEntry.Timestamp)?i=n:(i=[],t.Notes.push(i),t.Fractions.push(this.getTupletNoteDurationFromType(e))),i.push(this.currentNote),this.currentNote.NoteTuplet=t}catch(t){const e=ITextTranslation.translateText("ReaderErrorMessages/TupletNumberError","Invalid tuplet number.");throw this.musicSheet.SheetErrors.pushMeasureError(e),t}else if(this.currentVoiceEntry.Notes.length>0){const e=this.currentVoiceEntry.Notes[0];if(e.NoteTuplet){const t=e.NoteTuplet;CollectionUtil.last(t.Notes).push(this.currentNote),this.currentNote.NoteTuplet=t}}}addTie(e,t,n,i){if(e)if(1===e.length){const t=e[0];if(void 0!==t&&t.attributes()){const e=this.getTieDirection(t),n=t.attribute("type").value;try{if("start"===n){const t=this.findCurrentNoteInTieDict(this.currentNote);t<0&&delete this.openTieDict[t];const n=this.getNextAvailableNumberForTie(),r=new Tie(this.currentNote,i);this.openTieDict[n]=r,r.TieNumber=n,r.TieDirection=e}else if("stop"===n){const e=this.findCurrentNoteInTieDict(this.currentNote),t=this.openTieDict[e];t&&(t.AddNote(this.currentNote),delete this.openTieDict[e])}}catch(err){const t=ITextTranslation.translateText("ReaderErrorMessages/TieError","Error while reading tie.");this.musicSheet.SheetErrors.pushMeasureError(t)}}}else if(2===e.length){const t=this.findCurrentNoteInTieDict(this.currentNote);if(t>=0){const n=this.openTieDict[t];n.AddNote(this.currentNote);for(const t of e){if("start"===t.attribute("type").value){const e=this.getTieDirection(t);n.NoteIndexToTieDirection[n.Notes.length-1]=e}}}}}getTieDirection(e){let t=PlacementEnum.NotYetDefined;const n=e.attribute("placement");n&&("above"===n.value?t=PlacementEnum.Above:"below"===n.value&&(t=PlacementEnum.Below));const i=e.attribute("orientation");return i&&("over"===i.value?t=PlacementEnum.Above:"under"===i.value&&(t=PlacementEnum.Below)),t}getNextAvailableNumberForTie(){const e=Object.keys(this.openTieDict);if(0===e.length)return 1;e.sort(((e,t)=>+e-+t));for(let t=0;t0?i.RealValue>0?(l=Fraction$1.multiply(Fraction$1.minus(i,r),l),this.directionTimestamp=Fraction$1.plus(l,i)):this.directionTimestamp=Fraction$1.createFromFraction(l):this.offsetDivisions<0&&(i.RealValue>0?(l=Fraction$1.multiply(Fraction$1.minus(i,r),l),this.directionTimestamp=Fraction$1.minus(i,l)):this.directionTimestamp=Fraction$1.createFromFraction(l));const c=e.attribute("placement");if(c)try{const e=c.value;"below"===e?this.placement=PlacementEnum.Below:"above"===e&&(this.placement=PlacementEnum.Above)}catch(u){const e=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",e,u),this.musicSheet.SheetErrors.pushMeasureError(e),this.placement=PlacementEnum.Below}if(this.placement===PlacementEnum.NotYetDefined)try{const t=e.element("direction-type");if(t){const e=t.element("dynamics");if(e){const t=e.attribute("default-y");t&&this.readExpressionPlacement(t,"read dynamics y pos")}const n=t.element("wedge");if(n){const e=n.attribute("default-y");e&&this.readExpressionPlacement(e,"read wedge y pos")}const i=t.element("words");if(i){const e=i.attribute("default-y");e&&this.readExpressionPlacement(e,"read words y pos")}const r=t.element("rehearsal");if(r){const e=r.attribute("default-y");e&&this.readExpressionPlacement(e,"read rehearsal pos")}}}catch(u){const e=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",e,u),this.musicSheet.SheetErrors.pushMeasureError(e),this.placement=PlacementEnum.Below}this.placement===PlacementEnum.NotYetDefined&&(t.Staves.length>1?this.placement=PlacementEnum.Below:t.HasLyrics?this.placement=PlacementEnum.Above:this.placement=PlacementEnum.Below)}read(e,t,n,i=undefined,r=0){let o=!1,s=!1;const a=e.element("sound");if(a){const e=a.attribute("tempo"),n=a.attribute("dynamics");if(e){const n=e.value.match(/^(\d+)(\.\d+)?$/);(null==n?void 0:n.length)>0?this.soundTempo=Math.round(Number.parseFloat(e.value)):(loglevelExports.info("invalid xml tempo: "+e.value),this.soundTempo=100),t.TempoInBPM=this.soundTempo,0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,o=!0}if(n){const e=n.value.match(/\d+/);this.soundDynamic=void 0!==e?parseInt(e[0],10):100,s=!0}}const l=e.element("direction-type");if(!l)return;let c=l.element("metronome");if(c){t.metronomeNoteIndex=r;const e=c.element("beat-unit"),i=void 0!==c.element("beat-unit-dot"),o=c.element("per-minute");if(void 0!==e&&o){c.hasAttributes&&void 0!==c.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(n));const r=parseFloat(o.value);this.createNewTempoExpressionIfNeeded(t);const s=new InstantaneousTempoExpression(void 0,this.placement,this.staffNumber,r,this.currentMultiTempoExpression,!0);s.parentMeasure=t,this.soundTempo=r,t.TempoInBPM=this.soundTempo*(i?1.5:1),0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),1===t.MeasureNumberXML&&0===this.musicSheet.SourceMeasures.length&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,s.dotted=i,s.beatUnit=e.value,this.currentMultiTempoExpression.addExpression(s,""),this.currentMultiTempoExpression.CombinedExpressionsText="test"}}else if(c=l.element("dynamics"),c){const i=void 0!==e.element("notations");this.interpretInstantaneousDynamics(c,t,n,i)}else if(c=l.element("words"),c){const e=l.elements("words");let i="";for(const t of e)i+=t.value;if(c.value=i,o||isSpeedKeyword(c.value)||isSpeedHiddenKeyword(c.value)){this.createNewTempoExpressionIfNeeded(t),this.currentMultiTempoExpression.CombinedExpressionsText=c.value,(isSpeedKeyword(c.value)||isSpeedHiddenKeyword(c.value))&&(c.value=void 0);const e=new InstantaneousTempoExpression(c.value,this.placement,this.staffNumber,this.soundTempo,this.currentMultiTempoExpression);this.currentMultiTempoExpression.addExpression(e,"")}else s||this.interpretWords(c,t,n)}else c=l.element("wedge"),c?this.interpretWedge(c,t,i,t.MeasureNumber):(c=l.element("rehearsal"),c&&this.interpretRehearsalMark(c,t,n,t.MeasureNumber))}closeOpenExpressions(e,t){for(const n of this.openContinuousDynamicExpressions)this.createNewMultiExpressionIfNeeded(e,n.NumberXml,t),this.closeOpenContinuousDynamic(n,e,t);this.openContinuousTempoExpression&&this.closeOpenContinuousTempo(Fraction$1.plus(e.AbsoluteTimestamp,t))}addOctaveShift(e,t,n){let i=1;const r=e.element("staff");if(r)try{i=parseInt(r.value,10)}catch(a){const e=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftStaffError","Invalid octave shift staff number -> set to default");this.musicSheet.SheetErrors.pushMeasureError(e),i=1,loglevelExports.debug("ExpressionReader.addOctaveShift",e,a)}const o=e.element("direction-type");if(o){const r=o.element("octave-shift"),l=this.readPlacement(e);if(void 0!==r&&r.hasAttributes)try{const e=this.readNumber(r);if(r.attribute("size")){var s;const o=parseInt(r.attribute("size").value,10);let a=0;8===o?a=1:15===o&&(a=2);let c=null===(s=r.attribute("type"))||void 0===s?void 0:s.value;if(c||(l===PlacementEnum.Above?c="down":l===PlacementEnum.Below&&(c="up")),"up"===c||"down"===c){const n=new OctaveShift(c,a);n.StaffNumber=i,this.getMultiExpression=this.createNewMultiExpressionIfNeeded(t,e),this.getMultiExpression.OctaveShiftStart=n,n.ParentStartMultiExpression=this.getMultiExpression,this.openOctaveShift=n}else if("stop"===c){if(this.openOctaveShift){this.getMultiExpression=this.createNewMultiExpressionIfNeeded(t,this.openOctaveShift.numberXml,n);this.getMultiExpression.OctaveShiftEnd=this.openOctaveShift,this.openOctaveShift.ParentEndMultiExpression=this.getMultiExpression,this.openOctaveShift=void 0}}else c||loglevelExports.debug("octave-shift missing type in xml")}}catch(a){const e=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftError","Error while reading octave shift.");this.musicSheet.SheetErrors.pushMeasureError(e),loglevelExports.debug("ExpressionReader.addOctaveShift",e,a)}}}addPedalMarking(e,t,n){const i=e.element("direction-type");if(i){const e=i.element("pedal");if(void 0!==e&&e.hasAttributes){let n=!1,i=!1;try{var r,o,s,a;switch("yes"===(null===(r=e.attribute("line"))||void 0===r?void 0:r.value)?i=!0:"no"===(null===(o=e.attribute("line"))||void 0===o?void 0:o.value)&&(i=!1,n=!0),"yes"===(null===(s=e.attribute("sign"))||void 0===s?void 0:s.value)?n=!0:"no"===(null===(a=e.attribute("sign"))||void 0===a?void 0:a.value)&&(n=!1,i=!0),e.attribute("type").value){case"start":this.openPedal&&this.openPedal.IsLine&&this.endOpenPedal(t),this.createNewMultiExpressionIfNeeded(t,-1),this.openPedal=new Pedal(i,n),this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openPedal&&this.endOpenPedal(t);break;case"change":this.openPedal&&this.openPedal.IsLine&&(this.openPedal.ChangeEnd=!0,this.createNewMultiExpressionIfNeeded(t,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.createNewMultiExpressionIfNeeded(t,-1),this.openPedal=new Pedal(i,n),this.openPedal.ChangeBegin=!0,this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression)}}catch(l){const e=ITextTranslation.translateText("ReaderErrorMessages/PedalError","Error while reading pedal.");this.musicSheet.SheetErrors.pushMeasureError(e),loglevelExports.debug("ExpressionReader.addPedalMarking",e,l)}}}}endOpenPedal(e){this.createNewMultiExpressionIfNeeded(e,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.openPedal=void 0}addWavyLine(e,t,n,i){if(e&&e.hasAttributes)try{switch(e.attribute("type").value){case"start":this.createNewMultiExpressionIfNeeded(t,-1),this.openWavyLine=new WavyLine(this.placement),this.getMultiExpression.WavyLineStart=this.openWavyLine,this.openWavyLine.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openWavyLine&&(this.createNewMultiExpressionIfNeeded(t,-1,n),this.getMultiExpression.WavyLineEnd=this.openWavyLine,this.openWavyLine.ParentEndMultiExpression=this.getMultiExpression,this.openWavyLine=void 0)}}catch(r){const e=ITextTranslation.translateText("ReaderErrorMessages/WavyLineError","Error while reading wavy-line.");this.musicSheet.SheetErrors.pushMeasureError(e),loglevelExports.debug("ExpressionReader.addWavyLine",e,r)}}initialize(){this.placement=PlacementEnum.NotYetDefined,this.soundTempo=0,this.soundDynamic=0,this.offsetDivisions=0}readPlacement(e){var t;const n=null===(t=e.attribute("placement"))||void 0===t?void 0:t.value;return"above"===n?PlacementEnum.Above:"below"===n?PlacementEnum.Below:PlacementEnum.NotYetDefined}readExpressionPlacement(e,t){try{const t=parseInt(e.value,10);t<0?this.placement=PlacementEnum.Below:t>0&&(this.placement=PlacementEnum.Above)}catch(n){loglevelExports.debug("ExpressionReader.readExpressionParameters",t,n)}}interpretInstantaneousDynamics(e,t,n,i){if(e.hasElements){e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(n));const r=this.readNumber(e);let o=e.elements()[0].name;if("other-dynamics"===o&&(o=e.elements()[0].value),o){i?this.createNewMultiExpressionIfNeeded(t,r,Fraction$1.createFromFraction(n)):this.createNewMultiExpressionIfNeeded(t,r);const e=new InstantaneousDynamicExpression(o,this.soundDynamic,this.placement,this.staffNumber,t);e.InMeasureTimestamp=n.clone(),this.getMultiExpression.addExpression(e,""),this.initialize(),this.activeInstantaneousDynamic?this.activeInstantaneousDynamic.DynEnum=e.DynEnum:this.activeInstantaneousDynamic=new InstantaneousDynamicExpression(o,0,PlacementEnum.NotYetDefined,1,t)}}}interpretWords(e,t,n){const i=e.value;let r;const o=e.attribute("font-style");if(o){"italic"===o.value&&(r=FontStyles.Italic)}if(i.length>0){if(e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(n)),this.checkIfWordsNodeIsRepetitionInstruction(i))return;this.fillMultiOrTempoExpression(i,t,n,r),this.initialize()}}readNumber(e){var t;let n=1;const i=null===(t=e.attribute("number"))||void 0===t?void 0:t.value;return i&&(n=Number.parseInt(i,10)),n}interpretWedge(e,t,n,i){var r,o;void 0!==e&&e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(n));const s=this.readNumber(e);"stop"===(null===(r=e.attribute("type"))||void 0===r||null===(o=r.value)||void 0===o?void 0:o.toLowerCase())?this.createNewMultiExpressionIfNeeded(t,s,n):this.createNewMultiExpressionIfNeeded(t,s),this.addWedge(e,t,n),this.initialize()}interpretRehearsalMark(e,t,n,i){t.rehearsalExpression=new RehearsalExpression(e.value,this.placement)}createNewMultiExpressionIfNeeded(e,t,n=undefined){n||(n=this.directionTimestamp);let i=this.getMultiExpression;return(!i||i&&(i.SourceMeasureParent!==e||i.numberXml!==t||i.SourceMeasureParent===e&&i.Timestamp!==n))&&(this.getMultiExpression=i=new MultiExpression(e,Fraction$1.createFromFraction(n)),e.StaffLinkedExpressions[this.globalStaffIndex].push(i)),i}createNewTempoExpressionIfNeeded(e){this.currentMultiTempoExpression&&this.currentMultiTempoExpression.SourceMeasureParent===e&&this.currentMultiTempoExpression.Timestamp===this.directionTimestamp||(this.currentMultiTempoExpression=new MultiTempoExpression(e,Fraction$1.createFromFraction(this.directionTimestamp)),e.TempoExpressions.push(this.currentMultiTempoExpression))}addWedge(e,t,n){if(void 0!==e&&e.hasAttributes){const r=this.readNumber(e),o=e.attribute("type").value.toLowerCase();try{if("crescendo"===o||"diminuendo"===o){const e=new ContinuousDynamicExpression(ContDynamicEnum[o],this.placement,this.staffNumber,t,this.activeInstantaneousDynamic,r);this.openContinuousDynamicExpressions.push(e);let n=this.getMultiExpression;n||(n=this.createNewMultiExpressionIfNeeded(t,r)),n.StartingContinuousDynamic=e,e.StartMultiExpression=n,void 0!==this.activeInstantaneousDynamic&&this.activeInstantaneousDynamic.StaffNumber===e.StaffNumber&&(this.activeInstantaneousDynamic=void 0)}else if("stop"===o)for(const e of this.openContinuousDynamicExpressions)e.NumberXml===r&&e.NumberXml===r&&this.closeOpenContinuousDynamic(e,t,n)}catch(i){const e="ReaderErrorMessages/WedgeError, Error while reading Crescendo / Diminuendo.";this.musicSheet.SheetErrors.pushMeasureError(e),loglevelExports.debug("ExpressionReader.addWedge",e,i)}}}fillMultiOrTempoExpression(e,t,n,i){if(!e)return;const r=e.trim();this.createExpressionFromString("",r,t,n,e,i)}createExpressionFromString(e,t,n,i,r,o){if(InstantaneousTempoExpression.isInputStringInstantaneousTempo(t)||ContinuousTempoExpression.isInputStringContinuousTempo(t)){if(n.TempoExpressions.length>0)for(let e=0,i=n.TempoExpressions.length;e0)for(let c=0,u=n.TempoExpressions.length;c0&&!this.hasDigit(t)&&this.globalStaffIndex>0){if(e.EntriesList[0].label.indexOf(t)>=0)return!1;break}}let a=TextAlignmentEnum.CenterBottom;this.musicSheet.Rules.CompactMode&&(a=TextAlignmentEnum.LeftBottom);const l=new UnknownExpression(t,this.placement,a,this.staffNumber);return l.fontStyle=o,s.addExpression(l,e),!1}closeOpenContinuousDynamic(e,t,n){if(!e)return;const i=e.NumberXml;e.EndMultiExpression=this.createNewMultiExpressionIfNeeded(t,i,n),e.StartMultiExpression.EndingContinuousDynamic=e,this.openContinuousDynamicExpressions=this.openContinuousDynamicExpressions.filter((t=>t!==e))}closeOpenContinuousTempo(e){this.openContinuousTempoExpression.AbsoluteEndTimestamp=e,this.openContinuousTempoExpression=void 0}checkIfWordsNodeIsRepetitionInstruction(e){return"coda"===(e=e.trim().toLowerCase())||"tocoda"===e||"to coda"===e||"fine"===e||"d.c."===e||"dacapo"===e||"da capo"===e||"d.s."===e||"dalsegno"===e||"dal segno"===e||"d.c. al fine"===e||"d.s. al fine"===e||"d.c. al coda"===e||"d.s. al coda"===e}hasDigit(e){return/\d/.test(e)}}class Slur{constructor(){}get StartNote(){return this.startNote}set StartNote(e){this.startNote=e}get EndNote(){return this.endNote}set EndNote(e){this.endNote=e}startNoteHasMoreStartingSlurs(){if(!this.startNote)return!1;for(let e=0,t=this.startNote.NoteSlurs.length;e0){const e=i.attribute("type").value;let r=1;try{i.attribute("number")&&(r=parseInt(i.attribute("number").value,10))}catch(n){loglevelExports.debug("VoiceGenerator.addSlur number: ",n)}let o=PlacementEnum.NotYetDefined;const s=i.attribute("placement");s&&s.value&&("above"===s.value?o=PlacementEnum.Above:"below"===s.value&&(o=PlacementEnum.Below));const a=i.attribute("orientation");if(a&&a.value&&("over"===a.value?o=PlacementEnum.Above:"under"===a.value&&(o=PlacementEnum.Below)),"start"===e){let e=this.openSlurDict[r];e||(e=new Slur,this.openSlurDict[r]=e),e.StartNote=t,e.PlacementXml=o}else if("stop"===e){const e=this.openSlurDict[r];if(e){if(e.EndNote=t,!t.checkForDoubleSlur(e)){t.NoteSlurs.push(e);e.StartNote.NoteSlurs.push(e)}delete this.openSlurDict[r]}}}}catch(err){const t=ITextTranslation.translateText("ReaderErrorMessages/SlurError","Error while reading slur.");this.musicSheet.SheetErrors.pushMeasureError(t)}}}class InstrumentReader{constructor(e,t,n,i){this.voiceGeneratorsDict={},this.staffMainVoiceGeneratorDict={},this.divisions=0,this.currentClefNumber=1,this.currentXmlMeasureIndex=0,this.activeKeyHasBeenInitialized=!1,this.abstractInstructions=[],this.openChordSymbolContainers=[],this.soundTempos=new Map,this.xmlNotes=[],this.repetitionInstructionReader=t,this.xmlMeasureList=n,this.musicSheet=i.GetMusicSheet,this.instrument=i,this.activeClefs=new Array(i.Staves.length),this.activeClefsHaveBeenInitialized=new Array(i.Staves.length);for(let r=0;r=this.xmlMeasureList.length)return!1;this.currentMeasure=t,this.followingMultirestMeasures=Math.max(this.followingMultirestMeasures-1,0),this.inSourceMeasureInstrumentIndex=this.musicSheet.getGlobalStaffIndexOfFirstStaff(this.instrument),this.repetitionInstructionReader&&this.repetitionInstructionReader.prepareReadingMeasure(t,this.currentXmlMeasureIndex);let r=new Fraction$1(0,1),o=new Fraction$1(0,1),s=!1;this.maxTieNoteFraction=new Fraction$1(0,1);let a=!1;const l=[];try{const A=this.xmlMeasureList[this.currentXmlMeasureIndex],y=A.elements();if(t.Rules.UseXMLMeasureNumbers&&!Number.isInteger(t.MeasureNumberXML)){var c;const e=parseInt(null===(c=A.attribute("number"))||void 0===c?void 0:c.value,10);Number.isInteger(e)&&(t.MeasureNumberXML=e)}let S;for(let c=0;c0&&(S=y[c-1]),"print"===A.name){const e=A.attribute("new-system");"yes"===(null==e?void 0:e.value)&&(t.printNewSystemXml=!0);const n=A.attribute("new-page");"yes"===(null==n?void 0:n.value)&&(t.printNewPageXml=!0)}else if("note"===A.name){var u;A.element("grace")||(this.xmlNotes.push(A),l.push(A));let e=!0;"no"===(null===(u=A.attribute("print-object"))||void 0===u?void 0:u.value)&&(e=!1);let t=1;this.instrument.Staves.length>1&&A.element("staff")&&(t=parseInt(A.element("staff").value,10),isNaN(t)&&(loglevelExports.debug("InstrumentReader.readNextXmlMeasure.get staff number"),t=1)),this.currentStaff=this.instrument.Staves[t-1];const s=void 0!==A.element("chord");if(A.element("voice")){const e=parseInt(A.element("voice").value,10);this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(e,t-1)}else s&&this.currentVoiceGenerator||(this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(1,t-1));let c,h=0,d=new Fraction$1(0,1),p=2,f=!1;if(A.element("duration")){if(h=parseInt(A.element("duration").value,10),isNaN(h)){const e=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid Note Duration.");this.musicSheet.SheetErrors.pushMeasureError(e),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",e);continue}if(d=new Fraction$1(h,4*this.divisions),0===h?d=this.getNoteDurationFromTypeNode(A):c=this.getNoteDurationFromTypeNode(A),A.element("time-modification")){d=this.getNoteDurationForTuplet(A);const e=A.element("time-modification");null!=e&&e.element("normal-notes")&&(p=parseInt(e.element("normal-notes").value,10)),f=!0}}const m=void 0!==A.element("rest"),g=A.element("notations"),v=void 0!==A.element("grace")||0===h||s&&a;let b=!1,y=!1;if(v){const e=A.element("duration"),t=A.element("grace");if(t&&t.attributes()&&t.attribute("slash")){"yes"===t.attribute("slash").value&&(b=!0)}e||(d=this.getNoteDurationFromTypeNode(A));const n=A.element("notations");n&&n.element("slur")&&(y=!0)}let S=!1;A.element("cue")&&(S=!0);const x=A.element("type");let w=NoteType.UNDEFINED;if(x){const e=x.attribute("size");"cue"===(null==e?void 0:e.value)&&(S=!0),w=NoteTypeHandler.StringToNoteType(x.value)}let E,_=StemDirectionType.Undefined;const M=A.element("stem");if(M){switch(M.value){case"down":_=StemDirectionType.Down;break;case"up":_=StemDirectionType.Up;break;case"double":_=StemDirectionType.Double;break;case"none":_=StemDirectionType.None;break;default:_=StemDirectionType.Undefined}const e=M.attribute("color");e&&(E=this.parseXmlColor(e.value))}let P,T=0,C="",I="",k="";if(g){const e=g.element("ornaments");if(e){const t=e.element("tremolo");if(t){const e=t.attribute("type");if(C=e.value,e){const n=parseInt(t.value,10);n>0&&(T=n),"start"!==e.value&&"stop"!==e.value||(d=new Fraction$1(parseInt(A.element("duration").value,10),4*this.divisions))}}const n=e.elements("wavy-line");if(void 0!==n)for(const e of n){const t=this.expressionReaders[this.readExpressionStaffNumber(A)-1];t&&(t.readExpressionParameters(e,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),t.addWavyLine(e,this.currentMeasure,r,o))}}const t=g.elements("glissando");t.find((e=>"start"===e.attribute("type").value))&&(I="start");const n=g.elements("slide");n.find((e=>"start"===e.attribute("type").value))&&(k="start")}const B=A.element("notehead");if(B){const e=B.attribute("color");e&&(P=this.parseXmlColor(e.value))}let R;const L=A.attribute("color");L&&(R=this.parseXmlColor(L.value),P||(P=R),E||(E=R));let N=r.clone();s&&(N=o.clone()),this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(N,this.inSourceMeasureInstrumentIndex+t-1,this.currentStaff).staffEntry,(!this.currentVoiceGenerator.hasVoiceEntry()||!s&&!v&&!a||v&&!a||v&&!s||!v&&a)&&this.currentVoiceGenerator.createVoiceEntry(N,this.currentStaffEntry,this.activeKey,this.ActiveRhythm,v,b,y),v||s||(o=r.clone(),r.Add(d)),s&&void 0!==this.currentStaffEntry&&this.currentStaffEntry.ParentStaff!==this.currentStaff&&(this.currentStaffEntry=this.currentVoiceGenerator.checkForStaffEntryLink(this.inSourceMeasureInstrumentIndex+t-1,this.currentStaff,this.currentStaffEntry,this.currentMeasure));const D=void 0!==this.currentStaffEntry&&void 0!==this.currentStaffEntry.Timestamp&&this.currentStaffEntry.Timestamp.Equals(new Fraction$1(0,1))&&!this.currentStaffEntry.hasNotes();this.saveAbstractInstructionList(this.instrument.Staves.length,D),0!==this.openChordSymbolContainers.length&&(this.currentStaffEntry.ChordContainers=this.openChordSymbolContainers,this.openChordSymbolContainers=[]),this.activeRhythm,f||v||(d=new Fraction$1(h,4*this.divisions));const F=A.elements("dot").length;if(this.currentVoiceGenerator.read(A,d,c,w,p,m,this.currentStaffEntry,this.currentMeasure,n,this.maxTieNoteFraction,s,i,e,S,v,_,T,E,P,F,C,I,k),void 0!==g&&g.element("dynamics")){const e=this.expressionReaders[this.readExpressionStaffNumber(A)-1];e&&(e.readExpressionParameters(A,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),e.read(A,this.currentMeasure,o,void 0,l.length))}a=v}else if("attributes"===A.name){const n=A.element("divisions");if(n&&(this.divisions=parseInt(n.value,10),isNaN(this.divisions))){const e=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(loglevelExports.debug("InstrumentReader.readNextXmlMeasure",e),this.divisions=this.readDivisionsFromNotes(),!(this.divisions>0))throw s=!0,new MusicSheetReadingException(e+this.instrument.Name);this.musicSheet.SheetErrors.push(e+this.instrument.Name)}if(!A.element("divisions")&&0===this.divisions&&0===this.currentXmlMeasureIndex){const e=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(this.divisions=this.readDivisionsFromNotes(),!(this.divisions>0))throw s=!0,new MusicSheetReadingException(e+this.instrument.Name);this.musicSheet.SheetErrors.push(e+this.instrument.Name)}this.addAbstractInstruction(A,i,S,r.clone()),r.Equals(new Fraction$1(0,1))&&this.isAttributesNodeAtBeginOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],A)&&this.saveAbstractInstructionList(this.instrument.Staves.length,!0),this.isAttributesNodeAtEndOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],A)&&this.saveClefInstructionAtEndOfMeasure();const o=A.elements("staff-details");for(const e of o){const t=e.element("staff-lines");if(t){let n=1;const i=e.attribute("number");i&&(n=parseInt(i.value,10)),this.instrument.Staves[n-1].StafflineCount=parseInt(t.value,10)}}const a=A.element("measure-style");if(a){const n=a.element("multiple-rest");if(n){const i=n.value;let r=0;try{r=Number.parseInt(i,10),void 0!==t.multipleRestMeasures&&r!==t.multipleRestMeasures?t.multipleRestMeasures=0:(t.multipleRestMeasures=r,this.currentMultirestStartMeasure=t,this.followingMultirestMeasures=r+1)}catch(e){console.log("multirest parse error: "+e)}}}}else if("forward"===A.name){const e=parseInt(A.element("duration").value,10);r.Add(new Fraction$1(e,4*this.divisions))}else if("backup"===A.name){const e=parseInt(A.element("duration").value,10);r.Sub(new Fraction$1(e,4*this.divisions)),r.IsNegative()&&(r=new Fraction$1(0,1)),o.Sub(new Fraction$1(e,4*this.divisions)),o.IsNegative()&&(o=new Fraction$1(0,1))}else if("direction"===A.name){const e=A.elements("direction-type"),t=A.element("direction-type");let n=Math.min(1,r.RealValue);void 0!==this.activeRhythm&&this.activeRhythm.Rhythm&&(n/=this.activeRhythm.Rhythm.RealValue);let i=!1;if(this.repetitionInstructionReader&&(i=this.repetitionInstructionReader.handleRepetitionInstructionsFromWordsOrSymbols(t,n)),!i){let n=this.expressionReaders[0];const i=this.readExpressionStaffNumber(A)-1;if(inull==e?void 0:e.toLocaleLowerCase())).includes(null===(d=i.value)||void 0===d?void 0:d.toLocaleLowerCase()))this.currentGradualChangeMeasure=this.currentMeasure,this.currentMeasure.speedInfo={startWord:null===(g=i.value)||void 0===g?void 0:g.toLocaleLowerCase(),startXmlNoteIndex:l.length,endXmlNoteIndex:0,resetXmlNoteIndex:0,startMeasureListIndex:this.currentXmlMeasureIndex,endMeasureListIndex:0,resetMeasureListIndex:0},this.xmlNotes=[];if(i.value.startsWith(GRADIENT_SPEED_CLOSE_TAG)&&null!==(p=this.currentGradualChangeMeasure)&&void 0!==p&&p.speedInfo&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:this.xmlNotes.length,endMeasureListIndex:this.currentXmlMeasureIndex}),(null===(f=i.value)||void 0===f?void 0:f.toLocaleLowerCase())==="a tempo".toLocaleLowerCase()&&null!==(m=this.currentGradualChangeMeasure)&&void 0!==m&&m.speedInfo){const{endXmlNoteIndex:e,resetXmlNoteIndex:t,endMeasureListIndex:n}=this.currentGradualChangeMeasure.speedInfo;0===t&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:e||this.xmlNotes.length,endMeasureListIndex:n||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}}if(e.find((e=>e.element("metronome")))&&null!==(h=this.currentGradualChangeMeasure)&&void 0!==h&&h.speedInfo){const{endXmlNoteIndex:e,resetXmlNoteIndex:t,endMeasureListIndex:n}=this.currentGradualChangeMeasure.speedInfo;0===t&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:e||this.xmlNotes.length,endMeasureListIndex:n||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}n.readExpressionParameters(A,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),n.read(A,this.currentMeasure,r,o.clone(),l.length)}}}else if("barline"===A.name){if(this.repetitionInstructionReader){this.repetitionInstructionReader.handleLineRepetitionInstructions(A)&&(this.currentMeasure.HasEndLine=!0)}const e=A.attribute("location");if(c===y.length-1||e&&"right"===e.value){var v;const e=null===(v=A.element("bar-style"))||void 0===v?void 0:v.value;var b;if(e)if(this.currentMeasure.endingBarStyleXml=e,this.currentMeasure.endingBarStyleEnum=SystemLinesEnumHelper.xmlBarlineStyleToSystemLinesEnum(e),null!==(b=this.currentGradualChangeMeasure)&&void 0!==b&&b.speedInfo){const{endXmlNoteIndex:e,resetXmlNoteIndex:t,endMeasureListIndex:n}=this.currentGradualChangeMeasure.speedInfo;0===t&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:e||this.xmlNotes.length,endMeasureListIndex:n||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.currentGradualChangeMeasure=void 0,this.xmlNotes=[]}}}else if("sound"===A.name)try{if(A.attribute("tempo")){const e=parseFloat(A.attribute("tempo").value);A.element("offset")&&(this.soundTempos.has(this.currentXmlMeasureIndex)||this.soundTempos.set(this.currentXmlMeasureIndex,[]),this.soundTempos.get(this.currentXmlMeasureIndex).push(e)),0===this.currentXmlMeasureIndex&&(this.musicSheet.DefaultStartTempoInBpm=e,this.musicSheet.HasBPMInfo=!0)}}catch(e){loglevelExports.debug("InstrumentReader.readTempoInstruction",e)}else"harmony"===A.name&&this.openChordSymbolContainers.push(ChordSymbolReader.readChordSymbol(A,this.musicSheet,this.activeKey))}for(const e in this.voiceGeneratorsDict)if(this.voiceGeneratorsDict.hasOwnProperty(e)){this.voiceGeneratorsDict[e].checkForOpenBeam()}if(this.currentXmlMeasureIndex===this.xmlMeasureList.length-1){for(let e=0;e{this.voiceGeneratorsDict[e].finalizeReadingMeasure()})),this.musicSheet.HasBPMInfo?0===t.TempoInBPM&&this.previousMeasure&&(this.currentMeasure.TempoInBPM=this.previousMeasure.TempoInBPM):this.currentMeasure.TempoInBPM=120,this.currentMeasure.TempoInBPM||(this.currentMeasure.TempoInBPM=this.musicSheet.DefaultStartTempoInBpm)}catch(e){if(s)throw new MusicSheetReadingException(e.Message);const n=ITextTranslation.translateText("ReaderErrorMessages/MeasureError","Error while reading Measure.");this.musicSheet.SheetErrors.pushMeasureError(n),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",n,e)}return this.previousMeasure=this.currentMeasure,this.currentXmlMeasureIndex+=1,!0}parseXmlColor(e){if(e)return 7===e.length?e:9===e.length?"#"+e.substr(3):void 0}doCalculationsAfterDurationHasBeenSet(){for(const e in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(e)&&this.voiceGeneratorsDict[e].checkOpenTies()}getOrCreateVoiceGenerator(e,t){const n=this.instrument.Staves[t];let i=this.voiceGeneratorsDict[e];if(i)-1===n.Voices.indexOf(i.GetVoice)&&n.Voices.push(i.GetVoice);else{const r=this.staffMainVoiceGeneratorDict[t];r?(i=new VoiceGenerator(this.pluginManager,n,e,this.slurReader,r.GetVoice),n.Voices.push(i.GetVoice),this.voiceGeneratorsDict[e]=i):(i=new VoiceGenerator(this.pluginManager,n,e,this.slurReader),n.Voices.push(i.GetVoice),this.voiceGeneratorsDict[e]=i,this.staffMainVoiceGeneratorDict[t]=i)}return i}createExpressionGenerators(e){this.expressionReaders=new Array(e);for(let t=0;t0?this.musicSheet.SourceMeasures[0]:this.currentMeasure;const n=new ClefInstruction(ClefEnum.G,0,2);let i;t.FirstInstructionsStaffEntries[e]?(i=t.FirstInstructionsStaffEntries[e],i.removeFirstInstructionOfTypeClefInstruction()):(i=new SourceStaffEntry(void 0,void 0),t.FirstInstructionsStaffEntries[e]=i),n.Parent=i,i.Instructions.splice(0,0,n)}createDefaultKeyInstruction(){let e;e=this.musicSheet.SourceMeasures.length>0?this.musicSheet.SourceMeasures[0]:this.currentMeasure;const t=new KeyInstruction(void 0,0,KeyEnum.major);for(let n=this.inSourceMeasureInstrumentIndex;n0&&"backup"===n[i-1].name)return!0;let r=-1;for(let o=0;o0||r<0}isAttributesNodeAtEndOfMeasure(e,t){const n=e.elements().slice();let i=0;for(let o=0;or}getNoteDurationFromTypeNode(e){const t=e.element("type");if(t){const e=t.value;return NoteTypeHandler.getNoteDurationFromType(e)}return new Fraction$1(0,4*this.divisions)}addAbstractInstruction(t,n,i,r){if(t.element("divisions")&&1===t.elements().length)return;const o=t.element("transpose");if(o){const e=o.element("chromatic");e&&(this.instrument.PlaybackTranspose=parseInt(e.value,10))}const s=t.elements("clef");let a;if(s.length>0)for(let c=0,u=s.length;c using default clef line."),this.musicSheet.SheetErrors.pushMeasureError(a),i=2,loglevelExports.debug("InstrumentReader.addAbstractInstruction",a,l)}const d=t.element("sign");if(d)try{n=ClefEnum[d.value],ClefInstruction.isSupportedClef(n)||(a=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Unsupported clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(a),n=ClefEnum.G,i=2),n===ClefEnum.TAB&&(u=-1)}catch(e){a=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(a),n=ClefEnum.G,i=2,loglevelExports.debug("InstrumentReader.addAbstractInstruction",a,e)}const p=t.element("clef-octave-change");if(p)try{u=parseInt(p.value,10)}catch(e){a=ITextTranslation.translateText("ReaderErrorMessages/ClefOctaveError","Invalid clef octave found -> using default clef octave."),this.musicSheet.SheetErrors.pushMeasureError(a),u=0}if(t.hasAttributes&&t.attribute("number"))try{o=parseInt(t.attribute("number").value,10),o>this.currentClefNumber&&(o=this.currentClefNumber),this.currentClefNumber=o+1}catch(err){a=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(a),o=1,this.currentClefNumber=o+1}const f=new ClefInstruction(n,u,i);this.abstractInstructions.push([o,f,r])}if(void 0!==t.element("key")&&this.instrument.MidiInstrumentId!==MidiInstrument.Percussion){let e=0;const n=t.element("key").element("fifths");if(n)try{e=parseInt(n.value,10)}catch(l){a=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key found -> set to default."),this.musicSheet.SheetErrors.pushMeasureError(a),e=0,loglevelExports.debug("InstrumentReader.addAbstractInstruction",a,l)}let i=KeyEnum.none,o=t.element("key");if(o&&(o=o.element("mode")),o)try{i=KeyEnum[o.value]}catch(l){a=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key found -> set to default."),this.musicSheet.SheetErrors.pushMeasureError(a),i=KeyEnum.major,loglevelExports.debug("InstrumentReader.addAbstractInstruction",a,l)}const s=new KeyInstruction(void 0,e,i);this.abstractInstructions.push([1,s,r])}if(t.element("time")){const e=t.element("time");let n=RhythmSymbolEnum.NONE,i=!0;if(void 0!==e&&e.hasAttributes){const t=e.attribute("symbol");t&&("common"===t.value?n=RhythmSymbolEnum.COMMON:"cut"===t.value&&(n=RhythmSymbolEnum.CUT));const r=e.attribute("print-object");r&&"no"===r.value&&(i=!1)}let o=0,s=0;const c=e&&void 0!==e.element("senza-misura"),u=t.elements("time"),h=[],d=[];for(let t=0,r=u.length;t0&&void 0!==d&&h.length===d.length){const e=h.length,t=new Array(e);let n=0;for(let i=0;i set to default."),this.musicSheet.SheetErrors.pushMeasureError(a),o=4,s=4,loglevelExports.debug("InstrumentReader.addAbstractInstruction",a,l)}const e=new RhythmInstruction(new Fraction$1(o,s,0,!1),n);e.PrintObject=i,this.abstractInstructions.push([1,e,r])}}}saveAbstractInstructionList(e,t){for(let n=this.abstractInstructions.length-1;n>=0;n--){const i=this.abstractInstructions[n],r=i[0],o=i[1],s=i[2];if(o instanceof ClefInstruction){const e=o;if(0===this.currentXmlMeasureIndex||r<=this.activeClefs.length&&e!==this.activeClefs[r-1])if(t||void 0===this.currentStaffEntry||this.currentStaffEntry.hasNotes()||r-1!==this.instrument.Staves.indexOf(this.currentStaffEntry.ParentStaff))if(t){if(0!==s.RealValue)continue;let t;if(this.currentMeasure){const i=e,o=this.inSourceMeasureInstrumentIndex+r-1,s=this.currentMeasure.FirstInstructionsStaffEntries[o];if(0===this.currentXmlMeasureIndex)if(s)if(void 0===this.currentMeasure.FirstInstructionsStaffEntries[o]||s.Instructions[0]instanceof ClefInstruction){const e=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[o]=e,i.Parent=e,e.Instructions.push(i)}else t=s,i.Parent=t,t.removeFirstInstructionOfTypeClefInstruction(),t.Instructions.splice(0,0,i),this.activeClefsHaveBeenInitialized[r-1]=!0;else t=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[o]=t,i.Parent=t,t.Instructions.push(i),this.activeClefsHaveBeenInitialized[r-1]=!0;else if(this.activeClefsHaveBeenInitialized[r-1]){let e=this.previousMeasure;this.followingMultirestMeasures>0&&this.currentMeasure.Rules.RenderMultipleRestMeasures&&(e=this.currentMultirestStartMeasure);const t=new SourceStaffEntry(void 0,void 0);e.LastInstructionsStaffEntries[o]=t,i.Parent=t,t.Instructions.push(i)}else{const e=this.musicSheet.SourceMeasures[0];e.FirstInstructionsStaffEntries[o]?(t=e.FirstInstructionsStaffEntries[o],t.removeFirstInstructionOfTypeClefInstruction()):t=new SourceStaffEntry(void 0,void 0),i.Parent=t,t.Instructions.splice(0,0,i),this.activeClefsHaveBeenInitialized[r-1]=!0}this.activeClefs[r-1]=e,this.abstractInstructions.splice(n,1)}}else{let t;const i=this.activeRhythm.Rhythm;i.RealValue>0&&s.RealValue/i.RealValue>.9&&(this.currentMeasure.LastInstructionsStaffEntries[r-1]||(this.currentMeasure.LastInstructionsStaffEntries[r-1]=new SourceStaffEntry(void 0,this.instrument.Staves[r-1])),t=this.currentMeasure.LastInstructionsStaffEntries[r-1]),t&&(e.Parent=t,t.Instructions.push(e),this.activeClefs[r-1]=e,this.abstractInstructions.splice(n,1))}else{const t=e,i=this.currentStaffEntry;if(s&&Math.abs(s.RealValue-i.Timestamp.RealValue)>.01)continue;t.Parent=i,i.removeFirstInstructionOfTypeClefInstruction(),i.Instructions.push(t),this.activeClefs[r-1]=e,this.abstractInstructions.splice(n,1)}else r<=this.activeClefs.length&&e===this.activeClefs[r-1]&&this.abstractInstructions.splice(n,1)}if(o instanceof KeyInstruction){const t=o;if(this.activeKey&&this.activeKey.Key===t.Key)this.abstractInstructions.splice(n,1);else{let i;if(this.activeKey=t,this.abstractInstructions.splice(n,1),this.activeKeyHasBeenInitialized?i=this.currentMeasure:(this.activeKeyHasBeenInitialized=!0,i=this.currentXmlMeasureIndex>0?this.musicSheet.SourceMeasures[0]:this.currentMeasure),i)for(let n=this.inSourceMeasureInstrumentIndex;n=0;e--){const t=this.abstractInstructions[e][0],n=this.abstractInstructions[e][1];if(n instanceof ClefInstruction){const i=n;if(!this.activeClefs[t-1]||i.ClefType!==this.activeClefs[t-1].ClefType||i.ClefType===this.activeClefs[t-1].ClefType&&i.Line!==this.activeClefs[t-1].Line){const n=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[this.inSourceMeasureInstrumentIndex+t-1]=n;const r=i;r.Parent=n,n.Instructions.push(r),this.activeClefs[t-1]=i,this.abstractInstructions.splice(e,1)}}}}getNoteDurationForTuplet(e){let t=new Fraction$1(0,1);const n=this.getNoteDurationFromTypeNode(e);if(e.element("time-modification")){const i=e.element("time-modification");if(i&&void 0!==i.element("actual-notes")&&i.element("normal-notes")){const e=i.element("actual-notes"),r=i.element("normal-notes");if(void 0!==e&&r){const i=parseInt(e.value,10),o=parseInt(r.value,10);t=new Fraction$1(o*n.Numerator,i*n.Denominator)}}}return t}readExpressionStaffNumber(e){let t=1;if(e.element("staff")){const i=e.element("staff");if(i)try{t=parseInt(i.value,10)}catch(n){const e=ITextTranslation.translateText("ReaderErrorMessages/ExpressionStaffError","Invalid Expression staff number -> set to default.");this.musicSheet.SheetErrors.pushMeasureError(e),t=1,loglevelExports.debug("InstrumentReader.readExpressionStaffNumber",e,n)}}return t}readDivisionsFromNotes(){let e=0,t=this.currentXmlMeasureIndex,n=!1;for(;!n;){const r=this.xmlMeasureList[t].elements();for(let t=0,o=r.length;t0){n=!0;break}}if(0===e&&(t++,t===this.xmlMeasureList.length)){const e=ITextTranslation.translateText("ReaderErrorMEssages/DivisionsError","Invalid divisions value at Instrument: ");throw new MusicSheetReadingException(e+this.instrument.Name)}}return e}}const _SubInstrument=class{constructor(e){this.parentInstrument=e,this.fixedKey=-1,this.name=this.parseMidiInstrument(this.parentInstrument.Name),this.midiInstrumentID=_SubInstrument.midiInstrument[this.name],this.volume=1}get ParentInstrument(){return this.parentInstrument}static isPianoInstrument(e){return e===MidiInstrument.Acoustic_Grand_Piano||e===MidiInstrument.Bright_Acoustic_Piano||e===MidiInstrument.Electric_Grand_Piano||e===MidiInstrument.Electric_Piano_1||e===MidiInstrument.Electric_Piano_2}setMidiInstrument(e){this.midiInstrumentID=_SubInstrument.midiInstrument[this.parseMidiInstrument(e)]}parseMidiInstrument(t){try{if(t){let e=t.toLowerCase().trim();e=e.replace(/\s+/g,"_");for(const t in _SubInstrument.midiInstrument)if(-1!==e.indexOf(t))return t}if(this.parentInstrument.Name){let e=this.parentInstrument.Name.toLowerCase().trim();e=e.replace(/\s+/g,"_");for(const t in _SubInstrument.midiInstrument)if(-1!==e.indexOf(t))return t}}catch(e){loglevelExports.error("Error parsing MIDI Instrument. Default to Grand Piano.")}return"unnamed"}};let SubInstrument=_SubInstrument;SubInstrument.midiInstrument={alto_saxophone:MidiInstrument.Alto_Sax,baritone_saxophone:MidiInstrument.Baritone_Sax,horn_in_f:MidiInstrument.French_Horn,english_horn:MidiInstrument.English_Horn,euphonium:MidiInstrument.Euphonium,clarinet_in_bb:MidiInstrument.clarinet_in_bb,clarinet_in_eb:MidiInstrument.clarinet_in_eb,clarinet:MidiInstrument.Clarinet,alto_clarinet:MidiInstrument.Alto_Clarinet,bass_clarinet:MidiInstrument.Bass_Clarinet,bassoon:MidiInstrument.Bassoon,bass_trombone:MidiInstrument.Bass_Trombone,alt:MidiInstrument.Synth_Voice,alto:MidiInstrument.Synth_Voice,banjo:MidiInstrument.Banjo,bariton:MidiInstrument.Synth_Voice,baritone:MidiInstrument.Synth_Voice,bass:MidiInstrument.Synth_Voice,"blockflöte":MidiInstrument.Recorder,brass:MidiInstrument.Trombone,bratsche:MidiInstrument.Viola,cello:MidiInstrument.Cello,contrabass:MidiInstrument.Contrabass,drums:MidiInstrument.Percussion,flute:MidiInstrument.Flute,"flöte":MidiInstrument.Flute,frenchhorn:MidiInstrument.French_Horn,gitarre:MidiInstrument.Acoustic_Guitar_nylon,guitar:MidiInstrument.Acoustic_Guitar_nylon,harfe:MidiInstrument.Orchestral_Harp,harp:MidiInstrument.Orchestral_Harp,klarinette:MidiInstrument.Clarinet,klavier:MidiInstrument.Acoustic_Grand_Piano,kontrabass:MidiInstrument.Contrabass,oboe:MidiInstrument.Oboe,organ:MidiInstrument.Church_Organ,orgel:MidiInstrument.Church_Organ,orgue:MidiInstrument.Church_Organ,percussion:MidiInstrument.Synth_Drum,"小军鼓":MidiInstrument.Synth_Drum,snare_drum:MidiInstrument.Synth_Drum,bass_drum:MidiInstrument.Synth_Drum,side_drum:MidiInstrument.Synth_Drum,piano:MidiInstrument.Acoustic_Grand_Piano,piccolo:MidiInstrument.Piccolo,posaune:MidiInstrument.Trombone,recorder:MidiInstrument.Recorder,sax:MidiInstrument.Tenor_Sax,schlagwerk:MidiInstrument.Percussion,schlagzeug:MidiInstrument.Percussion,sopran:MidiInstrument.Synth_Voice,steeldrum:MidiInstrument.Steel_Drums,streicher:MidiInstrument.String_Ensemble_1,strings:MidiInstrument.String_Ensemble_1,tenor:MidiInstrument.Synth_Voice,tpt:MidiInstrument.Trumpet,trombone:MidiInstrument.Trombone,trompete:MidiInstrument.Trumpet,trumpet:MidiInstrument.Trumpet,tuba:MidiInstrument.Tuba,unnamed:MidiInstrument.Acoustic_Grand_Piano,viola:MidiInstrument.Viola,violin:MidiInstrument.Violin,"violon-c":MidiInstrument.Cello,"violon.":MidiInstrument.Violin,voice:MidiInstrument.Synth_Voice,woodblock:MidiInstrument.Woodblock,alto_clarinet_in_eb:MidiInstrument.AltoClarinetInEb,trumpet_in_bb:MidiInstrument.TrumpetInBb,tenor_saxophone:MidiInstrument.TenorSaxophone};class StringUtil{static StringContainsSeparatedWord(e,t,n=!1){return new RegExp("( |^)"+t+"([ .]|$)",n?"i":void 0).test(e)}}class RepetitionInstructionReader{set MusicSheet(e){this.musicSheet=e,this.xmlMeasureList=new Array(this.musicSheet.Instruments.length),this.repetitionInstructions=[]}prepareReadingMeasure(e,t){this.currentMeasureIndex=t}handleLineRepetitionInstructions(e){let t=!1;if(e.elements().length>0){let n="",i=!1,r="",o="",s="";const a=[],l=e.element("bar-style");l&&(s=l.value),n=e.attributes().length>0&&e.attribute("location")?e.attribute("location").value:"right";const c=e.elements();for(let e=0,t=c.length;e0)if("left"===n){if("start"===o){const e=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.Begin,void 0,a);this.addInstruction(this.repetitionInstructions,e)}if("forward"===r){const e=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.StartLine);this.addInstruction(this.repetitionInstructions,e)}}else{if("stop"===o){const e=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.End,void 0,a);this.addInstruction(this.repetitionInstructions,e)}if("backward"===r){const e=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.BackJumpLine);this.addInstruction(this.repetitionInstructions,e)}}}return t}handleRepetitionInstructionsFromWordsOrSymbols(e,t){const n=e.element("words"),i=this.currentMeasureIndex;if(n){const e="d\\s?\\.s\\.",t=n.value.trim().toLowerCase();if(StringUtil.StringContainsSeparatedWord(t,e+" al fine",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.DalSegnoAlFine);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,e+" al coda",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.DalSegnoAlCoda);return this.addInstruction(this.repetitionInstructions,e),!0}const r="d\\.\\s?c\\.";if(StringUtil.StringContainsSeparatedWord(t,r+" al fine",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.DaCapoAlFine);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,r+" al coda",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.DaCapoAlCoda);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,r)||StringUtil.StringContainsSeparatedWord(t,"da\\s?capo",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.DaCapo);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,e,!0)||StringUtil.StringContainsSeparatedWord(t,"dal\\s?segno",!0)){let e;return e=StringUtil.StringContainsSeparatedWord(t,"al\\s?coda",!0)?new RepetitionInstruction(i,RepetitionInstructionEnum.DalSegnoAlCoda):new RepetitionInstruction(i,RepetitionInstructionEnum.DalSegno),this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,"to\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(t,"a (la )?coda",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.ToCoda);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,"fine",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.Fine);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,"coda",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,e),!0}if(StringUtil.StringContainsSeparatedWord(t,"segno",!0)){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,e),!0}}else{if(e.element("segno")){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,e),!0}if(e.element("coda")){const e=new RepetitionInstruction(i,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,e),!0}}return!1}removeRedundantInstructions(){let e=0,t=0,n=0,i=0;for(let r=0;r0&&this.findInstructionInPreviousMeasure(r,o.measureIndex,RepetitionInstructionEnum.ToCoda)&&(o.type=RepetitionInstructionEnum.None),0===t&&0===n&&(o.type=RepetitionInstructionEnum.ToCoda,o.alignment=AlignmentType.End,o.measureIndex--);break;case RepetitionInstructionEnum.Segno:if(e-i>0){let e=!1;for(let i=0,r=this.repetitionInstructions.length;i0?RepetitionInstructionEnum.DalSegnoAlCoda:RepetitionInstructionEnum.DalSegno,o.type=RepetitionInstructionEnum.None,e=!0;break;case RepetitionInstructionEnum.DalSegno:case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:o.type=RepetitionInstructionEnum.None,e=!0}if(e)break}if(e)break;o.type=n-t>0?RepetitionInstructionEnum.DalSegnoAlCoda:RepetitionInstructionEnum.DalSegno,o.alignment=AlignmentType.End,o.measureIndex--}}if(this.backwardSearchForPreviousIdenticalInstruction(r,o)||o.type===RepetitionInstructionEnum.None)this.repetitionInstructions.splice(r,1),r--;else switch(o.type){case RepetitionInstructionEnum.Fine:break;case RepetitionInstructionEnum.ToCoda:n++;break;case RepetitionInstructionEnum.Coda:t++;break;case RepetitionInstructionEnum.Segno:e++;break;case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:i++}}this.repetitionInstructions.sort(RepetitionInstructionComparer.Compare)}findInstructionInPreviousMeasure(e,t,n){for(let i=e-1;i>=0;i--){const e=this.repetitionInstructions[i];if(t-e.measureIndex==1&&e.type===n)return!0}return!1}backwardSearchForPreviousIdenticalInstruction(e,t){for(let n=e-1;n>=0;n--){if(this.repetitionInstructions[n].equals(t))return!0}return!1}addInstruction(e,t){let n=!0;for(let i=0,r=e.length;i0;)try{const e=this.openRepetitions.last();if(e.RepetitonUnderConstruction.FromWords){if(e.WaitingForCoda){let t=e.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex+1;t>=this.musicSheet.SourceMeasures.length&&(t=-1),e.RepetitonUnderConstruction.setEndingStartIndex(2,t)}else if(0===e.RepetitonUnderConstruction.BackwardJumpInstructions.length){this.openRepetitions.splice(this.openRepetitions.length-1,1);continue}}else if(0===e.RepetitonUnderConstruction.BackwardJumpInstructions.length){const t=n.length-1,i=new RepetitionInstruction(t,RepetitionInstructionEnum.BackJumpLine,AlignmentType.End,e.RepetitonUnderConstruction);e.RepetitonUnderConstruction.BackwardJumpInstructions.push(i),n[t].LastRepetitionInstructions.push(i)}this.finalizeRepetition(this.openRepetitions.last())}catch(err){try{const e=this.openRepetitions.last().RepetitonUnderConstruction;for(const t of this.repetitionInstructions)t.parentRepetition===e&&(t.parentRepetition=void 0);this.openRepetitions.splice(this.openRepetitions.length-1,1)}catch(o){loglevelExports.error("RepetitionCalculator: calculateRepetitions2",o)}}let i=!1;const r=this.musicSheet.SourceMeasures.length-1;for(const s of this.musicSheet.Repetitions)if(0===s.StartIndex&&s.EndIndex===r){i=!0;break}if(!i){const e=new Repetition(this.musicSheet,!0);e.FromWords=!0,e.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.StartLine),e.startMarker.parentRepetition=e,this.musicSheet.SourceMeasures[0].FirstRepetitionInstructions.push(e.startMarker),e.endMarker=new RepetitionInstruction(r,RepetitionInstructionEnum.BackJumpLine),e.endMarker.parentRepetition=e,e.BackwardJumpInstructions.push(e.endMarker),e.UserNumberOfRepetitions=e.DefaultNumberOfRepetitions,this.musicSheet.Repetitions.push(e)}for(let s=0,a=this.musicSheet.SourceMeasures.length;s1&&e.FirstRepetitionInstructions.sort(RepetitionInstructionComparer.Compare),e.LastRepetitionInstructions.length>1&&e.LastRepetitionInstructions.sort(RepetitionInstructionComparer.Compare)}}handleRepetitionInstructions(e){let t;switch(e.type){case RepetitionInstructionEnum.StartLine:t=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!1,t.RepetitonUnderConstruction.startMarker=e,this.currentMeasure.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.BackJumpLine:t=this.getOrCreateCurrentRepetition2(!1),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e),0===t.RepetitonUnderConstruction.EndingParts.length&&this.finalizeRepetition(t);break;case RepetitionInstructionEnum.Ending:t=this.getOrCreateCurrentRepetition(),e.parentRepetition=t.RepetitonUnderConstruction;if(e.endingIndices.contains(1)&&e.alignment===AlignmentType.Begin){if(t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)){t=void 0;for(let e=this.openRepetitions.length-1;e>=0;e--){const n=this.openRepetitions[e];if(0===n.RepetitonUnderConstruction.BackwardJumpInstructions.length)for(t=n;this.openRepetitions.length-1>e;){const e=this.openRepetitions.last();this.finalizeRepetition(e)}}void 0===t&&(t=this.createNewRepetition(0),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None))}void 0===t.RepetitonUnderConstruction.forwardJumpInstruction&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex-1,RepetitionInstructionEnum.ForwardJump,AlignmentType.End,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].LastRepetitionInstructions.push(t.RepetitonUnderConstruction.forwardJumpInstruction))}if(e.alignment===AlignmentType.Begin)t.RepetitonUnderConstruction.setEndingsStartIndex(e.endingIndices,this.currentMeasureIndex),this.currentMeasure.FirstRepetitionInstructions.push(e);else for(let n=0,i=e.endingIndices.length;n0&&Math.abs(t.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex-this.currentMeasureIndex)<=1)break;if(this.openRepetitions.length&&this.openRepetitions.find((e=>e.RepetitonUnderConstruction.startMarker.type===RepetitionInstructionEnum.StartLine)).RepetitonUnderConstruction.StartIndex===this.currentMeasureIndex)break;t=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=e,this.currentMeasure.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.Fine:if(0===this.openRepetitions.length)break;if(t=this.getCurrentRepetition(!0),void 0===t)break;e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,void 0===t.RepetitonUnderConstruction.forwardJumpInstruction?(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=e,t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.currentMeasure.LastRepetitionInstructions.push(e)):this.currentMeasure.LastRepetitionInstructions.push(new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Fine,AlignmentType.End,void 0));break;case RepetitionInstructionEnum.ToCoda:if(0===this.openRepetitions.length)break;if(t=this.getCurrentRepetition(!0),void 0===t)break;void 0===t.RepetitonUnderConstruction.forwardJumpInstruction&&(e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.ToCodaFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=e,this.currentMeasure.LastRepetitionInstructions.push(e));break;case RepetitionInstructionEnum.Coda:if(0===this.openRepetitions.length)break;t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,t.WaitingForCoda?(t.CodaFound=!0,t.RepetitonUnderConstruction.setEndingStartIndex(2,this.currentMeasureIndex),this.currentMeasure.LastRepetitionInstructions.push(e),this.finalizeRepetition(t),this.currentMeasureIndex>0&&(this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].printNewSystemXml=!0)):t.ToCodaFound||(0===t.RepetitonUnderConstruction.BackwardJumpInstructions.length?(t.ToCodaFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.ToCoda,AlignmentType.End,t.RepetitonUnderConstruction),this.currentMeasure.LastRepetitionInstructions.push(t.RepetitonUnderConstruction.forwardJumpInstruction)):this.currentMeasure.LastRepetitionInstructions.push(new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Coda,AlignmentType.Begin,void 0)));break;case RepetitionInstructionEnum.DaCapo:t=this.getOrCreateCurrentRepetition(),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&this.finalizeRepetition(t),0!==t.RepetitonUnderConstruction.StartIndex&&(t=this.createNewRepetition(0)),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e),0===t.RepetitonUnderConstruction.EndingParts.length&&this.finalizeRepetition(t);break;case RepetitionInstructionEnum.DalSegno:if(t=this.getOrCreateCurrentRepetition2(!0),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(t),t=this.createNewRepetition(0),t.RepetitonUnderConstruction.FromWords=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction)),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);n>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(n,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)&&t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlFine:if(0===this.openRepetitions.length)break;if(t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);n>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(n,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}if(!t.FineFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);n>=0&&(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.Fine,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlFine:if(t=this.getOrCreateCurrentRepetition(),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(t),t=this.createNewRepetition(0)),void 0!==t.RepetitonUnderConstruction.startMarker&&0!==t.RepetitonUnderConstruction.StartIndex&&(t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=t.RepetitonUnderConstruction,!t.FineFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);n>=0&&(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.Fine,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlCoda:if(0===this.openRepetitions.length)break;if(t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);n>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(n,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}if(!t.ToCodaFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(n>=0)t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0;else{const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);n>=0&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0)}}t.ToCodaFound&&(t.WaitingForCoda=!0),t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlCoda:if(t=this.getOrCreateCurrentRepetition(),(t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||0===t.RepetitonUnderConstruction.EndingParts.length)&&(this.finalizeRepetition(t),t=this.createNewRepetition(0)),void 0!==t.RepetitonUnderConstruction.startMarker&&0!==t.RepetitonUnderConstruction.StartIndex&&(t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=t.RepetitonUnderConstruction,!t.ToCodaFound){const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(n>=0)t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0;else{const n=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);n>=0&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(n,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[n].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0)}}t.ToCodaFound&&(t.WaitingForCoda=!0),t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.None:break;default:throw new ArgumentOutOfRangeException("currentRepetitionInstruction")}return!0}findInstructionInMainListBackwards(e,t){for(let n=this.repetitionInstructions.length-1;n>=0;n--){const i=this.repetitionInstructions[n];if(i.measureIndex<=t&&i.type===e)return i.measureIndex}return-1}finalizeRepetition(e){const t=e.RepetitonUnderConstruction;if(t.BackwardJumpInstructions.length>0){let e=!0;const n=this.getLastFinalizedRepetition();if(void 0!==n&&t.coversIdenticalMeasures(n)){if(t.NumberOfEndings>n.NumberOfEndings){const e=this.musicSheet.Repetitions.indexOf(n,0);e>-1&&this.musicSheet.Repetitions.splice(e,1),n.removeFromRepetitionInstructions(),this.musicSheet.Repetitions.push(t)}e=!1,t.removeFromRepetitionInstructions()}else this.musicSheet.Repetitions.push(t);e&&(t.startMarker.type===RepetitionInstructionEnum.None&&this.musicSheet.SourceMeasures[t.StartIndex].FirstRepetitionInstructions.push(t.startMarker),t.UserNumberOfRepetitions=t.DefaultNumberOfRepetitions)}this.openRepetitions.splice(this.openRepetitions.length-1,1)}getCurrentRepetition(e){let t;for(let n=this.openRepetitions.length-1;n>=0;n--)if(this.openRepetitions[n].RepetitonUnderConstruction.FromWords===e){for(t=this.openRepetitions[n];n0)return this.openRepetitions.last();const e=this.createNewRepetition(0);return e.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,e.RepetitonUnderConstruction),e}getOrCreateCurrentRepetition2(e){let t;if(this.openRepetitions.length){if(this.openRepetitions.last().RepetitonUnderConstruction.EndingParts.length<2)for(let n=this.openRepetitions.length-1;n>=0;n--)if(t=this.openRepetitions[n],t.RepetitonUnderConstruction.FromWords===e){for(;n0){const e=this.openRepetitions.last(),t=e.RepetitonUnderConstruction;if(t.BackwardJumpInstructions.length>0){const n=Object.keys(t.EndingIndexDict);(0===n.length||t.EndingIndexDict[n[n.length-1]].part.EndIndex>=0)&&this.finalizeRepetition(e)}}const t=new RepetitionBuildingContainer(this.musicSheet);return this.lastRepetitionCommonPartStartIndex=e,this.openRepetitions.push(t),t}getLastFinalizedRepetition(){if(this.musicSheet.Repetitions.length>0)return this.musicSheet.Repetitions.last()}}class RepetitionBuildingContainer{constructor(e){this.RepetitonUnderConstruction=new Repetition(e)}}class MusicSymbolModuleFactory{static createRepetitionInstructionReader(){return new RepetitionInstructionReader}static createRepetitionCalculator(){return new RepetitionCalculator}}class ReaderPluginManager{constructor(){this.voiceMeasureReadPlugins=[]}addVoiceMeasureReadPlugin(e){this.voiceMeasureReadPlugins.push(e)}processVoiceMeasureReadPlugins(e,t,n){for(const r of this.voiceMeasureReadPlugins)try{r.measureReadCalculations(e,t,n)}catch(i){loglevelExports.info("VoiceGenerator.addSingleNote: ",i)}}}class MusicSheetReader{constructor(e=undefined,t=new EngravingRules){this.completeNumberOfStaves=0,this.pluginManager=new ReaderPluginManager,this.afterSheetReadingModules=e||[],this.repetitionInstructionReader=MusicSymbolModuleFactory.createRepetitionInstructionReader(),this.repetitionCalculator=MusicSymbolModuleFactory.createRepetitionCalculator(),this.rules=t}get PluginManager(){return this.pluginManager}get CompleteNumberOfStaves(){return this.completeNumberOfStaves}static doCalculationsAfterDurationHasBeenSet(e){for(const t of e)t.doCalculationsAfterDurationHasBeenSet()}createMusicSheet(t,n){try{return this._createMusicSheet(t,n)}catch(e){return void loglevelExports.error("MusicSheetReader.CreateMusicSheet",e)}}_removeFromArray(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}trimString(e){return e.replace(/^\s+|\s+$/g,"")}_lastElement(e){return e[e.length-1]}_createMusicSheet(t,n){const i=[];let r=0;if(this.musicSheet=new MusicSheet,this.musicSheet.Path=n,this.musicSheet.Rules=this.rules,!t)throw new MusicSheetReadingException("Undefined root element");this.pushSheetLabels(t,n);const o=t.element("part-list");if(!o)throw new MusicSheetReadingException("Undefined partListNode");const s=t.elements("part"),a=o.elements();this.initializeReading(a,s,i);let l=!0;this.currentFraction=new Fraction$1(0,1);let c=!1,u=t.element("identification");for(u&&(u=u.element("encoding")),u&&(u=u.element("software")),void 0!==u&&"Guitar Pro 5"===u.value&&(c=!0);l;){void 0!==this.currentMeasure&&this.currentMeasure.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(r=0),this.currentMeasure=new SourceMeasure(this.completeNumberOfStaves,this.musicSheet.Rules);for(const t of i)try{l=l&&t.readNextXmlMeasure(this.currentMeasure,this.currentFraction,c)}catch(e){const n=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading instruments.");throw new MusicSheetReadingException(n,e)}var h;if(l)this.musicSheet.addMeasure(this.currentMeasure),this.checkIfRhythmInstructionsAreSetAndEqual(i),this.checkSourceMeasureForNullEntries(),r=this.setSourceMeasureDuration(i,r),MusicSheetReader.doCalculationsAfterDurationHasBeenSet(i),this.currentMeasure.AbsoluteTimestamp=this.currentFraction.clone(),this.musicSheet.SheetErrors.finalizeMeasure(this.currentMeasure.MeasureNumber),this.currentFraction.Add(this.currentMeasure.Duration),this.previousMeasure=this.currentMeasure,this.musicSheet.SoundTempos=null===(h=i[0])||void 0===h?void 0:h.SoundTempos}this.repetitionInstructionReader&&(this.repetitionInstructionReader.removeRedundantInstructions(),this.repetitionCalculator&&this.repetitionCalculator.calculateRepetitions(this.musicSheet,this.repetitionInstructionReader.repetitionInstructions)),0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=100),this.musicSheet.checkForInstrumentWithNoVoice(),this.musicSheet.fillStaffList();for(let e=0,d=this.afterSheetReadingModules.length;en){if(this.areRhythmInstructionsMixed(t)&&e.SymbolEnum!==RhythmSymbolEnum.NONE)continue;n=e.Rhythm.RealValue,i=t.indexOf(e)}}if(t.length>0&&t.lengthe.Denominator){const n=t.Denominator/e.Denominator;e.expand(n)}}checkIfMeasureIsImplicit(e,t){return!(this.previousMeasure||!e.lt(t))||!!this.previousMeasure&&Fraction$1.plus(this.previousMeasure.Duration,e).Equals(t)}allInstrumentsHaveSameDuration(e,t){let n=0;for(let i=0,r=e.length;i=0;e--)for(let t=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length-1;t>=0;t--){const n=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[t];if(n)for(let e=n.VoiceEntries.length-1;e>=0;e--){const t=n.VoiceEntries[e];0===t.Notes.length&&(this._removeFromArray(t.ParentVoice.VoiceEntries,t),this._removeFromArray(n.VoiceEntries,t))}void 0!==n&&0===n.VoiceEntries.length&&(this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[t]=void 0)}for(let e=this.currentMeasure.VerticalSourceStaffEntryContainers.length-1;e>=0;e--){let t=0;for(let n=0,i=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length;nt){if(!this.musicSheet.Title){const e=a.attribute("font-size").value,t=parseFloat(e);o0&&t.MidiInstrumentId!==MidiInstrument.Percussion&&(n.midiInstrumentID=Math.max(0,parseInt(r.value,10)-1));else if("midi-unpitched"===r.name)n.fixedKey=Math.max(0,parseInt(r.value,10));else if("volume"===r.name)try{const e=parseFloat(r.value);n.volume=e/127}catch(o){loglevelExports.debug("ExpressionReader.readExpressionParameters","read volume",o)}else if("pan"===r.name)try{const e=parseFloat(r.value);n.pan=e/64}catch(o){loglevelExports.debug("ExpressionReader.readExpressionParameters","read pan",o)}}catch(o){loglevelExports.info("MusicSheetReader.createInstrumentGroups midi settings: ",o)}}}}catch(o){loglevelExports.info("MusicSheetReader.createInstrumentGroups: ",o)}}if(0===t.SubInstruments.length){const e=new SubInstrument(t);t.SubInstruments.push(e)}i[e]=t,r?(r.InstrumentalGroups.push(t),this.musicSheet.Instruments.push(t)):(this.musicSheet.InstrumentalGroups.push(t),this.musicSheet.Instruments.push(t))}else if("part-group"===s.name&&"start"===s.attribute("type").value){const e=new InstrumentalGroup("group",this.musicSheet,r);r?r.InstrumentalGroups.push(e):this.musicSheet.InstrumentalGroups.push(e),r=e}else if("part-group"===s.name&&"stop"===s.attribute("type").value&&r){if(1===r.InstrumentalGroups.length){const e=r.InstrumentalGroups[0];r.Parent?(r.Parent.InstrumentalGroups.push(e),this._removeFromArray(r.Parent.InstrumentalGroups,r)):(this.musicSheet.InstrumentalGroups.push(e),this._removeFromArray(this.musicSheet.InstrumentalGroups,r))}r=r.Parent}}}catch(e){const n=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading Instruments");throw new MusicSheetReadingException(n,e)}for(let e=0,s=this.musicSheet.Instruments.length;e0){const n=e[0];if(n){let e=n.element("attributes");e&&(e=e.element("staves")),e?t+=parseInt(e.value,10):t++}}}if(isNaN(t)||t<=0){const e=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of staves.");throw new MusicSheetReadingException(e)}return t}getInstrumentNumberOfStavesFromXml(e){let t=0;const n=e.element("measure");if(n){const e=n.element("attributes");let i;e&&(i=e.element("staves")),t=e&&i?parseInt(i.value,10):1}if(isNaN(t)||t<=0){const e=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of Staves.");throw new MusicSheetReadingException(e)}return t}}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jszip_minExports={},jszip_min={get exports(){return jszip_minExports},set exports(e){jszip_minExports=e}}; /*! JSZip v3.7.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE */ !function(e,t){e.exports=function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof commonjsRequire&&commonjsRequire;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return r(t[s][1][e]||e)}),u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof commonjsRequire&&commonjsRequire,s=0;s>2,a=(3&t)<<4|n>>4,l=1>6:64,c=2>4,n=(15&s)<<4|(a=o.indexOf(e.charAt(c++)))>>2,i=(3&a)<<6|(l=o.indexOf(e.charAt(c++))),d[u++]=t,64!==a&&(d[u++]=n),64!==l&&(d[u++]=i);return d}},{"./support":30,"./utils":32}],2:[function(e,t,n){var i=e("./external"),r=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,n,i,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=i,this.compressedContent=r}a.prototype={getContentWorker:function(){var e=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var i=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(e){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var i=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==i.getTypeOf(e)?function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var i=null;i="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:i}},{lie:37}],7:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=i?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function i(e,t){var n,i="";for(n=0;n>>=8;return i}function r(e,t,n,r,s,u){var h,d,p=e.file,f=e.compression,m=u!==a.utf8encode,g=o.transformTo("string",u(p.name)),v=o.transformTo("string",a.utf8encode(p.name)),b=p.comment,A=o.transformTo("string",u(b)),y=o.transformTo("string",a.utf8encode(b)),S=v.length!==p.name.length,x=y.length!==b.length,w="",E="",_="",M=p.dir,P=p.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var C=0;t&&(C|=8),m||!S&&!x||(C|=2048);var I=0,k=0;M&&(I|=16),"UNIX"===s?(k=798,I|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,M)):(k=20,I|=function(e){return 63&(e||0)}(p.dosPermissions)),h=P.getUTCHours(),h<<=6,h|=P.getUTCMinutes(),h<<=5,h|=P.getUTCSeconds()/2,d=P.getUTCFullYear()-1980,d<<=4,d|=P.getUTCMonth()+1,d<<=5,d|=P.getUTCDate(),S&&(E=i(1,1)+i(l(g),4)+v,w+="up"+i(E.length,2)+E),x&&(_=i(1,1)+i(l(A),4)+y,w+="uc"+i(_.length,2)+_);var B="";return B+="\n\0",B+=i(C,2),B+=f.magic,B+=i(h,2),B+=i(d,2),B+=i(T.crc32,4),B+=i(T.compressedSize,4),B+=i(T.uncompressedSize,4),B+=i(g.length,2),B+=i(w.length,2),{fileRecord:c.LOCAL_FILE_HEADER+B+g+w,dirRecord:c.CENTRAL_FILE_HEADER+i(k,2)+B+i(A.length,2)+"\0\0\0\0"+i(I,4)+i(r,4)+g+w+A}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,s),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-i-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=r(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+i(e.crc32,4)+i(e.compressedSize,4)+i(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=r},{"../utils":32}],19:[function(e,t,n){var i=e("./Uint8ArrayReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var i=e("./DataReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var i=e("./ArrayReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var i=e("../utils"),r=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=i.getTypeOf(e);return i.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new a(e):r.uint8array?new l(i.transformTo("uint8array",e)):new o(i.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var i=e("./GenericWorker"),r=e("../utils");function o(e){i.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(o,i),o.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var i=e("./GenericWorker"),r=e("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,i),o.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var i=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}i.inherits(o,r),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var i=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}i.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function i(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=i},{}],29:[function(e,t,n){var i=e("../utils"),r=e("./ConvertWorker"),o=e("./GenericWorker"),s=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function u(e,t){return new l.Promise((function(n,r){var o=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],r(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return s.encode(t);default:return i.transformTo(e,t)}}(l,function(e,t){var n,i=0,r=null,o=0;for(n=0;n>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t}(e)},n.utf8decode=function(e){return r.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,o,s=e.length,l=new Array(2*s);for(t=n=0;t>10&1023,l[n++]=56320|1023&r)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(e=i.transformTo(r.uint8array?"uint8array":"array",e))},i.inherits(c,s),c.prototype.processChunk=function(e){var t=i.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}(t),l=t;s!==t.length&&(r.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(u,s),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var i=e("./support"),r=e("./base64"),o=e("./nodejsUtils"),s=e("set-immediate-shim"),a=e("./external");function l(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,i,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,s=r+n;e^=-1;for(var a=r;a>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,n){var i,r=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=0,u=4,h=0,d=-2,p=-1,f=4,m=2,g=8,v=9,b=286,A=30,y=19,S=2*b+1,x=15,w=3,E=258,_=E+w+1,M=42,P=113,T=1,C=2,I=3,k=4;function B(e,t){return e.msg=l[t],t}function R(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function F(e,t){e.pending_buf[e.pending++]=t}function O(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function V(e,t){var n,i,r=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-_?e.strstart-(e.w_size-_):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+E,p=c[o+s-1],f=c[o+s];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(n=t)+s]===f&&c[n+s-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--r);return s<=e.lookahead?s:e.lookahead}function z(e){var t,n,i,o,l,c,u,h,d,p,f=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-_)){for(r.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;i=e.head[--t],e.head[t]=f<=i?i-f:0,--n;);for(t=n=f;i=e.prev[--t],e.prev[t]=f<=i?i-f:0,--n;);o+=f}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,p=void 0,(d=o)<(p=c.avail_in)&&(p=d),n=0===p?0:(c.avail_in-=p,r.arraySet(u,c.input,c.next_in,p,h),1===c.state.wrap?c.adler=s(c.adler,u,p,h):2===c.state.wrap&&(c.adler=a(c.adler,u,p,h)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=w)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=w&&(e.ins_h=(e.ins_h<=w)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-w),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=w){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=w&&(e.ins_h=(e.ins_h<=w&&e.match_length<=e.prev_length){for(r=e.strstart+e.lookahead-w,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-w),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=r&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(z(e),0===e.lookahead&&t===c)return T;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,D(e,!1),0===e.strm.avail_out))return T;if(e.strstart-e.block_start>=e.w_size-_&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?I:k):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),T)})),new H(4,4,8,4,G),new H(4,5,16,8,G),new H(4,6,32,32,G),new H(4,4,16,16,U),new H(8,16,32,32,U),new H(8,16,128,128,U),new H(8,32,128,256,U),new H(32,128,258,1024,U),new H(32,258,258,4096,U)],n.deflateInit=function(e,t){return W(e,t,g,15,8,0)},n.deflateInit2=W,n.deflateReset=Y,n.deflateResetKeep=Q,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,h):d},n.deflate=function(e,t){var n,r,s,l;if(!e||!e.state||5>8&255),F(r,r.gzhead.time>>16&255),F(r,r.gzhead.time>>24&255),F(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),F(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(F(r,255&r.gzhead.extra.length),F(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=a(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(F(r,0),F(r,0),F(r,0),F(r,0),F(r,0),F(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),F(r,3),r.status=P);else{var p=g+(r.w_bits-8<<4)<<8;p|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(p|=32),p+=31-p%31,r.status=P,O(r,p),0!==r.strstart&&(O(r,e.adler>>>16),O(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),N(e),s=r.pending,r.pending!==r.pending_buf_size));)F(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),N(e),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexs&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),N(e),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexs&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&N(e),r.pending+2<=r.pending_buf_size&&(F(r,255&e.adler),F(r,e.adler>>8&255),e.adler=0,r.status=P)):r.status=P),0!==r.pending){if(N(e),0===e.avail_out)return r.last_flush=-1,h}else if(0===e.avail_in&&R(t)<=R(n)&&t!==u)return B(e,-5);if(666===r.status&&0!==e.avail_in)return B(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==c&&666!==r.status){var f=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(z(e),0===e.lookahead)){if(t===c)return T;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?I:k):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:C}(r,t):3===r.strategy?function(e,t){for(var n,i,r,s,a=e.window;;){if(e.lookahead<=E){if(z(e),e.lookahead<=E&&t===c)return T;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=w&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=w?(n=o._tr_tally(e,1,e.match_length-w),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(D(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?I:k):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?T:C}(r,t):i[r.level].func(r,t);if(f!==I&&f!==k||(r.status=666),f===T||f===I)return 0===e.avail_out&&(r.last_flush=-1),h;if(f===C&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(L(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),N(e),0===e.avail_out))return r.last_flush=-1,h}return t!==u?h:r.wrap<=0?1:(2===r.wrap?(F(r,255&e.adler),F(r,e.adler>>8&255),F(r,e.adler>>16&255),F(r,e.adler>>24&255),F(r,255&e.total_in),F(r,e.total_in>>8&255),F(r,e.total_in>>16&255),F(r,e.total_in>>24&255)):(O(r,e.adler>>>16),O(r,65535&e.adler)),N(e),0=n.w_size&&(0===a&&(L(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new r.Buf8(n.w_size),r.arraySet(p,t,f-n.w_size,n.w_size,0),t=p,f=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,z(n);n.lookahead>=w;){for(i=n.strstart,o=n.lookahead-(w-1);n.ins_h=(n.ins_h<>>=y=A>>>24,f-=y,0==(y=A>>>16&255))M[o++]=65535&A;else{if(!(16&y)){if(0==(64&y)){A=m[(65535&A)+(p&(1<>>=y,f-=y),f<15&&(p+=_[i++]<>>=y=A>>>24,f-=y,!(16&(y=A>>>16&255))){if(0==(64&y)){A=g[(65535&A)+(p&(1<>>=y,f-=y,(y=o-s)>3,p&=(1<<(f-=S<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=d,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(p),t.distcode=t.distdyn=new i.Buf32(f),t.sane=1,t.back=-1,u):h}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):h}function A(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(i.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r<(o=s.wsize-s.wnext)&&(o=r),i.arraySet(s.window,t,n-r,o,s.wnext),(r-=o)?(i.arraySet(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=o(n.check,z,2,0),S=y=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&y)){e.msg="unknown compression method",n.mode=30;break}if(S-=4,N=8+(15&(y>>>=4)),0===n.wbits)n.wbits=N;else if(N>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(z[0]=255&y,z[1]=y>>>8&255,n.check=o(n.check,z,2,0)),S=y=0,n.mode=3;case 3:for(;S<32;){if(0===b)break e;b--,y+=p[g++]<>>8&255,z[2]=y>>>16&255,z[3]=y>>>24&255,n.check=o(n.check,z,4,0)),S=y=0,n.mode=4;case 4:for(;S<16;){if(0===b)break e;b--,y+=p[g++]<>8),512&n.flags&&(z[0]=255&y,z[1]=y>>>8&255,n.check=o(n.check,z,2,0)),S=y=0,n.mode=5;case 5:if(1024&n.flags){for(;S<16;){if(0===b)break e;b--,y+=p[g++]<>>8&255,n.check=o(n.check,z,2,0)),S=y=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(M=n.length)&&(M=b),M&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,p,g,M,N)),512&n.flags&&(n.check=o(n.check,p,M,g)),b-=M,g+=M,n.length-=M),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break e;for(M=0;N=p[g+M++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N)),N&&M>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;S<32;){if(0===b)break e;b--,y+=p[g++]<>>=7&S,S-=7&S,n.mode=27;break}for(;S<3;){if(0===b)break e;b--,y+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(E(n),n.mode=20,6!==t)break;y>>>=2,S-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}y>>>=2,S-=2;break;case 14:for(y>>>=7&S,S-=7&S;S<32;){if(0===b)break e;b--,y+=p[g++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&y,S=y=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(M=n.length){if(b>>=5,S-=5,n.ndist=1+(31&y),y>>>=5,S-=5,n.ncode=4+(15&y),y>>>=4,S-=4,286>>=3,S-=3}for(;n.have<19;)n.lens[G[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},D=a(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,D){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,k=65535&V,!((C=V>>>24)<=S);){if(0===b)break e;b--,y+=p[g++]<>>=C,S-=C,n.lens[n.have++]=k;else{if(16===k){for(O=C+2;S>>=C,S-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}N=n.lens[n.have-1],M=3+(3&y),y>>>=2,S-=2}else if(17===k){for(O=C+3;S>>=C)),y>>>=3,S-=3}else{for(O=C+7;S>>=C)),y>>>=7,S-=7}if(n.have+M>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;M--;)n.lens[n.have++]=N}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,F={bits:n.lenbits},D=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,D){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},D=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,D){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=b&&258<=A){e.next_out=v,e.avail_out=A,e.next_in=g,e.avail_in=b,n.hold=y,n.bits=S,s(e,w),v=e.next_out,f=e.output,A=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,y=n.hold,S=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(V=n.lencode[y&(1<>>16&255,k=65535&V,!((C=V>>>24)<=S);){if(0===b)break e;b--,y+=p[g++]<>B)])>>>16&255,k=65535&V,!(B+(C=V>>>24)<=S);){if(0===b)break e;b--,y+=p[g++]<>>=B,S-=B,n.back+=B}if(y>>>=C,S-=C,n.back+=C,n.length=k,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(O=n.extra;S>>=n.extra,S-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(V=n.distcode[y&(1<>>16&255,k=65535&V,!((C=V>>>24)<=S);){if(0===b)break e;b--,y+=p[g++]<>B)])>>>16&255,k=65535&V,!(B+(C=V>>>24)<=S);){if(0===b)break e;b--,y+=p[g++]<>>=B,S-=B,n.back+=B}if(y>>>=C,S-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=k,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(O=n.extra;S>>=n.extra,S-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===A)break e;if(M=w-A,n.offset>M){if((M=n.offset-M)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}P=M>n.wnext?(M-=n.wnext,n.wsize-M):n.wnext-M,M>n.length&&(M=n.length),T=n.window}else T=f,P=v-n.offset,M=n.length;for(Ab?(y=F[O+h[E]],R[L+h[E]]):(y=96,0),p=1<>C)+(f-=p)]=A<<24|y<<16|S|0,0!==f;);for(p=1<>=1;if(0!==p?(B&=p-1,B+=p):B=0,E++,0==--N[w]){if(w===M)break;w=t[n+h[E]]}if(P>>7)]}function F(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>m-n?(e.bi_buf|=t<>m-e.bi_valid,e.bi_valid+=n-m):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function G(e,t,n){var i,r,o=new Array(f+1),s=0;for(i=1;i<=f;i++)o[i]=s=s+n[i-1]<<1;for(r=0;r<=t;r++){var a=e[2*r+1];0!==a&&(e[2*r]=z(o[a]++,a))}}function U(e){var t;for(t=0;t>1;1<=n;n--)Q(e,o,n);for(r=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Q(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,Q(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,s,a,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,v=0;for(o=0;o<=f;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;i>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=s&&(s=a)):s=a=n+5,n+4<=s&&-1!==t?J(e,t,n,i):4===e.strategy||a===s?(O(e,2+(i?1:0),3),Y(e,_,M)):(O(e,4+(i?1:0),3),function(e,t,n,i){var r;for(O(e,t-257,5),O(e,n-1,5),O(e,i-4,4),r=0;r>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(T[n]+c+1)]++,e.dyn_dtree[2*D(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){O(e,2,3),V(e,v,_),function(e){16===e.bi_valid?(F(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)}(jszip_min);class MXLHelper{static MXLtoIXmlElement(e){const t=new jszip_minExports;return t.loadAsync(e).then((e=>t.file("META-INF/container.xml").async("text")),(e=>{throw e})).then((e=>{const n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return t.file(n).async("text")}),(e=>{throw e})).then((e=>{const t=(new DOMParser).parseFromString(e,"text/xml"),n=new IXmlElement(t.documentElement);return Promise.resolve(n)}),(e=>{throw e})).then((e=>e),(e=>{throw new Error("extractSheetFromMxl: "+e.message)}))}static MXLtoXMLstring(e){const t=new jszip_minExports;return t.loadAsync(e).then((e=>t.file("META-INF/container.xml").async("text")),(e=>{throw loglevelExports.error(e),e})).then((e=>{const n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return t.file(n).async("text")}),(e=>{throw e}))}}class PlaybackNoteGenerator{calculate(e){const t=new MusicPartManagerIterator(e);for(;!t.EndReached;){const n=t.CurrentEnrolledTimestamp,i=t.CurrentAudibleVoiceEntries();for(const t of i)this.handleVoiceEntry(e,t,n);t.moveToNext()}}handleVoiceEntry(e,t,n){if(t.IsGrace)return;const i=t.ParentVoice;let r;e.PlaybackDataDict.containsKey(i)?r=e.PlaybackDataDict.getValue(i):(r=[],e.PlaybackDataDict.setValue(i,r));for(const o of t.PlaybackEntries)if(o.HasNotes){for(const t of o.Notes)t.setLength();const e=Fraction$1.plus(n,o.TimestampShift);PlaybackNoteGenerator.addEntrySorted(r,o,e)}}static addEntrySorted(e,t,n){if(0===e.length)e.push({enrolledTimestamp:n,playbackEntry:t});else for(let i=e.length-1;i>=0;i--){const r=e[i];if(n.RealValue>r.enrolledTimestamp.RealValue){if(i===e.length-1){e.push({enrolledTimestamp:n,playbackEntry:t});break}e.splice(i+1,0,{enrolledTimestamp:n,playbackEntry:t});break}}}}class ScreenViewingRegion{constructor(e,t,n,i){this.psi=new BoundingBox$1(void 0),this.displaySizeInPixel=e,this.RelativeDisplaySize=t,this.RelativeDisplayPosition=n,this.WidthInUnits=i}static createWithRelativeDefaults(e,t){return new ScreenViewingRegion(e,new SizeF2D(1,1),new PointF2D(0,0),t)}static createWithDefaults(){return new ScreenViewingRegion(new SizeF2D(1,1),new SizeF2D(1,1),new PointF2D(0,0),1)}get UpperLeftPositionInUnits(){return this.psi.AbsolutePosition}set UpperLeftPositionInUnits(e){this.psi.AbsolutePosition=e}get DisplaySizeInPixel(){return this.displaySizeInPixel}set DisplaySizeInPixel(e){this.displaySizeInPixel=e,this.regionSizeInPixel=new SizeF2D(this.displaySizeInPixel.width*this.relativeRegionSize.width,this.displaySizeInPixel.height*this.relativeRegionSize.height),this.recalculateDependentVariables()}get RelativeDisplaySize(){return this.relativeRegionSize}set RelativeDisplaySize(e){this.relativeRegionSize=e,this.regionSizeInPixel=new SizeF2D(this.displaySizeInPixel.width*this.relativeRegionSize.width,this.displaySizeInPixel.height*this.relativeRegionSize.height),this.recalculateDependentVariables()}get RegionSizeInPixel(){return this.regionSizeInPixel}get WidthInUnits(){return this.psi.BorderRight}set WidthInUnits(e){this.psi.BorderRight=e,this.recalculateDependentVariables()}get ViewRegionInUnits(){return new SizeF2D(this.psi.BorderRight,this.psi.BorderBottom)}isVisible(e,t){const n=this.psi.collisionDetection(e);return this.psi.liesInsideBorders(e),n}isInsideDisplayArea(e,t){return this.RelativeDisplayPosition.x<=e&&e<=this.RelativeDisplayPosition.x+this.RelativeDisplaySize.width&&this.RelativeDisplayPosition.y<=t&&t<=this.RelativeDisplayPosition.y+this.RelativeDisplaySize.height}transformToUnitCoordinates(e){return new PointF2D(this.UpperLeftPositionInUnits.x+this.ViewRegionInUnits.width*((e.x-this.RelativeDisplayPosition.x)/this.RelativeDisplaySize.width),this.UpperLeftPositionInUnits.y+this.ViewRegionInUnits.height*((e.y-this.RelativeDisplayPosition.y)/this.RelativeDisplaySize.height))}transformLengthXToUnitCoordinates(e){return e/this.horizontalUnitToPixelRatio}transformLengthYToUnitCoordinates(e){return e/this.verticalUnitToPixelRatio}recalculateDependentVariables(){const e=this.regionSizeInPixel.width/this.regionSizeInPixel.height;this.psi.BorderBottom=this.psi.BorderRight/e,this.horizontalUnitToPixelRatio=this.regionSizeInPixel.width/this.ViewRegionInUnits.width,this.verticalUnitToPixelRatio=this.regionSizeInPixel.height/this.ViewRegionInUnits.height}}class AbstractZoomView{constructor(e){this.aspectRatio=1,this.zoomViews=[],this.mouseZoomMode=!1,this.autoScrollY=!0,this.displayInteractionManager=e,this.displayInteractionManager.addListener(this),this.offsetXMin=Number.MIN_VALUE,this.offsetYMin=Number.MIN_VALUE,this.rangeXMin=1,this.rangeYMin=1,this.offsetXMax=Number.MAX_VALUE,this.offsetYMax=Number.MAX_VALUE,this.rangeXMax=1e9,this.rangeYMax=1e9,this.XScrollingEnabled=!1,this.YScrollingEnabled=!0}positionTouched(e,t){if(!this.convertToUnitsReady())return;const n=this.getPositionInUnits(e,t);this.unitPosTouched(n,e,t)}get TouchActive(){return this.displayInteractionManager.TouchActive}get TouchMoving(){return this.displayInteractionManager.TouchMoving}positionDoubleTouched(e,t){if(!this.convertToUnitsReady())return;const n=this.getPositionInUnits(e,t);this.unitPosDoubleTouched(n,e,t)}get UsesManuallyControlledZoomMode(){return this.usesManuallyControlledZoomMode}set UsesManuallyControlledZoomMode(e){this.usesManuallyControlledZoomMode=e}mouseDown(e,t,n=!1){if(!this.convertToUnitsReady())return;this.selectScrollControllerY(!1),this.lastRangeX=Math.max(1,this.RangeX),this.lastRangeY=Math.max(1,this.RangeY),this.lastOffsetX=this.OffsetX,this.lastOffsetY=this.OffsetY;const i=this.getPositionInUnits(e,t);this.unitPosTouchDown(i,e,t),this.usesManuallyControlledZoomMode||(this.mouseZoomMode=!!n)}mouseUp(e,t){const n=this.getPositionInUnits(e,t);this.unitPosTouchUp(n,e,t)}mouseMove(e,t,n,i){this.mouseZoomMode?(Math.abs(n-0)>1e-8&&(this.RangeX=Math.abs(this.lastRangeX/(1+n))),!this.lockRanges&&Math.abs(i-0)>1e-8&&(this.RangeY=Math.abs(this.lastRangeY/(1-i)))):(Math.abs(n-0)>1e-8&&(this.OffsetX=this.lastOffsetX-n*this.RangeX),Math.abs(i-0)>1e-8&&(this.OffsetY=this.lastOffsetY-i*this.RangeY));const r=this.getPositionInUnits(e,t);this.unitPosMove(r,e,t)}zoom(e){this.RangeX=Math.abs(this.lastRangeX/e)}addZoomView(e){this.zoomViews.push(e)}get OffsetX(){return this.offsetX}set OffsetX(e){this.offsetX=Math.min(this.offsetXMax,Math.max(this.offsetXMin,e));for(const t of this.zoomViews)t.viewportXChanged(this.offsetX,this.RangeX)}get OffsetY(){return this.offsetY}set OffsetY(e){this.offsetY=e,this.offsetY>this.offsetYMax?this.offsetY=this.offsetYMax:this.offsetY(e[e.SingleTouch=0]="SingleTouch",e[e.DoubleTouch=1]="DoubleTouch",e[e.TouchUp=2]="TouchUp",e[e.TouchDown=3]="TouchDown",e[e.Move=4]="Move",e))(InteractionType||{});class VoiceEntryInteractionListener{constructor(e){this.renderingManager=e}userDisplayInteraction(e,t,n){switch(n){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:{const e=this.renderingManager.GraphicalMusicSheet.GetNearestVoiceEntry(t);var i,r;if(e)if(void 0!==e.parentStaffEntry.parentVerticalContainer)if(void 0!==(null===(i=e.notes[0])||void 0===i?void 0:i.sourceNote.Pitch))null===(r=this.renderingManager.PlaybackManager)||void 0===r||r.playVoiceEntry(e.parentVoiceEntry);break}}}}class SheetRenderingManager extends AbstractZoomView{constructor(e,t){super(e),this.mainViewingRegion=ScreenViewingRegion.createWithDefaults(),this.tryAgainToRenderCount=0,this.yOffsetMouseDown=Number.MIN_VALUE,this.unlockCursorDistancePixel=50,this.relativeTopPosition=.06,this.internalPreviewImageScale=3,this.listeners=[],this.LockDisplayToCursor=!0,this.ZoomActive=!1,this.rules=t,this.addZoomView(this),this.lockRanges=!0,this.TopBarHeightInPixel=70,this.BottomBarHeightInPixel=0,this.rules.UseDefaultVoiceInteractionListener&&this.listeners.push(new VoiceEntryInteractionListener(this))}addListener(e){this.listeners.push(e)}get Listeners(){return this.listeners}convertToUnitsReady(){return void 0!==this.graphicalMusicSheet}unitPosTouched(e,t,n){if(!this.SingleTouchDisabled){const i=new PointF2D(t,n);this.handleUserDisplayInteraction(i,e,InteractionType.SingleTouch)}}unitPosDoubleTouched(e,t,n){if(!this.DoubleTouchDisabled){const i=new PointF2D(t,n);this.handleUserDisplayInteraction(i,e,InteractionType.DoubleTouch)}}unitPosTouchDown(e,t,n){const i=new PointF2D(t,n);this.handleUserDisplayInteraction(i,e,InteractionType.TouchDown),this.yOffsetMouseDown=e.y}unitPosTouchUp(e,t,n){const i=new PointF2D(t,n);this.handleUserDisplayInteraction(i,e,InteractionType.TouchUp),!1===this.displayInteractionManager.WasZoomGestureActive&&this.unlockFromCursorIfNecessary(e),this.yOffsetMouseDown=Number.MIN_VALUE}unitPosMove(e,t,n){const i=new PointF2D(t,n);this.handleUserDisplayInteraction(i,e,InteractionType.Move),this.unlockFromCursorIfNecessary(e)}get MainViewingRegion(){return this.mainViewingRegion}setMusicSheet(e){this.graphicalMusicSheet=e,this.adaptDisplayLimitsToSheet(),this.setYOffset(0,!0)}viewportXChanged(e,t){void 0!==this.graphicalMusicSheet&&this.horizontalViewportChanged(e,t)}viewportYChanged(e,t){void 0!==this.graphicalMusicSheet&&(this.yOffsetMouseDown<=Number.MIN_VALUE+.5&&(this.yOffsetMouseDown=e),this.verticalViewportChanged(e,t))}displaySizeChanged(e,t){super.viewSizeChanged(e,t),Math.abs(e-0)<1e-7||Math.abs(t-0)<1e-7||(void 0!==this.graphicalMusicSheet&&this.graphicalMusicSheet.EnforceRedrawOfMusicSystems(),this.mainViewingRegion.DisplaySizeInPixel=new SizeF2D(e,t),this.adaptDisplayLimitsToSheet())}calcDisplayYPosition(e){return e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderMarginTop-this.topBarHeightInUnits()-this.relativeTopPosition*this.heightWithoutTopBottomBarsInUnits()}yPositionForLastSystem(e){return e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderMarginBottom-this.topBarHeightInUnits()-(1-this.relativeTopPosition)*this.heightWithoutTopBottomBarsInUnits()}scorePositionChanged(e,t,n,i,r,o){const s=this.calcDisplayYPosition(i);this.setYPosition(s,o)}setXPosition(e,t){this.LockDisplayToCursor&&this.setXOffset(e,t)}setYPosition(e,t){this.LockDisplayToCursor&&this.setYOffset(e,t)}get DrawingParameters(){return this.musicSheetDrawer.drawingParameters}topBarHeightInUnits(){return this.mainViewingRegion.transformLengthYToUnitCoordinates(this.TopBarHeightInPixel)}bottomBarHeightInUnits(){return this.mainViewingRegion.transformLengthYToUnitCoordinates(this.BottomBarHeightInPixel)}heightWithoutTopBottomBarsInUnits(){return this.mainViewingRegion.ViewRegionInUnits.height-this.topBarHeightInUnits()-this.bottomBarHeightInUnits()}activePositionToBottomBarHeight(){return(this.mainViewingRegion.ViewRegionInUnits.height-this.topBarHeightInUnits()-this.bottomBarHeightInUnits())*(1-2*this.relativeTopPosition)}getClickPosition(e,t){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,t))}graphicalObjectIsVisible(e){return this.mainViewingRegion.isVisible(e,!1)}adaptDisplayLimitsToSheet(){if(void 0===this.graphicalMusicSheet||0===this.graphicalMusicSheet.MusicPages.length||0===this.graphicalMusicSheet.MusicPages[0].MusicSystems.length)return;this.offsetXMin=0,this.rangeXMin=this.graphicalMusicSheet.MinAllowedSystemWidth,this.rangeXMax=300,this.offsetYMin=-.3*this.RangeY;const e=this.graphicalMusicSheet.MusicPages.last().PositionAndShape;this.offsetYMax=Math.max(0,e.BorderMarginBottom-.7*this.RangeY),this.OffsetY>this.offsetYMax&&this.setYOffset(this.offsetYMax,!0)}horizontalViewportChanged(e,t){this.mainViewingRegion.WidthInUnits!==t&&(this.mainViewingRegion.WidthInUnits=t)}verticalViewportChanged(e,t){this.mainViewingRegion.UpperLeftPositionInUnits=new PointF2D(this.mainViewingRegion.UpperLeftPositionInUnits.x,e)}unlockFromCursorIfNecessary(e){if(!1===this.LockDisplayToCursor||this.ZoomActive)return;if(this.displayInteractionManager.ZoomGestureActive||this.displayInteractionManager.WasZoomGestureActive)return;Math.abs((e.y-this.yOffsetMouseDown)*this.mainViewingRegion.RegionSizeInPixel.height/this.mainViewingRegion.ViewRegionInUnits.height)>this.unlockCursorDistancePixel&&(this.LockDisplayToCursor=!1)}getPositionInUnits(e,t){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,t))}handleUserDisplayInteraction(e,t,n){switch(n){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:{const e=this.graphicalMusicSheet.GetNearestVoiceEntry(t);if(e){const t=new CustomEvent("note-click",{detail:{...e,setAvtivePlay:()=>{if(void 0!==e.parentStaffEntry.parentVerticalContainer){var t;const i=e.parentStaffEntry.parentVerticalContainer.AbsoluteTimestamp;var n;if(this.setStartPosition(i),void 0!==(null===(t=e.notes[0])||void 0===t?void 0:t.sourceNote.Pitch))console.log("playback clicked note",e.parentVoiceEntry),null===(n=this.PlaybackManager)||void 0===n||n.playVoiceEntry(e.parentVoiceEntry)}}}});window.dispatchEvent(t)}}case InteractionType.TouchUp:case InteractionType.TouchDown:case InteractionType.Move:for(const i of this.listeners)i.userDisplayInteraction(e,t,n);break;default:throw new Error("type")}}setStartPosition(e){var t;void 0!==this.graphicalMusicSheet&&(this.graphicalMusicSheet.ParentMusicSheet.SelectionStart=e,null===(t=this.PlaybackManager)||void 0===t||t.reset())}get GraphicalMusicSheet(){return this.graphicalMusicSheet}}class WebSheetRenderingManager extends SheetRenderingManager{mouseMove(e,t,n,i){const r=this.getPositionInUnits(e,t);this.unitPosMove(r,e,t)}}class AbstractDisplayInteractionManager{constructor(){this.listeners=[],this.zoomGestureActive=!1,this.touchCount=0,this.touchActive=!1,this.touchMoving=!1,this.displayWidth=1,this.displayHeight=1,this.displayDpi=96,this.maxNumerOfFingers=2,this.movementThreshInch=.075,this.interactionWasZoomGesture=!1}addListener(e){this.listeners.push(e)}get ZoomGestureActive(){return this.zoomGestureActive}get WasZoomGestureActive(){return this.interactionWasZoomGesture}displaySizeChanged(e,t){this.displayWidth=e,this.displayHeight=t;for(const n of this.listeners)n.displaySizeChanged(this.displayWidth,this.displayHeight)}Dispose(){this.dispose()}Initialize(){this.initialize()}get DisplayDpi(){return this.displayDpi}get TouchActive(){return this.touchActive}get TouchMoving(){return this.touchMoving}touchDown(e,t,n){this.interactionWasZoomGesture=!1;const i=e/this.displayWidth,r=t/this.displayHeight;this.lastRelPosX=i,this.lastRelPosY=r,this.lastPixelX=e,this.lastPixelY=t,this.touchActive=!0,this.touchMoving=!1,this.touchCount=Math.min(this.touchCount+1,this.maxNumerOfFingers);for(const o of this.listeners)o.mouseDown(i,r,!n)}move(e,t){if(this.touchActive&&!this.zoomGestureActive){const n=e/this.displayWidth,i=t/this.displayHeight,r=n-this.lastRelPosX,o=i-this.lastRelPosY;this.touchMoving=!0;for(const e of this.listeners)e.mouseMove(n,i,r,o)}}zoomGestureStarted(){this.zoomGestureActive=!0}zoomGestureCompleted(){this.zoomGestureActive=!1,this.interactionWasZoomGesture=!0}zoomGestureMove(e){this.zoomGestureActive&&this.listeners.forEach((function(t){t.zoom(e)}))}touchUp(e,t){this.touchActive=!1,this.touchMoving=!1,this.touchCount=Math.max(0,this.touchCount-1);const n=e/this.displayWidth,i=t/this.displayHeight;for(const r of this.listeners)r.mouseUp(n,i)}click(e,t){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,t)&&!this.ZoomGestureActive){const n=e/this.displayWidth,i=t/this.displayHeight;for(const e of this.listeners)e.positionTouched(n,i)}}doubleClick(e,t){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,t)&&!this.ZoomGestureActive){const n=e/this.displayWidth,i=t/this.displayHeight;for(const e of this.listeners)e.positionDoubleTouched(n,i)}}mouseDidMove(e,t,n,i){const r=Math.abs(e-t)/this.displayDpi,o=Math.abs(n-i)/this.displayDpi;return r>this.movementThreshInch||o>this.movementThreshInch}}class WebDisplayInteractionManager extends AbstractDisplayInteractionManager{constructor(e){super(),this.fullOffsetLeft=0,this.fullOffsetTop=0,this.fullScrollTop=0,this.fullScrollLeft=0,this.parentScrollMap=new Map,this.scrollCallbackMap=new Map,this.timeout=void 0,this.resizeObserver=void 0,this.EventCallbackMap=new Dictionary,this.DOUBLE_CLICK_WINDOW=200,this.lastClick=0,this.osmdSheetMusicContainer=e,this.listenForInteractions()}get FullOffsetTop(){return this.fullOffsetTop}get FullScrollTop(){return this.fullScrollTop}get FullOffsetLeft(){return this.fullOffsetLeft}get FullScrollLeft(){return this.fullScrollLeft}static resizeCallback(e,t){clearTimeout(t.timeout),t.timeout=setTimeout((()=>{t.fullOffsetLeft=0,t.fullOffsetTop=0;let e=t.osmdSheetMusicContainer;for(;e;)t.fullOffsetLeft+=e.offsetLeft,t.fullOffsetTop+=e.offsetTop,e=e.offsetParent;t.resizeEventListener(),t.deregisterScrollOffsets(),t.registerScrollOffsets()}),500)}registerScrollOffsets(){let e=this.osmdSheetMusicContainer;this.fullScrollTop=0,this.fullScrollLeft=0;const t=this;for(;e&&e!==document.documentElement;){if(this.parentScrollMap.set(e,[e.scrollTop,e.scrollLeft]),this.fullScrollLeft+=e.scrollLeft,this.fullScrollTop+=e.scrollTop,e.scrollHeight>e.clientHeight){const n=function(e){const n=t.parentScrollMap.get(this),i=n[0],r=n[1];t.fullScrollTop=t.fullScrollTop-i+this.scrollTop,t.fullScrollLeft=t.fullScrollLeft-r+this.scrollLeft,t.parentScrollMap.set(this,[this.scrollTop,this.scrollLeft])};this.scrollCallbackMap.set(e,n),e.addEventListener("scroll",n)}e=e.parentElement}}deregisterScrollOffsets(){for(const e of this.scrollCallbackMap.keys())e.removeEventListener("scroll",this.scrollCallbackMap.get(e));this.scrollCallbackMap.clear()}initialize(){this.fullOffsetLeft=0,this.fullOffsetTop=0;let e=this.osmdSheetMusicContainer;const t=[],n=this;for(window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((e=>{WebDisplayInteractionManager.resizeCallback(e,n)})));e;)this.fullOffsetLeft+=e.offsetLeft,this.fullOffsetTop+=e.offsetTop,this.resizeObserver?this.resizeObserver.observe(e):t.push(e),e=e.offsetParent;if(this.resizeObserver)this.disposeResizeListener=()=>{n.resizeObserver.disconnect(),n.resizeObserver=void 0};else{let e=()=>{WebDisplayInteractionManager.resizeCallback(t,n)};window.addEventListener("resize",e),this.disposeResizeListener=()=>{window.removeEventListener("resize",e),e=void 0}}n.registerScrollOffsets()}dispose(){this.disposeResizeListener();for(const e of this.EventCallbackMap.keys()){const t=this.EventCallbackMap.getValue(e);t[0].removeEventListener(e,t[1])}this.EventCallbackMap.clear(),this.deregisterScrollOffsets(),this.scrollCallbackMap.clear(),this.parentScrollMap.clear()}isTouch(){if("ontouchstart"in window||window.DocumentTouch)return!0;if(!window.matchMedia)return!1;const e=["(",["-webkit-","-moz-","-o-","-ms-"].join("touch-enabled),("),"heartz",")"].join("");return window.matchMedia(e).matches}get downEventName(){return this.isTouch()?"touchstart":"mousedown"}get moveEventName(){return this.isTouch()?"touchmove":"mousemove"}listenForInteractions(){const e=this.downEventListener.bind(this),t=this.touchEndEventListener.bind(this),n=this.moveEventListener.bind(this);this.osmdSheetMusicContainer.addEventListener("mousedown",e),this.osmdSheetMusicContainer.addEventListener("touchend",t),document.addEventListener(this.moveEventName,n),this.EventCallbackMap.setValue("mousedown",[this.osmdSheetMusicContainer,e]),this.EventCallbackMap.setValue("touchend",[this.osmdSheetMusicContainer,t]),this.EventCallbackMap.setValue(this.moveEventName,[document,n])}downEventListener(e){const t=(new Date).getTime(),n=t-this.lastClick;clearTimeout(this.clickTimeout);let i=0,r=0;this.isTouch()&&e instanceof TouchEvent?(i=e.touches[0].pageX,r=e.touches[0].pageY):e instanceof MouseEvent&&(i=e.pageX,r=e.pageY);const o=this.getOffsetCoordinates(i,r);if(n0)this.doubleClick(o.x,o.y);else{const e=this;this.clickTimeout=setTimeout((function(){clearTimeout(this.clickTimeout),e.isTouch()?e.touchDown(o.x,o.y,void 0):e.click(o.x,o.y)}),this.DOUBLE_CLICK_WINDOW)}this.lastClick=t}moveEventListener(e){let t=0,n=0;if(this.isTouch()&&e instanceof TouchEvent){var i,r;let o;e.touches&&e.touches.length>0?o=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(o=e.changedTouches[0]),t=null===(i=o)||void 0===i?void 0:i.clientX,n=null===(r=o)||void 0===r?void 0:r.clientY}else e instanceof MouseEvent&&(t=e.clientX,n=e.clientY);const o=this.getOffsetCoordinates(t,n);this.move(o.x,o.y)}touchEndEventListener(e){var t,n;let i;e.touches&&e.touches.length>0?i=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(i=e.changedTouches[0]);const r=this.getOffsetCoordinates(null===(t=i)||void 0===t?void 0:t.pageX,null===(n=i)||void 0===n?void 0:n.pageY);this.touchUp(r.x,r.y)}resizeEventListener(){this.displaySizeChanged(this.osmdSheetMusicContainer.clientWidth,this.osmdSheetMusicContainer.clientHeight)}getOffsetCoordinates(e,t){const n=e-this.fullOffsetLeft+this.fullScrollLeft,i=t-this.fullOffsetTop+this.fullScrollTop;return new PointF2D(n,i)}}class DynamicsCalculator{static fillDynamicsList(e,t,n){for(let i=0;i=0&&n[t].push(new DynamicsContainer(o.InstantaneousDynamic,t))}if(void 0!==o.StartingContinuousDynamic){n[i].push(new DynamicsContainer(o.StartingContinuousDynamic,o.StaffNumber));const t=this.getOtherStaffIndexIfLinkedStavesAreDetected(e,i,o.StartingContinuousDynamic.Placement);t>=0&&n[t].push(new DynamicsContainer(o.StartingContinuousDynamic,t))}}}}static getOtherStaffIndexIfLinkedStavesAreDetected(e,t,n){const i=e.getStaffFromIndex(t),r=i.ParentInstrument.Staves.indexOf(i),o=i.ParentInstrument.Staves.length;return o>1&&0===r&&n===PlacementEnum.Below?t+1:o>1&&1===r&&n===PlacementEnum.Above?t-1:-1}static fillDynamicExpressions(e){const t=e.DynListStaves,n=e.getCompleteNumberOfStaves(),i=e.TimestampSortedDynamicExpressionsList;for(let r=0;r{t(this.processStringXml(e))}),(e=>{loglevelExports.error(new Error("[OSMD] Invalid MXL file: "+e)),n(new Error("[OSMD] Invalid MXL file: "+e))}))}processStringXml(e){const t=new DOMParser;if(""===e.substr(0,3))return loglevelExports.debug("[OSMD] UTF with BOM detected, truncate first three bytes and pass along: "+e),t.parseFromString(e.substr(3),"application/xml");if(e.substr(0,6).includes("{n.isMxl(e)?n.processMxl(e,t,i):t(n.processStringXml(e))}),(e=>{throw i(e),e}));else{const e=new Error("[OSMD] osmd.load(string): Could not process string. Did not find {e.init(this.sheet.MusicPartManager,this.graphic)})),this.renderingManager.setMusicSheet(this.graphic),this.interactionManager.Initialize()}render(){var e;if(!this.graphic)throw new Error("OpenSheetMusicDisplay: Before rendering a music sheet, please load a MusicXML file");null===(e=this.drawer)||void 0===e||e.clear();let t=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(t=this.rules.SheetMaximumWidth),this.sheet.pageWidth=t/this.zoom/10,this.renderingManager.MainViewingRegion.WidthInUnits=this.sheet.pageWidth,this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?(this.rules.PageHeight=this.sheet.pageWidth/this.rules.PageFormat.aspectRatio,loglevelExports.debug("[OSMD] PageHeight: "+this.rules.PageHeight)):(loglevelExports.debug("[OSMD] endless/undefined pageformat, id: "+this.rules.PageFormat.idString),this.rules.PageHeight=100001),this.graphic.reCalculate(),this.drawingParameters.drawCursors&&(this.graphic.Cursors.length=0),this.createOrRefreshRenderBackend(),this.needBackendUpdate=!1,this.drawer.setZoom(this.zoom),this.drawer.drawSheet(this.graphic),this.enableOrDisableCursors(this.drawingParameters.drawCursors),this.drawingParameters.drawCursors&&this.cursors.forEach((e=>{e.update()})),this.zoomUpdated=!1,this.interactionManager.displaySizeChanged(this.container.clientWidth,this.container.clientHeight)}createOrRefreshRenderBackend(){this.drawer&&this.drawer.Backends&&(this.drawer.Backends[0]&&this.drawer.Backends[0].removeAllChildrenFromContainer(this.container),this.drawer.Backends.clear()),this.drawingParameters.Rules=this.rules,this.drawer=new VexFlowMusicSheetDrawer(this.drawingParameters),this.drawer.drawableBoundingBoxElement=this.DrawBoundingBox,this.drawer.bottomLineVisible=this.drawBottomLine,this.drawer.skyLineVisible=this.drawSkyLine;let e,t=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(t=10*this.graphic.MusicPages[0].PositionAndShape.Size.width*this.zoom);const n=32767;for(const i of this.graphic.MusicPages){if(i.PageNumber>this.rules.MaxPageToDrawNumber)break;const r=this.createBackend(this.backendType,i),o=" exceeds CanvasBackend limit of 32767. Cutting off score.";r.getOSMDBackendType()===BackendType.Canvas&&t>n&&(loglevelExports.warn("[OSMD] Warning: width of "+t+o),t=n),this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?e=t/this.rules.PageFormat.aspectRatio:(e=i.PositionAndShape.Size.height,e+=this.rules.PageBottomMargin,e+=this.rules.CompactMode?this.rules.PageTopMarginNarrow:this.rules.PageTopMargin,this.rules.RenderTitle&&(e+=this.rules.TitleTopDistance),e*=10*this.zoom),r.getOSMDBackendType()===BackendType.Canvas&&e>n&&(loglevelExports.warn("[OSMD] Warning: height of "+e+o),e=Math.min(e,n)),r.resize(t,e),r.clear(),this.drawer.Backends.push(r),this.graphic.drawer=this.drawer}}exportSVG(){for(const t of null===(e=this.drawer)||void 0===e?void 0:e.Backends){var e;t instanceof SvgVexFlowBackend&&t.export()}}IsReadyToRender(){return void 0!==this.graphic}clear(){var e;null===(e=this.drawer)||void 0===e||e.clear(),this.reset()}dispose(){this.disposeResizeListener&&this.disposeResizeListener(),this.InteractionManager&&this.InteractionManager.Dispose()}setOptions(e){if(this.rules||(this.rules=new EngravingRules),this.drawingParameters||(this.drawingParameters=new DrawingParameters,this.drawingParameters.Rules=this.rules),null==e)return void loglevelExports.warn("warning: osmd.setOptions() called without an options parameter, has no effect.\nexample usage: osmd.setOptions({drawCredits: false, drawPartNames: false})");this.OnXMLRead=function(e){return e},e.onXMLRead&&(this.OnXMLRead=e.onXMLRead),e.drawingParameters&&(this.drawingParameters.DrawingParametersEnum=DrawingParametersEnum[e.drawingParameters.toLowerCase()]);let t=!this.drawer||!this.drawer.Backends||this.drawer.Backends.length<1;if(void 0!==e.backend){const n=OSMDOptions.BackendTypeFromString(e.backend);t=t||this.backendType!==n,this.backendType=n}this.needBackendUpdate=t,void 0!==e.autoBeam&&(this.rules.AutoBeamNotes=e.autoBeam);const n=e.autoBeamOptions;if(n&&(void 0===n.maintain_stem_directions&&(n.maintain_stem_directions=!1),this.rules.AutoBeamOptions=n,n.groups&&n.groups.length))for(const i of n.groups)if(2!==i.length)throw new Error("Each fraction in autoBeamOptions.groups must be of length 2, e.g. [3,4] for beaming three fourths");void 0!==e.percussionOneLineCutoff&&(this.rules.PercussionOneLineCutoff=e.percussionOneLineCutoff),0!==this.rules.PercussionOneLineCutoff&&void 0!==e.percussionForceVoicesOneLineCutoff&&(this.rules.PercussionForceVoicesOneLineCutoff=e.percussionForceVoicesOneLineCutoff),void 0!==e.alignRests&&(this.rules.AlignRests=e.alignRests),void 0!==e.coloringMode&&this.setColoringMode(e),void 0!==e.coloringEnabled&&(this.rules.ColoringEnabled=e.coloringEnabled),void 0!==e.colorStemsLikeNoteheads&&(this.rules.ColorStemsLikeNoteheads=e.colorStemsLikeNoteheads),e.disableCursor&&(this.drawingParameters.drawCursors=!1),e.drawHiddenNotes&&(this.drawingParameters.drawHiddenNotes=!0),void 0!==e.drawCredits&&(this.drawingParameters.DrawCredits=e.drawCredits),void 0!==e.drawComposer&&(this.drawingParameters.DrawComposer=e.drawComposer),void 0!==e.drawTitle&&(this.drawingParameters.DrawTitle=e.drawTitle),void 0!==e.drawSubtitle&&(this.drawingParameters.DrawSubtitle=e.drawSubtitle),void 0!==e.drawLyricist&&(this.drawingParameters.DrawLyricist=e.drawLyricist),void 0!==e.drawMetronomeMarks&&(this.rules.MetronomeMarksDrawn=e.drawMetronomeMarks),void 0!==e.drawPartNames&&(this.drawingParameters.DrawPartNames=e.drawPartNames,e.drawPartAbbreviations||(this.rules.RenderPartAbbreviations=e.drawPartNames)),void 0!==e.drawPartAbbreviations&&(this.rules.RenderPartAbbreviations=e.drawPartAbbreviations),!1===e.drawFingerings&&(this.rules.RenderFingerings=!1),void 0!==e.drawMeasureNumbers&&(this.rules.RenderMeasureNumbers=e.drawMeasureNumbers),e.drawMeasureNumbersOnlyAtSystemStart&&(this.rules.RenderMeasureNumbersOnlyAtSystemStart=e.drawMeasureNumbersOnlyAtSystemStart),void 0!==e.drawLyrics&&(this.rules.RenderLyrics=e.drawLyrics),void 0!==e.drawTimeSignatures&&(this.rules.RenderTimeSignatures=e.drawTimeSignatures),void 0!==e.drawSlurs&&(this.rules.RenderSlurs=e.drawSlurs),void 0!==e.measureNumberInterval&&(this.rules.MeasureNumberLabelOffset=e.measureNumberInterval),void 0!==e.useXMLMeasureNumbers&&(this.rules.UseXMLMeasureNumbers=e.useXMLMeasureNumbers),void 0!==e.fingeringPosition&&(this.rules.FingeringPosition=AbstractExpression.PlacementEnumFromString(e.fingeringPosition)),void 0!==e.fingeringInsideStafflines&&(this.rules.FingeringInsideStafflines=e.fingeringInsideStafflines),void 0!==e.newSystemFromXML&&(this.rules.NewSystemAtXMLNewSystemAttribute=e.newSystemFromXML),void 0!==e.newPageFromXML&&(this.rules.NewPageAtXMLNewPageAttribute=e.newPageFromXML),void 0!==e.fillEmptyMeasuresWithWholeRest&&(this.rules.FillEmptyMeasuresWithWholeRest=e.fillEmptyMeasuresWithWholeRest),void 0!==e.followCursor&&(this.FollowCursor=e.followCursor),void 0!==e.setWantedStemDirectionByXml&&(this.rules.SetWantedStemDirectionByXml=e.setWantedStemDirectionByXml),e.darkMode?(this.rules.applyDefaultColorMusic("#FFFFFF"),this.rules.PageBackgroundColor="#000000"):!1===e.darkMode&&(this.rules.applyDefaultColorMusic("#000000"),this.rules.PageBackgroundColor=void 0),e.defaultColorMusic&&this.rules.applyDefaultColorMusic(e.defaultColorMusic),e.defaultColorNotehead&&(this.rules.DefaultColorNotehead=e.defaultColorNotehead),e.defaultColorRest&&(this.rules.DefaultColorRest=e.defaultColorRest),e.defaultColorStem&&(this.rules.DefaultColorStem=e.defaultColorStem),e.defaultColorLabel&&(this.rules.DefaultColorLabel=e.defaultColorLabel),e.defaultColorTitle&&(this.rules.DefaultColorTitle=e.defaultColorTitle),e.defaultFontFamily&&(this.rules.DefaultFontFamily=e.defaultFontFamily),e.defaultFontStyle&&(this.rules.DefaultFontStyle=e.defaultFontStyle),e.drawUpToMeasureNumber&&(this.rules.MaxMeasureToDrawIndex=e.drawUpToMeasureNumber-1),e.drawFromMeasureNumber&&(this.rules.MinMeasureToDrawIndex=e.drawFromMeasureNumber-1),e.drawUpToPageNumber&&(this.rules.MaxPageToDrawNumber=e.drawUpToPageNumber),e.drawUpToSystemNumber&&(this.rules.MaxSystemToDrawNumber=e.drawUpToSystemNumber),e.tupletsRatioed&&(this.rules.TupletsRatioed=!0),e.tupletsBracketed&&(this.rules.TupletsBracketed=!0),e.tripletsBracketed&&(this.rules.TripletsBracketed=!0),e.autoResize?(this.resizeHandlerAttached||this.autoResize(),this.autoResizeEnabled=!0):!1===e.autoResize&&(this.autoResizeEnabled=!1),void 0!==e.pageFormat&&this.setPageFormat(e.pageFormat),void 0!==e.pageBackgroundColor&&(this.rules.PageBackgroundColor=e.pageBackgroundColor),void 0!==e.performanceMode&&(this.rules.PerformanceMode=e.performanceMode),void 0!==e.renderSingleHorizontalStaffline&&(this.rules.RenderSingleHorizontalStaffline=e.renderSingleHorizontalStaffline),void 0!==e.spacingFactorSoftmax&&(this.rules.SoftmaxFactorVexFlow=e.spacingFactorSoftmax),void 0!==e.spacingBetweenTextLines&&(this.rules.SpacingBetweenTextLines=e.spacingBetweenTextLines),void 0!==e.stretchLastSystemLine&&(this.rules.StretchLastSystemLine=e.stretchLastSystemLine),void 0!==e.autoGenerateMutipleRestMeasuresFromRestMeasures&&(this.rules.AutoGenerateMutipleRestMeasuresFromRestMeasures=e.autoGenerateMutipleRestMeasuresFromRestMeasures),void 0!==e.cursorsOptions?this.cursorsOptions=e.cursorsOptions:this.cursorsOptions=[{type:0,color:this.EngravingRules.DefaultColorCursor,alpha:.5,follow:!0}]}setColoringMode(e){if(e.coloringMode===ColoringModes.XML)return void(this.rules.ColoringMode=ColoringModes.XML);const t=[NoteEnum.C,NoteEnum.D,NoteEnum.E,NoteEnum.F,NoteEnum.G,NoteEnum.A,NoteEnum.B,-1];let n;if(e.coloringMode===ColoringModes.CustomColorSet){if(!e.coloringSetCustom||8!==e.coloringSetCustom.length)throw new Error("Invalid amount of colors: With coloringModes.customColorSet, you have to provide a coloringSetCustom parameter with 8 strings (C to B, rest note).");for(const t of e.coloringSetCustom){if(!/^\#[0-9a-fA-F]{6}$/.test(t))throw new Error("One of the color strings in options.coloringSetCustom was not a valid HTML Hex color:\n"+t)}n=e.coloringSetCustom}else if(e.coloringMode===ColoringModes.AutoColoring){n=[];const e=Object.keys(AutoColorSet);for(let t=0;t{e.hide()})),this.sheet=void 0,this.graphic=void 0,this.zoom=1}autoResize(){const e=this;this.handleResize((()=>{}),(()=>{var t;(null===(t=this.graphic)||void 0===t?void 0:t.GetCalculator)instanceof VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=!0),e.IsReadyToRender()&&e.render()}))}handleResize(e,t){let n,i;const r=this;function o(){r.AutoResizeEnabled&&(n=(new Date).getTime(),i||(e(),n=(new Date).getTime(),i=window.setTimeout(s,200)))}function s(){i=void 0,window.clearTimeout(i),(new Date).getTime()-n<200?i=window.setTimeout(s,200):t()}window.attachEvent?window.attachEvent("onresize",o):window.addEventListener("resize",o),this.disposeResizeListener=()=>{window.detachEvent?window.detachEvent("onresize",o):window.removeEventListener("resize",o),this.resizeHandlerAttached=!1},this.resizeHandlerAttached=!0,window.setTimeout(e,0),window.setTimeout(t,1)}enableOrDisableCursors(e){if(this.drawingParameters.drawCursors=e,e){var t;for(let e=0;e{e.hide()}))}createBackend(e,t){let n;return n=void 0===e||e===BackendType.SVG?new SvgVexFlowBackend(this.rules):new CanvasVexFlowBackend(this.rules),n.graphicalMusicPage=t,n.initialize(this.container,this.zoom),n.getContext().setFillStyle(this.rules.DefaultColorMusic),n.getContext().setStrokeStyle(this.rules.DefaultColorMusic),n}static StringToPageFormat(e){let t=PageFormat.UndefinedPageFormat;if(e.match("^[0-9]+x[0-9]+$")){const n=e.split("x"),i=Number.parseInt(n[0],10),r=Number.parseInt(n[1],10);i>0&&i<32768&&r>0&&r<32768&&(t=new PageFormat(i,r,`customPageFormat${e}`))}return e=(e=(e=e.replace(" ","_")).replace("Landscape","L")).replace("Portrait","P"),_OpenSheetMusicDisplay.PageFormatStandards.hasOwnProperty(e)?(t=_OpenSheetMusicDisplay.PageFormatStandards[e],t):t}setPageFormat(e){const t=_OpenSheetMusicDisplay.StringToPageFormat(e);this.needBackendUpdate=!t.Equals(this.rules.PageFormat),this.rules.PageFormat=t}setCustomPageFormat(e,t){if(e>0&&t>0){const n=new PageFormat(e,t);this.rules.PageFormat=n}}set DrawSkyLine(e){this.drawSkyLine=e,this.drawer&&(this.drawer.skyLineVisible=e)}get DrawSkyLine(){return this.drawer.skyLineVisible}set DrawBottomLine(e){this.drawBottomLine=e,this.drawer&&(this.drawer.bottomLineVisible=e)}get DrawBottomLine(){return this.drawer.bottomLineVisible}set DrawBoundingBox(e){this.setDrawBoundingBox(e,!0)}get DrawBoundingBox(){return this.drawBoundingBox}setDrawBoundingBox(e,t=!1){this.drawBoundingBox=e,this.drawer&&(this.drawer.drawableBoundingBoxElement=e),t&&this.render()}get AutoResizeEnabled(){return this.autoResizeEnabled}set AutoResizeEnabled(e){this.autoResizeEnabled=e}get Zoom(){return this.zoom}set Zoom(e){var t;this.zoom=e,this.zoomUpdated=!0,(null===(t=this.graphic)||void 0===t?void 0:t.GetCalculator)instanceof VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=this.zoomUpdated)}set FollowCursor(e){this.followCursor=e}get FollowCursor(){return this.followCursor}set TransposeCalculator(e){MusicSheetCalculator.transposeCalculator=e}get TransposeCalculator(){return MusicSheetCalculator.transposeCalculator}get Sheet(){return this.sheet}get Drawer(){return this.drawer}get GraphicSheet(){return this.graphic}get DrawingParameters(){return this.drawingParameters}get EngravingRules(){return this.rules}get InteractionManager(){return this.interactionManager}get Version(){return this.version}};let OpenSheetMusicDisplay=_OpenSheetMusicDisplay;OpenSheetMusicDisplay.PageFormatStandards={A3_L:new PageFormat(420,297,"A3_L"),A3_P:new PageFormat(297,420,"A3_P"),A4_L:new PageFormat(297,210,"A4_L"),A4_P:new PageFormat(210,297,"A4_P"),A5_L:new PageFormat(210,148,"A5_L"),A5_P:new PageFormat(148,210,"A5_P"),A6_L:new PageFormat(148,105,"A6_L"),A6_P:new PageFormat(105,148,"A6_P"),Endless:PageFormat.UndefinedPageFormat,Letter_L:new PageFormat(279.4,215.9,"Letter_L"),Letter_P:new PageFormat(215.9,279.4,"Letter_P")};var handlebarsExports={},handlebars={get exports(){return handlebarsExports},set exports(e){handlebarsExports=e}},handlebars_runtimeExports={},handlebars_runtime={get exports(){return handlebars_runtimeExports},set exports(e){handlebars_runtimeExports=e}},base$1={},utils={__esModule:!0};utils.extend=extend,utils.indexOf=indexOf,utils.escapeExpression=escapeExpression,utils.isEmpty=isEmpty,utils.createFrame=createFrame,utils.blockParams=blockParams,utils.appendContextPath=appendContextPath;var escape$1={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},badChars=/[&<>"'`=]/g,possible=/[&<>"'`=]/;function escapeChar(e){return escape$1[e]}function extend(e){for(var t=1;t0?(i.ids&&(i.ids=[i.name]),e.helpers.each(t,i)):r(this);if(i.data&&i.ids){var s=n.createFrame(i.data);s.contextPath=n.appendContextPath(i.data.contextPath,i.name),i={data:s}}return o(t,i)}))},e.exports=t.default}(blockHelperMissing,blockHelperMissingExports);var eachExports={},each={get exports(){return eachExports},set exports(e){eachExports=e}};!function(e,t){t.__esModule=!0;var n,i=utils,r=(n=exceptionExports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new r.default("Must pass iterator to #each");var n,o=t.fn,s=t.inverse,a=0,l="",c=void 0,u=void 0;function h(t,n,r){c&&(c.key=t,c.index=n,c.first=0===n,c.last=!!r,u&&(c.contextPath=u+t)),l+=o(e[t],{data:c,blockParams:i.blockParams([e[t],t],[u+t,null])})}if(t.data&&t.ids&&(u=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(c=i.createFrame(t.data)),e&&"object"==typeof e)if(i.isArray(e))for(var d=e.length;a=0?t:parseInt(e,10)}return e},log:function(e){if(e=i.lookupLevel(e),"undefined"!=typeof console&&i.lookupLevel(i.level)<=e){var t=i.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};base$1.REVISION_CHANGES=REVISION_CHANGES;var objectType="[object Object]";function HandlebarsEnvironment(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},_helpers$2.registerDefaultHelpers(this),_decorators.registerDefaultDecorators(this)}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2.default,log:_logger2.default.log,registerHelper:function(e,t){if(_utils$3.toString.call(e)===objectType){if(t)throw new _exception2$3.default("Arg not supported with multiple helpers");_utils$3.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(_utils$3.toString.call(e)===objectType)_utils$3.extend(this.partials,e);else{if(void 0===t)throw new _exception2$3.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(_utils$3.toString.call(e)===objectType){if(t)throw new _exception2$3.default("Arg not supported with multiple decorators");_utils$3.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){_internalProtoAccess$1.resetLoggedProperties()}};var log=_logger2.default.log;base$1.log=log,base$1.createFrame=_utils$3.createFrame,base$1.logger=_logger2.default;var safeStringExports={},safeString={get exports(){return safeStringExports},set exports(e){safeStringExports=e}};!function(e,t){function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default}(safeString,safeStringExports);var runtime={},wrapHelper$1={};function wrapHelper(e,t){if("function"!=typeof e)return e;return function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}}function _interopRequireDefault$3(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard$1(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}wrapHelper$1.__esModule=!0,wrapHelper$1.wrapHelper=wrapHelper,runtime.__esModule=!0,runtime.checkRevision=checkRevision,runtime.template=template,runtime.wrapProgram=wrapProgram,runtime.resolvePartial=resolvePartial,runtime.invokePartial=invokePartial,runtime.noop=noop;var _utils$2=utils,Utils=_interopRequireWildcard$1(_utils$2),_exception$2=exceptionExports,_exception2$2=_interopRequireDefault$3(_exception$2),_base=base$1,_helpers$1=helpers$1,_internalWrapHelper=wrapHelper$1,_internalProtoAccess=protoAccess;function checkRevision(e){var t=e&&e[0]||1,n=_base.COMPILER_REVISION;if(!(t>=_base.LAST_COMPATIBLE_COMPILER_REVISION&&t<=_base.COMPILER_REVISION)){if(t<_base.LAST_COMPATIBLE_COMPILER_REVISION){var i=_base.REVISION_CHANGES[n],r=_base.REVISION_CHANGES[t];throw new _exception2$2.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+r+").")}throw new _exception2$2.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function template(e,t){if(!t)throw new _exception2$2.default("No environment passed to template");if(!e||!e.main)throw new _exception2$2.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0];var i={strict:function(e,t,n){if(!e||!(t in e))throw new _exception2$2.default('"'+t+'" not defined in '+e,{loc:n});return i.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||_internalProtoAccess.resultIsAllowed(n,i.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,r=0;r2&&A.push("'"+this.terminals_[g]+"'");S=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(S,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:c,expected:A})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+d);switch(f[0]){case 1:n.push(d),i.push(this.lexer.yytext),r.push(this.lexer.yylloc),n.push(f[1]),d=null,l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,c=this.lexer.yylloc;break;case 2:if(v=this.productions_[f[1]][1],y.$=i[i.length-v],y._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},u&&(y._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(m=this.performAction.call(y,s,l,a,this.yy,f[1],i,r)))return m;v&&(n=n.slice(0,-1*v*2),i=i.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[f[1]][0]),i.push(y.$),r.push(y._$),b=o[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=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},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var i=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),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,n,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;st[0].length)||(t=n,i=s,this.options.flex));s++);return t?((r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,i){function r(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(r(5,9),"END_RAW_BLOCK");case 6:case 22:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return e}();function n(){this.yy={}}return e.lexer=t,n.prototype=e,e.Parser=n,new n}();t.default=n,e.exports=t.default}(parser$1,parserExports);var whitespaceControlExports={},whitespaceControl={get exports(){return whitespaceControlExports},set exports(e){whitespaceControlExports=e}},visitorExports={},visitor={get exports(){return visitorExports},set exports(e){visitorExports=e}};!function(e,t){t.__esModule=!0;var n,i=(n=exceptionExports)&&n.__esModule?n:{default:n};function r(){this.parents=[]}function o(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function s(e){o.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function a(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}r.prototype={constructor:r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!r.prototype[n.type])throw new i.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new i.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t0)throw new _exception2$1.default("Invalid path: "+i,{loc:n});".."===l&&o++}}return{type:"PathExpression",data:e,depth:o,parts:r,original:i,loc:n}}function prepareMustache(e,t,n,i,r,o){var s=i.charAt(3)||i.charAt(2),a="{"!==s&&"&"!==s;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:e,params:t,hash:n,escaped:a,strip:r,loc:this.locInfo(o)}}function prepareRawBlock(e,t,n,i){validateClose(e,n);var r={type:"Program",body:t,strip:{},loc:i=this.locInfo(i)};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function prepareBlock(e,t,n,i,r,o){i&&i.path&&validateClose(e,i);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,l=void 0;if(n){if(s)throw new _exception2$1.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),l=n.strip,a=n.program}return r&&(r=a,a=t,t=r),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:l,closeStrip:i&&i.strip,loc:this.locInfo(o)}}function prepareProgram(e,t){if(!t&&e.length){var n=e[0].loc,i=e[e.length-1].loc;n&&i&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function preparePartialBlock(e,t,n,i){return validateClose(e,n),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function _interopRequireDefault$1(e){return e&&e.__esModule?e:{default:e}}base.__esModule=!0,base.parseWithoutProcessing=parseWithoutProcessing,base.parse=parse$2;var _parser=parserExports,_parser2=_interopRequireDefault$1(_parser),_whitespaceControl=whitespaceControlExports,_whitespaceControl2=_interopRequireDefault$1(_whitespaceControl),_helpers=helpers,Helpers=_interopRequireWildcard(_helpers),_utils$1=utils;base.parser=_parser2.default;var yy={};function parseWithoutProcessing(e,t){return"Program"===e.type?e:(_parser2.default.yy=yy,yy.locInfo=function(e){return new yy.SourceLocation(t&&t.srcName,e)},_parser2.default.parse(e))}function parse$2(e,t){var n=parseWithoutProcessing(e,t);return new _whitespaceControl2.default(t).accept(n)}_utils$1.extend(yy,Helpers);var compiler={};function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}compiler.__esModule=!0,compiler.Compiler=Compiler,compiler.precompile=precompile,compiler.compile=compile;var _exception=exceptionExports,_exception2=_interopRequireDefault(_exception),_utils=utils,_ast=astExports,_ast2=_interopRequireDefault(_ast),slice=[].slice;function Compiler(){}function precompile(e,t,n){if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new _exception2.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);"data"in(t=t||{})||(t.data=!0),t.compat&&(t.useDepths=!0);var i=n.parse(e,t),r=(new n.Compiler).compile(i,t);return(new n.JavaScriptCompiler).compile(r,t)}function compile(e,t,n){if(void 0===t&&(t={}),null==e||"string"!=typeof e&&"Program"!==e.type)throw new _exception2.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);"data"in(t=_utils.extend({},t))||(t.data=!0),t.compat&&(t.useDepths=!0);var i=void 0;function r(){var i=n.parse(e,t),r=(new n.Compiler).compile(i,t),o=(new n.JavaScriptCompiler).compile(r,t,void 0,!0);return n.template(o)}function o(e,t){return i||(i=r()),i.call(this,e,t)}return o._setup=function(e){return i||(i=r()),i._setup(e)},o._child=function(e,t,n,o){return i||(i=r()),i._child(e,t,n,o)},o}function argEquals(e,t){if(e===t)return!0;if(_utils.isArray(e)&&_utils.isArray(t)&&e.length===t.length){for(var n=0;n1)throw new _exception2.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,r="SubExpression"===e.name.type;r&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",r,i,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){transformLiteralToPath(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var i=e.path,r=i.parts[0],o=null!=t||null!=n;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",r,o)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var i=this.setupFullMustacheParams(e,t,n),r=e.path,o=r.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new _exception2.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);r.strict=!0,r.falsy=!0,this.accept(r),this.opcode("invokeHelper",i.length,r.original,_ast2.default.helpers.simpleId(r))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=_ast2.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,i=t.length;for(this.opcode("pushHash");n=0)return[t,r]}}};var javascriptCompilerExports={},javascriptCompiler={get exports(){return javascriptCompilerExports},set exports(e){javascriptCompilerExports=e}},codeGenExports={},codeGen={get exports(){return codeGenExports},set exports(e){codeGenExports=e}},sourceMap={},sourceMapGenerator={},base64Vlq={},base64$1={},hasRequiredBase64,hasRequiredBase64Vlq;function requireBase64(){if(hasRequiredBase64)return base64$1;hasRequiredBase64=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return base64$1.encode=function(t){if(0<=t&&t>>=5)>0&&(n|=32),i+=e.encode(n)}while(r>0);return i},base64Vlq.decode=function(t,n,i){var r,o,s,a,l=t.length,c=0,u=0;do{if(n>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=e.decode(t.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+t.charAt(n-1));r=!!(32&o),c+=(o&=31)<>1,1==(1&s)?-a:a),i.rest=n},base64Vlq}var util={},hasRequiredUtil;function requireUtil(){return hasRequiredUtil||(hasRequiredUtil=1,function(e){e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function r(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(t){var n=t,o=i(t);if(o){if(!o.path)return t;n=o.path}for(var s,a=e.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(s=l[u])?l.splice(u,1):".."===s?c++:c>0&&(""===s?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=a?"/":"."),o?(o.path=n,r(o)):n}function s(e,t){""===e&&(e="."),""===t&&(t=".");var s=i(t),a=i(e);if(a&&(e=a.path||"/"),s&&!s.scheme)return a&&(s.scheme=a.scheme),r(s);if(s||t.match(n))return t;if(a&&!a.host&&!a.path)return a.host=t,r(a);var l="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,r(a)):l}e.urlParse=i,e.urlGenerate=r,e.normalize=o,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var i=e.lastIndexOf("/");if(i<0)return t;if((e=e.slice(0,i)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=a?l:function(e){return c(e)?"$"+e:e},e.fromSetString=a?l:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var i=u(e.source,t.source);return 0!==i||0!==(i=e.originalLine-t.originalLine)||0!==(i=e.originalColumn-t.originalColumn)||n||0!==(i=e.generatedColumn-t.generatedColumn)||0!==(i=e.generatedLine-t.generatedLine)?i:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var i=e.generatedLine-t.generatedLine;return 0!==i||0!==(i=e.generatedColumn-t.generatedColumn)||n||0!==(i=u(e.source,t.source))||0!==(i=e.originalLine-t.originalLine)||0!==(i=e.originalColumn-t.originalColumn)?i:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var a=i(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var l=a.path.lastIndexOf("/");l>=0&&(a.path=a.path.substring(0,l+1))}t=s(r(a),t)}return o(t)}}(util)),util}var arraySet={},hasRequiredArraySet;function requireArraySet(){if(hasRequiredArraySet)return arraySet;hasRequiredArraySet=1;var e=requireUtil(),t=Object.prototype.hasOwnProperty,n="undefined"!=typeof Map;function i(){this._array=[],this._set=n?new Map:Object.create(null)}return i.fromArray=function(e,t){for(var n=new i,r=0,o=e.length;r=0)return r}else{var o=e.toSetString(i);if(t.call(this._set,o))return this._set[o]}throw new Error('"'+i+'" is not in the set.')},i.prototype.at=function(e){if(e>=0&&er||o==r&&a>=s||e.compareByGeneratedPositionsInflated(n,i)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},mappingList.MappingList=t,mappingList}function requireSourceMapGenerator(){if(hasRequiredSourceMapGenerator)return sourceMapGenerator;hasRequiredSourceMapGenerator=1;var e=requireBase64Vlq(),t=requireUtil(),n=requireArraySet().ArraySet,i=requireMappingList().MappingList;function r(e){e||(e={}),this._file=t.getArg(e,"file",null),this._sourceRoot=t.getArg(e,"sourceRoot",null),this._skipValidation=t.getArg(e,"skipValidation",!1),this._sources=new n,this._names=new n,this._mappings=new i,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(e){var n=e.sourceRoot,i=new r({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=n&&(r.source=t.relative(n,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),i.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!==n&&(o=t.relative(n,r)),i._sources.has(o)||i._sources.add(o);var s=e.sourceContentFor(r);null!=s&&i.setSourceContent(r,s)})),i},r.prototype.addMapping=function(e){var n=t.getArg(e,"generated"),i=t.getArg(e,"original",null),r=t.getArg(e,"source",null),o=t.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,i,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=i&&i.line,originalColumn:null!=i&&i.column,source:r,name:o})},r.prototype.setSourceContent=function(e,n){var i=e;null!=this._sourceRoot&&(i=t.relative(this._sourceRoot,i)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(i)]=n):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(i)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,i,r){var o=i;if(null==i){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');o=e.file}var s=this._sourceRoot;null!=s&&(o=t.relative(s,o));var a=new n,l=new n;this._mappings.unsortedForEach((function(n){if(n.source===o&&null!=n.originalLine){var i=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=i.source&&(n.source=i.source,null!=r&&(n.source=t.join(r,n.source)),null!=s&&(n.source=t.relative(s,n.source)),n.originalLine=i.line,n.originalColumn=i.column,null!=i.name&&(n.name=i.name))}var c=n.source;null==c||a.has(c)||a.add(c);var u=n.name;null==u||l.has(u)||l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(n){var i=e.sourceContentFor(n);null!=i&&(null!=r&&(n=t.join(r,n)),null!=s&&(n=t.relative(s,n)),this.setSourceContent(n,i))}),this)},r.prototype._validateMapping=function(e,t,n,i){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||i)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:i}))},r.prototype._serializeMappings=function(){for(var n,i,r,o,s=0,a=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),f=0,m=p.length;f0){if(!t.compareByGeneratedPositionsInflated(i,p[f-1]))continue;n+=","}n+=e.encode(i.generatedColumn-s),s=i.generatedColumn,null!=i.source&&(o=this._sources.indexOf(i.source),n+=e.encode(o-h),h=o,n+=e.encode(i.originalLine-1-c),c=i.originalLine-1,n+=e.encode(i.originalColumn-l),l=i.originalColumn,null!=i.name&&(r=this._names.indexOf(i.name),n+=e.encode(r-u),u=r)),d+=n}return d},r.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=t.relative(n,e));var i=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null}),this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},sourceMapGenerator.SourceMapGenerator=r,sourceMapGenerator}var sourceMapConsumer={},binarySearch={},hasRequiredBinarySearch;function requireBinarySearch(){return hasRequiredBinarySearch||(hasRequiredBinarySearch=1,function(e){function t(n,i,r,o,s,a){var l=Math.floor((i-n)/2)+n,c=s(r,o[l],!0);return 0===c?l:c>0?i-l>1?t(l,i,r,o,s,a):a==e.LEAST_UPPER_BOUND?i1?t(n,l,r,o,s,a):a==e.LEAST_UPPER_BOUND?l:n<0?-1:n}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(n,i,r,o){if(0===i.length)return-1;var s=t(-1,i.length,n,i,r,o||e.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===r(i[s],i[s-1],!0);)--s;return s}}(binarySearch)),binarySearch}var quickSort={},hasRequiredQuickSort,hasRequiredSourceMapConsumer;function requireQuickSort(){if(hasRequiredQuickSort)return quickSort;function e(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function t(n,i,r,o){if(r=0){var a=this._originalMappings[s];if(void 0===n.column)for(var l=a.originalLine;a&&a.originalLine===l;)o.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===i&&a.originalColumn==c;)o.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return o},sourceMapConsumer.SourceMapConsumer=o,s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(t){var n,i=t;if(null!=this.sourceRoot&&(i=e.relative(this.sourceRoot,i)),this._sources.has(i))return this._sources.indexOf(i);for(n=0;n1&&(o.source=m+l[1],m+=l[1],o.originalLine=p+l[2],p=o.originalLine,o.originalLine+=1,o.originalColumn=f+l[3],f=o.originalColumn,l.length>4&&(o.name=g+l[4],g+=l[4])),x.push(o),"number"==typeof o.originalLine&&S.push(o)}r(x,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,r(S,e.compareByOriginalPositions),this.__originalMappings=S},s.prototype._findMapping=function(e,n,i,r,o,s){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return t.search(e,n,o,s)},s.prototype.computeColumnSpans=function(){for(var e=0;e=0){var r=this._generatedMappings[i];if(r.generatedLine===n.generatedLine){var s=e.getArg(r,"source",null);null!==s&&(s=this._sources.at(s),s=e.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=e.getArg(r,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:e.getArg(r,"originalLine",null),column:e.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},s.prototype.sourceContentFor=function(t,n){if(!this.sourcesContent)return null;var i=this._findSourceIndex(t);if(i>=0)return this.sourcesContent[i];var r,o=t;if(null!=this.sourceRoot&&(o=e.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(r=e.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!r.path||"/"==r.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(t){var n=e.getArg(t,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var i={source:n,originalLine:e.getArg(t,"line"),originalColumn:e.getArg(t,"column")},r=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(r>=0){var s=this._originalMappings[r];if(s.source===i.source)return{line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},sourceMapConsumer.BasicSourceMapConsumer=s,l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var e=[],t=0;t=0;t--)this.prepend(e[t]);else{if(!e[i]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n0&&(n+=", "+i.join(", "));var r=0;Object.keys(this.aliases).forEach((function(e){var i=t.aliases[e];i.children&&i.referenceCount>1&&(n+=", alias"+ ++r+"="+e,i.children[0]="alias"+r)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var s=this.mergeSource(n);return e?(o.push(s),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),") {\n ",s,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,i=void 0,r=void 0,o=void 0,s=void 0;return this.source.each((function(e){e.appendToBuffer?(o?e.prepend(" + "):o=e,s=e):(o&&(r?o.prepend("buffer += "):i=!0,s.add(";"),o=s=void 0),r=!0,t||(n=!1))})),n?o?(o.prepend("return "),s.add(";")):r||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack((function(e){return[" != null ? ",e,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,i){var r=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[r++])),this.resolvePath("context",e,r,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,i,r){var o=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,n,i,r){var o=t.popStack(),s=n.length;e&&s--;for(;ithis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;tnull!==e&&e.isSecureContext,createNativeAudioBufferConstructor=e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null,createNativeAudioContextConstructor=e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null,createNativeAudioWorkletNodeConstructor=e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null,createNativeOfflineAudioContextConstructor=e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null,createWindow=()=>"undefined"==typeof window?null:window,window$1=createWindow();createNativeOfflineAudioContextConstructor(window$1),createNativeAudioContextConstructor(window$1),createNativeAudioWorkletNodeConstructor(window$1),createNativeAudioBufferConstructor(window$1),createIsSecureContext(window$1);var libExports$2={},lib$2={get exports(){return libExports$2},set exports(e){libExports$2=e}},libExports$1={},lib$1={get exports(){return libExports$1},set exports(e){libExports$1=e}};function b64ToUint6(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:43===e?62:47===e?63:0}function decode(e,t){for(var n,i,r=e.replace(/[^A-Za-z0-9\+\/]/g,""),o=r.length,s=t?Math.ceil((3*o+1>>2)/t)*t:3*o+1>>2,a=new Uint8Array(s),l=0,c=0,u=0;u>>(16>>>n&24)&255;l=0}return a}var base64={decode:decode},fetch$1=function(e,t){return new Promise((function(n,i){var r=new XMLHttpRequest;t&&(r.responseType=t),r.open("GET",e),r.onload=function(){200===r.status?n(r.response):i(Error(r.statusText))},r.onerror=function(){i(Error("Network Error"))},r.send()}))};!function(e){var t=base64,n=fetch$1;function i(e){return function(t){return"string"==typeof t&&e.test(t)}}function r(e,t){return"string"==typeof e?e+t:"function"==typeof e?e(t):t}function o(e,t,n,i){var r=t instanceof ArrayBuffer?s:a(t)?l:function(e){return e&&"function"==typeof e.then}(t)?c:u(t)?h:function(e){return e&&"object"==typeof e}(t)?d:p(t)?f:m(t)?g:v(t)?b:null;return r?r(e,t,n||{}):i?Promise.resolve(i):Promise.reject("Source not valid ("+t+")")}function s(e,t,n){return new Promise((function(n,i){e.decodeAudioData(t,(function(e){n(e)}),(function(){i("Can't decode audio data ("+t.slice(0,30)+"...)")}))}))}o.fetch=n;var a=i(/\.(mp3|wav|ogg)(\?.*)?$/i);function l(e,t,n){var i=r(n.from,t);return o(e,o.fetch(i,"arraybuffer"),n)}function c(e,t,n){return t.then((function(t){return o(e,t,n)}))}var u=Array.isArray;function h(e,t,n){return Promise.all(t.map((function(t){return o(e,t,n,t)})))}function d(e,t,n){var i={},r=Object.keys(t).map((function(r){if(n.only&&-1===n.only.indexOf(r))return null;var s=t[r];return o(e,s,n,s).then((function(e){i[r]=e}))}));return Promise.all(r).then((function(){return i}))}var p=i(/\.json(\?.*)?$/i);function f(e,t,n){var i=r(n.from,t);return o(e,o.fetch(i,"text").then(JSON.parse),n)}var m=i(/^data:audio/);function g(e,n,i){var r=n.indexOf(",");return o(e,t.decode(n.slice(r+1)).buffer,i)}var v=i(/\.js(\?.*)?$/i);function b(e,t,n){var i=r(n.from,t);return o(e,o.fetch(i,"text").then(A),n)}function A(e){var t=e.indexOf("MIDI.Soundfont.");if(t<0)throw Error("Invalid MIDI.js Soundfont format");t=e.indexOf("=",t)+2;var n=e.lastIndexOf(",");return JSON.parse(e.slice(t,n)+"}")}e.exports&&(e.exports=o),"undefined"!=typeof window&&(window.loadAudio=o)}(lib$1);var libExports={},lib={get exports(){return libExports},set exports(e){libExports=e}},adsr=ADSR$1;function ADSR$1(e){var t=e.createGain(),n=t._voltage=getVoltage(e),i=scale(n),r=scale(n),o=scale(n);return t._startAmount=scale(r),t._endAmount=scale(o),t._multiplier=scale(i),t._multiplier.connect(t),t._startAmount.connect(t),t._endAmount.connect(t),t.value=i.gain,t.startValue=r.gain,t.endValue=o.gain,t.startValue.value=0,t.endValue.value=0,Object.defineProperties(t,props),t}var props={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(e){var t=this._multiplier.gain,n=this._startAmount.gain,i=this._endAmount.gain;this._voltage.start(e),this._decayFrom=this._decayFrom=e+this.attack,this._startedAt=e;var r=this.sustain;t.cancelScheduledValues(e),n.cancelScheduledValues(e),i.cancelScheduledValues(e),i.setValueAtTime(0,e),this.attack?(t.setValueAtTime(0,e),t.linearRampToValueAtTime(1,e+this.attack),n.setValueAtTime(1,e),n.linearRampToValueAtTime(0,e+this.attack)):(t.setValueAtTime(1,e),n.setValueAtTime(0,e)),this.decay&&t.setTargetAtTime(r,this._decayFrom,getTimeConstant(this.decay))}},stop:{value:function(e,t){t&&(e-=this.release);var n=e+this.release;if(this.release){var i=this._multiplier.gain,r=this._startAmount.gain,o=this._endAmount.gain;i.cancelScheduledValues(e),r.cancelScheduledValues(e),o.cancelScheduledValues(e);var s=getTimeConstant(this.release);if(this.attack&&e=t&&(o=t),o}var ADSR=adsr,EMPTY={},DEFAULTS={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0};function SamplePlayer(e,t,n){var i=!1,r=0,o={},s=e.createGain();s.gain.value=1;var a=Object.assign({},DEFAULTS,n),l={context:e,out:s,opts:a};return t instanceof AudioBuffer?l.buffer=t:l.buffers=t,l.start=function(t,n,s){if(l.buffer&&null!==t)return l.start(null,t,n);var a=t?l.buffers[t]:l.buffer;if(a){if(i){var u=s||EMPTY;n=Math.max(e.currentTime,n||0),l.emit("start",n,t,u);var h=c(t,a,u);return h.id=function(t,n){return n.id=r++,o[n.id]=n,n.source.onended=function(){var t=e.currentTime;n.source.disconnect(),n.env.disconnect(),n.disconnect(),l.emit("ended",t,n.id,n)},n.id}(0,h),h.env.start(n),h.source.start(n),l.emit("started",n,h.id,h),u.duration&&h.stop(n+u.duration),h}console.warn("SamplePlayer not connected to any node.")}else console.warn("Buffer "+t+" not found.")},l.play=function(e,t,n){return l.start(e,t,n)},l.stop=function(e,t){var n;return(t=t||Object.keys(o)).map((function(t){return(n=o[t])?(n.stop(e),n.id):null}))},l.connect=function(e){return i=!0,s.connect(e),l},l.emit=function(e,t,n,i){l.onevent&&l.onevent(e,t,n,i);var r=l["on"+e];r&&r(t,n,i)},l;function c(t,n,i){var r=e.createGain();return r.gain.value=0,r.connect(s),r.env=envelope(e,i,a),r.env.connect(r.gain),r.source=e.createBufferSource(),r.source.buffer=n,r.source.connect(r),r.source.loop=i.loop||a.loop,r.source.playbackRate.value=centsToRate(i.cents||a.cents),r.source.loopStart=i.loopStart||a.loopStart,r.source.loopEnd=i.loopEnd||a.loopEnd,r.stop=function(n){var i=n||e.currentTime;l.emit("stop",i,t);var o=r.env.stop(i);r.source.stop(o)},r}}function isNum$1(e){return"number"==typeof e}var PARAMS=["attack","decay","sustain","release"];function envelope(e,t,n){var i=ADSR(e),r=t.adsr||n.adsr;return PARAMS.forEach((function(e,o){i[e]=r?r[o]:t[e]||n[e]})),i.value.value=isNum$1(t.gain)?t.gain:isNum$1(n.gain)?n.gain:1,i}function centsToRate(e){return e?Math.pow(2,e/1200):1}var player=SamplePlayer,events=function(e){return e.on=function(t,n){if(1===arguments.length&&"function"==typeof t)return e.on("event",t);var i="on"+t,r=e[i];return e[i]=r?chain(r,n):n,e},e};function chain(e,t){return function(n,i,r,o){e(n,i,r,o),t(n,i,r,o)}}var REGEX$1=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function regex$1(){return REGEX$1}var SEMITONES$1=[0,2,4,5,7,9,11];function parse$1(e,t,n){if("string"!=typeof e)return null;var i=REGEX$1.exec(e);if(!i||!t&&i[4])return null;var r={letter:i[1].toUpperCase(),acc:i[2].replace(/x/g,"##")};return r.pc=r.letter+r.acc,r.step=(r.letter.charCodeAt(0)+3)%7,r.alt="b"===r.acc[0]?-r.acc.length:r.acc.length,r.chroma=SEMITONES$1[r.step]+r.alt,i[3]&&(r.oct=+i[3],r.midi=r.chroma+12*(r.oct+1),r.freq=midiToFreq$1(r.midi,n)),t&&(r.tonicOf=i[4]),r}function midiToFreq$1(e,t){return Math.pow(2,(e-69)/12)*(t||440)}var parser={parse:parse$1,regex:regex$1,midiToFreq:midiToFreq$1},FNS=["letter","acc","pc","step","alt","chroma","oct","midi","freq"];FNS.forEach((function(e){parser[e]=function(t){var n=parse$1(t);return n&&void 0!==n[e]?n[e]:null}}));var noteParser$1=parser,note$1=noteParser$1,isMidi=function(e){return null!==e&&e!==[]&&e>=0&&e<129},toMidi=function(e){return isMidi(e)?+e:note$1.midi(e)},notes=function(e){if(e.buffers){var t=e.opts.map,n="function"==typeof t?t:toMidi,i=function(e){return e?n(e)||e:null};e.buffers=mapBuffers(e.buffers,i);var r=e.start;e.start=function(e,t,n){var o=i(e),s=o%1;return s&&(o=Math.floor(o),n=Object.assign(n||{},{cents:Math.floor(100*s)})),r(o,t,n)}}return e};function mapBuffers(e,t){return Object.keys(e).reduce((function(n,i){return n[t(i)]=e[i],n}),{})}var isArr=Array.isArray,isObj=function(e){return e&&"object"==typeof e},OPTS={},scheduler=function(e){return e.schedule=function(t,n){var i,r,o,s,a=e.context.currentTime,l=t6?null:LETTERS.charAt(e)+accStr(t)+octStr(n)}function midi(e){if((isNum(e)||isStr(e))&&e>=0&&e<128)return+e;var t=parse(e);return t&&isDef(t.midi)?t.midi:null}function freq(e,t){var n=midi(e);return null===n?null:midiToFreq(n,t)}function letter(e){return(parse(e)||{}).letter}function acc(e){return(parse(e)||{}).acc}function pc(e){return(parse(e)||{}).pc}function step(e){return(parse(e)||{}).step}function alt(e){return(parse(e)||{}).alt}function chroma(e){return(parse(e)||{}).chroma}function oct(e){return(parse(e)||{}).oct}const noteParser=Object.freeze(Object.defineProperty({__proto__:null,acc:acc,alt:alt,build:build,chroma:chroma,freq:freq,letter:letter,midi:midi,oct:oct,parse:parse,pc:pc,regex:regex,step:step},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(noteParser);var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var e=require$$0;function t(e,n){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof t))return new t(e);this.nameToUrl=n||t.nameToUrl,this.ctx=e,this.instruments={},this.promises=[]}function n(t,n){return n=n||{},function(i,r,o,s){console.warn("The oscillator player is deprecated."),console.log("Starting with version 0.9.0 you will have to wait until the soundfont is loaded to play sounds.");var a=i>0&&i<129?+i:e.midi(i),l=a?e.midiToFreq(a,440):null;if(l){o=o||.2;var c=(s=s||{}).destination||n.destination||t.destination,u=s.vcoType||n.vcoType||"sine",h=s.gain||n.gain||.4,d=t.createOscillator();d.type=u,d.frequency.value=l;var p=t.createGain();return p.gain.value=h,d.connect(p),p.connect(c),d.start(r),o>0&&d.stop(r+o),d}}}return t.prototype.onready=function(e){console.warn("deprecated API"),console.log("Please use Promise.all(Soundfont.instrument(), Soundfont.instrument()).then() instead of new Soundfont().onready()"),Promise.all(this.promises).then(e)},t.prototype.instrument=function(e,i){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var r=this.ctx;if((e=e||"default")in this.instruments)return this.instruments[e];var o={name:e,play:n(r,i)};if(this.instruments[e]=o,"default"!==e){var s=t.instrument(r,e,i).then((function(e){return o.play=e.play,o}));this.promises.push(s),o.onready=function(e){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),s.then(e)}}else o.onready=function(e){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),e()};return o},t.loadBuffers=function(e,n,i){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),t.instrument(e,n,i).then((function(e){return e.buffers}))},t.noteToMidi=e.midi,legacy=t}!function(e){var t=libExports$1,n=libExports;function i(e){return/\.js(\?.*)?$/i.test(e)}function r(e,t,n){return"https://gleitz.github.io/midi-js-soundfonts/"+(t="FluidR3_GM"===t?t:"MusyngKite")+"/"+e+"-"+(n="ogg"===n?n:"mp3")+".js"}var o=requireLegacy();o.instrument=function e(o,s,a){if(1===arguments.length)return function(t,n){return e(o,t,n)};var l=a||{},c=l.isSoundfontURL||i,u=l.nameToUrl||r,h=c(s)?s:u(s,l.soundfont,l.format);return t(o,h,{only:l.only||l.notes}).then((function(e){var t=n(o,e,l).connect(l.destination?l.destination:o.destination);return t.url=h,t.name=s,t}))},o.nameToUrl=r,e.exports&&(e.exports=o),"undefined"!=typeof window&&(window.Soundfont=o)}(lib$2),NoteEnum.C,NoteEnum.D,NoteEnum.E,NoteEnum.F,NoteEnum.G,NoteEnum.A,NoteEnum.B;const speedInfo={"rall.":1.333333333,"poco rit.":1.333333333,"rit.":1.333333333,"molto rit.":1.333333333,"molto rall":1.333333333,molto:1.333333333,lentando:1.333333333,allargando:1.333333333,morendo:1.333333333,"accel.":.8,calando:2,"poco accel.":.8,"gradually slowing":1.333333333,slowing:1.333333333,slow:1.333333333,slowly:1.333333333,faster:1.333333333},getNextNote=(e,t)=>{let n=0;const i=e.closest(t);let r=i;const o=null==i?void 0:i.closest("measure");let s=null;for(;!s&&n<((null==o?void 0:o.childNodes.length)||50);){var a,l,c,u;if(n++,"note"===(null===(a=r)||void 0===a||null===(l=a.nextElementSibling)||void 0===l?void 0:l.tagName))s=null===(u=r)||void 0===u?void 0:u.nextElementSibling;r=null===(c=r)||void 0===c?void 0:c.nextElementSibling}return s},getGradualLengthByXml=e=>{const t=(new DOMParser).parseFromString(e,"text/xml"),n=Array.from(t.querySelectorAll("measure")),i=Array.from(t.querySelectorAll("note")),r=Array.from(t.querySelectorAll("words")),o=Array.from(t.querySelectorAll("metronome")),s=[];for(const p of[...r,...o]){const e=getNextNote(p,"direction");if(e){const t=null==e?void 0:e.closest("measure"),r=Array.from(t.querySelectorAll("note")),o=Array.from(t.childNodes).filter((e=>"note"===e.nodeName)).findIndex((t=>t===e));let l=0,c=0;for(let e=0;ee.index-t.index));const c=Object.keys(speedInfo).map((e=>e.toLocaleLowerCase()));for(const p of s){var u;let e=!1,t=0;const n=null===(u=p.textContent)||void 0===u?void 0:u.toLocaleLowerCase().trim();var h;if(p===s[s.length-1])1===(null===(h=l[l.length-1])||void 0===h?void 0:h.length)&&(e=!0);const i=c.find((e=>{const t=e.split(" ");return n&&t.includes(n)}));if("metronome"===p.type||"words"===p.type&&(n.startsWith("a tempo")||i)||e){var d;const e=l.findIndex((e=>1===e.length));e>-1&&p.index>(null===(d=l[e])||void 0===d?void 0:d[0].start)&&(t=-1,l[e][1]={start:p.index,measureIndex:p.measureIndex,closedMeasureIndex:p.measureIndex,noteInMeasureIndex:p.noteInMeasureIndex,allDuration:p.allDuration,leftDuration:p.leftDuration,type:n})}"words"===p.type&&i&&l.push([{start:p.index,measureIndex:p.measureIndex,closedMeasureIndex:p.measureIndex+t,noteInMeasureIndex:p.noteInMeasureIndex,allDuration:p.allDuration,leftDuration:p.leftDuration,type:n}])}return l},browserInfo=browser();dayjs.extend(duration);const getFixTime=e=>{const t=getDuration(state$1.osmd);let n=t.numerator||0,i=t.denominator||4;const r=t.beatUnit||"quarter";return state$1.repeatedBeats?n=2===n?4:n:2===n&&4===i&&(n=4),state$1.isOpenMetronome?60/e*formatBeatUnit(r)*(n/i):0},retain=e=>Math.ceil(1e6*e)/1e6,formatLyricsEntries=e=>{var t;const n=(null===(t=e.parentStaffEntry)||void 0===t?void 0:t.voiceEntries)||[],i=[];for(const o of n){var r;if(null!==(r=o.lyricsEntries)&&void 0!==r&&r.table){const e=Object.values(o.lyricsEntries.table);for(const t of e)i.push(null==t?void 0:t.value.text)}}return i},createSpeedInfo=(e,t)=>{var n;if(e&&speedInfo[null===(n=e.startWord)||void 0===n?void 0:n.toLocaleLowerCase()]){var i;const n=Math.max(e.endXmlNoteIndex,3),r=[],o=t,s=t/speedInfo[null===(i=e.startWord)||void 0===i?void 0:i.toLocaleLowerCase()];for(let e=0;e{let t=e;const n=e.split(":");return 1===n.length?t=`00:${n[0]}:00`:2===n.length&&(t=`00:${n[0]}:${n[1]}`),`1970-01-01 00:${t}0`},getDuration=e=>{if(e){var t;const{Duration:n,TempoInBPM:i,ActiveTimeSignature:r,TempoExpressions:o}=null===(t=e.GraphicSheet.MeasureList[0][0])||void 0===t?void 0:t.parentSourceMeasure;if(n){let e="quarter";for(const t of o)e=t.InstantaneousTempo.beatUnit||"quarter";return{...formatDuration(r),TempoInBPM:i,beatUnit:e}}}return{...new Fraction$1,TempoInBPM:90,beatUnit:"quarter"}};function formatDuration(e,t){return e}function formatBeatUnit(e){let t=4;switch(e){case"1024th":t=1024;break;case"512th":t=512;break;case"256th":t=256;break;case"128th":t=128;break;case"64th":t=64;break;case"32nd":t=32;break;case"16th":t=16;break;case"eighth":t=8;break;case"quarter":t=4;break;case"half":t=2;break;case"whole":t=1;break;case"breve":t=.5;break;case"long":t=.25;break;case"maxima":t=.125}return t}function getTimeByBeatUnit(e,t,n){return n/formatBeatUnit(e)*t}const setElementNoteBefore=(e,t,n)=>{let i=0;if(t){for(let n=0;n0){let t=0;const r=Array.from(n.childNodes).filter((e=>"note"===e.nodeName)),o=r[r.length-1];if(i>=r.length&&o)return void n.insertBefore(e,n.childNodes[Array.from(n.childNodes).indexOf(o)]);for(let s=0;s{if(e){const t=e.toLocaleLowerCase(),n="d\\s?\\.s\\.",i="d\\.\\s?c\\.";return"@"===t||StringUtil.StringContainsSeparatedWord(t,n+" al fine",!0)||StringUtil.StringContainsSeparatedWord(t,n+" al coda",!0)||StringUtil.StringContainsSeparatedWord(t,i+" al fine",!0)||StringUtil.StringContainsSeparatedWord(t,i+" al coda",!0)||StringUtil.StringContainsSeparatedWord(t,i)||StringUtil.StringContainsSeparatedWord(t,"da\\s?capo",!0)||StringUtil.StringContainsSeparatedWord(t,n,!0)||StringUtil.StringContainsSeparatedWord(t,"dal\\s?segno",!0)||StringUtil.StringContainsSeparatedWord(t,"al\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(t,"to\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(t,"a (la )?coda",!0)||StringUtil.StringContainsSeparatedWord(t,"fine",!0)||StringUtil.StringContainsSeparatedWord(t,"coda",!0)||StringUtil.StringContainsSeparatedWord(t,"segno",!0)}return!1},onlyVisible=(e,t)=>{var n,i,r,o,s,a,l,c,u;if(!e)return"";const h=state$1.examSongId+"",d=(new DOMParser).parseFromString(e,"text/xml"),p=(null===(n=d.getElementsByTagName("part-list"))||void 0===n||null===(i=n[0])||void 0===i?void 0:i.getElementsByTagName("score-part"))||[],f=Array.from(p).map((e=>{var t,n;return(null===(t=e.getElementsByTagName("part-name"))||void 0===t||null===(n=t[0])||void 0===n?void 0:n.textContent)||""})),m=d.getElementsByTagName("part"),g=[...null===(r=m[0])||void 0===r?void 0:r.getElementsByTagName("measure")],v=[...null===(o=m[0])||void 0===o?void 0:o.getElementsByTagName("metronome")],b=[...null===(s=m[0])||void 0===s?void 0:s.getElementsByTagName("words")],A=[...null===(a=m[0])||void 0===a?void 0:a.getElementsByTagName("coda")],y=[...null===(l=m[0])||void 0===l?void 0:l.getElementsByTagName("rehearsal")];"COMMON"===(null===(c=f[0])||void 0===c||null===(u=c.toLocaleUpperCase)||void 0===u?void 0:u.call(c))&&(t++,f.shift());const S=p[t];if(state$1.partListNames=f,S){const e=S.getAttribute("id");Array.from(m).forEach((t=>{var n;if(t&&t.getAttribute("id")!==e)null===(n=t.parentNode)||void 0===n||n.removeChild(t);else if(t&&"P1"!==t.getAttribute("id")){const e={};for(let t=0;t{var n;const i=null===(n=e.parentElement)||void 0===n?void 0:n.parentElement,r=null==i?void 0:i.parentElement,o=[...(null==r?void 0:r.childNodes)||[]],s=i?o.indexOf(i):-1;if(r&&s>-1){const e=g.indexOf(r),n=t.getElementsByTagName("measure")[e];setElementNoteBefore(i,r,n)}})),b.forEach((e=>{let n=e.textContent||"";if(n=["cresc."].includes(n)?"":n,(isSpecialMark(n)||isSpeedKeyword(n)||isGradientWords(n)||isRepeatWord(n)||GRADIENT_SPEED_RESET_TAG)&&n){var i;const r=null===(i=e.parentElement)||void 0===i?void 0:i.parentElement,o=null==r?void 0:r.parentElement,s=[...(null==o?void 0:o.childNodes)||[]],a=r?s.indexOf(r):-1;if(r&&o&&a>-1){const e=g.indexOf(o),i=t.getElementsByTagName("measure")[e];0===Array.from((null==i?void 0:i.getElementsByTagName("words"))||[]).reduce(((e,t)=>{var i;return null!==(i=t.textContent)&&void 0!==i&&i.includes(n)&&e++,e}),0)&&(["12280"].includes(h)?null==i||i.insertBefore(r.cloneNode(!0),null==i?void 0:i.childNodes[a]):setElementNoteBefore(r,o,i))}}})),A.forEach((e=>{var n;const i=null===(n=e.parentElement)||void 0===n?void 0:n.parentElement,r=null==i?void 0:i.parentElement,o=[...(null==r?void 0:r.childNodes)||[]],s=i?o.indexOf(i):-1;if(i&&r&&s>-1){const e=g.indexOf(r),n=t.getElementsByTagName("measure")[e];["12280"].includes(h)?null==n||n.insertBefore(i.cloneNode(!0),null==n?void 0:n.childNodes[s]):setElementNoteBefore(i,r,n)}})),y.forEach((e=>{var n;const i=null===(n=e.parentElement)||void 0===n?void 0:n.parentElement,r=null==i?void 0:i.parentElement;if(r){var o;const e=g.indexOf(r);null===(o=t.getElementsByTagName("measure")[e])||void 0===o||o.appendChild(i.cloneNode(!0))}}))}else b.forEach(((e,t)=>{const n=e.textContent||"";if(isSpeedKeyword(n)&&n){var i,r;const t=null===(i=e.parentElement)||void 0===i||null===(r=i.parentElement)||void 0===r?void 0:r.parentElement;if(t&&t.firstElementChild&&t.firstElementChild!==e){var o;const n=null===(o=e.parentElement)||void 0===o?void 0:o.parentElement,i=t.firstElementChild;t.insertBefore(n,i)}}}));if(t&&t.getAttribute("id")===e){var o,s;const e=t.getElementsByTagName("barline"),n=null===(o=e[e.length-1])||void 0===o?void 0:o.parentElement;if("barline"!==(null==n||null===(s=n.lastElementChild)||void 0===s?void 0:s.tagName)){const e=(null==n?void 0:n.children)||[];for(let t of e)if("barline"===t.tagName){null==n||n.appendChild(t);break}}}})),Array.from(p).forEach((t=>{var n;t&&t.getAttribute("id")!==e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t))}))}return(new XMLSerializer).serializeToString(appoggianceFormate(d))},appoggianceFormate=e=>{if(!e)return e;const t=e.querySelectorAll("grace");if(!t.length)return e;const n=e=>e.querySelector("grace")?n(null==e?void 0:e.nextElementSibling):e;for(let a of t){var i;const e=null===(i=a.parentElement)||void 0===i?void 0:i.querySelector("notations");if(e&&e.querySelectorAll("slur").length>1){var r;let t=n(null===(r=a.parentElement)||void 0===r?void 0:r.nextElementSibling);if(t&&t.querySelectorAll("slur").length>0){var o;const n=Array.from((null===(o=t.querySelector("notations"))||void 0===o?void 0:o.children)||[]).map((e=>e.getAttribute("number"))),i=e.querySelectorAll("slur");for(let e of i){var s;if(!n.includes(e.getAttribute("number")))null===(s=t.querySelector("notations"))||void 0===s||s.appendChild(e)}}}}return e},formatXML=e=>{if(!e)return"";const t=(new DOMParser).parseFromString(e,"text/xml"),n=Array.from(t.getElementsByTagName("measure")),i=Array.from(t.querySelectorAll("repeat"));parseXmlToRepeat(i);let r=-1,o=-1;for(const l of n){var s;-1===r&&l.getElementsByTagName("beats").length&&(r=parseInt(l.getElementsByTagName("beats")[0].textContent||"4")),-1===o&&l.getElementsByTagName("beat-type").length&&(o=parseInt(l.getElementsByTagName("beat-type")[0].textContent||"4"));const e=parseInt((null===(s=l.getElementsByTagName("divisions")[0])||void 0===s?void 0:s.textContent)||"256");if(0===l.getElementsByTagName("note").length){var a;const t=null===(a=l.getElementsByTagName("forward")[0])||void 0===a?void 0:a.getElementsByTagName("duration")[0];t&&(t.textContent="0"),l.innerHTML=l.innerHTML+`\n \n \n ${e*r}\n 1\n whole\n `}}return(new XMLSerializer).serializeToString(t)},formateTimes=exports("ap",(e=>{const t=customData.customNoteRealValue,n=customData.customNoteCurrentTime,i=state$1.examSongId+"";state$1.partIndex;let r=browserInfo.huawei?.08:0;const o=[],s=[],a=[],{originSpeed:l}=state$1,c=(e,t)=>{if("GYM"!==state$1.appName)return e;var n;if(["906"].includes(i))return(null===(n=t.measures[0])||void 0===n?void 0:n.realKey)||e;if(["782","784"].includes(i)){var r;var s;if([14,16,30,32].includes(null===(r=t.firstVerticalMeasure)||void 0===r?void 0:r.measureNumber))return(null===(s=o[o.length-1])||void 0===s?void 0:s.realKey)||e}var a,l,c;if(["900","901","640","641","739","740","800","801","773","774","869","872","714","715"].includes(i)&&(3===(null===(a=t.firstVerticalMeasure)||void 0===a?void 0:a.measureNumber)||9===(null===(l=t.firstVerticalMeasure)||void 0===l?void 0:l.measureNumber)))return(null===(c=t.measures[0])||void 0===c?void 0:c.realKey)||e;return e};if(!e.cursor)return[];const u=e.cursor.Iterator;console.time("音符跑完时间");let h,d,p=0,f=0,m=[],g=[],v=0,b=0,A=0,y="quarter",S=0,x=0,w=0;const E=[];state$1.gradualTimes&&console.log("后台设置的渐慢小节时间",state$1.gradual,state$1.gradualTimes);let _=u.currentTimeStamp.RealValue;const M=[];let P=!1,T=0;for(;!u.EndReached;){var C,I,k;const e=null!==(C=u.CurrentVoiceEntries)&&void 0!==C&&C[0]?[null===(I=u.CurrentVoiceEntries)||void 0===I?void 0:I[0]]:[];let t=[];t=state$1.multitrack>0?[...u.CurrentVoiceEntries]:[...u.CurrentVoiceEntries].filter((e=>{var t;return e&&1!=(null==e||null===(t=e.ParentVoice)||void 0===t?void 0:t.VoiceId)}));let n=0,i=!1,r=!1;if(t.length&&!P){var B,R,L;i=!0;let e=[...u.CurrentVoiceEntries].reduce(((e,t)=>(e.push(...t.Notes),e)),[]);if(e=e.sort(((e,t)=>{var n,i;return(null==e||null===(n=e.length)||void 0===n?void 0:n.realValue)-(null==t||null===(i=t.length)||void 0===i?void 0:i.realValue)})),n=(null===(B=e)||void 0===B||null===(R=B[0])||void 0===R||null===(L=R.length)||void 0===L?void 0:L.realValue)||0,state$1.multitrack>0&&2===t.length){var N,D,F,O;const t=(null===(N=e[0])||void 0===N||null===(D=N.length)||void 0===D?void 0:D.realValue)||0;T=((null===(F=e[e.length-1])||void 0===F||null===(O=F.length)||void 0===O?void 0:O.realValue)||0)-t,P=0!==T}}null!==(k=E[E.length-1])&&void 0!==k&&k.isDouble&&!t.length&&(r=!0),state$1.multitrack>0&&!i&&P&&(i=!0,n=T,P=!1,T=0),M.push(u.currentTimeStamp.realValue-_),_=u.currentTimeStamp.realValue;for(const o of e){var V,z;let e=o.notes[0];if(e.IsGraceNote){const t=e.parentStaffEntry.voiceEntries.find((e=>!e.isGrace));e=t.notes[0]}if(e.fixedKey=e.ParentVoiceEntry.ParentVoice.Parent.SubInstruments[0].fixedKey||0,null!==(V=e)&&void 0!==V&&null!==(z=V.voiceEntry)&&void 0!==z&&z.isGrace){var G,U,H,j,Q,Y;i=!0;let e=[...u.currentVoiceEntries].reduce(((e,t)=>(e.push(...t.notes),e)),[]);e=e.sort(((e,t)=>{var n,i;return(null==t||null===(n=t.length)||void 0===n?void 0:n.realValue)-(null==e||null===(i=e.length)||void 0===i?void 0:i.realValue)})),n=0!=n?Math.min(null===(G=e)||void 0===G||null===(U=G[0])||void 0===U||null===(H=U.length)||void 0===H?void 0:H.realValue,n):null===(j=e)||void 0===j||null===(Q=j[0])||void 0===Q||null===(Y=Q.length)||void 0===Y?void 0:Y.realValue}state$1.multitrack>0&&n>e.length.realValue&&(n=e.length.realValue),E.push({note:e,iterator:{...u},currentTime:n,isDouble:i,isMutileSubject:r})}u.moveToNextVisibleVoiceEntry(!1)}for(let{note:de,iterator:pe,currentTime:fe,isDouble:me,isMutileSubject:ge}of E){if(de){var W,X,K,$,J,q,Z,ee,te,ne,ie;if(0===f&&a.push(de.sourceMeasure),0===f&&state$1.isSpecialBookCategory)for(const e of null===(re=de.sourceMeasure)||void 0===re?void 0:re.TempoExpressions){var re,oe;null!=e&&null!==(oe=e.InstantaneousTempo)&&void 0!==oe&&oe.beatUnit&&(y=e.InstantaneousTempo.beatUnit)}let i=de.sourceMeasure.tempoInBPM;const{metronomeNoteIndex:u}=pe.currentMeasure;var se;if(0!==u&&u>f)i=(null===(se=o[o.length-1])||void 0===se?void 0:se.speed)||100;const E=[null===(W=de.sourceMeasure.verticalMeasureList)||void 0===W?void 0:W[0]],{realValue:_}=pe.currentTimeStamp,{RealValue:P,Denominator:T}=formatDuration(pe.currentMeasure.activeTimeSignature,pe.currentMeasure.duration);let{wholeValue:C,numerator:I,denominator:k,realValue:B}=de.length;t[p]&&(B=t[p]),me&&fe>0&&fe!=B&&(console.log(`小节 ${de.sourceMeasure.MeasureNumberXML} 替换: noteLength: ${B}, 最小: ${fe}`),B=fe),n&&ge&&M[p+1]>0&&B>M[p+1]&&(console.log(B,M[p+1]),B=M[p+1]);let R=b,L=(state$1.isSpecialBookCategory?i:l)||1;0===p&&(r+=getFixTime(L),state$1.fixtime=r);let N=0,D=(state$1.isSpecialBookCategory?i:l)||1;d=pe.currentMeasure.speedInfo||d,h=(null===(X=e.Sheet.SoundTempos)||void 0===X?void 0:X.get(de.sourceMeasure.measureListIndex))||h,(!h||h.length<2)&&(h=createSpeedInfo(d,D));const F=pe.currentMeasure.measureListIndex;if(state$1.gradualTimes&&Object.keys(state$1.gradualTimes).length>0){const e=state$1.gradual.find(((e,t)=>{var n;const i=state$1.gradual[t+1];return e[0].measureIndex<=F&&(null===(n=e[1])||void 0===n?void 0:n.measureIndex)>=F&&(!i||(null==i?void 0:i[0].measureIndex)!==F)})),[t,n]=e||[];if(t&&n){const e=n.measureIndex-t.measureIndex,i=t.closedMeasureIndex==F&&f>=t.noteInMeasureIndex,r=n.closedMeasureIndex===F&&f0)){const e=h[0]-(h[1]-h[0]),{resetXmlNoteIndex:t,endXmlNoteIndex:n}=d,i=n;let r=(h[h.length-1]-e)/i;if(r=de.DotsXml?r/1.5:r,SS){var ae;D=null===(ae=o[p-1])||void 0===ae?void 0:ae.speed}L=(state$1.isSpecialBookCategory?getTimeByBeatUnit(y,D,pe.currentMeasure.activeTimeSignature.Denominator):l)||1;const s=!(SS);S++,s&&(S=0,d=void 0,h=void 0,g=[])}const O=B;let V=N||Math.min(P,B)*formatBeatUnit(y)*(60/L);const z=P*T*(60/L);b+=V,A+=V;let G=V+R;const U=de.fixedKey||0,H=null===(K=E[0])||void 0===K||null===($=K.vfVoices[1])||void 0===$?void 0:$.tickables[f];if(o.length&&o[o.length-1].relativeTime===R)continue;if(0===p){var le,ce;let e=0;((null===(le=de.sourceMeasure.verticalMeasureList)||void 0===le||null===(ce=le[0])||void 0===ce?void 0:ce.staffEntries)||[]).forEach((t=>{var n,i,r,o,s,a;null!=t&&null!==(n=t.sourceStaffEntry)&&void 0!==n&&null!==(i=n.voiceEntries)&&void 0!==i&&null!==(r=i[0])&&void 0!==r&&null!==(o=r.notes)&&void 0!==o&&null!==(s=o[0])&&void 0!==s&&null!==(a=s.length)&&void 0!==a&&a.realValue&&(e+=t.sourceStaffEntry.voiceEntries[0].notes[0].length.realValue)})),e0&&(r+=v)}let j=null===(J=E[0])||void 0===J?void 0:J.stave;de.sourceMeasure.multipleRestMeasures&&(x=de.sourceMeasure.multipleRestMeasures,w=0),we.relativeTime-t.relativeTime)).map(((e,t)=>({...e,i:t})));console.timeEnd("音符跑完时间");try{e.cursor.reset()}catch(he){}return state$1.activeMeasureIndex=ue[0].MeasureNumberXML,ue})),getNoteByMeasuresSlursStart=exports("H",(e=>{let t,n=e;if(e.noteElement.tie&&e.noteElement.tie.StartNote&&(t=e.noteElement.tie.StartNote),n&&t&&t!==n.noteElement){const n=[];for(const e of state$1.times)t===e.noteElement&&n.push(e);if(n.length)return n.find((t=>t.i===e.i-1))}return n})),parseXmlToRepeat=e=>{if(!e.length)return;let t=[],n=0,i=0;for(let r=0;r{let n=-1;if(state$1.repeatInfo.length){for(let i=state$1.repeatInfo.length-1;i>=0;i--){const{start:r,end:o}=state$1.repeatInfo[i];if(e<=r&&t>=o)return n=i,{repeatIdx:n,canRepeat:!0}}return{repeatIdx:n,canRepeat:!1}}return{repeatIdx:n,canRepeat:!1}},selectionContainer="_selectionContainer_1jfjr_1",position="_position_1jfjr_8",note="_note_1jfjr_11",staveBox="_staveBox_1jfjr_14",leftStaveBox="_leftStaveBox_1jfjr_17",rightStaveBox="_rightStaveBox_1jfjr_31",centerStaveBox="_centerStaveBox_1jfjr_45",prepareStaveBox="_prepareStaveBox_1jfjr_70",disable="_disable_1jfjr_73",line="_line_1jfjr_76",lineStaff="_lineStaff_1jfjr_88",lineJianPu="_lineJianPu_1jfjr_91",scoreItem="_scoreItem_1jfjr_97",dotWrap="_dotWrap_1jfjr_134",noteFollow="_noteFollow_1jfjr_149",linePC="_linePC_1jfjr_185",styles$1={selectionContainer:selectionContainer,position:position,note:note,staveBox:staveBox,leftStaveBox:leftStaveBox,rightStaveBox:rightStaveBox,centerStaveBox:centerStaveBox,prepareStaveBox:prepareStaveBox,disable:disable,line:line,lineStaff:lineStaff,lineJianPu:lineJianPu,scoreItem:scoreItem,dotWrap:dotWrap,noteFollow:noteFollow,linePC:linePC},selectData=reactive({notes:[],staves:[]}),calcNoteData=()=>{var e;const t=(null===(e=document.getElementById("musicAndSelection"))||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},n=t.x||0,i=t.y||0,r=state$1.times,o=[],s=[];for(let S=0;S{var t;null==e||null===(t=e.style)||void 0===t||t.setProperty("display","none")}))}catch(y){}const s=(null==r||null===(A=r.getBoundingClientRect)||void 0===A?void 0:A.call(r))||{x:0,width:0,y:0,height:0};try{o.length&&o.forEach((e=>{var t;null==e||null===(t=e.style)||void 0===t||t.removeProperty("display")}))}catch(y){}t.staveBox={left:s.x-n+"px",top:s.y-i+"px",width:s.width+"px",height:s.height+"px"},selectData.staves.push(t)}s.push(e.MeasureNumberXML)}else if(e.multipleRestMeasures){const n=selectData.staves.find((t=>t.MeasureNumberXML===e.MeasureNumberXML-1));null!=n&&n.staveBox&&(t.staveBox={left:n.staveBox.left,top:n.staveBox.top,width:n.staveBox.width},selectData.staves.push(t),s.push(e.MeasureNumberXML))}}console.log("🚀 ~ selectData.notes:",selectData.notes,selectData.staves)},Selection=defineComponent({name:"selection",setup(){const e=useRoute$1();getQuery(),e.query;const t=computed((()=>state$1.sectionStatus||"practise"!==state$1.modeType)),n=computed((()=>e=>{if(state$1.sectionStatus){if(1===state$1.section.length&&e.MeasureNumberXML==state$1.section[0].MeasureNumberXML)return styles$1.leftStaveBox;if(2===state$1.section.length){const t=state$1.userChooseEndIndex>state$1.section[1].MeasureNumberXML?state$1.userChooseEndIndex:state$1.section[1].MeasureNumberXML;if(state$1.sectionFirst&&e.MeasureNumberXML===state$1.sectionFirst.MeasureNumberXML)return styles$1.prepareStaveBox;if(e.MeasureNumberXML>=state$1.section[0].MeasureNumberXML&&e.MeasureNumberXML<=t)return e.MeasureNumberXML==state$1.section[0].MeasureNumberXML&&e.MeasureNumberXML==t?styles$1.centerStaveBox:e.MeasureNumberXML==state$1.section[0].MeasureNumberXML?styles$1.leftStaveBox:e.MeasureNumberXML==t?styles$1.rightStaveBox:styles$1.staveBox}}else if(state$1.activeMeasureIndex==e.MeasureNumberXML&&!state$1.isReport)return styles$1.staveBox}));return onMounted((()=>{calcNoteData()})),()=>createVNode("div",{id:"selectionBox",class:styles$1.selectionContainer,onClick:e=>e.stopPropagation()},[selectData.staves.map((e=>{var t;const i=e.id&&evaluatingData.evaluatings[e.measureListIndex],r=!state$1.isReport&&!state$1.times[state$1.activeNoteIndex].multipleRestMeasures&&2===metronomeData.cursorMode&&e.MeasureNumberXML===(null===(t=metronomeData.activeMetro)||void 0===t?void 0:t.measureNumberXML)&&state$1.times[state$1.activeNoteIndex].MeasureNumberXML===e.MeasureNumberXML;return createVNode(Fragment,null,[e.staveBox&&createVNode("div",{class:[styles$1.position,n.value(e),i?`scoreItemLeve${i.leve}`:"",state$1.platform===IPlatform.PC?styles$1.linePC:""],style:e.staveBox,onClick:()=>handleSelection(e)},[r&&createVNode("div",{class:[styles$1.line,state$1.musicRenderType==EnumMusicRenderType.staff?styles$1.lineStaff:styles$1.lineJianPu],style:{left:metronomeData.activeMetro.left}},null),!state$1.isReport&&!!e.multipleRestMeasures&&state$1.activeMeasureIndex==e.MeasureNumberXML&&createVNode("div",{class:styles$1.dotWrap},[e.multipleRestMeasures]),createVNode(Transition,{name:"centerTop",onAfterEnter:()=>{i.show=!1}},{default:()=>{var e,t;return[(null==i?void 0:i.show)&&createVNode("div",{class:styles$1.scoreItem,style:{color:(null===(e=leveByScoreMeasureIcons[i.leve])||void 0===e?void 0:e.color)||""}},[createVNode("img",{src:null===(t=leveByScoreMeasureIcons[i.leve])||void 0===t?void 0:t.icon},null),createVNode("span",null,[i.score])])]}})])])})),selectData.notes.map((e=>createVNode("div",{class:[styles$1.position,t.value&&styles$1.disable,styles$1.note,`noteIndex_${e.index}`],style:e.bbox,onClick:()=>skipNotePlay(e.index)},[createVNode("div",{class:styles$1.noteFollow,"data-vf":"vf"+e.id},[createVNode(Icon$1,{name:"success"},null),createVNode(Icon$1,{name:"cross"},null)])])))])}}),inGradualRange="_inGradualRange_1ryfw_24",styles={inGradualRange:inGradualRange},musicRenderTypeKey=exports("aB","musicRenderType"),musicData=reactive({showSelection:!1,isRenderLoading:!0,score:"",containerWidth:0}),resetMusicScore=exports("ae",(()=>{var e;const t=(null===(e=document.getElementById("musicAndSelection"))||void 0===e?void 0:e.offsetWidth)||625;state$1.musicZoom=t/musicData.containerWidth})),resetRenderMusicScore=exports("aC",(()=>{const e=queryString.parse(location.search),t=queryString.stringify({...e,_t:Date.now()});location.search="?"+t})),MusicScore=exports("ai",defineComponent({name:"music-score",emits:["rendered"],props:{showSelection:{type:Boolean,default:!0},renderTypeKey:{type:String,default:""}},setup(e,{emit:t}){onMounted((async()=>{var n;musicData.containerWidth=(null===(n=document.getElementById("musicAndSelection"))||void 0===n?void 0:n.offsetWidth)||625,(()=>{const t=sessionStorage.getItem(e.renderTypeKey||musicRenderTypeKey);t in EnumMusicRenderType&&(state$1.musicRenderType=t)})(),await(async()=>{const e=await fetch(state$1.xmlUrl).then((e=>e.text())),t=formatXML(e);musicData.score=onlyVisible(t,state$1.partIndex),state$1.gradualTimes&&(state$1.gradual=getGradualLengthByXml(t))})(),await(async()=>{const e=document.getElementById("musicAndSelection");if(!e||!musicData.score)return;const n=new OpenSheetMusicDisplay(e,{drawTitle:!1,drawSubtitle:!1,autoResize:!1,followCursor:!1,drawPartNames:!1,drawComposer:!1});n.EngravingRules.PageRightMargin=2,n.EngravingRules.PageTopMargin=10,n.EngravingRules.PageTopMarginNarrow=3,n.EngravingRules.PageLeftMargin=2,n.EngravingRules.PageBottomMargin=2,n.EngravingRules.DYMusicScoreType=state$1.musicRenderType===EnumMusicRenderType.staff?"staff":"jianpu",state$1.musicRenderType===EnumMusicRenderType.fixedTone&&(window.sett={keySignature:!0}),n.EngravingRules.DYMusicScoreId=state$1.examSongId||"",await n.load(musicData.score),n.zoom=state$1.zoom,n.render(),t("rendered",n),musicData.showSelection=!0})(),musicData.isRenderLoading=!1}));const n=computed((()=>{var e;let t=!1;const n=(null===(e=state$1.times[state$1.activeNoteIndex])||void 0===e?void 0:e.measureListIndex)||-1;for(const[i,r]of state$1.gradual)if(i&&r&&(t=i.measureIndex<=n&&ncreateVNode("div",{id:"musicAndSelection",style:{"--music-zoom":state$1.musicZoom},class:[n.value&&styles.inGradualRange,state$1.musicRenderType==EnumMusicRenderType.staff?"staff":"jianpuTone"]},[e.showSelection&&musicData.showSelection&&createVNode(Selection,null,null)])}})),scriptRel="modulepreload",assetsURL=function(e,t){return new URL(e,t).href},seen={},__vitePreload=exports("bg",(function(e,t,n){return e()})),relationships={flute:{59:[27,26,25,15,24,22,17,20],60:[27,26,25,15,24,22,17,20],61:[27,26,25,15,24,22,17,21],62:[27,26,25,15,24,22,17],63:[27,26,25,15,24,22,17,19],64:[27,26,25,15,24,22,19],65:[27,26,25,15,24,19],66:[27,26,25,15,17,19],67:[27,26,25,15,19],68:[27,26,25,15,18,19],69:[27,26,15,19],70:[[27,14,19],[27,24,15,19]],71:[27,15,19],72:[27,19],73:[19],74:[26,25,24,22,17,15],75:[26,25,24,22,17,19,15],76:[27,26,25,15,24,22,19],77:[27,26,25,15,24,19],78:[27,26,25,15,17,19],79:[27,26,25,15,19],80:[27,26,25,15,18,19],81:[27,26,15,19],82:[[27,14,19],[27,24,15,19]],83:[27,15,19],84:[27,19],85:[19],86:[26,25,15,19],87:[27,26,25,15,24,22,17,18,19],88:[27,26,15,24,22,19],89:[27,25,24,15,19],90:[27,25,17,15,19],91:[27,26,25,19],92:[26,25,18,19],93:[26,24,15,19],94:[23,24,15,19],95:[27,25,15,16],96:[27,26,25,18,24,19]},clarinet:{52:[[3,4,6,8,9,11,14,18,20],[3,4,6,8,9,11,14,20]],53:[[3,4,6,8,9,11,12,20],[3,4,6,8,9,11,18,20]],54:[[3,4,6,8,9,11,13,18,20],[3,4,6,8,9,11,13,20],[3,4,6,8,9,11,15]],55:[3,4,6,8,9,11,20],56:[3,4,6,8,9,11,16,20],57:[3,4,6,8,9,20],58:[3,4,6,8,20],59:[[3,4,6,9,20],[3,4,6,8,10,20]],60:[3,4,6,20],61:[3,4,6,7,20],62:[3,4,20],63:[[3,4,20,24],[3,4,5,20],[3,8,20]],64:[3,20],65:[20],66:[[3],[20,23,24]],67:[],68:[2],69:[1],70:[1,19],71:[[3,4,6,8,9,11,14,18,19,20],[3,4,6,8,9,11,14,19,20]],72:[[3,4,6,8,9,11,12,19,20],[3,4,6,8,9,11,18,19,20]],73:[[3,4,6,8,9,11,13,19,20],[3,4,6,8,9,11,13,18,19,20],[3,4,6,8,9,11,15,19,20]],74:[3,4,6,8,9,11,19,20],75:[3,4,6,8,9,11,16,19,20],76:[3,4,6,8,9,19,20],77:[3,4,6,8,19,20],78:[[3,4,6,9,19,20],[3,4,6,8,10,19,20]],79:[3,4,6,19,20],80:[3,4,6,7,19,20],81:[3,4,19,20],82:[[3,4,19,20,24],[3,4,5,19,20],[3,4,8,19,20]],83:[3,19,20],84:[19,20],85:[4,6,8,9,19,20],86:[4,6,8,16,19,20],87:[[4,6,8,10,16,19,20],[4,6,9,16,19,20]],88:[4,6,16,19,20],89:[4,6,7,16,19,20]},trumpet:{0:[1,2,3],54:[4,5,6],55:[4,2,6],56:[1,5,6],57:[4,5,3],58:[4,2,3],59:[1,5,3],60:[1,2,3],61:[4,5,6],62:[4,2,6],63:[1,5,6],64:[4,5,3],65:[4,2,3],66:[1,5,3],67:[1,2,3],68:[1,5,6],69:[4,5,3],70:[4,2,3],71:[1,5,3],72:[1,2,3],73:[4,5,3],74:[4,2,3],75:[1,5,3],76:[1,2,3],77:[4,2,3],78:[1,4,3],79:[1,2,3],80:[1,5,6],81:[4,5,3],82:[4,2,3],83:[1,5,3],84:[1,2,3]},horn:{53:[1],54:[2],55:[],56:[2,3],57:[1,2],58:[1],59:[2],60:[],61:[1,2],62:[1],63:[2],64:[],65:[1],66:[2],67:[],68:[0,2,3],69:[0,1,2],70:[0,1],71:[0,2],72:[0],73:[0,2,3],74:[0,1,2],75:[0,1],76:[0,2],77:[0],78:[0,2],79:[0],80:[0,2,3],81:[0,1,2],82:[0,1],83:[0,2],84:[0]},"up-bass-horn":{0:[1,2,3],40:[4,5,6],41:[4,2,6],42:[1,5,6],43:[4,5,3],44:[4,2,3],45:[1,5,3],46:[1,2,3],47:[4,5,6],48:[4,2,6],49:[1,5,6],50:[4,5,3],51:[4,2,3],52:[1,5,3],53:[1,2,3],54:[1,5,6],55:[4,5,3],56:[4,2,3],57:[1,5,3],58:[1,2,3],59:[4,5,3],60:[4,2,3],61:[1,5,3],62:[1,2,3],63:[4,2,3],64:[1,5,3],65:[1,2,3],66:[1,5,6],67:[4,5,3],68:[4,2,3],69:[1,5,3],70:[1,2,3]},trombone:{0:[1],40:[22],41:[11],42:[5],43:[4],44:[3],45:[2],46:[1],47:[22],48:[11],49:[5],50:[4],51:[3],52:[2],53:[1],54:[5],55:[4],56:[3],57:[2],58:[1],59:[4],60:[3],61:[2],62:[1],63:[3],64:[2],65:[1],66:[5],67:[4],68:[3],69:[2],70:[1]},saxophone:{58:[2,4,5,13,17,18,19,23],59:[2,4,5,11,17,18,19,23],60:[2,4,5,17,18,19,23],61:[2,4,5,12,17,18,19,23],62:[2,4,5,17,18,19],63:[2,4,5,17,18,19,22],64:[2,4,5,17,18],65:[2,4,5,17],66:[[2,4,5,18],[2,4,5,17,21]],67:[2,4,5],68:[2,4,5,10],69:[2,4],70:[[2,4,16],[2,17],[2,3]],71:[2],72:[[4],[2,15]],73:[],74:[2,4,5,6,17,18,19],75:[2,4,5,6,17,18,19,22],76:[2,4,5,6,17,18],77:[2,4,5,6,17],78:[[2,4,5,6,18],[2,4,5,6,17,21]],79:[2,4,5,6],80:[2,4,5,6,10],81:[2,4,6],82:[[2,4,6,16],[2,6,17],[2,3,6]],83:[2,6],84:[[4,6],[2,6,15]],85:[6],86:[6,9],87:[6,7,8],88:[6,8,9,14],89:[[6,7,8,9,14],[1,4,6]]},tuba:{0:[1,2,3],28:[4,5,6],29:[4,2,6],30:[1,5,6],31:[4,5,3],32:[4,2,3],33:[4,2,6],34:[1,2,3],35:[4,5,6],36:[4,2,6],37:[1,5,6],38:[4,5,3],39:[4,2,3],40:[1,5,3],41:[1,2,3],42:[1,5,6],43:[4,5,3],44:[4,2,3],45:[1,5,3],46:[1,2,3],47:[4,5,3],48:[4,2,3],49:[1,5,3],50:[1,2,3],51:[4,2,3],52:[1,5,3],53:[1,2,3],54:[1,5,6],55:[4,5,3],56:[4,2,3],57:[1,5,3],58:[1,2,3]},piccolo:{60:[11,2,33,4,5,6,7,8],61:[11,2,33,4,5,6,7,88],62:[11,2,33,4,5,6,7],63:[11,2,33,4,5,6,77],64:[11,2,33,4,5,6],65:[11,2,33,4,5],66:[11,2,33,4,6,7],67:[11,2,33,4],68:[11,2,33,5,6,77],69:[11,2,33],70:[[11,2,4,5],[1,11,2,4,6,7]],71:[[11,2],[11,33,4]],72:[11,33],73:[[2,33],[11]],74:[33],75:[33,4,5,6,7],76:[1,2,33,4,5,6],77:[1,2,33,4,5],78:[1,2,33,4,6,8],79:[1,2,33,4],80:[1,2,33,4,6,7,8],81:[1,2,33],82:[1,2,33,5,6,7],83:[1,2,33,5,6],84:[1,2,5,6],85:[1,2,4,5,7,8,100],86:[1,2,4,5,7,8]},"small-drum":{0:["active","active-left","active-right"],64:["left","right"]},hulusi:{64:[7,6,5,4,3,2,11,91],65:[7,6,5,4,3,2,1,91],66:[7,6,5,4,3,2,91],67:[7,6,5,4,3,2,11,92],68:[7,6,5,4,3,2,1,92],69:[7,6,5,4,3,2,93],70:[7,6,5,4,3,11,93],71:[7,6,5,4,3,93],72:[7,6,5,4,95],73:[7,6,5,3,2,95],74:[7,6,5,95],75:[7,6,4,3,95],76:[7,6,95],77:[7,5,4,3,2,94],78:[7,5,4,94],79:[7,94],80:[6,94],81:[96]},pan:{55:[21],57:[20],59:[19],60:[18],62:[17],64:[16],65:[15],67:[14],69:[13],71:[12],72:[11],74:[10],76:[9],77:[8],79:[7],81:[6],83:[5],84:[4],86:[3],88:[2],89:[1]},ocarina:{57:[1,2,3,4,5,6,7,8,9,10,11,12],58:[1,2,3,4,5,6,8,9,10,11,12],59:[1,2,4,5,6,7,8,9,10,11,12],60:[1,2,4,5,6,8,9,10,11,12],61:[1,2,4,5,6,7,8,9,11,12],62:[1,2,4,5,6,8,9,11,12],63:[1,2,4,5,6,9,11,12],64:[1,2,4,5,6,8,11,12],65:[1,2,4,5,6,11,12],66:[1,2,4,6,9,11,12],67:[1,2,4,6,11,12],68:[1,2,6,9,11,12],69:[1,2,6,11,12],70:[1,6,9,11,12],71:[1,6,11,12],72:[6,11,12],73:[6,9,12],74:[6,12],75:[6,9],76:[6],77:[]},melodica:{53:[1],54:[101],55:[2],56:[102],57:[3],58:[103],59:[4],60:[5],61:[104],62:[6],63:[105],64:[7],65:[8],66:[106],67:[9],68:[107],69:[10],70:[108],71:[11],72:[12],73:[109],74:[13],75:[110],76:[14],77:[15],78:[111],79:[16],80:[112],81:[17],82:[113],83:[18],84:[19]},baroqueRecorder:{60:[11,2,33,4,5,6,7,8],61:[11,2,33,4,5,6,7,88],62:[11,2,33,4,5,6,7],63:[11,2,33,4,5,6,77],64:[11,2,33,4,5,6],65:[11,2,33,4,5,7,8],66:[11,2,33,4,6,7],67:[11,2,33,4],68:[11,2,33,5,6,77],69:[11,2,33],70:[11,2,4,5],71:[11,2],72:[11,33],73:[2,33],74:[33],75:[33,4,5,6,7],76:[1,2,33,4,5,6],77:[1,2,33,4,5,7],78:[1,2,33,4,6],79:[1,2,33,4],80:[1,2,33,5],81:[1,2,33],82:[1,2,33,5,6,7],83:[1,2,33,5,6],84:[1,2,5,6],85:[1,2,4,5,7,8,100],86:[1,2,4,5,7,8],87:[1,2,4],88:[1,2,33,4,5,6],89:[1,2,33,4,5,7],90:[1,2,33,4,6],91:[1,2,33,4],92:[1,2,33,5],93:[1,2,33],94:[1,2,33,5,6,7],95:[1,2,33,5,6],96:[1,2,5,6],97:[1,2,4,5,7,8],98:[1,2,4]}},mappingVoicePart=exports("am",((e,t)=>{if("GYM"===t)return Number(e);if("COLEXIU"===t){return{Flute:2,Clarinet:4,Trombone:14,Tuba:17,Trumpet:12,Horn:13,AltoSaxophone:6,TenorSaxophone:6,Saxophone:6,UpBassHorn:15,Melodica:137,HulusiFlute:136,PanFlute:135,Ocarina:134,Recorder:120,Ukulele:130,Mouthorgan:140,Piano:150}[e]}if("ORCHESTRA"===t){return{1:23,2:2,3:5,4:4,5:12,6:14,7:13,8:15,9:17}[e]}if("INSTRUMENT"===t){let t=e;"string"==typeof t&&(t=t.toLocaleLowerCase().replace(/ /g,"")),console.log(t,"1212");return{flute:2,clarinet:4,trombone:14,tuba:17,trumpet:12,horn:13,altosaxophone:6,tenorsaxophone:6,saxophone:6,upbasshorn:15,melodica:137,hulusiFlute:136,panflute:135,recorder:120,ukulele:130,mouthorgan:140,piano:150,baroquerecorder:"baroque-recorder",4:"piccolo",3:"hulusi-flute",1:"pan-flute",2:"ocarina",5:"melodica",23:2,24:6,25:4,26:12,27:14,28:13,29:15,30:17,tenorrecorder:"piccolo",woodwind:"hulusi-flute",panpipes:"pan-flute",ocarina:"ocarina",nai:"melodica",15:"baroque-recorder",16:"baroque-recorder"}[t]||0}if("ENSEMBLE"===t){let t=e;const n={Piccolo:"piccolo",Flute:2,"Flute 1":2,"Flute 2":2,Oboe:1,"Clarinet in Bb 1":4,"Clarinet in Bb 2":4,"Alto Clarinet in Eb":4,"Bass Clarinet in Bb":4,Bassoon:1,"Alto Saxophone":5,"Tenor Saxophone":5,"Baritone Saxophone":5,"Trumpet in Bb 1":12,"Trumpet in Bb 2":12,"Horn in F":13,"Horn in F 1":13,"Horn in F 2":13,"Trombone 1":14,"Trombone 2":14,"Trombone 3":14,Euphonium:15,Tuba:17,Chimes:1,Bells:1,Xylophone:1,"Snare Drum":1,"Bass Drum":1,Triangle:1,"Suspended Cymbal":1,"Crash Cymbals":1,"Concert Toms":1,Timpani:1,flute:2,oboe:4,clarinet:4,trombone:14,tuba:17,trumpet:12,horn:13,altosaxophone:6,tenorsaxophone:6,saxophone:6,upbasshorn:15,melodica:137,hulusiFlute:136,panflute:135,recorder:120,ukulele:130,mouthorgan:140,piano:150,4:"piccolo",3:"hulusi-flute",1:"pan-flute",2:"ocarina",5:"melodica",26:12,tenorrecorder:"piccolo",woodwind:"hulusi-flute",panpipes:"pan-flute",ocarina:"ocarina",nai:"melodica",BaroqueRecorder:"baroque-recorder"};let i;if("string"==typeof t){for(let e in n)if(e===t){i=n[e];break}}else i=n.code;return i}return 0})),subjectFingering=exports("ao",(e=>{switch(e){case 2:return{name:"flute",direction:"transverse",height:"1.6rem",hasTizhi:!0};case 4:return{name:"clarinet",direction:"vertical",width:"3rem",hasTizhi:!0};case 5:case 6:return{name:"saxophone",direction:"vertical",width:"4.34rem",hasTizhi:!0};case 12:return{name:"trumpet",direction:"transverse",height:"1.6rem",hasTizhi:!1};case 13:return{name:"horn",direction:"vertical",width:"4.98rem",hasTizhi:!1};case 14:return{name:"trombone",direction:"transverse",height:"1.6rem",hasTizhi:!1};case 15:return{name:"up-bass-horn",direction:"vertical",width:"4.34rem",hasTizhi:!1};case 17:return{name:"tuba",direction:"vertical",width:"4.34rem",hasTizhi:!1};case 120:return{name:"piccolo",direction:"vertical",width:"3rem",orientation:1,hasTizhi:!0};case"piccolo":return{name:"piccolo",direction:"vertical",width:"3rem",orientation:1,code:"竖笛",hasTizhi:!0};case"hulusi-flute":return{name:"hulusi-flute",direction:"vertical",width:"3rem",orientation:1,code:"葫芦丝",hasTizhi:!1};case"pan-flute":return{name:"pan-flute",direction:"transverse",height:"2rem",disabledFinger:!0,orientation:0,code:"排箫",hasTizhi:!1};case"ocarina":return{name:"ocarina",direction:"vertical",width:"3rem",disabledFinger:!0,orientation:0,code:"陶笛",hasTizhi:!1};case"melodica":return{name:"melodica",direction:"transverse",height:"2rem",orientation:0,code:"口风琴",hasTizhi:!1};case"baroque-recorder":return{name:"baroque-recorder",direction:"vertical",width:"3rem",orientation:1,code:"竖笛",hasTizhi:!0};default:return{}}})),getFingeringConfig=exports("b9",(async e=>{switch(e){case"flute":return{json:(await __vitePreload((()=>module.import("./index-legacy-0f6cde19.js")),void 0,module.meta.url)).default,relationship:relationships.flute,height:"60px",styles:{}};case"clarinet":return{json:(await __vitePreload((()=>module.import("./index-legacy-d7f2e64d.js")),void 0,module.meta.url)).default,relationship:relationships.clarinet,styles:{marginLeft:".4rem",marginRight:".7rem"}};case"trumpet":return{json:(await __vitePreload((()=>module.import("./index-legacy-ac9e06ec.js")),void 0,module.meta.url)).default,relationship:relationships.trumpet};case"horn":return{json:(await __vitePreload((()=>module.import("./index-legacy-d942ef39.js")),void 0,module.meta.url)).default,relationship:relationships.horn,height:"212px",width:"252px"};case"tuba":return{json:(await __vitePreload((()=>module.import("./index-legacy-3851c136.js")),void 0,module.meta.url)).default,relationship:relationships.tuba};case"piccolo":return{json:(await __vitePreload((()=>module.import("./index-legacy-c5167bc3.js")),void 0,module.meta.url)).default,relationship:relationships.piccolo};case"piccolo1":return{json:(await __vitePreload((()=>module.import("./index-legacy-a35707f4.js")),void 0,module.meta.url)).default,relationship:relationships.piccolo};case"piccolo2":return{json:(await __vitePreload((()=>module.import("./index-legacy-36e7f78a.js")),void 0,module.meta.url)).default,relationship:relationships.piccolo};case"up-bass-horn":return{json:(await __vitePreload((()=>module.import("./index-legacy-6888bad9.js")),void 0,module.meta.url)).default,relationship:relationships["up-bass-horn"]};case"trombone":return{json:(await __vitePreload((()=>module.import("./index-legacy-9b4d7da4.js")),void 0,module.meta.url)).default,relationship:relationships.trombone};case"saxophone":return{json:(await __vitePreload((()=>module.import("./index-legacy-fbabd463.js")),void 0,module.meta.url)).default,relationship:relationships.saxophone,styles:{marginLeft:".2rem",marginRight:".3rem"}};case"small-drum":return{json:(await __vitePreload((()=>module.import("./index-legacy-4514d1bb.js")),void 0,module.meta.url)).default,relationship:relationships["up-bass-horn"],width:"180px"};case"hulusi-flute":return{json:(await __vitePreload((()=>module.import("./index-legacy-f02b4e94.js")),void 0,module.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"hulusi-flute1":return{json:(await __vitePreload((()=>module.import("./index-legacy-5fc4ec32.js")),void 0,module.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"hulusi-flute2":return{json:(await __vitePreload((()=>module.import("./index-legacy-eb6058b4.js")),void 0,module.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"pan-flute":return{json:(await __vitePreload((()=>module.import("./index-legacy-6f3062f5.js")),void 0,module.meta.url)).default,relationship:relationships.pan};case"pan-flute1":return{json:(await __vitePreload((()=>module.import("./index-legacy-0bdee5e3.js")),void 0,module.meta.url)).default,relationship:relationships.pan};case"pan-flute2":return{json:(await __vitePreload((()=>module.import("./index-legacy-4af22c3b.js")),void 0,module.meta.url)).default,relationship:relationships.pan};case"pan-flute3":return{json:(await __vitePreload((()=>module.import("./index-legacy-7bd82439.js")),void 0,module.meta.url)).default,relationship:relationships.pan};case"ocarina":return{json:(await __vitePreload((()=>module.import("./index-legacy-4a03593b.js")),void 0,module.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina1":return{json:(await __vitePreload((()=>module.import("./index-legacy-485fc470.js")),void 0,module.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina2":return{json:(await __vitePreload((()=>module.import("./index-legacy-c6b8211f.js")),void 0,module.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"melodica":return{json:(await __vitePreload((()=>module.import("./index-legacy-6edc0aac.js")),void 0,module.meta.url)).default,relationship:relationships.melodica,height:"80px",styles:{marginTop:"auto"}};case"melodica1":return{json:(await __vitePreload((()=>module.import("./index-legacy-7c757ef3.js")),void 0,module.meta.url)).default,relationship:relationships.melodica,height:"80px",styles:{marginTop:"auto"}};case"baroque-recorder":return{json:(await __vitePreload((()=>module.import("./index-legacy-1f414bc0.js")),void 0,module.meta.url)).default,relationship:relationships.baroqueRecorder};case"baroque-recorder1":return{json:(await __vitePreload((()=>module.import("./index-legacy-3a02f1ea.js")),void 0,module.meta.url)).default,relationship:relationships.baroqueRecorder};case"baroque-recorder2":return{json:(await __vitePreload((()=>module.import("./index-legacy-f7c0163b.js")),void 0,module.meta.url)).default,relationship:relationships.baroqueRecorder};default:return null}})),Notfind=exports("ax",defineComponent({name:"notfund",render(){return createVNode(Empty,{image:"error",description:this.$route.path+" 路径不存在"},{default:()=>[createVNode(Button,{type:"primary",onClick:()=>this.$router.replace("/")},{default:()=>[createTextVNode("返回首页")]})]})}}))}}}))})();