@moonbase.sh/storefront 0.2.30 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('#moonbase .moonbase\\:toolbar{position:fixed;bottom:32px;border-radius:16px;background-color:#1a1a1a;color:#f9f9f9;display:flex;transition-duration:.1s;transition-property:all;transition-timing-function:ease-out;transform:translateY(8px);opacity:0}#moonbase .moonbase\\:toolbar[data-location=bottom-right]{right:32px}#moonbase .moonbase\\:toolbar[data-location=bottom-left]{left:32px}#moonbase .moonbase\\:toolbar[data-visible=true]{transform:translateY(0);opacity:1;transition-duration:.5s}#moonbase .moonbase\\:toolbar-action{padding:12px 16px;transition:background-color .25s ease-out;cursor:pointer;display:flex;align-items:center}#moonbase .moonbase\\:toolbar-action:nth-child(1){border-top-left-radius:16px;border-bottom-left-radius:16px}#moonbase .moonbase\\:toolbar-action:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}#moonbase .moonbase\\:toolbar-action:hover{background-color:#ffffff1a}#moonbase .moonbase\\:toolbar-action[data-action-width=narrow]{padding:12px}#moonbase .moonbase\\:input label{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:input input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:calc(var(--moonbase-input-border-radius) * .5);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input .moonbase\\:input-hint{margin-top:8px;font-size:14px;line-height:20px}#moonbase .moonbase\\:input .moonbase\\:input-hint[data-type=error]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-687bcaf0{to{transform:rotate(360deg)}}#moonbase svg[data-v-687bcaf0]{animation:moonbase\\:spin-687bcaf0 1s linear infinite}#moonbase .moonbase\\:submit-button[data-v-1440b0cf]{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf],#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-success][data-v-1440b0cf]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-error][data-v-1440b0cf]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf]{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf][data-visible][data-v-1440b0cf]{width:20px;opacity:1}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf] svg[data-v-1440b0cf]{height:20px;width:20px}#moonbase .moonbase\\:checkbox{display:flex;align-items:flex-start}#moonbase .moonbase\\:checkbox label{font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-container{display:flex;height:24px;align-items:center}#moonbase .moonbase\\:checkbox input{height:16px;width:16px;border-radius:var(--moonbase-input-border-radius);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description{margin-left:12px}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description label{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p[data-type=error]{color:var(--moonbase-input-error-color)}#moonbase .moonbase\\:sign-up{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-up>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-up .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-up .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-account{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-account>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-account .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-account .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:reset-password{display:flex;flex-direction:column}#moonbase .moonbase\\:reset-password>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:reset-password .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:reset-password .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-email-change{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-email-change>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:modal-container{display:flex;min-height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px;text-align:center}@media (min-width: 640px){#moonbase .moonbase\\:modal-container{display:block;padding:0}}#moonbase .moonbase\\:modal-center{display:none}@media (min-width: 640px){#moonbase .moonbase\\:modal-center{display:inline-block;height:100svh;vertical-align:middle}}#moonbase .moonbase\\:modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content{position:relative;display:inline-block;margin:80px auto 16px;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;border-radius:calc(var(--moonbase-border-radius, 6px) * 2);vertical-align:bottom;transition-property:all;text-align:left}@media (min-width: 640px){#moonbase .moonbase\\:modal-content{vertical-align:middle}}#moonbase .moonbase\\:modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{transform:scale(.95)}}#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{transform:scale(.95)}}#moonbase .moonbase\\:sign-in{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-in>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-in .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-in .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:authentication{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:authentication{width:100vw;max-width:26rem}}#moonbase .moonbase\\:authentication>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:authentication>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:authentication>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:product-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:product-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:product-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:bundle-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary{display:flex;align-items:flex-start;flex-direction:column}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary>:not(:first-child){margin-top:2px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg{margin-left:4px;margin-top:4px;height:16px;width:16px;transition:transform .2s ease-in-out;transform:rotate(0)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg[data-open]{transform:rotate(180deg)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item-product-list{overflow:hidden;padding-left:24px;transition-property:height;transition-duration:.3s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:bundle-cart-item-product-list>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:bundle-cart-item-product-list>div{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:bundle-cart-item-product-list>div>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>img{height:64px;width:64px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>.moonbase\\:image-placeholder{height:64px;width:64px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div{display:flex;flex:auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3:not([data-included]){text-decoration:line-through;opacity:.75}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3 svg{margin-right:4px;height:16px;width:16px}#moonbase .moonbase\\:cart-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:cart-modal-container{display:flex;height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-container{display:block;padding:0}}#moonbase .moonbase\\:cart-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:cart-modal-content{position:fixed;top:0;right:0;bottom:0;display:inline-block;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;transition-property:all}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{transform:translate(48px)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{transform:translate(48px)}}#moonbase .moonbase\\:button{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-variant=secondary]{--moonbase-button-background-color: rgb(107 114 128);--moonbase-button-text-color: white}#moonbase .moonbase\\:button,#moonbase .moonbase\\:button:hover,#moonbase .moonbase\\:button:focus,#moonbase .moonbase\\:button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-success]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:button[data-error]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:button div{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:button div[data-visible]{width:20px;opacity:1}#moonbase .moonbase\\:button div svg{height:20px;width:20px}#moonbase .moonbase\\:cart{display:inline-block;color:var(--moonbase-text-color, black);padding:32px}@media (min-width: 640px){#moonbase .moonbase\\:cart{width:100vw;max-width:26rem}}#moonbase .moonbase\\:cart>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:cart>.moonbase\\:cart-items{font-size:14px;line-height:20px;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>:not(:first-child){border-top-width:1px;border-color:#00000026}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li{padding:24px 0}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:cart>.moonbase\\:cart-empty{padding:32px 0;font-size:1.1rem;line-height:1.3rem;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total{width:100%;margin-top:16px;padding:8px;border-radius:4px;background:#0000001a;display:grid;grid-template-columns:repeat(2,1fr);justify-content:space-between}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>label{font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>span{font-weight:600;text-align:right}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>p{grid-column:-1 / 1;padding-top:8px;text-align:center}#moonbase .moonbase\\:cart>button{--moonbase-button-padding: 12px 32px;margin:32px auto 16px;min-width:164px}#moonbase .moonbase\\:account{padding-bottom:32px}#moonbase .moonbase\\:account>*:not(:last-child){margin-bottom:16px}#moonbase .moonbase\\:account form{margin:auto;max-width:420px}#moonbase .moonbase\\:account form>*:not(:first-child){margin-top:8px}#moonbase .moonbase\\:account form .moonbase\\:error{font-size:14px;line-height:20px;font-weight:600;color:var(--moonbase-error-color)}#moonbase .moonbase\\:account form .moonbase\\:notification{font-size:14px;line-height:20px;font-weight:600}#moonbase .moonbase\\:account>button{margin:32px auto 0}#moonbase .moonbase\\:product-downloads{display:flex;border-radius:var(--moonbase-border-radius);box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button{position:relative;display:inline-flex;align-items:center;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button,#moonbase .moonbase\\:product-downloads button:hover,#moonbase .moonbase\\:product-downloads button:focus,#moonbase .moonbase\\:product-downloads button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:0;border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);margin:0 -1px;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:inset #fff 0 0 0 2px,inset var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads>button{border-radius:0}#moonbase .moonbase\\:product-downloads>button:first-child{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads>button[data-last]{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group{position:relative;margin:0 -1px;display:block}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group:first-child>button{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group[data-last]>button{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group button>:last-child{margin-left:8px}#moonbase .moonbase\\:product-downloads svg{height:20px;width:20px;color:#fff}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list{position:absolute;display:flex;flex-direction:column;right:0;margin-right:-4px;margin-top:8px;width:128px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list:focus{outline:none}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button{border-radius:0}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:first-child{border-top-right-radius:var(--moonbase-border-radius);border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:last-child{border-bottom-right-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:active{color:var(--moonbase-text-color);background-color:transparent;margin:0;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{background-color:hsl(from var(--moonbase-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{box-shadow:none}#moonbase .moonbase\\:product-activations{position:absolute;right:8px;margin-top:8px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:product-activations>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:product-activations>thead>tr>th:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:8px 12px}#moonbase .moonbase\\:product-activations>thead>tr>th:last-child{text-align:right;padding:8px 16px 8px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:product-activations>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative;font-size:14px;font-weight:600;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:product-activations>tbody>tr>td>button,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:hover,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:focus,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:products{min-width:calc(100% + 128px);margin:0 -64px}#moonbase .moonbase\\:products>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:products>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:products>thead>tr>th:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>thead>tr>th:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:products>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative}#moonbase .moonbase\\:products>tbody>tr>td:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:products>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:products>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:products>tbody>tr>td>button,#moonbase .moonbase\\:products>tbody>tr>td>button:hover,#moonbase .moonbase\\:products>tbody>tr>td>button:focus,#moonbase .moonbase\\:products>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:redeem>form{display:flex;flex-direction:column;max-width:240px;margin:64px auto 32px}#moonbase .moonbase\\:redeem>form>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:redeem>form>button{margin:auto}#moonbase .moonbase\\:redeem>form .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:redeem>form .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher{max-width:320px;margin:16px auto;padding:16px;box-shadow:0 0 0 2px var(--moonbase-button-shadow-color);border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>*:not(:first-child),#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>*:not(:first-child){margin-left:12px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child{flex-shrink:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>img,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>.moonbase\\:image-placeholder,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child{flex:1;min-width:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:first-child{font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:last-child{font-size:14px;line-height:20px;text-overflow:ellipsis}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products{padding-left:32px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:customer{display:inline-block;color:var(--moonbase-text-color);padding:32px 64px 16px}@media (min-width: 640px){#moonbase .moonbase\\:customer{width:100vw;max-width:32rem}}#moonbase .moonbase\\:customer>[role=tablist]{margin:0 -32px 16px;padding:0 32px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(from var(--moonbase-button-background-color) r g b / .25);display:flex}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]{margin-bottom:-1px;width:33%;padding:8px 4px;text-align:center;font-size:14px;font-weight:500;line-height:20px;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent;color:hsl(from var(--moonbase-text-color) h s calc(l + 15));transition-property:border-bottom-color,color;transition-duration:.25s;transition-timing-function:ease-out}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]:hover{color:hsl(from var(--moonbase-text-color) h s calc(l + 5));border-bottom-color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab][aria-selected=true]{color:hsl(from var(--moonbase-primary-color) h s calc(l - 15));border-bottom-color:hsl(from var(--moonbase-primary-color) h s calc(l - 10))}#moonbase .moonbase\\:auto-activate .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product{display:flex;align-items:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div{margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content{margin-top:16px;text-align:center;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-trial{margin-top:16px;padding-top:16px;border-top-width:1px;border-color:rgb(from var(--moonbase-text-color) r g b / .2);border-style:solid}#moonbase .moonbase\\:activation{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:activation{width:100vw;max-width:26rem}}#moonbase .moonbase\\:activation>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:download-product .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product{display:flex;align-items:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div{margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2 span{opacity:.75;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content{margin-top:16px;text-align:left;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content>:not(:first-child){margin-top:16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul{border-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul>:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li{position:relative;display:flex;justify-content:space-between;transition:background-color .25s ease-in-out;padding:12px 16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:hover{background-color:#0000001a}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>:not(:first-child){margin-left:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child{min-width:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-name{font-weight:600;line-height:24px;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description{display:flex;align-items:center;line-height:24px;font-size:14px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description svg{height:16px;width:16px;margin-right:6px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description span{opacity:.5;margin:0 6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child{display:flex;align-items:center;flex-shrink:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child svg{flex:none;height:20px;width:20px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-clicker{position:absolute;top:0;right:0;left:0;padding:-1px 0;bottom:0}#moonbase .moonbase\\:download{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:download{width:100vw;max-width:26rem}}#moonbase .moonbase\\:download>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase,#moonbase *:not(svg,path),#moonbase :before,#moonbase :after{all:revert;box-sizing:border-box;border-width:0;border-style:solid}#moonbase *:not(svg,path){margin:0;padding:0;font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}#moonbase{--moonbase-text-color: rgb(17 24 39);--moonbase-primary-color: rgb(79 70 229);--moonbase-error-color: rgb(167, 33, 33);--moonbase-background-color: white;--moonbase-button-padding: 8px 32px;--moonbase-button-text-color: rgb(255 255 255);--moonbase-button-background-color: var(--moonbase-primary-color);--moonbase-button-shadow-color: rgb(0 0 0 / .05);--moonbase-button-success-color: rgb(22 163 74);--moonbase-button-error-color: rgb(167, 33, 33);--moonbase-button-border-radius: var(--moonbase-border-radius, 6px);--moonbase-input-active-color: var(--moonbase-primary-color, var(--moonbase-primary-color));--moonbase-input-shadow-color: rgb(0 0 0 / .05);--moonbase-input-error-color: rgb(167, 33, 33);--moonbase-input-background-color: transparent;--moonbase-input-text-color:var(--moonbase-text-color);--moonbase-input-border-radius: var(--moonbase-border-radius, 6px);--moonbase-modal-padding: 8px 32px;--moonbase-modal-text-color: var(--moonbase-text-color);--moonbase-modal-background-color: rgb(255 255 255);--moonbase-modal-shadow-color: rgb(0 0 0 / .05);--moonbase-modal-border-radius: var(--moonbase-border-radius, 6px)}#moonbase .moonbase\\:scale-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:scale-enter-from{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:scale-enter-to{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:scale-leave-from{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-to{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:slide-left-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:slide-left-enter-from{opacity:0;transform:translate(1rem)}#moonbase .moonbase\\:slide-left-enter-to{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:slide-left-leave-from{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-to{opacity:0;transform:translate(-1rem)}#moonbase .moonbase\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#moonbase a{color:inherit;text-decoration:inherit}#moonbase input,#moonbase button,#moonbase textarea,#moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}#moonbase button,#moonbase select{text-transform:none}#moonbase button,#moonbase [role=button]{cursor:pointer}#moonbase button,#moonbase [type=button],#moonbase [type=reset],#moonbase [type=submit]{-webkit-appearance:button}#moonbase h1,#moonbase h2,#moonbase h3,#moonbase h4,#moonbase h5,#moonbase h6{font-size:inherit;font-weight:inherit}#moonbase b,#moonbase strong{font-weight:bolder}#moonbase svg,.moonbase svg *{color:inherit}#moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}#moonbase img,#moonbase svg,#moonbase video,#moonbase canvas,#moonbase audio,#moonbase iframe,#moonbase embed,#moonbase object{display:block;vertical-align:middle}#moonbase ol,#moonbase ul,#moonbase menu{list-style:none;margin:0;padding:0}#moonbase img,#moonbase video{max-width:100%;height:auto}#moonbase :disabled{cursor:default}#moonbase [hidden]{display:none}#moonbase ::-moz-focus-inner{border-style:none;padding:0}#moonbase :-moz-focusring{outline:none}#moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var jw=Object.defineProperty;var Lw=(kt,be,Tn)=>be in kt?jw(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var xr=(kt,be,Tn)=>Lw(kt,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),If=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const kr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let vl=kr;function Af(e){vl=e}function os(){return vl}const ss=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Vf=[];function ee(e,t){const n=os(),r=ss({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===kr?void 0:kr].filter(o=>!!o)});e.common.issues.push(r)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),Tr=e=>({status:"dirty",value:e}),vt=e=>({status:"valid",value:e}),_i=e=>e.status==="aborted",wi=e=>e.status==="dirty",Gr=e=>e.status==="valid",Jr=e=>typeof Promise<"u"&&e instanceof Promise;function is(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gl(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Yr,Xr;class Kt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yl=(e,t)=>{if(Gr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Oe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Jr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return yl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Jr(o)?o:Promise.resolve(o));return yl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Dr.create(this,this._def)}or(t){return no.create([this,t],this._def)}and(t){return ro.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lo({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ni({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new uo({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return co.create(this,t)}readonly(){return fo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Rf=/^c[^\s-]{8,}$/i,jf=/^[0-9a-z]+$/,Lf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Mf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Uf=/^[a-z0-9_-]{21}$/i,Ff=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bf=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ei;const Zf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Wf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zf=new RegExp(`^${bl}$`);function _l(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Kf(e){return new RegExp(`^${_l(e)}$`)}function wl(e){let t=`${bl}T${_l(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Gf(e,t){return!!((t==="v4"||!t)&&Zf.test(e)||(t==="v6"||!t)&&qf.test(e))}class Mt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.string,received:s.parsedType}),ve}const r=new ut;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Bf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Ei||(Ei=new RegExp(Hf,"u")),Ei.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?zf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Kf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Ff.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Gf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:B.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Jf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Pn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.number,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Jf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class $n extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.bigint,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new $n({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}$n.create=e=>{var t;return new $n({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Qr extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.boolean,received:r.parsedType}),ve}return vt(t.data)}}Qr.create=e=>new Qr({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class tr extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ve}const r=new ut;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}tr.create=e=>new tr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class as extends Oe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.symbol,received:r.parsedType}),ve}return vt(t.data)}}as.create=e=>new as({typeName:pe.ZodSymbol,...Ee(e)});class eo extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.undefined,received:r.parsedType}),ve}return vt(t.data)}}eo.create=e=>new eo({typeName:pe.ZodUndefined,...Ee(e)});class to extends Oe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.null,received:r.parsedType}),ve}return vt(t.data)}}to.create=e=>new to({typeName:pe.ZodNull,...Ee(e)});class Cr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}Cr.create=e=>new Cr({typeName:pe.ZodAny,...Ee(e)});class nr extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}nr.create=e=>new nr({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}fn.create=e=>new fn({typeName:pe.ZodNever,...Ee(e)});class ls extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.void,received:r.parsedType}),ve}return vt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodVoid,...Ee(e)});class Ut extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return ee(n,{code:B.invalid_type,expected:ne.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Kt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Kt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function Pr(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jt.create(Pr(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:Pr(e.element)}):e instanceof Jt?Jt.create(Pr(e.unwrap())):e instanceof In?In.create(Pr(e.unwrap())):e instanceof Gt?Gt.create(e.items.map(t=>Pr(t))):e}class ze extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return ee(u,{code:B.invalid_type,expected:ne.object,received:u.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof fn&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Kt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(ee(o,{code:B.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Kt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return Pr(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Jt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return El(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)});class no extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Tt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Tt(l));return ee(n,{code:B.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}no.create=(e,t)=>new no({options:e,typeName:pe.ZodUnion,...Ee(t)});const pn=e=>e instanceof so?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof io?[e.value]:e instanceof Dn?e.options:e instanceof ao?be.objectValues(e.enum):e instanceof lo?pn(e._def.innerType):e instanceof eo?[void 0]:e instanceof to?[null]:e instanceof Jt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof Ni||e instanceof fo?pn(e.unwrap()):e instanceof uo?pn(e._def.innerType):[];class us extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return ee(n,{code:B.invalid_type,expected:ne.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=pn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new us({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function Oi(e,t){const n=Cn(e),r=Cn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Oi(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Oi(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ro extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(_i(s)||_i(i))return ve;const a=Oi(s.value,i.value);return a.valid?((wi(s)||wi(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ro.create=(e,t,n)=>new ro({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Gt extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return ee(r,{code:B.invalid_type,expected:ne.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Kt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gt({...this._def,rest:t})}}Gt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class oo extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return ee(r,{code:B.invalid_type,expected:ne.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Kt(r,a,r.path,a)),value:i._parse(new Kt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new oo({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new oo({keyType:Mt.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class cs extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return ee(r,{code:B.invalid_type,expected:ne.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new Kt(r,a,r.path,[u,"key"])),value:s._parse(new Kt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}cs.create=(e,t,n)=>new cs({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class rr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return ee(r,{code:B.invalid_type,expected:ne.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ve;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Kt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new rr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new rr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}rr.create=(e,t)=>new rr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class $r extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return ee(n,{code:B.invalid_type,expected:ne.function,received:n.parsedType}),ve;function r(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),kr].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function o(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),kr].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Dr){const a=this;return vt(async function(...l){const u=new Tt([]),c=await a._def.args.parseAsync(l,s).catch(v=>{throw u.addIssue(r(l,v)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(v=>{throw u.addIssue(o(d,v)),u})})}else{const a=this;return vt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Tt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Tt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $r({...this._def,args:Gt.create(t).rest(nr.create())})}returns(t){return new $r({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $r({args:t||Gt.create([]).rest(nr.create()),returns:n||nr.create(),typeName:pe.ZodFunction,...Ee(r)})}}class so extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}so.create=(e,t)=>new so({getter:e,typeName:pe.ZodLazy,...Ee(t)});class io extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}io.create=(e,t)=>new io({value:e,typeName:pe.ZodLiteral,...Ee(t)});function El(e,t){return new Dn({values:e,typeName:pe.ZodEnum,...Ee(t)})}class Dn extends Oe{constructor(){super(...arguments),Yr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:be.joinValues(r),received:n.parsedType,code:B.invalid_type}),ve}if(is(this,Yr)||gl(this,Yr,new Set(this._def.values)),!is(this,Yr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ve}return vt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Dn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Dn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Yr=new WeakMap,Dn.create=El;class ao extends Oe{constructor(){super(...arguments),Xr.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return ee(r,{expected:be.joinValues(o),received:r.parsedType,code:B.invalid_type}),ve}if(is(this,Xr)||gl(this,Xr,new Set(be.getValidEnumValues(this._def.values))),!is(this,Xr).has(t.data)){const o=be.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ve}return vt(t.data)}get enum(){return this._def.values}}Xr=new WeakMap,ao.create=(e,t)=>new ao({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Dr extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:ne.promise,received:n.parsedType}),ve;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return vt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Dr.create=(e,t)=>new Dr({type:e,typeName:pe.ZodPromise,...Ee(t)});class Ft extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?Tr(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?Tr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Gr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Jt extends Oe{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Oe{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class lo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class uo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Jr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}uo.create=(e,t)=>new uo({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class ds extends Oe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}ds.create=e=>new ds({typeName:pe.ZodNaN,...Ee(e)});const Yf=Symbol("zod_brand");class Ni extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class co extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),Tr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new co({in:t,out:n,typeName:pe.ZodPipeline})}}class fo extends Oe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Gr(o)&&(o.value=Object.freeze(o.value)),o);return Jr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}fo.create=(e,t)=>new fo({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function Ol(e,t={},n){return e?Cr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):Cr.create()}const Xf={object:ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Qf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,Sl=Pn.create,ep=ds.create,tp=$n.create,xl=Qr.create,np=tr.create,rp=as.create,op=eo.create,sp=to.create,ip=Cr.create,ap=nr.create,lp=fn.create,up=ls.create,cp=Ut.create,dp=ze.create,fp=ze.strictCreate,pp=no.create,hp=us.create,mp=ro.create,vp=Gt.create,gp=oo.create,yp=cs.create,bp=rr.create,_p=$r.create,wp=so.create,Ep=io.create,Op=Dn.create,Np=ao.create,Sp=Dr.create,kl=Ft.create,xp=Jt.create,kp=In.create,Tp=Ft.createWithPreprocess,Cp=co.create;var p=Object.freeze({__proto__:null,defaultErrorMap:kr,setErrorMap:Af,getErrorMap:os,makeIssue:ss,EMPTY_PATH:Vf,addIssueToContext:ee,ParseStatus:ut,INVALID:ve,DIRTY:Tr,OK:vt,isAborted:_i,isDirty:wi,isValid:Gr,isAsync:Jr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Oe,datetimeRegex:wl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:$n,ZodBoolean:Qr,ZodDate:tr,ZodSymbol:as,ZodUndefined:eo,ZodNull:to,ZodAny:Cr,ZodUnknown:nr,ZodNever:fn,ZodVoid:ls,ZodArray:Ut,ZodObject:ze,ZodUnion:no,ZodDiscriminatedUnion:us,ZodIntersection:ro,ZodTuple:Gt,ZodRecord:oo,ZodMap:cs,ZodSet:rr,ZodFunction:$r,ZodLazy:so,ZodLiteral:io,ZodEnum:Dn,ZodNativeEnum:ao,ZodPromise:Dr,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Jt,ZodNullable:In,ZodDefault:lo,ZodCatch:uo,ZodNaN:ds,BRAND:Yf,ZodBranded:Ni,ZodPipeline:co,ZodReadonly:fo,custom:Ol,Schema:Oe,ZodSchema:Oe,late:Xf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>Qr.create({...e,coerce:!0}),bigint:e=>$n.create({...e,coerce:!0}),date:e=>tr.create({...e,coerce:!0})},any:ip,array:cp,bigint:tp,boolean:xl,date:np,discriminatedUnion:hp,effect:kl,enum:Op,function:_p,instanceof:Qf,intersection:mp,lazy:wp,literal:Ep,map:yp,nan:ep,nativeEnum:Np,never:lp,null:sp,nullable:kp,number:Sl,object:dp,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:xp,ostring:()=>Nl().optional(),pipeline:Cp,preprocess:Tp,promise:Sp,record:gp,set:bp,strictObject:fp,string:Nl,symbol:rp,transformer:kl,tuple:vp,undefined:op,union:pp,unknown:ap,void:up,NEVER:ve,ZodIssueCode:B,quotelessJson:If,ZodError:Tt}),Tl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Si={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Tl<"u"&&Tl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(E){return E&&DataView.prototype.isPrototypeOf(E)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(E){return E&&c.indexOf(Object.prototype.toString.call(E))>-1};function f(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function v(E){return typeof E!="string"&&(E=String(E)),E}function b(E){var P={next:function(){var Y=E.shift();return{done:Y===void 0,value:Y}}};return l.iterable&&(P[Symbol.iterator]=function(){return P}),P}function O(E){this.map={},E instanceof O?E.forEach(function(P,Y){this.append(Y,P)},this):Array.isArray(E)?E.forEach(function(P){this.append(P[0],P[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(P){this.append(P,E[P])},this)}O.prototype.append=function(E,P){E=f(E),P=v(P);var Y=this.map[E];this.map[E]=Y?Y+", "+P:P},O.prototype.delete=function(E){delete this.map[f(E)]},O.prototype.get=function(E){return E=f(E),this.has(E)?this.map[E]:null},O.prototype.has=function(E){return this.map.hasOwnProperty(f(E))},O.prototype.set=function(E,P){this.map[f(E)]=v(P)},O.prototype.forEach=function(E,P){for(var Y in this.map)this.map.hasOwnProperty(Y)&&E.call(P,this.map[Y],Y,this)},O.prototype.keys=function(){var E=[];return this.forEach(function(P,Y){E.push(Y)}),b(E)},O.prototype.values=function(){var E=[];return this.forEach(function(P){E.push(P)}),b(E)},O.prototype.entries=function(){var E=[];return this.forEach(function(P,Y){E.push([Y,P])}),b(E)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function w(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function D(E){return new Promise(function(P,Y){E.onload=function(){P(E.result)},E.onerror=function(){Y(E.error)}})}function H(E){var P=new FileReader,Y=D(P);return P.readAsArrayBuffer(E),Y}function T(E){var P=new FileReader,Y=D(P);return P.readAsText(E),Y}function te(E){for(var P=new Uint8Array(E),Y=new Array(P.length),re=0;re<P.length;re++)Y[re]=String.fromCharCode(P[re]);return Y.join("")}function S(E){if(E.slice)return E.slice(0);var P=new Uint8Array(E.byteLength);return P.set(new Uint8Array(E)),P.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(E){this.bodyUsed=this.bodyUsed,this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:l.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:l.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():l.arrayBuffer&&l.blob&&u(E)?(this._bodyArrayBuffer=S(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||d(E))?this._bodyArrayBuffer=S(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var E=w(this);return E||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(H)}),this.text=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(te(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ge(E){var P=E.toUpperCase();return j.indexOf(P)>-1?P:E}function q(E,P){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var Y=P.body;if(E instanceof q){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,P.headers||(this.headers=new O(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!Y&&E._bodyInit!=null&&(Y=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new O(P.headers)),this.method=ge(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var he=/\?/;this.url+=(he.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function A(E){var P=new FormData;return E.trim().split("&").forEach(function(Y){if(Y){var re=Y.split("="),he=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");P.append(decodeURIComponent(he),decodeURIComponent(oe))}}),P}function V(E){var P=new O,Y=E.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(re){return re.indexOf(`
3
- `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function $(E,P){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},$.error=function(){var E=new $(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];$.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new $(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function De(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new $(xt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,v(P.headers[Be]))}):he.headers.forEach(function(Be,xt){oe.setRequestHeader(xt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return De.polyfill=!0,a.fetch||(a.fetch=De,a.Headers=O,a.Request=q,a.Response=$),i.Headers=O,i.Request=q,i.Response=$,i.fetch=De,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(Si,Si.exports);var $p=Si.exports;const fs=Pp($p);var Ir=p.record(p.number()),Dp=p.object({type:p.literal("PercentageOffDiscount"),name:p.string(),description:p.string().optional(),percentage:p.number(),total:Ir.optional(),isExclusive:p.boolean()}),Ip=p.object({type:p.literal("FlatAmountOffDiscount"),name:p.string(),description:p.string().optional(),total:Ir.optional(),isExclusive:p.boolean()}),xi=p.discriminatedUnion("type",[Dp,Ip]),Ar=p.object({id:p.string(),name:p.string(),originalPrice:Ir,price:Ir,hasDiscount:p.boolean(),discount:xi.optional()});function po(e){return p.object({items:p.array(e),hasMore:p.boolean(),next:p.string().nullable()})}function Cl(e){return p.object({value:e,quantity:p.number()})}var Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Pl=p.object({name:p.string(),key:p.string(),platform:p.nativeEnum(Yt),size:p.number(),path:p.string().nullable()}),ki=p.object({id:p.string(),name:p.string(),tagline:p.string(),website:p.string().optional(),iconUrl:p.string().optional(),numberOfLicenses:p.number().optional(),numberOfTrials:p.number().optional(),currentActivations:p.number().optional(),maxActivations:p.number().optional(),currentVersion:p.string().nullable(),version:p.string().optional(),prerelease:p.boolean().optional(),downloadsNeedsUser:p.boolean(),downloadsNeedsOwnership:p.boolean(),downloads:p.array(Pl).optional()}),ps=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable(),website:p.string().nullish(),owned:p.boolean(),currentVersion:p.string().optional(),downloads:Pl.array().optional(),defaultVariation:Ar.optional(),variations:Ar.array().optional(),type:p.void().transform(()=>"product").pipe(p.literal("product"))}),$l=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable(),owned:p.boolean(),partial:p.boolean(),products:ps.and(p.object({included:p.boolean().optional()})).array(),defaultVariation:Ar.optional(),variations:Ar.array().optional(),type:p.void().transform(()=>"bundle").pipe(p.literal("bundle"))}),Ap=p.object({suggestedCurrency:p.string(),products:ps.array(),bundles:$l.array()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),hs=p.object({id:p.string(),status:p.nativeEnum(Xt),product:ps,trialEligibility:p.object({eligible:p.boolean(),existing:p.boolean(),requiresAccount:p.boolean(),numberOfDaysPerProduct:p.number(),numberOfDaysRemaining:p.number()}).optional(),licenseEligibility:p.object({eligible:p.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return hs.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return p.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return hs.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return hs.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return hs.parse(t.data)}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},Ti=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},Vr=class extends Error{constructor(){super(),this.name="NotFoundError"}},Dl=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},jp=p.object({type:p.string(),title:p.string(),detail:p.string().optional(),status:p.number(),errors:p.record(p.string(),p.string().array()).optional()});function Lp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Ci(e){if(e.status===404)throw new Vr;if(e.status===401)throw new Ti;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Dl(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(n),r.join(", ")])):void 0)}var Il=p.object({countryCode:p.string(),streetAddress1:p.string(),streetAddress2:p.string().nullable(),locality:p.string().nullable(),region:p.string().nullable(),postCode:p.string()}),Mp=p.object({newsletterOptIn:p.boolean()}),Al=p.object({id:p.string(),email:p.string(),name:p.string(),tenantId:p.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:p.string().array().optional()}),Pi=Al.and(p.object({accessToken:p.string(),refreshToken:p.string()})),Up=p.object({id:p.string(),name:p.string(),email:p.string(),resetPasswordToken:p.string().nullable()}),Fp=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return Al.parse(e.data)}async signIn(e,t){const n=await fs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});n.status>=400&&await Ci(n);const r=await n.json(),o=Pi.parse(r);return this.tokenStore.setUser(o),o}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}),l=Pi.parse(a.data);return this.tokenStore.setUser(l),l}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await fs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await Ci(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");return Up.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},ho=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(ho||{}),Vl=p.object({code:p.string(),name:p.string(),description:p.string()}),Rl=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable()}),Bp=p.object({id:p.string(),type:p.literal("Product"),productId:p.string(),quantity:p.number(),variationId:p.string(),price:Ir.optional(),variation:Ar.optional(),product:Rl.optional(),appliedDiscount:xi.optional()}),Hp=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable(),partial:p.boolean(),products:Rl.and(p.object({included:p.boolean().optional()})).array()}),Zp=p.object({id:p.string(),type:p.literal("Bundle"),bundleId:p.string(),quantity:p.number(),variationId:p.string(),price:Ir.optional(),variation:Ar.optional(),bundle:Hp.optional(),appliedDiscount:xi.optional()}),jl=p.discriminatedUnion("type",[Bp,Zp]),Ll=p.object({id:p.string(),status:p.literal("Open"),currency:p.string(),items:jl.array(),couponsApplied:Vl.array(),checkoutUrl:p.string().optional(),embeddedCheckoutUrl:p.string().optional()}),mo=p.object({currency:p.string(),amount:p.number()}),qp=p.object({original:mo,discount:mo,subtotal:mo,taxes:mo,due:mo}),Wp=p.object({name:p.string().nullable(),businessName:p.string().nullable(),taxId:p.string().nullable(),email:p.string().nullable(),address:Il.nullable()}),zp=p.object({id:p.string(),status:p.literal("Completed"),currency:p.string(),customer:Wp,total:qp,items:jl.array(),couponsApplied:Vl.array()}),Kp=p.discriminatedUnion("status",[Ll,zp]),Gp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return Kp.parse(t.data)}async pushContent(e,t,n){const r={...Ml(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency||void 0,items:e.items});return Ll.parse(o.data)}};function Ml(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var Jp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Ml(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Ap.parse(n.data)}},Yp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new Ti;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await fs(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return s.status>=400&&await Ci(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},Ul=class rs{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(rs.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(rs.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(rs.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await fs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new Dl("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Pi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case rs.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Ul.storageKey="moonbase_auth";var Xp=Ul,Fl=p.object({id:p.string(),name:p.string(),description:p.string(),code:p.string(),redeemed:p.boolean(),redeemsProducts:Cl(ps).array(),redeemsBundles:Cl($l).array()}),Qp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return Fl.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return Fl.parse(t.data)}},Bl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Bl||{}),Hl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Hl||{}),$i=(e=>(e.Online="Online",e.Offline="Offline",e))($i||{}),Di=p.object({id:p.string(),status:p.nativeEnum(Bl),product:ki,activeNumberOfActivations:p.number(),maxNumberOfActivations:p.number(),createdAt:p.coerce.date()}),Zl=p.object({id:p.string(),licenseId:p.string(),name:p.string(),status:p.nativeEnum(Hl),activationMethod:p.nativeEnum($i),lastValidatedAt:p.coerce.date().nullable()}),eh=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");return{license:Di.parse(n.data),url:p.string().parse(n.headers.get("location"))}}},th=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return po(Di).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return po(Zl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},nh=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);return ki.parse(n.data)}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return po(ki).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return po(Di).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return po(Zl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return p.object({location:p.string()}).parse(n.data).location}},rh=class{constructor(e){this.licenses=new th(e),this.products=new nh(e),this.activation=new eh(e)}},oh=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new Xp(e);const t=new Yp(this.configuration.endpoint,this.tokenStore);this.storefront=new Jp(t),this.identity=new Fp(t,this.tokenStore),this.vouchers=new Qp(t),this.orders=new Gp(t),this.inventory=new rh(t),this.activationRequests=new Vp(t)}},ql={};/**
2
+ (function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var Ew=Object.defineProperty;var Ow=(kt,be,Tn)=>be in kt?Ew(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var kr=(kt,be,Tn)=>Ow(kt,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pf=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Tr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let hl=Tr;function Df(e){hl=e}function ns(){return hl}const rs=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},$f=[];function ee(e,t){const n=ns(),r=rs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Tr?void 0:Tr].filter(o=>!!o)});e.common.issues.push(r)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),Cr=e=>({status:"dirty",value:e}),vt=e=>({status:"valid",value:e}),yi=e=>e.status==="aborted",bi=e=>e.status==="dirty",Kr=e=>e.status==="valid",Gr=e=>typeof Promise<"u"&&e instanceof Promise;function os(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ml(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Jr,Yr;class Kt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const vl=(e,t)=>{if(Kr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Oe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return vl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Gr(o)?o:Promise.resolve(o));return vl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Ir.create(this,this._def)}or(t){return to.create([this,t],this._def)}and(t){return no.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ao({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ei({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new lo({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return uo.create(this,t)}readonly(){return co.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const If=/^c[^\s-]{8,}$/i,Af=/^[0-9a-z]+$/,Vf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Rf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,jf=/^[a-z0-9_-]{21}$/i,Lf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Mf=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Uf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _i;const Ff=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Hf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Zf=new RegExp(`^${gl}$`);function yl(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function qf(e){return new RegExp(`^${yl(e)}$`)}function bl(e){let t=`${gl}T${yl(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Wf(e,t){return!!((t==="v4"||!t)&&Ff.test(e)||(t==="v6"||!t)&&Bf.test(e))}class Mt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.string,received:s.parsedType}),ve}const r=new ut;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")_i||(_i=new RegExp(Uf,"u")),_i.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")If.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Af.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Vf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?bl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Zf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?qf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Wf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Hf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:B.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function zf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Pn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.number,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?zf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Dn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.bigint,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Dn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Dn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dn.create=e=>{var t;return new Dn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Xr extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.boolean,received:r.parsedType}),ve}return vt(t.data)}}Xr.create=e=>new Xr({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class tr extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ve}const r=new ut;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}tr.create=e=>new tr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class ss extends Oe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.symbol,received:r.parsedType}),ve}return vt(t.data)}}ss.create=e=>new ss({typeName:pe.ZodSymbol,...Ee(e)});class Qr extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.undefined,received:r.parsedType}),ve}return vt(t.data)}}Qr.create=e=>new Qr({typeName:pe.ZodUndefined,...Ee(e)});class eo extends Oe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.null,received:r.parsedType}),ve}return vt(t.data)}}eo.create=e=>new eo({typeName:pe.ZodNull,...Ee(e)});class Pr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}Pr.create=e=>new Pr({typeName:pe.ZodAny,...Ee(e)});class nr extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}nr.create=e=>new nr({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}fn.create=e=>new fn({typeName:pe.ZodNever,...Ee(e)});class is extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.void,received:r.parsedType}),ve}return vt(t.data)}}is.create=e=>new is({typeName:pe.ZodVoid,...Ee(e)});class Ut extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return ee(n,{code:B.invalid_type,expected:ne.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Kt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Kt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function Dr(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jt.create(Dr(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:Dr(e.element)}):e instanceof Jt?Jt.create(Dr(e.unwrap())):e instanceof In?In.create(Dr(e.unwrap())):e instanceof Gt?Gt.create(e.items.map(t=>Dr(t))):e}class ze extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return ee(u,{code:B.invalid_type,expected:ne.object,received:u.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof fn&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Kt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(ee(o,{code:B.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Kt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return Dr(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Jt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return _l(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)});class to extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Tt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Tt(l));return ee(n,{code:B.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}to.create=(e,t)=>new to({options:e,typeName:pe.ZodUnion,...Ee(t)});const pn=e=>e instanceof oo?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof so?[e.value]:e instanceof $n?e.options:e instanceof io?be.objectValues(e.enum):e instanceof ao?pn(e._def.innerType):e instanceof Qr?[void 0]:e instanceof eo?[null]:e instanceof Jt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof Ei||e instanceof co?pn(e.unwrap()):e instanceof lo?pn(e._def.innerType):[];class as extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return ee(n,{code:B.invalid_type,expected:ne.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=pn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new as({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function wi(e,t){const n=Cn(e),r=Cn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=wi(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=wi(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class no extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(yi(s)||yi(i))return ve;const a=wi(s.value,i.value);return a.valid?((bi(s)||bi(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}no.create=(e,t,n)=>new no({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Gt extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return ee(r,{code:B.invalid_type,expected:ne.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Kt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gt({...this._def,rest:t})}}Gt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class ro extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return ee(r,{code:B.invalid_type,expected:ne.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Kt(r,a,r.path,a)),value:i._parse(new Kt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new ro({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new ro({keyType:Mt.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class ls extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return ee(r,{code:B.invalid_type,expected:ne.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new Kt(r,a,r.path,[u,"key"])),value:s._parse(new Kt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}ls.create=(e,t,n)=>new ls({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class rr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return ee(r,{code:B.invalid_type,expected:ne.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ve;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Kt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new rr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new rr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}rr.create=(e,t)=>new rr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class $r extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return ee(n,{code:B.invalid_type,expected:ne.function,received:n.parsedType}),ve;function r(a,l){return rs({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ns(),Tr].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function o(a,l){return rs({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ns(),Tr].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ir){const a=this;return vt(async function(...l){const u=new Tt([]),c=await a._def.args.parseAsync(l,s).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{const a=this;return vt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Tt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Tt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $r({...this._def,args:Gt.create(t).rest(nr.create())})}returns(t){return new $r({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $r({args:t||Gt.create([]).rest(nr.create()),returns:n||nr.create(),typeName:pe.ZodFunction,...Ee(r)})}}class oo extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}oo.create=(e,t)=>new oo({getter:e,typeName:pe.ZodLazy,...Ee(t)});class so extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}so.create=(e,t)=>new so({value:e,typeName:pe.ZodLiteral,...Ee(t)});function _l(e,t){return new $n({values:e,typeName:pe.ZodEnum,...Ee(t)})}class $n extends Oe{constructor(){super(...arguments),Jr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:be.joinValues(r),received:n.parsedType,code:B.invalid_type}),ve}if(os(this,Jr)||ml(this,Jr,new Set(this._def.values)),!os(this,Jr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ve}return vt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $n.create(t,{...this._def,...n})}exclude(t,n=this._def){return $n.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Jr=new WeakMap,$n.create=_l;class io extends Oe{constructor(){super(...arguments),Yr.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return ee(r,{expected:be.joinValues(o),received:r.parsedType,code:B.invalid_type}),ve}if(os(this,Yr)||ml(this,Yr,new Set(be.getValidEnumValues(this._def.values))),!os(this,Yr).has(t.data)){const o=be.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ve}return vt(t.data)}get enum(){return this._def.values}}Yr=new WeakMap,io.create=(e,t)=>new io({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Ir extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:ne.promise,received:n.parsedType}),ve;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return vt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ir.create=(e,t)=>new Ir({type:e,typeName:pe.ZodPromise,...Ee(t)});class Ft extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?Cr(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?Cr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Kr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Jt extends Oe{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Oe{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class ao extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ao.create=(e,t)=>new ao({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class lo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class us extends Oe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}us.create=e=>new us({typeName:pe.ZodNaN,...Ee(e)});const Kf=Symbol("zod_brand");class Ei extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class uo extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),Cr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new uo({in:t,out:n,typeName:pe.ZodPipeline})}}class co extends Oe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Kr(o)&&(o.value=Object.freeze(o.value)),o);return Gr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function wl(e,t={},n){return e?Pr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):Pr.create()}const Gf={object:ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Jf=(e,t={message:`Input not instance of ${e.name}`})=>wl(n=>n instanceof e,t),El=Mt.create,Ol=Pn.create,Yf=us.create,Xf=Dn.create,Nl=Xr.create,Qf=tr.create,ep=ss.create,tp=Qr.create,np=eo.create,rp=Pr.create,op=nr.create,sp=fn.create,ip=is.create,ap=Ut.create,lp=ze.create,up=ze.strictCreate,cp=to.create,dp=as.create,fp=no.create,pp=Gt.create,hp=ro.create,mp=ls.create,vp=rr.create,gp=$r.create,yp=oo.create,bp=so.create,_p=$n.create,wp=io.create,Ep=Ir.create,Sl=Ft.create,Op=Jt.create,Np=In.create,Sp=Ft.createWithPreprocess,xp=uo.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Tr,setErrorMap:Df,getErrorMap:ns,makeIssue:rs,EMPTY_PATH:$f,addIssueToContext:ee,ParseStatus:ut,INVALID:ve,DIRTY:Cr,OK:vt,isAborted:yi,isDirty:bi,isValid:Kr,isAsync:Gr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Oe,datetimeRegex:bl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:Xr,ZodDate:tr,ZodSymbol:ss,ZodUndefined:Qr,ZodNull:eo,ZodAny:Pr,ZodUnknown:nr,ZodNever:fn,ZodVoid:is,ZodArray:Ut,ZodObject:ze,ZodUnion:to,ZodDiscriminatedUnion:as,ZodIntersection:no,ZodTuple:Gt,ZodRecord:ro,ZodMap:ls,ZodSet:rr,ZodFunction:$r,ZodLazy:oo,ZodLiteral:so,ZodEnum:$n,ZodNativeEnum:io,ZodPromise:Ir,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Jt,ZodNullable:In,ZodDefault:ao,ZodCatch:lo,ZodNaN:us,BRAND:Kf,ZodBranded:Ei,ZodPipeline:uo,ZodReadonly:co,custom:wl,Schema:Oe,ZodSchema:Oe,late:Gf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>Xr.create({...e,coerce:!0}),bigint:e=>Dn.create({...e,coerce:!0}),date:e=>tr.create({...e,coerce:!0})},any:rp,array:ap,bigint:Xf,boolean:Nl,date:Qf,discriminatedUnion:dp,effect:Sl,enum:_p,function:gp,instanceof:Jf,intersection:fp,lazy:yp,literal:bp,map:mp,nan:Yf,nativeEnum:wp,never:sp,null:np,nullable:Np,number:Ol,object:lp,oboolean:()=>Nl().optional(),onumber:()=>Ol().optional(),optional:Op,ostring:()=>El().optional(),pipeline:xp,preprocess:Sp,promise:Ep,record:hp,set:vp,strictObject:up,string:El,symbol:ep,transformer:Sl,tuple:pp,undefined:tp,union:cp,unknown:op,void:ip,NEVER:ve,ZodIssueCode:B,quotelessJson:Pf,ZodError:Tt}),xl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oi={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof xl<"u"&&xl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(E){return E&&DataView.prototype.isPrototypeOf(E)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(E){return E&&c.indexOf(Object.prototype.toString.call(E))>-1};function f(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function m(E){return typeof E!="string"&&(E=String(E)),E}function b(E){var P={next:function(){var Y=E.shift();return{done:Y===void 0,value:Y}}};return l.iterable&&(P[Symbol.iterator]=function(){return P}),P}function O(E){this.map={},E instanceof O?E.forEach(function(P,Y){this.append(Y,P)},this):Array.isArray(E)?E.forEach(function(P){this.append(P[0],P[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(P){this.append(P,E[P])},this)}O.prototype.append=function(E,P){E=f(E),P=m(P);var Y=this.map[E];this.map[E]=Y?Y+", "+P:P},O.prototype.delete=function(E){delete this.map[f(E)]},O.prototype.get=function(E){return E=f(E),this.has(E)?this.map[E]:null},O.prototype.has=function(E){return this.map.hasOwnProperty(f(E))},O.prototype.set=function(E,P){this.map[f(E)]=m(P)},O.prototype.forEach=function(E,P){for(var Y in this.map)this.map.hasOwnProperty(Y)&&E.call(P,this.map[Y],Y,this)},O.prototype.keys=function(){var E=[];return this.forEach(function(P,Y){E.push(Y)}),b(E)},O.prototype.values=function(){var E=[];return this.forEach(function(P){E.push(P)}),b(E)},O.prototype.entries=function(){var E=[];return this.forEach(function(P,Y){E.push([Y,P])}),b(E)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function w(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function $(E){return new Promise(function(P,Y){E.onload=function(){P(E.result)},E.onerror=function(){Y(E.error)}})}function H(E){var P=new FileReader,Y=$(P);return P.readAsArrayBuffer(E),Y}function T(E){var P=new FileReader,Y=$(P);return P.readAsText(E),Y}function te(E){for(var P=new Uint8Array(E),Y=new Array(P.length),re=0;re<P.length;re++)Y[re]=String.fromCharCode(P[re]);return Y.join("")}function S(E){if(E.slice)return E.slice(0);var P=new Uint8Array(E.byteLength);return P.set(new Uint8Array(E)),P.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(E){this.bodyUsed=this.bodyUsed,this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:l.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:l.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():l.arrayBuffer&&l.blob&&u(E)?(this._bodyArrayBuffer=S(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||d(E))?this._bodyArrayBuffer=S(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var E=w(this);return E||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(H)}),this.text=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(te(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ge(E){var P=E.toUpperCase();return j.indexOf(P)>-1?P:E}function q(E,P){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var Y=P.body;if(E instanceof q){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,P.headers||(this.headers=new O(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!Y&&E._bodyInit!=null&&(Y=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new O(P.headers)),this.method=ge(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var he=/\?/;this.url+=(he.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function A(E){var P=new FormData;return E.trim().split("&").forEach(function(Y){if(Y){var re=Y.split("="),he=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");P.append(decodeURIComponent(he),decodeURIComponent(oe))}}),P}function V(E){var P=new O,Y=E.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(re){return re.indexOf(`
3
+ `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function D(E,P){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},D.error=function(){var E=new D(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];D.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new D(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(xt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,m(P.headers[Be]))}):he.headers.forEach(function(Be,xt){oe.setRequestHeader(xt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=D),i.Headers=O,i.Request=q,i.Response=D,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(Oi,Oi.exports);var Tp=Oi.exports;const cs=kp(Tp);var Cp=Object.defineProperty,kl=(e,t)=>{for(var n in t)Cp(e,n,{get:t[n],enumerable:!0})},Ar=v.record(v.number()),Pp=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Ar.optional(),isExclusive:v.boolean()}),Dp=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Ar.optional(),isExclusive:v.boolean()}),Ni=v.discriminatedUnion("type",[Pp,Dp]),Vr=v.object({id:v.string(),name:v.string(),originalPrice:Ar,price:Ar,hasDiscount:v.boolean(),discount:Ni.optional()});function fo(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Tl(e){return v.object({value:e,quantity:v.number()})}var Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Cl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Yt),size:v.number(),path:v.string().nullable()}),Si=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Cl).optional()}),ds=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Cl.array().optional(),defaultVariation:Vr.optional(),variations:Vr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),Pl=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:ds.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Vr.optional(),variations:Vr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),$p=v.object({suggestedCurrency:v.string(),products:ds.array(),bundles:Pl.array()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),fs=v.object({id:v.string(),status:v.nativeEnum(Xt),product:ds,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Ip=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return fs.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return fs.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return fs.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return fs.parse(t.data)}},Ap=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},xi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},or=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},Dl=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},Vp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function Rp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function ki(e){if(e.status===404)throw new or;if(e.status===401)throw new xi;if(e.status===403)throw new Ap;let t;try{const n=await e.json();t=Vp.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Dl(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Rp(n),r.join(", ")])):void 0)}var $l=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),jp=v.object({newsletterOptIn:v.boolean()}),Il=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:$l.optional(),communicationPreferences:jp,ownedProducts:v.string().array().optional()}),Ti=Il.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Lp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Mp=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return Il.parse(e.data)}async signIn(e,t){const n=await cs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new or("User not found");n.status>=400&&await ki(n);const r=await n.json(),o=Ti.parse(r);return this.tokenStore.setUser(o),o}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}),l=Ti.parse(a.data);return this.tokenStore.setUser(l),l}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await cs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await ki(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");return Lp.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Al={};kl(Al,{completedOrderSchema:()=>Ml,openBundleLineItem:()=>Ll,openOrderLineItem:()=>Ci,openOrderSchema:()=>Pi,openProductLineItem:()=>jl,orderSchema:()=>Ul});var po=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(po||{}),Vl=v.object({code:v.string(),name:v.string(),description:v.string()}),Rl=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),jl=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Ar.optional(),variation:Vr.optional(),product:Rl.optional(),appliedDiscount:Ni.optional()}),Up=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:Rl.and(v.object({included:v.boolean().optional()})).array()}),Ll=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:Ar.optional(),variation:Vr.optional(),bundle:Up.optional(),appliedDiscount:Ni.optional()}),Ci=v.discriminatedUnion("type",[jl,Ll]),Pi=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:Ci.array(),couponsApplied:Vl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),ho=v.object({currency:v.string(),amount:v.number()}),Fp=v.object({original:ho,discount:ho,subtotal:ho,taxes:ho,due:ho}),Bp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:$l.nullable()}),Ml=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Bp,total:Fp,items:Ci.array(),couponsApplied:Vl.array()}),Ul=v.discriminatedUnion("status",[Pi,Ml]),Hp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return Ul.parse(t.data)}async pushContent(e,t,n){const r={...Fl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency||void 0,items:e.items});return Pi.parse(o.data)}};function Fl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var Zp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Fl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return $p.parse(n.data)}},qp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new xi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await cs(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return s.status>=400&&await ki(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},Bl=class ts{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(ts.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(ts.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(ts.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await cs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new Dl("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Ti.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case ts.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Bl.storageKey="moonbase_auth";var Wp=Bl,Hl=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Tl(ds).array(),redeemsBundles:Tl(Pl).array()}),zp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return Hl.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return Hl.parse(t.data)}},Zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Zl||{}),ql=(e=>(e.Active="Active",e.Revoked="Revoked",e))(ql||{}),Di=(e=>(e.Online="Online",e.Offline="Offline",e))(Di||{}),$i=v.object({id:v.string(),status:v.nativeEnum(Zl),product:Si,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Wl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(ql),activationMethod:v.nativeEnum(Di),lastValidatedAt:v.coerce.date().nullable()}),Kp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");return{license:$i.parse(n.data),url:v.string().parse(n.headers.get("location"))}}},Gp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return fo($i).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return fo(Wl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},Jp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);return Si.parse(n.data)}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return fo(Si).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return fo($i).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return fo(Wl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},Yp=class{constructor(e){this.licenses=new Gp(e),this.products=new Jp(e),this.activation=new Kp(e)}},zl={};kl(zl,{orders:()=>Al});var Xp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new Wp(e);const t=new qp(this.configuration.endpoint,this.tokenStore);this.storefront=new Zp(t),this.identity=new Mp(t,this.tokenStore),this.vouchers=new zp(t),this.orders=new Hp(t),this.inventory=new Yp(t),this.activationRequests=new Ip(t)}},Kl={};/**
4
4
  * @vue/shared v3.5.3
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
6
  * @license MIT
7
- **//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=ql.NODE_ENV!=="production"?Object.freeze({}):{},Rr=ql.NODE_ENV!=="production"?Object.freeze([]):[],Xe=()=>{},sh=()=>!1,vo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ms=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Ii=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ih=Object.prototype.hasOwnProperty,$e=(e,t)=>ih.call(e,t),le=Array.isArray,or=e=>vs(e)==="[object Map]",Wl=e=>vs(e)==="[object Set]",ce=e=>typeof e=="function",Ze=e=>typeof e=="string",An=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Ai=e=>(Ie(e)||ce(e))&&ce(e.then)&&ce(e.catch),zl=Object.prototype.toString,vs=e=>zl.call(e),Vi=e=>vs(e).slice(8,-1),Kl=e=>vs(e)==="[object Object]",Ri=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,go=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ah=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),gs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lh=/-(\w)/g,Ct=gs(e=>e.replace(lh,(t,n)=>n?n.toUpperCase():"")),uh=/\B([A-Z])/g,mn=gs(e=>e.replace(uh,"-$1").toLowerCase()),sr=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),ir=gs(e=>e?`on${sr(e)}`:""),Vn=(e,t)=>!Object.is(e,t),yo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ys=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ch=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dh=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let Gl;const ji=()=>Gl||(Gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Li(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?mh(r):Li(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const fh=/;(?![^(]*\))/g,ph=/:([^]+)/,hh=/\/\*[^]*?\*\//g;function mh(e){const t={};return e.replace(hh,"").split(fh).forEach(n=>{if(n){const r=n.split(ph);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function bs(e){let t="";if(Ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const r=bs(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const vh="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",gh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",yh="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",bh=hn(vh),_h=hn(gh),wh=hn(yh),Eh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Jl(e){return!!e||e===""}const Yl=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":le(e)||Ie(e)&&(e.toString===zl||!ce(e.toString))?Yl(e)?K(e.value):JSON.stringify(e,Xl,2):String(e),Xl=(e,t)=>Yl(t)?Xl(e,t.value):or(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Mi(r,s)+" =>"]=o,n),{})}:Wl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Mi(n))}:An(t)?Mi(t):Ie(t)&&!le(t)&&!Kl(t)?String(t):t,Mi=(e,t="")=>{var n;return An(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class Ql{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&&gt&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function eu(e){return new Ql(e)}function tu(){return gt}function Oh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Ui=new WeakSet;class nu{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&&gt.active&&gt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ui.has(this)&&(Ui.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=bo,bo=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,lu(this),ou(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),su(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Zi(t);this.deps=this.depsTail=void 0,lu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ui.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Hi(this)&&this.run()}get dirty(){return Hi(this)}}let ru=0,bo;function Fi(){ru++}function Bi(){if(--ru>0)return;let e;for(;bo;){let t=bo;for(bo=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function ou(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function su(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Zi(r),Nh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function Hi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&iu(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function iu(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_o))return;e.globalVersion=_o;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!Hi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{ou(e);const o=e.fn(e._value);(t.version===0||Vn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,su(e),e.flags&=-3}}function Zi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Zi(o)}}function Nh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const au=[];function vn(){au.push(Bt),Bt=!1}function gn(){const e=au.pop();Bt=e===void 0?!0:e}function lu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let _o=0;class qi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&uu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,_o++,this.notify(t)}notify(t){Fi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Bi()}}}function uu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)uu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const _s=new WeakMap,ar=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Wi=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),wo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function Qe(e,t,n){if(Bt&&Ae){let r=_s.get(e);r||_s.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new qi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Qt(e,t,n,r,o,s){const i=_s.get(e);if(!i){_o++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=le(e),u=l&&Ri(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===wo||!An(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(wo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ar)),or(e)&&c(i.get(Wi)));break;case"delete":l||(c(i.get(ar)),or(e)&&c(i.get(Wi)));break;case"set":or(e)&&c(i.get(ar));break}}}Fi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Bi()}function Sh(e,t){var n;return(n=_s.get(e))==null?void 0:n.get(t)}function jr(e){const t=ye(e);return t===e?t:(Qe(t,"iterate",wo),Ot(e)?t:t.map(ct))}function ws(e){return Qe(e=ye(e),"iterate",wo),e}const xh={__proto__:null,[Symbol.iterator](){return zi(this,Symbol.iterator,ct)},concat(...e){return jr(this).concat(...e.map(t=>le(t)?jr(t):t))},entries(){return zi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ki(this,"includes",e)},indexOf(...e){return Ki(this,"indexOf",e)},join(e){return jr(this).join(e)},lastIndexOf(...e){return Ki(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Eo(this,"pop")},push(...e){return Eo(this,"push",e)},reduce(e,...t){return cu(this,"reduce",e,t)},reduceRight(e,...t){return cu(this,"reduceRight",e,t)},shift(){return Eo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Eo(this,"splice",e)},toReversed(){return jr(this).toReversed()},toSorted(e){return jr(this).toSorted(e)},toSpliced(...e){return jr(this).toSpliced(...e)},unshift(...e){return Eo(this,"unshift",e)},values(){return zi(this,"values",ct)}};function zi(e,t,n){const r=ws(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const kh=Array.prototype;function yn(e,t,n,r,o,s){const i=ws(e),a=i!==e&&!Ot(e),l=i[t];if(l!==kh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function cu(e,t,n,r){const o=ws(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Ki(e,t,n){const r=ye(e);Qe(r,"iterate",wo);const o=r[t](...n);return(o===-1||o===!1)&&No(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Eo(e,t,n=[]){vn(),Fi();const r=ye(e)[t].apply(e,n);return Bi(),gn(),r}const Th=hn("__proto__,__v_isRef,__isVue"),du=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function Ch(e){An(e)||(e=String(e));const t=ye(this);return Qe(t,"has",e),t.hasOwnProperty(e)}class fu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Ou:Eu:s?wu:_u).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=le(t);if(!o){let l;if(i&&(l=xh[n]))return l;if(n==="hasOwnProperty")return Ch}const a=Reflect.get(t,n,qe(t)?t:r);return(An(n)?du.has(n):Th(n))||(o||Qe(t,"get",n),s)?a:qe(a)?i&&Ri(n)?a:a.value:Ie(a)?o?Nu(a):Oo(a):a}}class pu extends fu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!le(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=le(t)&&Ri(n)?Number(n)<t.length:$e(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Vn(r,s)&&Qt(t,"set",n,r,s):Qt(t,"add",n,r)),a}deleteProperty(t,n){const r=$e(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Qt(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!An(n)||!du.has(n))&&Qe(t,"has",n),r}ownKeys(t){return Qe(t,"iterate",le(t)?"length":ar),Reflect.ownKeys(t)}}class hu extends fu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Ph=new pu,$h=new hu,Dh=new pu(!0),Ih=new hu(!0),Gi=e=>e,Es=e=>Reflect.getPrototypeOf(e);function Os(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Vn(t,s)&&Qe(o,"get",t),Qe(o,"get",s));const{has:i}=Es(o),a=r?Gi:n?Ji:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function Ns(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Vn(e,o)&&Qe(r,"has",e),Qe(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ss(e,t=!1){return e=e.__v_raw,!t&&Qe(ye(e),"iterate",ar),Reflect.get(e,"size",e)}function mu(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return Es(n).has.call(n,e)||(n.add(e),Qt(n,"add",e,e)),this}function vu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Es(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&bu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Vn(t,a)&&Qt(r,"set",e,t,a):Qt(r,"add",e,t),this}function gu(e){const t=ye(this),{has:n,get:r}=Es(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&bu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Qt(t,"delete",e,void 0,s),i}function yu(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?or(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Qt(e,"clear",void 0,void 0,n),r}function xs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Gi:e?Ji:ct;return!e&&Qe(a,"iterate",ar),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function ks(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=or(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Gi:t?Ji:ct;return!t&&Qe(s,"iterate",l?Wi:ar),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Rn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${sr(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ah(){const e={get(s){return Os(this,s)},get size(){return Ss(this)},has:Ns,add:mu,set:vu,delete:gu,clear:yu,forEach:xs(!1,!1)},t={get(s){return Os(this,s,!1,!0)},get size(){return Ss(this)},has:Ns,add(s){return mu.call(this,s,!0)},set(s,i){return vu.call(this,s,i,!0)},delete:gu,clear:yu,forEach:xs(!1,!0)},n={get(s){return Os(this,s,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!1)},r={get(s){return Os(this,s,!0,!0)},get size(){return Ss(this,!0)},has(s){return Ns.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:xs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=ks(s,!1,!1),n[s]=ks(s,!0,!1),t[s]=ks(s,!1,!0),r[s]=ks(s,!0,!0)}),[e,n,t,r]}const[Vh,Rh,jh,Lh]=Ah();function Ts(e,t){const n=t?e?Lh:jh:e?Rh:Vh;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get($e(n,o)&&o in r?n:r,o,s)}const Mh={get:Ts(!1,!1)},Uh={get:Ts(!1,!0)},Fh={get:Ts(!0,!1)},Bh={get:Ts(!0,!0)};function bu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=Vi(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const _u=new WeakMap,wu=new WeakMap,Eu=new WeakMap,Ou=new WeakMap;function Hh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zh(e){return e.__v_skip||!Object.isExtensible(e)?0:Hh(Vi(e))}function Oo(e){return bn(e)?e:Cs(e,!1,Ph,Mh,_u)}function qh(e){return Cs(e,!1,Dh,Uh,wu)}function Nu(e){return Cs(e,!0,$h,Fh,Eu)}function en(e){return Cs(e,!0,Ih,Bh,Ou)}function Cs(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Zh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function tn(e){return bn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function No(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function jn(e){return Object.isExtensible(e)&&ys(e,"__v_skip",!0),e}const ct=e=>Ie(e)?Oo(e):e,Ji=e=>Ie(e)?Nu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function C(e){return Su(e,!1)}function Wh(e){return Su(e,!0)}function Su(e,t){return qe(e)?e:new zh(e,t)}class zh{constructor(t,n){this.dep=new qi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Vn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Kh(e){return ce(e)?e():_(e)}const Gh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function xu(e){return tn(e)?e:new Proxy(e,Gh)}function ku(e){Ve.NODE_ENV!=="production"&&!No(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=le(e)?new Array(e.length):{};for(const n in e)t[n]=Tu(e,n);return t}class Jh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Sh(ye(this._object),this._key)}}class Yh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Yi(e,t,n){return qe(e)?e:ce(e)?new Yh(e):Ie(e)&&arguments.length>1?Tu(e,t,n):C(e)}function Tu(e,t,n){const r=e[t];return qe(r)?r:new Jh(e,t,n)}class Xh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_o-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return iu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function Qh(e,t,n=!1){let r,o;ce(e)?r=e:(r=e.get,o=e.set);const s=new Xh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const Ps={},$s=new WeakMap;let lr;function em(e,t=!1,n=lr){if(n){let r=$s.get(n);r||$s.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function tm(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=S=>{(n.onWarn||At)("Invalid watch source: ",S,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=S=>o?S:Ot(S)||o===!1||o===0?Ln(S,1):Ln(S);let d,f,v,b,O=!1,w=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):tn(e)?(f=()=>c(e),O=!0):le(e)?(w=!0,O=e.some(S=>tn(S)||Ot(S)),f=()=>e.map(S=>{if(qe(S))return S.value;if(tn(S))return c(S);if(ce(S))return l?l(S,2):S();Ve.NODE_ENV!=="production"&&u(S)})):ce(e)?t?f=l?()=>l(e,2):e:f=()=>{if(v){vn();try{v()}finally{gn()}}const S=lr;lr=d;try{return l?l(e,3,[b]):e(b)}finally{lr=S}}:(f=Xe,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const S=f,U=o===!0?1/0:o;f=()=>Ln(S(),U)}const D=tu(),H=()=>{d.stop(),D&&Ii(D.effects,d)};if(s)if(t){const S=t;t=(...U)=>{S(...U),H()}}else{const S=f;f=()=>{S(),H()}}let T=w?new Array(e.length).fill(Ps):Ps;const te=S=>{if(!(!(d.flags&1)||!d.dirty&&!S))if(t){const U=d.run();if(o||O||(w?U.some((j,ge)=>Vn(j,T[ge])):Vn(U,T))){v&&v();const j=lr;lr=d;try{const ge=[U,T===Ps?void 0:w&&T[0]===Ps?[]:T,b];l?l(t,3,ge):t(...ge),T=U}finally{lr=j}}}else d.run()};return a&&a(te),d=new nu(f),d.scheduler=i?()=>i(te,!1):te,b=S=>em(S,!1,d),v=d.onStop=()=>{const S=$s.get(d);if(S){if(l)l(S,4);else for(const U of S)U();$s.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?te(!0):T=d.run():i?i(te.bind(null,!0),!0):d.run(),H.pause=d.pause.bind(d),H.resume=d.resume.bind(d),H.stop=H,H}function Ln(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Ln(e.value,t,n);else if(le(e))for(let r=0;r<e.length;r++)Ln(e[r],t,n);else if(Wl(e)||or(e))e.forEach(r=>{Ln(r,t,n)});else if(Kl(e)){for(const r in e)Ln(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ln(e[r],t,n)}return e}var g={};const ur=[];function Ds(e){ur.push(e)}function Is(){ur.pop()}let Xi=!1;function F(e,...t){if(Xi)return;Xi=!0,vn();const n=ur.length?ur[ur.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=nm();if(r)Lr(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Js(n,s.type)}>`).join(`
7
+ **//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=Kl.NODE_ENV!=="production"?Object.freeze({}):{},Rr=Kl.NODE_ENV!=="production"?Object.freeze([]):[],Xe=()=>{},Qp=()=>!1,mo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ps=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Ii=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},eh=Object.prototype.hasOwnProperty,De=(e,t)=>eh.call(e,t),le=Array.isArray,sr=e=>hs(e)==="[object Map]",Gl=e=>hs(e)==="[object Set]",ce=e=>typeof e=="function",Ze=e=>typeof e=="string",An=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Ai=e=>(Ie(e)||ce(e))&&ce(e.then)&&ce(e.catch),Jl=Object.prototype.toString,hs=e=>Jl.call(e),Vi=e=>hs(e).slice(8,-1),Yl=e=>hs(e)==="[object Object]",Ri=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vo=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),th=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ms=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},nh=/-(\w)/g,Ct=ms(e=>e.replace(nh,(t,n)=>n?n.toUpperCase():"")),rh=/\B([A-Z])/g,mn=ms(e=>e.replace(rh,"-$1").toLowerCase()),ir=ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),ar=ms(e=>e?`on${ir(e)}`:""),Vn=(e,t)=>!Object.is(e,t),go=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},vs=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sh=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let Xl;const ji=()=>Xl||(Xl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Li(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?uh(r):Li(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const ih=/;(?![^(]*\))/g,ah=/:([^]+)/,lh=/\/\*[^]*?\*\//g;function uh(e){const t={};return e.replace(lh,"").split(ih).forEach(n=>{if(n){const r=n.split(ah);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function gs(e){let t="";if(Ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const r=gs(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ch="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",dh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",fh="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",ph=hn(ch),hh=hn(dh),mh=hn(fh),vh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Ql(e){return!!e||e===""}const eu=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":le(e)||Ie(e)&&(e.toString===Jl||!ce(e.toString))?eu(e)?K(e.value):JSON.stringify(e,tu,2):String(e),tu=(e,t)=>eu(t)?tu(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Mi(r,s)+" =>"]=o,n),{})}:Gl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Mi(n))}:An(t)?Mi(t):Ie(t)&&!le(t)&&!Yl(t)?String(t):t,Mi=(e,t="")=>{var n;return An(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class nu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&&gt&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function ru(e){return new nu(e)}function ou(){return gt}function gh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Ui=new WeakSet;class su{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&&gt.active&&gt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ui.has(this)&&(Ui.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=yo,yo=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,du(this),au(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),lu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Zi(t);this.deps=this.depsTail=void 0,du(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ui.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Hi(this)&&this.run()}get dirty(){return Hi(this)}}let iu=0,yo;function Fi(){iu++}function Bi(){if(--iu>0)return;let e;for(;yo;){let t=yo;for(yo=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function au(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function lu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Zi(r),yh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function Hi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&uu(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function uu(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bo))return;e.globalVersion=bo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!Hi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{au(e);const o=e.fn(e._value);(t.version===0||Vn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,lu(e),e.flags&=-3}}function Zi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Zi(o)}}function yh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const cu=[];function vn(){cu.push(Bt),Bt=!1}function gn(){const e=cu.pop();Bt=e===void 0?!0:e}function du(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let bo=0;class qi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&fu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,bo++,this.notify(t)}notify(t){Fi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Bi()}}}function fu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)fu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const ys=new WeakMap,lr=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Wi=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),_o=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function Qe(e,t,n){if(Bt&&Ae){let r=ys.get(e);r||ys.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new qi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Qt(e,t,n,r,o,s){const i=ys.get(e);if(!i){bo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=le(e),u=l&&Ri(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===_o||!An(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(_o)),t){case"add":l?u&&c(i.get("length")):(c(i.get(lr)),sr(e)&&c(i.get(Wi)));break;case"delete":l||(c(i.get(lr)),sr(e)&&c(i.get(Wi)));break;case"set":sr(e)&&c(i.get(lr));break}}}Fi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Bi()}function bh(e,t){var n;return(n=ys.get(e))==null?void 0:n.get(t)}function jr(e){const t=ye(e);return t===e?t:(Qe(t,"iterate",_o),Ot(e)?t:t.map(ct))}function bs(e){return Qe(e=ye(e),"iterate",_o),e}const _h={__proto__:null,[Symbol.iterator](){return zi(this,Symbol.iterator,ct)},concat(...e){return jr(this).concat(...e.map(t=>le(t)?jr(t):t))},entries(){return zi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ki(this,"includes",e)},indexOf(...e){return Ki(this,"indexOf",e)},join(e){return jr(this).join(e)},lastIndexOf(...e){return Ki(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return wo(this,"pop")},push(...e){return wo(this,"push",e)},reduce(e,...t){return pu(this,"reduce",e,t)},reduceRight(e,...t){return pu(this,"reduceRight",e,t)},shift(){return wo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return wo(this,"splice",e)},toReversed(){return jr(this).toReversed()},toSorted(e){return jr(this).toSorted(e)},toSpliced(...e){return jr(this).toSpliced(...e)},unshift(...e){return wo(this,"unshift",e)},values(){return zi(this,"values",ct)}};function zi(e,t,n){const r=bs(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const wh=Array.prototype;function yn(e,t,n,r,o,s){const i=bs(e),a=i!==e&&!Ot(e),l=i[t];if(l!==wh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function pu(e,t,n,r){const o=bs(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Ki(e,t,n){const r=ye(e);Qe(r,"iterate",_o);const o=r[t](...n);return(o===-1||o===!1)&&Oo(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function wo(e,t,n=[]){vn(),Fi();const r=ye(e)[t].apply(e,n);return Bi(),gn(),r}const Eh=hn("__proto__,__v_isRef,__isVue"),hu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function Oh(e){An(e)||(e=String(e));const t=ye(this);return Qe(t,"has",e),t.hasOwnProperty(e)}class mu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?xu:Su:s?Nu:Ou).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=le(t);if(!o){let l;if(i&&(l=_h[n]))return l;if(n==="hasOwnProperty")return Oh}const a=Reflect.get(t,n,qe(t)?t:r);return(An(n)?hu.has(n):Eh(n))||(o||Qe(t,"get",n),s)?a:qe(a)?i&&Ri(n)?a:a.value:Ie(a)?o?ku(a):Eo(a):a}}class vu extends mu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!le(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=le(t)&&Ri(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Vn(r,s)&&Qt(t,"set",n,r,s):Qt(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Qt(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!An(n)||!hu.has(n))&&Qe(t,"has",n),r}ownKeys(t){return Qe(t,"iterate",le(t)?"length":lr),Reflect.ownKeys(t)}}class gu extends mu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Nh=new vu,Sh=new gu,xh=new vu(!0),kh=new gu(!0),Gi=e=>e,_s=e=>Reflect.getPrototypeOf(e);function ws(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Vn(t,s)&&Qe(o,"get",t),Qe(o,"get",s));const{has:i}=_s(o),a=r?Gi:n?Ji:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function Es(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Vn(e,o)&&Qe(r,"has",e),Qe(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Os(e,t=!1){return e=e.__v_raw,!t&&Qe(ye(e),"iterate",lr),Reflect.get(e,"size",e)}function yu(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return _s(n).has.call(n,e)||(n.add(e),Qt(n,"add",e,e)),this}function bu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=_s(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Eu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Vn(t,a)&&Qt(r,"set",e,t,a):Qt(r,"add",e,t),this}function _u(e){const t=ye(this),{has:n,get:r}=_s(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Eu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Qt(t,"delete",e,void 0,s),i}function wu(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?sr(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Qt(e,"clear",void 0,void 0,n),r}function Ns(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Gi:e?Ji:ct;return!e&&Qe(a,"iterate",lr),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function Ss(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=sr(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Gi:t?Ji:ct;return!t&&Qe(s,"iterate",l?Wi:lr),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Rn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ir(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Th(){const e={get(s){return ws(this,s)},get size(){return Os(this)},has:Es,add:yu,set:bu,delete:_u,clear:wu,forEach:Ns(!1,!1)},t={get(s){return ws(this,s,!1,!0)},get size(){return Os(this)},has:Es,add(s){return yu.call(this,s,!0)},set(s,i){return bu.call(this,s,i,!0)},delete:_u,clear:wu,forEach:Ns(!1,!0)},n={get(s){return ws(this,s,!0)},get size(){return Os(this,!0)},has(s){return Es.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:Ns(!0,!1)},r={get(s){return ws(this,s,!0,!0)},get size(){return Os(this,!0)},has(s){return Es.call(this,s,!0)},add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear"),forEach:Ns(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Ss(s,!1,!1),n[s]=Ss(s,!0,!1),t[s]=Ss(s,!1,!0),r[s]=Ss(s,!0,!0)}),[e,n,t,r]}const[Ch,Ph,Dh,$h]=Th();function xs(e,t){const n=t?e?$h:Dh:e?Ph:Ch;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Ih={get:xs(!1,!1)},Ah={get:xs(!1,!0)},Vh={get:xs(!0,!1)},Rh={get:xs(!0,!0)};function Eu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=Vi(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Ou=new WeakMap,Nu=new WeakMap,Su=new WeakMap,xu=new WeakMap;function jh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Lh(e){return e.__v_skip||!Object.isExtensible(e)?0:jh(Vi(e))}function Eo(e){return bn(e)?e:ks(e,!1,Nh,Ih,Ou)}function Mh(e){return ks(e,!1,xh,Ah,Nu)}function ku(e){return ks(e,!0,Sh,Vh,Su)}function en(e){return ks(e,!0,kh,Rh,xu)}function ks(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Lh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function tn(e){return bn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function Oo(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function jn(e){return Object.isExtensible(e)&&vs(e,"__v_skip",!0),e}const ct=e=>Ie(e)?Eo(e):e,Ji=e=>Ie(e)?ku(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function C(e){return Tu(e,!1)}function Uh(e){return Tu(e,!0)}function Tu(e,t){return qe(e)?e:new Fh(e,t)}class Fh{constructor(t,n){this.dep=new qi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Vn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Bh(e){return ce(e)?e():_(e)}const Hh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Cu(e){return tn(e)?e:new Proxy(e,Hh)}function Pu(e){Ve.NODE_ENV!=="production"&&!Oo(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=le(e)?new Array(e.length):{};for(const n in e)t[n]=Du(e,n);return t}class Zh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return bh(ye(this._object),this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Yi(e,t,n){return qe(e)?e:ce(e)?new qh(e):Ie(e)&&arguments.length>1?Du(e,t,n):C(e)}function Du(e,t,n){const r=e[t];return qe(r)?r:new Zh(e,t,n)}class Wh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return uu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function zh(e,t,n=!1){let r,o;ce(e)?r=e:(r=e.get,o=e.set);const s=new Wh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const Ts={},Cs=new WeakMap;let ur;function Kh(e,t=!1,n=ur){if(n){let r=Cs.get(n);r||Cs.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gh(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=S=>{(n.onWarn||At)("Invalid watch source: ",S,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=S=>o?S:Ot(S)||o===!1||o===0?Ln(S,1):Ln(S);let d,f,m,b,O=!1,w=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):tn(e)?(f=()=>c(e),O=!0):le(e)?(w=!0,O=e.some(S=>tn(S)||Ot(S)),f=()=>e.map(S=>{if(qe(S))return S.value;if(tn(S))return c(S);if(ce(S))return l?l(S,2):S();Ve.NODE_ENV!=="production"&&u(S)})):ce(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){vn();try{m()}finally{gn()}}const S=ur;ur=d;try{return l?l(e,3,[b]):e(b)}finally{ur=S}}:(f=Xe,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const S=f,U=o===!0?1/0:o;f=()=>Ln(S(),U)}const $=ou(),H=()=>{d.stop(),$&&Ii($.effects,d)};if(s)if(t){const S=t;t=(...U)=>{S(...U),H()}}else{const S=f;f=()=>{S(),H()}}let T=w?new Array(e.length).fill(Ts):Ts;const te=S=>{if(!(!(d.flags&1)||!d.dirty&&!S))if(t){const U=d.run();if(o||O||(w?U.some((j,ge)=>Vn(j,T[ge])):Vn(U,T))){m&&m();const j=ur;ur=d;try{const ge=[U,T===Ts?void 0:w&&T[0]===Ts?[]:T,b];l?l(t,3,ge):t(...ge),T=U}finally{ur=j}}}else d.run()};return a&&a(te),d=new su(f),d.scheduler=i?()=>i(te,!1):te,b=S=>Kh(S,!1,d),m=d.onStop=()=>{const S=Cs.get(d);if(S){if(l)l(S,4);else for(const U of S)U();Cs.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?te(!0):T=d.run():i?i(te.bind(null,!0),!0):d.run(),H.pause=d.pause.bind(d),H.resume=d.resume.bind(d),H.stop=H,H}function Ln(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Ln(e.value,t,n);else if(le(e))for(let r=0;r<e.length;r++)Ln(e[r],t,n);else if(Gl(e)||sr(e))e.forEach(r=>{Ln(r,t,n)});else if(Yl(e)){for(const r in e)Ln(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ln(e[r],t,n)}return e}var g={};const cr=[];function Ps(e){cr.push(e)}function Ds(){cr.pop()}let Xi=!1;function F(e,...t){if(Xi)return;Xi=!0,vn();const n=cr.length?cr[cr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Jh();if(r)Lr(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Ks(n,s.type)}>`).join(`
8
8
  `),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
9
- `,...rm(o)),console.warn(...s)}gn(),Xi=!1}function nm(){let e=ur[ur.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function rm(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
10
- `],...om(n))}),t}function om({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Js(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...sm(e.props),s]:[o+s]}function sm(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Cu(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Cu(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Cu(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ce(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function im(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const Qi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Lr(e,t,n,r){try{return r?e(...r):e()}catch(o){So(o,t,n)}}function Ht(e,t,n,r){if(ce(e)){const o=Lr(e,t,n,r);return o&&Ai(o)&&o.catch(s=>{So(s,t,n)}),o}if(le(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function So(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?Qi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Lr(s,null,10,[e,l,u]),gn();return}}am(e,n,o,r,i)}function am(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=Qi[t];if(n&&Ds(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Is(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let xo=!1,ea=!1;const yt=[];let nn=0;const Mr=[];let Mn=null,Ur=0;const Pu=Promise.resolve();let ta=null;const lm=100;function ko(e){const t=ta||Pu;return e?t.then(this?e.bind(this):e):t}function um(e){let t=xo?nn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=To(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function As(e){if(!(e.flags&1)){const t=To(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=To(n)?yt.push(e):yt.splice(um(t),0,e),e.flags|=1,$u()}}function $u(){!xo&&!ea&&(ea=!0,ta=Pu.then(Vu))}function Du(e){le(e)?Mr.push(...e):Mn&&e.id===-1?Mn.splice(Ur+1,0,e):e.flags&1||(Mr.push(e),e.flags|=1),$u()}function Iu(e,t,n=xo?nn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&na(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Au(e){if(Mr.length){const t=[...new Set(Mr)].sort((n,r)=>To(n)-To(r));if(Mr.length=0,Mn){Mn.push(...t);return}for(Mn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Ur=0;Ur<Mn.length;Ur++){const n=Mn[Ur];g.NODE_ENV!=="production"&&na(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Mn=null,Ur=0}}const To=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vu(e){ea=!1,xo=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>na(e,n):Xe;try{for(nn=0;nn<yt.length;nn++){const n=yt[nn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Lr(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;nn<yt.length;nn++){const n=yt[nn];n&&(n.flags&=-2)}nn=0,yt.length=0,Au(e),xo=!1,ta=null,(yt.length||Mr.length)&&Vu(e)}}function na(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>lm){const r=t.i,o=r&&Ia(r.type);return So(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Un=!1;const Vs=new Map;g.NODE_ENV!=="production"&&(ji().__VUE_HMR_RUNTIME__={createRecord:ra(Ru),rerender:ra(fm),reload:ra(pm)});const cr=new Map;function cm(e){const t=e.type.__hmrId;let n=cr.get(t);n||(Ru(t,e.type),n=cr.get(t)),n.instances.add(e)}function dm(e){cr.get(e.type.__hmrId).instances.delete(e)}function Ru(e,t){return cr.has(e)?!1:(cr.set(e,{initialDef:Rs(t),instances:new Set}),!0)}function Rs(e){return Bc(e)?e.__vccOpts:e}function fm(e,t){const n=cr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Rs(r.type).render=t),r.renderCache=[],Un=!0,r.update(),Un=!1}))}function pm(e,t){const n=cr.get(e);if(!n)return;t=Rs(t),ju(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Rs(s.type);let a=Vs.get(i);a||(i!==n.initialDef&&ju(i,t),Vs.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?As(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}Du(()=>{Vs.clear()})}function ju(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ra(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let rn,Co=[],oa=!1;function Po(e,...t){rn?rn.emit(e,...t):oa||Co.push({event:e,args:t})}function Lu(e,t){var n,r;rn=e,rn?(rn.enabled=!0,Co.forEach(({event:o,args:s})=>rn.emit(o,...s)),Co=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Lu(s,t)}),setTimeout(()=>{rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,oa=!0,Co=[])},3e3)):(oa=!0,Co=[])}function hm(e,t){Po("app:init",e,t,{Fragment:xe,Text:Ro,Comment:Ge,Static:jo})}function mm(e){Po("app:unmount",e)}const vm=sa("component:added"),Mu=sa("component:updated"),gm=sa("component:removed"),ym=e=>{rn&&typeof rn.cleanupBuffer=="function"&&!rn.cleanupBuffer(e)&&gm(e)};/*! #__NO_SIDE_EFFECTS__ */function sa(e){return t=>{Po(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const bm=Uu("perf:start"),_m=Uu("perf:end");function Uu(e){return(t,n,r)=>{Po(e,t.appContext.app,t.uid,t,n,r)}}function wm(e,t,n){Po("component:emit",e.appContext.app,e,t,n)}let et=null,Fu=null;function js(e){const t=et;return et=e,Fu=e&&e.type.__scopeId||null,t}function _e(e,t=et,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Dc(-1);const s=js(t);let i;try{i=e(...o)}finally{js(s),r._d&&Dc(1)}return g.NODE_ENV!=="production"&&Mu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function Bu(e){ah(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function dr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Hu=Symbol("_vte"),Zu=e=>e.__isTeleport,fr=e=>e&&(e.disabled||e.disabled===""),Em=e=>e&&(e.defer||e.defer===""),qu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Wu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ia=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!fr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!fr(e)&&F(`Invalid Teleport target: ${n}`),n},Om={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:v,querySelector:b,createText:O,createComment:w}}=u,D=fr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Un&&(l=!1,te=null),e==null){const S=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");v(S,n,r),v(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=ia(t.props,b),A=zu(q,t,O,v);q?(i!=="svg"&&qu(q)?i="svg":i!=="mathml"&&Wu(q)&&(i="mathml"),D||(j(q,A),Ms(t))):g.NODE_ENV!=="production"&&!D&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};D&&(j(n,U),Ms(t)),Em(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=fr(e.props),q=ge?n:U,A=ge?S:j;if(i==="svg"||qu(U)?i="svg":(i==="mathml"||Wu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Vo(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),D)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ls(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=ia(t.props,b);V?Ls(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Ls(t,U,j,u,1);Ms(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const v=s||!fr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,v,!!O.dynamicChildren)}}},move:Ls,hydrate:Nm};function Ls(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||fr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function Nm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=ia(t.props,l);if(f){const v=f._lpa||f.firstChild;if(t.shapeFlag&16)if(fr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=v,t.targetAnchor=v&&i(v);else{t.anchor=i(e);let b=v;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||zu(f,t,c,u),d(v&&i(v),t,f,n,r,o,s)}Ms(t)}return t.anchor&&i(t.anchor)}const Sm=Om;function Ms(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function zu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Hu]=s,e&&(r(o,e),r(s,e)),s}const Fn=Symbol("_leaveCb"),Us=Symbol("_enterCb");function xm(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),ca(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Ku={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},Gu=e=>{const t=e.subTree;return t.component?Gu(t.component):t},km={name:"BaseTransition",props:Ku,setup(e,{slots:t}){const n=zs(),r=xm();return()=>{const o=t.default&&Qu(t.default(),!0);if(!o||!o.length)return;const s=Ju(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return la(s);const l=Xu(s);if(!l)return la(s);let u=aa(l,i,r,n,f=>u=f);l.type!==Ge&&$o(l,u);const c=n.subTree,d=c&&Xu(c);if(d&&d.type!==Ge&&!vr(l,d)&&Gu(n).type!==Ge){const f=aa(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},la(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(v,b,O)=>{const w=Yu(r,d);w[String(d.key)]=d,v[Fn]=()=>{b(),v[Fn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function Ju(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Tm=km;function Yu(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function aa(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:v,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:D,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),S=Yu(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),le(q)?q.every($=>$.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Fn]&&q[Fn](!0);const V=S[te];V&&vr(e,V)&&V.el[Fn]&&V.el[Fn](),U(A,[q])},enter(q){let A=u,V=c,$=d;if(!n.isMounted)if(s)A=D||u,V=H||c,$=T||d;else return;let ie=!1;const De=q[Us]=E=>{ie||(ie=!0,E?U($,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Us]=void 0)};A?j(A,[q,De]):De()},leave(q,A){const V=String(e.key);if(q[Us]&&q[Us](!0),n.isUnmounting)return A();U(f,[q]);let $=!1;const ie=q[Fn]=De=>{$||($=!0,A(),De?U(O,[q]):U(b,[q]),q[Fn]=void 0,S[V]===e&&delete S[V])};S[V]=e,v?j(v,[q,ie]):ie()},clone(q){const A=aa(q,t,n,r,o);return o&&o(A),A}};return ge}function la(e){if(Do(e))return e=Zt(e),e.children=null,e}function Xu(e){if(!Do(e))return Zu(e.type)&&e.children?Ju(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ce(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Qu(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(Qu(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function de(e,t){return ce(e)?Ke({name:e.name},t,{setup:e}):e}function ec(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Cm=new WeakSet;function ua(e,t,n,r,o=!1){if(le(e)){e.forEach((b,O)=>ua(b,t&&(le(t)?t[O]:t),n,r,o));return}if(Fr(r)&&!o)return;const s=r.shapeFlag&4?Da(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),v=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Cm.has(f[b])?!1:$e(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,v(u)&&(d[u]=null)):qe(u)&&(u.value=null)),ce(l))Lr(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const D=b?v(l)?d[l]:c[l]:l.value;o?le(D)&&Ii(D,s):le(D)?D.includes(s)||D.push(s):b?(c[l]=[s],v(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,v(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Fr=e=>!!e.type.__asyncLoader,Do=e=>e.type.__isKeepAlive;function Pm(e,t){tc(e,"a",t)}function $m(e,t){tc(e,"da",t)}function tc(e,t,n=Je){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Fs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Do(o.parent.vnode)&&Dm(r,t,n,o),o=o.parent}}function Dm(e,t,n,r){const o=Fs(t,e,r,!0);bt(()=>{Ii(r[t],o)},n)}function Fs(e,t,n=Je,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Uo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=ir(Qi[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Je)=>{(!Gs||e==="sp")&&Fs(e,(...r)=>t(...r),n)},Im=_n("bm"),Le=_n("m"),Am=_n("bu"),Vm=_n("u"),ca=_n("bum"),bt=_n("um"),Rm=_n("sp"),jm=_n("rtg"),Lm=_n("rtc");function Mm(e,t=Je){Fs("ec",e,t)}const Um="components",nc=Symbol.for("v-ndc");function da(e){return Ze(e)?Fm(Um,e,!1)||e:e||nc}function Fm(e,t,n=!0,r=!1){const o=et||Je;if(o){const s=o.type;{const a=Ia(s,!1);if(a&&(a===t||a===Ct(t)||a===sr(Ct(t))))return s}const i=rc(o[e]||s[e],t)||rc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
11
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${sr(e.slice(0,-1))} can only be used in render() or setup().`)}function rc(e,t){return e&&(e[t]||e[Ct(t)]||e[sr(Ct(t))])}function on(e,t,n,r){let o;const s=n,i=le(e);if(i||Ze(e)){const a=i&&tn(e);a&&(e=ws(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function fa(e,t,n={},r,o){if(et.ce||et.parent&&Fr(et.parent)&&et.parent.ce)return y(),Ne(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&oc(s(n)),a=Ne(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function oc(e){return e.some(t=>Br(t)?!(t.type===Ge||t.type===xe&&!oc(t.children)):!0)?e:null}const pa=e=>e?Lc(e)?Da(e):pa(e.parent):null,pr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?en(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?en(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?en(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?en(e.refs):e.refs,$parent:e=>pa(e.parent),$root:e=>pa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ga(e),$forceUpdate:e=>e.f||(e.f=()=>{As(e.update)}),$nextTick:e=>e.n||(e.n=ko.bind(e.proxy)),$watch:e=>_v.bind(e)}),ha=e=>e==="_"||e==="$",ma=(e,t)=>e!==je&&!e.__isScriptSetup&&$e(e,t),sc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ma(r,t))return i[t]=1,r[t];if(o!==je&&$e(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&$e(u,t))return i[t]=3,s[t];if(n!==je&&$e(n,t))return i[t]=4,n[t];va&&(i[t]=0)}}const c=pr[t];let d,f;if(c)return t==="$attrs"?(Qe(e.attrs,"get",""),g.NODE_ENV!=="production"&&qs()):g.NODE_ENV!=="production"&&t==="$slots"&&Qe(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&$e(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,$e(f,t))return f[t];g.NODE_ENV!=="production"&&et&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&ha(t[0])&&$e(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===et&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ma(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&$e(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&$e(r,t)?(r[t]=n,!0):$e(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&$e(e,i)||ma(t,i)||(a=s[0])&&$e(a,i)||$e(r,i)||$e(pr,i)||$e(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:$e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(sc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Bm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(pr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>pr[n](e),set:Xe})}),t}function Hm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:Xe})})}function Zm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(ha(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:Xe})}})}function ic(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function qm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let va=!0;function Wm(e){const t=ga(e),n=e.proxy,r=e.ctx;va=!1,t.beforeCreate&&ac(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:v,updated:b,activated:O,deactivated:w,beforeDestroy:D,beforeUnmount:H,destroyed:T,unmounted:te,render:S,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:$,directives:ie,filters:De}=t,E=g.NODE_ENV!=="production"?qm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&zm(u,r,E),i)for(const Y in i){const re=i[Y];ce(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!ce(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ai(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=Oo(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),ha(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:Xe})}if(va=!0,s)for(const Y in s){const re=s[Y],he=ce(re)?re.bind(n,n):ce(re.get)?re.get.bind(n,n):Xe;g.NODE_ENV!=="production"&&he===Xe&&F(`Computed property "${Y}" has no getter.`);const oe=!ce(re)&&ce(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:Xe,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)lc(a[Y],r,n,Y);if(l){const Y=ce(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&ac(c,e,"c");function P(Y,re){le(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(Im,d),P(Le,f),P(Am,v),P(Vm,b),P(Pm,O),P($m,w),P(Mm,ge),P(Lm,U),P(jm,j),P(ca,H),P(bt,te),P(Rm,q),le(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});S&&e.render===Xe&&(e.render=S),V!=null&&(e.inheritAttrs=V),$&&(e.components=$),ie&&(e.directives=ie),q&&ec(e)}function zm(e,t,n=Xe){le(e)&&(e=ya(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function ac(e,t,n){Ht(le(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function lc(e,t,n,r){let o=r.includes(".")?xc(n,r):()=>n[r];if(Ze(e)){const s=t[e];ce(s)?tt(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(ce(e))tt(o,e.bind(n));else if(Ie(e))if(le(e))e.forEach(s=>lc(s,t,n,r));else{const s=ce(e.handler)?e.handler.bind(n):t[e.handler];ce(s)?tt(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ga(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Bs(l,u,i,!0)),Bs(l,t,i)),Ie(t)&&s.set(t,l),l}function Bs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Bs(e,s,n,!0),o&&o.forEach(i=>Bs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Km[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Km={data:uc,props:cc,emits:cc,methods:Io,computed:Io,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Io,directives:Io,watch:Jm,provide:uc,inject:Gm};function uc(e,t){return t?e?function(){return Ke(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function Gm(e,t){return Io(ya(e),ya(t))}function ya(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Io(e,t){return e?Ke(Object.create(null),e,t):t}function cc(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:Ke(Object.create(null),ic(e),ic(t??{})):t}function Jm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function dc(){return{app:null,config:{isNativeTag:sh,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 Ym=0;function Xm(e,t){return function(r,o=null){ce(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=dc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:Ym++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Hc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&ce(c.install)?(i.add(c),c.install(u,...d)):ce(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&Pa(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&Bu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const v=u._ceVNode||Z(r,o);return v.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(v),c,f)}),d&&t?t(v,c):e(v,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=v.component,hm(u,Hc)),Da(v.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,mm(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=hr;hr=u;try{return c()}finally{hr=d}}};return u}}let hr=null;function dt(e,t){if(!Je)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Je.provides;const r=Je.parent&&Je.parent.provides;r===n&&(n=Je.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Je||et;if(r||hr){const o=hr?hr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ce(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function Qm(){return!!(Je||et||hr)}const fc={},pc=()=>Object.create(fc),hc=e=>Object.getPrototypeOf(e)===fc;function ev(e,t,n,r=!1){const o={},s=pc();e.propsDefaults=Object.create(null),mc(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&yc(t||{},o,e),n?e.props=r?o:qh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function tv(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function nv(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&tv(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Zs(e.emitsOptions,f))continue;const v=t[f];if(l)if($e(s,f))v!==s[f]&&(s[f]=v,u=!0);else{const b=Ct(f);o[b]=ba(l,a,b,v,e,!1)}else v!==s[f]&&(s[f]=v,u=!0)}}}else{mc(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!$e(t,d)&&((c=mn(d))===d||!$e(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=ba(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!$e(t,d))&&(delete s[d],u=!0)}u&&Qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&yc(t||{},o,e)}function mc(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(go(l))continue;const u=t[l];let c;o&&$e(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Zs(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=ba(o,l,d,u[d],e,!$e(u,d))}}return i}function ba(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=$e(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&ce(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Uo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const rv=new WeakMap;function vc(e,t,n=!1){const r=n?rv:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!ce(e)){const c=d=>{l=!0;const[f,v]=vc(d,t,!0);Ke(i,f),v&&a.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Rr),Rr;if(le(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);gc(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(gc(d)){const f=s[c],v=i[d]=le(f)||ce(f)?{type:f}:Ke({},f),b=v.type;let O=!1,w=!0;if(le(b))for(let D=0;D<b.length;++D){const H=b[D],T=ce(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=ce(b)&&b.name==="Boolean";v[0]=O,v[1]=w,(O||$e(v,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function gc(e){return e[0]!=="$"&&!go(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function ov(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function yc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&sv(s,r[s],i,g.NODE_ENV!=="production"?en(r):r,!$e(e,s)&&!$e(e,mn(s)))}}function sv(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=le(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:v,expectedType:b}=av(t,c[f]);d.push(b||""),u=v}if(!u){F(lv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const iv=hn("String,Number,Boolean,Function,Symbol,BigInt");function av(e,t){let n;const r=ov(t);if(r==="null")n=e===null;else if(iv(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=le(e):n=e instanceof t;return{valid:n,expectedType:r}}function lv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(sr).join(" | ")}`;const o=n[0],s=Vi(t),i=bc(t,o),a=bc(t,s);return n.length===1&&_c(o)&&!uv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,_c(s)&&(r+=`with value ${a}.`),r}function bc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function _c(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function uv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const wc=e=>e[0]==="_"||e==="$stable",_a=e=>le(e)?e.map(qt):[qt(e)],cv=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Je&&(!n||n.root===Je.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),_a(t(...o))),n);return r._c=!1,r},Ec=(e,t,n)=>{const r=e._ctx;for(const o in e){if(wc(o))continue;const s=e[o];if(ce(s))t[o]=cv(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=_a(s);t[o]=()=>i}}},Oc=(e,t)=>{g.NODE_ENV!=="production"&&!Do(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=_a(t);e.slots.default=()=>n},wa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},dv=(e,t,n)=>{const r=e.slots=pc();if(e.vnode.shapeFlag&32){const o=t._;o?(wa(r,t,n),n&&ys(r,"_",o,!0)):Ec(t,r)}else t&&Oc(e,t)},fv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Un?(wa(o,t,n),Qt(e,"set","$slots")):n&&a===1?s=!1:wa(o,t,n):(s=!t.$stable,Ec(t,o)),i=t}else t&&(Oc(e,t),i={default:1});if(s)for(const a in o)!wc(a)&&i[a]==null&&delete o[a]};let Ao,Bn;function wn(e,t){e.appContext.config.performance&&Hs()&&Bn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&bm(e,t,Hs()?Bn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&Hs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Bn.mark(r),Bn.measure(`<${Js(e,e.type)}> ${t}`,n,r),Bn.clearMarks(n),Bn.clearMarks(r)}g.NODE_ENV!=="production"&&_m(e,t,Hs()?Bn.now():Date.now())}function Hs(){return Ao!==void 0||(typeof window<"u"&&window.performance?(Ao=!0,Bn=window.performance):Ao=!1),Ao}function pv(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
9
+ `,...Yh(o)),console.warn(...s)}gn(),Xi=!1}function Jh(){let e=cr[cr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function Yh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
10
+ `],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Ks(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...$u(r,e[r]))}),n.length>3&&t.push(" ..."),t}function $u(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=$u(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ce(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const Qi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Lr(e,t,n,r){try{return r?e(...r):e()}catch(o){No(o,t,n)}}function Ht(e,t,n,r){if(ce(e)){const o=Lr(e,t,n,r);return o&&Ai(o)&&o.catch(s=>{No(s,t,n)}),o}if(le(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function No(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?Qi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Lr(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=Qi[t];if(n&&Ps(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Ds(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let So=!1,ea=!1;const yt=[];let nn=0;const Mr=[];let Mn=null,Ur=0;const Iu=Promise.resolve();let ta=null;const nm=100;function xo(e){const t=ta||Iu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=So?nn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=ko(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function $s(e){if(!(e.flags&1)){const t=ko(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=ko(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Au()}}function Au(){!So&&!ea&&(ea=!0,ta=Iu.then(Lu))}function Vu(e){le(e)?Mr.push(...e):Mn&&e.id===-1?Mn.splice(Ur+1,0,e):e.flags&1||(Mr.push(e),e.flags|=1),Au()}function Ru(e,t,n=So?nn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&na(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function ju(e){if(Mr.length){const t=[...new Set(Mr)].sort((n,r)=>ko(n)-ko(r));if(Mr.length=0,Mn){Mn.push(...t);return}for(Mn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Ur=0;Ur<Mn.length;Ur++){const n=Mn[Ur];g.NODE_ENV!=="production"&&na(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Mn=null,Ur=0}}const ko=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lu(e){ea=!1,So=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>na(e,n):Xe;try{for(nn=0;nn<yt.length;nn++){const n=yt[nn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Lr(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;nn<yt.length;nn++){const n=yt[nn];n&&(n.flags&=-2)}nn=0,yt.length=0,ju(e),So=!1,ta=null,(yt.length||Mr.length)&&Lu(e)}}function na(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Ia(r.type);return No(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Un=!1;const Is=new Map;g.NODE_ENV!=="production"&&(ji().__VUE_HMR_RUNTIME__={createRecord:ra(Mu),rerender:ra(im),reload:ra(am)});const dr=new Map;function om(e){const t=e.type.__hmrId;let n=dr.get(t);n||(Mu(t,e.type),n=dr.get(t)),n.instances.add(e)}function sm(e){dr.get(e.type.__hmrId).instances.delete(e)}function Mu(e,t){return dr.has(e)?!1:(dr.set(e,{initialDef:As(t),instances:new Set}),!0)}function As(e){return qc(e)?e.__vccOpts:e}function im(e,t){const n=dr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,As(r.type).render=t),r.renderCache=[],Un=!0,r.update(),Un=!1}))}function am(e,t){const n=dr.get(e);if(!n)return;t=As(t),Uu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=As(s.type);let a=Is.get(i);a||(i!==n.initialDef&&Uu(i,t),Is.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?$s(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}Vu(()=>{Is.clear()})}function Uu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ra(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let rn,To=[],oa=!1;function Co(e,...t){rn?rn.emit(e,...t):oa||To.push({event:e,args:t})}function Fu(e,t){var n,r;rn=e,rn?(rn.enabled=!0,To.forEach(({event:o,args:s})=>rn.emit(o,...s)),To=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Fu(s,t)}),setTimeout(()=>{rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,oa=!0,To=[])},3e3)):(oa=!0,To=[])}function lm(e,t){Co("app:init",e,t,{Fragment:xe,Text:Vo,Comment:Ge,Static:Ro})}function um(e){Co("app:unmount",e)}const cm=sa("component:added"),Bu=sa("component:updated"),dm=sa("component:removed"),fm=e=>{rn&&typeof rn.cleanupBuffer=="function"&&!rn.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function sa(e){return t=>{Co(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=Hu("perf:start"),hm=Hu("perf:end");function Hu(e){return(t,n,r)=>{Co(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Co("component:emit",e.appContext.app,e,t,n)}let et=null,Zu=null;function Vs(e){const t=et;return et=e,Zu=e&&e.type.__scopeId||null,t}function _e(e,t=et,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Vc(-1);const s=Vs(t);let i;try{i=e(...o)}finally{Vs(s),r._d&&Vc(1)}return g.NODE_ENV!=="production"&&Bu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function qu(e){th(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function fr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Wu=Symbol("_vte"),zu=e=>e.__isTeleport,pr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ku=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ia=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!pr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!pr(e)&&F(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:w}}=u,$=pr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Un&&(l=!1,te=null),e==null){const S=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");m(S,n,r),m(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=ia(t.props,b),A=Ju(q,t,O,m);q?(i!=="svg"&&Ku(q)?i="svg":i!=="mathml"&&Gu(q)&&(i="mathml"),$||(j(q,A),js(t))):g.NODE_ENV!=="production"&&!$&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};$&&(j(n,U),js(t)),vm(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=pr(e.props),q=ge?n:U,A=ge?S:j;if(i==="svg"||Ku(U)?i="svg":(i==="mathml"||Gu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Ao(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),$)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Rs(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=ia(t.props,b);V?Rs(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Rs(t,U,j,u,1);js(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!pr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Rs,hydrate:ym};function Rs(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||pr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=ia(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(pr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Ju(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}js(t)}return t.anchor&&i(t.anchor)}const bm=gm;function js(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Ju(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Wu]=s,e&&(r(o,e),r(s,e)),s}const Fn=Symbol("_leaveCb"),Ls=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),ca(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Yu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},Xu=e=>{const t=e.subTree;return t.component?Xu(t.component):t},wm={name:"BaseTransition",props:Yu,setup(e,{slots:t}){const n=qs(),r=_m();return()=>{const o=t.default&&nc(t.default(),!0);if(!o||!o.length)return;const s=Qu(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return la(s);const l=tc(s);if(!l)return la(s);let u=aa(l,i,r,n,f=>u=f);l.type!==Ge&&Po(l,u);const c=n.subTree,d=c&&tc(c);if(d&&d.type!==Ge&&!gr(l,d)&&Xu(n).type!==Ge){const f=aa(d,i,r,n);if(Po(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},la(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(m,b,O)=>{const w=ec(r,d);w[String(d.key)]=d,m[Fn]=()=>{b(),m[Fn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function Qu(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function ec(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function aa(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:$,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),S=ec(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),le(q)?q.every(D=>D.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Fn]&&q[Fn](!0);const V=S[te];V&&gr(e,V)&&V.el[Fn]&&V.el[Fn](),U(A,[q])},enter(q){let A=u,V=c,D=d;if(!n.isMounted)if(s)A=$||u,V=H||c,D=T||d;else return;let ie=!1;const $e=q[Ls]=E=>{ie||(ie=!0,E?U(D,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Ls]=void 0)};A?j(A,[q,$e]):$e()},leave(q,A){const V=String(e.key);if(q[Ls]&&q[Ls](!0),n.isUnmounting)return A();U(f,[q]);let D=!1;const ie=q[Fn]=$e=>{D||(D=!0,A(),$e?U(O,[q]):U(b,[q]),q[Fn]=void 0,S[V]===e&&delete S[V])};S[V]=e,m?j(m,[q,ie]):ie()},clone(q){const A=aa(q,t,n,r,o);return o&&o(A),A}};return ge}function la(e){if(Do(e))return e=Zt(e),e.children=null,e}function tc(e){if(!Do(e))return zu(e.type)&&e.children?Qu(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ce(n.default))return n.default()}}function Po(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Po(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(nc(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function de(e,t){return ce(e)?Ke({name:e.name},t,{setup:e}):e}function rc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function ua(e,t,n,r,o=!1){if(le(e)){e.forEach((b,O)=>ua(b,t&&(le(t)?t[O]:t),n,r,o));return}if(Fr(r)&&!o)return;const s=r.shapeFlag&4?$a(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),ce(l))Lr(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const $=b?m(l)?d[l]:c[l]:l.value;o?le($)&&Ii($,s):le($)?$.includes(s)||$.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Fr=e=>!!e.type.__asyncLoader,Do=e=>e.type.__isKeepAlive;function Nm(e,t){oc(e,"a",t)}function Sm(e,t){oc(e,"da",t)}function oc(e,t,n=Je){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Do(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Ms(t,e,r,!0);bt(()=>{Ii(r[t],o)},n)}function Ms(e,t,n=Je,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Mo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=ar(Qi[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Je)=>{(!zs||e==="sp")&&Ms(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),ca=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Je){Ms("ec",e,t)}const Am="components",sc=Symbol.for("v-ndc");function da(e){return Ze(e)?Vm(Am,e,!1)||e:e||sc}function Vm(e,t,n=!0,r=!1){const o=et||Je;if(o){const s=o.type;{const a=Ia(s,!1);if(a&&(a===t||a===Ct(t)||a===ir(Ct(t))))return s}const i=ic(o[e]||s[e],t)||ic(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
11
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${ir(e.slice(0,-1))} can only be used in render() or setup().`)}function ic(e,t){return e&&(e[t]||e[Ct(t)]||e[ir(Ct(t))])}function on(e,t,n,r){let o;const s=n,i=le(e);if(i||Ze(e)){const a=i&&tn(e);a&&(e=bs(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function fa(e,t,n={},r,o){if(et.ce||et.parent&&Fr(et.parent)&&et.parent.ce)return y(),Ne(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&ac(s(n)),a=Ne(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function ac(e){return e.some(t=>Br(t)?!(t.type===Ge||t.type===xe&&!ac(t.children)):!0)?e:null}const pa=e=>e?Fc(e)?$a(e):pa(e.parent):null,hr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?en(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?en(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?en(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?en(e.refs):e.refs,$parent:e=>pa(e.parent),$root:e=>pa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ga(e),$forceUpdate:e=>e.f||(e.f=()=>{$s(e.update)}),$nextTick:e=>e.n||(e.n=xo.bind(e.proxy)),$watch:e=>hv.bind(e)}),ha=e=>e==="_"||e==="$",ma=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),lc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ma(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];va&&(i[t]=0)}}const c=hr[t];let d,f;if(c)return t==="$attrs"?(Qe(e.attrs,"get",""),g.NODE_ENV!=="production"&&Hs()):g.NODE_ENV!=="production"&&t==="$slots"&&Qe(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&et&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&ha(t[0])&&De(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===et&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ma(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ma(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(hr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(lc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(hr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>hr[n](e),set:Xe})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:Xe})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(ha(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:Xe})}})}function uc(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let va=!0;function Um(e){const t=ga(e),n=e.proxy,r=e.ctx;va=!1,t.beforeCreate&&cc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:w,beforeDestroy:$,beforeUnmount:H,destroyed:T,unmounted:te,render:S,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:D,directives:ie,filters:$e}=t,E=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&Fm(u,r,E),i)for(const Y in i){const re=i[Y];ce(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!ce(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ai(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=Eo(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),ha(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:Xe})}if(va=!0,s)for(const Y in s){const re=s[Y],he=ce(re)?re.bind(n,n):ce(re.get)?re.get.bind(n,n):Xe;g.NODE_ENV!=="production"&&he===Xe&&F(`Computed property "${Y}" has no getter.`);const oe=!ce(re)&&ce(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:Xe,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)dc(a[Y],r,n,Y);if(l){const Y=ce(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&cc(c,e,"c");function P(Y,re){le(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(km,d),P(Le,f),P(Tm,m),P(Cm,b),P(Nm,O),P(Sm,w),P(Im,ge),P($m,U),P(Dm,j),P(ca,H),P(bt,te),P(Pm,q),le(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});S&&e.render===Xe&&(e.render=S),V!=null&&(e.inheritAttrs=V),D&&(e.components=D),ie&&(e.directives=ie),q&&rc(e)}function Fm(e,t,n=Xe){le(e)&&(e=ya(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function cc(e,t,n){Ht(le(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function dc(e,t,n,r){let o=r.includes(".")?Cc(n,r):()=>n[r];if(Ze(e)){const s=t[e];ce(s)?tt(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(ce(e))tt(o,e.bind(n));else if(Ie(e))if(le(e))e.forEach(s=>dc(s,t,n,r));else{const s=ce(e.handler)?e.handler.bind(n):t[e.handler];ce(s)?tt(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ga(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Us(l,u,i,!0)),Us(l,t,i)),Ie(t)&&s.set(t,l),l}function Us(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Us(e,s,n,!0),o&&o.forEach(i=>Us(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:fc,props:pc,emits:pc,methods:$o,computed:$o,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:$o,directives:$o,watch:Zm,provide:fc,inject:Hm};function fc(e,t){return t?e?function(){return Ke(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return $o(ya(e),ya(t))}function ya(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function $o(e,t){return e?Ke(Object.create(null),e,t):t}function pc(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:Ke(Object.create(null),uc(e),uc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function hc(){return{app:null,config:{isNativeTag:Qp,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 qm=0;function Wm(e,t){return function(r,o=null){ce(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=hc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Wc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&ce(c.install)?(i.add(c),c.install(u,...d)):ce(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&Pa(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&qu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Wc)),$a(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=mr;mr=u;try{return c()}finally{mr=d}}};return u}}let mr=null;function dt(e,t){if(!Je)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Je.provides;const r=Je.parent&&Je.parent.provides;r===n&&(n=Je.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Je||et;if(r||mr){const o=mr?mr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ce(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Je||et||mr)}const mc={},vc=()=>Object.create(mc),gc=e=>Object.getPrototypeOf(e)===mc;function Km(e,t,n,r=!1){const o={},s=vc();e.propsDefaults=Object.create(null),yc(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&wc(t||{},o,e),n?e.props=r?o:Mh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Bs(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=ba(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{yc(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=ba(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&Qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&wc(t||{},o,e)}function yc(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(vo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Bs(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=ba(o,l,d,u[d],e,!De(u,d))}}return i}function ba(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&ce(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Mo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function bc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!ce(e)){const c=d=>{l=!0;const[f,m]=bc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Rr),Rr;if(le(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);_c(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(_c(d)){const f=s[c],m=i[d]=le(f)||ce(f)?{type:f}:Ke({},f),b=m.type;let O=!1,w=!0;if(le(b))for(let $=0;$<b.length;++$){const H=b[$],T=ce(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=ce(b)&&b.name==="Boolean";m[0]=O,m[1]=w,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function _c(e){return e[0]!=="$"&&!vo(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function wc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?en(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=le(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){F(nv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=le(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ir).join(" | ")}`;const o=n[0],s=Vi(t),i=Ec(t,o),a=Ec(t,s);return n.length===1&&Oc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Oc(s)&&(r+=`with value ${a}.`),r}function Ec(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Oc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Nc=e=>e[0]==="_"||e==="$stable",_a=e=>le(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Je&&(!n||n.root===Je.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),_a(t(...o))),n);return r._c=!1,r},Sc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Nc(o))continue;const s=e[o];if(ce(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=_a(s);t[o]=()=>i}}},xc=(e,t)=>{g.NODE_ENV!=="production"&&!Do(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=_a(t);e.slots.default=()=>n},wa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=vc();if(e.vnode.shapeFlag&32){const o=t._;o?(wa(r,t,n),n&&vs(r,"_",o,!0)):Sc(t,r)}else t&&xc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Un?(wa(o,t,n),Qt(e,"set","$slots")):n&&a===1?s=!1:wa(o,t,n):(s=!t.$stable,Sc(t,o)),i=t}else t&&(xc(e,t),i={default:1});if(s)for(const a in o)!Nc(a)&&i[a]==null&&delete o[a]};let Io,Bn;function wn(e,t){e.appContext.config.performance&&Fs()&&Bn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,Fs()?Bn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&Fs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Bn.mark(r),Bn.measure(`<${Ks(e,e.type)}> ${t}`,n,r),Bn.clearMarks(n),Bn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,Fs()?Bn.now():Date.now())}function Fs(){return Io!==void 0||(typeof window<"u"&&window.performance?(Io=!0,Bn=window.performance):Io=!1),Io}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
12
12
 
13
- For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=kv;function hv(e){return mv(e)}function mv(e,t){pv();const n=ji();n.__VUE__=!0,g.NODE_ENV!=="production"&&Lu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:v=Xe,insertStaticContent:b}=e,O=(h,m,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Un?!1:!!m.dynamicChildren)=>{if(h===m)return;h&&!vr(h,m)&&(L=bi(h),Be(h,I,R,!0),h=null),m.patchFlag===-2&&(W=!1,m.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=m;switch(M){case Ro:w(h,m,k,L);break;case Ge:D(h,m,k,L);break;case jo:h==null?H(m,k,L,J):g.NODE_ENV!=="production"&&T(h,m,k,J);break;case xe:ie(h,m,k,L,I,R,J,z,W);break;default:X&1?U(h,m,k,L,I,R,J,z,W):X&6?De(h,m,k,L,I,R,J,z,W):X&64||X&128?M.process(h,m,k,L,I,R,J,z,W,ts):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&ua(me,h&&h.ref,R,m||h,!m)},w=(h,m,k,L)=>{if(h==null)r(m.el=a(m.children),k,L);else{const I=m.el=h.el;m.children!==h.children&&u(I,m.children)}},D=(h,m,k,L)=>{h==null?r(m.el=l(m.children||""),k,L):m.el=h.el},H=(h,m,k,L)=>{[h.el,h.anchor]=b(h.children,m,k,L,h.el,h.anchor)},T=(h,m,k,L)=>{if(m.children!==h.children){const I=f(h.anchor);S(h),[m.el,m.anchor]=b(m.children,k,I,L)}else m.el=h.el,m.anchor=h.anchor},te=({el:h,anchor:m},k,L)=>{let I;for(;h&&h!==m;)I=f(h),r(h,k,L),h=I;r(m,k,L)},S=({el:h,anchor:m})=>{let k;for(;h&&h!==m;)k=f(h),o(h),h=k;o(m)},U=(h,m,k,L,I,R,J,z,W)=>{m.type==="svg"?J="svg":m.type==="math"&&(J="mathml"),h==null?j(m,k,L,I,R,J,z,W):A(h,m,I,R,J,z,W)},j=(h,m,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:ae,dirs:we}=h;if(W=h.el=i(h.type,R,me&&me.is,me),X&8?c(W,h.children):X&16&&q(h.children,W,null,L,I,Ea(h,R),J,z),we&&dr(h,null,L,"created"),ge(W,h,h.scopeId,J,L),me){for(const He in me)He!=="value"&&!go(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&sn(M,L,h)}g.NODE_ENV!=="production"&&(ys(W,"__vnode",h,!0),ys(W,"__vueParentComponent",L,!0)),we&&dr(h,null,L,"beforeMount");const Pe=vv(I,ae);Pe&&ae.beforeEnter(W),r(W,m,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&sn(M,L,h),Pe&&ae.enter(W),we&&dr(h,null,L,"mounted")},I)},ge=(h,m,k,L,I)=>{if(k&&v(h,k),L)for(let R=0;R<L.length;R++)v(h,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=xa(R.children)||R),m===R||$c(R.type)&&(R.ssContent===m||R.ssFallback===m)){const J=I.vnode;ge(h,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(h,m,k,L,I,R,J,z,W=0)=>{for(let M=W;M<h.length;M++){const me=h[M]=z?Hn(h[M]):qt(h[M]);O(null,me,m,k,L,I,R,J,z)}},A=(h,m,k,L,I,R,J)=>{const z=m.el=h.el;g.NODE_ENV!=="production"&&(z.__vnode=m);let{patchFlag:W,dynamicChildren:M,dirs:me}=m;W|=h.patchFlag&16;const X=h.props||je,ae=m.props||je;let we;if(k&&mr(k,!1),(we=ae.onVnodeBeforeUpdate)&&sn(we,k,m,h),me&&dr(m,h,k,"beforeUpdate"),k&&mr(k,!0),g.NODE_ENV!=="production"&&Un&&(W=0,J=!1,M=null),(X.innerHTML&&ae.innerHTML==null||X.textContent&&ae.textContent==null)&&c(z,""),M?(V(h.dynamicChildren,M,z,k,L,Ea(m,I),R),g.NODE_ENV!=="production"&&Vo(h,m)):J||he(h,m,z,null,k,L,Ea(m,I),R,!1),W>0){if(W&16)$(z,X,ae,k,I);else if(W&2&&X.class!==ae.class&&s(z,"class",null,ae.class,I),W&4&&s(z,"style",X.style,ae.style,I),W&8){const Pe=m.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],Dt=X[Me],mt=ae[Me];(mt!==Dt||Me==="value")&&s(z,Me,Dt,mt,I,k)}}W&1&&h.children!==m.children&&c(z,m.children)}else!J&&M==null&&$(z,X,ae,k,I);((we=ae.onVnodeUpdated)||me)&&Nt(()=>{we&&sn(we,k,m,h),me&&dr(m,h,k,"updated")},L)},V=(h,m,k,L,I,R,J)=>{for(let z=0;z<m.length;z++){const W=h[z],M=m[z],me=W.el&&(W.type===xe||!vr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},$=(h,m,k,L,I)=>{if(m!==k){if(m!==je)for(const R in m)!go(R)&&!(R in k)&&s(h,R,m[R],null,I,L);for(const R in k){if(go(R))continue;const J=k[R],z=m[R];J!==z&&R!=="value"&&s(h,R,z,J,I,L)}"value"in k&&s(h,"value",m.value,k.value,I)}},ie=(h,m,k,L,I,R,J,z,W)=>{const M=m.el=h?h.el:a(""),me=m.anchor=h?h.anchor:a("");let{patchFlag:X,dynamicChildren:ae,slotScopeIds:we}=m;g.NODE_ENV!=="production"&&(Un||X&2048)&&(X=0,W=!1,ae=null),we&&(z=z?z.concat(we):we),h==null?(r(M,k,L),r(me,k,L),q(m.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&ae&&h.dynamicChildren?(V(h.dynamicChildren,ae,k,I,R,J,z),g.NODE_ENV!=="production"?Vo(h,m):(m.key!=null||I&&m===I.subTree)&&Vo(h,m,!0)):he(h,m,k,me,I,R,J,z,W)},De=(h,m,k,L,I,R,J,z,W)=>{m.slotScopeIds=z,h==null?m.shapeFlag&512?I.ctx.activate(m,k,L,J,W):E(m,k,L,I,R,J,W):P(h,m,W)},E=(h,m,k,L,I,R,J)=>{const z=h.component=Av(h,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&cm(z),g.NODE_ENV!=="production"&&(Ds(h),wn(z,"mount")),Do(h)&&(z.ctx.renderer=ts),g.NODE_ENV!=="production"&&wn(z,"init"),Rv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!h.el){const W=z.subTree=Z(Ge);D(null,W,m,k)}}else Y(z,h,m,k,I,R,J);g.NODE_ENV!=="production"&&(Is(),En(z,"mount"))},P=(h,m,k)=>{const L=m.component=h.component;if(Sv(h,m,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&Ds(m),re(L,m,k),g.NODE_ENV!=="production"&&Is();return}else L.next=m,L.update();else m.el=h.el,L.vnode=m},Y=(h,m,k,L,I,R,J)=>{const z=()=>{if(h.isMounted){let{next:X,bu:ae,u:we,parent:Pe,vnode:He}=h;{const It=Nc(h);if(It){X&&(X.el=He.el,re(h,X,J)),It.asyncDep.then(()=>{h.isUnmounted||z()});return}}let Me=X,Dt;g.NODE_ENV!=="production"&&Ds(X||h.vnode),mr(h,!1),X?(X.el=He.el,re(h,X,J)):X=He,ae&&yo(ae),(Dt=X.props&&X.props.onVnodeBeforeUpdate)&&sn(Dt,Pe,X,He),mr(h,!0),g.NODE_ENV!=="production"&&wn(h,"render");const mt=Sa(h);g.NODE_ENV!=="production"&&En(h,"render");const zt=h.subTree;h.subTree=mt,g.NODE_ENV!=="production"&&wn(h,"patch"),O(zt,mt,d(zt.el),bi(zt),h,I,R),g.NODE_ENV!=="production"&&En(h,"patch"),X.el=mt.el,Me===null&&xv(h,mt.el),we&&Nt(we,I),(Dt=X.props&&X.props.onVnodeUpdated)&&Nt(()=>sn(Dt,Pe,X,He),I),g.NODE_ENV!=="production"&&Mu(h),g.NODE_ENV!=="production"&&Is()}else{let X;const{el:ae,props:we}=m,{bm:Pe,m:He,parent:Me,root:Dt,type:mt}=h,zt=Fr(m);if(mr(h,!1),Pe&&yo(Pe),!zt&&(X=we&&we.onVnodeBeforeMount)&&sn(X,Me,m),mr(h,!0),ae&&Pf){const It=()=>{g.NODE_ENV!=="production"&&wn(h,"render"),h.subTree=Sa(h),g.NODE_ENV!=="production"&&En(h,"render"),g.NODE_ENV!=="production"&&wn(h,"hydrate"),Pf(ae,h.subTree,h,I,null),g.NODE_ENV!=="production"&&En(h,"hydrate")};zt&&mt.__asyncHydrate?mt.__asyncHydrate(ae,h,It):It()}else{Dt.ce&&Dt.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(h,"render");const It=h.subTree=Sa(h);g.NODE_ENV!=="production"&&En(h,"render"),g.NODE_ENV!=="production"&&wn(h,"patch"),O(null,It,k,L,h,I,R),g.NODE_ENV!=="production"&&En(h,"patch"),m.el=It.el}if(He&&Nt(He,I),!zt&&(X=we&&we.onVnodeMounted)){const It=m;Nt(()=>sn(X,Me,It),I)}(m.shapeFlag&256||Me&&Fr(Me.vnode)&&Me.vnode.shapeFlag&256)&&h.a&&Nt(h.a,I),h.isMounted=!0,g.NODE_ENV!=="production"&&vm(h),m=k=L=null}};h.scope.on();const W=h.effect=new nu(z);h.scope.off();const M=h.update=W.run.bind(W),me=h.job=W.runIfDirty.bind(W);me.i=h,me.id=h.uid,W.scheduler=()=>As(me),mr(h,!0),g.NODE_ENV!=="production"&&(W.onTrack=h.rtc?X=>yo(h.rtc,X):void 0,W.onTrigger=h.rtg?X=>yo(h.rtg,X):void 0),M()},re=(h,m,k)=>{m.component=h;const L=h.vnode.props;h.vnode=m,h.next=null,nv(h,m.props,L,k),fv(h,m.children,k),vn(),Iu(h),gn()},he=(h,m,k,L,I,R,J,z,W=!1)=>{const M=h&&h.children,me=h?h.shapeFlag:0,X=m.children,{patchFlag:ae,shapeFlag:we}=m;if(ae>0){if(ae&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(ae&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&es(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):es(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(h,m,k,L,I,R,J,z,W)=>{h=h||Rr,m=m||Rr;const M=h.length,me=m.length,X=Math.min(M,me);let ae;for(ae=0;ae<X;ae++){const we=m[ae]=W?Hn(m[ae]):qt(m[ae]);O(h[ae],we,k,null,I,R,J,z,W)}M>me?es(h,I,R,!0,!1,X):q(m,k,L,I,R,J,z,W,X)},Fe=(h,m,k,L,I,R,J,z,W)=>{let M=0;const me=m.length;let X=h.length-1,ae=me-1;for(;M<=X&&M<=ae;){const we=h[M],Pe=m[M]=W?Hn(m[M]):qt(m[M]);if(vr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=ae;){const we=h[X],Pe=m[ae]=W?Hn(m[ae]):qt(m[ae]);if(vr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,ae--}if(M>X){if(M<=ae){const we=ae+1,Pe=we<me?m[we].el:L;for(;M<=ae;)O(null,m[M]=W?Hn(m[M]):qt(m[M]),k,Pe,I,R,J,z,W),M++}}else if(M>ae)for(;M<=X;)Be(h[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=ae;M++){const Et=m[M]=W?Hn(m[M]):qt(m[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,Dt=0;const mt=ae-Pe+1;let zt=!1,It=0;const ns=new Array(mt);for(M=0;M<mt;M++)ns[M]=0;for(M=we;M<=X;M++){const Et=h[M];if(Dt>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=ae;Me++)if(ns[Me-Pe]===0&&vr(Et,m[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(ns[dn-Pe]=M+1,dn>=It?It=dn:zt=!0,O(Et,m[dn],k,null,I,R,J,z,W),Dt++)}const $f=zt?gv(ns):Rr;for(Me=$f.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=m[Et],Df=Et+1<me?m[Et+1].el:L;ns[M]===0?O(null,dn,k,Df,I,R,J,z,W):zt&&(Me<0||M!==$f[Me]?ht(dn,k,Df,2):Me--)}}},ht=(h,m,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=h;if(M&6){ht(h.component.subTree,m,k,L);return}if(M&128){h.suspense.move(m,k,L);return}if(M&64){J.move(h,m,k,ts);return}if(J===xe){r(R,m,k);for(let X=0;X<W.length;X++)ht(W[X],m,k,L);r(h.anchor,m,k);return}if(J===jo){te(h,m,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,m,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:ae,afterLeave:we}=z,Pe=()=>r(R,m,k),He=()=>{X(R,()=>{Pe(),we&&we()})};ae?ae(R,Pe,He):He()}else r(R,m,k)},Be=(h,m,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:ae,cacheIndex:we}=h;if(X===-2&&(I=!1),z!=null&&ua(z,null,k,h,!0),we!=null&&(m.renderCache[we]=void 0),me&256){m.ctx.deactivate(h);return}const Pe=me&1&&ae,He=!Fr(h);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&sn(Me,m,h),me&6)Rw(h.component,k,L);else{if(me&128){h.suspense.unmount(k,L);return}Pe&&dr(h,null,m,"beforeUnmount"),me&64?h.type.remove(h,m,k,ts,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?es(M,m,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&es(W,m,k),L&&xt(h)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&sn(Me,m,h),Pe&&dr(h,null,m,"unmounted")},k)},xt=h=>{const{type:m,el:k,anchor:L,transition:I}=h;if(m===xe){g.NODE_ENV!=="production"&&h.patchFlag>0&&h.patchFlag&2048&&I&&!I.persisted?h.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):er(k,L);return}if(m===jo){S(h);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(h.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(h.el,R,W):W()}else R()},er=(h,m)=>{let k;for(;h!==m;)k=f(h),o(h),h=k;o(m)},Rw=(h,m,k)=>{g.NODE_ENV!=="production"&&h.type.__hmrId&&dm(h);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=h;Sc(W),Sc(M),L&&yo(L),I.stop(),R&&(R.flags|=8,Be(J,h,m,k)),z&&Nt(z,m),Nt(()=>{h.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve()),g.NODE_ENV!=="production"&&ym(h)},es=(h,m,k,L=!1,I=!1,R=0)=>{for(let J=R;J<h.length;J++)Be(h[J],m,k,L,I)},bi=h=>{if(h.shapeFlag&6)return bi(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=f(h.anchor||h.el),k=m&&m[Hu];return k?f(k):m};let ml=!1;const Tf=(h,m,k)=>{h==null?m._vnode&&Be(m._vnode,null,null,!0):O(m._vnode||null,h,m,null,null,null,k),m._vnode=h,ml||(ml=!0,Iu(),Au(),ml=!1)},ts={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:bi,o:e};let Cf,Pf;return{render:Tf,hydrate:Cf,createApp:Xm(Tf,Cf)}}function Ea({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function mr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function vv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vo(e,t,n=!1){const r=e.children,o=t.children;if(le(r)&&le(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Hn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Vo(i,a)),a.type===Ro&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function gv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Nc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Nc(t)}function Sc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const yv=Symbol.for("v-scx"),bv=()=>{{const e=Ce(yv);return e||g.NODE_ENV!=="production"&&F("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Oa(e,null,t)}function tt(e,t,n){return g.NODE_ENV!=="production"&&!ce(t)&&F("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Oa(e,t,n)}function Oa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Gs)if(s==="sync"){const f=bv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:Xe,resume:Xe,pause:Xe};const u=Je;a.call=(f,v,b)=>Ht(f,u,v,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,v)=>{v?f():As(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=tm(e,t,a);return l&&l.push(d),d}function _v(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?xc(r,e):()=>r[e]:e.bind(r,r);let s;ce(t)?s=t:(s=t.handler,n=t);const i=Uo(this),a=Oa(o,s.bind(r),n);return i(),a}function xc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const wv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function Ev(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(ir(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${ir(Ct(t))}" prop.`);else{const f=c[t];ce(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&wv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(ch))),g.NODE_ENV!=="production"&&wm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[ir(c)]&&F(`Event "${c}" is emitted in component ${Js(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=ir(t)]||r[a=ir(Ct(t))];!l&&s&&(l=r[a=ir(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function kc(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!ce(e)){const l=u=>{const c=kc(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(le(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Zs(e,t){return!e||!vo(t)?!1:(t=t.slice(2).replace(/Once$/,""),$e(e,t[0].toLowerCase()+t.slice(1))||$e(e,mn(t))||$e(e,t))}let Na=!1;function qs(){Na=!0}function Sa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:v,ctx:b,inheritAttrs:O}=e,w=js(e);let D,H;g.NODE_ENV!=="production"&&(Na=!1);try{if(n.shapeFlag&4){const S=o||r,U=g.NODE_ENV!=="production"&&v.__isScriptSetup?new Proxy(S,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):S;D=qt(u.call(U,S,c,g.NODE_ENV!=="production"?en(d):d,v,f,b)),H=a}else{const S=t;g.NODE_ENV!=="production"&&a===d&&qs(),D=qt(S.length>1?S(g.NODE_ENV!=="production"?en(d):d,g.NODE_ENV!=="production"?{get attrs(){return qs(),en(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):S(g.NODE_ENV!=="production"?en(d):d,null)),H=t.props?a:Ov(a)}}catch(S){Lo.length=0,So(S,e,1),D=Z(Ge)}let T=D,te;if(g.NODE_ENV!=="production"&&D.patchFlag>0&&D.patchFlag&2048&&([T,te]=Tc(D)),H&&O!==!1){const S=Object.keys(H),{shapeFlag:U}=T;if(S.length){if(U&7)s&&S.some(ms)&&(H=Nv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!Na&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const $=j[A];vo($)?ms($)||ge.push($[2].toLowerCase()+$.slice(3)):q.push($)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!Cc(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Cc(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):D=T,js(w),D}const Tc=e=>{const t=e.children,n=e.dynamicChildren,r=xa(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Tc(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function xa(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Br(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return xa(n.children)}}else return}return n}const Ov=e=>{let t;for(const n in e)(n==="class"||n==="style"||vo(n))&&((t||(t={}))[n]=e[n]);return t},Nv=(e,t)=>{const n={};for(const r in e)(!ms(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Cc=e=>e.shapeFlag&7||e.type===Ge;function Sv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Un||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Pc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Zs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Pc(r,i,u):!0:!!i;return!1}function Pc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Zs(n,s))return!0}return!1}function xv({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const $c=e=>e.__isSuspense;function kv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):Du(e)}const xe=Symbol.for("v-fgt"),Ro=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),jo=Symbol.for("v-stc"),Lo=[];let Pt=null;function y(e=!1){Lo.push(Pt=e?null:[])}function Tv(){Lo.pop(),Pt=Lo[Lo.length-1]||null}let Mo=1;function Dc(e){Mo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Ic(e){return e.dynamicChildren=Mo>0?Pt||Rr:null,Tv(),Mo>0&&Pt&&Pt.push(e),e}function x(e,t,n,r,o,s){return Ic(N(e,t,n,r,o,s,!0))}function Ne(e,t,n,r,o){return Ic(Z(e,t,n,r,o,!0))}function Br(e){return e?e.__v_isVNode===!0:!1}function vr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Vs.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Cv=(...e)=>Vc(...e),Ac=({key:e})=>e??null,Ws=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||ce(e)?{i:et,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ac(t),ref:t&&Ws(t),scopeId:Fu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:et};return a?(ka(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Mo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Cv:Vc;function Vc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===nc)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Br(e)){const a=Zt(e,t,!0);return n&&ka(a,n),Mo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(Bc(e)&&(e=e.__vccOpts),t){t=Pv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=bs(a)),Ie(l)&&(No(l)&&!le(l)&&(l=Ke({},l)),t.style=Li(l))}const i=Ze(e)?1:$c(e)?128:Zu(e)?64:Ie(e)?4:ce(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&No(e)&&(e=ye(e),F("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
14
- Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Pv(e){return e?No(e)||hc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Ta(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ac(u),ref:t&&t.ref?n&&s?le(s)?s.concat(Ws(t)):[s,Ws(t)]:Ws(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&le(a)?a.map(Rc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Rc(e){const t=Zt(e);return le(e.children)&&(t.children=e.children.map(Rc)),t}function ke(e=" ",t=0){return Z(Ro,null,e,t)}function $v(e,t){const n=Z(jo,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(y(),Ne(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):le(e)?Z(xe,null,e.slice()):typeof e=="object"?Hn(e):Z(Ro,null,String(e))}function Hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function ka(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),ka(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!hc(t)?t._ctx=et:o===3&&et&&(et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:et},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ta(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=bs([t.class,r.class]));else if(o==="style")t.style=Li([t.style,r.style]);else if(vo(o)){const s=t[o],i=r[o];i&&s!==i&&!(le(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function sn(e,t,n,r=null){Ht(e,t,7,[n,r])}const Dv=dc();let Iv=0;function Av(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Dv,s={uid:Iv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ql(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:vc(r,o),emitsOptions:kc(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Bm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Ev.bind(null,s),e.ce&&e.ce(s),s}let Je=null;const zs=()=>Je||et;let Ks,Ca;{const e=ji(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ks=t("__VUE_INSTANCE_SETTERS__",n=>Je=n),Ca=t("__VUE_SSR_SETTERS__",n=>Gs=n)}const Uo=e=>{const t=Je;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},jc=()=>{Je&&Je.scope.off(),Ks(null)},Vv=hn("slot,component");function Pa(e,{isNativeTag:t}){(Vv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Lc(e){return e.vnode.shapeFlag&4}let Gs=!1;function Rv(e,t=!1,n=!1){t&&Ca(t);const{props:r,children:o}=e.vnode,s=Lc(e);ev(e,r,s,t),dv(e,o,n);const i=s?jv(e,t):void 0;return t&&Ca(!1),i}function jv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&Pa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)Pa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)Bu(s[i])}r.compilerOptions&&Lv()&&F('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,sc),g.NODE_ENV!=="production"&&Hm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Uv(e):null,i=Uo(e);vn();const a=Lr(o,e,0,[g.NODE_ENV!=="production"?en(e.props):e.props,s]);if(gn(),i(),Ai(a)){if(Fr(e)||ec(e),a.then(jc,jc),t)return a.then(l=>{Mc(e,l,t)}).catch(l=>{So(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Mc(e,a,t)}else Uc(e,t)}function Mc(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Br(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=xu(t),g.NODE_ENV!=="production"&&Zm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),Uc(e,n)}let $a;const Lv=()=>!$a;function Uc(e,t,n){const r=e.type;if(!e.render){if(!t&&$a&&!r.render){const o=r.template||ga(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=$a(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||Xe}{const o=Uo(e);vn();try{Wm(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===Xe&&!t&&(r.template?F('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):F("Component is missing template or render function: ",r))}const Fc=g.NODE_ENV!=="production"?{get(e,t){return qs(),Qe(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return Qe(e,"get",""),e[t]}};function Mv(e){return new Proxy(e.slots,{get(t,n){return Qe(e,"get","$slots"),t[n]}})}function Uv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(le(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Fc))},get slots(){return r||(r=Mv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Fc),slots:e.slots,emit:e.emit,expose:t}}function Da(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(xu(jn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in pr)return pr[n](e)},has(t,n){return n in t||n in pr}})):e.proxy}const Fv=/(?:^|[-_])(\w)/g,Bv=e=>e.replace(Fv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ia(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function Js(e,t,n=!1){let r=Ia(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Bv(r):n?"App":"Anonymous"}function Bc(e){return ce(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=Qh(e,t,Gs);if(g.NODE_ENV!=="production"){const r=zs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!le(t)?Br(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Br(n)&&(n=[n]),Z(e,t,n))}function Hv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:tn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const v=l(d,"computed");v&&f.push(i("computed",v));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(v=>["div",{},["span",r,v+": "],a(f[v],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const v=d.type;if(ce(v))return;const b={};for(const O in d.ctx)u(v,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,v){const b=d[v];if(le(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,v)||d.mixins&&d.mixins.some(O=>u(O,f,v)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Hc="3.5.3",On=g.NODE_ENV!=="production"?F:Xe;var an={};let Aa;const Zc=typeof window<"u"&&window.trustedTypes;if(Zc)try{Aa=Zc.createPolicy("vue",{createHTML:e=>e})}catch(e){an.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const qc=Aa?e=>Aa.createHTML(e):e=>e,Zv="http://www.w3.org/2000/svg",qv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Wc=Nn&&Nn.createElement("template"),Wv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Zv,e):t==="mathml"?Nn.createElementNS(qv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Wc.innerHTML=qc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Wc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zn="transition",Fo="animation",Bo=Symbol("_vtc"),zc={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},zv=Ke({},Ku,zc),Va=(e=>(e.displayName="Transition",e.props=zv,e))((e,{slots:t})=>Ue(Tm,Kv(e),t)),gr=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Kc=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Kv(e){const t={};for(const $ in e)$ in zc||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,b=Gv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:D,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:S,onBeforeAppear:U=D,onAppear:j=H,onAppearCancelled:ge=T}=t,q=($,ie,De)=>{yr($,ie?c:a),yr($,ie?u:i),De&&De()},A=($,ie)=>{$._isLeaving=!1,yr($,d),yr($,v),yr($,f),ie&&ie()},V=$=>(ie,De)=>{const E=$?j:H,P=()=>q(ie,$,De);gr(E,[ie,P]),Gc(()=>{yr(ie,$?l:s),qn(ie,$?c:a),Kc(E)||Jc(ie,r,O,P)})};return Ke(t,{onBeforeEnter($){gr(D,[$]),qn($,s),qn($,i)},onBeforeAppear($){gr(U,[$]),qn($,l),qn($,u)},onEnter:V(!1),onAppear:V(!0),onLeave($,ie){$._isLeaving=!0;const De=()=>A($,ie);qn($,d),qn($,f),Xv(),Gc(()=>{$._isLeaving&&(yr($,d),qn($,v),Kc(te)||Jc($,r,w,De))}),gr(te,[$,De])},onEnterCancelled($){q($,!1),gr(T,[$])},onAppearCancelled($){q($,!0),gr(ge,[$])},onLeaveCancelled($){A($),gr(S,[$])}})}function Gv(e){if(e==null)return null;if(Ie(e))return[Ra(e.enter),Ra(e.leave)];{const t=Ra(e);return[t,t]}}function Ra(e){const t=dh(e);return an.NODE_ENV!=="production"&&im(t,"<transition> explicit duration"),t}function qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Bo]||(e[Bo]=new Set)).add(t)}function yr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Bo];n&&(n.delete(t),n.size||(e[Bo]=void 0))}function Gc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Jv=0;function Jc(e,t,n,r){const o=e._endId=++Jv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=Yv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=v=>{v.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function Yv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Zn}Delay`),s=r(`${Zn}Duration`),i=Yc(o,s),a=r(`${Fo}Delay`),l=r(`${Fo}Duration`),u=Yc(a,l);let c=null,d=0,f=0;t===Zn?i>0&&(c=Zn,d=i,f=s.length):t===Fo?u>0&&(c=Fo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Zn:Fo:null,f=c?c===Zn?s.length:l.length:0);const v=c===Zn&&/\b(transform|all)(,|$)/.test(r(`${Zn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:v}}function Yc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Xc(n)+Xc(e[r])))}function Xc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Xv(){return document.body.offsetHeight}function Qv(e,t,n){const r=e[Bo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qc=Symbol("_vod"),eg=Symbol("_vsh"),tg=Symbol(an.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),ng=/(^|;)\s*display\s*:/;function rg(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Ys(r,a,"")}else for(const i in t)n[i]==null&&Ys(r,i,"");for(const i in n)i==="display"&&(s=!0),Ys(r,i,n[i])}else if(o){if(t!==n){const i=r[tg];i&&(n+=";"+i),r.cssText=n,s=ng.test(n)}}else t&&e.removeAttribute("style");Qc in e&&(e[Qc]=s?r.display:"",e[eg]&&(r.display="none"))}const og=/[^\\];\s*$/,ed=/\s*!important$/;function Ys(e,t,n){if(le(n))n.forEach(r=>Ys(e,t,r));else if(n==null&&(n=""),an.NODE_ENV!=="production"&&og.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=sg(e,t);ed.test(n)?e.setProperty(mn(r),n.replace(ed,""),"important"):e[r]=n}}const td=["Webkit","Moz","ms"],ja={};function sg(e,t){const n=ja[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return ja[t]=r;r=sr(r);for(let o=0;o<td.length;o++){const s=td[o]+r;if(s in e)return ja[t]=s}return t}const nd="http://www.w3.org/1999/xlink";function rd(e,t,n,r,o,s=Eh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(nd,t.slice(6,t.length)):e.setAttributeNS(nd,t,n):n==null||s&&!Jl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":An(n)?String(n):n)}function ig(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?qc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Jl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){an.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function ag(e,t,n,r){e.addEventListener(t,n,r)}function lg(e,t,n,r){e.removeEventListener(t,n,r)}const od=Symbol("_vei");function ug(e,t,n,r,o=null){const s=e[od]||(e[od]={}),i=s[t];if(r&&i)i.value=an.NODE_ENV!=="production"?id(r,t):r;else{const[a,l]=cg(t);if(r){const u=s[t]=pg(an.NODE_ENV!=="production"?id(r,t):r,o);ag(e,a,u,l)}else i&&(lg(e,a,i,l),s[t]=void 0)}}const sd=/(?:Once|Passive|Capture)$/;function cg(e){let t;if(sd.test(e)){t={};let r;for(;r=e.match(sd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let La=0;const dg=Promise.resolve(),fg=()=>La||(dg.then(()=>La=0),La=Date.now());function pg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(hg(r,n.value),t,5,[r])};return n.value=e,n.attached=fg(),n}function id(e,t){return ce(e)||le(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
15
- Expected function or array of functions, received type ${typeof e}.`),Xe)}function hg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const ad=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mg=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?Qv(e,r,i):t==="style"?rg(e,n,r):vo(t)?ms(t)||ug(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):vg(e,t,r,i))?(ig(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&rd(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),rd(e,t,r,i))};function vg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&ad(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return ad(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const gg=["ctrl","shift","alt","meta"],yg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>gg.some(n=>e[`${n}Key`]&&!t.includes(n))},bg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=yg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},_g=Ke({patchProp:mg},Wv);let ld;function wg(){return ld||(ld=hv(_g))}const Eg=(...e)=>{const t=wg().createApp(...e);an.NODE_ENV!=="production"&&(Ng(t),Sg(t));const{mount:n}=t;return t.mount=r=>{const o=xg(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,Og(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Og(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ng(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>bh(t)||_h(t)||wh(t),writable:!1})}function Sg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function xg(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var kg={};function Tg(){Hv()}kg.NODE_ENV!=="production"&&Tg();let Xs;const Cg=new Uint8Array(16);function Pg(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Cg)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function $g(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const ud={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ma(e,t,n){if(ud.randomUUID&&!t&&!e)return ud.randomUUID();e=e||{};const r=e.random||(e.rng||Pg)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,$g(r)}const Hr=p.record(p.number()),Dg=p.object({type:p.literal("PercentageOffDiscount"),name:p.string(),description:p.string().optional(),percentage:p.number(),total:Hr.optional(),isExclusive:p.boolean()}),Ig=p.object({type:p.literal("FlatAmountOffDiscount"),name:p.string(),description:p.string().optional(),total:Hr.optional(),isExclusive:p.boolean()}),Ua=p.discriminatedUnion("type",[Dg,Ig]),cd=p.object({id:p.string(),name:p.string(),originalPrice:Hr,price:Hr,hasDiscount:p.boolean(),discount:Ua.optional()}),dd=p.object({countryCode:p.string(),streetAddress1:p.string(),streetAddress2:p.string().nullable(),locality:p.string().nullable(),region:p.string().nullable(),postCode:p.string()}),Ag=p.object({newsletterOptIn:p.boolean()});p.object({id:p.string(),email:p.string(),name:p.string(),tenantId:p.string(),address:dd.optional(),communicationPreferences:Ag,ownedProducts:p.string().array().optional()}).and(p.object({accessToken:p.string(),refreshToken:p.string()})),p.object({id:p.string(),name:p.string(),email:p.string(),resetPasswordToken:p.string().nullable()});var Fa=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Fa||{});const fd=p.object({code:p.string(),name:p.string(),description:p.string()}),pd=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable()}),Vg=p.object({id:p.string(),type:p.literal("Product"),productId:p.string(),quantity:p.number(),variationId:p.string(),price:Hr.optional(),variation:cd.optional(),product:pd.optional(),appliedDiscount:Ua.optional()}),Rg=p.object({id:p.string(),name:p.string(),tagline:p.string(),iconUrl:p.string().nullable(),partial:p.boolean(),products:pd.and(p.object({included:p.boolean().optional()})).array()}),jg=p.object({id:p.string(),type:p.literal("Bundle"),bundleId:p.string(),quantity:p.number(),variationId:p.string(),price:Hr.optional(),variation:cd.optional(),bundle:Rg.optional(),appliedDiscount:Ua.optional()}),hd=p.discriminatedUnion("type",[Vg,jg]),Lg=p.object({id:p.string(),status:p.literal(Fa.Open),currency:p.string(),items:hd.array(),couponsApplied:fd.array(),checkoutUrl:p.string().optional(),embeddedCheckoutUrl:p.string().optional()}),Ho=p.object({currency:p.string(),amount:p.number()}),Mg=p.object({original:Ho,discount:Ho,subtotal:Ho,taxes:Ho,due:Ho}),Ug=p.object({name:p.string().nullable(),businessName:p.string().nullable(),taxId:p.string().nullable(),email:p.string().nullable(),address:dd.nullable()}),md=p.object({id:p.string(),status:p.literal(Fa.Completed),currency:p.string(),customer:Ug,total:Mg,items:hd.array(),couponsApplied:fd.array()});p.discriminatedUnion("status",[Lg,md]);var Wn=Symbol("storefront");function Fg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Bg=p.object({source:p.literal("moonbase-checkout"),event:p.literal("close"),intent:p.string().optional()}),Hg=p.object({source:p.literal("moonbase-checkout"),event:p.literal("completed"),order:md}),Zg=p.discriminatedUnion("event",[Bg,Hg]);function qg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function vd(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Zg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&(console.log("Moonbase checkout completed",o.order),window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o})))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Qs=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=Fg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Ma(),status:ho.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Ma(),status:ho.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([v])=>!v.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const v of Object.keys(d))f.searchParams.append(v,d[v]);vd(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{tt(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{tt(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){qg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Wn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Ti||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==ho.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Ma(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:ho.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Qs.userKey="moonbase_user",Qs.sessionKey="moonbase_session",Qs.storefrontKey="moonbase_storefront";var Wg=Qs;function gd(e,t){const n=t??Ce(Wn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function yd(e,t){const n=t??Ce(Wn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ei(e){const t=Ce(Wn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function zg(e,t){const n=Ce(Wn),r=Kh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),l=n.stateFactory(`activation-request-${r}-completing`,!1),u=n.stateFactory(`activation-request-${r}-completion-timeout`,null),c=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Xt.Completed,l.value=!1):u.value=setTimeout(c,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Xt.Fulfilled&&(l.value=!0,c()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),ca(()=>{u.value&&clearTimeout(u.value)}),tt(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Xt.Fulfilled&&(l.value=!0,c())}catch(v){s.value=v}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:s,isInstalled:Q(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Xt.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,c()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,c()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Xt.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function Kg(e){const t=Ce(Wn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof Vr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Vr?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Wn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const v=t.storefront.value.products.find(w=>w.id===s.productId),O=((v==null?void 0:v.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=v==null?void 0:v.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const v=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((v==null?void 0:v.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=v==null?void 0:v.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n.returnUrl,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(!n.redirect&&o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{vd(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(n.redirect&&o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Wn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await t.client.identity.confirmEmailChange(n,r),t.updateUser()}}}function Gg(e,t){const n={endpoint:e};return new Wg(n,new oh(n),(r,o)=>C(o))}var bd=!1;function ti(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Jg(){return _d().__VUE_DEVTOOLS_GLOBAL_HOOK__}function _d(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Yg=typeof Proxy=="function",Xg="devtools-plugin:setup",Qg="plugin:settings:set";let Zr,Za;function ey(){var e;return Zr!==void 0||(typeof window<"u"&&window.performance?(Zr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Zr=!0,Za=globalThis.perf_hooks.performance):Zr=!1),Zr}function ty(){return ey()?Za.now():Date.now()}class ny{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return ty()}},n&&n.on(Qg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function wd(e,t){const n=e,r=_d(),o=Jg(),s=Yg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Xg,e,t);else{const i=s?new ny(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Zo;const qo=e=>Zo=e,Ed=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function br(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const _r=typeof window<"u",Od=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function ry(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){xd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Nd(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ni(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const ri=typeof navigator=="object"?navigator:{userAgent:""},Sd=/Macintosh/.test(ri.userAgent)&&/AppleWebKit/.test(ri.userAgent)&&!/Safari/.test(ri.userAgent),xd=_r?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Sd?oy:"msSaveOrOpenBlob"in ri?sy:iy:()=>{};function oy(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Nd(r.href)?qa(e,t,n):(r.target="_blank",ni(r)):ni(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ni(r)},0))}function sy(e,t="download",n){if(typeof e=="string")if(Nd(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ni(r)})}else navigator.msSaveOrOpenBlob(ry(e,n),t)}function iy(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Od.HTMLElement))||"safari"in Od,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Sd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function kd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function Td(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function ay(e){if(!kd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(Td(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function ly(e){if(!kd())try{Cd(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(Td(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function uy(e){try{xd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function cy(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function dy(e){try{const n=await cy()();if(!n)return;const{text:r,file:o}=n;Cd(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Cd(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Pd="🍍 Pinia (root)",oi="_root";function fy(e){return Wa(e)?{id:oi,label:Pd}:{id:e.$id,label:e.$id}}function py(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function hy(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function my(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let qr=!0;const si=[],wr="pinia:mutations",pt="pinia",{assign:vy}=Object,ii=e=>"🍍 "+e;function gy(e,t){wd({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:wr,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{ay(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await ly(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{uy(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await dy(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:ii(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ii(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Pd.toLowerCase().includes(r.filter.toLowerCase())):o).map(fy)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===oi?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==oi&&(globalThis.$store=ye(o)),r.state=py(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===oi?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),qr=!1,r.set(s,i,r.state.value),qr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
13
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=ji();n.__VUE__=!0,g.NODE_ENV!=="production"&&Fu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=Xe,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Un?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!gr(p,h)&&(L=gi(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case Vo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Ro:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ie(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,Qo):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&ua(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);S(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},S=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:ae,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Ea(p,R),J,z),we&&fr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!vo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&sn(M,L,p)}g.NODE_ENV!=="production"&&(vs(W,"__vnode",p,!0),vs(W,"__vueParentComponent",L,!0)),we&&fr(p,null,L,"beforeMount");const Pe=cv(I,ae);Pe&&ae.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&sn(M,L,p),Pe&&ae.enter(W),we&&fr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=xa(R.children)||R),h===R||Ac(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?Hn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,ae=h.props||je;let we;if(k&&vr(k,!1),(we=ae.onVnodeBeforeUpdate)&&sn(we,k,h,p),me&&fr(h,p,k,"beforeUpdate"),k&&vr(k,!0),g.NODE_ENV!=="production"&&Un&&(W=0,J=!1,M=null),(X.innerHTML&&ae.innerHTML==null||X.textContent&&ae.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Ea(h,I),R),g.NODE_ENV!=="production"&&Ao(p,h)):J||he(p,h,z,null,k,L,Ea(h,I),R,!1),W>0){if(W&16)D(z,X,ae,k,I);else if(W&2&&X.class!==ae.class&&s(z,"class",null,ae.class,I),W&4&&s(z,"style",X.style,ae.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=ae[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,ae,k,I);((we=ae.onVnodeUpdated)||me)&&Nt(()=>{we&&sn(we,k,h,p),me&&fr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!gr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!vo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(vo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ie=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:ae,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Un||X&2048)&&(X=0,W=!1,ae=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&ae&&p.dynamicChildren?(V(p.dynamicChildren,ae,k,I,R,J,z),g.NODE_ENV!=="production"?Ao(p,h):(h.key!=null||I&&h===I.subTree)&&Ao(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&(Ps(p),wn(z,"mount")),Do(p)&&(z.ctx.renderer=Qo),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(Ds(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&Ps(h),re(L,h,k),g.NODE_ENV!=="production"&&Ds();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:ae,u:we,parent:Pe,vnode:He}=p;{const It=kc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&Ps(X||p.vnode),vr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,ae&&go(ae),($t=X.props&&X.props.onVnodeBeforeUpdate)&&sn($t,Pe,X,He),vr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=Sa(p);g.NODE_ENV!=="production"&&En(p,"render");const zt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(zt,mt,d(zt.el),gi(zt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>sn($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Bu(p),g.NODE_ENV!=="production"&&Ds()}else{let X;const{el:ae,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,zt=Fr(h);if(vr(p,!1),Pe&&go(Pe),!zt&&(X=we&&we.onVnodeBeforeMount)&&sn(X,Me,h),vr(p,!0),ae&&kf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=Sa(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),kf(ae,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};zt&&mt.__asyncHydrate?mt.__asyncHydrate(ae,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=Sa(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!zt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>sn(X,Me,It),I)}(h.shapeFlag&256||Me&&Fr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new su(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>$s(me),vr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>go(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>go(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Ru(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:ae,shapeFlag:we}=h;if(ae>0){if(ae&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(ae&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&Xo(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):Xo(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Rr,h=h||Rr;const M=p.length,me=h.length,X=Math.min(M,me);let ae;for(ae=0;ae<X;ae++){const we=h[ae]=W?Hn(h[ae]):qt(h[ae]);O(p[ae],we,k,null,I,R,J,z,W)}M>me?Xo(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,ae=me-1;for(;M<=X&&M<=ae;){const we=p[M],Pe=h[M]=W?Hn(h[M]):qt(h[M]);if(gr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=ae;){const we=p[X],Pe=h[ae]=W?Hn(h[ae]):qt(h[ae]);if(gr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,ae--}if(M>X){if(M<=ae){const we=ae+1,Pe=we<me?h[we].el:L;for(;M<=ae;)O(null,h[M]=W?Hn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>ae)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=ae;M++){const Et=h[M]=W?Hn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=ae-Pe+1;let zt=!1,It=0;const es=new Array(mt);for(M=0;M<mt;M++)es[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=ae;Me++)if(es[Me-Pe]===0&&gr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(es[dn-Pe]=M+1,dn>=It?It=dn:zt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Tf=zt?dv(es):Rr;for(Me=Tf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Cf=Et+1<me?h[Et+1].el:L;es[M]===0?O(null,dn,k,Cf,I,R,J,z,W):zt&&(Me<0||M!==Tf[Me]?ht(dn,k,Cf,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,Qo);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Ro){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:ae,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};ae?ae(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:ae,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&ua(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&ae,He=!Fr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&sn(Me,h,p),me&6)ww(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&fr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,Qo,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?Xo(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&Xo(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&sn(Me,h,p),Pe&&fr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):er(k,L);return}if(h===Ro){S(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},er=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},ww=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Tc(W),Tc(M),L&&go(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&fm(p)},Xo=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},gi=p=>{if(p.shapeFlag&6)return gi(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Wu];return k?f(k):h};let pl=!1;const Sf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,pl||(pl=!0,Ru(),ju(),pl=!1)},Qo={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:gi,o:e};let xf,kf;return{render:Sf,hydrate:xf,createApp:Wm(Sf,xf)}}function Ea({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function vr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ao(e,t,n=!1){const r=e.children,o=t.children;if(le(r)&&le(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Hn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ao(i,a)),a.type===Vo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function kc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:kc(t)}function Tc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Oa(e,null,t)}function tt(e,t,n){return g.NODE_ENV!=="production"&&!ce(t)&&F("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Oa(e,t,n)}function Oa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(zs)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:Xe,resume:Xe,pause:Xe};const u=Je;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():$s(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Cc(r,e):()=>r[e]:e.bind(r,r);let s;ce(t)?s=t:(s=t.handler,n=t);const i=Mo(this),a=Oa(o,s.bind(r),n);return i(),a}function Cc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(ar(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${ar(Ct(t))}" prop.`);else{const f=c[t];ce(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(oh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[ar(c)]&&F(`Event "${c}" is emitted in component ${Ks(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=ar(t)]||r[a=ar(Ct(t))];!l&&s&&(l=r[a=ar(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function Pc(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!ce(e)){const l=u=>{const c=Pc(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(le(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Bs(e,t){return!e||!mo(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let Na=!1;function Hs(){Na=!0}function Sa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=Vs(e);let $,H;g.NODE_ENV!=="production"&&(Na=!1);try{if(n.shapeFlag&4){const S=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(S,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):S;$=qt(u.call(U,S,c,g.NODE_ENV!=="production"?en(d):d,m,f,b)),H=a}else{const S=t;g.NODE_ENV!=="production"&&a===d&&Hs(),$=qt(S.length>1?S(g.NODE_ENV!=="production"?en(d):d,g.NODE_ENV!=="production"?{get attrs(){return Hs(),en(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):S(g.NODE_ENV!=="production"?en(d):d,null)),H=t.props?a:gv(a)}}catch(S){jo.length=0,No(S,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Dc($)),H&&O!==!1){const S=Object.keys(H),{shapeFlag:U}=T;if(S.length){if(U&7)s&&S.some(ps)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!Na&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];mo(D)?ps(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!$c(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!$c(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),Po(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,Vs(w),$}const Dc=e=>{const t=e.children,n=e.dynamicChildren,r=xa(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Dc(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function xa(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Br(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return xa(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||mo(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!ps(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},$c=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Un||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Ic(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Bs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Ic(r,i,u):!0:!!i;return!1}function Ic(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Bs(n,s))return!0}return!1}function _v({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ac=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):Vu(e)}const xe=Symbol.for("v-fgt"),Vo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Ro=Symbol.for("v-stc"),jo=[];let Pt=null;function y(e=!1){jo.push(Pt=e?null:[])}function Ev(){jo.pop(),Pt=jo[jo.length-1]||null}let Lo=1;function Vc(e){Lo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Rc(e){return e.dynamicChildren=Lo>0?Pt||Rr:null,Ev(),Lo>0&&Pt&&Pt.push(e),e}function x(e,t,n,r,o,s){return Rc(N(e,t,n,r,o,s,!0))}function Ne(e,t,n,r,o){return Rc(Z(e,t,n,r,o,!0))}function Br(e){return e?e.__v_isVNode===!0:!1}function gr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Is.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ov=(...e)=>Lc(...e),jc=({key:e})=>e??null,Zs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||ce(e)?{i:et,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&jc(t),ref:t&&Zs(t),scopeId:Zu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:et};return a?(ka(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Lo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Lc;function Lc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===sc)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Br(e)){const a=Zt(e,t,!0);return n&&ka(a,n),Lo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(qc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=gs(a)),Ie(l)&&(Oo(l)&&!le(l)&&(l=Ke({},l)),t.style=Li(l))}const i=Ze(e)?1:Ac(e)?128:zu(e)?64:Ie(e)?4:ce(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&Oo(e)&&(e=ye(e),F("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
14
+ Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?Oo(e)||gc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Ta(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&jc(u),ref:t&&t.ref?n&&s?le(s)?s.concat(Zs(t)):[s,Zs(t)]:Zs(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&le(a)?a.map(Mc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Po(c,l.clone(c)),c}function Mc(e){const t=Zt(e);return le(e.children)&&(t.children=e.children.map(Mc)),t}function ke(e=" ",t=0){return Z(Vo,null,e,t)}function Sv(e,t){const n=Z(Ro,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(y(),Ne(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):le(e)?Z(xe,null,e.slice()):typeof e=="object"?Hn(e):Z(Vo,null,String(e))}function Hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function ka(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),ka(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!gc(t)?t._ctx=et:o===3&&et&&(et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:et},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ta(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=gs([t.class,r.class]));else if(o==="style")t.style=Li([t.style,r.style]);else if(mo(o)){const s=t[o],i=r[o];i&&s!==i&&!(le(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function sn(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=hc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new nu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bc(r,o),emitsOptions:Pc(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Je=null;const qs=()=>Je||et;let Ws,Ca;{const e=ji(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ws=t("__VUE_INSTANCE_SETTERS__",n=>Je=n),Ca=t("__VUE_SSR_SETTERS__",n=>zs=n)}const Mo=e=>{const t=Je;return Ws(e),e.scope.on(),()=>{e.scope.off(),Ws(t)}},Uc=()=>{Je&&Je.scope.off(),Ws(null)},Cv=hn("slot,component");function Pa(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Fc(e){return e.vnode.shapeFlag&4}let zs=!1;function Pv(e,t=!1,n=!1){t&&Ca(t);const{props:r,children:o}=e.vnode,s=Fc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Ca(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&Pa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)Pa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)qu(s[i])}r.compilerOptions&&$v()&&F('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Mo(e);vn();const a=Lr(o,e,0,[g.NODE_ENV!=="production"?en(e.props):e.props,s]);if(gn(),i(),Ai(a)){if(Fr(e)||rc(e),a.then(Uc,Uc),t)return a.then(l=>{Bc(e,l,t)}).catch(l=>{No(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Bc(e,a,t)}else Hc(e,t)}function Bc(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Br(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Cu(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),Hc(e,n)}let Da;const $v=()=>!Da;function Hc(e,t,n){const r=e.type;if(!e.render){if(!t&&Da&&!r.render){const o=r.template||ga(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Da(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||Xe}{const o=Mo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===Xe&&!t&&(r.template?F('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):F("Component is missing template or render function: ",r))}const Zc=g.NODE_ENV!=="production"?{get(e,t){return Hs(),Qe(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return Qe(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return Qe(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(le(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Zc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Zc),slots:e.slots,emit:e.emit,expose:t}}function $a(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cu(jn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hr)return hr[n](e)},has(t,n){return n in t||n in hr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ia(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function Ks(e,t,n=!1){let r=Ia(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Rv(r):n?"App":"Anonymous"}function qc(e){return ce(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,zs);if(g.NODE_ENV!=="production"){const r=qs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!le(t)?Br(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Br(n)&&(n=[n]),Z(e,t,n))}function jv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:tn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(ce(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(le(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Wc="3.5.3",On=g.NODE_ENV!=="production"?F:Xe;var an={};let Aa;const zc=typeof window<"u"&&window.trustedTypes;if(zc)try{Aa=zc.createPolicy("vue",{createHTML:e=>e})}catch(e){an.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Kc=Aa?e=>Aa.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Gc=Nn&&Nn.createElement("template"),Uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Gc.innerHTML=Kc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Gc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zn="transition",Uo="animation",Fo=Symbol("_vtc"),Jc={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},Fv=Ke({},Yu,Jc),Va=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),yr=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yc=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Jc||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:S,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ie,$e)=>{br(D,ie?c:a),br(D,ie?u:i),$e&&$e()},A=(D,ie)=>{D._isLeaving=!1,br(D,d),br(D,m),br(D,f),ie&&ie()},V=D=>(ie,$e)=>{const E=D?j:H,P=()=>q(ie,D,$e);yr(E,[ie,P]),Xc(()=>{br(ie,D?l:s),qn(ie,D?c:a),Yc(E)||Qc(ie,r,O,P)})};return Ke(t,{onBeforeEnter(D){yr($,[D]),qn(D,s),qn(D,i)},onBeforeAppear(D){yr(U,[D]),qn(D,l),qn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ie){D._isLeaving=!0;const $e=()=>A(D,ie);qn(D,d),qn(D,f),Wv(),Xc(()=>{D._isLeaving&&(br(D,d),qn(D,m),Yc(te)||Qc(D,r,w,$e))}),yr(te,[D,$e])},onEnterCancelled(D){q(D,!1),yr(T,[D])},onAppearCancelled(D){q(D,!0),yr(ge,[D])},onLeaveCancelled(D){A(D),yr(S,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[Ra(e.enter),Ra(e.leave)];{const t=Ra(e);return[t,t]}}function Ra(e){const t=sh(e);return an.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Fo]||(e[Fo]=new Set)).add(t)}function br(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Fo];n&&(n.delete(t),n.size||(e[Fo]=void 0))}function Xc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function Qc(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Zn}Delay`),s=r(`${Zn}Duration`),i=ed(o,s),a=r(`${Uo}Delay`),l=r(`${Uo}Duration`),u=ed(a,l);let c=null,d=0,f=0;t===Zn?i>0&&(c=Zn,d=i,f=s.length):t===Uo?u>0&&(c=Uo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Zn:Uo:null,f=c?c===Zn?s.length:l.length:0);const m=c===Zn&&/\b(transform|all)(,|$)/.test(r(`${Zn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function ed(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>td(n)+td(e[r])))}function td(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Fo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const nd=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(an.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Gs(r,a,"")}else for(const i in t)n[i]==null&&Gs(r,i,"");for(const i in n)i==="display"&&(s=!0),Gs(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");nd in e&&(e[nd]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,rd=/\s*!important$/;function Gs(e,t,n){if(le(n))n.forEach(r=>Gs(e,t,r));else if(n==null&&(n=""),an.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);rd.test(n)?e.setProperty(mn(r),n.replace(rd,""),"important"):e[r]=n}}const od=["Webkit","Moz","ms"],ja={};function Qv(e,t){const n=ja[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return ja[t]=r;r=ir(r);for(let o=0;o<od.length;o++){const s=od[o]+r;if(s in e)return ja[t]=s}return t}const sd="http://www.w3.org/1999/xlink";function id(e,t,n,r,o,s=vh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(sd,t.slice(6,t.length)):e.setAttributeNS(sd,t,n):n==null||s&&!Ql(n)?e.removeAttribute(t):e.setAttribute(t,s?"":An(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Kc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Ql(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){an.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ad=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ad]||(e[ad]={}),i=s[t];if(r&&i)i.value=an.NODE_ENV!=="production"?ud(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(an.NODE_ENV!=="production"?ud(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const ld=/(?:Once|Passive|Capture)$/;function og(e){let t;if(ld.test(e)){t={};let r;for(;r=e.match(ld);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let La=0;const sg=Promise.resolve(),ig=()=>La||(sg.then(()=>La=0),La=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function ud(e,t){return ce(e)||le(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
15
+ Expected function or array of functions, received type ${typeof e}.`),Xe)}function lg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const cd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):mo(t)?ps(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&id(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),id(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&cd(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return cd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let dd;function mg(){return dd||(dd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);an.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>ph(t)||hh(t)||mh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let Js;const Og=new Uint8Array(16);function Ng(){if(!Js&&(Js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Js(Og)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Sg(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const fd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ma(e,t,n){if(fd.randomUUID&&!t&&!e)return fd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Wn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:zl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function pd(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Ys=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Ma(),status:po.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Ma(),status:po.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);pd(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{tt(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{tt(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Wn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof xi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==po.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Ma(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:po.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ys.userKey="moonbase_user",Ys.sessionKey="moonbase_session",Ys.storefrontKey="moonbase_storefront";var Dg=Ys;function hd(e,t){const n=t??Ce(Wn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function md(e,t){const n=t??Ce(Wn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Xs(e){const t=Ce(Wn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(Wn),r=Bh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),l=n.stateFactory(`activation-request-${r}-completing`,!1),u=n.stateFactory(`activation-request-${r}-completion-timeout`,null),c=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Xt.Completed,l.value=!1):u.value=setTimeout(c,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Xt.Fulfilled&&(l.value=!0,c()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),ca(()=>{u.value&&clearTimeout(u.value)}),tt(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Xt.Fulfilled&&(l.value=!0,c())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:s,isInstalled:Q(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Xt.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,c()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,c()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Xt.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function Ig(e){const t=Ce(Wn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof or?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof or?new Error("Voucher code invalid"):r}}}}function Ua(e){const t=e??Ce(Wn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n.returnUrl,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(!n.redirect&&o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{pd(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(n.redirect&&o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Wn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await t.client.identity.confirmEmailChange(n,r),t.updateUser()}}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Xp(n),(r,o)=>C(o))}var vd=!1;function Qs(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Fa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return gd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function gd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let Hr,Ba;function Mg(){var e;return Hr!==void 0||(typeof window<"u"&&window.performance?(Hr=!0,Ba=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Hr=!0,Ba=globalThis.perf_hooks.performance):Hr=!1),Hr}function Ug(){return Mg()?Ba.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function yd(e,t){const n=e,r=gd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Bo;const Ho=e=>Bo=e,bd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function _r(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const wr=typeof window<"u",_d=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ha(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Od(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function wd(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ei(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const ti=typeof navigator=="object"?navigator:{userAgent:""},Ed=/Macintosh/.test(ti.userAgent)&&/AppleWebKit/.test(ti.userAgent)&&!/Safari/.test(ti.userAgent),Od=wr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Ed?Hg:"msSaveOrOpenBlob"in ti?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?wd(r.href)?Ha(e,t,n):(r.target="_blank",ei(r)):ei(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ei(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(wd(e))Ha(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ei(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Ha(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(_d.HTMLElement))||"safari"in _d,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Ed)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Za(e){return"_a"in e&&"install"in e}function Nd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function Sd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!Nd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(Sd(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!Nd())try{xd(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(Sd(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Od(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;xd(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function xd(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const kd="🍍 Pinia (root)",ni="_root";function Yg(e){return Za(e)?{id:ni,label:kd}:{id:e.$id,label:e.$id}}function Xg(e){if(Za(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let Zr=!0;const ri=[],Er="pinia:mutations",pt="pinia",{assign:ty}=Object,oi=e=>"🍍 "+e;function ny(e,t){yd({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ri,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Er,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:oi(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:oi(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):kd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===ni?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ni&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===ni?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Za(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Zr=!1,r.set(s,i,r.state.value),Zr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
16
16
  ${i}
17
- Only state can be modified.`);i[0]="$state",qr=!1,r.set(s,i,r.state.value),qr=!0}})})}function yy(e,t){si.includes(ii(t.$id))||si.push(ii(t.$id)),wd({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:si,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=$d++;n.addTimelineEvent({layerId:wr,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{zn=void 0,n.addTimelineEvent({layerId:wr,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{zn=void 0,n.addTimelineEvent({layerId:wr,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{tt(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),qr&&n.addTimelineEvent({layerId:wr,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:zn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!qr)return;const u={time:r(),title:my(a),data:vy({store:Wt(t.$id)},hy(i)),groupId:zn};a===ln.patchFunction?u.subtitle="⤵️":a===ln.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:wr,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=jn(i=>{o(i),n.addTimelineEvent({layerId:wr,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`"${t.$id}" store installed 🆕`)})}let $d=0,zn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=$d,i=n?new Proxy(e,{get(...l){return zn=s,Reflect.get(...l)},set(...l){return zn=s,Reflect.set(...l)}}):e;zn=s;const a=r[o].apply(i,arguments);return zn=void 0,a}}function by({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}yy(e,t)}}function _y(){const e=eu(!0),t=e.run(()=>C({}));let n=[],r=[];const o=jn({install(s){qo(o),o._a=s,s.provide(Ed,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&_r&&gy(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!bd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(by),o}function Id(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];br(o)&&br(r)&&!qe(r)&&!tn(r)?e[n]=Id(o,r):e[n]=r}return e}const Ad=()=>{};function Vd(e,t,n,r=Ad){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&tu()&&Oh(o),o}function Wr(e,...t){e.slice().forEach(n=>{n(...t)})}const wy=e=>e(),Rd=Symbol(),za=Symbol();function Ka(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];br(o)&&br(r)&&e.hasOwnProperty(n)&&!qe(r)&&!tn(r)?e[n]=Ka(o,r):e[n]=r}return e}const Ey=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Oy(e){return!br(e)||!e.hasOwnProperty(Ey)}const{assign:Rt}=Object;function jd(e){return!!(qe(e)&&e.effect)}function Ld(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?ku(C(o?o():{}).value):ku(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=jn(Q(()=>{qo(n);const v=n._s.get(e);return i[f].call(v,v)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!bd&&(l.onTrigger=A=>{u?v=A:u==!1&&!j._hotUpdating&&(Array.isArray(v)?v.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],v;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function D(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(v=[]),typeof A=="function"?(A(r.state.value[e]),V={type:ln.patchFunction,storeId:e,events:v}):(Ka(r.state.value[e],A),V={type:ln.patchObject,payload:A,storeId:e,events:v});const $=w=Symbol();ko().then(()=>{w===$&&(u=!0)}),c=!0,Wr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,$=V?V():{};this.$patch(ie=>{Rt(ie,$)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Ad;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Rd in A)return A[za]=V,A;const $=function(){qo(r);const ie=Array.from(arguments),De=[],E=[];function P(he){De.push(he)}function Y(he){E.push(he)}Wr(f,{args:ie,name:$[za],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ie)}catch(he){throw Wr(E,he),he}return re instanceof Promise?re.then(he=>(Wr(De,he),he)).catch(he=>(Wr(E,he),Promise.reject(he))):(Wr(De,re),re)};return $[Rd]=!0,$[za]=V,$},S=jn({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:Vd.bind(null,f),$patch:D,$reset:H,$subscribe(A,V={}){const $=Vd(d,A,V.detached,()=>ie()),ie=i.run(()=>tt(()=>r.state.value[e],De=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:ln.direct,events:v},De)},Rt({},l,V)));return $},$dispose:T},j=Oo(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&_r?Rt({_hmrPayload:S,_customProperties:jn(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||wy)(()=>r._e.run(()=>(i=eu()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!jd(V)||tn(V))Te.NODE_ENV!=="production"&&o?ti(O.value,A,Yi(q,A)):s||(b&&Oy(V)&&(qe(V)?V.value=b[A]:Ka(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&S.state.push(A);else if(typeof V=="function"){const $=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=$,Te.NODE_ENV!=="production"&&(S.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&jd(V)&&(S.getters[A]=s?n.getters[A]:V,_r&&(q._getters||(q._getters=jn([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");D(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=jn(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const $=A.$state[V],ie=j.$state[V];typeof $=="object"&&br($)&&br(ie)?Id($,ie):A.$state[V]=ie}ti(j,V,Yi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Ha(j,V)}),u=!1,c=!1,r.state.value[e]=Yi(A._hmrPayload,"hotState"),c=!0,ko().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const $=A[V];ti(j,V,te($,V))}for(const V in A._hmrPayload.getters){const $=A._hmrPayload.getters[V],ie=s?Q(()=>(qo(r),$.call(j,j))):$;ti(j,V,ie)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Ha(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Ha(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&_r){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&_r){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach($=>j._customProperties.add($)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
17
+ Only state can be modified.`);i[0]="$state",Zr=!1,r.set(s,i,r.state.value),Zr=!0}})})}function ry(e,t){ri.includes(oi(t.$id))||ri.push(oi(t.$id)),yd({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ri,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Td++;n.addTimelineEvent({layerId:Er,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{zn=void 0,n.addTimelineEvent({layerId:Er,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{zn=void 0,n.addTimelineEvent({layerId:Er,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{tt(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Zr&&n.addTimelineEvent({layerId:Er,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:zn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Zr)return;const u={time:r(),title:ey(a),data:ty({store:Wt(t.$id)},Qg(i)),groupId:zn};a===ln.patchFunction?u.subtitle="⤵️":a===ln.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Er,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=jn(i=>{o(i),n.addTimelineEvent({layerId:Er,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`"${t.$id}" store installed 🆕`)})}let Td=0,zn;function Cd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Td,i=n?new Proxy(e,{get(...l){return zn=s,Reflect.get(...l)},set(...l){return zn=s,Reflect.set(...l)}}):e;zn=s;const a=r[o].apply(i,arguments);return zn=void 0,a}}function oy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Cd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Cd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}ry(e,t)}}function sy(){const e=ru(!0),t=e.run(()=>C({}));let n=[],r=[];const o=jn({install(s){Ho(o),o._a=s,s.provide(bd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&wr&&ny(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!vd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(oy),o}function Pd(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];_r(o)&&_r(r)&&!qe(r)&&!tn(r)?e[n]=Pd(o,r):e[n]=r}return e}const Dd=()=>{};function $d(e,t,n,r=Dd){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&ou()&&gh(o),o}function qr(e,...t){e.slice().forEach(n=>{n(...t)})}const iy=e=>e(),Id=Symbol(),qa=Symbol();function Wa(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];_r(o)&&_r(r)&&e.hasOwnProperty(n)&&!qe(r)&&!tn(r)?e[n]=Wa(o,r):e[n]=r}return e}const ay=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function ly(e){return!_r(e)||!e.hasOwnProperty(ay)}const{assign:Rt}=Object;function Ad(e){return!!(qe(e)&&e.effect)}function Vd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?Pu(C(o?o():{}).value):Pu(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=jn(Q(()=>{Ho(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=za(e,u,t,n,r,!0),l}function za(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!vd&&(l.onTrigger=A=>{u?m=A:u==!1&&!j._hotUpdating&&(Array.isArray(m)?m.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function $(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(m=[]),typeof A=="function"?(A(r.state.value[e]),V={type:ln.patchFunction,storeId:e,events:m}):(Wa(r.state.value[e],A),V={type:ln.patchObject,payload:A,storeId:e,events:m});const D=w=Symbol();xo().then(()=>{w===D&&(u=!0)}),c=!0,qr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,D=V?V():{};this.$patch(ie=>{Rt(ie,D)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Dd;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Id in A)return A[qa]=V,A;const D=function(){Ho(r);const ie=Array.from(arguments),$e=[],E=[];function P(he){$e.push(he)}function Y(he){E.push(he)}qr(f,{args:ie,name:D[qa],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ie)}catch(he){throw qr(E,he),he}return re instanceof Promise?re.then(he=>(qr($e,he),he)).catch(he=>(qr(E,he),Promise.reject(he))):(qr($e,re),re)};return D[Id]=!0,D[qa]=V,D},S=jn({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:$d.bind(null,f),$patch:$,$reset:H,$subscribe(A,V={}){const D=$d(d,A,V.detached,()=>ie()),ie=i.run(()=>tt(()=>r.state.value[e],$e=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:ln.direct,events:m},$e)},Rt({},l,V)));return D},$dispose:T},j=Eo(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&wr?Rt({_hmrPayload:S,_customProperties:jn(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||iy)(()=>r._e.run(()=>(i=ru()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!Ad(V)||tn(V))Te.NODE_ENV!=="production"&&o?Qs(O.value,A,Yi(q,A)):s||(b&&ly(V)&&(qe(V)?V.value=b[A]:Wa(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&S.state.push(A);else if(typeof V=="function"){const D=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=D,Te.NODE_ENV!=="production"&&(S.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&Ad(V)&&(S.getters[A]=s?n.getters[A]:V,wr&&(q._getters||(q._getters=jn([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");$(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=jn(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const D=A.$state[V],ie=j.$state[V];typeof D=="object"&&_r(D)&&_r(ie)?Pd(D,ie):A.$state[V]=ie}Qs(j,V,Yi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Fa(j,V)}),u=!1,c=!1,r.state.value[e]=Yi(A._hmrPayload,"hotState"),c=!0,xo().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const D=A[V];Qs(j,V,te(D,V))}for(const V in A._hmrPayload.getters){const D=A._hmrPayload.getters[V],ie=s?Q(()=>(Ho(r),D.call(j,j))):D;Qs(j,V,ie)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Fa(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Fa(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&wr){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&wr){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(D=>j._customProperties.add(D)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
18
18
  state: () => new MyClass()
19
- Found in store "${j.$id}".`),b&&s&&n.hydrate&&n.hydrate(j.$state,b),u=!0,c=!0,j}function Ny(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=Qm();if(a=(Te.NODE_ENV==="test"&&Zo&&Zo._testing?null:a)||(u?Ce(Ed,null):null),a&&qo(a),Te.NODE_ENV!=="production"&&!Zo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
19
+ Found in store "${j.$id}".`),b&&s&&n.hydrate&&n.hydrate(j.$state,b),u=!0,c=!0,j}function uy(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=zm();if(a=(Te.NODE_ENV==="test"&&Bo&&Bo._testing?null:a)||(u?Ce(bd,null):null),a&&Ho(a),Te.NODE_ENV!=="production"&&!Bo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
20
20
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
21
- This will fail in production.`);a=Zo,a._s.has(r)||(s?Ga(r,t,o,a):Ld(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):Ld(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&_r){const d=zs();if(d&&d.proxy&&!l){const f=d.proxy,v="_pStores"in f?f._pStores:f._pStores={};v[r]=c}}return c}return i.$id=r,i}var ue=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ue||{});const Sy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},Wo=Symbol("options");var Se=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Se||{});const Re=Ny("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),ko(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),un=e=>new Promise(t=>setTimeout(t,e)),xy=["data-visible","data-location"],ky={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},Ty=["disabled"],Cy=de({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(Wo);return Le(()=>{un(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),x("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Se).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),x("a",ky,i[3]||(i[3]=[$v('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):fe("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),x("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Se).Cart,_(ue).AddToCart))}," Cart ")):fe("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),x("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Se).Authentication,_(ue).SignIn))}," Log in ",8,Ty)):(c=_(o))!=null&&c.toolbar.show.account?(y(),x("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Se).Customer,_(ue).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):fe("",!0)],8,xy)}}}),Py=["hidden"],$y=["for"],Dy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],Iy=["id"],Ay=["id"],wt=de({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,$y),N("input",Ta({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,Dy),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,Iy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,Ay)):fe("",!0)],8,Py))}}),zr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Vy={},Ry={fill:"none",viewBox:"0 0 24 24"};function jy(e,t){return y(),x("svg",Ry,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=zr(Vy,[["render",jy],["__scopeId","data-v-687bcaf0"]]),Ly=["disabled"],Md=Symbol("form-state"),Kn=de({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Md,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await un(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(i,a)=>(y(),x("form",{disabled:n.value||r.value,onSubmit:bg(s,["prevent"])},[fa(i.$slots,"default")],40,Ly))}}),My=["disabled","data-success","data-error","data-working"],Uy=["data-visible"],Gn=zr(de({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Md),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),x("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Ne(jt,{key:0})):fe("",!0)],8,Uy),ke(" "+K(s.value),1)],8,My))}}),[["__scopeId","data-v-1440b0cf"]]),Fy={class:"moonbase:checkbox"},By={class:"moonbase:checkbox-container"},Hy=["id","name","value","disabled","aria-invalid","aria-describedby"],Zy={class:"moonbase:checkbox-description"},qy=["for"],Wy=["id"],zy=["id"],Ud=de({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",Fy,[N("div",By,[N("input",Ta({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Hy)]),N("div",Zy,[N("label",{for:`mb-${t.name}`},K(t.label),9,qy),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Wy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,zy)):fe("",!0)])]))}}),Ky=["data-visible"],Gy=de({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);un(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Ne(Kn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=v=>a.value=v),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Ud,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=v=>l.value=v),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Gn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Ky),N("button",{type:"button",onClick:f[4]||(f[4]=v=>_(r).show(_(Se).Authentication,_(ue).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Jy={key:0,class:"moonbase:loader"},Yy={key:1,class:"moonbase:error","data-visible":""},Xy=["data-visible"],Qy=de({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof Vr?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const v=await o.signIn(f,a.value);un(1500).then(()=>n("confirmedAccount",v))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Ne(Kn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),x("div",Jy,[Z(jt)])):i.value?(y(),x(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Xy)],64)):(y(),x("div",Yy,K(l.value),1))]),_:1}))}}),eb=["data-visible"],tb=de({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),un(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Vr?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Ne(Kn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(()=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Gn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,eb)]),_:1}))}}),nb=["data-visible"],rb=de({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);un(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Ne(Kn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,nb)]),_:1}))}}),ob={class:"moonbase:confirm-email-change"},sb={key:0,class:"moonbase:loader"},ib={key:1,class:"moonbase:error","data-visible":""},ab=de({__name:"ConfirmEmailChange",setup(e){const t=Re(),{user:n,confirmEmailChange:r}=St(),o=C(!0),s=C(null);return Le(async()=>{try{const i=t.getParameter("email"),a=t.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){s.value=i.message}o.value=!1}),(i,a)=>{var l;return y(),x("div",ob,[o.value?(y(),x("div",sb,[Z(jt)])):s.value?(y(),x("div",ib,K(s.value),1)):(y(),x(xe,{key:2},[N("h3",null," Hi "+K((l=_(n))==null?void 0:l.name)+", ",1),a[0]||(a[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class lb{constructor(){xr(this,"current",this.detect());xr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let zo=new lb;function Ja(e,t,n,r){zo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Fd(e,t,n,r){zo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var $t=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))($t||{});function Ya(){let e=C(0),t=C(!0);return Fd(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Ye(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ye),r}var Jn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Jn||{}),Yn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Yn||{});function nt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Hd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return ai(i);if(t&1){const a=s.unmount??!0?0:1;return Ye(a,{0(){return null},1(){return ai({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return ai(i)}function ai({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,v]of Object.entries(r))typeof v=="boolean"&&(c=!0),v===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Bd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!ub(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
21
+ This will fail in production.`);a=Bo,a._s.has(r)||(s?za(r,t,o,a):Vd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?za(d,t,o,a,!0):Vd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&wr){const d=qs();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var ue=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ue||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},Zo=Symbol("options");var Se=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Se||{});const Re=uy("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),xo(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),un=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=de({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(Zo);return Le(()=>{un(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),x("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Se).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),x("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):fe("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),x("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Se).Cart,_(ue).AddToCart))}," Cart ")):fe("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),x("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Se).Authentication,_(ue).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),x("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Se).Customer,_(ue).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):fe("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=de({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Ta({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):fe("",!0)],8,my))}}),Wr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),x("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Wr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Rd=Symbol("form-state"),Kn=de({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Rd,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await un(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(i,a)=>(y(),x("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[fa(i.$slots,"default")],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Gn=Wr(de({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Rd),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),x("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Ne(jt,{key:0})):fe("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-1440b0cf"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],jd=de({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),x("div",xy,[N("div",ky,[N("input",Ta({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),x("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),x("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):fe("",!0)])]))}}),Iy=["data-visible"],Ay=de({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);un(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Ne(Kn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(jd,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Gn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Se).Authentication,_(ue).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=de({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof or?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);un(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Ne(Kn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),x("div",Vy,[Z(jt)])):i.value?(y(),x(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),x("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=de({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),un(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof or?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Ne(Kn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(()=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Gn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=de({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);un(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Ne(Kn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=de({__name:"ConfirmEmailChange",setup(e){const t=Re(),{user:n,confirmEmailChange:r}=St(),o=C(!0),s=C(null);return Le(async()=>{try{const i=t.getParameter("email"),a=t.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){s.value=i.message}o.value=!1}),(i,a)=>{var l;return y(),x("div",Hy,[o.value?(y(),x("div",Zy,[Z(jt)])):s.value?(y(),x("div",qy,K(s.value),1)):(y(),x(xe,{key:2},[N("h3",null," Hi "+K((l=_(n))==null?void 0:l.name)+", ",1),a[0]||(a[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){kr(this,"current",this.detect());kr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let qo=new zy;function Ka(e,t,n,r){qo.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ld(e,t,n,r){qo.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ga(){let e=C(0),t=C(!0);return Ld(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Ye(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ye),r}var Jn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Jn||{}),Yn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Yn||{});function nt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Ud(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return si(i);if(t&1){const a=s.unmount??!0?0:1;return Ye(a,{0(){return null},1(){return si({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return si(i)}function si({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Ja(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Md(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
22
22
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
23
23
  `)].join(`
24
- `));const f=Hd(c.props??{},i,l),v=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(v.props||(v.props={}),v.props[b]=f[b]);return v}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Bd(e){return e.flatMap(t=>t.type===xe?Bd(t.children):[t])}function Hd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ub(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Xn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Xn||{});let Qn=de({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return nt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function cb(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(zo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const li=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ui(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(li)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Zd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Ye(t,{0(){return e.matches(li)},1(){let r=e;for(;r!==null;){if(r.matches(li))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Er(e){e==null||e.focus({preventScroll:!0})}const db=["textarea","input"].join(",");function fb(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,db))??!1}function Kr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function it(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Kr(e):e:ui(e);o.length>0&&i.length>1&&(i=i.filter(v=>!o.includes(v))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let v=l+c;if(t&16)v=(v+d)%d;else{if(v<0)return 3;if(v>=d)return 1}f=i[v],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&fb(f)&&f.select(),2}let Or=[];cb(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Or[0]===t.target)return;let n=t.target;n=n.closest(li),Or.unshift(n??t.target),Or=Or.filter(r=>r!=null&&r.isConnected),Or.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ci(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function qd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var Wd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Wd||{});const Ko=Object.assign(de({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),hb({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=mb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));vb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(v){const b=G(o);if(!b)return;(w=>w())(()=>{Ye(l.value,{[$t.Forwards]:()=>{it(b,We.First,{skipElements:[v.relatedTarget]})},[$t.Backwards]:()=>{it(b,We.Last,{skipElements:[v.relatedTarget]})}})})}const c=C(!1);function d(v){v.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(v){if(!i.value)return;const b=qd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=v.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(zd(b,O)||(c.value?it(G(o),Ye(l.value,{[$t.Forwards]:()=>We.Next,[$t.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Er(v.target)))}return()=>{const v={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:D,...H}=e;return Ue(xe,[!!(O&4)&&Ue(Qn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Xn.Focusable}),nt({ourProps:b,theirProps:{...t,...H},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(Qn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Xn.Focusable})])}}}),{features:Wd});function pb(e){const t=C(Or.slice());return tt([e],([n],[r])=>{r===!0&&n===!1?ci(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Or.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function hb({ownerDocument:e},t){const n=pb(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Er(n())},{flush:"post"})}),bt(()=>{t.value&&Er(n())})}function mb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{tt([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&ci(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Er(u):it(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function vb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=qd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?zd(a,u)?(r.value=u,Er(u)):(i.preventDefault(),i.stopPropagation(),Er(l)):Er(r.value)},!0)}function zd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function gb(e){let t=Wh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Go(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return ci(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Go();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function yb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function bb(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function Kd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _b(){return/Android/gi.test(window.navigator.userAgent)}function wb(){return Kd()||_b()}function Eb(){return Kd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Go();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ob(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Nb(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const Nr=yb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Go(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:Nb(n)},o=[Eb(),bb(),Ob()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Nr.subscribe(()=>{const e=Nr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Nr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Nr.dispatch("TEARDOWN",n)}});function Sb(e,t,n){const r=gb(Nr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return tt([e,t],([s,i],[a],l)=>{if(!s||!i)return;Nr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(Nr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let xb=0;function kb(){return++xb}function Lt(){return kb()}const el=new Map,Jo=new Map;function Gd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Jo.get(r)??1;if(s===1?Jo.delete(r):Jo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Jo.get(r)??0;Jo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Yo(e,t,n,r){zo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Jd=30;function Yd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Zd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Yo(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Yo(n,"click",i=>{wb()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Yo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Yo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Jd||Math.abs(a.y-s.y)>=Jd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Fd(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Xd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(Qn,{features:Xn.Hidden,ref:r})}}}let Qd=Symbol("Context");var at=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(at||{});function Tb(){return di()!==null}function di(){return Ce(Qd,null)}function ef(e){dt(Qd,e)}const tf=Symbol("ForcePortalRootContext");function Cb(){return Ce(tf,!1)}const nf=de({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(tf,e.force),()=>{const{force:r,...o}=e;return nt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let rf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function Pb(){return Ce(rf,()=>{})}function $b({type:e,enabled:t,element:n,onUpdate:r}){let o=Pb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{tt(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(rf,s)}var rt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(rt||{});let Db=Symbol("DescriptionContext");function Ib({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Db,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function of(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const Ab=de({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=Cb(),s=Ce(af,null),i=C(o===!0||s==null?of(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=zs();return tt(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(Sm,{to:i.value},nt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function sf(){const e=Ce(nl,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,de({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let af=Symbol("PortalGroupContext");const Vb=de({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=Oo({resolveTarget(){return e.target}});return dt(af,r),()=>{const{target:o,...s}=e;return nt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function fi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,fi),n}return t}const pi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",lf=de({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:pi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=di(),c=Q(()=>e.open===pi&&u!==null?(u.value&at.Open)===at.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==pi||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===pi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),D={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(rl,null)!==null,[te,S]=sf(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Xd({portals:te,defaultContainers:[Q(()=>D.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value&at.Closing)===at.Closing:!1),V=Q(()=>T||A.value?!1:O.value),$=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Gd($,V);const ie=Q(()=>H.value?!0:O.value),De=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Gd(De,ie),$b({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Ye(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const E=Ib({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,D);const P=Q(()=>!(!O.value||H.value));Yd(U,(oe,Fe)=>{oe.preventDefault(),D.close(),ko(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ja((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===rt.Escape&&(oe.preventDefault(),oe.stopPropagation(),D.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return Sb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const er=xt.target.getBoundingClientRect();er.x===0&&er.y===0&&er.width===0&&er.height===0&&D.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},er={open:b.value===0};return Ue(nf,{force:!0},()=>[Ue(Ab,()=>Ue(Vb,{target:d.value},()=>Ue(nf,{force:!1},()=>Ue(Ko,{initialFocus:ht,containers:U,features:O.value?Ye(q.value,{parent:Ko.features.RestoreFocus,leaf:Ko.features.All&~Ko.features.FocusLock}):Ko.features.None},()=>Ue(S,{},()=>nt({ourProps:xt,theirProps:{...Be,...n},slot:er,attrs:n,slots:r,visible:b.value===0,features:Jn.RenderStrategy|Jn.Static,name:"Dialog"})))))),Ue(ge)])}}}),uf=de({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return nt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),cf=de({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=fi("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return nt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),hi=de({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=fi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return nt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function df(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function ff(e,t){let n=C(df(e.value.type,e.value.as));return Le(()=>{n.value=df(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const pf=Symbol("PopoverContext");function ol(e){const t=Ce(pf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const Rb=Symbol("PopoverGroupContext");function hf(){return Ce(Rb,null)}const mf=Symbol("PopoverPanelContext");function jb(){return Ce(mf,null)}let sl=de({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,$;if(!G(i)||!G(u))return!1;for(const ie of document.querySelectorAll("body > *"))if(Number(ie==null?void 0:ie.contains(G(i)))^Number(ie==null?void 0:ie.contains(G(u))))return!0;const S=ui(),U=S.indexOf(G(i)),j=(U+S.length-1)%S.length,ge=(U+1)%S.length,q=S[j],A=S[ge];return!((V=G(u))!=null&&V.contains(q))&&!(($=G(u))!=null&&$.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Ye(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(S){f.closePopover();const U=S?S instanceof HTMLElement?S:S.value instanceof HTMLElement?G(S):G(f.button):G(f.button);U==null||U.focus()}};dt(pf,f),ef(Q(()=>Ye(s.value,{0:at.Open,1:at.Closed})));const v={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=hf(),O=b==null?void 0:b.registerPopover,[w,D]=sf(),H=Xd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var S,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((S=c.value)==null?void 0:S.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(v)),Ja((te=c.value)==null?void 0:te.defaultView,"focus",S=>{var U,j;S.target!==window&&S.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(S.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(S.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(S.target)||f.closePopover()))},!0),Yd(H.resolveContainers,(S,U)=>{var j;f.closePopover(),Zd(U,Qa.Loose)||(S.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const S={open:s.value===0,close:f.close};return Ue(xe,[Ue(D,{},()=>nt({theirProps:{...e,...n},ourProps:{ref:o},slot:S,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const vf=de({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=hf(),a=i==null?void 0:i.closeOthers,l=jb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=ff(Q(()=>({as:e.as,type:t.type})),c);function v(T){var te,S,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),(S=(te=T.target).click)==null||S.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case rt.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===rt.Space&&T.preventDefault()}function O(T){var te,S;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(S=G(o.button))==null||S.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const D=Ya();function H(){const T=G(o.panel);if(!T)return;function te(){Ye(D.value,{[$t.Forwards]:()=>it(T,We.First),[$t.Backwards]:()=>it(T,We.Last)})===xn.Error&&it(ui().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Ye(D.value,{[$t.Forwards]:We.Next,[$t.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:S,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:v,onClick:O}:{ref:c,id:S,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:v,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[nt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(Qn,{id:d,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),gf=de({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(mf,s.panelId),ft(()=>{var D,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=(D=i.value)==null?void 0:D.activeElement;(H=G(s.panel))!=null&&H.contains(w)||it(G(s.panel),We.First)});const u=di(),c=Q(()=>u!==null?(u.value&at.Open)===at.Open:s.popoverState.value===0);function d(w){var D,H;switch(w.key){case rt.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!((D=G(s.panel))!=null&&D.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,S,U;const D=w.relatedTarget;D&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains(D)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,D)||(U=(S=G(s.afterPanelSentinel))==null?void 0:S.contains)!=null&&U.call(S,D))&&D.focus({preventScroll:!0})))}const v=Ya();function b(){const w=G(s.panel);if(!w)return;function D(){Ye(v.value,{[$t.Forwards]:()=>{var T;it(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[$t.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}D()}function O(){const w=G(s.panel);if(!w)return;function D(){Ye(v.value,{[$t.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ui(),S=te.indexOf(H),U=te.slice(0,S+1),ge=[...te.slice(S+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}it(ge,We.First,{sorted:!1})},[$t.Backwards]:()=>{var T;it(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}D()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:D,focus:H,...T}=e,te={ref:s.panel,id:D,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return nt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...S)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(Qn,{id:a,ref:s.beforePanelSentinel,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...S),c.value&&s.isPortalled.value&&Ue(Qn,{id:l,ref:s.afterPanelSentinel,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Jn.RenderStrategy|Jn.Static,visible:c.value,name:"PopoverPanel"})}}});let Lb=de({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(Qn,{as:"button",type:"button",features:Xn.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const yf=Symbol("TabsContext");function Xo(e){const t=Ce(yf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xo),n}return t}const il=Symbol("TabsSSRContext"),Mb=de({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Kr(c.tabs.value,G),w=Kr(c.panels.value,G),D=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Ye(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Ye(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Ye(H,{0:()=>O.indexOf(D[0]),1:()=>O.indexOf(D[D.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>D.includes(U));if(!te)return;let S=O.indexOf(te)??c.selectedIndex.value;S===-1&&(S=c.selectedIndex.value),o.value=S,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Kr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Kr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(yf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const v=Q(()=>e.selectedIndex);return Le(()=>{tt([v],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Kr(c.tabs.value,G);b.some((w,D)=>G(c.tabs.value[D])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Lb,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),nt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Ub=de({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Xo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return nt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=de({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const D=w();if(D===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(S=>G(S)===T);te!==-1&&o.setSelectedIndex(te)}return D}function d(w){const D=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===rt.Space||w.key===rt.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case rt.Home:case rt.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>it(D,We.First));case rt.End:case rt.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>it(D,We.Last))}if(c(()=>Ye(o.orientation.value,{vertical(){return w.key===rt.ArrowUp?it(D,We.Previous|We.WrapAround):w.key===rt.ArrowDown?it(D,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===rt.ArrowLeft?it(D,We.Previous|We.WrapAround):w.key===rt.ArrowRight?it(D,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function v(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),ci(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=ff(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:D,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:v,id:D,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return nt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),Fb=de({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Xo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return nt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=de({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...v}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(Qn,{as:"span","aria-hidden":!0,...b}):nt({ourProps:b,theirProps:v,slot:c,attrs:t,slots:n,features:Jn.Static|Jn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function Bb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function mi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Hb(e,t){const n=Go();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function bf(e,t,n,r,o,s){const i=Go(),a=s!==void 0?Bb(s):()=>{};return mi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{mi(e,...n),ul(e,...r),i.add(Hb(e,l=>(mi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>mi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function Sr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Zb(){return Ce(dl,null)!==null}function qb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Wb(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function vi(e){return"children"in e?vi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function _f(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Yn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Ye(i,{[Yn.Unmount](){t.value.splice(a,1)},[Yn.Hidden](){t.value[a].state="hidden"}}),!vi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Yn.Unmount)}return{children:t,register:o,unregister:r}}const wf=Jn.RenderStrategy,Qo=de({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function u(){s.value&=~at.Closing,t("afterLeave")}if(!Zb()&&Tb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Yn.Unmount:Yn.Hidden);o({el:c,$el:c});const{show:f,appear:v}=qb(),{register:b,unregister:O}=Wb(),w=C(f.value?"visible":"hidden"),D={value:!0},H=Lt(),T={value:!1},te=_f(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ie=b(H);bt(ie)}),ft(()=>{if(d.value===Yn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Ye(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const S=Sr(e.enter),U=Sr(e.enterFrom),j=Sr(e.enterTo),ge=Sr(e.entered),q=Sr(e.leave),A=Sr(e.leaveFrom),V=Sr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ie=G(c);if(ie instanceof Comment&&ie.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function $(ie){const De=D.value&&!v.value,E=G(c);!E||!(E instanceof HTMLElement)||De||(T.value=!0,f.value&&i(),f.value||l(),ie(f.value?bf(E,S,U,j,ge,P=>{T.value=!1,P===cl.Finished&&a()}):bf(E,q,A,V,ge,P=>{T.value=!1,P===cl.Finished&&(vi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{tt([f],(ie,De,E)=>{$(E),D.value=!1},{immediate:!0})}),dt(fl,te),ef(Q(()=>Ye(w.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:ie,show:De,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...v.value&&f.value&&zo.isServer?{class:bs([n.class,ht.class,...S,...U])}:{}};return nt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:wf,visible:w.value==="visible",name:"TransitionChild"})}}}),zb=Qo,pl=de({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=di(),s=Q(()=>e.show===null&&o!==null?(o.value&at.Open)===at.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=_f(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":vi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return nt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue(zb,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:wf,visible:i.value==="visible",name:"Transition"})}}}),Kb={class:"moonbase:modal-container"},gi=de({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(lf),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Kb,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(cf),{class:"moonbase:modal-content"},{default:_e(()=>[fa(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Gb=["data-visible"],Jb=de({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(Wo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);un(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof Vr?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Ne(Kn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=v=>i.value=v),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=v=>a.value=v),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Gb),(f=_(s))!=null&&f.auth.enable.signUp?(y(),x("button",{key:0,type:"button",onClick:d[2]||(d[2]=v=>_(r).show(_(Se).Authentication,_(ue).SignUp,{email:i.value}))}," Create account ")):fe("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=v=>_(r).show(_(Se).Authentication,_(ue).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Yb={class:"moonbase:authentication"},Xb={key:0,class:"moonbase:loader"},Qb=de({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Re(),{loaded:o,user:s}=St();tt(s,a=>{a&&r.intent===ue.SignIn&&(n("authenticated",a),r.dequeue())});const i=Q(()=>{switch(r.intent){case ue.SignIn:return"Sign in";case ue.SignUp:return"Sign up";case ue.ConfirmAccount:return"Confirm account";case ue.ConfirmEmailChange:return"Confirm email change";case ue.ForgotPassword:return"Forgot password";case ue.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(y(),Ne(gi,{open:a.open,onClose:l[3]||(l[3]=u=>_(r).reset())},{default:_e(()=>[N("div",Yb,[Z(_(hi),{as:"h3"},{default:_e(()=>[ke(K(i.value),1)]),_:1}),_(o)?_(r).intent===_(ue).SignIn?(y(),Ne(Jb,{key:1})):_(r).intent===_(ue).SignUp?(y(),Ne(Gy,{key:2,onSignedUp:l[0]||(l[0]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmAccount?(y(),Ne(Qy,{key:3,onConfirmedAccount:l[1]||(l[1]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmEmailChange?(y(),Ne(ab,{key:4})):_(r).intent===_(ue).ForgotPassword?(y(),Ne(tb,{key:5})):_(r).intent===_(ue).ResetPassword?(y(),Ne(rb,{key:6,onPasswordReset:l[2]||(l[2]=u=>_(r).dequeue())})):fe("",!0):(y(),x("div",Xb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const e_={class:"moonbase:product-cart-item"},t_=["src"],n_={key:1,class:"moonbase:image-placeholder"},r_={class:"moonbase:product-cart-item-content"},o_={key:0,class:"moonbase:cart-item-discount"},s_={class:"font-semibold"},i_={key:0,class:"ml-0.5"},a_={key:2,class:"moonbase:product-cart-item-total"},l_={key:0,class:"moonbase:discount"},u_={key:1},c_=de({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),x("div",e_,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),x("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,t_)):(y(),x("div",n_)),N("div",r_,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),x("p",o_,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",s_,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),x("span",i_," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):fe("",!0)])):fe("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),x("div",a_,[t.lineItem.variation.hasDiscount?(y(),x("span",l_,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):fe("",!0),t.lineItem.quantity!==1?(y(),x("span",u_,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):fe("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):fe("",!0)])}}}),d_={class:"moonbase:bundle-cart-item"},f_=["src"],p_={key:1,class:"moonbase:image-placeholder"},h_={class:"moonbase:bundle-cart-item-content"},m_={key:0,class:"moonbase:cart-item-discount"},v_={class:"font-semibold"},g_={key:0,class:"ml-0.5"},y_={class:"moonbase:bundle-cart-item-summary"},b_=["data-open"],__={key:2,class:"moonbase:product-cart-item-total"},w_={key:0,class:"moonbase:discount"},E_={key:1},O_=["src"],N_={key:1,class:"moonbase:image-placeholder"},S_=["data-included"],x_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},k_={key:0,class:"truncate italic"},T_={key:1,class:"truncate"},C_=de({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return tt(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),x("div",null,[N("div",d_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),x("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,f_)):(y(),x("div",p_)),N("div",h_,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),x("p",m_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",v_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),x("span",g_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):fe("",!0)])):fe("",!0),N("div",y_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),x("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),x(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):fe("",!0),o[2]||(o[2]=ke(" products "))]),(y(),x("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,b_))])):fe("",!0)])]),r.lineItem.variation?(y(),x("div",__,[r.lineItem.variation.hasDiscount?(y(),x("span",w_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):fe("",!0),r.lineItem.quantity!==1?(y(),x("span",E_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):fe("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):fe("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),x(xe,null,on(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),x("div",{key:f.id},[f!=null&&f.iconUrl?(y(),x("img",{key:0,src:f.iconUrl,alt:""},null,8,O_)):(y(),x("div",N_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),x("svg",x_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,S_),f.included?f!=null&&f.tagline?(y(),x("p",T_,K(f.tagline),1)):fe("",!0):(y(),x("p",k_," You already own this "))])]))),128))],512)])}}}),P_={class:"moonbase:cart-modal-container"},$_=de({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(lf),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",P_,[Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(Qo),{as:"template"},{default:_e(()=>[Z(_(cf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[fa(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),D_=["disabled","data-success","data-error","data-working","data-variant"],I_=["data-visible"],Ef=de({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await un(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(a,l)=>(y(),x("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Ne(jt,{key:0})):fe("",!0)],8,I_),ke(" "+K(s.value),1)],8,D_))}}),A_={class:"moonbase:cart"},V_={key:0,role:"list",class:"moonbase:cart-items"},R_={key:1,class:"moonbase:cart-empty"},j_={key:2,class:"moonbase:cart-total"},L_=de({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ba(),i=Ce(Wo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Ne($_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",A_,[Z(_(hi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),x("ul",V_,[(y(!0),x(xe,null,on(_(n),c=>(y(),x("li",{key:c.id},[c.type==="Product"?(y(),Ne(c_,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Ne(C_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))])):(y(),x("div",R_," Your cart is empty! ")),_(n).length>0?(y(),x("div",j_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):fe("",!0),_(n).length>0?(y(),Ne(Ef,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):fe("",!0)])]),_:1},8,["open"]))}}),M_={class:"moonbase:account"},U_={key:0,class:"moonbase:error"},F_={key:1,class:"moonbase:notification"},B_={key:0,class:"moonbase:error"},H_=de({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),v=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(S){throw u.value=S,S}}async function w(){v.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(S){throw v.value=S,S}}async function D(){b.value=!0,await s(),t.reset()}return(S,U)=>(y(),x("div",M_,[Z(Kn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Ud,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Gn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),x("p",U_,K(u.value.message),1)):c.value?(y(),x("p",F_," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),Z(Kn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{label:"Save",error:"Error",success:"Saved"}),v.value?(y(),x("p",B_,K(v.value.message),1)):fe("",!0)]),_:1}),Z(Ef,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:D})]))}}),Z_={},q_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function W_(e,t){return y(),x("svg",q_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Of=zr(Z_,[["render",W_]]),z_={},K_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function G_(e,t){return y(),x("svg",K_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Nf=zr(z_,[["render",G_]]),J_={},Y_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function X_(e,t){return y(),x("svg",Y_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Sf=zr(J_,[["render",X_]]),Q_={},e1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function t1(e,t){return y(),x("svg",e1,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const xf=zr(Q_,[["render",t1]]),n1={class:"moonbase:product-downloads"},r1=["data-last","onClick"],o1={class:"moonbase:sr-only"},s1={class:"moonbase:sr-only"},i1=["onClick"],a1=de({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Yt.Universal]:()=>Of,[Yt.Windows]:()=>Nf,[Yt.Linux]:()=>Sf,[Yt.Mac]:()=>xf},{downloadProduct:r}=ei(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),x("span",n1,[(y(!0),x(xe,null,on(o.value,(a,l,u)=>(y(),x(xe,{key:l},[a.length===1?(y(),x("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",o1,K(l.toString()),1),(y(),Ne(da(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,r1)):(y(),Ne(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[N("span",s1,K(l.toString()),1),(y(),Ne(da(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(Va,{name:"moonbase:scale"},{default:_e(()=>[Z(_(gf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),x(xe,null,on(a,c=>(y(),x("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},K(c.name),9,i1))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),l1={class:"moonbase:product-activations"},u1={key:0,scope:"col"},c1={key:0},d1={colspan:"3"},f1={key:1},p1={key:0},h1=["onClick"],m1=de({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ei(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===$i.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),x("table",l1,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),x("th",u1,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):fe("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),x("tr",f1,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):fe("",!0):(y(),x("tr",c1,[N("td",d1,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(i.value,d=>{var f;return y(),x("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),x("td",p1,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:v=>l(d)},[d.revoking?(y(),Ne(jt,{key:0})):fe("",!0),c[7]||(c[7]=ke(" Revoke "))],8,h1)])):fe("",!0)])}),128))])]))}}),v1={class:"moonbase:products"},g1={key:0,scope:"col"},y1={key:0},b1={key:1},_1=["src"],w1={key:1,class:"moonbase:image-placeholder"},E1={key:0},O1={key:0},N1=de({__name:"Products",setup(e){const{getProducts:t}=ei(),n=C(null);Le(async()=>{let o=await t();for(n.value=o.items;o.hasMore&&o.next;)o=await t(o.next),n.value.push(...o.items)});const r=Q(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(y(),x("table",v1,[N("thead",null,[N("tr",null,[s[0]||(s[0]=N("th",{scope:"col"}," Product ",-1)),s[1]||(s[1]=N("th",{scope:"col"}," Activations ",-1)),r.value?(y(),x("th",g1," Downloads ")):fe("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),x("tr",b1,s[4]||(s[4]=[N("td",{colspan:"3"}," No products found ",-1)]))):fe("",!0):(y(),x("tr",y1,[N("td",null,[Z(jt),s[2]||(s[2]=ke(" Loading products.. "))]),s[3]||(s[3]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(n.value||[],i=>(y(),x("tr",{key:i.id},[N("td",null,[N("div",null,[i.iconUrl?(y(),x("img",{key:0,src:i.iconUrl,alt:""},null,8,_1)):(y(),x("div",w1)),N("span",null,K(i.name),1)])]),Z(_(sl),{as:"td"},{default:_e(()=>[Z(_(vf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[s[5]||(s[5]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),Z(Va,{name:"moonbase:scale"},{default:_e(()=>[Z(_(gf),null,{default:_e(()=>[Z(m1,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(y(),x("td",E1,[i.currentVersion!=null?(y(),x("div",O1,[i.downloads?(y(),Ne(a1,{key:0,downloads:i.downloads},null,8,["downloads"])):fe("",!0)])):fe("",!0)])):fe("",!0)]))),128))])]))}}),S1={class:"moonbase:redeem"},x1=["data-visible"],k1={key:1,class:"moonbase:redeem-voucher"},T1={key:0},C1={key:1},P1={class:"moonbase:redeem-voucher-products"},$1=["src"],D1={key:1,class:"moonbase:image-placeholder"},I1={key:0},A1={class:"moonbase:redeem-voucher-bundle"},V1=["src"],R1={key:1,class:"moonbase:image-placeholder"},j1={key:0},L1={class:"moonbase:redeem-voucher-bundle-products"},M1={class:"shrink-0"},U1=["src"],F1={key:1,class:"moonbase:image-placeholder"},B1=de({__name:"Redeem",setup(e){const{redeem:t}=Kg(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),x("div",S1,[Z(Va,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),x("div",k1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),x("h4",T1,K(r.value.description),1)):fe("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),x("div",C1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",P1,[(y(!0),x(xe,null,on(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),x("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,$1)):(y(),x("div",D1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",I1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),x(xe,null,on(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),x("div",{key:u.id},[N("div",A1,[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,V1)):(y(),x("div",R1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",j1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",L1,[(y(!0),x(xe,null,on(u.products,d=>(y(),x("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",M1,[d.iconUrl?(y(),x("img",{key:0,src:d.iconUrl,alt:""},null,8,U1)):(y(),x("div",F1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):fe("",!0)])):(y(),Ne(Kn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Gn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,x1)]}),_:1}))]),_:1})]))}}),H1={class:"moonbase:customer"},Z1=de({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ue.ViewAccount:return 0;case ue.ViewProducts:return 1;case ue.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));tt(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Ne(gi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",H1,[Z(_(Mb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Ub),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(Fb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(H_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(N1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(B1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),q1={class:"moonbase:auto-activate"},W1={key:0,class:"moonbase:loader"},z1={key:1,class:"moonbase:loader"},K1={key:2,class:"moonbase:loader"},G1={key:3},J1={key:0,class:"moonbase:auto-activate-product"},Y1=["src"],X1={key:1,class:"moonbase:image-placeholder"},Q1={key:1,class:"moonbase:loader"},ew={key:2,class:"moonbase:loader"},tw={key:3,class:"moonbase:loader"},nw={key:4,class:"moonbase:auto-activate-content"},rw={key:0},ow={key:1},sw={class:"moonbase:auto-activate-cta"},iw=["href"],aw={key:2,class:"moonbase:auto-activate-trial"},lw={class:"moonbase:auto-activate-cta"},uw=de({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=zg(o);tt(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Xt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function v(){f(),t.show(Se.Customer,ue.ViewProducts)}function b(){t.enqueue(Se.Activation,ue.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}return(O,w)=>{var D,H,T,te;return y(),x("div",q1,[_(i)||!_(r)?(y(),x("div",W1,[Z(jt)])):_(u)?(y(),x("div",z1,K(_(u)),1)):_(s)?(y(),x("div",G1,[_(s).product?(y(),x("div",J1,[_(s).product.iconUrl?(y(),x("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,Y1)):(y(),x("div",X1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):fe("",!0),((D=_(s))==null?void 0:D.status)===_(Xt).Cancelled?(y(),x("div",Q1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),x("div",ew,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Xt).Completed?(y(),x("div",tw,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),x("div",nw,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),x("div",ow,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",sw,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=S=>v())}," Licenses "),_(s).product&&_(s).product.website?(y(),x("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,iw)):fe("",!0)])])):fe("",!0):(y(),x("div",rw,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),x("div",aw,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),x(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):fe("",!0),w[6]||(w[6]=ke(". ")),N("span",lw,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=S=>_(d)())}," Start trial ")])])):fe("",!0)]))])):(y(),x("div",K1," Could not find activation request "))])}}}),cw={class:"moonbase:activation"},dw=de({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",cw,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ue).ActivateProduct?(y(),Ne(uw,{key:0})):fe("",!0)])]),_:1},8,["open"]))}});function fw(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const pw={class:"moonbase:download-product"},hw={key:0,class:"moonbase:loader"},mw={key:1,class:"moonbase:loader"},vw={key:2,class:"moonbase:loader"},gw={key:3},yw={class:"moonbase:download-product-product"},bw=["src"],_w={key:1,class:"moonbase:image-placeholder"},ww={key:0},Ew={key:0,class:"moonbase:download-product-content"},Ow={key:1,class:"moonbase:download-product-content"},Nw={key:2,class:"moonbase:download-product-content"},Sw={key:0,role:"list"},xw={class:"moonbase:download-product-download-name"},kw=["onClick"],Tw={class:"moonbase:download-product-download-description"},Cw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Pw={key:1,class:"moonbase:loader"},$w=de({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ei(),i={[Yt.Universal]:()=>Of,[Yt.Windows]:()=>Nf,[Yt.Linux]:()=>Sf,[Yt.Mac]:()=>xf},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter(D=>!d.value||D.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch(D){u.value=D.message}c.value=!1});function v(){t.enqueue(Se.Download,ue.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var D,H;return y(),x("div",pw,[c.value||!_(r)?(y(),x("div",hw,[Z(jt)])):u.value?(y(),x("div",mw,K(u.value),1)):a.value?(y(),x("div",gw,[N("div",yw,[a.value.iconUrl?(y(),x("img",{key:0,src:a.value.iconUrl,alt:""},null,8,bw)):(y(),x("div",_w)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),x("span",ww," (pre-release)")):fe("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),x("div",Ew,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:v}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((D=_(n).ownedProducts)!=null&&D.includes(a.value.id))?(y(),x("div",Ow," This product requires ownership to download ")):(y(),x("div",Nw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),x("ul",Sw,[(y(!0),x(xe,null,on(f.value,T=>(y(),x("li",{key:T.key},[N("div",null,[N("p",xw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,kw)]),N("p",Tw,[(y(),Ne(da(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(fw)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Ne(jt,{key:0})):(y(),x("svg",Cw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),x("div",Pw," No downloadable files found "))]))])):(y(),x("div",vw," Could not find product "))])}}}),Dw={class:"moonbase:download"},Iw=de({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(gi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",Dw,[Z(_(hi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ue).DownloadProduct?(y(),Ne($w,{key:0})):fe("",!0)])]),_:1},8,["open"]))}}),Aw=de({__name:"App",setup(e){const t=Ce(Wo),n=Re();return(r,o)=>{var s;return y(),x(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Ne(Cy,{key:0})):fe("",!0),Z(L_,{open:_(n).active===_(Se).Cart},null,8,["open"]),Z(Qb,{open:_(n).active===_(Se).Authentication},null,8,["open"]),Z(dw,{open:_(n).active===_(Se).Activation},null,8,["open"]),Z(Iw,{open:_(n).active===_(Se).Download},null,8,["open"]),Z(Z1,{open:_(n).active===_(Se).Customer},null,8,["open"])],64)}}});function yi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(yi(e)&&yi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];yi(o)&&yi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class Vw{constructor(){xr(this,"initialized",!1);xr(this,"pinia");xr(this,"storefront");xr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(Sy,n),this.storefront=Gg(t),this.pinia=_y(),Eg(Aw).use(this.storefront).use(this.pinia).provide(Wo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ue).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ue.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ue.ViewProducts&&(s.user?o.show(Se.Customer,ue.ViewProducts):o.show(Se.Cart,ue.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Se.Authentication,ue.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Se.Authentication,ue.ConfirmEmailChange,t):(n.show(Se.Authentication,ue.SignIn),n.enqueue(Se.Authentication,ue.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Se.Customer,ue.ViewAccount):(t.show(Se.Authentication,ue.SignIn),t.enqueue(Se.Customer,ue.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Download,ue.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Se.Activation,ue.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=yd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=yd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=gd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Se.Cart,ue.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const kf=new Vw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=kf),kt.MoonbaseIntent=ue,kt.default=kf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
24
+ `));const f=Ud(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Md(e){return e.flatMap(t=>t.type===xe?Md(t.children):[t])}function Ud(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Ja(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Xn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Xn||{});let Qn=de({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return nt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(qo.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const ii=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ai(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ii)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ya=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ya||{});function Fd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Ye(t,{0(){return e.matches(ii)},1(){let r=e;for(;r!==null;){if(r.matches(ii))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Or(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function zr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function it(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?zr(e):e:ai(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Nr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Nr[0]===t.target)return;let n=t.target;n=n.closest(ii),Nr.unshift(n??t.target),Nr=Nr.filter(r=>r!=null&&r.isConnected),Nr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function li(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Bd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var Hd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Hd||{});const Wo=Object.assign(de({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ga();function u(m){const b=G(o);if(!b)return;(w=>w())(()=>{Ye(l.value,{[Dt.Forwards]:()=>{it(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{it(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=C(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Bd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Zd(b,O)||(c.value?it(G(o),Ye(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Or(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:$,...H}=e;return Ue(xe,[!!(O&4)&&Ue(Qn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Xn.Focusable}),nt({ourProps:b,theirProps:{...t,...H},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(Qn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:Xn.Focusable})])}}}),{features:Hd});function Xy(e){const t=C(Nr.slice());return tt([e],([n],[r])=>{r===!0&&n===!1?li(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Nr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Or(n())},{flush:"post"})}),bt(()=>{t.value&&Or(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{tt([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&li(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Or(u):it(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ka((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Bd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Zd(a,u)?(r.value=u,Or(u)):(i.preventDefault(),i.stopPropagation(),Or(l)):Or(r.value)},!0)}function Zd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Uh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function zo(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return li(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=zo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function qd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return qd()||sb()}function ab(){return qd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=zo();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const Sr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:zo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Sr.subscribe(()=>{const e=Sr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Sr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Sr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(Sr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return tt([e,t],([s,i],[a],l)=>{if(!s||!i)return;Sr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(Sr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const Xa=new Map,Ko=new Map;function Wd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Ko.get(r)??1;if(s===1?Ko.delete(r):Ko.set(r,s-1),s!==1)return;const i=Xa.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,Xa.delete(r))});const o=Ko.get(r)??0;Ko.set(r,o+1),o===0&&(Xa.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Go(e,t,n,r){qo.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const zd=30;function Kd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Fd(l,Ya.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Go(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Go(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Go(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Go(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Go(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=zd||Math.abs(a.y-s.y)>=zd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ld(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Gd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(Qn,{features:Xn.Hidden,ref:r})}}}let Jd=Symbol("Context");var at=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(at||{});function pb(){return ui()!==null}function ui(){return Ce(Jd,null)}function Yd(e){dt(Jd,e)}const Xd=Symbol("ForcePortalRootContext");function hb(){return Ce(Xd,!1)}const Qd=de({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(Xd,e.force),()=>{const{force:r,...o}=e;return nt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let ef=Symbol("StackContext");var Qa=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Qa||{});function mb(){return Ce(ef,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{tt(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(ef,s)}var rt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(rt||{});let gb=Symbol("DescriptionContext");function yb({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function tf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=de({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=hb(),s=Ce(rf,null),i=C(o===!0||s==null?tf(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(el,null);let u=!1;const c=qs();return tt(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},nt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let el=Symbol("PortalParentContext");function nf(){const e=Ce(el,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,de({name:"PortalWrapper",setup(s,{slots:i}){return dt(el,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let rf=Symbol("PortalGroupContext");const _b=de({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=Eo({resolveTarget(){return e.target}});return dt(rf,r),()=>{const{target:o,...s}=e;return nt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),tl=Symbol("DialogContext");function ci(e){const t=Ce(tl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ci),n}return t}const di="DC8F892D-2EBD-447C-A4C8-A03058436FF4",of=de({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:di},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=ui(),c=Q(()=>e.open===di&&u!==null?(u.value&at.Open)===at.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==di||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===di?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),$={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(tl,null)!==null,[te,S]=nf(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Gd({portals:te,defaultContainers:[Q(()=>$.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value&at.Closing)===at.Closing:!1),V=Q(()=>T||A.value?!1:O.value),D=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Wd(D,V);const ie=Q(()=>H.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Wd($e,ie),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Ye(oe,{[Qa.Add]:()=>l.value+=1,[Qa.Remove]:()=>l.value-=1})}});const E=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(tl,$);const P=Q(()=>!(!O.value||H.value));Kd(U,(oe,Fe)=>{oe.preventDefault(),$.close(),xo(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ka((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===rt.Escape&&(oe.preventDefault(),oe.stopPropagation(),$.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return cb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const er=xt.target.getBoundingClientRect();er.x===0&&er.y===0&&er.width===0&&er.height===0&&$.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},er={open:b.value===0};return Ue(Qd,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(Qd,{force:!1},()=>Ue(Wo,{initialFocus:ht,containers:U,features:O.value?Ye(q.value,{parent:Wo.features.RestoreFocus,leaf:Wo.features.All&~Wo.features.FocusLock}):Wo.features.None},()=>Ue(S,{},()=>nt({ourProps:xt,theirProps:{...Be,...n},slot:er,attrs:n,slots:r,visible:b.value===0,features:Jn.RenderStrategy|Jn.Static,name:"Dialog"})))))),Ue(ge)])}}}),sf=de({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=ci("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return nt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),af=de({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=ci("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return nt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),fi=de({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=ci("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return nt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function lf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function uf(e,t){let n=C(lf(e.value.type,e.value.as));return Le(()=>{n.value=lf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const cf=Symbol("PopoverContext");function nl(e){const t=Ce(cf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${rl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,nl),n}return t}const wb=Symbol("PopoverGroupContext");function df(){return Ce(wb,null)}const ff=Symbol("PopoverPanelContext");function Eb(){return Ce(ff,null)}let rl=de({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,D;if(!G(i)||!G(u))return!1;for(const ie of document.querySelectorAll("body > *"))if(Number(ie==null?void 0:ie.contains(G(i)))^Number(ie==null?void 0:ie.contains(G(u))))return!0;const S=ai(),U=S.indexOf(G(i)),j=(U+S.length-1)%S.length,ge=(U+1)%S.length,q=S[j],A=S[ge];return!((V=G(u))!=null&&V.contains(q))&&!((D=G(u))!=null&&D.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Ye(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(S){f.closePopover();const U=S?S instanceof HTMLElement?S:S.value instanceof HTMLElement?G(S):G(f.button):G(f.button);U==null||U.focus()}};dt(cf,f),Yd(Q(()=>Ye(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=df(),O=b==null?void 0:b.registerPopover,[w,$]=nf(),H=Gd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var S,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((S=c.value)==null?void 0:S.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ka((te=c.value)==null?void 0:te.defaultView,"focus",S=>{var U,j;S.target!==window&&S.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(S.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(S.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(S.target)||f.closePopover()))},!0),Kd(H.resolveContainers,(S,U)=>{var j;f.closePopover(),Fd(U,Ya.Loose)||(S.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const S={open:s.value===0,close:f.close};return Ue(xe,[Ue($,{},()=>nt({theirProps:{...e,...n},ourProps:{ref:o},slot:S,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const pf=de({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=nl("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=df(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=uf(Q(()=>({as:e.as,type:t.type})),c);function m(T){var te,S,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),(S=(te=T.target).click)==null||S.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case rt.Space:case rt.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case rt.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===rt.Space&&T.preventDefault()}function O(T){var te,S;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(S=G(o.button))==null||S.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const $=Ga();function H(){const T=G(o.panel);if(!T)return;function te(){Ye($.value,{[Dt.Forwards]:()=>it(T,We.First),[Dt.Backwards]:()=>it(T,We.Last)})===xn.Error&&it(ai().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Ye($.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:S,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:S,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[nt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(Qn,{id:d,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),hf=de({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=nl("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(ff,s.panelId),ft(()=>{var $,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=($=i.value)==null?void 0:$.activeElement;(H=G(s.panel))!=null&&H.contains(w)||it(G(s.panel),We.First)});const u=ui(),c=Q(()=>u!==null?(u.value&at.Open)===at.Open:s.popoverState.value===0);function d(w){var $,H;switch(w.key){case rt.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!(($=G(s.panel))!=null&&$.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,S,U;const $=w.relatedTarget;$&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains($)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,$)||(U=(S=G(s.afterPanelSentinel))==null?void 0:S.contains)!=null&&U.call(S,$))&&$.focus({preventScroll:!0})))}const m=Ga();function b(){const w=G(s.panel);if(!w)return;function $(){Ye(m.value,{[Dt.Forwards]:()=>{var T;it(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}$()}function O(){const w=G(s.panel);if(!w)return;function $(){Ye(m.value,{[Dt.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ai(),S=te.indexOf(H),U=te.slice(0,S+1),ge=[...te.slice(S+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}it(ge,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;it(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}$()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:$,focus:H,...T}=e,te={ref:s.panel,id:$,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return nt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...S)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(Qn,{id:a,ref:s.beforePanelSentinel,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...S),c.value&&s.isPortalled.value&&Ue(Qn,{id:l,ref:s.afterPanelSentinel,features:Xn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Jn.RenderStrategy|Jn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=de({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(Qn,{as:"button",type:"button",features:Xn.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const mf=Symbol("TabsContext");function Jo(e){const t=Ce(mf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jo),n}return t}const ol=Symbol("TabsSSRContext"),Nb=de({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=zr(c.tabs.value,G),w=zr(c.panels.value,G),$=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Ye(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Ye(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Ye(H,{0:()=>O.indexOf($[0]),1:()=>O.indexOf($[$.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>$.includes(U));if(!te)return;let S=O.indexOf(te)??c.selectedIndex.value;S===-1&&(S=c.selectedIndex.value),o.value=S,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=zr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=zr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(mf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(ol,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{tt([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=zr(c.tabs.value,G);b.some((w,$)=>G(c.tabs.value[$])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),nt({theirProps:{...n,...Ja(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=de({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Jo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return nt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),sl=de({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Jo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(ol),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const $=w();if($===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(S=>G(S)===T);te!==-1&&o.setSelectedIndex(te)}return $}function d(w){const $=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===rt.Space||w.key===rt.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case rt.Home:case rt.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.First));case rt.End:case rt.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>it($,We.Last))}if(c(()=>Ye(o.orientation.value,{vertical(){return w.key===rt.ArrowUp?it($,We.Previous|We.WrapAround):w.key===rt.ArrowDown?it($,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===rt.ArrowLeft?it($,We.Previous|We.WrapAround):w.key===rt.ArrowRight?it($,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function m(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),li(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=uf(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:$,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:$,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return nt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),xb=de({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Jo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return nt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),il=de({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Jo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(ol),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(Qn,{as:"span","aria-hidden":!0,...b}):nt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Jn.Static|Jn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function al(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function pi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var ll=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(ll||{});function Tb(e,t){const n=zo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function vf(e,t,n,r,o,s){const i=zo(),a=s!==void 0?kb(s):()=>{};return pi(e,...o),al(e,...t,...n),i.nextFrame(()=>{pi(e,...n),al(e,...r),i.add(Tb(e,l=>(pi(e,...r,...t),al(e,...o),a(l))))}),i.add(()=>pi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function xr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const ul=Symbol("TransitionContext");function Cb(){return Ce(ul,null)!==null}function Pb(){const e=Ce(ul,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const cl=Symbol("NestingContext");function Db(){const e=Ce(cl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function hi(e){return"children"in e?hi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function gf(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Yn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Ye(i,{[Yn.Unmount](){t.value.splice(a,1)},[Yn.Hidden](){t.value[a].state="hidden"}}),!hi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Yn.Unmount)}return{children:t,register:o,unregister:r}}const yf=Jn.RenderStrategy,Yo=de({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function u(){s.value&=~at.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(dl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Yn.Unmount:Yn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),w=C(f.value?"visible":"hidden"),$={value:!0},H=Lt(),T={value:!1},te=gf(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ie=b(H);bt(ie)}),ft(()=>{if(d.value===Yn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Ye(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const S=xr(e.enter),U=xr(e.enterFrom),j=xr(e.enterTo),ge=xr(e.entered),q=xr(e.leave),A=xr(e.leaveFrom),V=xr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ie=G(c);if(ie instanceof Comment&&ie.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(ie){const $e=$.value&&!m.value,E=G(c);!E||!(E instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ie(f.value?vf(E,S,U,j,ge,P=>{T.value=!1,P===ll.Finished&&a()}):vf(E,q,A,V,ge,P=>{T.value=!1,P===ll.Finished&&(hi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{tt([f],(ie,$e,E)=>{D(E),$.value=!1},{immediate:!0})}),dt(cl,te),Yd(Q(()=>Ye(w.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:ie,show:$e,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&qo.isServer?{class:gs([n.class,ht.class,...S,...U])}:{}};return nt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:yf,visible:w.value==="visible",name:"TransitionChild"})}}}),$b=Yo,dl=de({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=ui(),s=Q(()=>e.show===null&&o!==null?(o.value&at.Open)===at.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=gf(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":hi(a)||(i.value="hidden")})}),dt(cl,a),dt(ul,u),()=>{const c=Ja(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return nt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:yf,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},mi=de({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(dl),{as:"template",show:t.open},{default:_e(()=>[Z(_(of),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(Yo),{as:"template"},{default:_e(()=>[Z(_(sf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(Yo),{as:"template"},{default:_e(()=>[Z(_(af),{class:"moonbase:modal-content"},{default:_e(()=>[fa(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=de({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(Zo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);un(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof or?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Ne(Kn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Gn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),x("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Se).Authentication,_(ue).SignUp,{email:i.value}))}," Create account ")):fe("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Se).Authentication,_(ue).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=de({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Re(),{loaded:o,user:s}=St();tt(s,a=>{a&&r.intent===ue.SignIn&&(n("authenticated",a),r.dequeue())});const i=Q(()=>{switch(r.intent){case ue.SignIn:return"Sign in";case ue.SignUp:return"Sign up";case ue.ConfirmAccount:return"Confirm account";case ue.ConfirmEmailChange:return"Confirm email change";case ue.ForgotPassword:return"Forgot password";case ue.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(y(),Ne(mi,{open:a.open,onClose:l[3]||(l[3]=u=>_(r).reset())},{default:_e(()=>[N("div",Rb,[Z(_(fi),{as:"h3"},{default:_e(()=>[ke(K(i.value),1)]),_:1}),_(o)?_(r).intent===_(ue).SignIn?(y(),Ne(Vb,{key:1})):_(r).intent===_(ue).SignUp?(y(),Ne(Ay,{key:2,onSignedUp:l[0]||(l[0]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmAccount?(y(),Ne(Ly,{key:3,onConfirmedAccount:l[1]||(l[1]=u=>_(r).dequeue())})):_(r).intent===_(ue).ConfirmEmailChange?(y(),Ne(Wy,{key:4})):_(r).intent===_(ue).ForgotPassword?(y(),Ne(Uy,{key:5})):_(r).intent===_(ue).ResetPassword?(y(),Ne(By,{key:6,onPasswordReset:l[2]||(l[2]=u=>_(r).dequeue())})):fe("",!0):(y(),x("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=de({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),x("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),x("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),x("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),x("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),x("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):fe("",!0)])):fe("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),x("div",Wb,[t.lineItem.variation.hasDiscount?(y(),x("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):fe("",!0),t.lineItem.quantity!==1?(y(),x("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):fe("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):fe("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=de({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return tt(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),x("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),x("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),x("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),x("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),x("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):fe("",!0)])):fe("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),x("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),x(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):fe("",!0),o[2]||(o[2]=ke(" products "))]),(y(),x("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):fe("",!0)])]),r.lineItem.variation?(y(),x("div",s_,[r.lineItem.variation.hasDiscount?(y(),x("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):fe("",!0),r.lineItem.quantity!==1?(y(),x("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):fe("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):fe("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),x(xe,null,on(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),x("div",{key:f.id},[f!=null&&f.iconUrl?(y(),x("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),x("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),x("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),x("p",p_,K(f.tagline),1)):fe("",!0):(y(),x("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=de({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Ne(_(dl),{as:"template",show:t.open},{default:_e(()=>[Z(_(of),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(Yo),{as:"template"},{default:_e(()=>[Z(_(sf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(Yo),{as:"template"},{default:_e(()=>[Z(_(af),{class:"moonbase:cart-modal-content"},{default:_e(()=>[fa(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],bf=de({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await un(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await un(2500),o.value=!1}}return(a,l)=>(y(),x("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Ne(jt,{key:0})):fe("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=de({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ua(),i=Ce(Zo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Ne(v_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",b_,[Z(_(fi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),x("ul",__,[(y(!0),x(xe,null,on(_(n),c=>(y(),x("li",{key:c.id},[c.type==="Product"?(y(),Ne(Gb,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Ne(h_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))])):(y(),x("div",w_," Your cart is empty! ")),_(n).length>0?(y(),x("div",E_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):fe("",!0),_(n).length>0?(y(),Ne(bf,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):fe("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=de({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),m=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(S){throw u.value=S,S}}async function w(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(S){throw m.value=S,S}}async function $(){b.value=!0,await s(),t.reset()}return(S,U)=>(y(),x("div",N_,[Z(Kn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(jd,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Gn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),x("p",S_,K(u.value.message),1)):c.value?(y(),x("p",x_," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),Z(Kn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Gn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),x("p",k_,K(m.value.message),1)):fe("",!0)]),_:1}),Z(bf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:$})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),x("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const _f=Wr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),x("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const wf=Wr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),x("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Ef=Wr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),x("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Of=Wr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=de({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Yt.Universal]:()=>_f,[Yt.Windows]:()=>wf,[Yt.Linux]:()=>Ef,[Yt.Mac]:()=>Of},{downloadProduct:r}=Xs(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),x("span",F_,[(y(!0),x(xe,null,on(o.value,(a,l,u)=>(y(),x(xe,{key:l},[a.length===1?(y(),x("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Ne(da(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Ne(_(rl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(pf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Ne(da(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(Va,{name:"moonbase:scale"},{default:_e(()=>[Z(_(hf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),x(xe,null,on(a,c=>(y(),x("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},K(c.name),9,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=de({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=Xs(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Di.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),x("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),x("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):fe("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),x("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):fe("",!0):(y(),x("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(i.value,d=>{var f;return y(),x("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),x("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Ne(jt,{key:0})):fe("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):fe("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:0},o1={key:1},s1=["src"],i1={key:1,class:"moonbase:image-placeholder"},a1={key:0},l1={key:0},u1=de({__name:"Products",setup(e){const{getProducts:t}=Xs(),n=C(null);Le(async()=>{let o=await t();for(n.value=o.items;o.hasMore&&o.next;)o=await t(o.next),n.value.push(...o.items)});const r=Q(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(y(),x("table",t1,[N("thead",null,[N("tr",null,[s[0]||(s[0]=N("th",{scope:"col"}," Product ",-1)),s[1]||(s[1]=N("th",{scope:"col"}," Activations ",-1)),r.value?(y(),x("th",n1," Downloads ")):fe("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),x("tr",o1,s[4]||(s[4]=[N("td",{colspan:"3"}," No products found ",-1)]))):fe("",!0):(y(),x("tr",r1,[N("td",null,[Z(jt),s[2]||(s[2]=ke(" Loading products.. "))]),s[3]||(s[3]=N("td",null,null,-1))])),(y(!0),x(xe,null,on(n.value||[],i=>(y(),x("tr",{key:i.id},[N("td",null,[N("div",null,[i.iconUrl?(y(),x("img",{key:0,src:i.iconUrl,alt:""},null,8,s1)):(y(),x("div",i1)),N("span",null,K(i.name),1)])]),Z(_(rl),{as:"td"},{default:_e(()=>[Z(_(pf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[s[5]||(s[5]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),Z(Va,{name:"moonbase:scale"},{default:_e(()=>[Z(_(hf),null,{default:_e(()=>[Z(e1,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(y(),x("td",a1,[i.currentVersion!=null?(y(),x("div",l1,[i.downloads?(y(),Ne(W_,{key:0,downloads:i.downloads},null,8,["downloads"])):fe("",!0)])):fe("",!0)])):fe("",!0)]))),128))])]))}}),c1={class:"moonbase:redeem"},d1=["data-visible"],f1={key:1,class:"moonbase:redeem-voucher"},p1={key:0},h1={key:1},m1={class:"moonbase:redeem-voucher-products"},v1=["src"],g1={key:1,class:"moonbase:image-placeholder"},y1={key:0},b1={class:"moonbase:redeem-voucher-bundle"},_1=["src"],w1={key:1,class:"moonbase:image-placeholder"},E1={key:0},O1={class:"moonbase:redeem-voucher-bundle-products"},N1={class:"shrink-0"},S1=["src"],x1={key:1,class:"moonbase:image-placeholder"},k1=de({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),x("div",c1,[Z(Va,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),x("div",f1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),x("h4",p1,K(r.value.description),1)):fe("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),x("div",h1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",m1,[(y(!0),x(xe,null,on(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),x("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,v1)):(y(),x("div",g1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",y1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),x(xe,null,on(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),x("div",{key:u.id},[N("div",b1,[N("div",null,[u.iconUrl?(y(),x("img",{key:0,src:u.iconUrl,alt:""},null,8,_1)):(y(),x("div",w1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),x("span",E1,"x "+K(c),1)):fe("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",O1,[(y(!0),x(xe,null,on(u.products,d=>(y(),x("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",N1,[d.iconUrl?(y(),x("img",{key:0,src:d.iconUrl,alt:""},null,8,S1)):(y(),x("div",x1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):fe("",!0)])):(y(),Ne(Kn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Gn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,d1)]}),_:1}))]),_:1})]))}}),T1={class:"moonbase:customer"},C1=de({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ue.ViewAccount:return 0;case ue.ViewProducts:return 1;case ue.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));tt(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Ne(mi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",T1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(sl),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(sl),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(sl),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(il),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(il),null,{default:_e(()=>[Z(u1)]),_:1}),Z(_(il),null,{default:_e(()=>[Z(k1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),P1={class:"moonbase:auto-activate"},D1={key:0,class:"moonbase:loader"},$1={key:1,class:"moonbase:loader"},I1={key:2,class:"moonbase:loader"},A1={key:3},V1={key:0,class:"moonbase:auto-activate-product"},R1=["src"],j1={key:1,class:"moonbase:image-placeholder"},L1={key:1,class:"moonbase:loader"},M1={key:2,class:"moonbase:loader"},U1={key:3,class:"moonbase:loader"},F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1={class:"moonbase:auto-activate-cta"},q1=["href"],W1={key:2,class:"moonbase:auto-activate-trial"},z1={class:"moonbase:auto-activate-cta"},K1=de({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);tt(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Xt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(Se.Customer,ue.ViewProducts)}function b(){t.enqueue(Se.Activation,ue.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}return(O,w)=>{var $,H,T,te;return y(),x("div",P1,[_(i)||!_(r)?(y(),x("div",D1,[Z(jt)])):_(u)?(y(),x("div",$1,K(_(u)),1)):_(s)?(y(),x("div",A1,[_(s).product?(y(),x("div",V1,[_(s).product.iconUrl?(y(),x("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,R1)):(y(),x("div",j1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):fe("",!0),(($=_(s))==null?void 0:$.status)===_(Xt).Cancelled?(y(),x("div",L1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),x("div",M1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Xt).Completed?(y(),x("div",U1,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),x("div",F1,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),x("div",H1,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",Z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=S=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),x("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,q1)):fe("",!0)])])):fe("",!0):(y(),x("div",B1,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),x("div",W1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),x(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):fe("",!0),w[6]||(w[6]=ke(". ")),N("span",z1,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=S=>_(d)())}," Start trial ")])])):fe("",!0)]))])):(y(),x("div",I1," Could not find activation request "))])}}}),G1={class:"moonbase:activation"},J1=de({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(mi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",G1,[Z(_(fi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ue).ActivateProduct?(y(),Ne(K1,{key:0})):fe("",!0)])]),_:1},8,["open"]))}});function Y1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const X1={class:"moonbase:download-product"},Q1={key:0,class:"moonbase:loader"},ew={key:1,class:"moonbase:loader"},tw={key:2,class:"moonbase:loader"},nw={key:3},rw={class:"moonbase:download-product-product"},ow=["src"],sw={key:1,class:"moonbase:image-placeholder"},iw={key:0},aw={key:0,class:"moonbase:download-product-content"},lw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},cw={key:0,role:"list"},dw={class:"moonbase:download-product-download-name"},fw=["onClick"],pw={class:"moonbase:download-product-download-description"},hw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},mw={key:1,class:"moonbase:loader"},vw=de({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=Xs(),i={[Yt.Universal]:()=>_f,[Yt.Windows]:()=>wf,[Yt.Linux]:()=>Ef,[Yt.Mac]:()=>Of},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter($=>!d.value||$.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch($){u.value=$.message}c.value=!1});function m(){t.enqueue(Se.Download,ue.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,ue.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var $,H;return y(),x("div",X1,[c.value||!_(r)?(y(),x("div",Q1,[Z(jt)])):u.value?(y(),x("div",ew,K(u.value),1)):a.value?(y(),x("div",nw,[N("div",rw,[a.value.iconUrl?(y(),x("img",{key:0,src:a.value.iconUrl,alt:""},null,8,ow)):(y(),x("div",sw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),x("span",iw," (pre-release)")):fe("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),x("div",aw,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!(($=_(n).ownedProducts)!=null&&$.includes(a.value.id))?(y(),x("div",lw," This product requires ownership to download ")):(y(),x("div",uw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),x("ul",cw,[(y(!0),x(xe,null,on(f.value,T=>(y(),x("li",{key:T.key},[N("div",null,[N("p",dw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,fw)]),N("p",pw,[(y(),Ne(da(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(Y1)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Ne(jt,{key:0})):(y(),x("svg",hw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),x("div",mw," No downloadable files found "))]))])):(y(),x("div",tw," Could not find product "))])}}}),gw={class:"moonbase:download"},yw=de({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Ne(mi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",gw,[Z(_(fi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ue).DownloadProduct?(y(),Ne(vw,{key:0})):fe("",!0)])]),_:1},8,["open"]))}}),bw=de({__name:"App",setup(e){const t=Ce(Zo),n=Re();return(r,o)=>{var s;return y(),x(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Ne(hy,{key:0})):fe("",!0),Z(O_,{open:_(n).active===_(Se).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Se).Authentication},null,8,["open"]),Z(J1,{open:_(n).active===_(Se).Activation},null,8,["open"]),Z(yw,{open:_(n).active===_(Se).Download},null,8,["open"]),Z(C1,{open:_(n).active===_(Se).Customer},null,8,["open"])],64)}}});function vi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function fl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(vi(e)&&vi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];vi(o)&&vi(e[r])?e[r]=fl(e[r],o):o!==void 0&&(e[r]=o)}}return fl(e,...t)}class _w{constructor(){kr(this,"initialized",!1);kr(this,"pinia");kr(this,"storefront");kr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=fl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(bw).use(this.storefront).use(this.pinia).provide(Zo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ue).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ue.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ue.ViewProducts&&(s.user?o.show(Se.Customer,ue.ViewProducts):o.show(Se.Cart,ue.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Se.Authentication,ue.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Authentication,ue.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Se.Authentication,ue.ConfirmEmailChange,t):(n.show(Se.Authentication,ue.SignIn),n.enqueue(Se.Authentication,ue.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Se.Customer,ue.ViewAccount):(t.show(Se.Authentication,ue.SignIn),t.enqueue(Se.Customer,ue.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Download,ue.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Se.Activation,ue.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Se.Cart,ue.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ua(this.storefront);if(t!=null&&t.product_id){const l=md(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=md(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=hd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=hd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Se.Cart,ue.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ua(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const Nf=new _w;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Nf),kt.MoonbaseIntent=ue,kt.default=Nf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});