@stonecrop/beam 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/beam.umd.cjs CHANGED
@@ -1,14 +1,7 @@
1
- (function(Te,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],C):(Te=typeof globalThis<"u"?globalThis:Te||self,C(Te["@stonecrop/beam"]={},Te.Vue))})(this,(function(Te,C){"use strict";var hi=document.createElement("style");hi.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";.beam_action-footer[data-v-37933bd1]{margin-left:0;background:linear-gradient(180deg,transparent 0%,white 100%);color:var(--sc-primary-text-color);position:fixed;bottom:0;left:0;width:100%;padding:.625rem;text-align:center}.beam_metadata_arrow[data-v-2b1d7448]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-2b1d7448]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-2b1d7448]{width:20px;display:block}.beam_btn[data-v-bc768596]{font-size:.875rem;text-align:center;padding:.3125rem .75rem;border:1px solid var(--sc-btn-border);color:var(--sc-btn-label-color);background-color:var(--sc-btn-color);cursor:pointer;font-family:var(--sc-font-family)}.beam_btn[data-v-bc768596]:hover,.beam_btn[data-v-bc768596]:active{background-color:var(--sc-btn-hover)}.beam_btn a:link,.beam_btn a:visited,.beam_btn a:hover,.beam_btn a:active{text-decoration:none;color:var(--sc-btn-label-color)}.beam_day-divider[data-v-160cf6ef]{text-align:left;padding:1rem;background:var(--sc-cell-changed-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;margin-bottom:1rem;margin-left:calc(-1 * var(--sc-list-margin));margin-right:calc(-1 * var(--sc-list-margin))}.beam_day-divider h2[data-v-160cf6ef]{text-align:left;font-size:1rem;color:var(--sc-primary-text-color);margin:0;padding:0}.beam_day-divider[data-v-160cf6ef]:first-of-type{margin-top:0}.beam_filters[data-v-f8d60c9f]{background-color:var(--sc-primary-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;min-height:2em;overflow:visible;padding:.625rem;transition:all .2s ease-in-out}.beam_filters-heading[data-v-f8d60c9f]{align-items:center;background-color:var(--sc-primary-color);box-sizing:border-box;cursor:pointer;display:flex;font-size:1rem}.beam_filters-heading>h1[data-v-f8d60c9f]{font-size:1rem}.beam_filters-options[data-v-f8d60c9f]{display:flex;flex-direction:row;justify-content:flex-start;margin:1rem 0;padding:0 1rem;gap:1rem}@media (max-width: 479px){.beam_filters-options[data-v-f8d60c9f]{flex-direction:column}}.beam_filter-option[data-v-ad8ee21c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-ad8ee21c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-ad8ee21c]{align-items:stretch;appearance:none;background-color:#fff;border:1px solid var(--sc-row-border-color);color:var(--sc-primary-text-color);display:flex;font-family:var(--sc-font-family);font-size:.8rem;font-weight:700;position:relative}label[data-v-ad8ee21c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-ad8ee21c]{background:var(--sc-primary-color);color:var(--sc-primary-text-color);cursor:pointer;display:flex;align-items:center;width:5px;padding:.5rem .7rem}.beam_filter-label[data-v-ad8ee21c]{display:flex;align-items:center}svg[data-v-ad8ee21c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-ad8ee21c]{background-color:#fff;border-top:none;border:1px solid var(--sc-row-border-color);box-sizing:border-box;left:0;list-style:none;margin:0;max-height:200px;overflow-y:scroll;padding:0rem;position:absolute;width:100%;z-index:100}.beam_filter-select-option[data-v-ad8ee21c]{font-size:.8rem;font-family:var(--sc-font-family);font-weight:700;color:var(--sc-primary-text-color);border-bottom:1px solid var(--sc-row-border-color);padding:.5rem}.beam_filter-select-option[data-v-ad8ee21c]:hover{background:var(--sc-primary-color)}.selected[data-v-ad8ee21c],.selected[data-v-ad8ee21c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-ad8ee21c]{flex-grow:1;max-width:300px;width:50%}@media (max-width: 479px){.beam_filter-container[data-v-ad8ee21c]{width:100%;max-width:100%}}.beam_header[data-v-5182a4d5]{border:1px solid transparent;text-align:left;font-size:1.125rem;color:var(--sc-primary-text-color);margin:0;padding:0;font-family:var(--sc-font-family)}.beam_metadata[data-v-80484331]{box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;color:var(--sc-primary-text-color);font-family:var(--sc-font-family)}.beam_metadata_content[data-v-80484331]{padding-top:10px}.beam_metadata_header[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;padding:0 30px;justify-content:space-between}.beam_metadata_count[data-v-80484331]{font-size:1.5rem}.beam_metadata_count p[data-v-80484331]{margin:0}.beam_metadata_header-order-num[data-v-80484331]{font-weight:700;font-size:1.5rem}.beam_metadata_block[data-v-80484331]{padding:0 30px;margin:10px 0}.beam_metadata_shipping[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between}.beam_metadata_shipping p[data-v-80484331]{line-height:1.5rem}@media screen and (max-width: 600px){.beam_metadata_shipping[data-v-80484331]{flex-direction:column}}.beam_metadata_component_header[data-v-80484331]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.beam_metadata_components[data-v-80484331]{overflow:scroll}hr[data-v-80484331]{display:block;height:1px;border:0;border-top:1px solid var(--sc-row-border-color);margin:1em 0;padding:0}.beam_metadata_heading{font-size:1.125rem;font-weight:700;margin:.625rem 0;color:var(--sc-primary-text-color)}.beam_modal[data-v-55f98302]{position:fixed;inset:0;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:1000;text-align:center;padding:1.25rem}.beam_modal-confirm[data-v-5b430dca]{background:#fff;padding:1.25rem;width:80%;max-width:400px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.beam_modal-confirm button[data-v-5b430dca]{margin:.625rem}.beam_modal-confirm h2[data-v-5b430dca]{border-bottom:1px solid var(--sc-row-border-color);padding-bottom:.625rem;color:var(--sc-primary-text-color)}.fixed-top[data-v-a38a41d0]{position:sticky;top:0;left:0}.container[data-v-ad0dc7dc]{display:block;position:relative;padding-left:2.5ch;margin:0;margin-top:.5rem;cursor:pointer;font-size:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container input[data-v-ad0dc7dc]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-ad0dc7dc]{position:absolute;top:0;left:0;height:2rem;width:2rem;background-color:#eee;outline:2px solid transparent;border:1px solid var(--sc-highlight)}.container:hover input~.checkmark[data-v-ad0dc7dc]{background-color:#fff}.container input:checked~.checkmark[data-v-ad0dc7dc]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-ad0dc7dc]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-ad0dc7dc]:after{display:block}.container .checkmark[data-v-ad0dc7dc]:after{left:25%;top:50%;width:.5rem;height:1rem;border:solid var(--sc-text-color);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg) translate(-50%,-50%)}.beam_item-count[data-v-d4f676ed]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-d4f676ed]{margin:0;padding:0;outline:none}.beam_list-anchor[data-v-7e3ecf0d]{text-decoration:none;outline:none;color:var(--sc-primary-text-color)}.beam_list-item[data-v-634dd647]{padding:.625rem;border-bottom:1px solid var(--sc-row-border-color);max-width:100%;box-sizing:border-box;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:1.25rem;cursor:pointer;outline:2px solid transparent;outline-offset:-1px}.beam_list-item[data-v-634dd647]:focus{outline:2px solid var(--sc-focus-cell-outline);background-color:var(--sc-focus-cell-background)}.beam_list-text[data-v-634dd647]{width:80%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex-grow:1;font-size:.875rem;color:var(--sc-primary-text-color)}.beam_list-text label[data-v-634dd647],.beam_list-text p[data-v-634dd647]{overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.beam_list-item label[data-v-634dd647]{display:block}.beam_list-item p[data-v-634dd647]{margin:0}.beam_list-view[data-v-d536b2a7]{font-family:var(--sc-font-family);list-style-type:none;margin-top:1px;margin-left:var(--sc-list-margin);margin-right:var(--sc-list-margin);padding:0}ul.beam_list-view[data-v-d536b2a7]:last-of-type{padding-bottom:2.5em}.beam_navbar[data-v-cfc4c14e]{padding:.625rem;background-color:var(--sc-primary-color);margin-left:0;min-height:2em;max-height:2em;color:var(--sc-primary-text-color);display:flex;flex-flow:row nowrap;align-content:center;justify-content:space-between;align-items:center;position:sticky;top:0;font-family:var(--sc-font-family);border-bottom:1px solid var(--sc-row-border-color)}.beam_navbar h1[data-v-cfc4c14e]{margin-left:.625rem}.segmented-display[data-v-1731e036]{width:100%;padding:1rem;box-sizing:border-box;display:flex;background:var(--sc-segmented-display-background);align-items:center;justify-content:flex-end}.segmented-display-output[data-v-1731e036]{text-align:right;font-family:Segment7,Arimo,sans-serif;font-weight:400;font-size:var(--sc-segemented-display-font-size);padding:0;margin:0;letter-spacing:.3rem;margin-bottom:-.7rem;color:var(--sc-segmented-display-color)}.two-column[data-v-3f65313d]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width: 400px){.two-column[data-v-3f65313d]{flex-direction:column;gap:0}}.column[data-v-3f65313d]{flex-grow:1;width:50%}@media screen and (max-width: 400px){.column[data-v-3f65313d]{width:100%}}.column-right[data-v-3f65313d]{text-align:right}@media screen and (max-width: 400px){.column-right[data-v-3f65313d]{text-align:left}}svg[data-v-05e7abed]{width:100%;overflow:visible;fill:var(--sc-primary-text-color)}.arrow-icon[data-v-05e7abed]{width:.4rem;transform:rotate(0);transform-origin:center;position:relative;transition:all .1s ease-in-out;margin:.5rem;cursor:pointer;display:flex;align-items:center}.open[data-v-05e7abed]{transform:rotate(90deg)}@font-face{font-family:Segment7;src:url(data:font/otf;base64,T1RUTwAOAIAAAwBgQkFTRQAJAAQAACasAAAADkNGRiC5m9MSAAAH7AAAHbpGRlRNa6XwRAAAJrwAAAAcR0RFRgKxAqIAACWoAAAASkdQT1Ou773UAAAmLAAAAH5HU1VCRNhM5gAAJfQAAAA4T1MvMljUYiwAAAFQAAAAYGNtYXAxVzUsAAAFhAAAAkZoZWFkAmNATwAAAOwAAAA2aGhlYQdTAF8AAAEkAAAAJGhtdHgW0g5oAAAm2AAAAgZtYXhwAQFQAAAAAUgAAAAGbmFtZYoOx10AAAGwAAAD0nBvc3QAAAABAAAHzAAAACAAAQAAAAEAAOVWl1RfDzz1AAsD6AAAAADPuH6JAAAAAM+4fokAAP84A9EDIAACAAgAAgAAAAAAAAABAAADIP84AFoCSQAA/ngD0QBkAAUAAAAAAAAAAAAAAAAAAgAAUAABAQAAAAMCSQJYAAUACAKKArsABwCMAooCu//nAd8AMQECAAACAAUJAAAAAAAAAAAAAwAAAAAAAAAAAAAAAFBmRWQAAQAAAP8DIP84AFoDIADIAAAAAQAAAAABwgHCACAAIAACAAAADgCuAAEAAAAAAAAAsQFkAAEAAAAAAAEACAIoAAEAAAAAAAIACAJDAAEAAAAAAAMAIwKUAAEAAAAAAAQACALKAAEAAAAAAAUACQLnAAEAAAAAAAYAEAMTAAMAAQQJAAABYgAAAAMAAQQJAAEAEAIWAAMAAQQJAAIAEAIxAAMAAQQJAAMARgJMAAMAAQQJAAQAEAK4AAMAAQQJAAUAEgLTAAMAAQQJAAYAIALxAFMAdAByAGkAYwB0AGwAeQAgAHMAZQB2AGUAbgAtAHMAZQBnAG0AZQBuAHQAIAAoAHAAbAB1AHMAIABwAG8AaQBuAHQAKQAgAGMAYQBsAGMAdQBsAGEAdABvAHIAIABkAGkAcwBwAGwAYQB5ACAAZgBhAGMAZQAsACAAZgBpAHgAZQBkAC0AdwBpAGQAdABoACAAYQBuAGQAIABmAHIAZQBlAC4AIAAgACgAYwApACAAQwBlAGQAcgBpAGMAIABLAG4AaQBnAGgAdAAgADIAMAAxADQALgAgACAATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBjAGUAIAB2ADEALgAxAC4AIAAgAFIAZQBzAGUAcgB2AGUAZAAgAG4AYQBtAGUAOgAgAFMAZQBnAG0AZQBuAHQANwAuAABTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny4AAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFMAdABhAG4AZABhAHIAZAAAU3RhbmRhcmQAAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAUwBlAGcAbQBlAG4AdAA3ACAAOgAgADcALQA2AC0AMgAwADEANAAARm9udEZvcmdlIDIuMCA6IFNlZ21lbnQ3IDogNy02LTIwMTQAAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFYAZQByAHMAaQBvAG4AIAAgAABWZXJzaW9uICAAAFMAZQBnAG0AZQBuAHQANwBTAHQAYQBuAGQAYQByAGQAAFNlZ21lbnQ3U3RhbmRhcmQAAAAAAAADAAAAAwAAABwAAQAAAAAAPAADAAEAAAAcAAQAIAAAAAQABAABAAAA////AAAAAP//AAEAAQAAAAAABgIKAAAAAAEAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AH8AgADFAMYAyADKANIA1wDdAOIA4QDjAOUA5ADmAOgA6gDpAOsA7ADuAO0A7wDwAPIA9ADzAPUA9wD2APsA+gD8AP0AAACxAKMApACoAAAAtwDgAK8AqgAAALUAqQAAAMcA2QAAALIAAAAAAKYAtgAAAAAAAAAAAAAAqwC7AAAA5wD5AMAAogCtAAAAAAAAAAAArAC8AAAAoQDBAMQA1gAAAAAAAAAAAAAAAAAAAAAA+AAAAQAAAAAAAAAAAAAAAAAAAAAAALgAAAAAAAAAwwDLAMIAzADJAM4AzwDQAM0A1ADVAAAA0wDbANwA2gAAAAAAAACwAAAAAAAAALkAAAAAAAAAAAADAAD//QAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAEBAABAQERU2VnbWVudDdTdGFuZGFyZAABAgABADf4YgD4YwH4ZAL4ZQP4ZgSMDAGIDAKLDAOLDASL+1z6Zfm0BRwDrw8cAAAQHAWwERwAMRwbyBIATAIAAQAIAA8AFgAdACQAKwAyADkAQABHAE4AVQBcAGMAagBxAHgAfwCGAI0AlACbAKIAqQCwALcAvgDFAMwA0wDaAOEA6ADvAPYA/QEEAQsBEgEZASABJwEuATUBPAFDAUoBUQFYAV8BZgFtAXQBewGCAYkBkAGXAZ4BpQGsAbMBugHBAcgBzwHWAd0B5AHrAfIB8gKjAqsCswK7dW5pMDAwMHVuaTAwMDF1bmkwMDAydW5pMDAwM3VuaTAwMDR1bmkwMDA1dW5pMDAwNnVuaTAwMDd1bmkwMDA4dW5pMDAwOXVuaTAwMEF1bmkwMDBCdW5pMDAwQ3VuaTAwMER1bmkwMDBFdW5pMDAwRnVuaTAwMTB1bmkwMDExdW5pMDAxMnVuaTAwMTN1bmkwMDE0dW5pMDAxNXVuaTAwMTZ1bmkwMDE3dW5pMDAxOHVuaTAwMTl1bmkwMDFBdW5pMDAxQnVuaTAwMUN1bmkwMDFEdW5pMDAxRXVuaTAwMUZ1bmkwMDdGdW5pMDA4MHVuaTAwODF1bmkwMDgydW5pMDA4M3VuaTAwODR1bmkwMDg1dW5pMDA4NnVuaTAwODd1bmkwMDg4dW5pMDA4OXVuaTAwOEF1bmkwMDhCdW5pMDA4Q3VuaTAwOER1bmkwMDhFdW5pMDA4RnVuaTAwOTB1bmkwMDkxdW5pMDA5MnVuaTAwOTN1bmkwMDk0dW5pMDA5NXVuaTAwOTZ1bmkwMDk3dW5pMDA5OHVuaTAwOTl1bmkwMDlBdW5pMDA5QnVuaTAwOUN1bmkwMDlEdW5pMDA5RXVuaTAwOUZ1bmkwMEEwdW5pMDBBRHVuaTAwQjJ1bmkwMEIzdW5pMDBCNXVuaTAwQjlTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny5TZWdtZW50N1NlZ21lbnQ3U3RhbmRhcmQAAAABhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAAEAAgADAAQABQAGAAcAaAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAfABCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAGAAYQBiAGcAZACgAGYAgwCqAIsAagCXAckApQCAAKEAnAHKAcsAfQHMAHMAcgCFAc0AjwB4AJ4AmwCjAHsArgCrAKwAsACtAK8AigCxALUAsgCzALQAuQC2ALcAuACaALoAvgC7ALwAvwC9AKgAjQDEAMEAwgDDAMUAnQCVAMsAyADJAM0AygDMAJAAzgDSAM8A0ADRANYA0wDUANUApwDXANsA2ADZANwA2gCfAJMA4QDeAN8A4ADiAKIA4wEBAgABACIANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAdgCQALYA7QEmAUgBXgGRAcoB8gIWAjQCQAJOAncCxgLnAyQDZwOWA+AEPARhBMEFDgUaBToFTgViBYAFsgX/BkEGhwa6Bv4HOgdrB7AH7QgJCEIIegihCLkI8QlACXwJsgnLCg0KQgqECsYLGAs2C3gLqgvdDAAMNwxcDGgMewzIDQ4NIg1mDa0N3g4pDloOaQ6iDtoPAQ84D1gPjQ/JEAEQGhBeEJMQwREDEVURkhHWEf8SABIcEh0STxJQElESUhJTElQSVRJWElcSWBJZEloSWxJcEl0SXhJfEmASYRJiEmMSZBJlEmYSZxJoEmkSahJrEmwSbRJuEm8ScBJxEnIScxJ0EnUSdhJ3EngSeRJ6EnsSfBJ9En4SfxKAEq8SsBKxErISsxLqEusS7BLtEu4S7xLwEvES8hLzEvQS9RL2EvcS+BL5EvoS+xL8Ev0S/hL/EwATARMCEwMTBBMFEwYTBxMIEwkTChMLEwwTDRMOEw8TEBMRExITExMUE2ETrhOvE7ATsROyE7MTtBO1E/wT/RP+E/8UABQBFAIUAxQEFAUUBhQHFAgUCRQKFAsUDBQNFA4UDxQQFBEUEou9+EW9Ab29+BW9A70W+Hn4qfx5Br38dxX4RfgV/EUHDvtc+nwBi/plA/tcBPpl+nz+ZQYODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg527/floPfFnxL4O/Z66hNw+KH5jhUgChOIsf0/FSEKDvhJdvfBd593zHcSE9Dd+WEVIgr3+fAVIwoOien3m+ppoPfFnxITgPcf5xUkChPA+3j3+hUlChOw9wz3zBUgCg6J6VOg9/ug94zqOJ8SE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOielodvgldveh6kx3n3cSE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOr6D3vuppoPfFnxITwPdA+FYVJQrRTRUrChOwm/gwFSAKDvhJdvfud593Evg79hPQ+KH5jhUgCg6J6X929+N3ynb3oepMdxITsPcf5xUkCvvX98IVLAoTcC0KEzRG+AsVIgoTOH73CxUoCg6J6Wh2+CV296HqeXefdxIToPcf5xUTYCYKE6AnChMw+4n5RBUoCmT8FxUpChNgKgoTKJv4MBUgCg6J6feb6n529+53n3cSE4D3H+cVJAoTwPt49/oVJQoTsPcM98wVIAoOxHb30+p+dvfud593EhPA90D4VhUlCtFNFSsKE7Cb+DAVIAoOielodhITgPcf5xUTQCYKE4AnCtb3vBUpChNAKgoO9/fqAfdA+FYVJQoOdu8B+JXqA/jH2hUhCg7bdve86lN3ynb37ncSE6jY+B4VLgoTyKD3ABUlCvcM98wVLwoTmDAKDonpaHa3dvfjd8p296HqTHfMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoTGZv4MBUgCg7Edvgldvfud593Evgq9xATyPhv+BgVKwoT6Jv4MBUgCg6J6X9297zqU3fKdveh6nl3EhOA9x/nFSQKE1D71/fCFS4KEwSP+EoVKAoTIPvq+9kVJQoTCvcM98wVIAoOielodvfT6n5296HqeXefdxITgPcf5xUTQCYKE4AnChMI+4n5RBUoChMg++r72RUlCtFNFSkKE0AqChMUm/gwFSAKDsR299Pqfnb3wXefd8x3EhO03flhFSIKE8SP+2cVJQrRTRUrCpv4MBUvChOkMAoOielodvfU6X5296HmUHefdxITQPhw+BkVUlx++3jNPZylnve1BRMg++XuFTEK+4333RVJYAUTCDIKExT8Q1AVMwoTgG38zhU0Cg6J6Wh2tnb3vulndrd296HmUHcSE4D3HucVNAoTBfvS+QUVMwp+9wkVSWAFEwIyChMQ++r72hUxCtNOFVJcfvt4BRNANQoTKPxEtRWHgYaBh4EIe/vF576X930FDsR2+CV296HqeXefdxIT4Pcv+aAVKApk/BcVKwoT0Jv4MBUgCg6J6Wh2t3b3vOpTd8p296HqTHfMdxITgAD3H+cVE0AAJgoTgAAnChMoAPvX98IVLgoTBQBG+AsVIgoTAgB+9wsVKAoTEAD76vvZFSUK0U0VKQoTQAAqChMEgJv4MBUgCg6J6Wh299Pqfnb3oepMd593zHcSE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMRm/gwFSAKDvf36gH3QPhWFSUKDnbv9+Wg98WfEvg79nrqE3D4ofmOFSAKE4ix/T8VIQoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6feb6gH3H+cVJAr7ePf6FSUKDonpU6ASE4D3H+cVE0AmChOAJwrW97wVKQoTQCoKDtt297zqU3fKdveh6nl3EhOg2PgeFS4KE4iP+EoVKAoTwPvq+9kVJQoTlPcM98wVIAoOielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg7Edrd297zqU3fKdveh6kx3zHcSE9DY+B4VLgoTykb4CxUiChPEfvcLFSgKE+D76vvZFSUK0U0VKwoTyZv4MBUgCg6J6VOgjaD3p+o/n6Gg95ifEhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoOielqoPe6n6Gg94zqOJ8SE7D3H+cVJAr71/fCFSwKE3AtChM0RvgLFSIKEzh+9wsVKAoOielToI2g96fqP5+hoPfFnxITgvcf5xUTQiYKE4InChMq+9f3whUuChMSoPcAFSUK0U0VKQoTQioKm/gwFS8KEwYwCg6J6X9297zqU3fKdveh6kx3EhOA9x/nFSQKE1D71/fCFS4KEwpG+AsVIgoTBH73CxUoChMg++r72RUlCg7GoPen6j+foaD3jOo4nxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoOielodrd29+N3ynb3oepMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoOr6CNoPen6j+foaD3mJ+knxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDq+g9/ug98WfAfgq9xAD+G/4GBUrCpv4MBUgCg6J6VOgjaD3up+hoPfFnxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg6voI2g96fqP5+hoPeM6jifEhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpaqD3up+hoPeYnxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtj4HhUuCqD3ABUlCtFNFSsKm/gwFSMKDsR2t3b343fKdveh6kx3zHcSE/DY+B4VLgoT9Eb4CxUiChP4fvcLFSgKZPwXFSsKE/Kb+DAVIAoOielToI2g97qfoaD3jOo4n6SfEhOY9x/nFRNYJgoTmCcK+9f3whUsChM4LQoTGkb4CxUiChMcfvcLFSgKZPwXFSkKE1gqChMZm/gwFSAKDsag96fqP5+hoPeM6jifpJ8SE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKE5L3DPfMFSAKDq+g977qaaD3jOo4n6SfEhOo3flhFSIKE5B+9wsVKAoTwPvq+9kVJQrRTRUrChOkm/gwFSAKDsag96fqP58SE6DY+B4VLgoTwKD3ABUlCg6J6VOg97/paaD3jOY8nxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6Wqg96fqP5+hoPeYnxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPen6j+foaD3mJ+knxITg/cf5xUTQyYKE4MnChMr+9f3whUuCkb4CxV7+6kFEwc2ChMTj/tnFSUK0U0VKQoTQyoKm/gwFS8KEwcwCg6J6feb6vd/6gH3H+cVJAr7iflEFSgK++r72RUlCg6J6VOg977qaaD3mJ+knxIThPcf5xUTRCYKE4QnChMc+9L5BRUiChMkj/tnFSUK0U0VKQoTRCoKm/gwFS8KExQwCg7GoPen6j+foaD3jOplnxIToNj4HhUuChOIj/hKFSgKE8D76vvZFSUKE5T3DPfMFSAKDonpaqD3up+hoPeM6jifEhOw9x/nFSQK+9f3whUsChNwLQoTNEb4CxUiChM4fvcLFSgKDsR299Pqfnb3wXefdxITsN35YRUiChPAj/tnFSUK0U0VKwoOielToPf7oPeM6mWfEhOg9x/nFRNgJgoToCcKEzD7iflEFSgKZPwXFSkKE2AqChMom/gwFSAKDvhJdveh6kx3n3fMdxIToN35YRUiChPAfvcLFSgKE4iWfhUgCg739+oB90D4VhUlCg74NKD3xZ8B+Dv2A/ih+Y4VIAoOielodrd297zqU3fKdveh6nl3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6Wh2t3b3vOpTd8p298F3EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6Wh2t3b3vOpTd8p29+53EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KExKg9wAVJQrRTRUpChNCKgqb+DAVLwoTBjAKDonpf3b3vOpTd8p296HqTHfMdxITgPcf5xUkChNQ+9f3whUuChMKRvgLFSIKEwR+9wsVKAoTIPvq+9kVJQoTCfcM98wVIAoO23b3vOpTd8p296HqTHcSE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKDonpU6D3vuppoPeM6jifpJ8SE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMSm/gwFSAKDsR2t3b3vOpTd8p298F3EhPU2PgeFS4KRvgLFXv7qQUTzDYKE+SP+2cVJQrRTRUrCg7EdgH4KvID+G/4GBUrCg6J6Wh2t3b343fKdvfudxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg7Edrd297zqU3fKdveh6kx3EhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpf3b343fKdvfBdxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtt297zqU3fKdvfBd8x3EhOs2PgeFS4KRvgLFXv7qQUTnDYKE8yP+2cVJQr3DPfMFS8KE5wwCg7Edrd297zqU3cSE9DY+B4VLgoT4KD3ABUlCtFNFSsKDonpaHa3dve86lN3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KExCg9wAVJQrRTRUpChNAKgoO23b3vOpTd8p296HqTHfMdxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoTkvcM98wVIAoOxHb30+p+dveh6kx3n3fMdxITqN35YRUiChOQfvcLFSgKE8D76vvZFSUK0U0VKwoTopv4MBUgCg7bdve86lN3EhOg2PgeFS4KE8Cg9wAVJQoOielodvfU6X5296HmUHefdxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6X9297zqU3fKdvfBdxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpaHa3dvfjdxITkPcf5xUTUCYKE5AnCvvX98IVLAoTMC0K99i5FSkKE1AqCg6J6Wh2t3b343fKdvfBd8x3EhOe9x/nFRNeJgoTnicK+9f3whUsChM+LQpG+AsVIgr3x/ulFSkKE14qCpv4MBUjCg6J6Wh2t3b3vOpTd8p298F3zHcSE4P3H+cVE0MmChODJwoTK/vX98IVLgpG+AsVe/upBRMHNgoTE4/7ZxUlCtFNFSkKE0MqCpv4MBUvChMHMAoOxHa3dve86lN3ynb3wXfMdxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDonpaHb30+p+dvfBd593zHcSE4L3H+cVE0ImChOCJwoTGvvS+QUVIgoTIo/7ZxUlCtFNFSkKE0IqCpv4MBUvChMSMAoOxqD3p+o/n6Gg98WfEhOo2PgeFS4KE8ig9wAVJQr3DPfMFS8KE5gwCg4Or6D3+6D3xZ8B+Cr3EAP4b/gYFSsKm/gwFSAKDg6J6X929+N3ynb3oep5dxITsPcf5xUkCvvX98IVLAoTcC0KEziP+EoVKAoTNJZ+FSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg739+ppoPeM6jifpJ8SE4D3QPhWFSUKE1D71/efFSIKE2B+9wsVKAoTSJZ+FSAKDg4ODg7GoPen6j+foaD3mJ+knxITrNj4HhUuCkb4CxV7+6kFE5w2ChPMj/tnFSUK9wz3zBUvChOcMAoODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6VOgjaD3p+o/n6Gg94zqZZ8SE4D3H+cVE0AmChOAJwoTKPvX98IVLgoTAo/4ShUoChMQ++r72RUlCtFNFSkKE0AqChMFm/gwFSAKDg4ODg4ODg6J6Wqg96fqP5+hoPeM6jifpJ8SE4D3H+cVJAoTUPvX98IVLgoTCkb4CxUiChMEfvcLFSgKEyD76vvZFSUKEwn3DPfMFSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg743RSLFYmx+T24nIwGHgoCLwwJiwwK6gqfjNGOjJD6GAwM+mUL6pOPnPnpDA0cADETABcCAAEAGgAsADgAUAB+AJEAngDBAMwA0wDcAOoA8gD8AQ0BFAEnAToBQwFPAX0BhgGPMTF/+2rDYa6wBZDukeqQ7giLkIiRiZAIC291dm1voHakp6Cgqad3oHIfC3v7qZZz2rqX91oFCzExf/tqw2GusAWQ7pHqkO6LkIiRiZAICy9Ti4oFi4aPiI6IkoKSg5KCCNKL9yKL90CLBZKOjY4fi42JjYiOdqV0qXalCAs7XwWgeqN8oHgI94yLy7dKvgULL1OLigWLho+IjogIC5KCkoOSggjSi/cii/dAiwWSjo2OH4uNiY2IjnaldKl2pQgLSF7bWfeTi+blBQtSXX/7dwULzTydpZ73tAULUl1/+3fNPJ2lnve0BQuIgYOAiIEIC3v7xOe9l/d9BQuIgYOAiIEIe/vE572X930FCzExf/tqBQvDYa6wBZDukeqQ7ouQiJGJkAgLPF8FoXqhfKF5CPeMi8u2Sb4FC9tY95KL5eYFC3z7qJVy27qW91sFCy9Ui4kFi4aQiI6HkoOSgpKDCNOL9yGL90CLBZKPjY4fi42JjYiOdqZzp3amCAvNPZylnve1BQuWc9q6l/daBQsAAAABAAAAAAAAAA4AFgAAAAQAAAACAAAAAgAIADEAOgABAEAAQAACAEIAQgACAEYARgACAE8ATwACAFkAWQACAGIAcwACAHUAegACAAAAAQAAAAoAHAAeAAFERkxUAAgABAAAAAD//wAAAAAAAQAEAAEACAABAAgAAQAGACAAAQACAEcASwABAAAACgAeACwAAURGTFQACAAEAAAAAP//AAEAAAABa2VybgAIAAAAAQABAAIABgAOAAEAAAABABAAAgAAAAEAFgABAAgABP22AAEAAQAvAAEAJAAEAAAACgAeAB4AHgAeAB4AHgAeAB4AHgAeAAEAL/22AAIAAQAxADoAAAAAAAEAAAAIAAAAAAAEAAAAAAAAAAEAAAAAzD2izwAAAADPr89TAAAAAM+4fiECSQAAAkkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpwBCAC8ALwAvAFwBpwAvAC8ALwBcAC8AXAIBAC8ALwGWAC8ALwBCAC4ALgBYAC8ALwBcAacALwAvAC8ALwAvAC8ALwAvAC8ALwAvAC8ALwGWAC8ALwAvAC8ALwAvAC8AQgAvAC4ALwAvAC8ALwAvAC8ALwAvAEIALwBCAFwBpwAvAC8ALwAvAC8ALwAvAC8BlgAvAC8ALwAvAC8ALwAvAEIALwAuAC8ALwAvAC8ALwAvAC8AAAGWAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8ALwAAAAAAAAAAAAAAAAAAAC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)}:root{--sc-primary-color: #f2f2f2;--sc-primary-text-color: #666666;--sc-alert: #e63c28;--sc-success: #155724;--sc-warning: #f0f34f;--sc-font-family: Arimo, Arial, sans-serif;--sc-row-border-color: #ccc;--sc-btn-color: white;--sc-btn-border: #ccc;--sc-btn-label-color: black;--sc-list-margin: .625rem;--sc-cell-changed-color: #d8edff;--sc-segemented-display-font-size: 4.5rem;--sc-segmented-display-background: #404040;--sc-segmented-display-color: #b0b0b0}.beam_copy{color:var(--sc-primary-text-color);font-size:1rem;line-height:1.5rem;font-family:var(--sc-font-family)}.beam--bold{font-weight:700}.beam--normal{font-weight:400}.beam--alert{color:var(--sc-alert)}.beam--warning{color:var(--sc-warning)}.beam--success{color:var(--sc-success)}.v-toast__item{border-radius:0;color:#fff;font-family:var(--sc-font-family)}.v-toast__item--success{background-color:var(--sc-success)!important;color:#fff}.v-toast__item--info{background-color:var(--sc-primary-text-color)!important}.v-toast__item--warning{background-color:var(--sc-warning)!important;color:#fff}.v-toast__item--error{background-color:var(--sc-alert)!important;color:#fff}.v-toast__item--default{background-color:var(--sc-primary-text-color)!important}
2
- /*$vite$:1*/`,document.head.appendChild(hi);const Xs={class:"beam_action-footer"},ea={class:"footer-action-wrapper"},ta=C.defineComponent({__name:"ActionFooter",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,r)=>{const e=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("footer",Xs,[C.createElementVNode("span",ea,[C.createVNode(e,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Fe=(i,h)=>{const o=i.__vccOpts||i;for(const[a,l]of h)o[a]=l;return o},fi=Fe(ta,[["__scopeId","data-v-37933bd1"]]),ra={class:"beam_metadata_arrow"},na={class:"beam_metadata_arrow-head"},ia={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},di=Fe(C.defineComponent({__name:"BeamArrow",props:{color:{default:"#c4c4c4"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",ra,[C.createElementVNode("div",{class:"beam_metadata_arrow-body",style:C.normalizeStyle({background:i.color})},null,4),C.createElementVNode("div",na,[(C.openBlock(),C.createElementBlock("svg",ia,[C.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:C.normalizeStyle([{fill:"#c4c4c4"},{fill:i.color}])},null,4)]))])]))}}),[["__scopeId","data-v-2b1d7448"]]),oa={},sa={class:"beam_btn"};function aa(i,h){return C.openBlock(),C.createElementBlock("button",sa,[C.renderSlot(i.$slots,"default",{},()=>[h[0]||(h[0]=C.createTextVNode("Action",-1))],!0)])}const pi=Fe(oa,[["render",aa],["__scopeId","data-v-bc768596"]]),la={class:"beam_day-divider"},gr=Fe(C.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(i){const h=C.computed(()=>{if(!i.item.date||isNaN(Date.parse(i.item.date)))return i.item.date;const o=new Date(i.item.date);if(i.item.dateFormat)switch(i.item.dateFormat.toLowerCase()){case"iso":return o.toISOString()}return o.toDateString()});return(o,a)=>(C.openBlock(),C.createElementBlock(C.Fragment,null,[C.createElementVNode("div",la,[C.createElementVNode("h2",null,C.toDisplayString(h.value),1)]),C.renderSlot(o.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),ua={class:"beam_filters"},ca={class:"beam_filters-options"},gi=Fe(C.defineComponent({__name:"BeamFilter",setup(i){const h=C.ref(!1);return(o,a)=>{const l=C.resolveComponent("ToggleArrow"),r=C.resolveComponent("BeamHeading");return C.openBlock(),C.createElementBlock("div",ua,[C.createElementVNode("div",{class:"beam_filters-heading",onClick:a[0]||(a[0]=e=>h.value=!h.value)},[C.createVNode(l,{open:h.value},null,8,["open"]),C.createVNode(r,null,{default:C.withCtx(()=>[...a[1]||(a[1]=[C.createTextVNode("Filter",-1)])]),_:1})]),C.withDirectives(C.createElementVNode("div",ca,[C.renderSlot(o.$slots,"default",{},void 0,!0)],512),[[C.vShow,h.value]])])}}}),[["__scopeId","data-v-f8d60c9f"]]);function mi(i,h){return C.getCurrentScope()?(C.onScopeDispose(i,h),!0):!1}const ha=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fa=Object.prototype.toString,da=i=>fa.call(i)==="[object Object]",bt=()=>{};function pa(...i){if(i.length!==1)return C.toRef(...i);const h=i[0];return typeof h=="function"?C.readonly(C.customRef(()=>({get:h,set:bt}))):C.ref(h)}function ga(i,h){function o(...a){return new Promise((l,r)=>{Promise.resolve(i(()=>h.apply(this,a),{fn:h,thisArg:this,args:a})).then(l).catch(r)})}return o}function ma(i,h={}){let o,a,l=bt;const r=t=>{clearTimeout(t),l(),l=bt};let e;return t=>{const s=C.toValue(i),u=C.toValue(h.maxWait);return o&&r(o),s<=0||u!==void 0&&u<=0?(a&&(r(a),a=void 0),Promise.resolve(t())):new Promise((d,p)=>{l=h.rejectOnCancel?p:d,e=t,u&&!a&&(a=setTimeout(()=>{o&&r(o),a=void 0,d(e())},u)),o=setTimeout(()=>{a&&r(a),a=void 0,d(t())},s)})}}function mr(i){return Array.isArray(i)?i:[i]}function Aa(i,h=200,o={}){return ga(ma(h,o),i)}function ba(i,h,o){return C.watch(i,h,{...o,immediate:!0})}const Ai=ha?window:void 0;function Nt(i){var h;const o=C.toValue(i);return(h=o?.$el)!==null&&h!==void 0?h:o}function Ar(...i){const h=[],o=()=>{h.forEach(n=>n()),h.length=0},a=(n,t,s,u)=>(n.addEventListener(t,s,u),()=>n.removeEventListener(t,s,u)),l=C.computed(()=>{const n=mr(C.toValue(i[0])).filter(t=>t!=null);return n.every(t=>typeof t!="string")?n:void 0}),r=ba(()=>{var n,t;return[(n=(t=l.value)===null||t===void 0?void 0:t.map(s=>Nt(s)))!==null&&n!==void 0?n:[Ai].filter(s=>s!=null),mr(C.toValue(l.value?i[1]:i[0])),mr(C.unref(l.value?i[2]:i[1])),C.toValue(l.value?i[3]:i[2])]},([n,t,s,u])=>{if(o(),!n?.length||!t?.length||!s?.length)return;const d=da(u)?{...u}:u;h.push(...n.flatMap(p=>t.flatMap(g=>s.map(f=>a(p,g,f,d)))))},{flush:"post"}),e=()=>{r(),o()};return mi(o),e}function bi(i,h,o={}){const{window:a=Ai,ignore:l=[],capture:r=!0,detectIframe:e=!1,controls:n=!1}=o;if(!a)return n?{stop:bt,cancel:bt,trigger:bt}:bt;let t=!0;const s=y=>C.toValue(l).some(_=>{if(typeof _=="string")return Array.from(a.document.querySelectorAll(_)).some(A=>A===y.target||y.composedPath().includes(A));{const A=Nt(_);return A&&(y.target===A||y.composedPath().includes(A))}});function u(y){const _=C.toValue(y);return _&&_.$.subTree.shapeFlag===16}function d(y,_){const A=C.toValue(y),w=A.$.subTree&&A.$.subTree.children;return w==null||!Array.isArray(w)?!1:w.some(I=>I.el===_.target||_.composedPath().includes(I.el))}const p=y=>{const _=Nt(i);if(y.target!=null&&!(!(_ instanceof Element)&&u(i)&&d(i,y))&&!(!_||_===y.target||y.composedPath().includes(_))){if("detail"in y&&y.detail===0&&(t=!s(y)),!t){t=!0;return}h(y)}};let g=!1;const f=[Ar(a,"click",y=>{g||(g=!0,setTimeout(()=>{g=!1},0),p(y))},{passive:!0,capture:r}),Ar(a,"pointerdown",y=>{const _=Nt(i);t=!s(y)&&!!(_&&!y.composedPath().includes(_))},{passive:!0}),e&&Ar(a,"blur",y=>{setTimeout(()=>{var _;const A=Nt(i);((_=a.document.activeElement)===null||_===void 0?void 0:_.tagName)==="IFRAME"&&!A?.contains(a.document.activeElement)&&h(y)},0)},{passive:!0})].filter(Boolean),b=()=>f.forEach(y=>y());return n?{stop:b,cancel:()=>{t=!1},trigger:y=>{t=!0,p(y),t=!1}}:b}function br(i){return typeof Window<"u"&&i instanceof Window?i.document.documentElement:typeof Document<"u"&&i instanceof Document?i.documentElement:i}const yr=new WeakMap;function ya(i,h=!1){const o=C.shallowRef(h);let a="";C.watch(pa(i),e=>{const n=br(C.toValue(e));if(n){const t=n;if(yr.get(t)||yr.set(t,t.style.overflow),t.style.overflow!=="hidden"&&(a=t.style.overflow),t.style.overflow==="hidden")return o.value=!0;if(o.value)return t.style.overflow="hidden"}},{immediate:!0});const l=()=>{const e=br(C.toValue(i));!e||o.value||(e.style.overflow="hidden",o.value=!0)},r=()=>{const e=br(C.toValue(i));!e||!o.value||(e.style.overflow=a,yr.delete(e),o.value=!1)};return mi(r),C.computed({get(){return o.value},set(e){e?l():r()}})}const wr=new WeakMap,wa={mounted(i,h){const o=!h.modifiers.bubble;let a;if(typeof h.value=="function")a=bi(i,h.value,{capture:o});else{const[l,r]=h.value;a=bi(i,l,Object.assign({capture:o},r))}wr.set(i,a)},unmounted(i){const h=wr.get(i);h&&typeof h=="function"?h():h?.stop(),wr.delete(i)}};function va(){let i=!1;const h=C.shallowRef(!1);return(o,a)=>{if(h.value=a.value,i)return;i=!0;const l=ya(o,a.value);C.watch(h,r=>l.value=r)}}va();const _a={class:"beam_filter-container"},Ea={class:"beam_filter-option-select"},Sa={class:"beam_filter-label"},Ca={key:0,ref:"menu",class:"beam_filter-select-menu"},ka=["data-value","onClick"],yi=Fe(C.defineComponent({__name:"BeamFilterOption",props:{choices:{},title:{default:"title"}},emits:["select"],setup(i,{emit:h}){const o=h,a=C.ref(!1),l=C.ref(i.choices[0].label),r=C.ref(i.choices[0].value),e=n=>{l.value=n.label,r.value=n.value,o("select",n)};return(n,t)=>{const s=C.resolveComponent("BeamHeading");return C.withDirectives((C.openBlock(),C.createElementBlock("div",_a,[C.createVNode(s,{class:"beam_filter-option-heading"},{default:C.withCtx(()=>[C.createTextVNode(C.toDisplayString(i.title),1)]),_:1}),C.createElementVNode("div",{class:"beam_filter-option",onClick:t[0]||(t[0]=u=>a.value=!a.value)},[C.createElementVNode("div",Ea,[t[1]||(t[1]=C.createElementVNode("div",{class:"beam_filter-arrow"},[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),C.createElementVNode("div",Sa,[C.createElementVNode("label",null,C.toDisplayString(l.value),1)])]),a.value?(C.openBlock(),C.createElementBlock("ul",Ca,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.choices,u=>(C.openBlock(),C.createElementBlock("li",{key:u.value,class:C.normalizeClass([{selected:l.value==u.label},"beam_filter-select-option"]),"data-value":u.value,onClick:d=>e(u)},C.toDisplayString(u.label),11,ka))),128))],512)):C.createCommentVNode("",!0)])])),[[C.unref(wa),()=>a.value=!1]])}}}),[["__scopeId","data-v-ad8ee21c"]]),Ta={},Ia={class:"beam_header"};function Ba(i,h){return C.openBlock(),C.createElementBlock("h1",Ia,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const wi=Fe(Ta,[["render",Ba],["__scopeId","data-v-5182a4d5"]]),Oa={class:"beam_metadata"},xa={class:"beam_metadata_content"},Pa={class:"beam_metadata_block"},Ra={class:"beam_metadata_heading"},vi=Fe(C.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",Oa,[C.createElementVNode("div",xa,[C.renderSlot(h.$slots,"default",{},()=>[o[1]||(o[1]=C.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),C.createElementVNode("div",Pa,[C.createElementVNode("p",Ra,[o[0]||(o[0]=C.createTextVNode(" Status: ",-1)),C.createElementVNode("span",{class:C.normalizeClass([{alert:!i.order.complete},"beam_metadata--normal"])},C.toDisplayString(i.order.complete?"Complete":"In Progress"),3)])]),o[2]||(o[2]=C.createStaticVNode('<div class="beam_metadata_shipping beam_metadata_block" data-v-80484331><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Source</p></div><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Receiving</p></div></div>',1))],!0)]),o[3]||(o[3]=C.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),Ma={class:"beam_modal"},_i=Fe(C.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},emits:["closemodal","confirmmodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("BeamBtn"),l=C.resolveComponent("portal");return C.openBlock(),C.createBlock(l,{to:"beam_modal_outlet"},{default:C.withCtx(()=>[C.withDirectives(C.createElementVNode("div",Ma,[C.createVNode(a,{onClick:o[0]||(o[0]=r=>h.$emit("closemodal"))},{default:C.withCtx(()=>[...o[3]||(o[3]=[C.createTextVNode("Close Modal",-1)])]),_:1}),C.renderSlot(h.$slots,"default",{onClosemodal:o[1]||(o[1]=r=>h.$emit("closemodal")),onConfirmmodal:o[2]||(o[2]=r=>h.$emit("confirmmodal"))},void 0,!0)],512),[[C.vShow,i.showModal]])]),_:3})}}}),[["__scopeId","data-v-55f98302"]]),Ei=C.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("portal-target");return C.openBlock(),C.createBlock(a,{name:"beam_modal_outlet"})}}}),Ua={class:"beam_metadata_heading"},Si=C.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(i){const h=C.computed(()=>i.complete?i.completeMessage:i.progressMessage);return(o,a)=>(C.openBlock(),C.createElementBlock("p",Ua,[C.createTextVNode(C.toDisplayString(i.label)+": ",1),C.createElementVNode("span",{class:C.normalizeClass([{"beam--alert":!i.complete},"beam--normal"])},C.toDisplayString(h.value),3)]))}}),Da={},La={class:"beam_modal-confirm"};function Na(i,h){const o=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("div",La,[h[4]||(h[4]=C.createElementVNode("h2",null,"Would you like to continue?",-1)),C.createVNode(o,{onClick:h[0]||(h[0]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[2]||(h[2]=[C.createTextVNode("Yes",-1)])]),_:1}),C.createVNode(o,{onClick:h[1]||(h[1]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[3]||(h[3]=[C.createTextVNode("No",-1)])]),_:1})])}const Ci=Fe(Da,[["render",Na],["__scopeId","data-v-5b430dca"]]),Fa={},ja={class:"fixed-top"};function Wa(i,h){return C.openBlock(),C.createElementBlock("div",ja,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const ki=Fe(Fa,[["render",Wa],["__scopeId","data-v-a38a41d0"]]),Va={class:"container"},vr=Fe(C.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue");return(o,a)=>(C.openBlock(),C.createElementBlock("label",Va,[C.withDirectives(C.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>h.value=l),type:"checkbox",tabindex:"-1"},null,512),[[C.vModelCheckbox,h.value]]),a[1]||(a[1]=C.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-ad0dc7dc"]]),Qa={class:"beam_item-count"},Ka=["contenteditable"],Ha={key:0},qa={key:1},_r=Fe(C.defineComponent({__name:"ItemCount",props:C.mergeModels({denominator:{default:0},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue"),o=C.computed(()=>i.denominator!==0&&h.value===i.denominator),a=e=>{const n=Number(e.target.innerHTML)||0;h.value=i.denominator?Math.min(n,i.denominator):n},l=Aa(e=>a(e),i.debounce),r=async e=>await l(e);return(e,n)=>(C.openBlock(),C.createElementBlock("div",Qa,[C.createElementVNode("span",{contenteditable:i.editable,class:C.normalizeClass({"beam--alert":!o.value}),onClick:C.withModifiers(a,["stop","prevent"]),onInput:C.withModifiers(r,["stop","prevent"]),onPaste:a},C.toDisplayString(h.value),43,Ka),i.denominator?(C.openBlock(),C.createElementBlock("span",Ha,"/"+C.toDisplayString(i.denominator),1)):C.createCommentVNode("",!0),i.uom?(C.openBlock(),C.createElementBlock("span",qa,"  "+C.toDisplayString(i.uom),1)):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-d4f676ed"]]),$a=["href"],Ti=Fe(C.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("a",{href:i.to,class:"beam_list-anchor"},[C.renderSlot(h.$slots,"default",{},void 0,!0)],8,$a))}}),[["__scopeId","data-v-7e3ecf0d"]]),za={tabindex:"0",class:"beam_list-item"},Ga={class:"beam_list-text"},Ya={class:"beam--bold"},zt=Fe(C.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(i,{emit:h}){const o=h,a=C.ref(i.item);return C.watch(a,l=>{o("update",l)},{deep:!0}),(l,r)=>(C.openBlock(),C.createElementBlock("li",za,[C.createElementVNode("div",Ga,[C.createElementVNode("label",Ya,C.toDisplayString(a.value.label),1),C.createElementVNode("p",null,C.toDisplayString(a.value.description),1)]),a.value.count?(C.openBlock(),C.createBlock(_r,{key:0,modelValue:a.value.count.count,"onUpdate:modelValue":r[0]||(r[0]=e=>a.value.count.count=e),debounce:a.value.debounce,denominator:a.value.count.of,editable:!0,uom:a.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):C.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(C.openBlock(),C.createBlock(vr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":r[1]||(r[1]=e=>a.value.checked=e)},null,8,["modelValue"])):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Ja={class:"beam_list-view"},Ii=Fe(C.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(i,{emit:h}){const o=h;C.onMounted(()=>{window.addEventListener("scroll",l)}),C.onUnmounted(()=>{window.removeEventListener("scroll",l)});const a=r=>o("update",r),l=()=>{const r=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;r-e<=2&&o("scrollbottom")};return(r,e)=>(C.openBlock(),C.createElementBlock("ul",Ja,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.items,n=>(C.openBlock(),C.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(C.openBlock(),C.createBlock(gr,{key:0,item:n},null,8,["item"])):n.linkComponent?(C.openBlock(),C.createBlock(C.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:C.withCtx(()=>[C.createVNode(zt,{item:n,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(C.openBlock(),C.createBlock(zt,{key:2,item:n,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),Za={class:"beam_navbar"},Bi=Fe(C.defineComponent({__name:"Navbar",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,r)=>{const e=C.resolveComponent("BeamHeading"),n=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("nav",Za,[C.renderSlot(l.$slots,"title",{},()=>[C.createVNode(e,null,{default:C.withCtx(()=>[...r[0]||(r[0]=[C.createTextVNode("TITLE",-1)])]),_:1})],!0),C.createVNode(n,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"navbaraction",{},()=>[r[1]||(r[1]=C.createTextVNode("Action",-1))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function Xa(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Gt={exports:{}},el=Gt.exports,Oi;function tl(){return Oi||(Oi=1,(function(i,h){(function(o,a){i.exports=a()})(el,(function(){var o={attachTo:function(a,l){if(a.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+a);var r={onScan:function(e,n){},onScanError:function(e){},onKeyProcess:function(e,n){},onKeyDetect:function(e,n){},onPaste:function(e,n){},keyCodeMapper:function(e){return o.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1};return l=this._mergeOptions(r,l),a.scannerDetectionData={options:l,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste,l.captureEvents),l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp,l.captureEvents),(l.reactToKeydown===!0||l.scanButtonKeyCode!==!1)&&a.addEventListener("keydown",this._handleKeyDown,l.captureEvents),this},detachFrom:function(a){a.scannerDetectionData.options.reactToPaste&&a.removeEventListener("paste",this._handlePaste),a.scannerDetectionData.options.scanButtonKeyCode!==!1&&a.removeEventListener("keyup",this._handleKeyUp),a.removeEventListener("keydown",this._handleKeyDown),a.scannerDetectionData=void 0},getOptions:function(a){return a.scannerDetectionData.options},setOptions:function(a,l){switch(a.scannerDetectionData.options.reactToPaste){case!0:l.reactToPaste===!1&&a.removeEventListener("paste",this._handlePaste);break;case!1:l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste);break}switch(a.scannerDetectionData.options.scanButtonKeyCode){case!1:l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp);break;default:l.scanButtonKeyCode===!1&&a.removeEventListener("keyup",this._handleKeyUp);break}return a.scannerDetectionData.options=this._mergeOptions(a.scannerDetectionData.options,l),this._reinitialize(a),this},decodeKeyEvent:function(a){var l=this._getNormalizedKeyNum(a);switch(!0){case(l>=48&&l<=90):case(l>=106&&l<=111):if(a.key!==void 0&&a.key!=="")return a.key;var r=String.fromCharCode(l);switch(a.shiftKey){case!1:r=r.toLowerCase();break;case!0:r=r.toUpperCase();break}return r;case(l>=96&&l<=105):return 0+(l-96)}return""},simulate:function(a,l){return this._reinitialize(a),Array.isArray(l)?l.forEach(function(r){var e={};(typeof r=="object"||typeof r=="function")&&r!==null?e=r:e.keyCode=parseInt(r);var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(a,l),this},_reinitialize:function(a){var l=a.scannerDetectionData.vars;l.firstCharTime=0,l.lastCharTime=0,l.accumulatedString=""},_isFocusOnIgnoredElement:function(a){var l=a.scannerDetectionData.options.ignoreIfFocusOn;if(!l)return!1;var r=document.activeElement;if(Array.isArray(l)){for(var e=0;e<l.length;e++)if(r.matches(l[e])===!0)return!0}else if(r.matches(l))return!0;return!1},_validateScanCode:function(a,l){var r=a.scannerDetectionData,e=r.options,n=r.options.singleScanQty,t=r.vars.firstCharTime,s=r.vars.lastCharTime,u={},d;switch(!0){case l.length<e.minLength:u={message:"Receieved code is shorter then minimal length"};break;case s-t>l.length*e.avgTimeByChar:u={message:"Receieved code was not entered in time"};break;default:return e.onScan.call(a,l,n),d=new CustomEvent("scan",{detail:{scanCode:l,qty:n}}),a.dispatchEvent(d),o._reinitialize(a),!0}return u.scanCode=l,u.scanDuration=s-t,u.avgTimeByChar=e.avgTimeByChar,u.minLength=e.minLength,e.onScanError.call(a,u),d=new CustomEvent("scanError",{detail:u}),a.dispatchEvent(d),o._reinitialize(a),!1},_mergeOptions:function(a,l){var r={},e;for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(r[e]=a[e]);for(e in l)Object.prototype.hasOwnProperty.call(l,e)&&(r[e]=l[e]);return r},_getNormalizedKeyNum:function(a){return a.which||a.keyCode},_handleKeyDown:function(a){var l=o._getNormalizedKeyNum(a),r=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(r.onKeyDetect.call(this,l,a)!==!1&&!o._isFocusOnIgnoredElement(this)){if(r.scanButtonKeyCode!==!1&&l==r.scanButtonKeyCode){e.longPressed||(e.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),e.longPressed=!0);return}switch(!0){case(e.firstCharTime&&r.suffixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!0;break;case(!e.firstCharTime&&r.prefixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!1;break;default:var t=r.keyCodeMapper.call(this,a);if(t===null)return;e.accumulatedString+=t,r.preventDefault&&a.preventDefault(),r.stopPropagation&&a.stopImmediatePropagation(),n=!1;break}e.firstCharTime||(e.firstCharTime=Date.now()),e.lastCharTime=Date.now(),e.testTimer&&clearTimeout(e.testTimer),n?(o._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(o._validateScanCode,r.timeBeforeScanTest,this,e.accumulatedString),r.onKeyProcess.call(this,t,a)}},_handlePaste:function(a){var l=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,e=(event.clipboardData||window.clipboardData).getData("text");o._isFocusOnIgnoredElement(this)||(a.preventDefault(),l.stopPropagation&&a.stopImmediatePropagation(),l.onPaste.call(this,e,event),r.firstCharTime=0,r.lastCharTime=0,o._validateScanCode(this,e))},_handleKeyUp:function(a){if(!o._isFocusOnIgnoredElement(this)){var l=o._getNormalizedKeyNum(a);l==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)}},isScanInProgressFor:function(a){return a.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(a){return a.scannerDetectionData!==void 0}};return o}))})(Gt)),Gt.exports}var rl=tl();const xi=Xa(rl),nl={id:"scan_input"},Pi=C.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(i,{emit:h}){const o=h,a=i;return C.onMounted(()=>{const l=xi.attachTo(window,{onScan:a.scanHandler});o("scanInstance",l)}),C.onUnmounted(()=>{xi.detachFrom(window)}),(l,r)=>(C.openBlock(),C.createElementBlock("div",nl))}}),Ri=Fe(C.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(i){const h=C.computed(()=>i.displayInput===0?0 .toFixed(i.decimalPlaces):i.displayInput.toFixed(i.decimalPlaces)),o=a=>a?.substring(0,2)=="--"?`var(${a})`:a;return(a,l)=>(C.openBlock(),C.createElementBlock("div",{class:"segmented-display",style:C.normalizeStyle({background:o(i.displayColor)})},[C.createElementVNode("h1",{class:"segmented-display-output",style:C.normalizeStyle({color:o(i.textColor)})},C.toDisplayString(h.value),5)],4))}}),[["__scopeId","data-v-1731e036"]]),il={class:"column column-left"},ol={class:"column column-right"},Mi=Fe(C.defineComponent({__name:"SplitColumn",props:{justifyContent:{default:"space-between"},alignItems:{default:"flex-start"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:"two-column",style:C.normalizeStyle({justifyContent:i.justifyContent,alignItems:i.alignItems})},[C.createElementVNode("div",il,[C.renderSlot(h.$slots,"left",{},void 0,!0)]),C.createElementVNode("div",ol,[C.renderSlot(h.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-3f65313d"]]),Ui=Fe(C.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:C.normalizeClass(["arrow-icon",{open:i.open}])},[...o[0]||(o[0]=[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)])],2))}}),[["__scopeId","data-v-05e7abed"]]);var Er=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,al=Object.getOwnPropertyNames,ll=Object.prototype.hasOwnProperty,He=(i,h)=>()=>(i&&(h=i(i=0)),h),fe=(i,h)=>()=>(h||i((h={exports:{}}).exports,h),h.exports),Rt=(i,h)=>{for(var o in h)Er(i,o,{get:h[o],enumerable:!0})},ul=(i,h,o,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of al(h))!ll.call(i,l)&&l!==o&&Er(i,l,{get:()=>h[l],enumerable:!(a=sl(h,l))||a.enumerable});return i},Be=i=>ul(Er({},"__esModule",{value:!0}),i),oe=He(()=>{}),ke={};Rt(ke,{_debugEnd:()=>nn,_debugProcess:()=>rn,_events:()=>wn,_eventsCount:()=>vn,_exiting:()=>Vr,_fatalExceptions:()=>Xr,_getActiveHandles:()=>Vi,_getActiveRequests:()=>Wi,_kill:()=>Hr,_linkedBinding:()=>Fi,_maxListeners:()=>yn,_preload_modules:()=>mn,_rawDebug:()=>Fr,_startProfilerIdleNotifier:()=>on,_stopProfilerIdleNotifier:()=>sn,_tickCallback:()=>tn,abort:()=>cn,addListener:()=>_n,allowedNodeEnvironmentFlags:()=>Jr,arch:()=>kr,argv:()=>Br,argv0:()=>gn,assert:()=>Qi,binding:()=>Mr,chdir:()=>Lr,config:()=>Qr,cpuUsage:()=>jt,cwd:()=>Dr,debugPort:()=>pn,default:()=>On,dlopen:()=>ji,domain:()=>Wr,emit:()=>Tn,emitWarning:()=>Rr,env:()=>Ir,execArgv:()=>Or,execPath:()=>dn,exit:()=>Gr,features:()=>Zr,hasUncaughtExceptionCaptureCallback:()=>Ki,hrtime:()=>Yt,kill:()=>zr,listeners:()=>qi,memoryUsage:()=>$r,moduleLoadList:()=>jr,nextTick:()=>Li,off:()=>Sn,on:()=>rt,once:()=>En,openStdin:()=>Yr,pid:()=>hn,platform:()=>Tr,ppid:()=>fn,prependListener:()=>In,prependOnceListener:()=>Bn,reallyExit:()=>Kr,release:()=>Nr,removeAllListeners:()=>kn,removeListener:()=>Cn,resourceUsage:()=>qr,setSourceMapsEnabled:()=>An,setUncaughtExceptionCaptureCallback:()=>en,stderr:()=>ln,stdin:()=>un,stdout:()=>an,title:()=>Cr,umask:()=>Ur,uptime:()=>Hi,version:()=>xr,versions:()=>Pr});function Sr(i){throw new Error("Node.js process "+i+" is not supported by JSPM core outside of Node.js")}function cl(){!yt||!wt||(yt=!1,wt.length?Xe=wt.concat(Xe):Ft=-1,Xe.length&&Di())}function Di(){if(!yt){var i=setTimeout(cl,0);yt=!0;for(var h=Xe.length;h;){for(wt=Xe,Xe=[];++Ft<h;)wt&&wt[Ft].run();Ft=-1,h=Xe.length}wt=null,yt=!1,clearTimeout(i)}}function Li(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];Xe.push(new Ni(i,h)),Xe.length===1&&!yt&&setTimeout(Di,0)}function Ni(i,h){this.fun=i,this.array=h}function Qe(){}function Fi(i){Sr("_linkedBinding")}function ji(i){Sr("dlopen")}function Wi(){return[]}function Vi(){return[]}function Qi(i,h){if(!i)throw new Error(h||"assertion error")}function Ki(){return!1}function Hi(){return nt.now()/1e3}function Yt(i){var h=Math.floor((Date.now()-nt.now())*.001),o=nt.now()*.001,a=Math.floor(o)+h,l=Math.floor(o%1*1e9);return i&&(a=a-i[0],l=l-i[1],l<0&&(a--,l+=Jt)),[a,l]}function rt(){return On}function qi(i){return[]}var Xe,yt,wt,Ft,Cr,kr,Tr,Ir,Br,Or,xr,Pr,Rr,Mr,Ur,Dr,Lr,Nr,Fr,jr,Wr,Vr,Qr,Kr,Hr,jt,qr,$r,zr,Gr,Yr,Jr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,gn,mn,An,nt,bn,Jt,yn,wn,vn,_n,En,Sn,Cn,kn,Tn,In,Bn,On,hl=He(()=>{oe(),ae(),se(),Xe=[],yt=!1,Ft=-1,Ni.prototype.run=function(){this.fun.apply(null,this.array)},Cr="browser",kr="x64",Tr="browser",Ir={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Br=["/usr/bin/node"],Or=[],xr="v16.8.0",Pr={},Rr=function(i,h){console.warn((h?h+": ":"")+i)},Mr=function(i){Sr("binding")},Ur=function(i){return 0},Dr=function(){return"/"},Lr=function(i){},Nr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Fr=Qe,jr=[],Wr={},Vr=!1,Qr={},Kr=Qe,Hr=Qe,jt=function(){return{}},qr=jt,$r=jt,zr=Qe,Gr=Qe,Yr=Qe,Jr={},Zr={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Xr=Qe,en=Qe,tn=Qe,rn=Qe,nn=Qe,on=Qe,sn=Qe,an=void 0,ln=void 0,un=void 0,cn=Qe,hn=2,fn=1,dn="/bin/usr/node",pn=9229,gn="node",mn=[],An=Qe,nt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},nt.now===void 0&&(bn=Date.now(),nt.timing&&nt.timing.navigationStart&&(bn=nt.timing.navigationStart),nt.now=()=>Date.now()-bn),Jt=1e9,Yt.bigint=function(i){var h=Yt(i);return typeof BigInt>"u"?h[0]*Jt+h[1]:BigInt(h[0]*Jt)+BigInt(h[1])},yn=10,wn={},vn=0,_n=rt,En=rt,Sn=rt,Cn=rt,kn=rt,Tn=Qe,In=rt,Bn=rt,On={version:xr,versions:Pr,arch:kr,platform:Tr,release:Nr,_rawDebug:Fr,moduleLoadList:jr,binding:Mr,_linkedBinding:Fi,_events:wn,_eventsCount:vn,_maxListeners:yn,on:rt,addListener:_n,once:En,off:Sn,removeListener:Cn,removeAllListeners:kn,emit:Tn,prependListener:In,prependOnceListener:Bn,listeners:qi,domain:Wr,_exiting:Vr,config:Qr,dlopen:ji,uptime:Hi,_getActiveRequests:Wi,_getActiveHandles:Vi,reallyExit:Kr,_kill:Hr,cpuUsage:jt,resourceUsage:qr,memoryUsage:$r,kill:zr,exit:Gr,openStdin:Yr,allowedNodeEnvironmentFlags:Jr,assert:Qi,features:Zr,_fatalExceptions:Xr,setUncaughtExceptionCaptureCallback:en,hasUncaughtExceptionCaptureCallback:Ki,emitWarning:Rr,nextTick:Li,_tickCallback:tn,_debugProcess:rn,_debugEnd:nn,_startProfilerIdleNotifier:on,_stopProfilerIdleNotifier:sn,stdout:an,stdin:un,stderr:ln,abort:cn,umask:Ur,chdir:Lr,cwd:Dr,env:Ir,title:Cr,argv:Br,execArgv:Or,pid:hn,ppid:fn,execPath:dn,debugPort:pn,hrtime:Yt,argv0:gn,_preload_modules:mn,setSourceMapsEnabled:An}}),se=He(()=>{hl()}),We={};Rt(We,{Buffer:()=>Zt,INSPECT_MAX_BYTES:()=>$i,default:()=>it,kMaxLength:()=>zi});function fl(){if(xn)return Mt;xn=!0,Mt.byteLength=n,Mt.toByteArray=s,Mt.fromByteArray=p;for(var i=[],h=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,r=a.length;l<r;++l)i[l]=a[l],h[a.charCodeAt(l)]=l;h[45]=62,h[95]=63;function e(g){var f=g.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=f);var y=b===f?0:4-b%4;return[b,y]}function n(g){var f=e(g),b=f[0],y=f[1];return(b+y)*3/4-y}function t(g,f,b){return(f+b)*3/4-b}function s(g){var f,b=e(g),y=b[0],_=b[1],A=new o(t(g,y,_)),w=0,I=_>0?y-4:y,k;for(k=0;k<I;k+=4)f=h[g.charCodeAt(k)]<<18|h[g.charCodeAt(k+1)]<<12|h[g.charCodeAt(k+2)]<<6|h[g.charCodeAt(k+3)],A[w++]=f>>16&255,A[w++]=f>>8&255,A[w++]=f&255;return _===2&&(f=h[g.charCodeAt(k)]<<2|h[g.charCodeAt(k+1)]>>4,A[w++]=f&255),_===1&&(f=h[g.charCodeAt(k)]<<10|h[g.charCodeAt(k+1)]<<4|h[g.charCodeAt(k+2)]>>2,A[w++]=f>>8&255,A[w++]=f&255),A}function u(g){return i[g>>18&63]+i[g>>12&63]+i[g>>6&63]+i[g&63]}function d(g,f,b){for(var y,_=[],A=f;A<b;A+=3)y=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),_.push(u(y));return _.join("")}function p(g){for(var f,b=g.length,y=b%3,_=[],A=16383,w=0,I=b-y;w<I;w+=A)_.push(d(g,w,w+A>I?I:w+A));return y===1?(f=g[b-1],_.push(i[f>>2]+i[f<<4&63]+"==")):y===2&&(f=(g[b-2]<<8)+g[b-1],_.push(i[f>>10]+i[f>>4&63]+i[f<<2&63]+"=")),_.join("")}return Mt}function dl(){return Pn?Wt:(Pn=!0,Wt.read=function(i,h,o,a,l){var r,e,n=l*8-a-1,t=(1<<n)-1,s=t>>1,u=-7,d=o?l-1:0,p=o?-1:1,g=i[h+d];for(d+=p,r=g&(1<<-u)-1,g>>=-u,u+=n;u>0;r=r*256+i[h+d],d+=p,u-=8);for(e=r&(1<<-u)-1,r>>=-u,u+=a;u>0;e=e*256+i[h+d],d+=p,u-=8);if(r===0)r=1-s;else{if(r===t)return e?NaN:(g?-1:1)*(1/0);e=e+Math.pow(2,a),r=r-s}return(g?-1:1)*e*Math.pow(2,r-a)},Wt.write=function(i,h,o,a,l,r){var e,n,t,s=r*8-l-1,u=(1<<s)-1,d=u>>1,p=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:r-1,f=a?1:-1,b=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(n=isNaN(h)?1:0,e=u):(e=Math.floor(Math.log(h)/Math.LN2),h*(t=Math.pow(2,-e))<1&&(e--,t*=2),e+d>=1?h+=p/t:h+=p*Math.pow(2,1-d),h*t>=2&&(e++,t/=2),e+d>=u?(n=0,e=u):e+d>=1?(n=(h*t-1)*Math.pow(2,l),e=e+d):(n=h*Math.pow(2,d-1)*Math.pow(2,l),e=0));l>=8;i[o+g]=n&255,g+=f,n/=256,l-=8);for(e=e<<l|n,s+=l;s>0;i[o+g]=e&255,g+=f,e/=256,s-=8);i[o+g-f]|=b*128},Wt)}function pl(){if(Rn)return pt;Rn=!0;let i=fl(),h=dl(),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pt.Buffer=e,pt.SlowBuffer=_,pt.INSPECT_MAX_BYTES=50;let a=2147483647;pt.kMaxLength=a,e.TYPED_ARRAY_SUPPORT=l(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{let c=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(c,m),c.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function r(c){if(c>a)throw new RangeError('The value "'+c+'" is invalid for option "size"');let m=new Uint8Array(c);return Object.setPrototypeOf(m,e.prototype),m}function e(c,m,v){if(typeof c=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(c)}return n(c,m,v)}e.poolSize=8192;function n(c,m,v){if(typeof c=="string")return d(c,m);if(ArrayBuffer.isView(c))return g(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(L(c,ArrayBuffer)||c&&L(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(L(c,SharedArrayBuffer)||c&&L(c.buffer,SharedArrayBuffer)))return f(c,m,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let R=c.valueOf&&c.valueOf();if(R!=null&&R!==c)return e.from(R,m,v);let N=b(c);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return e.from(c[Symbol.toPrimitive]("string"),m,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}e.from=function(c,m,v){return n(c,m,v)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function t(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function s(c,m,v){return t(c),c<=0?r(c):m!==void 0?typeof v=="string"?r(c).fill(m,v):r(c).fill(m):r(c)}e.alloc=function(c,m,v){return s(c,m,v)};function u(c){return t(c),r(c<0?0:y(c)|0)}e.allocUnsafe=function(c){return u(c)},e.allocUnsafeSlow=function(c){return u(c)};function d(c,m){if((typeof m!="string"||m==="")&&(m="utf8"),!e.isEncoding(m))throw new TypeError("Unknown encoding: "+m);let v=A(c,m)|0,R=r(v),N=R.write(c,m);return N!==v&&(R=R.slice(0,N)),R}function p(c){let m=c.length<0?0:y(c.length)|0,v=r(m);for(let R=0;R<m;R+=1)v[R]=c[R]&255;return v}function g(c){if(L(c,Uint8Array)){let m=new Uint8Array(c);return f(m.buffer,m.byteOffset,m.byteLength)}return p(c)}function f(c,m,v){if(m<0||c.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<m+(v||0))throw new RangeError('"length" is outside of buffer bounds');let R;return m===void 0&&v===void 0?R=new Uint8Array(c):v===void 0?R=new Uint8Array(c,m):R=new Uint8Array(c,m,v),Object.setPrototypeOf(R,e.prototype),R}function b(c){if(e.isBuffer(c)){let m=y(c.length)|0,v=r(m);return v.length===0||c.copy(v,0,0,m),v}if(c.length!==void 0)return typeof c.length!="number"||ne(c.length)?r(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function y(c){if(c>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return c|0}function _(c){return+c!=c&&(c=0),e.alloc(+c)}e.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==e.prototype},e.compare=function(c,m){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),L(m,Uint8Array)&&(m=e.from(m,m.offset,m.byteLength)),!e.isBuffer(c)||!e.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===m)return 0;let v=c.length,R=m.length;for(let N=0,X=Math.min(v,R);N<X;++N)if(c[N]!==m[N]){v=c[N],R=m[N];break}return v<R?-1:R<v?1:0},e.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(c,m){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return e.alloc(0);let v;if(m===void 0)for(m=0,v=0;v<c.length;++v)m+=c[v].length;let R=e.allocUnsafe(m),N=0;for(v=0;v<c.length;++v){let X=c[v];if(L(X,Uint8Array))N+X.length>R.length?(e.isBuffer(X)||(X=e.from(X)),X.copy(R,N)):Uint8Array.prototype.set.call(R,X,N);else if(e.isBuffer(X))X.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=X.length}return R};function A(c,m){if(e.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||L(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let v=c.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let N=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return D(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ee(c).length;default:if(N)return R?-1:D(c).length;m=(""+m).toLowerCase(),N=!0}}e.byteLength=A;function w(c,m,v){let R=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,m>>>=0,v<=m))return"";for(c||(c="utf8");;)switch(c){case"hex":return pe(this,m,v);case"utf8":case"utf-8":return $(this,m,v);case"ascii":return me(this,m,v);case"latin1":case"binary":return le(this,m,v);case"base64":return U(this,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,m,v);default:if(R)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),R=!0}}e.prototype._isBuffer=!0;function I(c,m,v){let R=c[m];c[m]=c[v],c[v]=R}e.prototype.swap16=function(){let c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<c;m+=2)I(this,m,m+1);return this},e.prototype.swap32=function(){let c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<c;m+=4)I(this,m,m+3),I(this,m+1,m+2);return this},e.prototype.swap64=function(){let c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<c;m+=8)I(this,m,m+7),I(this,m+1,m+6),I(this,m+2,m+5),I(this,m+3,m+4);return this},e.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?$(this,0,c):w.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(c){if(!e.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:e.compare(this,c)===0},e.prototype.inspect=function(){let c="",m=pt.INSPECT_MAX_BYTES;return c=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(c+=" ... "),"<Buffer "+c+">"},o&&(e.prototype[o]=e.prototype.inspect),e.prototype.compare=function(c,m,v,R,N){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),!e.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(m===void 0&&(m=0),v===void 0&&(v=c?c.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),m<0||v>c.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&m>=v)return 0;if(R>=N)return-1;if(m>=v)return 1;if(m>>>=0,v>>>=0,R>>>=0,N>>>=0,this===c)return 0;let X=N-R,be=v-m,Ce=Math.min(X,be),je=this.slice(R,N),Pe=c.slice(m,v);for(let Ie=0;Ie<Ce;++Ie)if(je[Ie]!==Pe[Ie]){X=je[Ie],be=Pe[Ie];break}return X<be?-1:be<X?1:0};function k(c,m,v,R,N){if(c.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,ne(v)&&(v=N?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(N)return-1;v=c.length-1}else if(v<0)if(N)v=0;else return-1;if(typeof m=="string"&&(m=e.from(m,R)),e.isBuffer(m))return m.length===0?-1:E(c,m,v,R,N);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(c,m,v):Uint8Array.prototype.lastIndexOf.call(c,m,v):E(c,[m],v,R,N);throw new TypeError("val must be string, number or Buffer")}function E(c,m,v,R,N){let X=1,be=c.length,Ce=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(c.length<2||m.length<2)return-1;X=2,be/=2,Ce/=2,v/=2}function je(Ie,Ne){return X===1?Ie[Ne]:Ie.readUInt16BE(Ne*X)}let Pe;if(N){let Ie=-1;for(Pe=v;Pe<be;Pe++)if(je(c,Pe)===je(m,Ie===-1?0:Pe-Ie)){if(Ie===-1&&(Ie=Pe),Pe-Ie+1===Ce)return Ie*X}else Ie!==-1&&(Pe-=Pe-Ie),Ie=-1}else for(v+Ce>be&&(v=be-Ce),Pe=v;Pe>=0;Pe--){let Ie=!0;for(let Ne=0;Ne<Ce;Ne++)if(je(c,Pe+Ne)!==je(m,Ne)){Ie=!1;break}if(Ie)return Pe}return-1}e.prototype.includes=function(c,m,v){return this.indexOf(c,m,v)!==-1},e.prototype.indexOf=function(c,m,v){return k(this,c,m,v,!0)},e.prototype.lastIndexOf=function(c,m,v){return k(this,c,m,v,!1)};function T(c,m,v,R){v=Number(v)||0;let N=c.length-v;R?(R=Number(R),R>N&&(R=N)):R=N;let X=m.length;R>X/2&&(R=X/2);let be;for(be=0;be<R;++be){let Ce=parseInt(m.substr(be*2,2),16);if(ne(Ce))return be;c[v+be]=Ce}return be}function O(c,m,v,R){return ie(D(m,c.length-v),c,v,R)}function H(c,m,v,R){return ie(q(m),c,v,R)}function G(c,m,v,R){return ie(ee(m),c,v,R)}function de(c,m,v,R){return ie(te(m,c.length-v),c,v,R)}e.prototype.write=function(c,m,v,R){if(m===void 0)R="utf8",v=this.length,m=0;else if(v===void 0&&typeof m=="string")R=m,v=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(v)?(v=v>>>0,R===void 0&&(R="utf8")):(R=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let N=this.length-m;if((v===void 0||v>N)&&(v=N),c.length>0&&(v<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let X=!1;for(;;)switch(R){case"hex":return T(this,c,m,v);case"utf8":case"utf-8":return O(this,c,m,v);case"ascii":case"latin1":case"binary":return H(this,c,m,v);case"base64":return G(this,c,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,c,m,v);default:if(X)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(c,m,v){return m===0&&v===c.length?i.fromByteArray(c):i.fromByteArray(c.slice(m,v))}function $(c,m,v){v=Math.min(c.length,v);let R=[],N=m;for(;N<v;){let X=c[N],be=null,Ce=X>239?4:X>223?3:X>191?2:1;if(N+Ce<=v){let je,Pe,Ie,Ne;switch(Ce){case 1:X<128&&(be=X);break;case 2:je=c[N+1],(je&192)===128&&(Ne=(X&31)<<6|je&63,Ne>127&&(be=Ne));break;case 3:je=c[N+1],Pe=c[N+2],(je&192)===128&&(Pe&192)===128&&(Ne=(X&15)<<12|(je&63)<<6|Pe&63,Ne>2047&&(Ne<55296||Ne>57343)&&(be=Ne));break;case 4:je=c[N+1],Pe=c[N+2],Ie=c[N+3],(je&192)===128&&(Pe&192)===128&&(Ie&192)===128&&(Ne=(X&15)<<18|(je&63)<<12|(Pe&63)<<6|Ie&63,Ne>65535&&Ne<1114112&&(be=Ne))}}be===null?(be=65533,Ce=1):be>65535&&(be-=65536,R.push(be>>>10&1023|55296),be=56320|be&1023),R.push(be),N+=Ce}return F(R)}let z=4096;function F(c){let m=c.length;if(m<=z)return String.fromCharCode.apply(String,c);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,c.slice(R,R+=z));return v}function me(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]&127);return R}function le(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]);return R}function pe(c,m,v){let R=c.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let N="";for(let X=m;X<v;++X)N+=ge[c[X]];return N}function we(c,m,v){let R=c.slice(m,v),N="";for(let X=0;X<R.length-1;X+=2)N+=String.fromCharCode(R[X]+R[X+1]*256);return N}e.prototype.slice=function(c,m){let v=this.length;c=~~c,m=m===void 0?v:~~m,c<0?(c+=v,c<0&&(c=0)):c>v&&(c=v),m<0?(m+=v,m<0&&(m=0)):m>v&&(m=v),m<c&&(m=c);let R=this.subarray(c,m);return Object.setPrototypeOf(R,e.prototype),R};function Q(c,m,v){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+m>v)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return R},e.prototype.readUintBE=e.prototype.readUIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c+--m],N=1;for(;m>0&&(N*=256);)R+=this[c+--m]*N;return R},e.prototype.readUint8=e.prototype.readUInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]|this[c+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]<<8|this[c+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},e.prototype.readBigUInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,N=this[++c]+this[++c]*2**8+this[++c]*2**16+v*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),e.prototype.readBigUInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],N=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v;return(BigInt(R)<<BigInt(32))+BigInt(N)}),e.prototype.readIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*m)),R},e.prototype.readIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=m,N=1,X=this[c+--R];for(;R>0&&(N*=256);)X+=this[c+--R]*N;return N*=128,X>=N&&(X-=Math.pow(2,8*m)),X},e.prototype.readInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},e.prototype.readInt16LE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c]|this[c+1]<<8;return v&32768?v|4294901760:v},e.prototype.readInt16BE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c+1]|this[c]<<8;return v&32768?v|4294901760:v},e.prototype.readInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},e.prototype.readInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},e.prototype.readBigInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(v<<24);return(BigInt(R)<<BigInt(32))+BigInt(m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),e.prototype.readBigInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=(m<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(R)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v)}),e.prototype.readFloatLE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!0,23,4)},e.prototype.readFloatBE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!1,23,4)},e.prototype.readDoubleLE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!0,52,8)},e.prototype.readDoubleBE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!1,52,8)};function he(c,m,v,R,N,X){if(!e.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>N||m<X)throw new RangeError('"value" argument is out of bounds');if(v+R>c.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=1,X=0;for(this[m]=c&255;++X<v&&(N*=256);)this[m+X]=c/N&255;return m+v},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=v-1,X=1;for(this[m+N]=c&255;--N>=0&&(X*=256);)this[m+N]=c/X&255;return m+v},e.prototype.writeUint8=e.prototype.writeUInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,255,0),this[m]=c&255,m+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m+3]=c>>>24,this[m+2]=c>>>16,this[m+1]=c>>>8,this[m]=c&255,m+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4};function P(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,v}function ce(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v+7]=X,X=X>>8,c[v+6]=X,X=X>>8,c[v+5]=X,X=X>>8,c[v+4]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v+3]=be,be=be>>8,c[v+2]=be,be=be>>8,c[v+1]=be,be=be>>8,c[v]=be,v+8}e.prototype.writeBigUInt64LE=Y(function(c,m=0){return P(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Y(function(c,m=0){return ce(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=0,X=1,be=0;for(this[m]=c&255;++N<v&&(X*=256);)c<0&&be===0&&this[m+N-1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=v-1,X=1,be=0;for(this[m+N]=c&255;--N>=0&&(X*=256);)c<0&&be===0&&this[m+N+1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,127,-128),c<0&&(c=255+c+1),this[m]=c&255,m+1},e.prototype.writeInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),this[m]=c&255,this[m+1]=c>>>8,this[m+2]=c>>>16,this[m+3]=c>>>24,m+4},e.prototype.writeInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4},e.prototype.writeBigInt64LE=Y(function(c,m=0){return P(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Y(function(c,m=0){return ce(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(c,m,v,R,N,X){if(v+R>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function J(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,4),h.write(c,m,v,R,23,4),v+4}e.prototype.writeFloatLE=function(c,m,v){return J(this,c,m,!0,v)},e.prototype.writeFloatBE=function(c,m,v){return J(this,c,m,!1,v)};function _e(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,8),h.write(c,m,v,R,52,8),v+8}e.prototype.writeDoubleLE=function(c,m,v){return _e(this,c,m,!0,v)},e.prototype.writeDoubleBE=function(c,m,v){return _e(this,c,m,!1,v)},e.prototype.copy=function(c,m,v,R){if(!e.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),!R&&R!==0&&(R=this.length),m>=c.length&&(m=c.length),m||(m=0),R>0&&R<v&&(R=v),R===v||c.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),c.length-m<R-v&&(R=c.length-m+v);let N=R-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,v,R):Uint8Array.prototype.set.call(c,this.subarray(v,R),m),N},e.prototype.fill=function(c,m,v,R){if(typeof c=="string"){if(typeof m=="string"?(R=m,m=0,v=this.length):typeof v=="string"&&(R=v,v=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!e.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(c.length===1){let X=c.charCodeAt(0);(R==="utf8"&&X<128||R==="latin1")&&(c=X)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(m<0||this.length<m||this.length<v)throw new RangeError("Out of range index");if(v<=m)return this;m=m>>>0,v=v===void 0?this.length:v>>>0,c||(c=0);let N;if(typeof c=="number")for(N=m;N<v;++N)this[N]=c;else{let X=e.isBuffer(c)?c:e.from(c,R),be=X.length;if(be===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(N=0;N<v-m;++N)this[N+m]=X[N%be]}return this};let K={};function M(c,m,v){K[c]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}M("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),M("ERR_INVALID_ARG_TYPE",function(c,m){return`The "${c}" argument must be of type number. Received type ${typeof m}`},TypeError),M("ERR_OUT_OF_RANGE",function(c,m,v){let R=`The value of "${c}" is out of range.`,N=v;return Number.isInteger(v)&&Math.abs(v)>2**32?N=Z(String(v)):typeof v=="bigint"&&(N=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(N=Z(N)),N+="n"),R+=` It must be ${m}. Received ${N}`,R},RangeError);function Z(c){let m="",v=c.length,R=c[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${c.slice(v-3,v)}${m}`;return`${c.slice(0,v)}${m}`}function V(c,m,v){W(m,"offset"),(c[m]===void 0||c[m+v]===void 0)&&ue(m,c.length-(v+1))}function j(c,m,v,R,N,X){if(c>v||c<m){let be=typeof m=="bigint"?"n":"",Ce;throw m===0||m===BigInt(0)?Ce=`>= 0${be} and < 2${be} ** ${(X+1)*8}${be}`:Ce=`>= -(2${be} ** ${(X+1)*8-1}${be}) and < 2 ** ${(X+1)*8-1}${be}`,new K.ERR_OUT_OF_RANGE("value",Ce,c)}V(R,N,X)}function W(c,m){if(typeof c!="number")throw new K.ERR_INVALID_ARG_TYPE(m,"number",c)}function ue(c,m,v){throw Math.floor(c)!==c?(W(c,v),new K.ERR_OUT_OF_RANGE("offset","an integer",c)):m<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,c)}let re=/[^+/0-9A-Za-z-_]/g;function x(c){if(c=c.split("=")[0],c=c.trim().replace(re,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function D(c,m){m=m||1/0;let v,R=c.length,N=null,X=[];for(let be=0;be<R;++be){if(v=c.charCodeAt(be),v>55295&&v<57344){if(!N){if(v>56319){(m-=3)>-1&&X.push(239,191,189);continue}else if(be+1===R){(m-=3)>-1&&X.push(239,191,189);continue}N=v;continue}if(v<56320){(m-=3)>-1&&X.push(239,191,189),N=v;continue}v=(N-55296<<10|v-56320)+65536}else N&&(m-=3)>-1&&X.push(239,191,189);if(N=null,v<128){if((m-=1)<0)break;X.push(v)}else if(v<2048){if((m-=2)<0)break;X.push(v>>6|192,v&63|128)}else if(v<65536){if((m-=3)<0)break;X.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((m-=4)<0)break;X.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return X}function q(c){let m=[];for(let v=0;v<c.length;++v)m.push(c.charCodeAt(v)&255);return m}function te(c,m){let v,R,N,X=[];for(let be=0;be<c.length&&!((m-=2)<0);++be)v=c.charCodeAt(be),R=v>>8,N=v%256,X.push(N),X.push(R);return X}function ee(c){return i.toByteArray(x(c))}function ie(c,m,v,R){let N;for(N=0;N<R&&!(N+v>=m.length||N>=c.length);++N)m[N+v]=c[N];return N}function L(c,m){return c instanceof m||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===m.name}function ne(c){return c!==c}let ge=(function(){let c="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){let R=v*16;for(let N=0;N<16;++N)m[R+N]=c[v]+c[N]}return m})();function Y(c){return typeof BigInt>"u"?Se:c}function Se(){throw new Error("BigInt not supported")}return pt}var Mt,xn,Wt,Pn,pt,Rn,it,Zt,$i,zi,Ve=He(()=>{oe(),ae(),se(),Mt={},xn=!1,Wt={},Pn=!1,pt={},Rn=!1,it=pl(),it.Buffer,it.SlowBuffer,it.INSPECT_MAX_BYTES,it.kMaxLength,Zt=it.Buffer,$i=it.INSPECT_MAX_BYTES,zi=it.kMaxLength}),ae=He(()=>{Ve()}),gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(o){this.aliasToTopic={},this.max=o}put(o,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=o,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(o){return this.aliasToTopic[o]}clear(){this.aliasToTopic={}}};i.default=h}),Ue=fe((i,h)=>{oe(),ae(),se();var o=class extends Error{constructor(a){if(!Array.isArray(a))throw new TypeError(`Expected input to be an Array, got ${typeof a}`);let l="";for(let r=0;r<a.length;r++)l+=` ${a[r].stack}
3
- `;super(l),this.name="AggregateError",this.errors=a}};h.exports={AggregateError:o,ArrayIsArray(a){return Array.isArray(a)},ArrayPrototypeIncludes(a,l){return a.includes(l)},ArrayPrototypeIndexOf(a,l){return a.indexOf(l)},ArrayPrototypeJoin(a,l){return a.join(l)},ArrayPrototypeMap(a,l){return a.map(l)},ArrayPrototypePop(a,l){return a.pop(l)},ArrayPrototypePush(a,l){return a.push(l)},ArrayPrototypeSlice(a,l,r){return a.slice(l,r)},Error,FunctionPrototypeCall(a,l,...r){return a.call(l,...r)},FunctionPrototypeSymbolHasInstance(a,l){return Function.prototype[Symbol.hasInstance].call(a,l)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(a,l){return Object.defineProperties(a,l)},ObjectDefineProperty(a,l,r){return Object.defineProperty(a,l,r)},ObjectGetOwnPropertyDescriptor(a,l){return Object.getOwnPropertyDescriptor(a,l)},ObjectKeys(a){return Object.keys(a)},ObjectSetPrototypeOf(a,l){return Object.setPrototypeOf(a,l)},Promise,PromisePrototypeCatch(a,l){return a.catch(l)},PromisePrototypeThen(a,l,r){return a.then(l,r)},PromiseReject(a){return Promise.reject(a)},PromiseResolve(a){return Promise.resolve(a)},ReflectApply:Reflect.apply,RegExpPrototypeTest(a,l){return a.test(l)},SafeSet:Set,String,StringPrototypeSlice(a,l,r){return a.slice(l,r)},StringPrototypeToLowerCase(a){return a.toLowerCase()},StringPrototypeToUpperCase(a){return a.toUpperCase()},StringPrototypeTrim(a){return a.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(a,l,r){return a.set(l,r)},Boolean,Uint8Array}}),Gi=fe((i,h)=>{oe(),ae(),se(),h.exports={format(o,...a){return o.replace(/%([sdifj])/g,function(...[l,r]){let e=a.shift();return r==="f"?e.toFixed(6):r==="j"?JSON.stringify(e):r==="s"&&typeof e=="object"?`${e.constructor!==Object?e.constructor.name:""} {}`.trim():e.toString()})},inspect(o){switch(typeof o){case"string":if(o.includes("'"))if(o.includes('"')){if(!o.includes("`")&&!o.includes("${"))return`\`${o}\``}else return`"${o}"`;return`'${o}'`;case"number":return isNaN(o)?"NaN":Object.is(o,-0)?String(o):o;case"bigint":return`${String(o)}n`;case"boolean":case"undefined":return String(o);case"object":return"{}"}}}}),qe=fe((i,h)=>{oe(),ae(),se();var{format:o,inspect:a}=Gi(),{AggregateError:l}=Ue(),r=globalThis.AggregateError||l,e=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],t=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",u={};function d(A,w){if(!A)throw new u.ERR_INTERNAL_ASSERTION(w)}function p(A){let w="",I=A.length,k=A[0]==="-"?1:0;for(;I>=k+4;I-=3)w=`_${A.slice(I-3,I)}${w}`;return`${A.slice(0,I)}${w}`}function g(A,w,I){if(typeof w=="function")return d(w.length<=I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${w.length}).`),w(...I);let k=(w.match(/%[dfijoOs]/g)||[]).length;return d(k===I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${k}).`),I.length===0?w:o(w,...I)}function f(A,w,I){I||(I=Error);class k extends I{constructor(...T){super(g(A,w,T))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(k.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),k.prototype.code=A,k.prototype[e]=!0,u[A]=k}function b(A){let w=s+A.name;return Object.defineProperty(A,"name",{value:w}),A}function y(A,w){if(A&&w&&A!==w){if(Array.isArray(w.errors))return w.errors.push(A),w;let I=new r([w,A],w.message);return I.code=w.code,I}return A||w}var _=class extends Error{constructor(A="The operation was aborted",w=void 0){if(w!==void 0&&typeof w!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",w);super(A,w),this.code="ABORT_ERR",this.name="AbortError"}};f("ERR_ASSERTION","%s",Error),f("ERR_INVALID_ARG_TYPE",(A,w,I)=>{d(typeof A=="string","'name' must be a string"),Array.isArray(w)||(w=[w]);let k="The ";A.endsWith(" argument")?k+=`${A} `:k+=`"${A}" ${A.includes(".")?"property":"argument"} `,k+="must be ";let E=[],T=[],O=[];for(let G of w)d(typeof G=="string","All expected entries have to be of type string"),n.includes(G)?E.push(G.toLowerCase()):t.test(G)?T.push(G):(d(G!=="object",'The value "object" should be written as "Object"'),O.push(G));if(T.length>0){let G=E.indexOf("object");G!==-1&&(E.splice(E,G,1),T.push("Object"))}if(E.length>0){switch(E.length){case 1:k+=`of type ${E[0]}`;break;case 2:k+=`one of type ${E[0]} or ${E[1]}`;break;default:{let G=E.pop();k+=`one of type ${E.join(", ")}, or ${G}`}}(T.length>0||O.length>0)&&(k+=" or ")}if(T.length>0){switch(T.length){case 1:k+=`an instance of ${T[0]}`;break;case 2:k+=`an instance of ${T[0]} or ${T[1]}`;break;default:{let G=T.pop();k+=`an instance of ${T.join(", ")}, or ${G}`}}O.length>0&&(k+=" or ")}switch(O.length){case 0:break;case 1:O[0].toLowerCase()!==O[0]&&(k+="an "),k+=`${O[0]}`;break;case 2:k+=`one of ${O[0]} or ${O[1]}`;break;default:{let G=O.pop();k+=`one of ${O.join(", ")}, or ${G}`}}if(I==null)k+=`. Received ${I}`;else if(typeof I=="function"&&I.name)k+=`. Received function ${I.name}`;else if(typeof I=="object"){var H;if((H=I.constructor)!==null&&H!==void 0&&H.name)k+=`. Received an instance of ${I.constructor.name}`;else{let G=a(I,{depth:-1});k+=`. Received ${G}`}}else{let G=a(I,{colors:!1});G.length>25&&(G=`${G.slice(0,25)}...`),k+=`. Received type ${typeof I} (${G})`}return k},TypeError),f("ERR_INVALID_ARG_VALUE",(A,w,I="is invalid")=>{let k=a(w);return k.length>128&&(k=k.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${I}. Received ${k}`},TypeError),f("ERR_INVALID_RETURN_VALUE",(A,w,I)=>{var k;let E=I!=null&&(k=I.constructor)!==null&&k!==void 0&&k.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${A} to be returned from the "${w}" function but got ${E}.`},TypeError),f("ERR_MISSING_ARGS",(...A)=>{d(A.length>0,"At least one arg needs to be specified");let w,I=A.length;switch(A=(Array.isArray(A)?A:[A]).map(k=>`"${k}"`).join(" or "),I){case 1:w+=`The ${A[0]} argument`;break;case 2:w+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let k=A.pop();w+=`The ${A.join(", ")}, and ${k} arguments`}break}return`${w} must be specified`},TypeError),f("ERR_OUT_OF_RANGE",(A,w,I)=>{d(w,'Missing "range" argument');let k;if(Number.isInteger(I)&&Math.abs(I)>2**32)k=p(String(I));else if(typeof I=="bigint"){k=String(I);let E=BigInt(2)**BigInt(32);(I>E||I<-E)&&(k=p(k)),k+="n"}else k=a(I);return`The value of "${A}" is out of range. It must be ${w}. Received ${k}`},RangeError),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),f("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),f("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),f("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),f("ERR_STREAM_WRITE_AFTER_END","write after end",Error),f("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),h.exports={AbortError:_,aggregateTwoErrors:b(y),hideStackFrames:b,codes:u}}),Vt=fe((i,h)=>{oe(),ae(),se();var{AbortController:o,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;h.exports=o,h.exports.AbortSignal=a,h.exports.default=o});function Oe(){Oe.init.call(this)}function Xt(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}function Yi(i){return i._maxListeners===void 0?Oe.defaultMaxListeners:i._maxListeners}function Ji(i,h,o,a){var l,r,e,n;if(Xt(o),(r=i._events)===void 0?(r=i._events=Object.create(null),i._eventsCount=0):(r.newListener!==void 0&&(i.emit("newListener",h,o.listener?o.listener:o),r=i._events),e=r[h]),e===void 0)e=r[h]=o,++i._eventsCount;else if(typeof e=="function"?e=r[h]=a?[o,e]:[e,o]:a?e.unshift(o):e.push(o),(l=Yi(i))>0&&e.length>l&&!e.warned){e.warned=!0;var t=new Error("Possible EventEmitter memory leak detected. "+e.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");t.name="MaxListenersExceededWarning",t.emitter=i,t.type=h,t.count=e.length,n=t,console&&console.warn&&console.warn(n)}return i}function ml(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Zi(i,h,o){var a={fired:!1,wrapFn:void 0,target:i,type:h,listener:o},l=ml.bind(a);return l.listener=o,a.wrapFn=l,l}function Xi(i,h,o){var a=i._events;if(a===void 0)return[];var l=a[h];return l===void 0?[]:typeof l=="function"?o?[l.listener||l]:[l]:o?(function(r){for(var e=new Array(r.length),n=0;n<e.length;++n)e[n]=r[n].listener||r[n];return e})(l):to(l,l.length)}function eo(i){var h=this._events;if(h!==void 0){var o=h[i];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}function to(i,h){for(var o=new Array(h),a=0;a<h;++a)o[a]=i[a];return o}var ro,no,vt,Mn,Un,Dn,ze,io=He(()=>{oe(),ae(),se(),vt=typeof Reflect=="object"?Reflect:null,Mn=vt&&typeof vt.apply=="function"?vt.apply:function(i,h,o){return Function.prototype.apply.call(i,h,o)},no=vt&&typeof vt.ownKeys=="function"?vt.ownKeys:Object.getOwnPropertySymbols?function(i){return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i))}:function(i){return Object.getOwnPropertyNames(i)},Un=Number.isNaN||function(i){return i!=i},ro=Oe,Oe.EventEmitter=Oe,Oe.prototype._events=void 0,Oe.prototype._eventsCount=0,Oe.prototype._maxListeners=void 0,Dn=10,Object.defineProperty(Oe,"defaultMaxListeners",{enumerable:!0,get:function(){return Dn},set:function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Dn=i}}),Oe.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Oe.prototype.setMaxListeners=function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+i+".");return this._maxListeners=i,this},Oe.prototype.getMaxListeners=function(){return Yi(this)},Oe.prototype.emit=function(i){for(var h=[],o=1;o<arguments.length;o++)h.push(arguments[o]);var a=i==="error",l=this._events;if(l!==void 0)a=a&&l.error===void 0;else if(!a)return!1;if(a){var r;if(h.length>0&&(r=h[0]),r instanceof Error)throw r;var e=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw e.context=r,e}var n=l[i];if(n===void 0)return!1;if(typeof n=="function")Mn(n,this,h);else{var t=n.length,s=to(n,t);for(o=0;o<t;++o)Mn(s[o],this,h)}return!0},Oe.prototype.addListener=function(i,h){return Ji(this,i,h,!1)},Oe.prototype.on=Oe.prototype.addListener,Oe.prototype.prependListener=function(i,h){return Ji(this,i,h,!0)},Oe.prototype.once=function(i,h){return Xt(h),this.on(i,Zi(this,i,h)),this},Oe.prototype.prependOnceListener=function(i,h){return Xt(h),this.prependListener(i,Zi(this,i,h)),this},Oe.prototype.removeListener=function(i,h){var o,a,l,r,e;if(Xt(h),(a=this._events)===void 0)return this;if((o=a[i])===void 0)return this;if(o===h||o.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete a[i],a.removeListener&&this.emit("removeListener",i,o.listener||h));else if(typeof o!="function"){for(l=-1,r=o.length-1;r>=0;r--)if(o[r]===h||o[r].listener===h){e=o[r].listener,l=r;break}if(l<0)return this;l===0?o.shift():(function(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()})(o,l),o.length===1&&(a[i]=o[0]),a.removeListener!==void 0&&this.emit("removeListener",i,e||h)}return this},Oe.prototype.off=Oe.prototype.removeListener,Oe.prototype.removeAllListeners=function(i){var h,o,a;if((o=this._events)===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[i]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete o[i]),this;if(arguments.length===0){var l,r=Object.keys(o);for(a=0;a<r.length;++a)(l=r[a])!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(h=o[i])=="function")this.removeListener(i,h);else if(h!==void 0)for(a=h.length-1;a>=0;a--)this.removeListener(i,h[a]);return this},Oe.prototype.listeners=function(i){return Xi(this,i,!0)},Oe.prototype.rawListeners=function(i){return Xi(this,i,!1)},Oe.listenerCount=function(i,h){return typeof i.listenerCount=="function"?i.listenerCount(h):eo.call(i,h)},Oe.prototype.listenerCount=eo,Oe.prototype.eventNames=function(){return this._eventsCount>0?no(this._events):[]},ze=ro,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount}),gt={};Rt(gt,{EventEmitter:()=>oo,default:()=>ze,defaultMaxListeners:()=>so,init:()=>ao,listenerCount:()=>lo,on:()=>uo,once:()=>co});var oo,so,ao,lo,uo,co,_t=He(()=>{oe(),ae(),se(),io(),io(),ze.once=function(i,h){return new Promise((o,a)=>{function l(...e){r!==void 0&&i.removeListener("error",r),o(e)}let r;h!=="error"&&(r=e=>{i.removeListener(name,l),a(e)},i.once("error",r)),i.once(h,l)})},ze.on=function(i,h){let o=[],a=[],l=null,r=!1,e={async next(){let s=o.shift();if(s)return createIterResult(s,!1);if(l){let u=Promise.reject(l);return l=null,u}return r?createIterResult(void 0,!0):new Promise((u,d)=>a.push({resolve:u,reject:d}))},async return(){i.removeListener(h,n),i.removeListener("error",t),r=!0;for(let s of a)s.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(s){l=s,i.removeListener(h,n),i.removeListener("error",t)},[Symbol.asyncIterator](){return this}};return i.on(h,n),i.on("error",t),e;function n(...s){let u=a.shift();u?u.resolve(createIterResult(s,!1)):o.push(s)}function t(s){r=!0;let u=a.shift();u?u.reject(s):l=s,e.return()}},{EventEmitter:oo,defaultMaxListeners:so,init:ao,listenerCount:lo,on:uo,once:co}=ze}),$e=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),{format:a,inspect:l}=Gi(),{codes:{ERR_INVALID_ARG_TYPE:r}}=qe(),{kResistStopPropagation:e,AggregateError:n,SymbolDispose:t}=Ue(),s=globalThis.AbortSignal||Vt().AbortSignal,u=globalThis.AbortController||Vt().AbortController,d=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||o.Blob,g=typeof p<"u"?function(y){return y instanceof p}:function(y){return!1},f=(y,_)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new r(_,"AbortSignal",y)},b=(y,_)=>{if(typeof y!="function")throw new r(_,"Function",y)};h.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(y){let _=!1;return function(...A){_||(_=!0,y.apply(this,A))}},createDeferredPromise:function(){let y,_;return{promise:new Promise((A,w)=>{y=A,_=w}),resolve:y,reject:_}},promisify(y){return new Promise((_,A)=>{y((w,...I)=>w?A(w):_(...I))})},debuglog(){return function(){}},format:a,inspect:l,types:{isAsyncFunction(y){return y instanceof d},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:g,deprecate(y,_){return y},addAbortListener:(_t(),Be(gt)).addAbortListener||function(y,_){if(y===void 0)throw new r("signal","AbortSignal",y);f(y,"signal"),b(_,"listener");let A;return y.aborted?queueMicrotask(()=>_()):(y.addEventListener("abort",_,{__proto__:null,once:!0,[e]:!0}),A=()=>{y.removeEventListener("abort",_)}),{__proto__:null,[t](){var w;(w=A)===null||w===void 0||w()}}},AbortSignalAny:s.any||function(y){if(y.length===1)return y[0];let _=new u,A=()=>_.abort();return y.forEach(w=>{f(w,"signals"),w.addEventListener("abort",A,{once:!0})}),_.signal.addEventListener("abort",()=>{y.forEach(w=>w.removeEventListener("abort",A))},{once:!0}),_.signal}},h.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Qt=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ArrayPrototypeIncludes:a,ArrayPrototypeJoin:l,ArrayPrototypeMap:r,NumberIsInteger:e,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:t,NumberMIN_SAFE_INTEGER:s,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:p,String:g,StringPrototypeToUpperCase:f,StringPrototypeTrim:b}=Ue(),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:I,ERR_UNKNOWN_SIGNAL:k}}=qe(),{normalizeEncoding:E}=$e(),{isAsyncFunction:T,isArrayBufferView:O}=$e().types,H={};function G(L){return L===(L|0)}function de(L){return L===L>>>0}var U=/^[0-7]+$/,$="must be a 32-bit unsigned integer or an octal string";function z(L,ne,ge){if(typeof L>"u"&&(L=ge),typeof L=="string"){if(p(U,L)===null)throw new w(ne,L,$);L=u(L,8)}return le(L,ne),L}var F=y((L,ne,ge=s,Y=t)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),me=y((L,ne,ge=-2147483648,Y=2147483647)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),le=y((L,ne,ge=!1)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);let Y=ge?1:0,Se=4294967295;if(L<Y||L>Se)throw new I(ne,`>= ${Y} && <= ${Se}`,L)});function pe(L,ne){if(typeof L!="string")throw new A(ne,"string",L)}function we(L,ne,ge=void 0,Y){if(typeof L!="number")throw new A(ne,"number",L);if(ge!=null&&L<ge||Y!=null&&L>Y||(ge!=null||Y!=null)&&n(L))throw new I(ne,`${ge!=null?`>= ${ge}`:""}${ge!=null&&Y!=null?" && ":""}${Y!=null?`<= ${Y}`:""}`,L)}var Q=y((L,ne,ge)=>{if(!a(ge,L)){let Y="must be one of: "+l(r(ge,Se=>typeof Se=="string"?`'${Se}'`:g(Se)),", ");throw new w(ne,L,Y)}});function he(L,ne){if(typeof L!="boolean")throw new A(ne,"boolean",L)}function P(L,ne,ge){return L==null||!d(L,ne)?ge:L[ne]}var ce=y((L,ne,ge=null)=>{let Y=P(ge,"allowArray",!1),Se=P(ge,"allowFunction",!1);if(!P(ge,"nullable",!1)&&L===null||!Y&&o(L)||typeof L!="object"&&(!Se||typeof L!="function"))throw new A(ne,"Object",L)}),ye=y((L,ne)=>{if(L!=null&&typeof L!="object"&&typeof L!="function")throw new A(ne,"a dictionary",L)}),J=y((L,ne,ge=0)=>{if(!o(L))throw new A(ne,"Array",L);if(L.length<ge){let Y=`must be longer than ${ge}`;throw new w(ne,L,Y)}});function _e(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)pe(L[ge],`${ne}[${ge}]`)}function K(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)he(L[ge],`${ne}[${ge}]`)}function M(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++){let Y=L[ge],Se=`${ne}[${ge}]`;if(Y==null)throw new A(Se,"AbortSignal",Y);ue(Y,Se)}}function Z(L,ne="signal"){if(pe(L,ne),H[L]===void 0)throw H[f(L)]!==void 0?new k(L+" (signals must use all capital letters)"):new k(L)}var V=y((L,ne="buffer")=>{if(!O(L))throw new A(ne,["Buffer","TypedArray","DataView"],L)});function j(L,ne){let ge=E(ne),Y=L.length;if(ge==="hex"&&Y%2!==0)throw new w("encoding",ne,`is invalid for data of length ${Y}`)}function W(L,ne="Port",ge=!0){if(typeof L!="number"&&typeof L!="string"||typeof L=="string"&&b(L).length===0||+L!==+L>>>0||L>65535||L===0&&!ge)throw new _(ne,L,ge);return L|0}var ue=y((L,ne)=>{if(L!==void 0&&(L===null||typeof L!="object"||!("aborted"in L)))throw new A(ne,"AbortSignal",L)}),re=y((L,ne)=>{if(typeof L!="function")throw new A(ne,"Function",L)}),x=y((L,ne)=>{if(typeof L!="function"||T(L))throw new A(ne,"Function",L)}),D=y((L,ne)=>{if(L!==void 0)throw new A(ne,"undefined",L)});function q(L,ne,ge){if(!a(ge,L))throw new A(ne,`('${l(ge,"|")}')`,L)}var te=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ee(L,ne){if(typeof L>"u"||!p(te,L))throw new w(ne,L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ie(L){if(typeof L=="string")return ee(L,"hints"),L;if(o(L)){let ne=L.length,ge="";if(ne===0)return ge;for(let Y=0;Y<ne;Y++){let Se=L[Y];ee(Se,"hints"),ge+=Se,Y!==ne-1&&(ge+=", ")}return ge}throw new w("hints",L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}h.exports={isInt32:G,isUint32:de,parseFileMode:z,validateArray:J,validateStringArray:_e,validateBooleanArray:K,validateAbortSignalArray:M,validateBoolean:he,validateBuffer:V,validateDictionary:ye,validateEncoding:j,validateFunction:re,validateInt32:me,validateInteger:F,validateNumber:we,validateObject:ce,validateOneOf:Q,validatePlainFunction:x,validatePort:W,validateSignalName:Z,validateString:pe,validateUint32:le,validateUndefined:D,validateUnion:q,validateAbortSignal:ue,validateLinkHeaderValue:ie}}),Et=fe((i,h)=>{oe(),ae(),se();var o=h.exports={},a,l;function r(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=r}catch{a=r}try{typeof clearTimeout=="function"?l=clearTimeout:l=e}catch{l=e}})();function n(_){if(a===setTimeout)return setTimeout(_,0);if((a===r||!a)&&setTimeout)return a=setTimeout,setTimeout(_,0);try{return a(_,0)}catch{try{return a.call(null,_,0)}catch{return a.call(this,_,0)}}}function t(_){if(l===clearTimeout)return clearTimeout(_);if((l===e||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(_);try{return l(_)}catch{try{return l.call(null,_)}catch{return l.call(this,_)}}}var s=[],u=!1,d,p=-1;function g(){!u||!d||(u=!1,d.length?s=d.concat(s):p=-1,s.length&&f())}function f(){if(!u){var _=n(g);u=!0;for(var A=s.length;A;){for(d=s,s=[];++p<A;)d&&d[p].run();p=-1,A=s.length}d=null,u=!1,t(_)}}o.nextTick=function(_){var A=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)A[w-1]=arguments[w];s.push(new b(_,A)),s.length===1&&!u&&n(f)};function b(_,A){this.fun=_,this.array=A}b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function y(){}o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(_){return[]},o.binding=function(_){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(_){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}}),ot=fe((i,h)=>{oe(),ae(),se();var{SymbolAsyncIterator:o,SymbolIterator:a,SymbolFor:l}=Ue(),r=l("nodejs.stream.destroyed"),e=l("nodejs.stream.errored"),n=l("nodejs.stream.readable"),t=l("nodejs.stream.writable"),s=l("nodejs.stream.disturbed"),u=l("nodejs.webstream.isClosedPromise"),d=l("nodejs.webstream.controllerErrorFunction");function p(P,ce=!1){var ye;return!!(P&&typeof P.pipe=="function"&&typeof P.on=="function"&&(!ce||typeof P.pause=="function"&&typeof P.resume=="function")&&(!P._writableState||((ye=P._readableState)===null||ye===void 0?void 0:ye.readable)!==!1)&&(!P._writableState||P._readableState))}function g(P){var ce;return!!(P&&typeof P.write=="function"&&typeof P.on=="function"&&(!P._readableState||((ce=P._writableState)===null||ce===void 0?void 0:ce.writable)!==!1))}function f(P){return!!(P&&typeof P.pipe=="function"&&P._readableState&&typeof P.on=="function"&&typeof P.write=="function")}function b(P){return P&&(P._readableState||P._writableState||typeof P.write=="function"&&typeof P.on=="function"||typeof P.pipe=="function"&&typeof P.on=="function")}function y(P){return!!(P&&!b(P)&&typeof P.pipeThrough=="function"&&typeof P.getReader=="function"&&typeof P.cancel=="function")}function _(P){return!!(P&&!b(P)&&typeof P.getWriter=="function"&&typeof P.abort=="function")}function A(P){return!!(P&&!b(P)&&typeof P.readable=="object"&&typeof P.writable=="object")}function w(P){return y(P)||_(P)||A(P)}function I(P,ce){return P==null?!1:ce===!0?typeof P[o]=="function":ce===!1?typeof P[a]=="function":typeof P[o]=="function"||typeof P[a]=="function"}function k(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!!(P.destroyed||P[r]||J!=null&&J.destroyed)}function E(P){if(!g(P))return null;if(P.writableEnded===!0)return!0;let ce=P._writableState;return ce!=null&&ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function T(P,ce){if(!g(P))return null;if(P.writableFinished===!0)return!0;let ye=P._writableState;return ye!=null&&ye.errored?!1:typeof ye?.finished!="boolean"?null:!!(ye.finished||ce===!1&&ye.ended===!0&&ye.length===0)}function O(P){if(!p(P))return null;if(P.readableEnded===!0)return!0;let ce=P._readableState;return!ce||ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function H(P,ce){if(!p(P))return null;let ye=P._readableState;return ye!=null&&ye.errored?!1:typeof ye?.endEmitted!="boolean"?null:!!(ye.endEmitted||ce===!1&&ye.ended===!0&&ye.length===0)}function G(P){return P&&P[n]!=null?P[n]:typeof P?.readable!="boolean"?null:k(P)?!1:p(P)&&P.readable&&!H(P)}function de(P){return P&&P[t]!=null?P[t]:typeof P?.writable!="boolean"?null:k(P)?!1:g(P)&&P.writable&&!E(P)}function U(P,ce){return b(P)?k(P)?!0:!(ce?.readable!==!1&&G(P)||ce?.writable!==!1&&de(P)):null}function $(P){var ce,ye;return b(P)?P.writableErrored?P.writableErrored:(ce=(ye=P._writableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function z(P){var ce,ye;return b(P)?P.readableErrored?P.readableErrored:(ce=(ye=P._readableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function F(P){if(!b(P))return null;if(typeof P.closed=="boolean")return P.closed;let ce=P._writableState,ye=P._readableState;return typeof ce?.closed=="boolean"||typeof ye?.closed=="boolean"?ce?.closed||ye?.closed:typeof P._closed=="boolean"&&me(P)?P._closed:null}function me(P){return typeof P._closed=="boolean"&&typeof P._defaultKeepAlive=="boolean"&&typeof P._removedConnection=="boolean"&&typeof P._removedContLen=="boolean"}function le(P){return typeof P._sent100=="boolean"&&me(P)}function pe(P){var ce;return typeof P._consuming=="boolean"&&typeof P._dumped=="boolean"&&((ce=P.req)===null||ce===void 0?void 0:ce.upgradeOrConnect)===void 0}function we(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!J&&le(P)||!!(J&&J.autoDestroy&&J.emitClose&&J.closed===!1)}function Q(P){var ce;return!!(P&&((ce=P[s])!==null&&ce!==void 0?ce:P.readableDidRead||P.readableAborted))}function he(P){var ce,ye,J,_e,K,M,Z,V,j,W;return!!(P&&((ce=(ye=(J=(_e=(K=(M=P[e])!==null&&M!==void 0?M:P.readableErrored)!==null&&K!==void 0?K:P.writableErrored)!==null&&_e!==void 0?_e:(Z=P._readableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&J!==void 0?J:(V=P._writableState)===null||V===void 0?void 0:V.errorEmitted)!==null&&ye!==void 0?ye:(j=P._readableState)===null||j===void 0?void 0:j.errored)!==null&&ce!==void 0?ce:!((W=P._writableState)===null||W===void 0)&&W.errored))}h.exports={isDestroyed:k,kIsDestroyed:r,isDisturbed:Q,kIsDisturbed:s,isErrored:he,kIsErrored:e,isReadable:G,kIsReadable:n,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:t,isClosed:F,isDuplexNodeStream:f,isFinished:U,isIterable:I,isReadableNodeStream:p,isReadableStream:y,isReadableEnded:O,isReadableFinished:H,isReadableErrored:z,isNodeStream:b,isWebStream:w,isWritable:de,isWritableNodeStream:g,isWritableStream:_,isWritableEnded:E,isWritableFinished:T,isWritableErrored:$,isServerRequest:pe,isServerResponse:le,willEmitClose:we,isTransformStream:A}}),mt=fe((i,h)=>{oe(),ae(),se();var o=Et(),{AbortError:a,codes:l}=qe(),{ERR_INVALID_ARG_TYPE:r,ERR_STREAM_PREMATURE_CLOSE:e}=l,{kEmptyObject:n,once:t}=$e(),{validateAbortSignal:s,validateFunction:u,validateObject:d,validateBoolean:p}=Qt(),{Promise:g,PromisePrototypeThen:f,SymbolDispose:b}=Ue(),{isClosed:y,isReadable:_,isReadableNodeStream:A,isReadableStream:w,isReadableFinished:I,isReadableErrored:k,isWritable:E,isWritableNodeStream:T,isWritableStream:O,isWritableFinished:H,isWritableErrored:G,isNodeStream:de,willEmitClose:U,kIsClosedPromise:$}=ot(),z;function F(Q){return Q.setHeader&&typeof Q.abort=="function"}var me=()=>{};function le(Q,he,P){var ce,ye;if(arguments.length===2?(P=he,he=n):he==null?he=n:d(he,"options"),u(P,"callback"),s(he.signal,"options.signal"),P=t(P),w(Q)||O(Q))return pe(Q,he,P);if(!de(Q))throw new r("stream",["ReadableStream","WritableStream","Stream"],Q);let J=(ce=he.readable)!==null&&ce!==void 0?ce:A(Q),_e=(ye=he.writable)!==null&&ye!==void 0?ye:T(Q),K=Q._writableState,M=Q._readableState,Z=()=>{Q.writable||W()},V=U(Q)&&A(Q)===J&&T(Q)===_e,j=H(Q,!1),W=()=>{j=!0,Q.destroyed&&(V=!1),!(V&&(!Q.readable||J))&&(!J||ue)&&P.call(Q)},ue=I(Q,!1),re=()=>{ue=!0,Q.destroyed&&(V=!1),!(V&&(!Q.writable||_e))&&(!_e||j)&&P.call(Q)},x=L=>{P.call(Q,L)},D=y(Q),q=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);if(J&&!ue&&A(Q,!0)&&!I(Q,!1))return P.call(Q,new e);if(_e&&!j&&!H(Q,!1))return P.call(Q,new e);P.call(Q)},te=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);P.call(Q)},ee=()=>{Q.req.on("finish",W)};F(Q)?(Q.on("complete",W),V||Q.on("abort",q),Q.req?ee():Q.on("request",ee)):_e&&!K&&(Q.on("end",Z),Q.on("close",Z)),!V&&typeof Q.aborted=="boolean"&&Q.on("aborted",q),Q.on("end",re),Q.on("finish",W),he.error!==!1&&Q.on("error",x),Q.on("close",q),D?o.nextTick(q):K!=null&&K.errorEmitted||M!=null&&M.errorEmitted?V||o.nextTick(te):(!J&&(!V||_(Q))&&(j||E(Q)===!1)||!_e&&(!V||E(Q))&&(ue||_(Q)===!1)||M&&Q.req&&Q.aborted)&&o.nextTick(te);let ie=()=>{P=me,Q.removeListener("aborted",q),Q.removeListener("complete",W),Q.removeListener("abort",q),Q.removeListener("request",ee),Q.req&&Q.req.removeListener("finish",W),Q.removeListener("end",Z),Q.removeListener("close",Z),Q.removeListener("finish",W),Q.removeListener("end",re),Q.removeListener("error",x),Q.removeListener("close",q)};if(he.signal&&!D){let L=()=>{let ne=P;ie(),ne.call(Q,new a(void 0,{cause:he.signal.reason}))};if(he.signal.aborted)o.nextTick(L);else{z=z||$e().addAbortListener;let ne=z(he.signal,L),ge=P;P=t((...Y)=>{ne[b](),ge.apply(Q,Y)})}}return ie}function pe(Q,he,P){let ce=!1,ye=me;if(he.signal)if(ye=()=>{ce=!0,P.call(Q,new a(void 0,{cause:he.signal.reason}))},he.signal.aborted)o.nextTick(ye);else{z=z||$e().addAbortListener;let _e=z(he.signal,ye),K=P;P=t((...M)=>{_e[b](),K.apply(Q,M)})}let J=(..._e)=>{ce||o.nextTick(()=>P.apply(Q,_e))};return f(Q[$].promise,J,J),me}function we(Q,he){var P;let ce=!1;return he===null&&(he=n),(P=he)!==null&&P!==void 0&&P.cleanup&&(p(he.cleanup,"cleanup"),ce=he.cleanup),new g((ye,J)=>{let _e=le(Q,he,K=>{ce&&_e(),K?J(K):ye()})})}h.exports=le,h.exports.finished=we}),Ut=fe((i,h)=>{oe(),ae(),se();var o=Et(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:l},AbortError:r}=qe(),{Symbol:e}=Ue(),{kIsDestroyed:n,isDestroyed:t,isFinished:s,isServerRequest:u}=ot(),d=e("kDestroy"),p=e("kConstruct");function g(U,$,z){U&&(U.stack,$&&!$.errored&&($.errored=U),z&&!z.errored&&(z.errored=U))}function f(U,$){let z=this._readableState,F=this._writableState,me=F||z;return F!=null&&F.destroyed||z!=null&&z.destroyed?(typeof $=="function"&&$(),this):(g(U,F,z),F&&(F.destroyed=!0),z&&(z.destroyed=!0),me.constructed?b(this,U,$):this.once(d,function(le){b(this,a(le,U),$)}),this)}function b(U,$,z){let F=!1;function me(le){if(F)return;F=!0;let pe=U._readableState,we=U._writableState;g(le,we,pe),we&&(we.closed=!0),pe&&(pe.closed=!0),typeof z=="function"&&z(le),le?o.nextTick(y,U,le):o.nextTick(_,U)}try{U._destroy($||null,me)}catch(le){me(le)}}function y(U,$){A(U,$),_(U)}function _(U){let $=U._readableState,z=U._writableState;z&&(z.closeEmitted=!0),$&&($.closeEmitted=!0),(z!=null&&z.emitClose||$!=null&&$.emitClose)&&U.emit("close")}function A(U,$){let z=U._readableState,F=U._writableState;F!=null&&F.errorEmitted||z!=null&&z.errorEmitted||(F&&(F.errorEmitted=!0),z&&(z.errorEmitted=!0),U.emit("error",$))}function w(){let U=this._readableState,$=this._writableState;U&&(U.constructed=!0,U.closed=!1,U.closeEmitted=!1,U.destroyed=!1,U.errored=null,U.errorEmitted=!1,U.reading=!1,U.ended=U.readable===!1,U.endEmitted=U.readable===!1),$&&($.constructed=!0,$.destroyed=!1,$.closed=!1,$.closeEmitted=!1,$.errored=null,$.errorEmitted=!1,$.finalCalled=!1,$.prefinished=!1,$.ended=$.writable===!1,$.ending=$.writable===!1,$.finished=$.writable===!1)}function I(U,$,z){let F=U._readableState,me=U._writableState;if(me!=null&&me.destroyed||F!=null&&F.destroyed)return this;F!=null&&F.autoDestroy||me!=null&&me.autoDestroy?U.destroy($):$&&($.stack,me&&!me.errored&&(me.errored=$),F&&!F.errored&&(F.errored=$),z?o.nextTick(A,U,$):A(U,$))}function k(U,$){if(typeof U._construct!="function")return;let z=U._readableState,F=U._writableState;z&&(z.constructed=!1),F&&(F.constructed=!1),U.once(p,$),!(U.listenerCount(p)>1)&&o.nextTick(E,U)}function E(U){let $=!1;function z(F){if($){I(U,F??new l);return}$=!0;let me=U._readableState,le=U._writableState,pe=le||me;me&&(me.constructed=!0),le&&(le.constructed=!0),pe.destroyed?U.emit(d,F):F?I(U,F,!0):o.nextTick(T,U)}try{U._construct(F=>{o.nextTick(z,F)})}catch(F){o.nextTick(z,F)}}function T(U){U.emit(p)}function O(U){return U?.setHeader&&typeof U.abort=="function"}function H(U){U.emit("close")}function G(U,$){U.emit("error",$),o.nextTick(H,U)}function de(U,$){!U||t(U)||(!$&&!s(U)&&($=new r),u(U)?(U.socket=null,U.destroy($)):O(U)?U.abort():O(U.req)?U.req.abort():typeof U.destroy=="function"?U.destroy($):typeof U.close=="function"?U.close():$?o.nextTick(G,U,$):o.nextTick(H,U),U.destroyed||(U[n]=!0))}h.exports={construct:k,destroyer:de,destroy:f,undestroy:w,errorOrDestroy:I}}),Ln=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ObjectSetPrototypeOf:a}=Ue(),{EventEmitter:l}=(_t(),Be(gt));function r(n){l.call(this,n)}a(r.prototype,l.prototype),a(r,l),r.prototype.pipe=function(n,t){let s=this;function u(_){n.writable&&n.write(_)===!1&&s.pause&&s.pause()}s.on("data",u);function d(){s.readable&&s.resume&&s.resume()}n.on("drain",d),!n._isStdio&&(!t||t.end!==!1)&&(s.on("end",g),s.on("close",f));let p=!1;function g(){p||(p=!0,n.end())}function f(){p||(p=!0,typeof n.destroy=="function"&&n.destroy())}function b(_){y(),l.listenerCount(this,"error")===0&&this.emit("error",_)}e(s,"error",b),e(n,"error",b);function y(){s.removeListener("data",u),n.removeListener("drain",d),s.removeListener("end",g),s.removeListener("close",f),s.removeListener("error",b),n.removeListener("error",b),s.removeListener("end",y),s.removeListener("close",y),n.removeListener("close",y)}return s.on("end",y),s.on("close",y),n.on("close",y),n.emit("pipe",s),n};function e(n,t,s){if(typeof n.prependListener=="function")return n.prependListener(t,s);!n._events||!n._events[t]?n.on(t,s):o(n._events[t])?n._events[t].unshift(s):n._events[t]=[s,n._events[t]]}h.exports={Stream:r,prependListener:e}}),er=fe((i,h)=>{oe(),ae(),se();var{SymbolDispose:o}=Ue(),{AbortError:a,codes:l}=qe(),{isNodeStream:r,isWebStream:e,kControllerErrorFunction:n}=ot(),t=mt(),{ERR_INVALID_ARG_TYPE:s}=l,u,d=(p,g)=>{if(typeof p!="object"||!("aborted"in p))throw new s(g,"AbortSignal",p)};h.exports.addAbortSignal=function(p,g){if(d(p,"signal"),!r(g)&&!e(g))throw new s("stream",["ReadableStream","WritableStream","Stream"],g);return h.exports.addAbortSignalNoValidate(p,g)},h.exports.addAbortSignalNoValidate=function(p,g){if(typeof p!="object"||!("aborted"in p))return g;let f=r(g)?()=>{g.destroy(new a(void 0,{cause:p.reason}))}:()=>{g[n](new a(void 0,{cause:p.reason}))};if(p.aborted)f();else{u=u||$e().addAbortListener;let b=u(p,f);t(g,b[o])}return g}}),Al=fe((i,h)=>{oe(),ae(),se();var{StringPrototypeSlice:o,SymbolIterator:a,TypedArrayPrototypeSet:l,Uint8Array:r}=Ue(),{Buffer:e}=(Ve(),Be(We)),{inspect:n}=$e();h.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){let s={data:t,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}unshift(t){let s={data:t,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}shift(){if(this.length===0)return;let t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let s=this.head,u=""+s.data;for(;(s=s.next)!==null;)u+=t+s.data;return u}concat(t){if(this.length===0)return e.alloc(0);let s=e.allocUnsafe(t>>>0),u=this.head,d=0;for(;u;)l(s,u.data,d),d+=u.data.length,u=u.next;return s}consume(t,s){let u=this.head.data;if(t<u.length){let d=u.slice(0,t);return this.head.data=u.slice(t),d}return t===u.length?this.shift():s?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[a](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let s="",u=this.head,d=0;do{let p=u.data;if(t>p.length)s+=p,t-=p.length;else{t===p.length?(s+=p,++d,u.next?this.head=u.next:this.head=this.tail=null):(s+=o(p,0,t),this.head=u,u.data=o(p,t));break}++d}while((u=u.next)!==null);return this.length-=d,s}_getBuffer(t){let s=e.allocUnsafe(t),u=t,d=this.head,p=0;do{let g=d.data;if(t>g.length)l(s,g,u-t),t-=g.length;else{t===g.length?(l(s,g,u-t),++p,d.next?this.head=d.next:this.head=this.tail=null):(l(s,new r(g.buffer,g.byteOffset,t),u-t),this.head=d,d.data=g.slice(t));break}++p}while((d=d.next)!==null);return this.length-=p,s}[Symbol.for("nodejs.util.inspect.custom")](t,s){return n(this,{...s,depth:0,customInspect:!1})}}}),tr=fe((i,h)=>{oe(),ae(),se();var{MathFloor:o,NumberIsInteger:a}=Ue(),{validateInteger:l}=Qt(),{ERR_INVALID_ARG_VALUE:r}=qe().codes,e=16*1024,n=16;function t(p,g,f){return p.highWaterMark!=null?p.highWaterMark:g?p[f]:null}function s(p){return p?n:e}function u(p,g){l(g,"value",0),p?n=g:e=g}function d(p,g,f,b){let y=t(g,b,f);if(y!=null){if(!a(y)||y<0){let _=b?`options.${f}`:"options.highWaterMark";throw new r(_,y)}return o(y)}return s(p.objectMode)}h.exports={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u}}),bl=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),a=o.Buffer;function l(e,n){for(var t in e)n[t]=e[t]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?h.exports=o:(l(o,i),i.Buffer=r);function r(e,n,t){return a(e,n,t)}r.prototype=Object.create(a.prototype),l(a,r),r.from=function(e,n,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return a(e,n,t)},r.alloc=function(e,n,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var s=a(e);return n!==void 0?typeof t=="string"?s.fill(n,t):s.fill(n):s.fill(0),s},r.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return a(e)},r.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}}),yl=fe(i=>{oe(),ae(),se();var h=bl().Buffer,o=h.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(A){if(!A)return"utf8";for(var w;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(w)return;A=(""+A).toLowerCase(),w=!0}}function l(A){var w=a(A);if(typeof w!="string"&&(h.isEncoding===o||!o(A)))throw new Error("Unknown encoding: "+A);return w||A}i.StringDecoder=r;function r(A){this.encoding=l(A);var w;switch(this.encoding){case"utf16le":this.text=p,this.end=g,w=4;break;case"utf8":this.fillLast=s,w=4;break;case"base64":this.text=f,this.end=b,w=3;break;default:this.write=y,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(w)}r.prototype.write=function(A){if(A.length===0)return"";var w,I;if(this.lastNeed){if(w=this.fillLast(A),w===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<A.length?w?w+this.text(A,I):this.text(A,I):w||""},r.prototype.end=d,r.prototype.text=u,r.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function e(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function n(A,w,I){var k=w.length-1;if(k<I)return 0;var E=e(w[k]);return E>=0?(E>0&&(A.lastNeed=E-1),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(A.lastNeed=E-2),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(E===2?E=0:A.lastNeed=E-3),E):0))}function t(A,w,I){if((w[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return A.lastNeed=2,"�"}}function s(A){var w=this.lastTotal-this.lastNeed,I=t(this,A);if(I!==void 0)return I;if(this.lastNeed<=A.length)return A.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,w,0,A.length),this.lastNeed-=A.length}function u(A,w){var I=n(this,A,w);if(!this.lastNeed)return A.toString("utf8",w);this.lastTotal=I;var k=A.length-(I-this.lastNeed);return A.copy(this.lastChar,0,k),A.toString("utf8",w,k)}function d(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+"�":w}function p(A,w){if((A.length-w)%2===0){var I=A.toString("utf16le",w);if(I){var k=I.charCodeAt(I.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",w,A.length-1)}function g(A){var w=A&&A.length?this.write(A):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,I)}return w}function f(A,w){var I=(A.length-w)%3;return I===0?A.toString("base64",w):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",w,A.length-I))}function b(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function y(A){return A.toString(this.encoding)}function _(A){return A&&A.length?this.write(A):""}}),ho=fe((i,h)=>{oe(),ae(),se();var o=Et(),{PromisePrototypeThen:a,SymbolAsyncIterator:l,SymbolIterator:r}=Ue(),{Buffer:e}=(Ve(),Be(We)),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:t}=qe().codes;function s(u,d,p){let g;if(typeof d=="string"||d instanceof e)return new u({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let f;if(d&&d[l])f=!0,g=d[l]();else if(d&&d[r])f=!1,g=d[r]();else throw new n("iterable",["Iterable"],d);let b=new u({objectMode:!0,highWaterMark:1,...p}),y=!1;b._read=function(){y||(y=!0,A())},b._destroy=function(w,I){a(_(w),()=>o.nextTick(I,w),k=>o.nextTick(I,k||w))};async function _(w){let I=w!=null,k=typeof g.throw=="function";if(I&&k){let{value:E,done:T}=await g.throw(w);if(await E,T)return}if(typeof g.return=="function"){let{value:E}=await g.return();await E}}async function A(){for(;;){try{let{value:w,done:I}=f?await g.next():g.next();if(I)b.push(null);else{let k=w&&typeof w.then=="function"?await w:w;if(k===null)throw y=!1,new t;if(b.push(k))continue;y=!1}}catch(w){b.destroy(w)}break}}return b}h.exports=s}),rr=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeIndexOf:a,NumberIsInteger:l,NumberIsNaN:r,NumberParseInt:e,ObjectDefineProperties:n,ObjectKeys:t,ObjectSetPrototypeOf:s,Promise:u,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol:f}=Ue();h.exports=Y,Y.ReadableState=ge;var{EventEmitter:b}=(_t(),Be(gt)),{Stream:y,prependListener:_}=Ln(),{Buffer:A}=(Ve(),Be(We)),{addAbortSignal:w}=er(),I=mt(),k=$e().debuglog("stream",S=>{k=S}),E=Al(),T=Ut(),{getHighWaterMark:O,getDefaultHighWaterMark:H}=tr(),{aggregateTwoErrors:G,codes:{ERR_INVALID_ARG_TYPE:de,ERR_METHOD_NOT_IMPLEMENTED:U,ERR_OUT_OF_RANGE:$,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:F},AbortError:me}=qe(),{validateObject:le}=Qt(),pe=f("kPaused"),{StringDecoder:we}=yl(),Q=ho();s(Y.prototype,y.prototype),s(Y,y);var he=()=>{},{errorOrDestroy:P}=T,ce=1,ye=2,J=4,_e=8,K=16,M=32,Z=64,V=128,j=256,W=512,ue=1024,re=2048,x=4096,D=8192,q=16384,te=32768,ee=65536,ie=1<<17,L=1<<18;function ne(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(B){B?this.state|=S:this.state&=~S}}}n(ge.prototype,{objectMode:ne(ce),ended:ne(ye),endEmitted:ne(J),reading:ne(_e),constructed:ne(K),sync:ne(M),needReadable:ne(Z),emittedReadable:ne(V),readableListening:ne(j),resumeScheduled:ne(W),errorEmitted:ne(ue),emitClose:ne(re),autoDestroy:ne(x),destroyed:ne(D),closed:ne(q),closeEmitted:ne(te),multiAwaitDrain:ne(ee),readingMore:ne(ie),dataEmitted:ne(L)});function ge(S,B,Ae){typeof Ae!="boolean"&&(Ae=B instanceof st()),this.state=re|x|K|M,S&&S.objectMode&&(this.state|=ce),Ae&&S&&S.readableObjectMode&&(this.state|=ce),this.highWaterMark=S?O(this,S,"readableHighWaterMark",Ae):H(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[pe]=null,S&&S.emitClose===!1&&(this.state&=~re),S&&S.autoDestroy===!1&&(this.state&=~x),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new we(S.encoding),this.encoding=S.encoding)}function Y(S){if(!(this instanceof Y))return new Y(S);let B=this instanceof st();this._readableState=new ge(S,this,B),S&&(typeof S.read=="function"&&(this._read=S.read),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&!B&&w(S.signal,this)),y.call(this,S),T.construct(this,()=>{this._readableState.needReadable&&Ce(this,this._readableState)})}Y.prototype.destroy=T.destroy,Y.prototype._undestroy=T.undestroy,Y.prototype._destroy=function(S,B){B(S)},Y.prototype[b.captureRejectionSymbol]=function(S){this.destroy(S)},Y.prototype[p]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new me,this.destroy(S)),new u((B,Ae)=>I(this,ve=>ve&&ve!==S?Ae(ve):B(null)))},Y.prototype.push=function(S,B){return Se(this,S,B,!1)},Y.prototype.unshift=function(S,B){return Se(this,S,B,!0)};function Se(S,B,Ae,ve){k("readableAddChunk",B);let Ee=S._readableState,Ke;if((Ee.state&ce)===0&&(typeof B=="string"?(Ae=Ae||Ee.defaultEncoding,Ee.encoding!==Ae&&(ve&&Ee.encoding?B=A.from(B,Ae).toString(Ee.encoding):(B=A.from(B,Ae),Ae=""))):B instanceof A?Ae="":y._isUint8Array(B)?(B=y._uint8ArrayToBuffer(B),Ae=""):B!=null&&(Ke=new de("chunk",["string","Buffer","Uint8Array"],B))),Ke)P(S,Ke);else if(B===null)Ee.state&=~_e,N(S,Ee);else if((Ee.state&ce)!==0||B&&B.length>0)if(ve)if((Ee.state&J)!==0)P(S,new F);else{if(Ee.destroyed||Ee.errored)return!1;c(S,Ee,B,!0)}else if(Ee.ended)P(S,new z);else{if(Ee.destroyed||Ee.errored)return!1;Ee.state&=~_e,Ee.decoder&&!Ae?(B=Ee.decoder.write(B),Ee.objectMode||B.length!==0?c(S,Ee,B,!1):Ce(S,Ee)):c(S,Ee,B,!1)}else ve||(Ee.state&=~_e,Ce(S,Ee));return!Ee.ended&&(Ee.length<Ee.highWaterMark||Ee.length===0)}function c(S,B,Ae,ve){B.flowing&&B.length===0&&!B.sync&&S.listenerCount("data")>0?((B.state&ee)!==0?B.awaitDrainWriters.clear():B.awaitDrainWriters=null,B.dataEmitted=!0,S.emit("data",Ae)):(B.length+=B.objectMode?1:Ae.length,ve?B.buffer.unshift(Ae):B.buffer.push(Ae),(B.state&Z)!==0&&X(S)),Ce(S,B)}Y.prototype.isPaused=function(){let S=this._readableState;return S[pe]===!0||S.flowing===!1},Y.prototype.setEncoding=function(S){let B=new we(S);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;let Ae=this._readableState.buffer,ve="";for(let Ee of Ae)ve+=B.write(Ee);return Ae.clear(),ve!==""&&Ae.push(ve),this._readableState.length=ve.length,this};var m=1073741824;function v(S){if(S>m)throw new $("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function R(S,B){return S<=0||B.length===0&&B.ended?0:(B.state&ce)!==0?1:r(S)?B.flowing&&B.length?B.buffer.first().length:B.length:S<=B.length?S:B.ended?B.length:0}Y.prototype.read=function(S){k("read",S),S===void 0?S=NaN:l(S)||(S=e(S,10));let B=this._readableState,Ae=S;if(S>B.highWaterMark&&(B.highWaterMark=v(S)),S!==0&&(B.state&=~V),S===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return k("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?ii(this):X(this),null;if(S=R(S,B),S===0&&B.ended)return B.length===0&&ii(this),null;let ve=(B.state&Z)!==0;if(k("need readable",ve),(B.length===0||B.length-S<B.highWaterMark)&&(ve=!0,k("length less than watermark",ve)),B.ended||B.reading||B.destroyed||B.errored||!B.constructed)ve=!1,k("reading, ended or constructing",ve);else if(ve){k("do read"),B.state|=_e|M,B.length===0&&(B.state|=Z);try{this._read(B.highWaterMark)}catch(Ke){P(this,Ke)}B.state&=~M,B.reading||(S=R(Ae,B))}let Ee;return S>0?Ee=Ns(S,B):Ee=null,Ee===null?(B.needReadable=B.length<=B.highWaterMark,S=0):(B.length-=S,B.multiAwaitDrain?B.awaitDrainWriters.clear():B.awaitDrainWriters=null),B.length===0&&(B.ended||(B.needReadable=!0),Ae!==S&&B.ended&&ii(this)),Ee!==null&&!B.errorEmitted&&!B.closeEmitted&&(B.dataEmitted=!0,this.emit("data",Ee)),Ee};function N(S,B){if(k("onEofChunk"),!B.ended){if(B.decoder){let Ae=B.decoder.end();Ae&&Ae.length&&(B.buffer.push(Ae),B.length+=B.objectMode?1:Ae.length)}B.ended=!0,B.sync?X(S):(B.needReadable=!1,B.emittedReadable=!0,be(S))}}function X(S){let B=S._readableState;k("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(k("emitReadable",B.flowing),B.emittedReadable=!0,o.nextTick(be,S))}function be(S){let B=S._readableState;k("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&!B.errored&&(B.length||B.ended)&&(S.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,Ds(S)}function Ce(S,B){!B.readingMore&&B.constructed&&(B.readingMore=!0,o.nextTick(je,S,B))}function je(S,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){let Ae=B.length;if(k("maybeReadMore read 0"),S.read(0),Ae===B.length)break}B.readingMore=!1}Y.prototype._read=function(S){throw new U("_read()")},Y.prototype.pipe=function(S,B){let Ae=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new d(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(S),k("pipe count=%d opts=%j",ve.pipes.length,B);let Ee=(!B||B.end!==!1)&&S!==o.stdout&&S!==o.stderr?Ye:qt;ve.endEmitted?o.nextTick(Ee):Ae.once("end",Ee),S.on("unpipe",Ke);function Ke(Pt,dt){k("onunpipe"),Pt===Ae&&dt&&dt.hasUnpiped===!1&&(dt.hasUnpiped=!0,Nu())}function Ye(){k("onend"),S.end()}let xt,js=!1;function Nu(){k("cleanup"),S.removeListener("close",ai),S.removeListener("finish",li),xt&&S.removeListener("drain",xt),S.removeListener("error",si),S.removeListener("unpipe",Ke),Ae.removeListener("end",Ye),Ae.removeListener("end",qt),Ae.removeListener("data",Vs),js=!0,xt&&ve.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&xt()}function Ws(){js||(ve.pipes.length===1&&ve.pipes[0]===S?(k("false write response, pause",0),ve.awaitDrainWriters=S,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(S)&&(k("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(S)),Ae.pause()),xt||(xt=Pe(Ae,S),S.on("drain",xt))}Ae.on("data",Vs);function Vs(Pt){k("ondata");let dt=S.write(Pt);k("dest.write",dt),dt===!1&&Ws()}function si(Pt){if(k("onerror",Pt),qt(),S.removeListener("error",si),S.listenerCount("error")===0){let dt=S._writableState||S._readableState;dt&&!dt.errorEmitted?P(S,Pt):S.emit("error",Pt)}}_(S,"error",si);function ai(){S.removeListener("finish",li),qt()}S.once("close",ai);function li(){k("onfinish"),S.removeListener("close",ai),qt()}S.once("finish",li);function qt(){k("unpipe"),Ae.unpipe(S)}return S.emit("pipe",Ae),S.writableNeedDrain===!0?Ws():ve.flowing||(k("pipe resume"),Ae.resume()),S};function Pe(S,B){return function(){let Ae=S._readableState;Ae.awaitDrainWriters===B?(k("pipeOnDrain",1),Ae.awaitDrainWriters=null):Ae.multiAwaitDrain&&(k("pipeOnDrain",Ae.awaitDrainWriters.size),Ae.awaitDrainWriters.delete(B)),(!Ae.awaitDrainWriters||Ae.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}Y.prototype.unpipe=function(S){let B=this._readableState,Ae={hasUnpiped:!1};if(B.pipes.length===0)return this;if(!S){let Ee=B.pipes;B.pipes=[],this.pause();for(let Ke=0;Ke<Ee.length;Ke++)Ee[Ke].emit("unpipe",this,{hasUnpiped:!1});return this}let ve=a(B.pipes,S);return ve===-1?this:(B.pipes.splice(ve,1),B.pipes.length===0&&this.pause(),S.emit("unpipe",this,Ae),this)},Y.prototype.on=function(S,B){let Ae=y.prototype.on.call(this,S,B),ve=this._readableState;return S==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):S==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,k("on readable",ve.length,ve.reading),ve.length?X(this):ve.reading||o.nextTick(Ne,this)),Ae},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(S,B){let Ae=y.prototype.removeListener.call(this,S,B);return S==="readable"&&o.nextTick(Ie,this),Ae},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(S){let B=y.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&o.nextTick(Ie,this),B};function Ie(S){let B=S._readableState;B.readableListening=S.listenerCount("readable")>0,B.resumeScheduled&&B[pe]===!1?B.flowing=!0:S.listenerCount("data")>0?S.resume():B.readableListening||(B.flowing=null)}function Ne(S){k("readable nexttick read 0"),S.read(0)}Y.prototype.resume=function(){let S=this._readableState;return S.flowing||(k("resume"),S.flowing=!S.readableListening,Ru(this,S)),S[pe]=!1,this};function Ru(S,B){B.resumeScheduled||(B.resumeScheduled=!0,o.nextTick(Mu,S,B))}function Mu(S,B){k("resume",B.reading),B.reading||S.read(0),B.resumeScheduled=!1,S.emit("resume"),Ds(S),B.flowing&&!B.reading&&S.read(0)}Y.prototype.pause=function(){return k("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(k("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[pe]=!0,this};function Ds(S){let B=S._readableState;for(k("flow",B.flowing);B.flowing&&S.read()!==null;);}Y.prototype.wrap=function(S){let B=!1;S.on("data",ve=>{!this.push(ve)&&S.pause&&(B=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",ve=>{P(this,ve)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{B&&S.resume&&(B=!1,S.resume())};let Ae=t(S);for(let ve=1;ve<Ae.length;ve++){let Ee=Ae[ve];this[Ee]===void 0&&typeof S[Ee]=="function"&&(this[Ee]=S[Ee].bind(S))}return this},Y.prototype[g]=function(){return Ls(this)},Y.prototype.iterator=function(S){return S!==void 0&&le(S,"options"),Ls(this,S)};function Ls(S,B){typeof S.read!="function"&&(S=Y.wrap(S,{objectMode:!0}));let Ae=Uu(S,B);return Ae.stream=S,Ae}async function*Uu(S,B){let Ae=he;function ve(Ye){this===S?(Ae(),Ae=he):Ae=Ye}S.on("readable",ve);let Ee,Ke=I(S,{writable:!1},Ye=>{Ee=Ye?G(Ee,Ye):null,Ae(),Ae=he});try{for(;;){let Ye=S.destroyed?null:S.read();if(Ye!==null)yield Ye;else{if(Ee)throw Ee;if(Ee===null)return;await new u(ve)}}}catch(Ye){throw Ee=G(Ee,Ye),Ee}finally{(Ee||B?.destroyOnReturn!==!1)&&(Ee===void 0||S._readableState.autoDestroy)?T.destroyer(S,null):(S.off("readable",ve),Ke())}}n(Y.prototype,{readable:{__proto__:null,get(){let S=this._readableState;return!!S&&S.readable!==!1&&!S.destroyed&&!S.errorEmitted&&!S.endEmitted},set(S){this._readableState&&(this._readableState.readable=!!S)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(S){this._readableState&&(this._readableState.destroyed=S)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),n(ge.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[pe]!==!1},set(S){this[pe]=!!S}}}),Y._fromList=Ns;function Ns(S,B){if(B.length===0)return null;let Ae;return B.objectMode?Ae=B.buffer.shift():!S||S>=B.length?(B.decoder?Ae=B.buffer.join(""):B.buffer.length===1?Ae=B.buffer.first():Ae=B.buffer.concat(B.length),B.buffer.clear()):Ae=B.buffer.consume(S,B.decoder),Ae}function ii(S){let B=S._readableState;k("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,o.nextTick(Du,B,S))}function Du(S,B){if(k("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,B.emit("end"),B.writable&&B.allowHalfOpen===!1)o.nextTick(Lu,B);else if(S.autoDestroy){let Ae=B._writableState;(!Ae||Ae.autoDestroy&&(Ae.finished||Ae.writable===!1))&&B.destroy()}}}function Lu(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}Y.from=function(S,B){return Q(Y,S,B)};var oi;function Fs(){return oi===void 0&&(oi={}),oi}Y.fromWeb=function(S,B){return Fs().newStreamReadableFromReadableStream(S,B)},Y.toWeb=function(S,B){return Fs().newReadableStreamFromStreamReadable(S,B)},Y.wrap=function(S,B){var Ae,ve;return new Y({objectMode:(Ae=(ve=S.readableObjectMode)!==null&&ve!==void 0?ve:S.objectMode)!==null&&Ae!==void 0?Ae:!0,...B,destroy(Ee,Ke){T.destroyer(S,Ee),Ke(Ee)}}).wrap(S)}}),Nn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeSlice:a,Error:l,FunctionPrototypeSymbolHasInstance:r,ObjectDefineProperty:e,ObjectDefineProperties:n,ObjectSetPrototypeOf:t,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:d}=Ue();h.exports=le,le.WritableState=F;var{EventEmitter:p}=(_t(),Be(gt)),g=Ln().Stream,{Buffer:f}=(Ve(),Be(We)),b=Ut(),{addAbortSignal:y}=er(),{getHighWaterMark:_,getDefaultHighWaterMark:A}=tr(),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:k,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:O,ERR_STREAM_NULL_VALUES:H,ERR_STREAM_WRITE_AFTER_END:G,ERR_UNKNOWN_ENCODING:de}=qe().codes,{errorOrDestroy:U}=b;t(le.prototype,g.prototype),t(le,g);function $(){}var z=u("kOnFinished");function F(x,D,q){typeof q!="boolean"&&(q=D instanceof st()),this.objectMode=!!(x&&x.objectMode),q&&(this.objectMode=this.objectMode||!!(x&&x.writableObjectMode)),this.highWaterMark=x?_(this,x,"writableHighWaterMark",q):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let te=!!(x&&x.decodeStrings===!1);this.decodeStrings=!te,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=P.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,me(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!x||x.emitClose!==!1,this.autoDestroy=!x||x.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[z]=[]}function me(x){x.buffered=[],x.bufferedIndex=0,x.allBuffers=!0,x.allNoop=!0}F.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},e(F.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function le(x){let D=this instanceof st();if(!D&&!r(le,this))return new le(x);this._writableState=new F(x,this,D),x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final),typeof x.construct=="function"&&(this._construct=x.construct),x.signal&&y(x.signal,this)),g.call(this,x),b.construct(this,()=>{let q=this._writableState;q.writing||_e(this,q),V(this,q)})}e(le,d,{__proto__:null,value:function(x){return r(this,x)?!0:this!==le?!1:x&&x._writableState instanceof F}}),le.prototype.pipe=function(){U(this,new E)};function pe(x,D,q,te){let ee=x._writableState;if(typeof q=="function")te=q,q=ee.defaultEncoding;else{if(!q)q=ee.defaultEncoding;else if(q!=="buffer"&&!f.isEncoding(q))throw new de(q);typeof te!="function"&&(te=$)}if(D===null)throw new H;if(!ee.objectMode)if(typeof D=="string")ee.decodeStrings!==!1&&(D=f.from(D,q),q="buffer");else if(D instanceof f)q="buffer";else if(g._isUint8Array(D))D=g._uint8ArrayToBuffer(D),q="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],D);let ie;return ee.ending?ie=new G:ee.destroyed&&(ie=new T("write")),ie?(o.nextTick(te,ie),U(x,ie,!0),ie):(ee.pendingcb++,we(x,ee,D,q,te))}le.prototype.write=function(x,D,q){return pe(this,x,D,q)===!0},le.prototype.cork=function(){this._writableState.corked++},le.prototype.uncork=function(){let x=this._writableState;x.corked&&(x.corked--,x.writing||_e(this,x))},le.prototype.setDefaultEncoding=function(x){if(typeof x=="string"&&(x=s(x)),!f.isEncoding(x))throw new de(x);return this._writableState.defaultEncoding=x,this};function we(x,D,q,te,ee){let ie=D.objectMode?1:q.length;D.length+=ie;let L=D.length<D.highWaterMark;return L||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:q,encoding:te,callback:ee}),D.allBuffers&&te!=="buffer"&&(D.allBuffers=!1),D.allNoop&&ee!==$&&(D.allNoop=!1)):(D.writelen=ie,D.writecb=ee,D.writing=!0,D.sync=!0,x._write(q,te,D.onwrite),D.sync=!1),L&&!D.errored&&!D.destroyed}function Q(x,D,q,te,ee,ie,L){D.writelen=te,D.writecb=L,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new T("write")):q?x._writev(ee,D.onwrite):x._write(ee,ie,D.onwrite),D.sync=!1}function he(x,D,q,te){--D.pendingcb,te(q),J(D),U(x,q)}function P(x,D){let q=x._writableState,te=q.sync,ee=q.writecb;if(typeof ee!="function"){U(x,new k);return}q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0,D?(D.stack,q.errored||(q.errored=D),x._readableState&&!x._readableState.errored&&(x._readableState.errored=D),te?o.nextTick(he,x,q,D,ee):he(x,q,D,ee)):(q.buffered.length>q.bufferedIndex&&_e(x,q),te?q.afterWriteTickInfo!==null&&q.afterWriteTickInfo.cb===ee?q.afterWriteTickInfo.count++:(q.afterWriteTickInfo={count:1,cb:ee,stream:x,state:q},o.nextTick(ce,q.afterWriteTickInfo)):ye(x,q,1,ee))}function ce({stream:x,state:D,count:q,cb:te}){return D.afterWriteTickInfo=null,ye(x,D,q,te)}function ye(x,D,q,te){for(!D.ending&&!x.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,x.emit("drain"));q-- >0;)D.pendingcb--,te();D.destroyed&&J(D),V(x,D)}function J(x){if(x.writing)return;for(let ee=x.bufferedIndex;ee<x.buffered.length;++ee){var D;let{chunk:ie,callback:L}=x.buffered[ee],ne=x.objectMode?1:ie.length;x.length-=ne,L((D=x.errored)!==null&&D!==void 0?D:new T("write"))}let q=x[z].splice(0);for(let ee=0;ee<q.length;ee++){var te;q[ee]((te=x.errored)!==null&&te!==void 0?te:new T("end"))}me(x)}function _e(x,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;let{buffered:q,bufferedIndex:te,objectMode:ee}=D,ie=q.length-te;if(!ie)return;let L=te;if(D.bufferProcessing=!0,ie>1&&x._writev){D.pendingcb-=ie-1;let ne=D.allNoop?$:Y=>{for(let Se=L;Se<q.length;++Se)q[Se].callback(Y)},ge=D.allNoop&&L===0?q:a(q,L);ge.allBuffers=D.allBuffers,Q(x,D,!0,D.length,ge,"",ne),me(D)}else{do{let{chunk:ne,encoding:ge,callback:Y}=q[L];q[L++]=null;let Se=ee?1:ne.length;Q(x,D,!1,Se,ne,ge,Y)}while(L<q.length&&!D.writing);L===q.length?me(D):L>256?(q.splice(0,L),D.bufferedIndex=0):D.bufferedIndex=L}D.bufferProcessing=!1}le.prototype._write=function(x,D,q){if(this._writev)this._writev([{chunk:x,encoding:D}],q);else throw new I("_write()")},le.prototype._writev=null,le.prototype.end=function(x,D,q){let te=this._writableState;typeof x=="function"?(q=x,x=null,D=null):typeof D=="function"&&(q=D,D=null);let ee;if(x!=null){let ie=pe(this,x,D);ie instanceof l&&(ee=ie)}return te.corked&&(te.corked=1,this.uncork()),ee||(!te.errored&&!te.ending?(te.ending=!0,V(this,te,!0),te.ended=!0):te.finished?ee=new O("end"):te.destroyed&&(ee=new T("end"))),typeof q=="function"&&(ee||te.finished?o.nextTick(q,ee):te[z].push(q)),this};function K(x){return x.ending&&!x.destroyed&&x.constructed&&x.length===0&&!x.errored&&x.buffered.length===0&&!x.finished&&!x.writing&&!x.errorEmitted&&!x.closeEmitted}function M(x,D){let q=!1;function te(ee){if(q){U(x,ee??k());return}if(q=!0,D.pendingcb--,ee){let ie=D[z].splice(0);for(let L=0;L<ie.length;L++)ie[L](ee);U(x,ee,D.sync)}else K(D)&&(D.prefinished=!0,x.emit("prefinish"),D.pendingcb++,o.nextTick(j,x,D))}D.sync=!0,D.pendingcb++;try{x._final(te)}catch(ee){te(ee)}D.sync=!1}function Z(x,D){!D.prefinished&&!D.finalCalled&&(typeof x._final=="function"&&!D.destroyed?(D.finalCalled=!0,M(x,D)):(D.prefinished=!0,x.emit("prefinish")))}function V(x,D,q){K(D)&&(Z(x,D),D.pendingcb===0&&(q?(D.pendingcb++,o.nextTick((te,ee)=>{K(ee)?j(te,ee):ee.pendingcb--},x,D)):K(D)&&(D.pendingcb++,j(x,D))))}function j(x,D){D.pendingcb--,D.finished=!0;let q=D[z].splice(0);for(let te=0;te<q.length;te++)q[te]();if(x.emit("finish"),D.autoDestroy){let te=x._readableState;(!te||te.autoDestroy&&(te.endEmitted||te.readable===!1))&&x.destroy()}}n(le.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(x){this._writableState&&(this._writableState.destroyed=x)}},writable:{__proto__:null,get(){let x=this._writableState;return!!x&&x.writable!==!1&&!x.destroyed&&!x.errored&&!x.ending&&!x.ended},set(x){this._writableState&&(this._writableState.writable=!!x)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let x=this._writableState;return x?!x.destroyed&&!x.ending&&x.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var W=b.destroy;le.prototype.destroy=function(x,D){let q=this._writableState;return!q.destroyed&&(q.bufferedIndex<q.buffered.length||q[z].length)&&o.nextTick(J,q),W.call(this,x,D),this},le.prototype._undestroy=b.undestroy,le.prototype._destroy=function(x,D){D(x)},le.prototype[p.captureRejectionSymbol]=function(x){this.destroy(x)};var ue;function re(){return ue===void 0&&(ue={}),ue}le.fromWeb=function(x,D){return re().newStreamWritableFromWritableStream(x,D)},le.toWeb=function(x){return re().newWritableStreamFromStreamWritable(x)}}),wl=fe((i,h)=>{oe(),ae(),se();var o=Et(),a=(Ve(),Be(We)),{isReadable:l,isWritable:r,isIterable:e,isNodeStream:n,isReadableNodeStream:t,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:p}=ot(),g=mt(),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=qe(),{destroyer:_}=Ut(),A=st(),w=rr(),I=Nn(),{createDeferredPromise:k}=$e(),E=ho(),T=globalThis.Blob||a.Blob,O=typeof T<"u"?function(z){return z instanceof T}:function(z){return!1},H=globalThis.AbortController||Vt().AbortController,{FunctionPrototypeCall:G}=Ue(),de=class extends A{constructor(z){super(z),z?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),z?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};h.exports=function z(F,me){if(u(F))return F;if(t(F))return $({readable:F});if(s(F))return $({writable:F});if(n(F))return $({writable:!1,readable:!1});if(d(F))return $({readable:w.fromWeb(F)});if(p(F))return $({writable:I.fromWeb(F)});if(typeof F=="function"){let{value:pe,write:we,final:Q,destroy:he}=U(F);if(e(pe))return E(de,pe,{objectMode:!0,write:we,final:Q,destroy:he});let P=pe?.then;if(typeof P=="function"){let ce,ye=G(P,pe,J=>{if(J!=null)throw new y("nully","body",J)},J=>{_(ce,J)});return ce=new de({objectMode:!0,readable:!1,write:we,final(J){Q(async()=>{try{await ye,o.nextTick(J,null)}catch(_e){o.nextTick(J,_e)}})},destroy:he})}throw new y("Iterable, AsyncIterable or AsyncFunction",me,pe)}if(O(F))return z(F.arrayBuffer());if(e(F))return E(de,F,{objectMode:!0,writable:!1});if(d(F?.readable)&&p(F?.writable))return de.fromWeb(F);if(typeof F?.writable=="object"||typeof F?.readable=="object"){let pe=F!=null&&F.readable?t(F?.readable)?F?.readable:z(F.readable):void 0,we=F!=null&&F.writable?s(F?.writable)?F?.writable:z(F.writable):void 0;return $({readable:pe,writable:we})}let le=F?.then;if(typeof le=="function"){let pe;return G(le,F,we=>{we!=null&&pe.push(we),pe.push(null)},we=>{_(pe,we)}),pe=new de({objectMode:!0,writable:!1,read(){}})}throw new b(me,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],F)};function U(z){let{promise:F,resolve:me}=k(),le=new H,pe=le.signal;return{value:z((async function*(){for(;;){let we=F;F=null;let{chunk:Q,done:he,cb:P}=await we;if(o.nextTick(P),he)return;if(pe.aborted)throw new f(void 0,{cause:pe.reason});({promise:F,resolve:me}=k()),yield Q}})(),{signal:pe}),write(we,Q,he){let P=me;me=null,P({chunk:we,done:!1,cb:he})},final(we){let Q=me;me=null,Q({done:!0,cb:we})},destroy(we,Q){le.abort(),Q(we)}}}function $(z){let F=z.readable&&typeof z.readable.read!="function"?w.wrap(z.readable):z.readable,me=z.writable,le=!!l(F),pe=!!r(me),we,Q,he,P,ce;function ye(J){let _e=P;P=null,_e?_e(J):J&&ce.destroy(J)}return ce=new de({readableObjectMode:!!(F!=null&&F.readableObjectMode),writableObjectMode:!!(me!=null&&me.writableObjectMode),readable:le,writable:pe}),pe&&(g(me,J=>{pe=!1,J&&_(F,J),ye(J)}),ce._write=function(J,_e,K){me.write(J,_e)?K():we=K},ce._final=function(J){me.end(),Q=J},me.on("drain",function(){if(we){let J=we;we=null,J()}}),me.on("finish",function(){if(Q){let J=Q;Q=null,J()}})),le&&(g(F,J=>{le=!1,J&&_(F,J),ye(J)}),F.on("readable",function(){if(he){let J=he;he=null,J()}}),F.on("end",function(){ce.push(null)}),ce._read=function(){for(;;){let J=F.read();if(J===null){he=ce._read;return}if(!ce.push(J))return}}),ce._destroy=function(J,_e){!J&&P!==null&&(J=new f),he=null,we=null,Q=null,P===null?_e(J):(P=_e,_(me,J),_(F,J))},ce}}),st=fe((i,h)=>{oe(),ae(),se();var{ObjectDefineProperties:o,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:l,ObjectSetPrototypeOf:r}=Ue();h.exports=t;var e=rr(),n=Nn();r(t.prototype,e.prototype),r(t,e);{let p=l(n.prototype);for(let g=0;g<p.length;g++){let f=p[g];t.prototype[f]||(t.prototype[f]=n.prototype[f])}}function t(p){if(!(this instanceof t))return new t(p);e.call(this,p),n.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}o(t.prototype,{writable:{__proto__:null,...a(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(n.prototype,"writableLength")},writableFinished:{__proto__:null,...a(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});var s;function u(){return s===void 0&&(s={}),s}t.fromWeb=function(p,g){return u().newStreamDuplexFromReadableWritablePair(p,g)},t.toWeb=function(p){return u().newReadableWritablePairFromDuplex(p)};var d;t.from=function(p){return d||(d=wl()),d(p,"body")}}),fo=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o,Symbol:a}=Ue();h.exports=t;var{ERR_METHOD_NOT_IMPLEMENTED:l}=qe().codes,r=st(),{getHighWaterMark:e}=tr();o(t.prototype,r.prototype),o(t,r);var n=a("kCallback");function t(d){if(!(this instanceof t))return new t(d);let p=d?e(this,d,"readableHighWaterMark",!0):null;p===0&&(d={...d,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:d.writableHighWaterMark||0}),r.call(this,d),this._readableState.sync=!1,this[n]=null,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",u)}function s(d){typeof this._flush=="function"&&!this.destroyed?this._flush((p,g)=>{if(p){d?d(p):this.destroy(p);return}g!=null&&this.push(g),this.push(null),d&&d()}):(this.push(null),d&&d())}function u(){this._final!==s&&s.call(this)}t.prototype._final=s,t.prototype._transform=function(d,p,g){throw new l("_transform()")},t.prototype._write=function(d,p,g){let f=this._readableState,b=this._writableState,y=f.length;this._transform(d,p,(_,A)=>{if(_){g(_);return}A!=null&&this.push(A),b.ended||y===f.length||f.length<f.highWaterMark?g():this[n]=g})},t.prototype._read=function(){if(this[n]){let d=this[n];this[n]=null,d()}}}),po=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o}=Ue();h.exports=l;var a=fo();o(l.prototype,a.prototype),o(l,a);function l(r){if(!(this instanceof l))return new l(r);a.call(this,r)}l.prototype._transform=function(r,e,n){n(null,r)}}),Fn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayIsArray:a,Promise:l,SymbolAsyncIterator:r,SymbolDispose:e}=Ue(),n=mt(),{once:t}=$e(),s=Ut(),u=st(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:b,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:_}=qe(),{validateFunction:A,validateAbortSignal:w}=Qt(),{isIterable:I,isReadable:k,isReadableNodeStream:E,isNodeStream:T,isTransformStream:O,isWebStream:H,isReadableStream:G,isReadableFinished:de}=ot(),U=globalThis.AbortController||Vt().AbortController,$,z,F;function me(J,_e,K){let M=!1;J.on("close",()=>{M=!0});let Z=n(J,{readable:_e,writable:K},V=>{M=!V});return{destroy:V=>{M||(M=!0,s.destroyer(J,V||new b("pipe")))},cleanup:Z}}function le(J){return A(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function pe(J){if(I(J))return J;if(E(J))return we(J);throw new p("val",["Readable","Iterable","AsyncIterable"],J)}async function*we(J){z||(z=rr()),yield*z.prototype[r].call(J)}async function Q(J,_e,K,{end:M}){let Z,V=null,j=re=>{if(re&&(Z=re),V){let x=V;V=null,x()}},W=()=>new l((re,x)=>{Z?x(Z):V=()=>{Z?x(Z):re()}});_e.on("drain",j);let ue=n(_e,{readable:!1},j);try{_e.writableNeedDrain&&await W();for await(let re of J)_e.write(re)||await W();M&&(_e.end(),await W()),K()}catch(re){K(Z!==re?d(Z,re):re)}finally{ue(),_e.off("drain",j)}}async function he(J,_e,K,{end:M}){O(_e)&&(_e=_e.writable);let Z=_e.getWriter();try{for await(let V of J)await Z.ready,Z.write(V).catch(()=>{});await Z.ready,M&&await Z.close(),K()}catch(V){try{await Z.abort(V),K(V)}catch(j){K(j)}}}function P(...J){return ce(J,t(le(J)))}function ce(J,_e,K){if(J.length===1&&a(J[0])&&(J=J[0]),J.length<2)throw new f("streams");let M=new U,Z=M.signal,V=K?.signal,j=[];w(V,"options.signal");function W(){ee(new _)}F=F||$e().addAbortListener;let ue;V&&(ue=F(V,W));let re,x,D=[],q=0;function te(ge){ee(ge,--q===0)}function ee(ge,Y){var Se;if(ge&&(!re||re.code==="ERR_STREAM_PREMATURE_CLOSE")&&(re=ge),!(!re&&!Y)){for(;D.length;)D.shift()(re);(Se=ue)===null||Se===void 0||Se[e](),M.abort(),Y&&(re||j.forEach(c=>c()),o.nextTick(_e,re,x))}}let ie;for(let ge=0;ge<J.length;ge++){let Y=J[ge],Se=ge<J.length-1,c=ge>0,m=Se||K?.end!==!1,v=ge===J.length-1;if(T(Y)){let R=function(N){N&&N.name!=="AbortError"&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"&&te(N)};if(m){let{destroy:N,cleanup:X}=me(Y,Se,c);D.push(N),k(Y)&&v&&j.push(X)}Y.on("error",R),k(Y)&&v&&j.push(()=>{Y.removeListener("error",R)})}if(ge===0)if(typeof Y=="function"){if(ie=Y({signal:Z}),!I(ie))throw new g("Iterable, AsyncIterable or Stream","source",ie)}else I(Y)||E(Y)||O(Y)?ie=Y:ie=u.from(Y);else if(typeof Y=="function"){if(O(ie)){var L;ie=pe((L=ie)===null||L===void 0?void 0:L.readable)}else ie=pe(ie);if(ie=Y(ie,{signal:Z}),Se){if(!I(ie,!0))throw new g("AsyncIterable",`transform[${ge-1}]`,ie)}else{var ne;$||($=po());let R=new $({objectMode:!0}),N=(ne=ie)===null||ne===void 0?void 0:ne.then;if(typeof N=="function")q++,N.call(ie,Ce=>{x=Ce,Ce!=null&&R.write(Ce),m&&R.end(),o.nextTick(te)},Ce=>{R.destroy(Ce),o.nextTick(te,Ce)});else if(I(ie,!0))q++,Q(ie,R,te,{end:m});else if(G(ie)||O(ie)){let Ce=ie.readable||ie;q++,Q(Ce,R,te,{end:m})}else throw new g("AsyncIterable or Promise","destination",ie);ie=R;let{destroy:X,cleanup:be}=me(ie,!1,!0);D.push(X),v&&j.push(be)}}else if(T(Y)){if(E(ie)){q+=2;let R=ye(ie,Y,te,{end:m});k(Y)&&v&&j.push(R)}else if(O(ie)||G(ie)){let R=ie.readable||ie;q++,Q(R,Y,te,{end:m})}else if(I(ie))q++,Q(ie,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else if(H(Y)){if(E(ie))q++,he(pe(ie),Y,te,{end:m});else if(G(ie)||I(ie))q++,he(ie,Y,te,{end:m});else if(O(ie))q++,he(ie.readable,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else ie=u.from(Y)}return(Z!=null&&Z.aborted||V!=null&&V.aborted)&&o.nextTick(W),ie}function ye(J,_e,K,{end:M}){let Z=!1;if(_e.on("close",()=>{Z||K(new y)}),J.pipe(_e,{end:!1}),M){let V=function(){Z=!0,_e.end()};de(J)?o.nextTick(V):J.once("end",V)}else K();return n(J,{readable:!0,writable:!1},V=>{let j=J._readableState;V&&V.code==="ERR_STREAM_PREMATURE_CLOSE"&&j&&j.ended&&!j.errored&&!j.errorEmitted?J.once("end",K).once("error",K):K(V)}),n(_e,{readable:!1,writable:!0},K)}h.exports={pipelineImpl:ce,pipeline:P}}),go=fe((i,h)=>{oe(),ae(),se();var{pipeline:o}=Fn(),a=st(),{destroyer:l}=Ut(),{isNodeStream:r,isReadable:e,isWritable:n,isWebStream:t,isTransformStream:s,isWritableStream:u,isReadableStream:d}=ot(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:f}}=qe(),b=mt();h.exports=function(...y){if(y.length===0)throw new f("streams");if(y.length===1)return a.from(y[0]);let _=[...y];if(typeof y[0]=="function"&&(y[0]=a.from(y[0])),typeof y[y.length-1]=="function"){let U=y.length-1;y[U]=a.from(y[U])}for(let U=0;U<y.length;++U)if(!(!r(y[U])&&!t(y[U]))){if(U<y.length-1&&!(e(y[U])||d(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be readable");if(U>0&&!(n(y[U])||u(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be writable")}let A,w,I,k,E;function T(U){let $=k;k=null,$?$(U):U?E.destroy(U):!de&&!G&&E.destroy()}let O=y[0],H=o(y,T),G=!!(n(O)||u(O)||s(O)),de=!!(e(H)||d(H)||s(H));if(E=new a({writableObjectMode:!!(O!=null&&O.writableObjectMode),readableObjectMode:!!(H!=null&&H.readableObjectMode),writable:G,readable:de}),G){if(r(O))E._write=function($,z,F){O.write($,z)?F():A=F},E._final=function($){O.end(),w=$},O.on("drain",function(){if(A){let $=A;A=null,$()}});else if(t(O)){let $=(s(O)?O.writable:O).getWriter();E._write=async function(z,F,me){try{await $.ready,$.write(z).catch(()=>{}),me()}catch(le){me(le)}},E._final=async function(z){try{await $.ready,$.close().catch(()=>{}),w=z}catch(F){z(F)}}}let U=s(H)?H.readable:H;b(U,()=>{if(w){let $=w;w=null,$()}})}if(de){if(r(H))H.on("readable",function(){if(I){let U=I;I=null,U()}}),H.on("end",function(){E.push(null)}),E._read=function(){for(;;){let U=H.read();if(U===null){I=E._read;return}if(!E.push(U))return}};else if(t(H)){let U=(s(H)?H.readable:H).getReader();E._read=async function(){for(;;)try{let{value:$,done:z}=await U.read();if(!E.push($))return;if(z){E.push(null);return}}catch{return}}}}return E._destroy=function(U,$){!U&&k!==null&&(U=new p),I=null,A=null,w=null,k===null?$(U):(k=$,r(H)&&l(H,U))},E}}),vl=fe((i,h)=>{oe(),ae(),se();var o=globalThis.AbortController||Vt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:l,ERR_MISSING_ARGS:r,ERR_OUT_OF_RANGE:e},AbortError:n}=qe(),{validateAbortSignal:t,validateInteger:s,validateObject:u}=Qt(),d=Ue().Symbol("kWeak"),p=Ue().Symbol("kResistStopPropagation"),{finished:g}=mt(),f=go(),{addAbortSignalNoValidate:b}=er(),{isWritable:y,isNodeStream:_}=ot(),{deprecate:A}=$e(),{ArrayPrototypePush:w,Boolean:I,MathFloor:k,Number:E,NumberIsNaN:T,Promise:O,PromiseReject:H,PromiseResolve:G,PromisePrototypeThen:de,Symbol:U}=Ue(),$=U("kEmpty"),z=U("kEof");function F(V,j){if(j!=null&&u(j,"options"),j?.signal!=null&&t(j.signal,"options.signal"),_(V)&&!y(V))throw new a("stream",V,"must be writable");let W=f(this,V);return j!=null&&j.signal&&b(j.signal,W),W}function me(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);j!=null&&u(j,"options"),j?.signal!=null&&t(j.signal,"options.signal");let W=1;j?.concurrency!=null&&(W=k(j.concurrency));let ue=W-1;return j?.highWaterMark!=null&&(ue=k(j.highWaterMark)),s(W,"options.concurrency",1),s(ue,"options.highWaterMark",0),ue+=W,(async function*(){let re=$e().AbortSignalAny([j?.signal].filter(I)),x=this,D=[],q={signal:re},te,ee,ie=!1,L=0;function ne(){ie=!0,ge()}function ge(){L-=1,Y()}function Y(){ee&&!ie&&L<W&&D.length<ue&&(ee(),ee=null)}async function Se(){try{for await(let c of x){if(ie)return;if(re.aborted)throw new n;try{if(c=V(c,q),c===$)continue;c=G(c)}catch(m){c=H(m)}L+=1,de(c,ge,ne),D.push(c),te&&(te(),te=null),!ie&&(D.length>=ue||L>=W)&&await new O(m=>{ee=m})}D.push(z)}catch(c){let m=H(c);de(m,ge,ne),D.push(m)}finally{ie=!0,te&&(te(),te=null)}}Se();try{for(;;){for(;D.length>0;){let c=await D[0];if(c===z)return;if(re.aborted)throw new n;c!==$&&(yield c),D.shift(),Y()}await new O(c=>{te=c})}}finally{ie=!0,ee&&(ee(),ee=null)}}).call(this)}function le(V=void 0){return V!=null&&u(V,"options"),V?.signal!=null&&t(V.signal,"options.signal"),(async function*(){let j=0;for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n({cause:V.signal.reason});yield[j++,ue]}}).call(this)}async function pe(V,j=void 0){for await(let W of P.call(this,V,j))return!0;return!1}async function we(V,j=void 0){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);return!await pe.call(this,async(...W)=>!await V(...W),j)}async function Q(V,j){for await(let W of P.call(this,V,j))return W}async function he(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re),$}for await(let ue of me.call(this,W,j));}function P(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re)?ue:$}return me.call(this,W,j)}var ce=class extends r{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ye(V,j,W){var ue;if(typeof V!="function")throw new l("reducer",["Function","AsyncFunction"],V);W!=null&&u(W,"options"),W?.signal!=null&&t(W.signal,"options.signal");let re=arguments.length>1;if(W!=null&&(ue=W.signal)!==null&&ue!==void 0&&ue.aborted){let ee=new n(void 0,{cause:W.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(ee)),ee}let x=new o,D=x.signal;if(W!=null&&W.signal){let ee={once:!0,[d]:this,[p]:!0};W.signal.addEventListener("abort",()=>x.abort(),ee)}let q=!1;try{for await(let ee of this){var te;if(q=!0,W!=null&&(te=W.signal)!==null&&te!==void 0&&te.aborted)throw new n;re?j=await V(j,ee,{signal:D}):(j=ee,re=!0)}if(!q&&!re)throw new ce}finally{x.abort()}return j}async function J(V){V!=null&&u(V,"options"),V?.signal!=null&&t(V.signal,"options.signal");let j=[];for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n(void 0,{cause:V.signal.reason});w(j,ue)}return j}function _e(V,j){let W=me.call(this,V,j);return(async function*(){for await(let ue of W)yield*ue}).call(this)}function K(V){if(V=E(V),T(V))return 0;if(V<0)throw new e("number",">= 0",V);return V}function M(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&t(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;V--<=0&&(yield re)}}).call(this)}function Z(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&t(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;if(V-- >0&&(yield re),V<=0)return}}).call(this)}h.exports.streamReturningOperators={asIndexedPairs:A(le,"readable.asIndexedPairs will be removed in a future version."),drop:M,filter:P,flatMap:_e,map:me,take:Z,compose:F},h.exports.promiseReturningOperators={every:we,forEach:he,reduce:ye,toArray:J,some:pe,find:Q}}),mo=fe((i,h)=>{oe(),ae(),se();var{ArrayPrototypePop:o,Promise:a}=Ue(),{isIterable:l,isNodeStream:r,isWebStream:e}=ot(),{pipelineImpl:n}=Fn(),{finished:t}=mt();Ao();function s(...u){return new a((d,p)=>{let g,f,b=u[u.length-1];if(b&&typeof b=="object"&&!r(b)&&!l(b)&&!e(b)){let y=o(u);g=y.signal,f=y.end}n(u,(y,_)=>{y?p(y):d(_)},{signal:g,end:f})})}h.exports={finished:t,pipeline:s}}),Ao=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),{ObjectDefineProperty:a,ObjectKeys:l,ReflectApply:r}=Ue(),{promisify:{custom:e}}=$e(),{streamReturningOperators:n,promiseReturningOperators:t}=vl(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=qe(),u=go(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=tr(),{pipeline:g}=Fn(),{destroyer:f}=Ut(),b=mt(),y=mo(),_=ot(),A=h.exports=Ln().Stream;A.isDestroyed=_.isDestroyed,A.isDisturbed=_.isDisturbed,A.isErrored=_.isErrored,A.isReadable=_.isReadable,A.isWritable=_.isWritable,A.Readable=rr();for(let I of l(n)){let k=function(...T){if(new.target)throw s();return A.Readable.from(r(E,this,T))},E=n[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}for(let I of l(t)){let k=function(...T){if(new.target)throw s();return r(E,this,T)},E=t[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Nn(),A.Duplex=st(),A.Transform=fo(),A.PassThrough=po(),A.pipeline=g;var{addAbortSignal:w}=er();A.addAbortSignal=w,A.finished=b,A.destroy=f,A.compose=u,A.setDefaultHighWaterMark=d,A.getDefaultHighWaterMark=p,a(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return y}}),a(g,e,{__proto__:null,enumerable:!0,get(){return y.pipeline}}),a(b,e,{__proto__:null,enumerable:!0,get(){return y.finished}}),A.Stream=A,A._isUint8Array=function(I){return I instanceof Uint8Array},A._uint8ArrayToBuffer=function(I){return o.from(I.buffer,I.byteOffset,I.byteLength)}}),St=fe((i,h)=>{oe(),ae(),se();var o=Ao(),a=mo(),l=o.Readable.destroy;h.exports=o.Readable,h.exports._uint8ArrayToBuffer=o._uint8ArrayToBuffer,h.exports._isUint8Array=o._isUint8Array,h.exports.isDisturbed=o.isDisturbed,h.exports.isErrored=o.isErrored,h.exports.isReadable=o.isReadable,h.exports.Readable=o.Readable,h.exports.Writable=o.Writable,h.exports.Duplex=o.Duplex,h.exports.Transform=o.Transform,h.exports.PassThrough=o.PassThrough,h.exports.addAbortSignal=o.addAbortSignal,h.exports.finished=o.finished,h.exports.destroy=o.destroy,h.exports.destroy=l,h.exports.pipeline=o.pipeline,h.exports.compose=o.compose,Object.defineProperty(o,"promises",{configurable:!0,enumerable:!0,get(){return a}}),h.exports.Stream=o.Stream,h.exports.default=h.exports}),_l=fe((i,h)=>{oe(),ae(),se(),typeof Object.create=="function"?h.exports=function(o,a){a&&(o.super_=a,o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:h.exports=function(o,a){if(a){o.super_=a;var l=function(){};l.prototype=a.prototype,o.prototype=new l,o.prototype.constructor=o}}}),El=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=Symbol.for("BufferList");function l(r){if(!(this instanceof l))return new l(r);l._init.call(this,r)}l._init=function(r){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,r&&this.append(r)},l.prototype._new=function(r){return new l(r)},l.prototype._offset=function(r){if(r===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let t=e+this._bufs[n].length;if(r<t||n===this._bufs.length-1)return[n,r-e];e=t}},l.prototype._reverseOffset=function(r){let e=r[0],n=r[1];for(let t=0;t<e;t++)n+=this._bufs[t].length;return n},l.prototype.get=function(r){if(r>this.length||r<0)return;let e=this._offset(r);return this._bufs[e[0]][e[1]]},l.prototype.slice=function(r,e){return typeof r=="number"&&r<0&&(r+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,r,e)},l.prototype.copy=function(r,e,n,t){if((typeof n!="number"||n<0)&&(n=0),(typeof t!="number"||t>this.length)&&(t=this.length),n>=this.length||t<=0)return r||o.alloc(0);let s=!!r,u=this._offset(n),d=t-n,p=d,g=s&&e||0,f=u[1];if(n===0&&t===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(r,g),g+=this._bufs[b].length;return r}if(p<=this._bufs[u[0]].length-f)return s?this._bufs[u[0]].copy(r,e,f,f+p):this._bufs[u[0]].slice(f,f+p);s||(r=o.allocUnsafe(d));for(let b=u[0];b<this._bufs.length;b++){let y=this._bufs[b].length-f;if(p>y)this._bufs[b].copy(r,g,f),g+=y;else{this._bufs[b].copy(r,g,f,f+p),g+=y;break}p-=y,f&&(f=0)}return r.length>g?r.slice(0,g):r},l.prototype.shallowSlice=function(r,e){if(r=r||0,e=typeof e!="number"?this.length:e,r<0&&(r+=this.length),e<0&&(e+=this.length),r===e)return this._new();let n=this._offset(r),t=this._offset(e),s=this._bufs.slice(n[0],t[0]+1);return t[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,t[1]),n[1]!==0&&(s[0]=s[0].slice(n[1])),this._new(s)},l.prototype.toString=function(r,e,n){return this.slice(e,n).toString(r)},l.prototype.consume=function(r){if(r=Math.trunc(r),Number.isNaN(r)||r<=0)return this;for(;this._bufs.length;)if(r>=this._bufs[0].length)r-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(r),this.length-=r;break}return this},l.prototype.duplicate=function(){let r=this._new();for(let e=0;e<this._bufs.length;e++)r.append(this._bufs[e]);return r},l.prototype.append=function(r){if(r==null)return this;if(r.buffer)this._appendBuffer(o.from(r.buffer,r.byteOffset,r.byteLength));else if(Array.isArray(r))for(let e=0;e<r.length;e++)this.append(r[e]);else if(this._isBufferList(r))for(let e=0;e<r._bufs.length;e++)this.append(r._bufs[e]);else typeof r=="number"&&(r=r.toString()),this._appendBuffer(o.from(r));return this},l.prototype._appendBuffer=function(r){this._bufs.push(r),this.length+=r.length},l.prototype.indexOf=function(r,e,n){if(n===void 0&&typeof e=="string"&&(n=e,e=void 0),typeof r=="function"||Array.isArray(r))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof r=="number"?r=o.from([r]):typeof r=="string"?r=o.from(r,n):this._isBufferList(r)?r=r.slice():Array.isArray(r.buffer)?r=o.from(r.buffer,r.byteOffset,r.byteLength):o.isBuffer(r)||(r=o.from(r)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),r.length===0)return e>this.length?this.length:e;let t=this._offset(e),s=t[0],u=t[1];for(;s<this._bufs.length;s++){let d=this._bufs[s];for(;u<d.length;)if(d.length-u>=r.length){let p=d.indexOf(r,u);if(p!==-1)return this._reverseOffset([s,p]);u=d.length-r.length+1}else{let p=this._reverseOffset([s,u]);if(this._match(p,r))return p;u++}u=0}return-1},l.prototype._match=function(r,e){if(this.length-r<e.length)return!1;for(let n=0;n<e.length;n++)if(this.get(r+n)!==e[n])return!1;return!0},(function(){let r={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in r)(function(n){r[n]===null?l.prototype[n]=function(t,s){return this.slice(t,t+s)[n](0,s)}:l.prototype[n]=function(t=0){return this.slice(t,t+r[n])[n](0)}})(e)})(),l.prototype._isBufferList=function(r){return r instanceof l||l.isBufferList(r)},l.isBufferList=function(r){return r!=null&&r[a]},h.exports=l}),Sl=fe((i,h)=>{oe(),ae(),se();var o=St().Duplex,a=_l(),l=El();function r(e){if(!(this instanceof r))return new r(e);if(typeof e=="function"){this._callback=e;let n=(function(t){this._callback&&(this._callback(t),this._callback=null)}).bind(this);this.on("pipe",function(t){t.on("error",n)}),this.on("unpipe",function(t){t.removeListener("error",n)}),e=null}l._init.call(this,e),o.call(this)}a(r,o),Object.assign(r.prototype,l.prototype),r.prototype._new=function(e){return new r(e)},r.prototype._write=function(e,n,t){this._appendBuffer(e),typeof t=="function"&&t()},r.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},r.prototype.end=function(e){o.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},r.prototype._destroy=function(e,n){this._bufs.length=0,this.length=0,n(e)},r.prototype._isBufferList=function(e){return e instanceof r||e instanceof l||r.isBufferList(e)},r.isBufferList=l.isBufferList,h.exports=r,h.exports.BufferListStream=r,h.exports.BufferList=l}),Cl=fe((i,h)=>{oe(),ae(),se();var o=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};h.exports=o}),bo=fe((i,h)=>{oe(),ae(),se();var o=h.exports,{Buffer:a}=(Ve(),Be(We));o.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},o.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},o.requiredHeaderFlagsErrors={};for(let r in o.requiredHeaderFlags){let e=o.requiredHeaderFlags[r];o.requiredHeaderFlagsErrors[r]="Invalid header flag bits, must be 0x"+e.toString(16)+" for "+o.types[r]+" packet"}o.codes={};for(let r in o.types){let e=o.types[r];o.codes[e]=r}o.CMD_SHIFT=4,o.CMD_MASK=240,o.DUP_MASK=8,o.QOS_MASK=3,o.QOS_SHIFT=1,o.RETAIN_MASK=1,o.VARBYTEINT_MASK=127,o.VARBYTEINT_FIN_MASK=128,o.VARBYTEINT_MAX=268435455,o.SESSIONPRESENT_MASK=1,o.SESSIONPRESENT_HEADER=a.from([o.SESSIONPRESENT_MASK]),o.CONNACK_HEADER=a.from([o.codes.connack<<o.CMD_SHIFT]),o.USERNAME_MASK=128,o.PASSWORD_MASK=64,o.WILL_RETAIN_MASK=32,o.WILL_QOS_MASK=24,o.WILL_QOS_SHIFT=3,o.WILL_FLAG_MASK=4,o.CLEAN_SESSION_MASK=2,o.CONNECT_HEADER=a.from([o.codes.connect<<o.CMD_SHIFT]),o.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},o.propertiesCodes={};for(let r in o.properties){let e=o.properties[r];o.propertiesCodes[e]=r}o.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function l(r){return[0,1,2].map(e=>[0,1].map(n=>[0,1].map(t=>{let s=a.alloc(1);return s.writeUInt8(o.codes[r]<<o.CMD_SHIFT|(n?o.DUP_MASK:0)|e<<o.QOS_SHIFT|t,0,!0),s})))}o.PUBLISH_HEADER=l("publish"),o.SUBSCRIBE_HEADER=l("subscribe"),o.SUBSCRIBE_OPTIONS_QOS_MASK=3,o.SUBSCRIBE_OPTIONS_NL_MASK=1,o.SUBSCRIBE_OPTIONS_NL_SHIFT=2,o.SUBSCRIBE_OPTIONS_RAP_MASK=1,o.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,o.SUBSCRIBE_OPTIONS_RH_MASK=3,o.SUBSCRIBE_OPTIONS_RH_SHIFT=4,o.SUBSCRIBE_OPTIONS_RH=[0,16,32],o.SUBSCRIBE_OPTIONS_NL=4,o.SUBSCRIBE_OPTIONS_RAP=8,o.SUBSCRIBE_OPTIONS_QOS=[0,1,2],o.UNSUBSCRIBE_HEADER=l("unsubscribe"),o.ACKS={unsuback:l("unsuback"),puback:l("puback"),pubcomp:l("pubcomp"),pubrel:l("pubrel"),pubrec:l("pubrec")},o.SUBACK_HEADER=a.from([o.codes.suback<<o.CMD_SHIFT]),o.VERSION3=a.from([3]),o.VERSION4=a.from([4]),o.VERSION5=a.from([5]),o.VERSION131=a.from([131]),o.VERSION132=a.from([132]),o.QOS=[0,1,2].map(r=>a.from([r])),o.EMPTY={pingreq:a.from([o.codes.pingreq<<4,0]),pingresp:a.from([o.codes.pingresp<<4,0]),disconnect:a.from([o.codes.disconnect<<4,0])},o.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},o.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},o.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},o.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),kl=fe((i,h)=>{oe(),ae(),se();var o=1e3,a=o*60,l=a*60,r=l*24,e=r*7,n=r*365.25;h.exports=function(p,g){g=g||{};var f=typeof p;if(f==="string"&&p.length>0)return t(p);if(f==="number"&&isFinite(p))return g.long?u(p):s(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function t(p){if(p=String(p),!(p.length>100)){var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(g){var f=parseFloat(g[1]),b=(g[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return f*n;case"weeks":case"week":case"w":return f*e;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*l;case"minutes":case"minute":case"mins":case"min":case"m":return f*a;case"seconds":case"second":case"secs":case"sec":case"s":return f*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function s(p){var g=Math.abs(p);return g>=r?Math.round(p/r)+"d":g>=l?Math.round(p/l)+"h":g>=a?Math.round(p/a)+"m":g>=o?Math.round(p/o)+"s":p+"ms"}function u(p){var g=Math.abs(p);return g>=r?d(p,g,r,"day"):g>=l?d(p,g,l,"hour"):g>=a?d(p,g,a,"minute"):g>=o?d(p,g,o,"second"):p+" ms"}function d(p,g,f,b){var y=g>=f*1.5;return Math.round(p/f)+" "+b+(y?"s":"")}}),Tl=fe((i,h)=>{oe(),ae(),se();function o(a){r.debug=r,r.default=r,r.coerce=d,r.disable=s,r.enable=n,r.enabled=u,r.humanize=kl(),r.destroy=p,Object.keys(a).forEach(g=>{r[g]=a[g]}),r.names=[],r.skips=[],r.formatters={};function l(g){let f=0;for(let b=0;b<g.length;b++)f=(f<<5)-f+g.charCodeAt(b),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=l;function r(g){let f,b=null,y,_;function A(...w){if(!A.enabled)return;let I=A,k=Number(new Date),E=k-(f||k);I.diff=E,I.prev=f,I.curr=k,f=k,w[0]=r.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let T=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(O,H)=>{if(O==="%%")return"%";T++;let G=r.formatters[H];if(typeof G=="function"){let de=w[T];O=G.call(I,de),w.splice(T,1),T--}return O}),r.formatArgs.call(I,w),(I.log||r.log).apply(I,w)}return A.namespace=g,A.useColors=r.useColors(),A.color=r.selectColor(g),A.extend=e,A.destroy=r.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(y!==r.namespaces&&(y=r.namespaces,_=r.enabled(g)),_),set:w=>{b=w}}),typeof r.init=="function"&&r.init(A),A}function e(g,f){let b=r(this.namespace+(typeof f>"u"?":":f)+g);return b.log=this.log,b}function n(g){r.save(g),r.namespaces=g,r.names=[],r.skips=[];let f=(typeof g=="string"?g:"").trim().replace(" ",",").split(",").filter(Boolean);for(let b of f)b[0]==="-"?r.skips.push(b.slice(1)):r.names.push(b)}function t(g,f){let b=0,y=0,_=-1,A=0;for(;b<g.length;)if(y<f.length&&(f[y]===g[b]||f[y]==="*"))f[y]==="*"?(_=y,A=b,y++):(b++,y++);else if(_!==-1)y=_+1,A++,b=A;else return!1;for(;y<f.length&&f[y]==="*";)y++;return y===f.length}function s(){let g=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),g}function u(g){for(let f of r.skips)if(t(g,f))return!1;for(let f of r.names)if(t(g,f))return!0;return!1}function d(g){return g instanceof Error?g.stack||g.message:g}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}h.exports=o}),at=fe((i,h)=>{oe(),ae(),se(),i.formatArgs=a,i.save=l,i.load=r,i.useColors=o,i.storage=e(),i.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+h.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;t.splice(1,0,s,"color: inherit");let u=0,d=0;t[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),t.splice(d,0,s)}i.log=console.debug||console.log||(()=>{});function l(t){try{t?i.storage.setItem("debug",t):i.storage.removeItem("debug")}catch{}}function r(){let t;try{t=i.storage.getItem("debug")}catch{}return!t&&typeof ke<"u"&&"env"in ke&&(t=ke.env.DEBUG),t}function e(){try{return localStorage}catch{}}h.exports=Tl()(i);var{formatters:n}=h.exports;n.j=function(t){try{return JSON.stringify(t)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}}),Il=fe((i,h)=>{oe(),ae(),se();var o=Sl(),{EventEmitter:a}=(_t(),Be(gt)),l=Cl(),r=bo(),e=at()("mqtt-packet:parser"),n=class ui extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(s){return this instanceof ui?(this.settings=s||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new ui().parser(s)}_resetState(){e("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new l,this.error=null,this._list=o(),this._stateCounter=0}parse(s){for(this.error&&this._resetState(),this._list.append(s),e("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,e("parse: state complete. _stateCounter is now: %d",this._stateCounter),e("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return e("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let s=this._list.readUInt8(0),u=s>>r.CMD_SHIFT;this.packet.cmd=r.types[u];let d=s&15,p=r.requiredHeaderFlags[u];return p!=null&&d!==p?this._emitError(new Error(r.requiredHeaderFlagsErrors[u])):(this.packet.retain=(s&r.RETAIN_MASK)!==0,this.packet.qos=s>>r.QOS_SHIFT&r.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(s&r.DUP_MASK)!==0,e("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let s=this._parseVarByteNum(!0);return s&&(this.packet.length=s.value,this._list.consume(s.bytes)),e("_parseLength %d",s.value),!!s}_parsePayload(){e("_parsePayload: payload %O",this._list);let s=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}s=!0}return e("_parsePayload complete result: %s",s),s}_parseConnect(){e("_parseConnect");let s,u,d,p,g={},f=this.packet,b=this._parseString();if(b===null)return this._emitError(new Error("Cannot parse protocolId"));if(b!=="MQTT"&&b!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(f.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(f.protocolVersion=this._list.readUInt8(this._pos),f.protocolVersion>=128&&(f.bridgeMode=!0,f.protocolVersion=f.protocolVersion-128),f.protocolVersion!==3&&f.protocolVersion!==4&&f.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));g.username=this._list.readUInt8(this._pos)&r.USERNAME_MASK,g.password=this._list.readUInt8(this._pos)&r.PASSWORD_MASK,g.will=this._list.readUInt8(this._pos)&r.WILL_FLAG_MASK;let y=!!(this._list.readUInt8(this._pos)&r.WILL_RETAIN_MASK),_=(this._list.readUInt8(this._pos)&r.WILL_QOS_MASK)>>r.WILL_QOS_SHIFT;if(g.will)f.will={},f.will.retain=y,f.will.qos=_;else{if(y)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(_)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(f.clean=(this._list.readUInt8(this._pos)&r.CLEAN_SESSION_MASK)!==0,this._pos++,f.keepalive=this._parseNum(),f.keepalive===-1)return this._emitError(new Error("Packet too short"));if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.properties=w)}let A=this._parseString();if(A===null)return this._emitError(new Error("Packet too short"));if(f.clientId=A,e("_parseConnect: packet.clientId: %s",f.clientId),g.will){if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.will.properties=w)}if(s=this._parseString(),s===null)return this._emitError(new Error("Cannot parse will topic"));if(f.will.topic=s,e("_parseConnect: packet.will.topic: %s",f.will.topic),u=this._parseBuffer(),u===null)return this._emitError(new Error("Cannot parse will payload"));f.will.payload=u,e("_parseConnect: packet.will.paylaod: %s",f.will.payload)}if(g.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));f.username=p,e("_parseConnect: packet.username: %s",f.username)}if(g.password){if(d=this._parseBuffer(),d===null)return this._emitError(new Error("Cannot parse password"));f.password=d}return this.settings=f,e("_parseConnect: complete"),f}_parseConnack(){e("_parseConnack");let s=this.packet;if(this._list.length<1)return null;let u=this._list.readUInt8(this._pos++);if(u>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(s.sessionPresent=!!(u&r.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?s.reasonCode=this._list.readUInt8(this._pos++):s.reasonCode=0;else{if(this._list.length<2)return null;s.returnCode=this._list.readUInt8(this._pos++)}if(s.returnCode===-1||s.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d)}e("_parseConnack: complete")}_parsePublish(){e("_parsePublish");let s=this.packet;if(s.topic=this._parseString(),s.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(s.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}s.payload=this._list.slice(this._pos,s.length),e("_parsePublish: payload from buffer list: %o",s.payload)}}_parseSubscribe(){e("_parseSubscribe");let s=this.packet,u,d,p,g,f,b,y;if(s.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(s.properties=_)}if(s.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<s.length;){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=s.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(d=this._parseByte(),this.settings.protocolVersion===5){if(d&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(d&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(p=d&r.SUBSCRIBE_OPTIONS_QOS_MASK,p>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(b=(d>>r.SUBSCRIBE_OPTIONS_NL_SHIFT&r.SUBSCRIBE_OPTIONS_NL_MASK)!==0,f=(d>>r.SUBSCRIBE_OPTIONS_RAP_SHIFT&r.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,g=d>>r.SUBSCRIBE_OPTIONS_RH_SHIFT&r.SUBSCRIBE_OPTIONS_RH_MASK,g>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));y={topic:u,qos:p},this.settings.protocolVersion===5?(y.nl=b,y.rap=f,y.rh=g):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),e("_parseSubscribe: push subscription `%s` to subscription",y),s.subscriptions.push(y)}}}_parseSuback(){e("_parseSuback");let s=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let u=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!r.MQTT5_SUBACK_CODES[u])return this._emitError(new Error("Invalid suback code"))}else if(u>2&&u!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(u)}}}_parseUnsubscribe(){e("_parseUnsubscribe");let s=this.packet;if(s.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<s.length;){let u=this._parseString();if(u===null)return this._emitError(new Error("Cannot parse topic"));e("_parseUnsubscribe: push topic `%s` to unsubscriptions",u),s.unsubscriptions.push(u)}}}_parseUnsuback(){e("_parseUnsuback");let s=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&s.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(s.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let u=this._parseProperties();for(Object.getOwnPropertyNames(u).length&&(s.properties=u),s.granted=[];this._pos<this.packet.length;){let d=this._list.readUInt8(this._pos++);if(!r.MQTT5_UNSUBACK_CODES[d])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(d)}}}_parseConfirmation(){e("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let s=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(s.length>2){switch(s.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!r.MQTT5_PUBACK_PUBREC_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!r.MQTT5_PUBREL_PUBCOMP_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}e("_parseConfirmation: packet.reasonCode `%d`",s.reasonCode)}else s.reasonCode=0;if(s.length>3){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}}return!0}_parseDisconnect(){let s=this.packet;if(e("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(s.reasonCode=this._parseByte(),r.MQTT5_DISCONNECT_CODES[s.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):s.reasonCode=0;let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}return e("_parseDisconnect result: true"),!0}_parseAuth(){e("_parseAuth");let s=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(s.reasonCode=this._parseByte(),!r.MQTT5_AUTH_CODES[s.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let u=this._parseProperties();return Object.getOwnPropertyNames(u).length&&(s.properties=u),e("_parseAuth: result: true"),!0}_parseMessageId(){let s=this.packet;return s.messageId=this._parseNum(),s.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(e("_parseMessageId: packet.messageId %d",s.messageId),!0)}_parseString(s){let u=this._parseNum(),d=u+this._pos;if(u===-1||d>this._list.length||d>this.packet.length)return null;let p=this._list.toString("utf8",this._pos,d);return this._pos+=u,e("_parseString: result: %s",p),p}_parseStringPair(){return e("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let s=this._parseNum(),u=s+this._pos;if(s===-1||u>this._list.length||u>this.packet.length)return null;let d=this._list.slice(this._pos,u);return this._pos+=s,e("_parseBuffer: result: %o",d),d}_parseNum(){if(this._list.length-this._pos<2)return-1;let s=this._list.readUInt16BE(this._pos);return this._pos+=2,e("_parseNum: result: %s",s),s}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let s=this._list.readUInt32BE(this._pos);return this._pos+=4,e("_parse4ByteNum: result: %s",s),s}_parseVarByteNum(s){e("_parseVarByteNum");let u=4,d=0,p=1,g=0,f=!1,b,y=this._pos?this._pos:0;for(;d<u&&y+d<this._list.length;){if(b=this._list.readUInt8(y+d++),g+=p*(b&r.VARBYTEINT_MASK),p*=128,(b&r.VARBYTEINT_FIN_MASK)===0){f=!0;break}if(this._list.length<=d)break}return!f&&d===u&&this._list.length>=d&&this._emitError(new Error("Invalid variable byte integer")),y&&(this._pos+=d),f?s?f={bytes:d,value:g}:f=g:f=!1,e("_parseVarByteNum: result: %o",f),f}_parseByte(){let s;return this._pos<this._list.length&&(s=this._list.readUInt8(this._pos),this._pos++),e("_parseByte: result: %o",s),s}_parseByType(s){switch(e("_parseByType: type: %s",s),s){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){e("_parseProperties");let s=this._parseVarByteNum(),u=this._pos+s,d={};for(;this._pos<u;){let p=this._parseByte();if(!p)return this._emitError(new Error("Cannot parse property code type")),!1;let g=r.propertiesCodes[p];if(!g)return this._emitError(new Error("Unknown property")),!1;if(g==="userProperties"){d[g]||(d[g]=Object.create(null));let f=this._parseByType(r.propertiesTypes[g]);if(d[g][f.name])if(Array.isArray(d[g][f.name]))d[g][f.name].push(f.value);else{let b=d[g][f.name];d[g][f.name]=[b],d[g][f.name].push(f.value)}else d[g][f.name]=f.value;continue}d[g]?Array.isArray(d[g])?d[g].push(this._parseByType(r.propertiesTypes[g])):(d[g]=[d[g]],d[g].push(this._parseByType(r.propertiesTypes[g]))):d[g]=this._parseByType(r.propertiesTypes[g])}return d}_newPacket(){return e("_newPacket"),this.packet&&(this._list.consume(this.packet.length),e("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),e("_newPacket: new packet"),this.packet=new l,this._pos=0,!0}_emitError(s){e("_emitError",s),this.error=s,this.emit("error",s)}};h.exports=n}),Bl=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=65536,l={},r=o.isBuffer(o.from([1,2]).subarray(0,1));function e(u){let d=o.allocUnsafe(2);return d.writeUInt8(u>>8,0),d.writeUInt8(u&255,1),d}function n(){for(let u=0;u<a;u++)l[u]=e(u)}function t(u){let d=0,p=0,g=o.allocUnsafe(4);do d=u%128|0,u=u/128|0,u>0&&(d=d|128),g.writeUInt8(d,p++);while(u>0&&p<4);return u>0&&(p=0),r?g.subarray(0,p):g.slice(0,p)}function s(u){let d=o.allocUnsafe(4);return d.writeUInt32BE(u,0),d}h.exports={cache:l,generateCache:n,generateNumber:e,genBufVariableByteInt:t,generate4ByteBuffer:s}}),Ol=fe((i,h)=>{oe(),ae(),se(),typeof ke>"u"||!ke.version||ke.version.indexOf("v0.")===0||ke.version.indexOf("v1.")===0&&ke.version.indexOf("v1.8.")!==0?h.exports={nextTick:o}:h.exports=ke;function o(a,l,r,e){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,t,s;switch(n){case 0:case 1:return ke.nextTick(a);case 2:return ke.nextTick(function(){a.call(null,l)});case 3:return ke.nextTick(function(){a.call(null,l,r)});case 4:return ke.nextTick(function(){a.call(null,l,r,e)});default:for(t=new Array(n-1),s=0;s<t.length;)t[s++]=arguments[s];return ke.nextTick(function(){a.apply(null,t)})}}}),yo=fe((i,h)=>{oe(),ae(),se();var o=bo(),{Buffer:a}=(Ve(),Be(We)),l=a.allocUnsafe(0),r=a.from([0]),e=Bl(),n=Ol().nextTick,t=at()("mqtt-packet:writeToStream"),s=e.cache,u=e.generateNumber,d=e.generateCache,p=e.genBufVariableByteInt,g=e.generate4ByteBuffer,f=le,b=!0;function y(K,M,Z){switch(t("generate called"),M.cork&&(M.cork(),n(_,M)),b&&(b=!1,d()),t("generate: packet.cmd: %s",K.cmd),K.cmd){case"connect":return A(K,M);case"connack":return w(K,M,Z);case"publish":return I(K,M,Z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return k(K,M,Z);case"subscribe":return E(K,M,Z);case"suback":return T(K,M,Z);case"unsubscribe":return O(K,M,Z);case"unsuback":return H(K,M,Z);case"pingreq":case"pingresp":return G(K,M);case"disconnect":return de(K,M,Z);case"auth":return U(K,M,Z);default:return M.destroy(new Error("Unknown command")),!1}}Object.defineProperty(y,"cacheNumbers",{get(){return f===le},set(K){K?((!s||Object.keys(s).length===0)&&(b=!0),f=le):(b=!1,f=pe)}});function _(K){K.uncork()}function A(K,M,Z){let V=K||{},j=V.protocolId||"MQTT",W=V.protocolVersion||4,ue=V.will,re=V.clean,x=V.keepalive||0,D=V.clientId||"",q=V.username,te=V.password,ee=V.properties;re===void 0&&(re=!0);let ie=0;if(typeof j!="string"&&!a.isBuffer(j))return M.destroy(new Error("Invalid protocolId")),!1;if(ie+=j.length+2,W!==3&&W!==4&&W!==5)return M.destroy(new Error("Invalid protocol version")),!1;if(ie+=1,(typeof D=="string"||a.isBuffer(D))&&(D||W>=4)&&(D||re))ie+=a.byteLength(D)+2;else{if(W<4)return M.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(re*1===0)return M.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!==0)return M.destroy(new Error("Invalid keepalive")),!1;ie+=2,ie+=1;let L,ne;if(W===5){if(L=he(M,ee),!L)return!1;ie+=L.length}if(ue){if(typeof ue!="object")return M.destroy(new Error("Invalid will")),!1;if(!ue.topic||typeof ue.topic!="string")return M.destroy(new Error("Invalid will topic")),!1;if(ie+=a.byteLength(ue.topic)+2,ie+=2,ue.payload)if(ue.payload.length>=0)typeof ue.payload=="string"?ie+=a.byteLength(ue.payload):ie+=ue.payload.length;else return M.destroy(new Error("Invalid will payload")),!1;if(ne={},W===5){if(ne=he(M,ue.properties),!ne)return!1;ie+=ne.length}}let ge=!1;if(q!=null)if(_e(q))ge=!0,ie+=a.byteLength(q)+2;else return M.destroy(new Error("Invalid username")),!1;if(te!=null){if(!ge)return M.destroy(new Error("Username is required to use password")),!1;if(_e(te))ie+=J(te)+2;else return M.destroy(new Error("Invalid password")),!1}M.write(o.CONNECT_HEADER),z(M,ie),Q(M,j),V.bridgeMode&&(W+=128),M.write(W===131?o.VERSION131:W===132?o.VERSION132:W===4?o.VERSION4:W===5?o.VERSION5:o.VERSION3);let Y=0;return Y|=q!=null?o.USERNAME_MASK:0,Y|=te!=null?o.PASSWORD_MASK:0,Y|=ue&&ue.retain?o.WILL_RETAIN_MASK:0,Y|=ue&&ue.qos?ue.qos<<o.WILL_QOS_SHIFT:0,Y|=ue?o.WILL_FLAG_MASK:0,Y|=re?o.CLEAN_SESSION_MASK:0,M.write(a.from([Y])),f(M,x),W===5&&L.write(),Q(M,D),ue&&(W===5&&ne.write(),F(M,ue.topic),Q(M,ue.payload)),q!=null&&Q(M,q),te!=null&&Q(M,te),!0}function w(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=V===5?j.reasonCode:j.returnCode,ue=j.properties,re=2;if(typeof W!="number")return M.destroy(new Error("Invalid return code")),!1;let x=null;if(V===5){if(x=he(M,ue),!x)return!1;re+=x.length}return M.write(o.CONNACK_HEADER),z(M,re),M.write(j.sessionPresent?o.SESSIONPRESENT_HEADER:r),M.write(a.from([W])),x?.write(),!0}function I(K,M,Z){t("publish: packet: %o",K);let V=Z?Z.protocolVersion:4,j=K||{},W=j.qos||0,ue=j.retain?o.RETAIN_MASK:0,re=j.topic,x=j.payload||l,D=j.messageId,q=j.properties,te=0;if(typeof re=="string")te+=a.byteLength(re)+2;else if(a.isBuffer(re))te+=re.length+2;else return M.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(x)?te+=x.length:te+=a.byteLength(x),W&&typeof D!="number")return M.destroy(new Error("Invalid messageId")),!1;W&&(te+=2);let ee=null;if(V===5){if(ee=he(M,q),!ee)return!1;te+=ee.length}return M.write(o.PUBLISH_HEADER[W][j.dup?1:0][ue?1:0]),z(M,te),f(M,J(re)),M.write(re),W>0&&f(M,D),ee?.write(),t("publish: payload: %o",x),M.write(x)}function k(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.cmd||"puback",ue=j.messageId,re=j.dup&&W==="pubrel"?o.DUP_MASK:0,x=0,D=j.reasonCode,q=j.properties,te=V===5?3:2;if(W==="pubrel"&&(x=1),typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;let ee=null;if(V===5&&typeof q=="object"){if(ee=P(M,q,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[W][x][re][0]),te===3&&(te+=D!==0?1:-1),z(M,te),f(M,ue),V===5&&te!==2&&M.write(a.from([D])),ee!==null?ee.write():te===4&&M.write(a.from([0])),!0}function E(K,M,Z){t("subscribe: packet: ");let V=Z?Z.protocolVersion:4,j=K||{},W=j.dup?o.DUP_MASK:0,ue=j.messageId,re=j.subscriptions,x=j.properties,D=0;if(typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;D+=2;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}if(typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){let ie=re[ee].topic,L=re[ee].qos;if(typeof ie!="string")return M.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof L!="number")return M.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(V===5){if(typeof(re[ee].nl||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(re[ee].rap||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let ne=re[ee].rh||0;if(typeof ne!="number"||ne>2)return M.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}D+=a.byteLength(ie)+2+1}else return M.destroy(new Error("Invalid subscriptions")),!1;t("subscribe: writing to stream: %o",o.SUBSCRIBE_HEADER),M.write(o.SUBSCRIBE_HEADER[1][W?1:0][0]),z(M,D),f(M,ue),q!==null&&q.write();let te=!0;for(let ee of re){let ie=ee.topic,L=ee.qos,ne=+ee.nl,ge=+ee.rap,Y=ee.rh,Se;F(M,ie),Se=o.SUBSCRIBE_OPTIONS_QOS[L],V===5&&(Se|=ne?o.SUBSCRIBE_OPTIONS_NL:0,Se|=ge?o.SUBSCRIBE_OPTIONS_RAP:0,Se|=Y?o.SUBSCRIBE_OPTIONS_RH[Y]:0),te=M.write(a.from([Se]))}return te}function T(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.granted,re=j.properties,x=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(x+=2,typeof ue=="object"&&ue.length)for(let q=0;q<ue.length;q+=1){if(typeof ue[q]!="number")return M.destroy(new Error("Invalid qos vector")),!1;x+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let D=null;if(V===5){if(D=P(M,re,Z,x),!D)return!1;x+=D.length}return M.write(o.SUBACK_HEADER),z(M,x),f(M,W),D!==null&&D.write(),M.write(a.from(ue))}function O(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.unsubscriptions,x=j.properties,D=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(D+=2,typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){if(typeof re[ee]!="string")return M.destroy(new Error("Invalid unsubscriptions")),!1;D+=a.byteLength(re[ee])+2}else return M.destroy(new Error("Invalid unsubscriptions")),!1;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}M.write(o.UNSUBSCRIBE_HEADER[1][ue?1:0][0]),z(M,D),f(M,W),q!==null&&q.write();let te=!0;for(let ee=0;ee<re.length;ee++)te=F(M,re[ee]);return te}function H(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.granted,x=j.properties,D=j.cmd,q=0,te=2;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(V===5)if(typeof re=="object"&&re.length)for(let ie=0;ie<re.length;ie+=1){if(typeof re[ie]!="number")return M.destroy(new Error("Invalid qos vector")),!1;te+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let ee=null;if(V===5){if(ee=P(M,x,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[D][q][ue][0]),z(M,te),f(M,W),ee!==null&&ee.write(),V===5&&M.write(a.from(re)),!0}function G(K,M,Z){return M.write(o.EMPTY[K.cmd])}function de(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0,x=null;if(V===5){if(x=P(M,ue,Z,re),!x)return!1;re+=x.length}return M.write(a.from([o.codes.disconnect<<4])),z(M,re),V===5&&M.write(a.from([W])),x!==null&&x.write(),!0}function U(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0;V!==5&&M.destroy(new Error("Invalid mqtt version for auth packet"));let x=P(M,ue,Z,re);return x?(re+=x.length,M.write(a.from([o.codes.auth<<4])),z(M,re),M.write(a.from([W])),x!==null&&x.write(),!0):!1}var $={};function z(K,M){if(M>o.VARBYTEINT_MAX)return K.destroy(new Error(`Invalid variable byte integer: ${M}`)),!1;let Z=$[M];return Z||(Z=p(M),M<16384&&($[M]=Z)),t("writeVarByteInt: writing to stream: %o",Z),K.write(Z)}function F(K,M){let Z=a.byteLength(M);return f(K,Z),t("writeString: %s",M),K.write(M,"utf8")}function me(K,M,Z){F(K,M),F(K,Z)}function le(K,M){return t("writeNumberCached: number: %d",M),t("writeNumberCached: %o",s[M]),K.write(s[M])}function pe(K,M){let Z=u(M);return t("writeNumberGenerated: %o",Z),K.write(Z)}function we(K,M){let Z=g(M);return t("write4ByteNumber: %o",Z),K.write(Z)}function Q(K,M){typeof M=="string"?F(K,M):M?(f(K,M.length),K.write(M)):f(K,0)}function he(K,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){ye(K,{},0)}};let Z=0;function V(j,W){let ue=o.propertiesTypes[j],re=0;switch(ue){case"byte":{if(typeof W!="boolean")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"int8":{if(typeof W!="number"||W<0||W>255)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"binary":{if(W&&W===null)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(W)+2;break}case"int16":{if(typeof W!="number"||W<0||W>65535)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3;break}case"int32":{if(typeof W!="number"||W<0||W>4294967295)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=5;break}case"var":{if(typeof W!="number"||W<0||W>268435455)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(p(W));break}case"string":{if(typeof W!="string")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3+a.byteLength(W.toString());break}case"pair":{if(typeof W!="object")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=Object.getOwnPropertyNames(W).reduce((x,D)=>{let q=W[D];return Array.isArray(q)?x+=q.reduce((te,ee)=>(te+=3+a.byteLength(D.toString())+2+a.byteLength(ee.toString()),te),0):x+=3+a.byteLength(D.toString())+2+a.byteLength(W[D].toString()),x},0);break}default:return K.destroy(new Error(`Invalid property ${j}: ${W}`)),!1}return re}if(M)for(let j in M){let W=0,ue=0,re=M[j];if(re!==void 0){if(Array.isArray(re))for(let x=0;x<re.length;x++){if(ue=V(j,re[x]),!ue)return!1;W+=ue}else{if(ue=V(j,re),!ue)return!1;W=ue}if(!W)return!1;Z+=W}}return{length:a.byteLength(p(Z))+Z,write(){ye(K,M,Z)}}}function P(K,M,Z,V){let j=["reasonString","userProperties"],W=Z&&Z.properties&&Z.properties.maximumPacketSize?Z.properties.maximumPacketSize:0,ue=he(K,M);if(W)for(;V+ue.length>W;){let re=j.shift();if(re&&M[re])delete M[re],ue=he(K,M);else return!1}return ue}function ce(K,M,Z){switch(o.propertiesTypes[M]){case"byte":{K.write(a.from([o.properties[M]])),K.write(a.from([+Z]));break}case"int8":{K.write(a.from([o.properties[M]])),K.write(a.from([Z]));break}case"binary":{K.write(a.from([o.properties[M]])),Q(K,Z);break}case"int16":{K.write(a.from([o.properties[M]])),f(K,Z);break}case"int32":{K.write(a.from([o.properties[M]])),we(K,Z);break}case"var":{K.write(a.from([o.properties[M]])),z(K,Z);break}case"string":{K.write(a.from([o.properties[M]])),F(K,Z);break}case"pair":{Object.getOwnPropertyNames(Z).forEach(V=>{let j=Z[V];Array.isArray(j)?j.forEach(W=>{K.write(a.from([o.properties[M]])),me(K,V.toString(),W.toString())}):(K.write(a.from([o.properties[M]])),me(K,V.toString(),j.toString()))});break}default:return K.destroy(new Error(`Invalid property ${M} value: ${Z}`)),!1}}function ye(K,M,Z){z(K,Z);for(let V in M)if(Object.prototype.hasOwnProperty.call(M,V)&&M[V]!=null){let j=M[V];if(Array.isArray(j))for(let W=0;W<j.length;W++)ce(K,V,j[W]);else ce(K,V,j)}}function J(K){return K?K instanceof a?K.length:a.byteLength(K):0}function _e(K){return typeof K=="string"||K instanceof a}h.exports=y}),xl=fe((i,h)=>{oe(),ae(),se();var o=yo(),{EventEmitter:a}=(_t(),Be(gt)),{Buffer:l}=(Ve(),Be(We));function r(n,t){let s=new e;return o(n,s,t),s.concat()}var e=class extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(n){return this._array[this._i++]=n,!0}concat(){let n=0,t=new Array(this._array.length),s=this._array,u=0,d;for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?t[d]=s[d].length:t[d]=l.byteLength(s[d]),n+=t[d];let p=l.allocUnsafe(n);for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?(s[d].copy(p,u),u+=t[d]):(p.write(s[d],u),u+=t[d]);return p}destroy(n){n&&this.emit("error",n)}};h.exports=r}),Pl=fe(i=>{oe(),ae(),se(),i.parser=Il().parser,i.generate=xl(),i.writeToStream=yo()}),wo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let o=this.nextId++;return this.nextId===65536&&(this.nextId=1),o}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(o){return!0}deallocate(o){}clear(){}};i.default=h}),Rl=fe((i,h)=>{oe(),ae(),se(),h.exports=a;function o(r){return r instanceof Zt?Zt.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function a(r){if(r=r||{},r.circles)return l(r);let e=new Map;if(e.set(Date,d=>new Date(d)),e.set(Map,(d,p)=>new Map(t(Array.from(d),p))),e.set(Set,(d,p)=>new Set(t(Array.from(d),p))),r.constructorHandlers)for(let d of r.constructorHandlers)e.set(d[0],d[1]);let n=null;return r.proto?u:s;function t(d,p){let g=Object.keys(d),f=new Array(g.length);for(let b=0;b<g.length;b++){let y=g[b],_=d[y];typeof _!="object"||_===null?f[y]=_:_.constructor!==Object&&(n=e.get(_.constructor))?f[y]=n(_,p):ArrayBuffer.isView(_)?f[y]=o(_):f[y]=p(_)}return f}function s(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return t(d,s);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,s);let p={};for(let g in d){if(Object.hasOwnProperty.call(d,g)===!1)continue;let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,s):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=s(f)}return p}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return t(d,u);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,u);let p={};for(let g in d){let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,u):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=u(f)}return p}}function l(r){let e=[],n=[],t=new Map;if(t.set(Date,g=>new Date(g)),t.set(Map,(g,f)=>new Map(u(Array.from(g),f))),t.set(Set,(g,f)=>new Set(u(Array.from(g),f))),r.constructorHandlers)for(let g of r.constructorHandlers)t.set(g[0],g[1]);let s=null;return r.proto?p:d;function u(g,f){let b=Object.keys(g),y=new Array(b.length);for(let _=0;_<b.length;_++){let A=b[_],w=g[A];if(typeof w!="object"||w===null)y[A]=w;else if(w.constructor!==Object&&(s=t.get(w.constructor)))y[A]=s(w,f);else if(ArrayBuffer.isView(w))y[A]=o(w);else{let I=e.indexOf(w);I!==-1?y[A]=n[I]:y[A]=f(w)}}return y}function d(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,d);if(g.constructor!==Object&&(s=t.get(g.constructor)))return s(g,d);let f={};e.push(g),n.push(f);for(let b in g){if(Object.hasOwnProperty.call(g,b)===!1)continue;let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=t.get(y.constructor)))f[b]=s(y,d);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=d(y)}}return e.pop(),n.pop(),f}function p(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,p);if(g.constructor!==Object&&(s=t.get(g.constructor)))return s(g,p);let f={};e.push(g),n.push(f);for(let b in g){let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=t.get(y.constructor)))f[b]=s(y,p);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=p(y)}}return e.pop(),n.pop(),f}}}),Ml=fe((i,h)=>{oe(),ae(),se(),h.exports=Rl()()}),Ul=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.validateTopic=h,i.validateTopics=o;function h(a){let l=a.split("/");for(let r=0;r<l.length;r++)if(l[r]!=="+"){if(l[r]==="#")return r===l.length-1;if(l[r].indexOf("+")!==-1||l[r].indexOf("#")!==-1)return!1}return!0}function o(a){if(a.length===0)return"empty_topic_list";for(let l=0;l<a.length;l++)if(!h(a[l]))return a[l];return null}}),vo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=St(),o={objectMode:!0},a={clean:!0},l=class{constructor(r){this.options=r||{},this.options=Object.assign(Object.assign({},a),r),this._inflights=new Map}put(r,e){return this._inflights.set(r.messageId,r),e&&e(),this}createStream(){let r=new h.Readable(o),e=[],n=!1,t=0;return this._inflights.forEach((s,u)=>{e.push(s)}),r._read=()=>{!n&&t<e.length?r.push(e[t++]):r.push(null)},r.destroy=s=>{if(!n)return n=!0,setTimeout(()=>{r.emit("close")},0),r},r}del(r,e){let n=this._inflights.get(r.messageId);return n?(this._inflights.delete(r.messageId),e(null,n)):e&&e(new Error("missing packet")),this}get(r,e){let n=this._inflights.get(r.messageId);return n?e(null,n):e&&e(new Error("missing packet")),this}close(r){this.options.clean&&(this._inflights=null),r&&r()}};i.default=l}),Dl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=[0,16,128,131,135,144,145,151,153],o=(a,l,r)=>{a.log("handlePublish: packet %o",l),r=typeof r<"u"?r:a.noop;let e=l.topic.toString(),n=l.payload,{qos:t}=l,{messageId:s}=l,{options:u}=a;if(a.options.protocolVersion===5){let d;if(l.properties&&(d=l.properties.topicAlias),typeof d<"u")if(e.length===0)if(d>0&&d<=65535){let p=a.topicAliasRecv.getTopicByAlias(d);if(p)e=p,a.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",e,d);else{a.log("handlePublish :: unregistered topic alias. alias: %d",d),a.emit("error",new Error("Received unregistered Topic Alias"));return}}else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}else if(a.topicAliasRecv.put(e,d))a.log("handlePublish :: registered topic: %s - alias: %d",e,d);else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(a.log("handlePublish: qos %d",t),t){case 2:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for pubrec"));p?a._sendPacket({cmd:"pubrec",messageId:s,reasonCode:p},r):a.incomingStore.put(l,()=>{a._sendPacket({cmd:"pubrec",messageId:s},r)})});break}case 1:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for puback"));p||a.emit("message",e,n,l),a.handleMessage(l,g=>{if(g)return r&&r(g);a._sendPacket({cmd:"puback",messageId:s,reasonCode:p},r)})});break}case 0:a.emit("message",e,n,l),a.handleMessage(l,r);break;default:a.log("handlePublish: unknown QoS. Doing nothing.");break}};i.default=o}),Ll=fe((i,h)=>{h.exports={version:"5.13.1"}}),Dt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.MQTTJS_VERSION=i.nextTick=i.ErrorWithSubackPacket=i.ErrorWithReasonCode=void 0,i.applyMixin=a;var h=class Qs extends Error{constructor(r,e){super(r),this.code=e,Object.setPrototypeOf(this,Qs.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};i.ErrorWithReasonCode=h;var o=class Ks extends Error{constructor(r,e){super(r),this.packet=e,Object.setPrototypeOf(this,Ks.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};i.ErrorWithSubackPacket=o;function a(l,r,e=!1){var n;let t=[r];for(;;){let s=t[0],u=Object.getPrototypeOf(s);if(u?.prototype)t.unshift(u);else break}for(let s of t)for(let u of Object.getOwnPropertyNames(s.prototype))(e||u!=="constructor")&&Object.defineProperty(l.prototype,u,(n=Object.getOwnPropertyDescriptor(s.prototype,u))!==null&&n!==void 0?n:Object.create(null))}i.nextTick=typeof ke?.nextTick=="function"?ke.nextTick:l=>{setTimeout(l,0)},i.MQTTJS_VERSION=Ll().version}),nr=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=void 0;var h=Dt();i.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var o=(a,l)=>{let{messageId:r}=l,e=l.cmd,n=null,t=a.outgoing[r]?a.outgoing[r].cb:null,s=null;if(!t){a.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(a.log("_handleAck :: packet type",e),e){case"pubcomp":case"puback":{let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(r,()=>{t(s,l)})):a._removeOutgoingAndStoreMessage(r,t);break}case"pubrec":{n={cmd:"pubrel",qos:2,messageId:r};let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(r,()=>{t(s,l)})):a._sendPacket(n);break}case"suback":{delete a.outgoing[r],a.messageIdProvider.deallocate(r);let u=l.granted;for(let d=0;d<u.length;d++){let p=u[d];if((p&128)!==0){s=new Error(`Subscribe error: ${i.ReasonCodes[p]}`),s.code=p;let g=a.messageIdToTopic[r];g&&g.forEach(f=>{delete a._resubscribeTopics[f]})}}delete a.messageIdToTopic[r],a._invokeStoreProcessingQueue(),t(s,l);break}case"unsuback":{delete a.outgoing[r],a.messageIdProvider.deallocate(r),a._invokeStoreProcessingQueue(),t(null,l);break}default:a.emit("error",new Error("unrecognized packet type"))}a.disconnecting&&Object.keys(a.outgoing).length===0&&a.emit("outgoingEmpty")};i.default=o}),Nl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Dt(),o=nr(),a=(l,r)=>{let{options:e}=l,n=e.protocolVersion,t=n===5?r.reasonCode:r.returnCode;if(n!==5){let s=new h.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${n}`,t);l.emit("error",s);return}l.handleAuth(r,(s,u)=>{if(s){l.emit("error",s);return}if(t===24)l.reconnecting=!1,l._sendPacket(u);else{let d=new h.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[t]}`,t);l.emit("error",d)}})};i.default=a}),Fl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.LRUCache=void 0;var h=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,o=new Set,a=typeof ke=="object"&&ke?ke:{},l=(g,f,b,y)=>{typeof a.emitWarning=="function"?a.emitWarning(g,f,b,y):console.error(`[${b}] ${f}: ${g}`)},r=globalThis.AbortController,e=globalThis.AbortSignal;if(typeof r>"u"){e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(b,y){this._onabort.push(y)}},r=class{constructor(){f()}signal=new e;abort(b){if(!this.signal.aborted){this.signal.reason=b,this.signal.aborted=!0;for(let y of this.signal._onabort)y(b);this.signal.onabort?.(b)}}};let g=a.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",f=()=>{g&&(g=!1,l("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",f))}}var n=g=>!o.has(g),t=g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),s=g=>t(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(g){super(g),this.fill(0)}},d=class $t{heap;length;static#l=!1;static create(f){let b=s(f);if(!b)return[];$t.#l=!0;let y=new $t(f,b);return $t.#l=!1,y}constructor(f,b){if(!$t.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new b(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},p=class Hs{#l;#h;#g;#m;#O;#x;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#A;#n;#r;#e;#u;#f;#a;#o;#b;#s;#y;#w;#d;#v;#k;#c;static unsafeExposeInternals(f){return{starts:f.#w,ttls:f.#d,sizes:f.#y,keyMap:f.#n,keyList:f.#r,valList:f.#e,next:f.#u,prev:f.#f,get head(){return f.#a},get tail(){return f.#o},free:f.#b,isBackgroundFetch:b=>f.#t(b),backgroundFetch:(b,y,_,A)=>f.#M(b,y,_,A),moveToTail:b=>f.#B(b),indexes:b=>f.#_(b),rindexes:b=>f.#E(b),isStale:b=>f.#p(b)}}get max(){return this.#l}get maxSize(){return this.#h}get calculatedSize(){return this.#A}get size(){return this.#i}get fetchMethod(){return this.#O}get memoMethod(){return this.#x}get dispose(){return this.#g}get disposeAfter(){return this.#m}constructor(f){let{max:b=0,ttl:y,ttlResolution:_=1,ttlAutopurge:A,updateAgeOnGet:w,updateAgeOnHas:I,allowStale:k,dispose:E,disposeAfter:T,noDisposeOnSet:O,noUpdateTTL:H,maxSize:G=0,maxEntrySize:de=0,sizeCalculation:U,fetchMethod:$,memoMethod:z,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:me,allowStaleOnFetchRejection:le,allowStaleOnFetchAbort:pe,ignoreFetchAbort:we}=f;if(b!==0&&!t(b))throw new TypeError("max option must be a nonnegative integer");let Q=b?s(b):Array;if(!Q)throw new Error("invalid max value: "+b);if(this.#l=b,this.#h=G,this.maxEntrySize=de||this.#h,this.sizeCalculation=U,this.sizeCalculation){if(!this.#h&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(z!==void 0&&typeof z!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#x=z,$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=$,this.#k=!!$,this.#n=new Map,this.#r=new Array(b).fill(void 0),this.#e=new Array(b).fill(void 0),this.#u=new Q(b),this.#f=new Q(b),this.#a=0,this.#o=0,this.#b=d.create(b),this.#i=0,this.#A=0,typeof E=="function"&&(this.#g=E),typeof T=="function"?(this.#m=T,this.#s=[]):(this.#m=void 0,this.#s=void 0),this.#v=!!this.#g,this.#c=!!this.#m,this.noDisposeOnSet=!!O,this.noUpdateTTL=!!H,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!le,this.allowStaleOnFetchAbort=!!pe,this.ignoreFetchAbort=!!we,this.maxEntrySize!==0){if(this.#h!==0&&!t(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!k,this.noDeleteOnStaleGet=!!me,this.updateAgeOnGet=!!w,this.updateAgeOnHas=!!I,this.ttlResolution=t(_)||_===0?_:1,this.ttlAutopurge=!!A,this.ttl=y||0,this.ttl){if(!t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#l===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#h){let he="LRU_CACHE_UNBOUNDED";n(he)&&(o.add(he),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",he,Hs))}}getRemainingTTL(f){return this.#n.has(f)?1/0:0}#U(){let f=new u(this.#l),b=new u(this.#l);this.#d=f,this.#w=b,this.#D=(A,w,I=h.now())=>{if(b[A]=w!==0?I:0,f[A]=w,w!==0&&this.ttlAutopurge){let k=setTimeout(()=>{this.#p(A)&&this.#S(this.#r[A],"expire")},w+1);k.unref&&k.unref()}},this.#T=A=>{b[A]=f[A]!==0?h.now():0},this.#C=(A,w)=>{if(f[w]){let I=f[w],k=b[w];if(!I||!k)return;A.ttl=I,A.start=k,A.now=y||_();let E=A.now-k;A.remainingTTL=I-E}};let y=0,_=()=>{let A=h.now();if(this.ttlResolution>0){y=A;let w=setTimeout(()=>y=0,this.ttlResolution);w.unref&&w.unref()}return A};this.getRemainingTTL=A=>{let w=this.#n.get(A);if(w===void 0)return 0;let I=f[w],k=b[w];if(!I||!k)return 1/0;let E=(y||_())-k;return I-E},this.#p=A=>{let w=b[A],I=f[A];return!!I&&!!w&&(y||_())-w>I}}#T=()=>{};#C=()=>{};#D=()=>{};#p=()=>!1;#W(){let f=new u(this.#l);this.#A=0,this.#y=f,this.#I=b=>{this.#A-=f[b],f[b]=0},this.#L=(b,y,_,A)=>{if(this.#t(y))return 0;if(!t(_))if(A){if(typeof A!="function")throw new TypeError("sizeCalculation must be a function");if(_=A(y,b),!t(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#P=(b,y,_)=>{if(f[b]=y,this.#h){let A=this.#h-f[b];for(;this.#A>A;)this.#R(!0)}this.#A+=f[b],_&&(_.entrySize=y,_.totalCalculatedSize=this.#A)}}#I=f=>{};#P=(f,b,y)=>{};#L=(f,b,y,_)=>{if(y||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#o;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#a));)b=this.#f[b]}*#E({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#a;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#o));)b=this.#u[b]}#N(f){return f!==void 0&&this.#n.get(this.#r[f])===f}*entries(){for(let f of this.#_())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*rentries(){for(let f of this.#E())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*keys(){for(let f of this.#_()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*rkeys(){for(let f of this.#E()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*values(){for(let f of this.#_())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}*rvalues(){for(let f of this.#E())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(f,b={}){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;if(A!==void 0&&f(A,this.#r[y],this))return this.get(this.#r[y],b)}}forEach(f,b=this){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}rforEach(f,b=this){for(let y of this.#E()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}purgeStale(){let f=!1;for(let b of this.#E({allowStale:!0}))this.#p(b)&&(this.#S(this.#r[b],"expire"),f=!0);return f}info(f){let b=this.#n.get(f);if(b===void 0)return;let y=this.#e[b],_=this.#t(y)?y.__staleWhileFetching:y;if(_===void 0)return;let A={value:_};if(this.#d&&this.#w){let w=this.#d[b],I=this.#w[b];if(w&&I){let k=w-(h.now()-I);A.ttl=k,A.start=Date.now()}}return this.#y&&(A.size=this.#y[b]),A}dump(){let f=[];for(let b of this.#_({allowStale:!0})){let y=this.#r[b],_=this.#e[b],A=this.#t(_)?_.__staleWhileFetching:_;if(A===void 0||y===void 0)continue;let w={value:A};if(this.#d&&this.#w){w.ttl=this.#d[b];let I=h.now()-this.#w[b];w.start=Math.floor(Date.now()-I)}this.#y&&(w.size=this.#y[b]),f.unshift([y,w])}return f}load(f){this.clear();for(let[b,y]of f){if(y.start){let _=Date.now()-y.start;y.start=h.now()-_}this.set(b,y.value,y)}}set(f,b,y={}){if(b===void 0)return this.delete(f),this;let{ttl:_=this.ttl,start:A,noDisposeOnSet:w=this.noDisposeOnSet,sizeCalculation:I=this.sizeCalculation,status:k}=y,{noUpdateTTL:E=this.noUpdateTTL}=y,T=this.#L(f,b,y.size||0,I);if(this.maxEntrySize&&T>this.maxEntrySize)return k&&(k.set="miss",k.maxEntrySizeExceeded=!0),this.#S(f,"set"),this;let O=this.#i===0?void 0:this.#n.get(f);if(O===void 0)O=this.#i===0?this.#o:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#R(!1):this.#i,this.#r[O]=f,this.#e[O]=b,this.#n.set(f,O),this.#u[this.#o]=O,this.#f[O]=this.#o,this.#o=O,this.#i++,this.#P(O,T,k),k&&(k.set="add"),E=!1;else{this.#B(O);let H=this.#e[O];if(b!==H){if(this.#k&&this.#t(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:G}=H;G!==void 0&&!w&&(this.#v&&this.#g?.(G,f,"set"),this.#c&&this.#s?.push([G,f,"set"]))}else w||(this.#v&&this.#g?.(H,f,"set"),this.#c&&this.#s?.push([H,f,"set"]));if(this.#I(O),this.#P(O,T,k),this.#e[O]=b,k){k.set="replace";let G=H&&this.#t(H)?H.__staleWhileFetching:H;G!==void 0&&(k.oldValue=G)}}else k&&(k.set="update")}if(_!==0&&!this.#d&&this.#U(),this.#d&&(E||this.#D(O,_,A),k&&this.#C(k,O)),!w&&this.#c&&this.#s){let H=this.#s,G;for(;G=H?.shift();)this.#m?.(...G)}return this}pop(){try{for(;this.#i;){let f=this.#e[this.#a];if(this.#R(!0),this.#t(f)){if(f.__staleWhileFetching)return f.__staleWhileFetching}else if(f!==void 0)return f}}finally{if(this.#c&&this.#s){let f=this.#s,b;for(;b=f?.shift();)this.#m?.(...b)}}}#R(f){let b=this.#a,y=this.#r[b],_=this.#e[b];return this.#k&&this.#t(_)?_.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(_,y,"evict"),this.#c&&this.#s?.push([_,y,"evict"])),this.#I(b),f&&(this.#r[b]=void 0,this.#e[b]=void 0,this.#b.push(b)),this.#i===1?(this.#a=this.#o=0,this.#b.length=0):this.#a=this.#u[b],this.#n.delete(y),this.#i--,b}has(f,b={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:_}=b,A=this.#n.get(f);if(A!==void 0){let w=this.#e[A];if(this.#t(w)&&w.__staleWhileFetching===void 0)return!1;if(this.#p(A))_&&(_.has="stale",this.#C(_,A));else return y&&this.#T(A),_&&(_.has="hit",this.#C(_,A)),!0}else _&&(_.has="miss");return!1}peek(f,b={}){let{allowStale:y=this.allowStale}=b,_=this.#n.get(f);if(_===void 0||!y&&this.#p(_))return;let A=this.#e[_];return this.#t(A)?A.__staleWhileFetching:A}#M(f,b,y,_){let A=b===void 0?void 0:this.#e[b];if(this.#t(A))return A;let w=new r,{signal:I}=y;I?.addEventListener("abort",()=>w.abort(I.reason),{signal:w.signal});let k={signal:w.signal,options:y,context:_},E=(U,$=!1)=>{let{aborted:z}=w.signal,F=y.ignoreFetchAbort&&U!==void 0;if(y.status&&(z&&!$?(y.status.fetchAborted=!0,y.status.fetchError=w.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),z&&!F&&!$)return O(w.signal.reason);let me=G;return this.#e[b]===G&&(U===void 0?me.__staleWhileFetching?this.#e[b]=me.__staleWhileFetching:this.#S(f,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(f,U,k.options))),U},T=U=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=U),O(U)),O=U=>{let{aborted:$}=w.signal,z=$&&y.allowStaleOnFetchAbort,F=z||y.allowStaleOnFetchRejection,me=F||y.noDeleteOnFetchRejection,le=G;if(this.#e[b]===G&&(!me||le.__staleWhileFetching===void 0?this.#S(f,"fetch"):z||(this.#e[b]=le.__staleWhileFetching)),F)return y.status&&le.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),le.__staleWhileFetching;if(le.__returned===le)throw U},H=(U,$)=>{let z=this.#O?.(f,A,k);z&&z instanceof Promise&&z.then(F=>U(F===void 0?void 0:F),$),w.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(U(void 0),y.allowStaleOnFetchAbort&&(U=F=>E(F,!0)))})};y.status&&(y.status.fetchDispatched=!0);let G=new Promise(H).then(E,T),de=Object.assign(G,{__abortController:w,__staleWhileFetching:A,__returned:void 0});return b===void 0?(this.set(f,de,{...k.options,status:void 0}),b=this.#n.get(f)):this.#e[b]=de,de}#t(f){if(!this.#k)return!1;let b=f;return!!b&&b instanceof Promise&&b.hasOwnProperty("__staleWhileFetching")&&b.__abortController instanceof r}async fetch(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,ttl:w=this.ttl,noDisposeOnSet:I=this.noDisposeOnSet,size:k=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:T=this.noUpdateTTL,noDeleteOnFetchRejection:O=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:de=this.allowStaleOnFetchAbort,context:U,forceRefresh:$=!1,status:z,signal:F}=b;if(!this.#k)return z&&(z.fetch="get"),this.get(f,{allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,status:z});let me={allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,ttl:w,noDisposeOnSet:I,size:k,sizeCalculation:E,noUpdateTTL:T,noDeleteOnFetchRejection:O,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:de,ignoreFetchAbort:G,status:z,signal:F},le=this.#n.get(f);if(le===void 0){z&&(z.fetch="miss");let pe=this.#M(f,le,me,U);return pe.__returned=pe}else{let pe=this.#e[le];if(this.#t(pe)){let P=y&&pe.__staleWhileFetching!==void 0;return z&&(z.fetch="inflight",P&&(z.returnedStale=!0)),P?pe.__staleWhileFetching:pe.__returned=pe}let we=this.#p(le);if(!$&&!we)return z&&(z.fetch="hit"),this.#B(le),_&&this.#T(le),z&&this.#C(z,le),pe;let Q=this.#M(f,le,me,U),he=Q.__staleWhileFetching!==void 0&&y;return z&&(z.fetch=we?"stale":"refresh",he&&we&&(z.returnedStale=!0)),he?Q.__staleWhileFetching:Q.__returned=Q}}async forceFetch(f,b={}){let y=await this.fetch(f,b);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(f,b={}){let y=this.#x;if(!y)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:A,...w}=b,I=this.get(f,w);if(!A&&I!==void 0)return I;let k=y(f,I,{options:w,context:_});return this.set(f,k,w),k}get(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,status:w}=b,I=this.#n.get(f);if(I!==void 0){let k=this.#e[I],E=this.#t(k);return w&&this.#C(w,I),this.#p(I)?(w&&(w.get="stale"),E?(w&&y&&k.__staleWhileFetching!==void 0&&(w.returnedStale=!0),y?k.__staleWhileFetching:void 0):(A||this.#S(f,"expire"),w&&y&&(w.returnedStale=!0),y?k:void 0)):(w&&(w.get="hit"),E?k.__staleWhileFetching:(this.#B(I),_&&this.#T(I),k))}else w&&(w.get="miss")}#F(f,b){this.#f[b]=f,this.#u[f]=b}#B(f){f!==this.#o&&(f===this.#a?this.#a=this.#u[f]:this.#F(this.#f[f],this.#u[f]),this.#F(this.#o,f),this.#o=f)}delete(f){return this.#S(f,"delete")}#S(f,b){let y=!1;if(this.#i!==0){let _=this.#n.get(f);if(_!==void 0)if(y=!0,this.#i===1)this.#j(b);else{this.#I(_);let A=this.#e[_];if(this.#t(A)?A.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(A,f,b),this.#c&&this.#s?.push([A,f,b])),this.#n.delete(f),this.#r[_]=void 0,this.#e[_]=void 0,_===this.#o)this.#o=this.#f[_];else if(_===this.#a)this.#a=this.#u[_];else{let w=this.#f[_];this.#u[w]=this.#u[_];let I=this.#u[_];this.#f[I]=this.#f[_]}this.#i--,this.#b.push(_)}}if(this.#c&&this.#s?.length){let _=this.#s,A;for(;A=_?.shift();)this.#m?.(...A)}return y}clear(){return this.#j("delete")}#j(f){for(let b of this.#E({allowStale:!0})){let y=this.#e[b];if(this.#t(y))y.__abortController.abort(new Error("deleted"));else{let _=this.#r[b];this.#v&&this.#g?.(y,_,f),this.#c&&this.#s?.push([y,_,f])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#y&&this.#y.fill(0),this.#a=0,this.#o=0,this.#b.length=0,this.#A=0,this.#i=0,this.#c&&this.#s){let b=this.#s,y;for(;y=b?.shift();)this.#m?.(...y)}}};i.LRUCache=p}),lt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.ContainerIterator=i.Container=i.Base=void 0;var h=class{constructor(l=0){this.iteratorType=l}equals(l){return this.o===l.o}};i.ContainerIterator=h;var o=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};i.Base=o;var a=class extends o{};i.Container=a}),jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.S=[];let r=this;l.forEach(function(e){r.push(e)})}clear(){this.i=0,this.S=[]}push(l){return this.S.push(l),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},a=o;i.default=a}),Wl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.j=0,this.q=[];let r=this;l.forEach(function(e){r.push(e)})}clear(){this.q=[],this.i=this.j=0}push(l){let r=this.q.length;if(this.j/r>.5&&this.j+this.i>=r&&r>4096){let e=this.i;for(let n=0;n<e;++n)this.q[n]=this.q[this.j+n];this.j=0,this.q[this.i]=l}else this.q[this.j+this.i]=l;return++this.i}pop(){if(this.i===0)return;let l=this.q[this.j++];return this.i-=1,l}front(){if(this.i!==0)return this.q[this.j]}},a=o;i.default=a}),Vl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[],r=function(n,t){return n>t?-1:n<t?1:0},e=!0){if(super(),this.v=r,Array.isArray(l))this.C=e?[...l]:l;else{this.C=[];let t=this;l.forEach(function(s){t.C.push(s)})}this.i=this.C.length;let n=this.i>>1;for(let t=this.i-1>>1;t>=0;--t)this.k(t,n)}m(l){let r=this.C[l];for(;l>0;){let e=l-1>>1,n=this.C[e];if(this.v(n,r)<=0)break;this.C[l]=n,l=e}this.C[l]=r}k(l,r){let e=this.C[l];for(;l<r;){let n=l<<1|1,t=n+1,s=this.C[n];if(t<this.i&&this.v(s,this.C[t])>0&&(n=t,s=this.C[t]),this.v(s,e)>=0)break;this.C[l]=s,l=n}this.C[l]=e}clear(){this.i=0,this.C.length=0}push(l){this.C.push(l),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let l=this.C[0],r=this.C.pop();return this.i-=1,this.i&&(this.C[0]=r,this.k(0,this.i>>1)),l}top(){return this.C[0]}find(l){return this.C.indexOf(l)>=0}remove(l){let r=this.C.indexOf(l);return r<0?!1:(r===0?this.pop():r===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(r,1,this.C.pop()),this.i-=1,this.m(r),this.k(r,this.i>>1)),!0)}updateItem(l){let r=this.C.indexOf(l);return r<0?!1:(this.m(r),this.k(r,this.i>>1),!0)}toArray(){return[...this.C]}},a=o;i.default=a}),jn=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Container{},a=o;i.default=a}),ut=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.throwIteratorAccessError=h;function h(){throw new RangeError("Iterator access denied!")}}),_o=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.RandomIterator=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(l,r){super(r),this.o=l,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,o.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,o.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,o.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,o.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(l){this.container.setElementByPos(this.o,l)}};i.RandomIterator=a}),Ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=_o();function a(n){return n&&n.t?n:{default:n}}var l=class qs extends o.RandomIterator{constructor(t,s,u){super(t,u),this.container=s}copy(){return new qs(this.o,this.container,this.iteratorType)}},r=class extends h.default{constructor(n=[],t=!0){if(super(),Array.isArray(n))this.J=t?[...n]:n,this.i=n.length;else{this.J=[];let s=this;n.forEach(function(u){s.pushBack(u)})}}clear(){this.i=0,this.J.length=0}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J[n]}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J.splice(n,1),this.i-=1,this.i}eraseElementByValue(n){let t=0;for(let s=0;s<this.i;++s)this.J[s]!==n&&(this.J[t++]=this.J[s]);return this.i=this.J.length=t,this.i}eraseElementByIterator(n){let t=n.o;return n=n.next(),this.eraseElementByPos(t),n}pushBack(n){return this.J.push(n),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(n,t){if(n<0||n>this.i-1)throw new RangeError;this.J[n]=t}insert(n,t,s=1){if(n<0||n>this.i)throw new RangeError;return this.J.splice(n,0,...new Array(s).fill(t)),this.i+=s,this.i}find(n){for(let t=0;t<this.i;++t)if(this.J[t]===n)return new l(t,this);return this.end()}reverse(){this.J.reverse()}unique(){let n=1;for(let t=1;t<this.i;++t)this.J[t]!==this.J[t-1]&&(this.J[n++]=this.J[t]);return this.i=this.J.length=n,this.i}sort(n){this.J.sort(n)}forEach(n){for(let t=0;t<this.i;++t)n(this.J[t],t,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},e=r;i.default=e}),Kl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(jn()),o=lt(),a=ut();function l(t){return t&&t.t?t:{default:t}}var r=class $s extends o.ContainerIterator{constructor(s,u,d,p){super(p),this.o=s,this.h=u,this.container=d,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l}set pointer(s){this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l=s}copy(){return new $s(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(t=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let s=this;t.forEach(function(u){s.pushBack(u)})}V(t){let{L:s,B:u}=t;s.B=u,u.L=s,t===this.p&&(this.p=u),t===this._&&(this._=s),this.i-=1}G(t,s){let u=s.B,d={l:t,L:s,B:u};s.B=d,u.L=d,s===this.h&&(this.p=d),u===this.h&&(this._=d),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new r(this.p,this.h,this)}end(){return new r(this.h,this.h,this)}rBegin(){return new r(this._,this.h,this,1)}rEnd(){return new r(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let s=this.p;for(;t--;)s=s.B;return s.l}eraseElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let s=this.p;for(;t--;)s=s.B;return this.V(s),this.i}eraseElementByValue(t){let s=this.p;for(;s!==this.h;)s.l===t&&this.V(s),s=s.B;return this.i}eraseElementByIterator(t){let s=t.o;return s===this.h&&(0,a.throwIteratorAccessError)(),t=t.next(),this.V(s),t}pushBack(t){return this.G(t,this._),this.i}popBack(){if(this.i===0)return;let t=this._.l;return this.V(this._),t}pushFront(t){return this.G(t,this.h),this.i}popFront(){if(this.i===0)return;let t=this.p.l;return this.V(this.p),t}setElementByPos(t,s){if(t<0||t>this.i-1)throw new RangeError;let u=this.p;for(;t--;)u=u.B;u.l=s}insert(t,s,u=1){if(t<0||t>this.i)throw new RangeError;if(u<=0)return this.i;if(t===0)for(;u--;)this.pushFront(s);else if(t===this.i)for(;u--;)this.pushBack(s);else{let d=this.p;for(let g=1;g<t;++g)d=d.B;let p=d.B;for(this.i+=u;u--;)d.B={l:s,L:d},d.B.L=d,d=d.B;d.B=p,p.L=d}return this.i}find(t){let s=this.p;for(;s!==this.h;){if(s.l===t)return new r(s,this.h,this);s=s.B}return this.end()}reverse(){if(this.i<=1)return;let t=this.p,s=this._,u=0;for(;u<<1<this.i;){let d=t.l;t.l=s.l,s.l=d,t=t.B,s=s.L,u+=1}}unique(){if(this.i<=1)return this.i;let t=this.p;for(;t!==this.h;){let s=t;for(;s.B!==this.h&&s.l===s.B.l;)s=s.B,this.i-=1;t.B=s.B,t.B.L=t,t=t.B}return this.i}sort(t){if(this.i<=1)return;let s=[];this.forEach(function(d){s.push(d)}),s.sort(t);let u=this.p;s.forEach(function(d){u.l=d,u=u.B})}merge(t){let s=this;if(this.i===0)t.forEach(function(u){s.pushBack(u)});else{let u=this.p;t.forEach(function(d){for(;u!==s.h&&u.l<=d;)u=u.B;s.G(d,u.L)})}return this.i}forEach(t){let s=this.p,u=0;for(;s!==this.h;)t(s.l,u++,this),s=s.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let t=this.p;for(;t!==this.h;)yield t.l,t=t.B}).bind(this)()}},n=e;i.default=n}),Hl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=_o();function a(n){return n&&n.t?n:{default:n}}var l=class zs extends o.RandomIterator{constructor(t,s,u){super(t,u),this.container=s}copy(){return new zs(this.o,this.container,this.iteratorType)}},r=class extends h.default{constructor(n=[],t=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let s=(()=>{if(typeof n.length=="number")return n.length;if(typeof n.size=="number")return n.size;if(typeof n.size=="function")return n.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=t,this.P=Math.max(Math.ceil(s/this.F),1);for(let p=0;p<this.P;++p)this.A.push(new Array(this.F));let u=Math.ceil(s/this.F);this.j=this.R=(this.P>>1)-(u>>1),this.D=this.N=this.F-s%this.F>>1;let d=this;n.forEach(function(p){d.pushBack(p)})}T(){let n=[],t=Math.max(this.P>>1,1);for(let s=0;s<t;++s)n[s]=new Array(this.F);for(let s=this.j;s<this.P;++s)n[n.length]=this.A[s];for(let s=0;s<this.R;++s)n[n.length]=this.A[s];n[n.length]=[...this.A[this.R]],this.j=t,this.R=n.length-1;for(let s=0;s<t;++s)n[n.length]=new Array(this.F);this.A=n,this.P=n.length}O(n){let t=this.D+n+1,s=t%this.F,u=s-1,d=this.j+(t-s)/this.F;return s===0&&(d-=1),d%=this.P,u<0&&(u+=this.F),{curNodeBucketIndex:d,curNodePointerIndex:u}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(n){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=n,this.i}popBack(){if(this.i===0)return;let n=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,n}pushFront(n){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=n,this.i}popFront(){if(this.i===0)return;let n=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,n}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:t,curNodePointerIndex:s}=this.O(n);return this.A[t][s]}setElementByPos(n,t){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:s,curNodePointerIndex:u}=this.O(n);this.A[s][u]=t}insert(n,t,s=1){if(n<0||n>this.i)throw new RangeError;if(n===0)for(;s--;)this.pushFront(t);else if(n===this.i)for(;s--;)this.pushBack(t);else{let u=[];for(let d=n;d<this.i;++d)u.push(this.getElementByPos(d));this.cut(n-1);for(let d=0;d<s;++d)this.pushBack(t);for(let d=0;d<u.length;++d)this.pushBack(u[d])}return this.i}cut(n){if(n<0)return this.clear(),0;let{curNodeBucketIndex:t,curNodePointerIndex:s}=this.O(n);return this.R=t,this.N=s,this.i=n+1,this.i}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;if(n===0)this.popFront();else if(n===this.i-1)this.popBack();else{let t=[];for(let u=n+1;u<this.i;++u)t.push(this.getElementByPos(u));this.cut(n),this.popBack();let s=this;t.forEach(function(u){s.pushBack(u)})}return this.i}eraseElementByValue(n){if(this.i===0)return 0;let t=[];for(let u=0;u<this.i;++u){let d=this.getElementByPos(u);d!==n&&t.push(d)}let s=t.length;for(let u=0;u<s;++u)this.setElementByPos(u,t[u]);return this.cut(s-1)}eraseElementByIterator(n){let t=n.o;return this.eraseElementByPos(t),n=n.next(),n}find(n){for(let t=0;t<this.i;++t)if(this.getElementByPos(t)===n)return new l(t,this);return this.end()}reverse(){let n=0,t=this.i-1;for(;n<t;){let s=this.getElementByPos(n);this.setElementByPos(n,this.getElementByPos(t)),this.setElementByPos(t,s),n+=1,t-=1}}unique(){if(this.i<=1)return this.i;let n=1,t=this.getElementByPos(0);for(let s=1;s<this.i;++s){let u=this.getElementByPos(s);u!==t&&(t=u,this.setElementByPos(n++,u))}for(;this.i>n;)this.popBack();return this.i}sort(n){let t=[];for(let s=0;s<this.i;++s)t.push(this.getElementByPos(s));t.sort(n);for(let s=0;s<this.i;++s)this.setElementByPos(s,t[s])}shrinkToFit(){if(this.i===0)return;let n=[];this.forEach(function(t){n.push(t)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let t=0;t<this.P;++t)this.A.push(new Array(this.F));for(let t=0;t<n.length;++t)this.pushBack(n[t])}forEach(n){for(let t=0;t<this.i;++t)n(this.getElementByPos(t),t,this)}[Symbol.iterator](){return(function*(){for(let n=0;n<this.i;++n)yield this.getElementByPos(n)}).bind(this)()}},e=r;i.default=e}),ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.TreeNodeEnableIndex=i.TreeNode=void 0;var h=class{constructor(a,l){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=a,this.l=l}L(){let a=this;if(a.ee===1&&a.tt.tt===a)a=a.W;else if(a.U)for(a=a.U;a.W;)a=a.W;else{let l=a.tt;for(;l.U===a;)a=l,l=a.tt;a=l}return a}B(){let a=this;if(a.W){for(a=a.W;a.U;)a=a.U;return a}else{let l=a.tt;for(;l.W===a;)a=l,l=a.tt;return a.W!==l?l:a}}te(){let a=this.tt,l=this.W,r=l.U;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.U=this,this.tt=l,this.W=r,r&&(r.tt=this),l}se(){let a=this.tt,l=this.U,r=l.W;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.W=this,this.tt=l,this.U=r,r&&(r.tt=this),l}};i.TreeNode=h;var o=class extends h{constructor(){super(...arguments),this.rt=1}te(){let a=super.te();return this.ie(),a.ie(),a}se(){let a=super.se();return this.ie(),a.ie(),a}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};i.TreeNodeEnableIndex=o}),Eo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=ql(),o=lt(),a=ut(),l=class extends o.Container{constructor(e=function(t,s){return t<s?-1:t>s?1:0},n=!1){super(),this.Y=void 0,this.v=e,n?(this.re=h.TreeNodeEnableIndex,this.M=function(t,s,u){let d=this.ne(t,s,u);if(d){let p=d.tt;for(;p!==this.h;)p.rt+=1,p=p.tt;let g=this.he(d);if(g){let{parentNode:f,grandParent:b,curNode:y}=g;f.ie(),b.ie(),y.ie()}}return this.i},this.V=function(t){let s=this.fe(t);for(;s!==this.h;)s.rt-=1,s=s.tt}):(this.re=h.TreeNode,this.M=function(t,s,u){let d=this.ne(t,s,u);return d&&this.he(d),this.i},this.V=this.fe),this.h=new this.re}X(e,n){let t=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)e=e.W;else if(s>0)t=e,e=e.U;else return e}return t}Z(e,n){let t=this.h;for(;e;)this.v(e.u,n)<=0?e=e.W:(t=e,e=e.U);return t}$(e,n){let t=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)t=e,e=e.W;else if(s>0)e=e.U;else return e}return t}rr(e,n){let t=this.h;for(;e;)this.v(e.u,n)<0?(t=e,e=e.W):e=e.U;return t}ue(e){for(;;){let n=e.tt;if(n===this.h)return;if(e.ee===1){e.ee=0;return}if(e===n.U){let t=n.W;if(t.ee===1)t.ee=0,n.ee=1,n===this.Y?this.Y=n.te():n.te();else if(t.W&&t.W.ee===1){t.ee=n.ee,n.ee=0,t.W.ee=0,n===this.Y?this.Y=n.te():n.te();return}else t.U&&t.U.ee===1?(t.ee=1,t.U.ee=0,t.se()):(t.ee=1,e=n)}else{let t=n.U;if(t.ee===1)t.ee=0,n.ee=1,n===this.Y?this.Y=n.se():n.se();else if(t.U&&t.U.ee===1){t.ee=n.ee,n.ee=0,t.U.ee=0,n===this.Y?this.Y=n.se():n.se();return}else t.W&&t.W.ee===1?(t.ee=1,t.W.ee=0,t.te()):(t.ee=1,e=n)}}}fe(e){if(this.i===1)return this.clear(),this.h;let n=e;for(;n.U||n.W;){if(n.W)for(n=n.W;n.U;)n=n.U;else n=n.U;[e.u,n.u]=[n.u,e.u],[e.l,n.l]=[n.l,e.l],e=n}this.h.U===n?this.h.U=n.tt:this.h.W===n&&(this.h.W=n.tt),this.ue(n);let t=n.tt;return n===t.U?t.U=void 0:t.W=void 0,this.i-=1,this.Y.ee=0,t}oe(e,n){return e===void 0?!1:this.oe(e.U,n)||n(e)?!0:this.oe(e.W,n)}he(e){for(;;){let n=e.tt;if(n.ee===0)return;let t=n.tt;if(n===t.U){let s=t.W;if(s&&s.ee===1){if(s.ee=n.ee=0,t===this.Y)return;t.ee=1,e=t;continue}else if(e===n.W){if(e.ee=0,e.U&&(e.U.tt=n),e.W&&(e.W.tt=t),n.W=e.U,t.U=e.W,e.U=n,e.W=t,t===this.Y)this.Y=e,this.h.tt=e;else{let u=t.tt;u.U===t?u.U=e:u.W=e}return e.tt=t.tt,n.tt=e,t.tt=e,t.ee=1,{parentNode:n,grandParent:t,curNode:e}}else n.ee=0,t===this.Y?this.Y=t.se():t.se(),t.ee=1}else{let s=t.U;if(s&&s.ee===1){if(s.ee=n.ee=0,t===this.Y)return;t.ee=1,e=t;continue}else if(e===n.U){if(e.ee=0,e.U&&(e.U.tt=t),e.W&&(e.W.tt=n),t.W=e.U,n.U=e.W,e.U=t,e.W=n,t===this.Y)this.Y=e,this.h.tt=e;else{let u=t.tt;u.U===t?u.U=e:u.W=e}return e.tt=t.tt,n.tt=e,t.tt=e,t.ee=1,{parentNode:n,grandParent:t,curNode:e}}else n.ee=0,t===this.Y?this.Y=t.te():t.te(),t.ee=1}return}}ne(e,n,t){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,n),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let s,u=this.h.U,d=this.v(u.u,e);if(d===0){u.l=n;return}else if(d>0)u.U=new this.re(e,n),u.U.tt=u,s=u.U,this.h.U=s;else{let p=this.h.W,g=this.v(p.u,e);if(g===0){p.l=n;return}else if(g<0)p.W=new this.re(e,n),p.W.tt=p,s=p.W,this.h.W=s;else{if(t!==void 0){let f=t.o;if(f!==this.h){let b=this.v(f.u,e);if(b===0){f.l=n;return}else if(b>0){let y=f.L(),_=this.v(y.u,e);if(_===0){y.l=n;return}else _<0&&(s=new this.re(e,n),y.W===void 0?(y.W=s,s.tt=y):(f.U=s,s.tt=f))}}}if(s===void 0)for(s=this.Y;;){let f=this.v(s.u,e);if(f>0){if(s.U===void 0){s.U=new this.re(e,n),s.U.tt=s,s=s.U;break}s=s.U}else if(f<0){if(s.W===void 0){s.W=new this.re(e,n),s.W.tt=s,s=s.W;break}s=s.W}else{s.l=n;return}}}}return this.i+=1,s}I(e,n){for(;e;){let t=this.v(e.u,n);if(t<0)e=e.W;else if(t>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(e,n){let t=e.o;if(t===this.h&&(0,a.throwIteratorAccessError)(),this.i===1)return t.u=n,!0;if(t===this.h.U)return this.v(t.B().u,n)>0?(t.u=n,!0):!1;if(t===this.h.W)return this.v(t.L().u,n)<0?(t.u=n,!0):!1;let s=t.L().u;if(this.v(s,n)>=0)return!1;let u=t.B().u;return this.v(u,n)<=0?!1:(t.u=n,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=0,t=this;return this.oe(this.Y,function(s){return e===n?(t.V(s),!0):(n+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return!1;let n=this.I(this.Y,e);return n===this.h?!1:(this.V(n),!0)}eraseElementByIterator(e){let n=e.o;n===this.h&&(0,a.throwIteratorAccessError)();let t=n.W===void 0;return e.iteratorType===0?t&&e.next():(!t||n.U===void 0)&&e.next(),this.V(n),e}forEach(e){let n=0;for(let t of this)e(t,n++,this)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n,t=0;for(let s of this){if(t===e){n=s;break}t+=1}return n}getHeight(){if(this.i===0)return 0;let e=function(n){return n?Math.max(e(n.U),e(n.W))+1:0};return e(this.Y)}},r=l;i.default=r}),So=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(r,e,n){super(n),this.o=r,this.h=e,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let r=this.o,e=this.h.tt;if(r===this.h)return e?e.rt-1:0;let n=0;for(r.U&&(n+=r.U.rt);r!==e;){let t=r.tt;r===t.W&&(n+=1,t.U&&(n+=t.U.rt)),r=t}return n}},l=a;i.default=l}),$l=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(Eo()),o=l(So()),a=ut();function l(t){return t&&t.t?t:{default:t}}var r=class Gs extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.u}copy(){return new Gs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(t=[],s,u){super(s,u);let d=this;t.forEach(function(p){d.insert(p)})}*K(t){t!==void 0&&(yield*this.K(t.U),yield t.u,yield*this.K(t.W))}begin(){return new r(this.h.U||this.h,this.h,this)}end(){return new r(this.h,this.h,this)}rBegin(){return new r(this.h.W||this.h,this.h,this,1)}rEnd(){return new r(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(t,s){return this.M(t,void 0,s)}find(t){let s=this.I(this.Y,t);return new r(s,this.h,this)}lowerBound(t){let s=this.X(this.Y,t);return new r(s,this.h,this)}upperBound(t){let s=this.Z(this.Y,t);return new r(s,this.h,this)}reverseLowerBound(t){let s=this.$(this.Y,t);return new r(s,this.h,this)}reverseUpperBound(t){let s=this.rr(this.Y,t);return new r(s,this.h,this)}union(t){let s=this;return t.forEach(function(u){s.insert(u)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),zl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(Eo()),o=l(So()),a=ut();function l(t){return t&&t.t?t:{default:t}}var r=class Ys extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Ys(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(t=[],s,u){super(s,u);let d=this;t.forEach(function(p){d.setElement(p[0],p[1])})}*K(t){t!==void 0&&(yield*this.K(t.U),yield[t.u,t.l],yield*this.K(t.W))}begin(){return new r(this.h.U||this.h,this.h,this)}end(){return new r(this.h,this.h,this)}rBegin(){return new r(this.h.W||this.h,this.h,this,1)}rEnd(){return new r(this.h,this.h,this,1)}front(){if(this.i===0)return;let t=this.h.U;return[t.u,t.l]}back(){if(this.i===0)return;let t=this.h.W;return[t.u,t.l]}lowerBound(t){let s=this.X(this.Y,t);return new r(s,this.h,this)}upperBound(t){let s=this.Z(this.Y,t);return new r(s,this.h,this)}reverseLowerBound(t){let s=this.$(this.Y,t);return new r(s,this.h,this)}reverseUpperBound(t){let s=this.rr(this.Y,t);return new r(s,this.h,this)}setElement(t,s,u){return this.M(t,s,u)}find(t){let s=this.I(this.Y,t);return new r(s,this.h,this)}getElementByKey(t){return this.I(this.Y,t).l}union(t){let s=this;return t.forEach(function(u){s.setElement(u[0],u[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),Co=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=h;function h(o){let a=typeof o;return a==="object"&&o!==null||a==="function"}}),ko=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.HashContainerIterator=i.HashContainer=void 0;var h=lt(),o=l(Co()),a=ut();function l(n){return n&&n.t?n:{default:n}}var r=class extends h.ContainerIterator{constructor(n,t,s){super(s),this.o=n,this.h=t,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}};i.HashContainerIterator=r;var e=class extends h.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(n){let{L:t,B:s}=n;t.B=s,s.L=t,n===this.p&&(this.p=s),n===this._&&(this._=t),this.i-=1}M(n,t,s){s===void 0&&(s=(0,o.default)(n));let u;if(s){let d=n[this.HASH_TAG];if(d!==void 0)return this.H[d].l=t,this.i;Object.defineProperty(n,this.HASH_TAG,{value:this.H.length,configurable:!0}),u={u:n,l:t,L:this._,B:this.h},this.H.push(u)}else{let d=this.g[n];if(d)return d.l=t,this.i;u={u:n,l:t,L:this._,B:this.h},this.g[n]=u}return this.i===0?(this.p=u,this.h.B=u):this._.B=u,this._=u,this.h.L=u,++this.i}I(n,t){if(t===void 0&&(t=(0,o.default)(n)),t){let s=n[this.HASH_TAG];return s===void 0?this.h:this.H[s]}else return this.g[n]||this.h}clear(){let n=this.HASH_TAG;this.H.forEach(function(t){delete t.u[n]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(n,t){let s;if(t===void 0&&(t=(0,o.default)(n)),t){let u=n[this.HASH_TAG];if(u===void 0)return!1;delete n[this.HASH_TAG],s=this.H[u],delete this.H[u]}else{if(s=this.g[n],s===void 0)return!1;delete this.g[n]}return this.V(s),!0}eraseElementByIterator(n){let t=n.o;return t===this.h&&(0,a.throwIteratorAccessError)(),this.V(t),n.next()}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let t=this.p;for(;n--;)t=t.B;return this.V(t),this.i}};i.HashContainer=e}),Gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=ko(),o=ut(),a=class Js extends h.HashContainerIterator{constructor(n,t,s,u){super(n,t,u),this.container=s}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new Js(this.o,this.h,this.container,this.iteratorType)}},l=class extends h.HashContainer{constructor(e=[]){super();let n=this;e.forEach(function(t){n.insert(t)})}begin(){return new a(this.p,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this._,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,n){return this.M(e,void 0,n)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=this.p;for(;e--;)n=n.B;return n.u}find(e,n){let t=this.I(e,n);return new a(t,this.h,this)}forEach(e){let n=0,t=this.p;for(;t!==this.h;)e(t.u,n++,this),t=t.B}[Symbol.iterator](){return(function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B}).bind(this)()}},r=l;i.default=r}),Yl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=ko(),o=l(Co()),a=ut();function l(t){return t&&t.t?t:{default:t}}var r=class Zs extends h.HashContainerIterator{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Zs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.HashContainer{constructor(t=[]){super();let s=this;t.forEach(function(u){s.setElement(u[0],u[1])})}begin(){return new r(this.p,this.h,this)}end(){return new r(this.h,this.h,this)}rBegin(){return new r(this._,this.h,this,1)}rEnd(){return new r(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(t,s,u){return this.M(t,s,u)}getElementByKey(t,s){if(s===void 0&&(s=(0,o.default)(t)),s){let d=t[this.HASH_TAG];return d!==void 0?this.H[d].l:void 0}let u=this.g[t];return u?u.l:void 0}getElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let s=this.p;for(;t--;)s=s.B;return[s.u,s.l]}find(t,s){let u=this.I(t,s);return new r(u,this.h,this)}forEach(t){let s=0,u=this.p;for(;u!==this.h;)t([u.u,u.l],s++,this),u=u.B}[Symbol.iterator](){return(function*(){let t=this.p;for(;t!==this.h;)yield[t.u,t.l],t=t.B}).bind(this)()}},n=e;i.default=n}),Jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),Object.defineProperty(i,"Deque",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(i,"HashMap",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(i,"HashSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(i,"LinkList",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(i,"OrderedMap",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(i,"OrderedSet",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(i,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(i,"Queue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"Stack",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(i,"Vector",{enumerable:!0,get:function(){return l.default}});var h=d(jl()),o=d(Wl()),a=d(Vl()),l=d(Ql()),r=d(Kl()),e=d(Hl()),n=d($l()),t=d(zl()),s=d(Gl()),u=d(Yl());function d(p){return p&&p.t?p:{default:p}}}),Zl=fe((i,h)=>{oe(),ae(),se();var o=Jl().OrderedSet,a=at()("number-allocator:trace"),l=at()("number-allocator:error");function r(n,t){this.low=n,this.high=t}r.prototype.equals=function(n){return this.low===n.low&&this.high===n.high},r.prototype.compare=function(n){return this.low<n.low&&this.high<n.low?-1:n.low<this.low&&n.high<this.low?1:0};function e(n,t){if(!(this instanceof e))return new e(n,t);this.min=n,this.max=t,this.ss=new o([],(s,u)=>s.compare(u)),a("Create"),this.clear()}e.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},e.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;let n=this.ss.begin(),t=n.pointer.low,s=n.pointer.high,u=t;return u+1<=s?this.ss.updateKeyByIterator(n,new r(t+1,s)):this.ss.eraseElementByPos(0),a("alloc():"+u),u},e.prototype.use=function(n){let t=new r(n,n),s=this.ss.lowerBound(t);if(!s.equals(this.ss.end())){let u=s.pointer.low,d=s.pointer.high;return s.pointer.equals(t)?(this.ss.eraseElementByIterator(s),a("use():"+n),!0):u>n?!1:u===n?(this.ss.updateKeyByIterator(s,new r(u+1,d)),a("use():"+n),!0):d===n?(this.ss.updateKeyByIterator(s,new r(u,d-1)),a("use():"+n),!0):(this.ss.updateKeyByIterator(s,new r(n+1,d)),this.ss.insert(new r(u,n-1)),a("use():"+n),!0)}return a("use():failed"),!1},e.prototype.free=function(n){if(n<this.min||n>this.max){l("free():"+n+" is out of range");return}let t=new r(n,n),s=this.ss.upperBound(t);if(s.equals(this.ss.end())){if(s.equals(this.ss.begin())){this.ss.insert(t);return}s.pre();let u=s.pointer.high;s.pointer.high+1===n?this.ss.updateKeyByIterator(s,new r(u,n)):this.ss.insert(t)}else if(s.equals(this.ss.begin()))if(n+1===s.pointer.low){let u=s.pointer.high;this.ss.updateKeyByIterator(s,new r(n,u))}else this.ss.insert(t);else{let u=s.pointer.low,d=s.pointer.high;s.pre();let p=s.pointer.low;s.pointer.high+1===n?n+1===u?(this.ss.eraseElementByIterator(s),this.ss.updateKeyByIterator(s,new r(p,d))):this.ss.updateKeyByIterator(s,new r(p,n)):n+1===u?(this.ss.eraseElementByIterator(s.next()),this.ss.insert(new r(n,d))):this.ss.insert(t)}a("free():"+n)},e.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new r(this.min,this.max))},e.prototype.intervalCount=function(){return this.ss.size()},e.prototype.dump=function(){console.log("length:"+this.ss.size());for(let n of this.ss)console.log(n)},h.exports=e}),To=fe((i,h)=>{oe(),ae(),se();var o=Zl();h.exports.NumberAllocator=o}),Xl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Fl(),o=To(),a=class{constructor(l){l>0&&(this.aliasToTopic=new h.LRUCache({max:l}),this.topicToAlias={},this.numberAllocator=new o.NumberAllocator(1,l),this.max=l,this.length=0)}put(l,r){if(r===0||r>this.max)return!1;let e=this.aliasToTopic.get(r);return e&&delete this.topicToAlias[e],this.aliasToTopic.set(r,l),this.topicToAlias[l]=r,this.numberAllocator.use(r),this.length=this.aliasToTopic.size,!0}getTopicByAlias(l){return this.aliasToTopic.get(l)}getAliasByTopic(l){let r=this.topicToAlias[l];return typeof r<"u"&&this.aliasToTopic.get(r),r}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};i.default=a}),eu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});var o=nr(),a=h(Xl()),l=Dt(),r=(e,n)=>{e.log("_handleConnack");let{options:t}=e,s=t.protocolVersion===5?n.reasonCode:n.returnCode;if(clearTimeout(e.connackTimer),delete e.topicAliasSend,n.properties){if(n.properties.topicAliasMaximum){if(n.properties.topicAliasMaximum>65535){e.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}n.properties.topicAliasMaximum>0&&(e.topicAliasSend=new a.default(n.properties.topicAliasMaximum))}n.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=n.properties.serverKeepAlive),n.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=n.properties.maximumPacketSize)}if(s===0)e.reconnecting=!1,e._onConnect(n);else if(s>0){let u=new l.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[s]}`,s);e.emit("error",u),e.options.reconnectOnConnackError&&e._cleanUp(!0)}};i.default=r}),tu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(o,a,l)=>{o.log("handling pubrel packet");let r=typeof l<"u"?l:o.noop,{messageId:e}=a,n={cmd:"pubcomp",messageId:e};o.incomingStore.get(a,(t,s)=>{t?o._sendPacket(n,r):(o.emit("message",s.topic,s.payload,s),o.handleMessage(s,u=>{if(u)return r(u);o.incomingStore.del(s,o.noop),o._sendPacket(n,r)}))})};i.default=h}),ru=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(Dl()),a=h(Nl()),l=h(eu()),r=h(nr()),e=h(tu()),n=(t,s,u)=>{let{options:d}=t;if(d.protocolVersion===5&&d.properties&&d.properties.maximumPacketSize&&d.properties.maximumPacketSize<s.length)return t.emit("error",new Error(`exceeding packets size ${s.cmd}`)),t.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),t;switch(t.log("_handlePacket :: emitting packetreceive"),t.emit("packetreceive",s),s.cmd){case"publish":(0,o.default)(t,s,u);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":t.reschedulePing(),(0,r.default)(t,s),u();break;case"pubrel":t.reschedulePing(),(0,e.default)(t,s,u);break;case"connack":(0,l.default)(t,s),u();break;case"auth":t.reschedulePing(),(0,a.default)(t,s),u();break;case"pingresp":t.log("_handlePacket :: received pingresp"),t.reschedulePing(!0),u();break;case"disconnect":t.emit("disconnect",s),u();break;default:t.log("_handlePacket :: unknown command"),u();break}};i.default=n}),nu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0}),i.TypedEventEmitter=void 0;var o=h((_t(),Be(gt))),a=Dt(),l=class{};i.TypedEventEmitter=l,(0,a.applyMixin)(l,o.default)}),ir=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.isReactNativeBrowser=i.isWebWorker=void 0;var h=()=>{var r;return typeof window<"u"?typeof navigator<"u"&&((r=navigator.userAgent)===null||r===void 0?void 0:r.toLowerCase().indexOf(" electron/"))>-1&&ke!=null&&ke.versions?!Object.prototype.hasOwnProperty.call(ke.versions,"electron"):typeof window.document<"u":!1},o=()=>{var r,e;return!!(typeof self=="object"&&!((e=(r=self?.constructor)===null||r===void 0?void 0:r.name)===null||e===void 0)&&e.includes("WorkerGlobalScope"))},a=()=>typeof navigator<"u"&&navigator.product==="ReactNative",l=h()||o()||a();i.isWebWorker=o(),i.isReactNativeBrowser=a(),i.default=l}),iu=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i):typeof define=="function"&&define.amd?define(["exports"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.fastUniqueNumbers={}))})(i,function(o){var a=function(g){return function(f){var b=g(f);return f.add(b),b}},l=function(g){return function(f,b){return g.set(f,b),b}},r=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,e=536870912,n=e*2,t=function(g,f){return function(b){var y=f.get(b),_=y===void 0?b.size:y<n?y+1:0;if(!b.has(_))return g(b,_);if(b.size<e){for(;b.has(_);)_=Math.floor(Math.random()*n);return g(b,_)}if(b.size>r)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;b.has(_);)_=Math.floor(Math.random()*r);return g(b,_)}},s=new WeakMap,u=l(s),d=t(u,s),p=a(d);o.addUniqueNumber=p,o.generateUniqueNumber=d})}),ou=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,iu()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimersBroker={},o.fastUniqueNumbers))})(i,function(o,a){var l=function(n){return n.method!==void 0&&n.method==="call"},r=function(n){return n.error===null&&typeof n.id=="number"},e=function(n){var t=new Map([[0,function(){}]]),s=new Map([[0,function(){}]]),u=new Map,d=new Worker(n);d.addEventListener("message",function(y){var _=y.data;if(l(_)){var A=_.params,w=A.timerId,I=A.timerType;if(I==="interval"){var k=t.get(w);if(typeof k=="number"){var E=u.get(k);if(E===void 0||E.timerId!==w||E.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof k<"u")k();else throw new Error("The timer is in an undefined state.")}else if(I==="timeout"){var T=s.get(w);if(typeof T=="number"){var O=u.get(T);if(O===void 0||O.timerId!==w||O.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof T<"u")T(),s.delete(w);else throw new Error("The timer is in an undefined state.")}}else if(r(_)){var H=_.id,G=u.get(H);if(G===void 0)throw new Error("The timer is in an undefined state.");var de=G.timerId,U=G.timerType;u.delete(H),U==="interval"?t.delete(de):s.delete(de)}else{var $=_.error.message;throw new Error($)}});var p=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"interval"}),t.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"interval"}})},g=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"timeout"}),s.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"timeout"}})},f=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(t);return t.set(A,function(){y(),typeof t.get(A)=="function"&&d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}})}),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}}),A},b=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(s);return s.set(A,y),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"timeout"}}),A};return{clearInterval:p,clearTimeout:g,setInterval:f,setTimeout:b}};o.load=e})}),su=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,ou()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimers={},o.workerTimersBroker))})(i,function(o,a){var l=function(d,p){var g=null;return function(){if(g!==null)return g;var f=new Blob([p],{type:"application/javascript; charset=utf-8"}),b=URL.createObjectURL(f);return g=d(b),setTimeout(function(){return URL.revokeObjectURL(b)}),g}},r=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i="function"==typeof(o=function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:"call",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,"interval"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,"timeout"))};addEventListener("message",(function(e){var t=e.data;try{if("clear"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if("interval"===c)r(d),postMessage({error:null,id:i});else{if("timeout"!==c)throw new Error('The given type "'.concat(c,'" is not supported'));o(d),postMessage({error:null,id:i})}}else{if("set"!==t.method)throw new Error('The given method "'.concat(t.method,'" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if("interval"===v)a(l,m,p);else{if("timeout"!==v)throw new Error('The given type "'.concat(v,'" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,e=l(a.load,r),n=function(d){return e().clearInterval(d)},t=function(d){return e().clearTimeout(d)},s=function(){var d;return(d=e()).setInterval.apply(d,arguments)},u=function(){var d;return(d=e()).setTimeout.apply(d,arguments)};o.clearInterval=n,o.clearTimeout=t,o.setInterval=s,o.setTimeout=u})}),au=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(s,u,d,p){p===void 0&&(p=d);var g=Object.getOwnPropertyDescriptor(u,d);(!g||("get"in g?!u.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(s,p,g)}:function(s,u,d,p){p===void 0&&(p=d),s[p]=u[d]}),o=i&&i.__setModuleDefault||(Object.create?function(s,u){Object.defineProperty(s,"default",{enumerable:!0,value:u})}:function(s,u){s.default=u}),a=i&&i.__importStar||(function(){var s=function(u){return s=Object.getOwnPropertyNames||function(d){var p=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(p[p.length]=g);return p},s(u)};return function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p=s(u),g=0;g<p.length;g++)p[g]!=="default"&&h(d,u,p[g]);return o(d,u),d}})();Object.defineProperty(i,"__esModule",{value:!0});var l=a(ir()),r=su(),e={set:r.setInterval,clear:r.clearInterval},n={set:(s,u)=>setInterval(s,u),clear:s=>clearInterval(s)},t=s=>{switch(s){case"native":return n;case"worker":return e;case"auto":default:return l.default&&!l.isWebWorker&&!l.isReactNativeBrowser?e:n}};i.default=t}),Io=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(au()),a=class{get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(l,r){this.destroyed=!1,this.client=l,this.timer=typeof r=="object"&&"set"in r&&"clear"in r?r:(0,o.default)(r),this.setKeepalive(l.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(l){if(l*=1e3,isNaN(l)||l<=0||l>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${l}`);this._keepalive=l,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${l}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let l=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+l,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};i.default=a}),Wn=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(k,E,T,O){O===void 0&&(O=T);var H=Object.getOwnPropertyDescriptor(E,T);(!H||("get"in H?!E.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return E[T]}}),Object.defineProperty(k,O,H)}:function(k,E,T,O){O===void 0&&(O=T),k[O]=E[T]}),o=i&&i.__setModuleDefault||(Object.create?function(k,E){Object.defineProperty(k,"default",{enumerable:!0,value:E})}:function(k,E){k.default=E}),a=i&&i.__importStar||(function(){var k=function(E){return k=Object.getOwnPropertyNames||function(T){var O=[];for(var H in T)Object.prototype.hasOwnProperty.call(T,H)&&(O[O.length]=H);return O},k(E)};return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null)for(var O=k(E),H=0;H<O.length;H++)O[H]!=="default"&&h(T,E,O[H]);return o(T,E),T}})(),l=i&&i.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(i,"__esModule",{value:!0});var r=l(gl()),e=l(Pl()),n=l(wo()),t=St(),s=l(Ml()),u=a(Ul()),d=l(at()),p=l(vo()),g=l(ru()),f=Dt(),b=nu(),y=l(Io()),_=a(ir()),A=globalThis.setImmediate||((...k)=>{let E=k.shift();(0,f.nextTick)(()=>{E(...k)})}),w={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},I=class ci extends b.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(E,T){super(),this.options=T||{};for(let O in w)typeof this.options[O]>"u"?this.options[O]=w[O]:this.options[O]=T[O];this.log=this.options.log||(0,d.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",ci.VERSION),_.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",_.default?"browser":"node"),this.log("MqttClient :: options.protocol",T.protocol),this.log("MqttClient :: options.protocolVersion",T.protocolVersion),this.log("MqttClient :: options.username",T.username),this.log("MqttClient :: options.keepalive",T.keepalive),this.log("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",T.properties?T.properties.topicAliasMaximum:void 0),this.options.clientId=typeof T.clientId=="string"?T.clientId:ci.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:(...O)=>{O[3](null,0)},this.options.writeCache||(e.default.writeToStream.cacheNumbers=!1),this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new n.default:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new p.default,this.incomingStore=T.incomingStore||new p.default,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.properties&&T.properties.topicAliasMaximum>0&&(T.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new r.default(T.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:O}=this,H=()=>{let G=O.shift();this.log("deliver :: entry %o",G);let de=null;if(!G){this._resubscribe();return}de=G.packet,this.log("deliver :: call _sendPacket for %o",de);let U=!0;de.messageId&&de.messageId!==0&&(this.messageIdProvider.register(de.messageId)||(U=!1)),U?this._sendPacket(de,$=>{G.cb&&G.cb($),H()}):(this.log("messageId: %d has already used. The message is skipped and removed.",de.messageId),H())};this.log("connect :: sending queued packets"),H()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}handleAuth(E,T){T()}handleMessage(E,T){T()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var E;let T=new t.Writable,O=e.default.parser(this.options),H=null,G=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),O.on("packet",F=>{this.log("parser :: on packet push to packets array."),G.push(F)});let de=()=>{this.log("work :: getting next packet in queue");let F=G.shift();if(F)this.log("work :: packet pulled from queue"),(0,g.default)(this,F,U);else{this.log("work :: no packets in queue");let me=H;H=null,this.log("work :: done flag is %s",!!me),me&&me()}},U=()=>{if(G.length)(0,f.nextTick)(de);else{let F=H;H=null,F()}};T._write=(F,me,le)=>{H=le,this.log("writable stream :: parsing buffer"),O.parse(F),de()};let $=F=>{this.log("streamErrorHandler :: error",F.message),F.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",F)):this.noop(F)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",$),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let z={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(z.will=Object.assign(Object.assign({},this.options.will),{payload:(E=this.options.will)===null||E===void 0?void 0:E.payload})),this.topicAliasRecv&&(z.properties||(z.properties={}),this.topicAliasRecv&&(z.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(z),O.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let F=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(F)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(E,T,O,H){this.log("publish :: message `%s` to topic `%s`",T,E);let{options:G}=this;typeof O=="function"&&(H=O,O=null),O=O||{},O=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),O);let{qos:de,retain:U,dup:$,properties:z,cbStorePut:F}=O;if(this._checkDisconnecting(H))return this;let me=()=>{let le=0;if((de===1||de===2)&&(le=this._nextId(),le===null))return this.log("No messageId left"),!1;let pe={cmd:"publish",topic:E,payload:T,qos:de,retain:U,messageId:le,dup:$};switch(G.protocolVersion===5&&(pe.properties=z),this.log("publish :: qos",de),de){case 1:case 2:this.outgoing[pe.messageId]={volatile:!1,cb:H||this.noop},this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,void 0,F);break;default:this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,H,F);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,cbStorePut:O.cbStorePut,callback:H}),this}publishAsync(E,T,O){return new Promise((H,G)=>{this.publish(E,T,O,(de,U)=>{de?G(de):H(U)})})}subscribe(E,T,O){let H=this.options.protocolVersion;typeof T=="function"&&(O=T),O=O||this.noop;let G=!1,de=[];typeof E=="string"?(E=[E],de=E):Array.isArray(E)?de=E:typeof E=="object"&&(G=E.resubscribe,delete E.resubscribe,de=Object.keys(E));let U=u.validateTopics(de);if(U!==null)return A(O,new Error(`Invalid topic ${U}`)),this;if(this._checkDisconnecting(O))return this.log("subscribe: discconecting true"),this;let $={qos:0};H===5&&($.nl=!1,$.rap=!1,$.rh=0),T=Object.assign(Object.assign({},$),T);let z=T.properties,F=[],me=(we,Q)=>{if(Q=Q||T,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,we)||this._resubscribeTopics[we].qos<Q.qos||G){let he={topic:we,qos:Q.qos};H===5&&(he.nl=Q.nl,he.rap=Q.rap,he.rh=Q.rh,he.properties=z),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",he.topic,he.qos),F.push(he)}};if(Array.isArray(E)?E.forEach(we=>{this.log("subscribe: array topic %s",we),me(we)}):Object.keys(E).forEach(we=>{this.log("subscribe: object topic %s, %o",we,E[we]),me(we,E[we])}),!F.length)return O(null,[]),this;let le=(we,Q)=>{let he={cmd:"subscribe",subscriptions:we,messageId:Q};if(z&&(he.properties=z),this.options.resubscribe){this.log("subscribe :: resubscribe true");let ce=[];we.forEach(ye=>{if(this.options.reconnectPeriod>0){let J={qos:ye.qos};H===5&&(J.nl=ye.nl||!1,J.rap=ye.rap||!1,J.rh=ye.rh||0,J.properties=ye.properties),this._resubscribeTopics[ye.topic]=J,ce.push(ye.topic)}}),this.messageIdToTopic[he.messageId]=ce}let P=new Promise((ce,ye)=>{this.outgoing[he.messageId]={volatile:!0,cb(J,_e){if(!J){let{granted:K}=_e;for(let M=0;M<K.length;M+=1)we[M].qos=K[M]}J?ye(new f.ErrorWithSubackPacket(J.message,_e)):ce(_e)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(he),P},pe=()=>{var we;let Q=(we=this.options.subscribeBatchSize)!==null&&we!==void 0?we:F.length,he=[];for(let P=0;P<F.length;P+=Q){let ce=F.slice(P,P+Q),ye=this._nextId();if(ye===null)return this.log("No messageId left"),!1;he.push(le(ce,ye))}return Promise.all(he).then(P=>{O(null,F,P.at(-1))}).catch(P=>{O(P,F,P.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!pe())&&this._storeProcessingQueue.push({invoke:pe,callback:O}),this}subscribeAsync(E,T){return new Promise((O,H)=>{this.subscribe(E,T,(G,de)=>{G?H(G):O(de)})})}unsubscribe(E,T,O){typeof E=="string"&&(E=[E]),typeof T=="function"&&(O=T),O=O||this.noop;let H=u.validateTopics(E);if(H!==null)return A(O,new Error(`Invalid topic ${H}`)),this;if(this._checkDisconnecting(O))return this;let G=()=>{let de=this._nextId();if(de===null)return this.log("No messageId left"),!1;let U={cmd:"unsubscribe",messageId:de,unsubscriptions:[]};return typeof E=="string"?U.unsubscriptions=[E]:Array.isArray(E)&&(U.unsubscriptions=E),this.options.resubscribe&&U.unsubscriptions.forEach($=>{delete this._resubscribeTopics[$]}),typeof T=="object"&&T.properties&&(U.properties=T.properties),this.outgoing[U.messageId]={volatile:!0,cb:O},this.log("unsubscribe: call _sendPacket"),this._sendPacket(U),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!G())&&this._storeProcessingQueue.push({invoke:G,callback:O}),this}unsubscribeAsync(E,T){return new Promise((O,H)=>{this.unsubscribe(E,T,(G,de)=>{G?H(G):O(de)})})}end(E,T,O){this.log("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(O=O||T,T=E,E=!1),typeof T!="object"&&(O=O||T,T=null),this.log("end :: cb? %s",!!O),(!O||typeof O!="function")&&(O=this.noop);let H=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(de=>{this.outgoingStore.close(U=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),O){let $=de||U;this.log("end :: closeStores: invoking callback with args"),O($)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},G=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,E),this._cleanUp(E,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,f.nextTick)(H)},T)};return this.disconnecting?(O(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,G,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),G()),this)}endAsync(E,T){return new Promise((O,H)=>{this.end(E,T,G=>{G?H(G):O()})})}removeOutgoingMessage(E){if(this.outgoing[E]){let{cb:T}=this.outgoing[E];this._removeOutgoingAndStoreMessage(E,()=>{T(new Error("Message removed"))})}return this}reconnect(E){this.log("client reconnect");let T=()=>{E?(this.options.incomingStore=E.incomingStore,this.options.outgoingStore=E.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=T:T(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(E=>{this.outgoing[E].volatile&&typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(E=>{typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_removeTopicAliasAndRecoverTopicName(E){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",T,O),O.length===0){if(typeof T>"u")return new Error("Unregistered Topic Alias");if(O=this.topicAliasSend.getTopicByAlias(T),typeof O>"u")return new Error("Unregistered Topic Alias");E.topic=O}T&&delete E.properties.topicAlias}_checkDisconnecting(E){return this.disconnecting&&(E&&E!==this.noop?E(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(E,T,O={}){if(T&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),this.log("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let H=Object.assign({cmd:"disconnect"},O);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(H,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),A(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),T&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())}_storeAndSend(E,T,O){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",E.cmd);let H=E,G;if(H.cmd==="publish"&&(H=(0,s.default)(E),G=this._removeTopicAliasAndRecoverTopicName(H),G))return T&&T(G);this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O(),this._writePacket(E,T)})}_applyTopicAlias(E){if(this.options.protocolVersion===5&&E.cmd==="publish"){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.topicAliasSend)if(T){if(O.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",O,T),!this.topicAliasSend.put(O,T)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}else O.length!==0&&(this.options.autoAssignTopicAlias?(T=this.topicAliasSend.getAliasByTopic(O),T?(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",O,T)):(T=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(O,T),E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",O,T))):this.options.autoUseTopicAlias&&(T=this.topicAliasSend.getAliasByTopic(O),T&&(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",O,T))));else if(T)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}}_noop(E){this.log("noop ::",E)}_writePacket(E,T){this.log("_writePacket :: packet: %O",E),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",E),this.log("_writePacket :: writing to stream");let O=e.default.writeToStream(E,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",O),!O&&T&&T!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",T)):T&&(this.log("_writePacket :: invoking cb"),T())}_sendPacket(E,T,O,H){this.log("_sendPacket :: (%s) :: start",this.options.clientId),O=O||this.noop,T=T||this.noop;let G=this._applyTopicAlias(E);if(G){T(G);return}if(!this.connected){if(E.cmd==="auth"){this._writePacket(E,T);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,O);return}if(H){this._writePacket(E,T);return}switch(E.cmd){case"publish":break;case"pubrel":this._storeAndSend(E,T,O);return;default:this._writePacket(E,T);return}switch(E.qos){case 2:case 1:this._storeAndSend(E,T,O);break;case 0:default:this._writePacket(E,T);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(E,T,O){this.log("_storePacket :: packet: %o",E),this.log("_storePacket :: cb? %s",!!T),O=O||this.noop;let H=E;if(H.cmd==="publish"){H=(0,s.default)(E);let de=this._removeTopicAliasAndRecoverTopicName(H);if(de)return T&&T(de)}let G=H.qos||0;G===0&&this.queueQoSZero||H.cmd!=="publish"?this.queue.push({packet:H,cb:T}):G>0?(T=this.outgoing[H.messageId]?this.outgoing[H.messageId].cb:null,this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O()})):T&&T(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new y.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(E=!1){this.keepaliveManager&&this.options.keepalive&&(E||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let E=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&E.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let T=0;T<E.length;T++){let O={};O[E[T]]=this._resubscribeTopics[E[T]],O.resubscribe=!0,this.subscribe(O,{properties:O[E[T]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(E){if(this.disconnected){this.emit("connect",E);return}this.connackPacket=E,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let T=()=>{let O=this.outgoingStore.createStream(),H=()=>{O.destroy(),O=null,this._flushStoreProcessingQueue(),G()},G=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",H),O.on("error",U=>{G(),this._flushStoreProcessingQueue(),this.removeListener("close",H),this.emit("error",U)});let de=()=>{if(!O)return;let U=O.read(1),$;if(!U){O.once("readable",de);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[U.messageId]){de();return}!this.disconnecting&&!this.reconnectTimer?($=this.outgoing[U.messageId]?this.outgoing[U.messageId].cb:null,this.outgoing[U.messageId]={volatile:!1,cb(z,F){$&&$(z,F),de()}},this._packetIdsDuringStoreProcessing[U.messageId]=!0,this.messageIdProvider.register(U.messageId)?this._sendPacket(U,void 0,void 0,!0):this.log("messageId: %d has already used.",U.messageId)):O.destroy&&O.destroy()};O.on("end",()=>{let U=!0;for(let $ in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[$]){U=!1;break}this.removeListener("close",H),U?(G(),this._invokeAllStoreProcessingQueue(),this.emit("connect",E)):T()}),de()};T()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(E,T){delete this.outgoing[E],this.outgoingStore.del({messageId:E},(O,H)=>{T(O,H),this.messageIdProvider.deallocate(E),this._invokeStoreProcessingQueue()})}};I.VERSION=f.MQTTJS_VERSION,i.default=I}),lu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=To(),o=class{constructor(){this.numberAllocator=new h.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(a){return this.numberAllocator.use(a)}deallocate(a){this.numberAllocator.free(a)}clear(){this.numberAllocator.clear()}};i.default=o});function Ct(i){throw new RangeError(Mo[i])}function Bo(i,h){let o=i.split("@"),a="";o.length>1&&(a=o[0]+"@",i=o[1]);let l=(function(r,e){let n=[],t=r.length;for(;t--;)n[t]=e(r[t]);return n})((i=i.replace(Ro,".")).split("."),h).join(".");return a+l}function Oo(i){let h=[],o=0,a=i.length;for(;o<a;){let l=i.charCodeAt(o++);if(l>=55296&&l<=56319&&o<a){let r=i.charCodeAt(o++);(64512&r)==56320?h.push(((1023&l)<<10)+(1023&r)+65536):(h.push(l),o--)}else h.push(l)}return h}var xo,Po,Ro,Mo,Je,or,Vn,Qn,Kn,Hn,At,uu=He(()=>{oe(),ae(),se(),xo=/^xn--/,Po=/[^\0-\x7E]/,Ro=/[\x2E\u3002\uFF0E\uFF61]/g,Mo={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Je=Math.floor,or=String.fromCharCode,Vn=function(i,h){return i+22+75*(i<26)-((h!=0)<<5)},Qn=function(i,h,o){let a=0;for(i=o?Je(i/700):i>>1,i+=Je(i/h);i>455;a+=36)i=Je(i/35);return Je(a+36*i/(i+38))},Kn=function(i){let h=[],o=i.length,a=0,l=128,r=72,e=i.lastIndexOf("-");e<0&&(e=0);for(let t=0;t<e;++t)i.charCodeAt(t)>=128&&Ct("not-basic"),h.push(i.charCodeAt(t));for(let t=e>0?e+1:0;t<o;){let s=a;for(let d=1,p=36;;p+=36){t>=o&&Ct("invalid-input");let g=(n=i.charCodeAt(t++))-48<10?n-22:n-65<26?n-65:n-97<26?n-97:36;(g>=36||g>Je((2147483647-a)/d))&&Ct("overflow"),a+=g*d;let f=p<=r?1:p>=r+26?26:p-r;if(g<f)break;let b=36-f;d>Je(2147483647/b)&&Ct("overflow"),d*=b}let u=h.length+1;r=Qn(a-s,u,s==0),Je(a/u)>2147483647-l&&Ct("overflow"),l+=Je(a/u),a%=u,h.splice(a++,0,l)}var n;return String.fromCodePoint(...h)},Hn=function(i){let h=[],o=(i=Oo(i)).length,a=128,l=0,r=72;for(let t of i)t<128&&h.push(or(t));let e=h.length,n=e;for(e&&h.push("-");n<o;){let t=2147483647;for(let u of i)u>=a&&u<t&&(t=u);let s=n+1;t-a>Je((2147483647-l)/s)&&Ct("overflow"),l+=(t-a)*s,a=t;for(let u of i)if(u<a&&++l>2147483647&&Ct("overflow"),u==a){let d=l;for(let p=36;;p+=36){let g=p<=r?1:p>=r+26?26:p-r;if(d<g)break;let f=d-g,b=36-g;h.push(or(Vn(g+f%b,0))),d=Je(f/b)}h.push(or(Vn(d,0))),r=Qn(l,s,n==e),l=0,++n}++l,++a}return h.join("")},At={version:"2.1.0",ucs2:{decode:Oo,encode:i=>String.fromCodePoint(...i)},decode:Kn,encode:Hn,toASCII:function(i){return Bo(i,function(h){return Po.test(h)?"xn--"+Hn(h):h})},toUnicode:function(i){return Bo(i,function(h){return xo.test(h)?Kn(h.slice(4).toLowerCase()):h})}},At.decode,At.encode,At.toASCII,At.toUnicode,At.ucs2,At.version});function cu(i,h){return Object.prototype.hasOwnProperty.call(i,h)}var Uo,Lt,Do,et,hu=He(()=>{oe(),ae(),se(),Uo=function(i,h,o,a){h=h||"&",o=o||"=";var l={};if(typeof i!="string"||i.length===0)return l;var r=/\+/g;i=i.split(h);var e=1e3;a&&typeof a.maxKeys=="number"&&(e=a.maxKeys);var n=i.length;e>0&&n>e&&(n=e);for(var t=0;t<n;++t){var s,u,d,p,g=i[t].replace(r,"%20"),f=g.indexOf(o);f>=0?(s=g.substr(0,f),u=g.substr(f+1)):(s=g,u=""),d=decodeURIComponent(s),p=decodeURIComponent(u),cu(l,d)?Array.isArray(l[d])?l[d].push(p):l[d]=[l[d],p]:l[d]=p}return l},Lt=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}},Do=function(i,h,o,a){return h=h||"&",o=o||"=",i===null&&(i=void 0),typeof i=="object"?Object.keys(i).map(function(l){var r=encodeURIComponent(Lt(l))+o;return Array.isArray(i[l])?i[l].map(function(e){return r+encodeURIComponent(Lt(e))}).join(h):r+encodeURIComponent(Lt(i[l]))}).join(h):a?encodeURIComponent(Lt(a))+o+encodeURIComponent(Lt(i)):""},et={},et.decode=et.parse=Uo,et.encode=et.stringify=Do,et.decode,et.encode,et.parse,et.stringify});function qn(){throw new Error("setTimeout has not been defined")}function $n(){throw new Error("clearTimeout has not been defined")}function Lo(i){if(ht===setTimeout)return setTimeout(i,0);if((ht===qn||!ht)&&setTimeout)return ht=setTimeout,setTimeout(i,0);try{return ht(i,0)}catch{try{return ht.call(null,i,0)}catch{return ht.call(this||kt,i,0)}}}function fu(){It&&Tt&&(It=!1,Tt.length?tt=Tt.concat(tt):Kt=-1,tt.length&&No())}function No(){if(!It){var i=Lo(fu);It=!0;for(var h=tt.length;h;){for(Tt=tt,tt=[];++Kt<h;)Tt&&Tt[Kt].run();Kt=-1,h=tt.length}Tt=null,It=!1,(function(o){if(ft===clearTimeout)return clearTimeout(o);if((ft===$n||!ft)&&clearTimeout)return ft=clearTimeout,clearTimeout(o);try{ft(o)}catch{try{return ft.call(null,o)}catch{return ft.call(this||kt,o)}}})(i)}}function Fo(i,h){(this||kt).fun=i,(this||kt).array=h}function ct(){}var jo,ht,ft,kt,Le,Tt,tt,It,Kt,De,du=He(()=>{oe(),ae(),se(),kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Le=jo={},(function(){try{ht=typeof setTimeout=="function"?setTimeout:qn}catch{ht=qn}try{ft=typeof clearTimeout=="function"?clearTimeout:$n}catch{ft=$n}})(),tt=[],It=!1,Kt=-1,Le.nextTick=function(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];tt.push(new Fo(i,h)),tt.length!==1||It||Lo(No)},Fo.prototype.run=function(){(this||kt).fun.apply(null,(this||kt).array)},Le.title="browser",Le.browser=!0,Le.env={},Le.argv=[],Le.version="",Le.versions={},Le.on=ct,Le.addListener=ct,Le.once=ct,Le.off=ct,Le.removeListener=ct,Le.removeAllListeners=ct,Le.emit=ct,Le.prependListener=ct,Le.prependOnceListener=ct,Le.listeners=function(i){return[]},Le.binding=function(i){throw new Error("process.binding is not supported")},Le.cwd=function(){return"/"},Le.chdir=function(i){throw new Error("process.chdir is not supported")},Le.umask=function(){return 0},De=jo,De.addListener,De.argv,De.binding,De.browser,De.chdir,De.cwd,De.emit,De.env,De.listeners,De.nextTick,De.off,De.on,De.once,De.prependListener,De.prependOnceListener,De.removeAllListeners,De.removeListener,De.title,De.umask,De.version,De.versions});function pu(){if(zn)return sr;zn=!0;var i=sr={},h,o;function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?h=setTimeout:h=a}catch{h=a}try{typeof clearTimeout=="function"?o=clearTimeout:o=l}catch{o=l}})();function r(b){if(h===setTimeout)return setTimeout(b,0);if((h===a||!h)&&setTimeout)return h=setTimeout,setTimeout(b,0);try{return h(b,0)}catch{try{return h.call(null,b,0)}catch{return h.call(this||Bt,b,0)}}}function e(b){if(o===clearTimeout)return clearTimeout(b);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(b);try{return o(b)}catch{try{return o.call(null,b)}catch{return o.call(this||Bt,b)}}}var n=[],t=!1,s,u=-1;function d(){!t||!s||(t=!1,s.length?n=s.concat(n):u=-1,n.length&&p())}function p(){if(!t){var b=r(d);t=!0;for(var y=n.length;y;){for(s=n,n=[];++u<y;)s&&s[u].run();u=-1,y=n.length}s=null,t=!1,e(b)}}i.nextTick=function(b){var y=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)y[_-1]=arguments[_];n.push(new g(b,y)),n.length===1&&!t&&r(p)};function g(b,y){(this||Bt).fun=b,(this||Bt).array=y}g.prototype.run=function(){(this||Bt).fun.apply(null,(this||Bt).array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function f(){}return i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(b){return[]},i.binding=function(b){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(b){throw new Error("process.chdir is not supported")},i.umask=function(){return 0},sr}var sr,zn,Bt,Re,Wo=He(()=>{oe(),ae(),se(),sr={},zn=!1,Bt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Re=pu(),Re.platform="browser",Re.addListener,Re.argv,Re.binding,Re.browser,Re.chdir,Re.cwd,Re.emit,Re.env,Re.listeners,Re.nextTick,Re.off,Re.on,Re.once,Re.prependListener,Re.prependOnceListener,Re.removeAllListeners,Re.removeListener,Re.title,Re.umask,Re.version,Re.versions});function gu(){if(Gn)return ar;Gn=!0;var i=Re;function h(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function o(r,e){for(var n="",t=0,s=-1,u=0,d,p=0;p<=r.length;++p){if(p<r.length)d=r.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||t!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",t=0):(n=n.slice(0,g),t=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",t=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",t=2)}else n.length>0?n+="/"+r.slice(s+1,p):n=r.slice(s+1,p),t=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(r,e){var n=e.dir||e.root,t=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+t:n+r+t:t}var l={resolve:function(){for(var r="",e=!1,n,t=arguments.length-1;t>=-1&&!e;t--){var s;t>=0?s=arguments[t]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(r=s+"/"+r,e=s.charCodeAt(0)===47)}return r=o(r,!e),e?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(r){if(h(r),r.length===0)return".";var e=r.charCodeAt(0)===47,n=r.charCodeAt(r.length-1)===47;return r=o(r,!e),r.length===0&&!e&&(r="."),r.length>0&&n&&(r+="/"),e?"/"+r:r},isAbsolute:function(r){return h(r),r.length>0&&r.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var r,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(r===void 0?r=n:r+="/"+n)}return r===void 0?".":l.normalize(r)},relative:function(r,e){if(h(r),h(e),r===e||(r=l.resolve(r),e=l.resolve(e),r===e))return"";for(var n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var t=r.length,s=t-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(r.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=r.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=t;++b)(b===t||r.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(r){return r},dirname:function(r){if(h(r),r.length===0)return".";for(var e=r.charCodeAt(0),n=e===47,t=-1,s=!0,u=r.length-1;u>=1;--u)if(e=r.charCodeAt(u),e===47){if(!s){t=u;break}}else s=!1;return t===-1?n?"/":".":n&&t===1?"//":r.slice(0,t)},basename:function(r,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(r);var n=0,t=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";var d=e.length-1,p=-1;for(u=r.length-1;u>=0;--u){var g=r.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(t=u):(d=-1,t=p))}return n===t?t=p:t===-1&&(t=r.length),r.slice(n,t)}else{for(u=r.length-1;u>=0;--u)if(r.charCodeAt(u)===47){if(!s){n=u+1;break}}else t===-1&&(s=!1,t=u+1);return t===-1?"":r.slice(n,t)}},extname:function(r){h(r);for(var e=-1,n=0,t=-1,s=!0,u=0,d=r.length-1;d>=0;--d){var p=r.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}t===-1&&(s=!1,t=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||t===-1||u===0||u===1&&e===t-1&&e===n+1?"":r.slice(e,t)},format:function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return a("/",r)},parse:function(r){h(r);var e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;var n=r.charCodeAt(0),t=n===47,s;t?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=r.length-1,b=0;f>=s;--f){if(n=r.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&t?e.base=e.name=r.slice(1,p):e.base=e.name=r.slice(d,p)):(d===0&&t?(e.name=r.slice(1,u),e.base=r.slice(1,p)):(e.name=r.slice(d,u),e.base=r.slice(d,p)),e.ext=r.slice(u,p)),d>0?e.dir=r.slice(0,d-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,ar=l,ar}var ar,Gn,Yn,mu=He(()=>{oe(),ae(),se(),Wo(),ar={},Gn=!1,Yn=gu()}),Vo={};Rt(Vo,{URL:()=>gs,Url:()=>cs,default:()=>xe,fileURLToPath:()=>Qo,format:()=>hs,parse:()=>ps,pathToFileURL:()=>Ko,resolve:()=>fs,resolveObject:()=>ds});function Ge(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Ht(i,h,o){if(i&&Ze.isObject(i)&&i instanceof Ge)return i;var a=new Ge;return a.parse(i,h,o),a}function Au(){if(ei)return hr;ei=!0;var i=De;function h(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function o(r,e){for(var n="",t=0,s=-1,u=0,d,p=0;p<=r.length;++p){if(p<r.length)d=r.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||t!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",t=0):(n=n.slice(0,g),t=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",t=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",t=2)}else n.length>0?n+="/"+r.slice(s+1,p):n=r.slice(s+1,p),t=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(r,e){var n=e.dir||e.root,t=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+t:n+r+t:t}var l={resolve:function(){for(var r="",e=!1,n,t=arguments.length-1;t>=-1&&!e;t--){var s;t>=0?s=arguments[t]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(r=s+"/"+r,e=s.charCodeAt(0)===47)}return r=o(r,!e),e?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(r){if(h(r),r.length===0)return".";var e=r.charCodeAt(0)===47,n=r.charCodeAt(r.length-1)===47;return r=o(r,!e),r.length===0&&!e&&(r="."),r.length>0&&n&&(r+="/"),e?"/"+r:r},isAbsolute:function(r){return h(r),r.length>0&&r.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var r,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(r===void 0?r=n:r+="/"+n)}return r===void 0?".":l.normalize(r)},relative:function(r,e){if(h(r),h(e),r===e||(r=l.resolve(r),e=l.resolve(e),r===e))return"";for(var n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var t=r.length,s=t-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(r.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=r.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=t;++b)(b===t||r.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(r){return r},dirname:function(r){if(h(r),r.length===0)return".";for(var e=r.charCodeAt(0),n=e===47,t=-1,s=!0,u=r.length-1;u>=1;--u)if(e=r.charCodeAt(u),e===47){if(!s){t=u;break}}else s=!1;return t===-1?n?"/":".":n&&t===1?"//":r.slice(0,t)},basename:function(r,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(r);var n=0,t=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";var d=e.length-1,p=-1;for(u=r.length-1;u>=0;--u){var g=r.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(t=u):(d=-1,t=p))}return n===t?t=p:t===-1&&(t=r.length),r.slice(n,t)}else{for(u=r.length-1;u>=0;--u)if(r.charCodeAt(u)===47){if(!s){n=u+1;break}}else t===-1&&(s=!1,t=u+1);return t===-1?"":r.slice(n,t)}},extname:function(r){h(r);for(var e=-1,n=0,t=-1,s=!0,u=0,d=r.length-1;d>=0;--d){var p=r.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}t===-1&&(s=!1,t=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||t===-1||u===0||u===1&&e===t-1&&e===n+1?"":r.slice(e,t)},format:function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return a("/",r)},parse:function(r){h(r);var e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;var n=r.charCodeAt(0),t=n===47,s;t?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=r.length-1,b=0;f>=s;--f){if(n=r.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&t?e.base=e.name=r.slice(1,p):e.base=e.name=r.slice(d,p)):(d===0&&t?(e.name=r.slice(1,u),e.base=r.slice(1,p)):(e.name=r.slice(d,u),e.base=r.slice(d,p)),e.ext=r.slice(u,p)),d>0?e.dir=r.slice(0,d-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,hr=l,hr}function bu(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return fr?yu(i):wu(i)}function yu(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(ns,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<ts||a>rs||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function wu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function vu(i){let h=ti.resolve(i),o=i.charCodeAt(i.length-1);(o===es||fr&&o===Xo)&&h[h.length-1]!==ti.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(is,"%25")),!fr&&h.includes("\\")&&(h=h.replace(os,"%5C")),h.includes(`
4
- `)&&(h=h.replace(ss,"%0A")),h.includes("\r")&&(h=h.replace(as,"%0D")),h.includes(" ")&&(h=h.replace(ls,"%09")),a.pathname=h,a}function Qo(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return dr?_u(i):Eu(i)}function _u(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(ws,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<bs||a>ys||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function Eu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function Ko(i){let h=Yn.resolve(i),o=i.charCodeAt(i.length-1);(o===As||dr&&o===ms)&&h[h.length-1]!==Yn.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(vs,"%25")),!dr&&h.includes("\\")&&(h=h.replace(_s,"%5C")),h.includes(`
5
- `)&&(h=h.replace(Es,"%0A")),h.includes("\r")&&(h=h.replace(Ss,"%0D")),h.includes(" ")&&(h=h.replace(Cs,"%09")),a.pathname=h,a}var xe,Ho,Ze,qo,$o,zo,Go,lr,Jn,Zn,Xn,Yo,Jo,ur,Ot,cr,hr,ei,ti,Zo,Xo,es,ts,rs,fr,ns,is,os,ss,as,ls,us,cs,hs,fs,ds,ps,gs,ms,As,bs,ys,dr,ws,vs,_s,Es,Ss,Cs,Su=He(()=>{oe(),ae(),se(),uu(),hu(),du(),mu(),Wo(),xe={},Ho=At,Ze={isString:function(i){return typeof i=="string"},isObject:function(i){return typeof i=="object"&&i!==null},isNull:function(i){return i===null},isNullOrUndefined:function(i){return i==null}},xe.parse=Ht,xe.resolve=function(i,h){return Ht(i,!1,!0).resolve(h)},xe.resolveObject=function(i,h){return i?Ht(i,!1,!0).resolveObject(h):h},xe.format=function(i){return Ze.isString(i)&&(i=Ht(i)),i instanceof Ge?i.format():Ge.prototype.format.call(i)},xe.Url=Ge,qo=/^([a-z0-9.+-]+:)/i,$o=/:[0-9]*$/,zo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Go=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
6
- `," "]),lr=["'"].concat(Go),Jn=["%","/","?",";","#"].concat(lr),Zn=["/","?","#"],Xn=/^[+a-z0-9A-Z_-]{0,63}$/,Yo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Jo={javascript:!0,"javascript:":!0},ur={javascript:!0,"javascript:":!0},Ot={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},cr=et,Ge.prototype.parse=function(i,h,o){if(!Ze.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var a=i.indexOf("?"),l=a!==-1&&a<i.indexOf("#")?"?":"#",r=i.split(l);r[0]=r[0].replace(/\\/g,"/");var e=i=r.join(l);if(e=e.trim(),!o&&i.split("#").length===1){var n=zo.exec(e);if(n)return this.path=e,this.href=e,this.pathname=n[1],n[2]?(this.search=n[2],this.query=h?cr.parse(this.search.substr(1)):this.search.substr(1)):h&&(this.search="",this.query={}),this}var t=qo.exec(e);if(t){var s=(t=t[0]).toLowerCase();this.protocol=s,e=e.substr(t.length)}if(o||t||e.match(/^\/\/[^@\/]+@[^@\/]+/)){var u=e.substr(0,2)==="//";!u||t&&ur[t]||(e=e.substr(2),this.slashes=!0)}if(!ur[t]&&(u||t&&!Ot[t])){for(var d,p,g=-1,f=0;f<Zn.length;f++)(b=e.indexOf(Zn[f]))!==-1&&(g===-1||b<g)&&(g=b);for((p=g===-1?e.lastIndexOf("@"):e.lastIndexOf("@",g))!==-1&&(d=e.slice(0,p),e=e.slice(p+1),this.auth=decodeURIComponent(d)),g=-1,f=0;f<Jn.length;f++){var b;(b=e.indexOf(Jn[f]))!==-1&&(g===-1||b<g)&&(g=b)}g===-1&&(g=e.length),this.host=e.slice(0,g),e=e.slice(g),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var _=this.hostname.split(/\./),A=(f=0,_.length);f<A;f++){var w=_[f];if(w&&!w.match(Xn)){for(var I="",k=0,E=w.length;k<E;k++)w.charCodeAt(k)>127?I+="x":I+=w[k];if(!I.match(Xn)){var T=_.slice(0,f),O=_.slice(f+1),H=w.match(Yo);H&&(T.push(H[1]),O.unshift(H[2])),O.length&&(e="/"+O.join(".")+e),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=Ho.toASCII(this.hostname));var G=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+G,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),e[0]!=="/"&&(e="/"+e))}if(!Jo[s])for(f=0,A=lr.length;f<A;f++){var U=lr[f];if(e.indexOf(U)!==-1){var $=encodeURIComponent(U);$===U&&($=escape(U)),e=e.split(U).join($)}}var z=e.indexOf("#");z!==-1&&(this.hash=e.substr(z),e=e.slice(0,z));var F=e.indexOf("?");if(F!==-1?(this.search=e.substr(F),this.query=e.substr(F+1),h&&(this.query=cr.parse(this.query)),e=e.slice(0,F)):h&&(this.search="",this.query={}),e&&(this.pathname=e),Ot[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){G=this.pathname||"";var me=this.search||"";this.path=G+me}return this.href=this.format(),this},Ge.prototype.format=function(){var i=this.auth||"";i&&(i=(i=encodeURIComponent(i)).replace(/%3A/i,":"),i+="@");var h=this.protocol||"",o=this.pathname||"",a=this.hash||"",l=!1,r="";this.host?l=i+this.host:this.hostname&&(l=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(l+=":"+this.port)),this.query&&Ze.isObject(this.query)&&Object.keys(this.query).length&&(r=cr.stringify(this.query));var e=this.search||r&&"?"+r||"";return h&&h.substr(-1)!==":"&&(h+=":"),this.slashes||(!h||Ot[h])&&l!==!1?(l="//"+(l||""),o&&o.charAt(0)!=="/"&&(o="/"+o)):l||(l=""),a&&a.charAt(0)!=="#"&&(a="#"+a),e&&e.charAt(0)!=="?"&&(e="?"+e),h+l+(o=o.replace(/[?#]/g,function(n){return encodeURIComponent(n)}))+(e=e.replace("#","%23"))+a},Ge.prototype.resolve=function(i){return this.resolveObject(Ht(i,!1,!0)).format()},Ge.prototype.resolveObject=function(i){if(Ze.isString(i)){var h=new Ge;h.parse(i,!1,!0),i=h}for(var o=new Ge,a=Object.keys(this),l=0;l<a.length;l++){var r=a[l];o[r]=this[r]}if(o.hash=i.hash,i.href==="")return o.href=o.format(),o;if(i.slashes&&!i.protocol){for(var e=Object.keys(i),n=0;n<e.length;n++){var t=e[n];t!=="protocol"&&(o[t]=i[t])}return Ot[o.protocol]&&o.hostname&&!o.pathname&&(o.path=o.pathname="/"),o.href=o.format(),o}if(i.protocol&&i.protocol!==o.protocol){if(!Ot[i.protocol]){for(var s=Object.keys(i),u=0;u<s.length;u++){var d=s[u];o[d]=i[d]}return o.href=o.format(),o}if(o.protocol=i.protocol,i.host||ur[i.protocol])o.pathname=i.pathname;else{for(var p=(i.pathname||"").split("/");p.length&&!(i.host=p.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),p[0]!==""&&p.unshift(""),p.length<2&&p.unshift(""),o.pathname=p.join("/")}if(o.search=i.search,o.query=i.query,o.host=i.host||"",o.auth=i.auth,o.hostname=i.hostname||i.host,o.port=i.port,o.pathname||o.search){var g=o.pathname||"",f=o.search||"";o.path=g+f}return o.slashes=o.slashes||i.slashes,o.href=o.format(),o}var b=o.pathname&&o.pathname.charAt(0)==="/",y=i.host||i.pathname&&i.pathname.charAt(0)==="/",_=y||b||o.host&&i.pathname,A=_,w=o.pathname&&o.pathname.split("/")||[],I=(p=i.pathname&&i.pathname.split("/")||[],o.protocol&&!Ot[o.protocol]);if(I&&(o.hostname="",o.port=null,o.host&&(w[0]===""?w[0]=o.host:w.unshift(o.host)),o.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(p[0]===""?p[0]=i.host:p.unshift(i.host)),i.host=null),_=_&&(p[0]===""||w[0]==="")),y)o.host=i.host||i.host===""?i.host:o.host,o.hostname=i.hostname||i.hostname===""?i.hostname:o.hostname,o.search=i.search,o.query=i.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),o.search=i.search,o.query=i.query;else if(!Ze.isNullOrUndefined(i.search))return I&&(o.hostname=o.host=w.shift(),(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),o.search=i.search,o.query=i.query,Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o;if(!w.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var k=w.slice(-1)[0],E=(o.host||i.host||w.length>1)&&(k==="."||k==="..")||k==="",T=0,O=w.length;O>=0;O--)(k=w[O])==="."?w.splice(O,1):k===".."?(w.splice(O,1),T++):T&&(w.splice(O,1),T--);if(!_&&!A)for(;T--;T)w.unshift("..");!_||w[0]===""||w[0]&&w[0].charAt(0)==="/"||w.unshift(""),E&&w.join("/").substr(-1)!=="/"&&w.push("");var H,G=w[0]===""||w[0]&&w[0].charAt(0)==="/";return I&&(o.hostname=o.host=G?"":w.length?w.shift():"",(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),(_=_||o.host&&w.length)&&!G&&w.unshift(""),w.length?o.pathname=w.join("/"):(o.pathname=null,o.path=null),Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=i.auth||o.auth,o.slashes=o.slashes||i.slashes,o.href=o.format(),o},Ge.prototype.parseHost=function(){var i=this.host,h=$o.exec(i);h&&((h=h[0])!==":"&&(this.port=h.substr(1)),i=i.substr(0,i.length-h.length)),i&&(this.hostname=i)},xe.Url,xe.format,xe.resolve,xe.resolveObject,hr={},ei=!1,ti=Au(),Zo=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=vu,xe.fileURLToPath=bu,xe.Url,xe.format,xe.resolve,xe.resolveObject,xe.URL,Xo=92,es=47,ts=97,rs=122,fr=Zo==="win32",ns=/\//g,is=/%/g,os=/\\/g,ss=/\n/g,as=/\r/g,ls=/\t/g,us=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=Ko,xe.fileURLToPath=Qo,cs=xe.Url,hs=xe.format,fs=xe.resolve,ds=xe.resolveObject,ps=xe.parse,gs=xe.URL,ms=92,As=47,bs=97,ys=122,dr=us==="win32",ws=/\//g,vs=/%/g,_s=/\\/g,Es=/\n/g,Ss=/\r/g,Cs=/\t/g}),Cu=fe((i,h)=>{oe(),ae(),se(),h.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),ri=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.BufferedDuplex=void 0,i.writev=a;var h=St(),o=(Ve(),Be(We));function a(r,e){let n=new Array(r.length);for(let t=0;t<r.length;t++)typeof r[t].chunk=="string"?n[t]=o.Buffer.from(r[t].chunk,"utf8"):n[t]=r[t].chunk;this._write(o.Buffer.concat(n),"binary",e)}var l=class extends h.Duplex{constructor(r,e,n){super({objectMode:!0}),this.proxy=e,this.socket=n,this.writeQueue=[],r.objectMode||(this._writev=a.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",t=>{!this.destroyed&&this.readable&&this.push(t)})}_read(r){this.proxy.read(r)}_write(r,e,n){this.isSocketOpen?this.writeToProxy(r,e,n):this.writeQueue.push({chunk:r,encoding:e,cb:n})}_final(r){this.writeQueue=[],this.proxy.end(r)}_destroy(r,e){this.writeQueue=[],this.proxy.destroy(),e(r)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(r,e,n){this.proxy.write(r,e)===!1?this.proxy.once("drain",n):n()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:r,encoding:e,cb:n}=this.writeQueue.shift();this.writeToProxy(r,e,n)}}};i.BufferedDuplex=l}),pr=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(i,"__esModule",{value:!0}),i.streamBuilder=i.browserStreamBuilder=void 0;var o=(Ve(),Be(We)),a=h(Cu()),l=h(at()),r=St(),e=h(ir()),n=ri(),t=(0,l.default)("mqttjs:ws"),s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function u(_,A){let w=`${_.protocol}://${_.hostname}:${_.port}${_.path}`;return typeof _.transformWsUrl=="function"&&(w=_.transformWsUrl(w,_,A)),w}function d(_){let A=_;return _.port||(_.protocol==="wss"?A.port=443:A.port=80),_.path||(A.path="/"),_.wsOptions||(A.wsOptions={}),!e.default&&!_.forceNativeWebSocket&&_.protocol==="wss"&&s.forEach(w=>{Object.prototype.hasOwnProperty.call(_,w)&&!Object.prototype.hasOwnProperty.call(_.wsOptions,w)&&(A.wsOptions[w]=_[w])}),A}function p(_){let A=d(_);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let w=new URL(document.URL);A.hostname=w.hostname,A.port||(A.port=Number(w.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function g(_,A,w){t("createWebSocket"),t(`protocol: ${w.protocolId} ${w.protocolVersion}`);let I=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";t(`creating new Websocket for url: ${A} and protocol: ${I}`);let k;return w.createWebsocket?k=w.createWebsocket(A,[I],w):k=new a.default(A,[I],w.wsOptions),k}function f(_,A){let w=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",I=u(A,_),k;return A.createWebsocket?k=A.createWebsocket(I,[w],A):k=new WebSocket(I,[w]),k.binaryType="arraybuffer",k}var b=(_,A)=>{t("streamBuilder");let w=d(A);w.hostname=w.hostname||w.host||"localhost";let I=u(w,_),k=g(_,I,w),E=a.default.createWebSocketStream(k,w.wsOptions);return E.url=I,k.on("close",()=>{E.destroy()}),E};i.streamBuilder=b;var y=(_,A)=>{t("browserStreamBuilder");let w,I=p(A).browserBufferSize||1024*512,k=A.browserBufferTimeout||1e3,E=!A.objectMode,T=f(_,A),O=G(A,F,me);A.objectMode||(O._writev=n.writev.bind(O)),O.on("close",()=>{T.close()});let H=typeof T.addEventListener<"u";T.readyState===T.OPEN?(w=O,w.socket=T):(w=new n.BufferedDuplex(A,O,T),H?T.addEventListener("open",de):T.onopen=de),H?(T.addEventListener("close",U),T.addEventListener("error",$),T.addEventListener("message",z)):(T.onclose=U,T.onerror=$,T.onmessage=z);function G(le,pe,we){let Q=new r.Transform({objectMode:le.objectMode});return Q._write=pe,Q._flush=we,Q}function de(){t("WebSocket onOpen"),w instanceof n.BufferedDuplex&&w.socketReady()}function U(le){t("WebSocket onClose",le),w.end(),w.destroy()}function $(le){t("WebSocket onError",le);let pe=new Error("WebSocket error");pe.event=le,w.destroy(pe)}async function z(le){if(!O||O.destroyed||!O.readable)return;let{data:pe}=le;pe instanceof ArrayBuffer?pe=o.Buffer.from(pe):pe instanceof Blob?pe=o.Buffer.from(await new Response(pe).arrayBuffer()):pe=o.Buffer.from(pe,"utf8"),O.push(pe)}function F(le,pe,we){if(T.bufferedAmount>I){setTimeout(F,k,le,pe,we);return}E&&typeof le=="string"&&(le=o.Buffer.from(le,"utf8"));try{T.send(le)}catch(Q){return we(Q)}we()}function me(le){T.close(),le()}return w};i.browserStreamBuilder=y}),ni={};Rt(ni,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>ks,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var ks,Ts=He(()=>{oe(),ae(),se(),ks={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me}}),Is=fe((i,h)=>{oe(),ae(),se(),h.exports={}}),Bs=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(i,"__esModule",{value:!0});var o=h((Ts(),Be(ni))),a=h(at()),l=h(Is()),r=(0,a.default)("mqttjs:tcp"),e=(n,t)=>{if(t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost",t.socksProxy)return(0,l.default)(t.hostname,t.port,t.socksProxy,{timeout:t.socksTimeout});let{port:s,path:u}=t,d=t.hostname;return r("port %d and host %s",s,d),o.default.createConnection({port:s,host:d,path:u})};i.default=e}),Os={};Rt(Os,{default:()=>xs});var xs,ku=He(()=>{oe(),ae(),se(),xs={}}),Ps=fe(i=>{oe(),ae(),se();var h=i&&i.__rest||function(u,d){var p={};for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&d.indexOf(g)<0&&(p[g]=u[g]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,g=Object.getOwnPropertySymbols(u);f<g.length;f++)d.indexOf(g[f])<0&&Object.prototype.propertyIsEnumerable.call(u,g[f])&&(p[g[f]]=u[g[f]]);return p},o=i&&i.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(i,"__esModule",{value:!0});var a=o((ku(),Be(Os))),l=o((Ts(),Be(ni))),r=o(at()),e=o(Is()),n=(0,r.default)("mqttjs:tls");function t(u){let{host:d,port:p,socksProxy:g}=u,f=h(u,["host","port","socksProxy"]);return a.default.connect(g?Object.assign(Object.assign({},f),{socket:(0,e.default)(d,p,g,{timeout:u.socksTimeout})}):u)}var s=(u,d)=>{d.port=d.port||8883,d.host=d.hostname||d.host||"localhost",l.default.isIP(d.host)===0&&(d.servername=d.host),d.rejectUnauthorized=d.rejectUnauthorized!==!1,delete d.path,n("port %d host %s rejectUnauthorized %b",d.port,d.host,d.rejectUnauthorized);let p=t(d);p.on("secureConnect",()=>{d.rejectUnauthorized&&!p.authorized?p.emit("error",new Error("TLS not authorized")):p.removeListener("error",g)});function g(f){d.rejectUnauthorized&&u.emit("error",f),p.end()}return p.on("error",g),p};i.default=s}),Rs=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,r,e;function n(){let p=new o.Transform;return p._write=(g,f,b)=>{l.send({data:g.buffer,success(){b()},fail(y){b(new Error(y))}})},p._flush=g=>{l.close({success(){g()}})},p}function t(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function s(p,g){let f=p.protocol==="wxs"?"wss":"ws",b=`${f}://${p.hostname}${p.path}`;return p.port&&p.port!==80&&p.port!==443&&(b=`${f}://${p.hostname}:${p.port}${p.path}`),typeof p.transformWsUrl=="function"&&(b=p.transformWsUrl(b,p,g)),b}function u(){l.onOpen(()=>{e.socketReady()}),l.onMessage(p=>{let{data:g}=p;g instanceof ArrayBuffer?g=h.Buffer.from(g):g=h.Buffer.from(g,"utf8"),r.push(g)}),l.onClose(()=>{e.emit("close"),e.end(),e.destroy()}),l.onError(p=>{let g=new Error(p.errMsg);e.destroy(g)})}var d=(p,g)=>{if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let f=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";t(g);let b=s(g,p);l=wx.connectSocket({url:b,protocols:[f]}),r=n(),e=new a.BufferedDuplex(g,r,l),e._destroy=(_,A)=>{l.close({success(){A&&A(_)}})};let y=e.destroy;return e.destroy=(_,A)=>(e.destroy=y,setTimeout(()=>{l.close({fail(){e._destroy(_,A)}})},0),e),u(),e};i.default=d}),Ms=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,r,e,n=!1;function t(){let g=new o.Transform;return g._write=(f,b,y)=>{l.sendSocketMessage({data:f.buffer,success(){y()},fail(){y(new Error)}})},g._flush=f=>{l.closeSocket({success(){f()}})},g}function s(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function u(g,f){let b=g.protocol==="alis"?"wss":"ws",y=`${b}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(y=`${b}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(y=g.transformWsUrl(y,g,f)),y}function d(){n||(n=!0,l.onSocketOpen(()=>{e.socketReady()}),l.onSocketMessage(g=>{if(typeof g.data=="string"){let f=h.Buffer.from(g.data,"base64");r.push(f)}else{let f=new FileReader;f.addEventListener("load",()=>{let b=f.result;b instanceof ArrayBuffer?b=h.Buffer.from(b):b=h.Buffer.from(b,"utf8"),r.push(b)}),f.readAsArrayBuffer(g.data)}}),l.onSocketClose(()=>{e.end(),e.destroy()}),l.onSocketError(g=>{e.destroy(g)}))}var p=(g,f)=>{if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");let b=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";s(f);let y=u(f,g);return l=f.my,l.connectSocket({url:y,protocols:b}),r=t(),e=new a.BufferedDuplex(f,r,l),d(),e};i.default=p}),Tu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0}),i.connectAsync=u;var o=h(at()),a=h((Su(),Be(Vo))),l=h(Wn()),r=h(ir());typeof ke?.nextTick!="function"&&(ke.nextTick=setImmediate);var e=(0,o.default)("mqttjs"),n=null;function t(d){let p;d.auth&&(p=d.auth.match(/^(.+):(.+)$/),p?(d.username=p[1],d.password=p[2]):d.username=d.auth)}function s(d,p){var g,f,b;if(e("connecting to an MQTT broker..."),typeof d=="object"&&!p&&(p=d,d=""),p=p||{},d&&typeof d=="string"){let A=a.default.parse(d,!0),w={};if(A.port!=null&&(w.port=Number(A.port)),w.host=A.hostname,w.query=A.query,w.auth=A.auth,w.protocol=A.protocol,w.path=A.path,p=Object.assign(Object.assign({},w),p),!p.protocol)throw new Error("Missing protocol");p.protocol=p.protocol.replace(/:$/,"")}if(p.unixSocket=p.unixSocket||((g=p.protocol)===null||g===void 0?void 0:g.includes("+unix")),p.unixSocket?p.protocol=p.protocol.replace("+unix",""):!(!((f=p.protocol)===null||f===void 0)&&f.startsWith("ws"))&&!(!((b=p.protocol)===null||b===void 0)&&b.startsWith("wx"))&&delete p.path,t(p),p.query&&typeof p.query.clientId=="string"&&(p.clientId=p.query.clientId),r.default||p.unixSocket?p.socksProxy=void 0:p.socksProxy===void 0&&typeof ke<"u"&&(p.socksProxy=ke.env.MQTTJS_SOCKS_PROXY),p.cert&&p.key)if(p.protocol){if(["mqtts","wss","wxs","alis"].indexOf(p.protocol)===-1)switch(p.protocol){case"mqtt":p.protocol="mqtts";break;case"ws":p.protocol="wss";break;case"wx":p.protocol="wxs";break;case"ali":p.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(n||(n={},!r.default&&!p.forceNativeWebSocket?(n.ws=pr().streamBuilder,n.wss=pr().streamBuilder,n.mqtt=Bs().default,n.tcp=Bs().default,n.ssl=Ps().default,n.tls=n.ssl,n.mqtts=Ps().default):(n.ws=pr().browserStreamBuilder,n.wss=pr().browserStreamBuilder,n.wx=Rs().default,n.wxs=Rs().default,n.ali=Ms().default,n.alis=Ms().default)),!n[p.protocol]){let A=["mqtts","wss"].indexOf(p.protocol)!==-1;p.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((w,I)=>A&&I%2===0?!1:typeof n[w]=="function")[0]}if(p.clean===!1&&!p.clientId)throw new Error("Missing clientId for unclean clients");p.protocol&&(p.defaultProtocol=p.protocol);function y(A){return p.servers&&((!A._reconnectCount||A._reconnectCount===p.servers.length)&&(A._reconnectCount=0),p.host=p.servers[A._reconnectCount].host,p.port=p.servers[A._reconnectCount].port,p.protocol=p.servers[A._reconnectCount].protocol?p.servers[A._reconnectCount].protocol:p.defaultProtocol,p.hostname=p.host,A._reconnectCount++),e("calling streambuilder for",p.protocol),n[p.protocol](A,p)}let _=new l.default(y,p);return _.on("error",()=>{}),_}function u(d,p,g=!0){return new Promise((f,b)=>{let y=s(d,p),_={connect:w=>{A(),f(y)},end:()=>{A(),f(y)},error:w=>{A(),y.end(),b(w)}};g===!1&&(_.close=()=>{_.error(new Error("Couldn't connect to server"))});function A(){Object.keys(_).forEach(w=>{y.off(w,_[w])})}Object.keys(_).forEach(w=>{y.on(w,_[w])})})}i.default=s}),Us=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(g,f,b,y){y===void 0&&(y=b);var _=Object.getOwnPropertyDescriptor(f,b);(!_||("get"in _?!f.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return f[b]}}),Object.defineProperty(g,y,_)}:function(g,f,b,y){y===void 0&&(y=b),g[y]=f[b]}),o=i&&i.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),a=i&&i.__importStar||(function(){var g=function(f){return g=Object.getOwnPropertyNames||function(b){var y=[];for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[y.length]=_);return y},g(f)};return function(f){if(f&&f.__esModule)return f;var b={};if(f!=null)for(var y=g(f),_=0;_<y.length;_++)y[_]!=="default"&&h(b,f,y[_]);return o(b,f),b}})(),l=i&&i.__exportStar||function(g,f){for(var b in g)b!=="default"&&!Object.prototype.hasOwnProperty.call(f,b)&&h(f,g,b)},r=i&&i.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=i.KeepaliveManager=i.UniqueMessageIdProvider=i.DefaultMessageIdProvider=i.Store=i.MqttClient=i.connectAsync=i.connect=i.Client=void 0;var e=r(Wn());i.MqttClient=e.default;var n=r(wo());i.DefaultMessageIdProvider=n.default;var t=r(lu());i.UniqueMessageIdProvider=t.default;var s=r(vo());i.Store=s.default;var u=a(Tu());i.connect=u.default,Object.defineProperty(i,"connectAsync",{enumerable:!0,get:function(){return u.connectAsync}});var d=r(Io());i.KeepaliveManager=d.default,i.Client=e.default,l(Wn(),i),l(Dt(),i);var p=nr();Object.defineProperty(i,"ReasonCodes",{enumerable:!0,get:function(){return p.ReasonCodes}})}),Iu=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(e,n,t,s){s===void 0&&(s=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,s,u)}:function(e,n,t,s){s===void 0&&(s=t),e[s]=n[t]}),o=i&&i.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),a=i&&i.__importStar||(function(){var e=function(n){return e=Object.getOwnPropertyNames||function(t){var s=[];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(s[s.length]=u);return s},e(n)};return function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var s=e(n),u=0;u<s.length;u++)s[u]!=="default"&&h(t,n,s[u]);return o(t,n),t}})(),l=i&&i.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&h(n,e,t)};Object.defineProperty(i,"__esModule",{value:!0});var r=a(Us());i.default=r,l(Us(),i)});const Bu=Iu();/*! Bundled license information:
7
-
8
- @jspm/core/nodelibs/browser/buffer.js:
9
- (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
10
-
11
- safe-buffer/index.js:
12
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
13
- */const Ou=async i=>{if(i.host&&i.port&&!await xu(i.host,i.port))return;const h=C.ref(),o=C.ref({});return C.onMounted(()=>{h.value=Bu.connect(i),i.topics||(i.topics=["#"]);for(const a of i.topics)h.value.subscribe(a,l=>{if(l)throw l});h.value.on("message",(a,l)=>{o.value[a]||(o.value[a]=[]),o.value[a].push(l.toString())})}),C.onUnmounted(()=>{h.value?.end()}),{messages:o}},xu=async(i,h)=>{try{const o=new AbortController,a=setTimeout(()=>o.abort(),2e3);try{return await fetch(`${i}:${h}`,{mode:"no-cors",signal:o.signal}),clearTimeout(a),!0}catch(l){if(clearTimeout(a),l instanceof DOMException&&l.name==="AbortError")return!1;const r=String(l);return!(r.includes("NetworkError")||r.includes("Failed to fetch")||r.includes("net::ERR_CONNECTION_REFUSED"))}}catch{return!1}};function Pu(i){i.component("ActionFooter",fi),i.component("BeamArrow",di),i.component("BeamBtn",pi),i.component("BeamDayDivider",gr),i.component("BeamFilter",gi),i.component("BeamFilterOption",yi),i.component("BeamHeading",wi),i.component("BeamMetadata",vi),i.component("BeamModal",_i),i.component("BeamModalOutlet",Ei),i.component("BeamProgress",Si),i.component("Confirm",Ci),i.component("FixedTop",ki),i.component("ItemCheck",vr),i.component("ItemCount",_r),i.component("ListAnchor",Ti),i.component("ListItem",zt),i.component("ListView",Ii),i.component("Navbar",Bi),i.component("ScanInput",Pi),i.component("SegmentedDisplay",Ri),i.component("SplitColumn",Mi),i.component("ToggleArrow",Ui)}Te.ActionFooter=fi,Te.BeamArrow=di,Te.BeamBtn=pi,Te.BeamDayDivider=gr,Te.BeamFilter=gi,Te.BeamFilterOption=yi,Te.BeamHeading=wi,Te.BeamMetadata=vi,Te.BeamModal=_i,Te.BeamModalOutlet=Ei,Te.BeamProgress=Si,Te.Confirm=Ci,Te.FixedTop=ki,Te.ItemCheck=vr,Te.ItemCount=_r,Te.ListAnchor=Ti,Te.ListItem=zt,Te.ListView=Ii,Te.Navbar=Bi,Te.ScanInput=Pi,Te.SegmentedDisplay=Ri,Te.SplitColumn=Mi,Te.ToggleArrow=Ui,Te.install=Pu,Te.useMqttStream=Ou,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(Te,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],C):(Te=typeof globalThis<"u"?globalThis:Te||self,C(Te["@stonecrop/beam"]={},Te.Vue))})(this,(function(Te,C){"use strict";var hi=document.createElement("style");hi.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";.beam_action-footer[data-v-37933bd1]{margin-left:0;background:linear-gradient(180deg,transparent 0%,white 100%);color:var(--sc-primary-text-color);position:fixed;bottom:0;left:0;width:100%;padding:.625rem;text-align:center}.beam_metadata_arrow[data-v-2b1d7448]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-2b1d7448]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-2b1d7448]{width:20px;display:block}.beam_btn[data-v-bc768596]{font-size:.875rem;text-align:center;padding:.3125rem .75rem;border:1px solid var(--sc-btn-border);color:var(--sc-btn-label-color);background-color:var(--sc-btn-color);cursor:pointer;font-family:var(--sc-font-family)}.beam_btn[data-v-bc768596]:hover,.beam_btn[data-v-bc768596]:active{background-color:var(--sc-btn-hover)}.beam_btn a:link,.beam_btn a:visited,.beam_btn a:hover,.beam_btn a:active{text-decoration:none;color:var(--sc-btn-label-color)}.beam_day-divider[data-v-160cf6ef]{text-align:left;padding:1rem;background:var(--sc-cell-changed-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;margin-bottom:1rem;margin-left:calc(-1 * var(--sc-list-margin));margin-right:calc(-1 * var(--sc-list-margin))}.beam_day-divider h2[data-v-160cf6ef]{text-align:left;font-size:1rem;color:var(--sc-primary-text-color);margin:0;padding:0}.beam_day-divider[data-v-160cf6ef]:first-of-type{margin-top:0}.beam_filters[data-v-f8d60c9f]{background-color:var(--sc-primary-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;min-height:2em;overflow:visible;padding:.625rem;transition:all .2s ease-in-out}.beam_filters-heading[data-v-f8d60c9f]{align-items:center;background-color:var(--sc-primary-color);box-sizing:border-box;cursor:pointer;display:flex;font-size:1rem}.beam_filters-heading>h1[data-v-f8d60c9f]{font-size:1rem}.beam_filters-options[data-v-f8d60c9f]{display:flex;flex-direction:row;justify-content:flex-start;margin:1rem 0;padding:0 1rem;gap:1rem}@media(max-width:479px){.beam_filters-options[data-v-f8d60c9f]{flex-direction:column}}.beam_filter-option[data-v-ad8ee21c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-ad8ee21c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-ad8ee21c]{align-items:stretch;appearance:none;background-color:#fff;border:1px solid var(--sc-row-border-color);color:var(--sc-primary-text-color);display:flex;font-family:var(--sc-font-family);font-size:.8rem;font-weight:700;position:relative}label[data-v-ad8ee21c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-ad8ee21c]{background:var(--sc-primary-color);color:var(--sc-primary-text-color);cursor:pointer;display:flex;align-items:center;width:5px;padding:.5rem .7rem}.beam_filter-label[data-v-ad8ee21c]{display:flex;align-items:center}svg[data-v-ad8ee21c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-ad8ee21c]{background-color:#fff;border-top:none;border:1px solid var(--sc-row-border-color);box-sizing:border-box;left:0;list-style:none;margin:0;max-height:200px;overflow-y:scroll;padding:0rem;position:absolute;width:100%;z-index:100}.beam_filter-select-option[data-v-ad8ee21c]{font-size:.8rem;font-family:var(--sc-font-family);font-weight:700;color:var(--sc-primary-text-color);border-bottom:1px solid var(--sc-row-border-color);padding:.5rem}.beam_filter-select-option[data-v-ad8ee21c]:hover{background:var(--sc-primary-color)}.selected[data-v-ad8ee21c],.selected[data-v-ad8ee21c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-ad8ee21c]{flex-grow:1;max-width:300px;width:50%}@media(max-width:479px){.beam_filter-container[data-v-ad8ee21c]{width:100%;max-width:100%}}.beam_header[data-v-5182a4d5]{border:1px solid transparent;text-align:left;font-size:1.125rem;color:var(--sc-primary-text-color);margin:0;padding:0;font-family:var(--sc-font-family)}.beam_metadata[data-v-80484331]{box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;color:var(--sc-primary-text-color);font-family:var(--sc-font-family)}.beam_metadata_content[data-v-80484331]{padding-top:10px}.beam_metadata_header[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;padding:0 30px;justify-content:space-between}.beam_metadata_count[data-v-80484331]{font-size:1.5rem}.beam_metadata_count p[data-v-80484331]{margin:0}.beam_metadata_header-order-num[data-v-80484331]{font-weight:700;font-size:1.5rem}.beam_metadata_block[data-v-80484331]{padding:0 30px;margin:10px 0}.beam_metadata_shipping[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between}.beam_metadata_shipping p[data-v-80484331]{line-height:1.5rem}@media screen and (max-width:600px){.beam_metadata_shipping[data-v-80484331]{flex-direction:column}}.beam_metadata_component_header[data-v-80484331]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.beam_metadata_components[data-v-80484331]{overflow:scroll}hr[data-v-80484331]{display:block;height:1px;border:0;border-top:1px solid var(--sc-row-border-color);margin:1em 0;padding:0}.beam_metadata_heading{font-size:1.125rem;font-weight:700;margin:.625rem 0;color:var(--sc-primary-text-color)}.beam_modal[data-v-55f98302]{position:fixed;inset:0;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:1000;text-align:center;padding:1.25rem}.beam_modal-confirm[data-v-5b430dca]{background:#fff;padding:1.25rem;width:80%;max-width:400px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.beam_modal-confirm button[data-v-5b430dca]{margin:.625rem}.beam_modal-confirm h2[data-v-5b430dca]{border-bottom:1px solid var(--sc-row-border-color);padding-bottom:.625rem;color:var(--sc-primary-text-color)}.fixed-top[data-v-a38a41d0]{position:sticky;top:0;left:0}.container[data-v-ad0dc7dc]{display:block;position:relative;padding-left:2.5ch;margin:0;margin-top:.5rem;cursor:pointer;font-size:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container input[data-v-ad0dc7dc]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-ad0dc7dc]{position:absolute;top:0;left:0;height:2rem;width:2rem;background-color:#eee;outline:2px solid transparent;border:1px solid var(--sc-highlight)}.container:hover input~.checkmark[data-v-ad0dc7dc]{background-color:#fff}.container input:checked~.checkmark[data-v-ad0dc7dc]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-ad0dc7dc]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-ad0dc7dc]:after{display:block}.container .checkmark[data-v-ad0dc7dc]:after{left:25%;top:50%;width:.5rem;height:1rem;border:solid var(--sc-text-color);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg) translate(-50%,-50%)}.beam_item-count[data-v-d4f676ed]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-d4f676ed]{margin:0;padding:0;outline:none}.beam_list-anchor[data-v-7e3ecf0d]{text-decoration:none;outline:none;color:var(--sc-primary-text-color)}.beam_list-item[data-v-634dd647]{padding:.625rem;border-bottom:1px solid var(--sc-row-border-color);max-width:100%;box-sizing:border-box;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:1.25rem;cursor:pointer;outline:2px solid transparent;outline-offset:-1px}.beam_list-item[data-v-634dd647]:focus{outline:2px solid var(--sc-focus-cell-outline);background-color:var(--sc-focus-cell-background)}.beam_list-text[data-v-634dd647]{width:80%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex-grow:1;font-size:.875rem;color:var(--sc-primary-text-color)}.beam_list-text label[data-v-634dd647],.beam_list-text p[data-v-634dd647]{overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.beam_list-item label[data-v-634dd647]{display:block}.beam_list-item p[data-v-634dd647]{margin:0}.beam_list-view[data-v-d536b2a7]{font-family:var(--sc-font-family);list-style-type:none;margin-top:1px;margin-left:var(--sc-list-margin);margin-right:var(--sc-list-margin);padding:0}ul.beam_list-view[data-v-d536b2a7]:last-of-type{padding-bottom:2.5em}.beam_navbar[data-v-cfc4c14e]{padding:.625rem;background-color:var(--sc-primary-color);margin-left:0;min-height:2em;max-height:2em;color:var(--sc-primary-text-color);display:flex;flex-flow:row nowrap;align-content:center;justify-content:space-between;align-items:center;position:sticky;top:0;font-family:var(--sc-font-family);border-bottom:1px solid var(--sc-row-border-color)}.beam_navbar h1[data-v-cfc4c14e]{margin-left:.625rem}.segmented-display[data-v-1731e036]{width:100%;padding:1rem;box-sizing:border-box;display:flex;background:var(--sc-segmented-display-background);align-items:center;justify-content:flex-end}.segmented-display-output[data-v-1731e036]{text-align:right;font-family:Segment7,Arimo,sans-serif;font-weight:400;font-size:var(--sc-segemented-display-font-size);padding:0;margin:0;letter-spacing:.3rem;margin-bottom:-.7rem;color:var(--sc-segmented-display-color)}.two-column[data-v-3f65313d]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width:400px){.two-column[data-v-3f65313d]{flex-direction:column;gap:0}}.column[data-v-3f65313d]{flex-grow:1;width:50%}@media screen and (max-width:400px){.column[data-v-3f65313d]{width:100%}}.column-right[data-v-3f65313d]{text-align:right}@media screen and (max-width:400px){.column-right[data-v-3f65313d]{text-align:left}}svg[data-v-05e7abed]{width:100%;overflow:visible;fill:var(--sc-primary-text-color)}.arrow-icon[data-v-05e7abed]{width:.4rem;transform:rotate(0);transform-origin:center;position:relative;transition:all .1s ease-in-out;margin:.5rem;cursor:pointer;display:flex;align-items:center}.open[data-v-05e7abed]{transform:rotate(90deg)}@font-face{font-family:Segment7;src:url(data:font/otf;base64,T1RUTwAOAIAAAwBgQkFTRQAJAAQAACasAAAADkNGRiC5m9MSAAAH7AAAHbpGRlRNa6XwRAAAJrwAAAAcR0RFRgKxAqIAACWoAAAASkdQT1Ou773UAAAmLAAAAH5HU1VCRNhM5gAAJfQAAAA4T1MvMljUYiwAAAFQAAAAYGNtYXAxVzUsAAAFhAAAAkZoZWFkAmNATwAAAOwAAAA2aGhlYQdTAF8AAAEkAAAAJGhtdHgW0g5oAAAm2AAAAgZtYXhwAQFQAAAAAUgAAAAGbmFtZYoOx10AAAGwAAAD0nBvc3QAAAABAAAHzAAAACAAAQAAAAEAAOVWl1RfDzz1AAsD6AAAAADPuH6JAAAAAM+4fokAAP84A9EDIAACAAgAAgAAAAAAAAABAAADIP84AFoCSQAA/ngD0QBkAAUAAAAAAAAAAAAAAAAAAgAAUAABAQAAAAMCSQJYAAUACAKKArsABwCMAooCu//nAd8AMQECAAACAAUJAAAAAAAAAAAAAwAAAAAAAAAAAAAAAFBmRWQAAQAAAP8DIP84AFoDIADIAAAAAQAAAAABwgHCACAAIAACAAAADgCuAAEAAAAAAAAAsQFkAAEAAAAAAAEACAIoAAEAAAAAAAIACAJDAAEAAAAAAAMAIwKUAAEAAAAAAAQACALKAAEAAAAAAAUACQLnAAEAAAAAAAYAEAMTAAMAAQQJAAABYgAAAAMAAQQJAAEAEAIWAAMAAQQJAAIAEAIxAAMAAQQJAAMARgJMAAMAAQQJAAQAEAK4AAMAAQQJAAUAEgLTAAMAAQQJAAYAIALxAFMAdAByAGkAYwB0AGwAeQAgAHMAZQB2AGUAbgAtAHMAZQBnAG0AZQBuAHQAIAAoAHAAbAB1AHMAIABwAG8AaQBuAHQAKQAgAGMAYQBsAGMAdQBsAGEAdABvAHIAIABkAGkAcwBwAGwAYQB5ACAAZgBhAGMAZQAsACAAZgBpAHgAZQBkAC0AdwBpAGQAdABoACAAYQBuAGQAIABmAHIAZQBlAC4AIAAgACgAYwApACAAQwBlAGQAcgBpAGMAIABLAG4AaQBnAGgAdAAgADIAMAAxADQALgAgACAATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBjAGUAIAB2ADEALgAxAC4AIAAgAFIAZQBzAGUAcgB2AGUAZAAgAG4AYQBtAGUAOgAgAFMAZQBnAG0AZQBuAHQANwAuAABTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny4AAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFMAdABhAG4AZABhAHIAZAAAU3RhbmRhcmQAAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAUwBlAGcAbQBlAG4AdAA3ACAAOgAgADcALQA2AC0AMgAwADEANAAARm9udEZvcmdlIDIuMCA6IFNlZ21lbnQ3IDogNy02LTIwMTQAAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFYAZQByAHMAaQBvAG4AIAAgAABWZXJzaW9uICAAAFMAZQBnAG0AZQBuAHQANwBTAHQAYQBuAGQAYQByAGQAAFNlZ21lbnQ3U3RhbmRhcmQAAAAAAAADAAAAAwAAABwAAQAAAAAAPAADAAEAAAAcAAQAIAAAAAQABAABAAAA////AAAAAP//AAEAAQAAAAAABgIKAAAAAAEAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AH8AgADFAMYAyADKANIA1wDdAOIA4QDjAOUA5ADmAOgA6gDpAOsA7ADuAO0A7wDwAPIA9ADzAPUA9wD2APsA+gD8AP0AAACxAKMApACoAAAAtwDgAK8AqgAAALUAqQAAAMcA2QAAALIAAAAAAKYAtgAAAAAAAAAAAAAAqwC7AAAA5wD5AMAAogCtAAAAAAAAAAAArAC8AAAAoQDBAMQA1gAAAAAAAAAAAAAAAAAAAAAA+AAAAQAAAAAAAAAAAAAAAAAAAAAAALgAAAAAAAAAwwDLAMIAzADJAM4AzwDQAM0A1ADVAAAA0wDbANwA2gAAAAAAAACwAAAAAAAAALkAAAAAAAAAAAADAAD//QAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAEBAABAQERU2VnbWVudDdTdGFuZGFyZAABAgABADf4YgD4YwH4ZAL4ZQP4ZgSMDAGIDAKLDAOLDASL+1z6Zfm0BRwDrw8cAAAQHAWwERwAMRwbyBIATAIAAQAIAA8AFgAdACQAKwAyADkAQABHAE4AVQBcAGMAagBxAHgAfwCGAI0AlACbAKIAqQCwALcAvgDFAMwA0wDaAOEA6ADvAPYA/QEEAQsBEgEZASABJwEuATUBPAFDAUoBUQFYAV8BZgFtAXQBewGCAYkBkAGXAZ4BpQGsAbMBugHBAcgBzwHWAd0B5AHrAfIB8gKjAqsCswK7dW5pMDAwMHVuaTAwMDF1bmkwMDAydW5pMDAwM3VuaTAwMDR1bmkwMDA1dW5pMDAwNnVuaTAwMDd1bmkwMDA4dW5pMDAwOXVuaTAwMEF1bmkwMDBCdW5pMDAwQ3VuaTAwMER1bmkwMDBFdW5pMDAwRnVuaTAwMTB1bmkwMDExdW5pMDAxMnVuaTAwMTN1bmkwMDE0dW5pMDAxNXVuaTAwMTZ1bmkwMDE3dW5pMDAxOHVuaTAwMTl1bmkwMDFBdW5pMDAxQnVuaTAwMUN1bmkwMDFEdW5pMDAxRXVuaTAwMUZ1bmkwMDdGdW5pMDA4MHVuaTAwODF1bmkwMDgydW5pMDA4M3VuaTAwODR1bmkwMDg1dW5pMDA4NnVuaTAwODd1bmkwMDg4dW5pMDA4OXVuaTAwOEF1bmkwMDhCdW5pMDA4Q3VuaTAwOER1bmkwMDhFdW5pMDA4RnVuaTAwOTB1bmkwMDkxdW5pMDA5MnVuaTAwOTN1bmkwMDk0dW5pMDA5NXVuaTAwOTZ1bmkwMDk3dW5pMDA5OHVuaTAwOTl1bmkwMDlBdW5pMDA5QnVuaTAwOUN1bmkwMDlEdW5pMDA5RXVuaTAwOUZ1bmkwMEEwdW5pMDBBRHVuaTAwQjJ1bmkwMEIzdW5pMDBCNXVuaTAwQjlTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny5TZWdtZW50N1NlZ21lbnQ3U3RhbmRhcmQAAAABhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAAEAAgADAAQABQAGAAcAaAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAfABCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAGAAYQBiAGcAZACgAGYAgwCqAIsAagCXAckApQCAAKEAnAHKAcsAfQHMAHMAcgCFAc0AjwB4AJ4AmwCjAHsArgCrAKwAsACtAK8AigCxALUAsgCzALQAuQC2ALcAuACaALoAvgC7ALwAvwC9AKgAjQDEAMEAwgDDAMUAnQCVAMsAyADJAM0AygDMAJAAzgDSAM8A0ADRANYA0wDUANUApwDXANsA2ADZANwA2gCfAJMA4QDeAN8A4ADiAKIA4wEBAgABACIANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAdgCQALYA7QEmAUgBXgGRAcoB8gIWAjQCQAJOAncCxgLnAyQDZwOWA+AEPARhBMEFDgUaBToFTgViBYAFsgX/BkEGhwa6Bv4HOgdrB7AH7QgJCEIIegihCLkI8QlACXwJsgnLCg0KQgqECsYLGAs2C3gLqgvdDAAMNwxcDGgMewzIDQ4NIg1mDa0N3g4pDloOaQ6iDtoPAQ84D1gPjQ/JEAEQGhBeEJMQwREDEVURkhHWEf8SABIcEh0STxJQElESUhJTElQSVRJWElcSWBJZEloSWxJcEl0SXhJfEmASYRJiEmMSZBJlEmYSZxJoEmkSahJrEmwSbRJuEm8ScBJxEnIScxJ0EnUSdhJ3EngSeRJ6EnsSfBJ9En4SfxKAEq8SsBKxErISsxLqEusS7BLtEu4S7xLwEvES8hLzEvQS9RL2EvcS+BL5EvoS+xL8Ev0S/hL/EwATARMCEwMTBBMFEwYTBxMIEwkTChMLEwwTDRMOEw8TEBMRExITExMUE2ETrhOvE7ATsROyE7MTtBO1E/wT/RP+E/8UABQBFAIUAxQEFAUUBhQHFAgUCRQKFAsUDBQNFA4UDxQQFBEUEou9+EW9Ab29+BW9A70W+Hn4qfx5Br38dxX4RfgV/EUHDvtc+nwBi/plA/tcBPpl+nz+ZQYODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg527/floPfFnxL4O/Z66hNw+KH5jhUgChOIsf0/FSEKDvhJdvfBd593zHcSE9Dd+WEVIgr3+fAVIwoOien3m+ppoPfFnxITgPcf5xUkChPA+3j3+hUlChOw9wz3zBUgCg6J6VOg9/ug94zqOJ8SE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOielodvgldveh6kx3n3cSE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOr6D3vuppoPfFnxITwPdA+FYVJQrRTRUrChOwm/gwFSAKDvhJdvfud593Evg79hPQ+KH5jhUgCg6J6X929+N3ynb3oepMdxITsPcf5xUkCvvX98IVLAoTcC0KEzRG+AsVIgoTOH73CxUoCg6J6Wh2+CV296HqeXefdxIToPcf5xUTYCYKE6AnChMw+4n5RBUoCmT8FxUpChNgKgoTKJv4MBUgCg6J6feb6n529+53n3cSE4D3H+cVJAoTwPt49/oVJQoTsPcM98wVIAoOxHb30+p+dvfud593EhPA90D4VhUlCtFNFSsKE7Cb+DAVIAoOielodhITgPcf5xUTQCYKE4AnCtb3vBUpChNAKgoO9/fqAfdA+FYVJQoOdu8B+JXqA/jH2hUhCg7bdve86lN3ynb37ncSE6jY+B4VLgoTyKD3ABUlCvcM98wVLwoTmDAKDonpaHa3dvfjd8p296HqTHfMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoTGZv4MBUgCg7Edvgldvfud593Evgq9xATyPhv+BgVKwoT6Jv4MBUgCg6J6X9297zqU3fKdveh6nl3EhOA9x/nFSQKE1D71/fCFS4KEwSP+EoVKAoTIPvq+9kVJQoTCvcM98wVIAoOielodvfT6n5296HqeXefdxITgPcf5xUTQCYKE4AnChMI+4n5RBUoChMg++r72RUlCtFNFSkKE0AqChMUm/gwFSAKDsR299Pqfnb3wXefd8x3EhO03flhFSIKE8SP+2cVJQrRTRUrCpv4MBUvChOkMAoOielodvfU6X5296HmUHefdxITQPhw+BkVUlx++3jNPZylnve1BRMg++XuFTEK+4333RVJYAUTCDIKExT8Q1AVMwoTgG38zhU0Cg6J6Wh2tnb3vulndrd296HmUHcSE4D3HucVNAoTBfvS+QUVMwp+9wkVSWAFEwIyChMQ++r72hUxCtNOFVJcfvt4BRNANQoTKPxEtRWHgYaBh4EIe/vF576X930FDsR2+CV296HqeXefdxIT4Pcv+aAVKApk/BcVKwoT0Jv4MBUgCg6J6Wh2t3b3vOpTd8p296HqTHfMdxITgAD3H+cVE0AAJgoTgAAnChMoAPvX98IVLgoTBQBG+AsVIgoTAgB+9wsVKAoTEAD76vvZFSUK0U0VKQoTQAAqChMEgJv4MBUgCg6J6Wh299Pqfnb3oepMd593zHcSE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMRm/gwFSAKDvf36gH3QPhWFSUKDnbv9+Wg98WfEvg79nrqE3D4ofmOFSAKE4ix/T8VIQoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6feb6gH3H+cVJAr7ePf6FSUKDonpU6ASE4D3H+cVE0AmChOAJwrW97wVKQoTQCoKDtt297zqU3fKdveh6nl3EhOg2PgeFS4KE4iP+EoVKAoTwPvq+9kVJQoTlPcM98wVIAoOielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg7Edrd297zqU3fKdveh6kx3zHcSE9DY+B4VLgoTykb4CxUiChPEfvcLFSgKE+D76vvZFSUK0U0VKwoTyZv4MBUgCg6J6VOgjaD3p+o/n6Gg95ifEhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoOielqoPe6n6Gg94zqOJ8SE7D3H+cVJAr71/fCFSwKE3AtChM0RvgLFSIKEzh+9wsVKAoOielToI2g96fqP5+hoPfFnxITgvcf5xUTQiYKE4InChMq+9f3whUuChMSoPcAFSUK0U0VKQoTQioKm/gwFS8KEwYwCg6J6X9297zqU3fKdveh6kx3EhOA9x/nFSQKE1D71/fCFS4KEwpG+AsVIgoTBH73CxUoChMg++r72RUlCg7GoPen6j+foaD3jOo4nxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoOielodrd29+N3ynb3oepMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoOr6CNoPen6j+foaD3mJ+knxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDq+g9/ug98WfAfgq9xAD+G/4GBUrCpv4MBUgCg6J6VOgjaD3up+hoPfFnxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg6voI2g96fqP5+hoPeM6jifEhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpaqD3up+hoPeYnxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtj4HhUuCqD3ABUlCtFNFSsKm/gwFSMKDsR2t3b343fKdveh6kx3zHcSE/DY+B4VLgoT9Eb4CxUiChP4fvcLFSgKZPwXFSsKE/Kb+DAVIAoOielToI2g97qfoaD3jOo4n6SfEhOY9x/nFRNYJgoTmCcK+9f3whUsChM4LQoTGkb4CxUiChMcfvcLFSgKZPwXFSkKE1gqChMZm/gwFSAKDsag96fqP5+hoPeM6jifpJ8SE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKE5L3DPfMFSAKDq+g977qaaD3jOo4n6SfEhOo3flhFSIKE5B+9wsVKAoTwPvq+9kVJQrRTRUrChOkm/gwFSAKDsag96fqP58SE6DY+B4VLgoTwKD3ABUlCg6J6VOg97/paaD3jOY8nxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6Wqg96fqP5+hoPeYnxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPen6j+foaD3mJ+knxITg/cf5xUTQyYKE4MnChMr+9f3whUuCkb4CxV7+6kFEwc2ChMTj/tnFSUK0U0VKQoTQyoKm/gwFS8KEwcwCg6J6feb6vd/6gH3H+cVJAr7iflEFSgK++r72RUlCg6J6VOg977qaaD3mJ+knxIThPcf5xUTRCYKE4QnChMc+9L5BRUiChMkj/tnFSUK0U0VKQoTRCoKm/gwFS8KExQwCg7GoPen6j+foaD3jOplnxIToNj4HhUuChOIj/hKFSgKE8D76vvZFSUKE5T3DPfMFSAKDonpaqD3up+hoPeM6jifEhOw9x/nFSQK+9f3whUsChNwLQoTNEb4CxUiChM4fvcLFSgKDsR299Pqfnb3wXefdxITsN35YRUiChPAj/tnFSUK0U0VKwoOielToPf7oPeM6mWfEhOg9x/nFRNgJgoToCcKEzD7iflEFSgKZPwXFSkKE2AqChMom/gwFSAKDvhJdveh6kx3n3fMdxIToN35YRUiChPAfvcLFSgKE4iWfhUgCg739+oB90D4VhUlCg74NKD3xZ8B+Dv2A/ih+Y4VIAoOielodrd297zqU3fKdveh6nl3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6Wh2t3b3vOpTd8p298F3EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6Wh2t3b3vOpTd8p29+53EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KExKg9wAVJQrRTRUpChNCKgqb+DAVLwoTBjAKDonpf3b3vOpTd8p296HqTHfMdxITgPcf5xUkChNQ+9f3whUuChMKRvgLFSIKEwR+9wsVKAoTIPvq+9kVJQoTCfcM98wVIAoO23b3vOpTd8p296HqTHcSE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKDonpU6D3vuppoPeM6jifpJ8SE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMSm/gwFSAKDsR2t3b3vOpTd8p298F3EhPU2PgeFS4KRvgLFXv7qQUTzDYKE+SP+2cVJQrRTRUrCg7EdgH4KvID+G/4GBUrCg6J6Wh2t3b343fKdvfudxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg7Edrd297zqU3fKdveh6kx3EhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpf3b343fKdvfBdxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtt297zqU3fKdvfBd8x3EhOs2PgeFS4KRvgLFXv7qQUTnDYKE8yP+2cVJQr3DPfMFS8KE5wwCg7Edrd297zqU3cSE9DY+B4VLgoT4KD3ABUlCtFNFSsKDonpaHa3dve86lN3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KExCg9wAVJQrRTRUpChNAKgoO23b3vOpTd8p296HqTHfMdxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoTkvcM98wVIAoOxHb30+p+dveh6kx3n3fMdxITqN35YRUiChOQfvcLFSgKE8D76vvZFSUK0U0VKwoTopv4MBUgCg7bdve86lN3EhOg2PgeFS4KE8Cg9wAVJQoOielodvfU6X5296HmUHefdxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6X9297zqU3fKdvfBdxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpaHa3dvfjdxITkPcf5xUTUCYKE5AnCvvX98IVLAoTMC0K99i5FSkKE1AqCg6J6Wh2t3b343fKdvfBd8x3EhOe9x/nFRNeJgoTnicK+9f3whUsChM+LQpG+AsVIgr3x/ulFSkKE14qCpv4MBUjCg6J6Wh2t3b3vOpTd8p298F3zHcSE4P3H+cVE0MmChODJwoTK/vX98IVLgpG+AsVe/upBRMHNgoTE4/7ZxUlCtFNFSkKE0MqCpv4MBUvChMHMAoOxHa3dve86lN3ynb3wXfMdxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDonpaHb30+p+dvfBd593zHcSE4L3H+cVE0ImChOCJwoTGvvS+QUVIgoTIo/7ZxUlCtFNFSkKE0IqCpv4MBUvChMSMAoOxqD3p+o/n6Gg98WfEhOo2PgeFS4KE8ig9wAVJQr3DPfMFS8KE5gwCg4Or6D3+6D3xZ8B+Cr3EAP4b/gYFSsKm/gwFSAKDg6J6X929+N3ynb3oep5dxITsPcf5xUkCvvX98IVLAoTcC0KEziP+EoVKAoTNJZ+FSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg739+ppoPeM6jifpJ8SE4D3QPhWFSUKE1D71/efFSIKE2B+9wsVKAoTSJZ+FSAKDg4ODg7GoPen6j+foaD3mJ+knxITrNj4HhUuCkb4CxV7+6kFE5w2ChPMj/tnFSUK9wz3zBUvChOcMAoODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6VOgjaD3p+o/n6Gg94zqZZ8SE4D3H+cVE0AmChOAJwoTKPvX98IVLgoTAo/4ShUoChMQ++r72RUlCtFNFSkKE0AqChMFm/gwFSAKDg4ODg4ODg6J6Wqg96fqP5+hoPeM6jifpJ8SE4D3H+cVJAoTUPvX98IVLgoTCkb4CxUiChMEfvcLFSgKEyD76vvZFSUKEwn3DPfMFSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg743RSLFYmx+T24nIwGHgoCLwwJiwwK6gqfjNGOjJD6GAwM+mUL6pOPnPnpDA0cADETABcCAAEAGgAsADgAUAB+AJEAngDBAMwA0wDcAOoA8gD8AQ0BFAEnAToBQwFPAX0BhgGPMTF/+2rDYa6wBZDukeqQ7giLkIiRiZAIC291dm1voHakp6Cgqad3oHIfC3v7qZZz2rqX91oFCzExf/tqw2GusAWQ7pHqkO6LkIiRiZAICy9Ti4oFi4aPiI6IkoKSg5KCCNKL9yKL90CLBZKOjY4fi42JjYiOdqV0qXalCAs7XwWgeqN8oHgI94yLy7dKvgULL1OLigWLho+IjogIC5KCkoOSggjSi/cii/dAiwWSjo2OH4uNiY2IjnaldKl2pQgLSF7bWfeTi+blBQtSXX/7dwULzTydpZ73tAULUl1/+3fNPJ2lnve0BQuIgYOAiIEIC3v7xOe9l/d9BQuIgYOAiIEIe/vE572X930FCzExf/tqBQvDYa6wBZDukeqQ7ouQiJGJkAgLPF8FoXqhfKF5CPeMi8u2Sb4FC9tY95KL5eYFC3z7qJVy27qW91sFCy9Ui4kFi4aQiI6HkoOSgpKDCNOL9yGL90CLBZKPjY4fi42JjYiOdqZzp3amCAvNPZylnve1BQuWc9q6l/daBQsAAAABAAAAAAAAAA4AFgAAAAQAAAACAAAAAgAIADEAOgABAEAAQAACAEIAQgACAEYARgACAE8ATwACAFkAWQACAGIAcwACAHUAegACAAAAAQAAAAoAHAAeAAFERkxUAAgABAAAAAD//wAAAAAAAQAEAAEACAABAAgAAQAGACAAAQACAEcASwABAAAACgAeACwAAURGTFQACAAEAAAAAP//AAEAAAABa2VybgAIAAAAAQABAAIABgAOAAEAAAABABAAAgAAAAEAFgABAAgABP22AAEAAQAvAAEAJAAEAAAACgAeAB4AHgAeAB4AHgAeAB4AHgAeAAEAL/22AAIAAQAxADoAAAAAAAEAAAAIAAAAAAAEAAAAAAAAAAEAAAAAzD2izwAAAADPr89TAAAAAM+4fiECSQAAAkkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpwBCAC8ALwAvAFwBpwAvAC8ALwBcAC8AXAIBAC8ALwGWAC8ALwBCAC4ALgBYAC8ALwBcAacALwAvAC8ALwAvAC8ALwAvAC8ALwAvAC8ALwGWAC8ALwAvAC8ALwAvAC8AQgAvAC4ALwAvAC8ALwAvAC8ALwAvAEIALwBCAFwBpwAvAC8ALwAvAC8ALwAvAC8BlgAvAC8ALwAvAC8ALwAvAEIALwAuAC8ALwAvAC8ALwAvAC8AAAGWAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8ALwAAAAAAAAAAAAAAAAAAAC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)}:root{--sc-primary-color: #f2f2f2;--sc-primary-text-color: #666666;--sc-alert: #e63c28;--sc-success: #155724;--sc-warning: #f0f34f;--sc-font-family: Arimo, Arial, sans-serif;--sc-row-border-color: #ccc;--sc-btn-color: white;--sc-btn-border: #ccc;--sc-btn-label-color: black;--sc-list-margin: .625rem;--sc-cell-changed-color: #d8edff;--sc-segemented-display-font-size: 4.5rem;--sc-segmented-display-background: #404040;--sc-segmented-display-color: #b0b0b0}.beam_copy{color:var(--sc-primary-text-color);font-size:1rem;line-height:1.5rem;font-family:var(--sc-font-family)}.beam--bold{font-weight:700}.beam--normal{font-weight:400}.beam--alert{color:var(--sc-alert)}.beam--warning{color:var(--sc-warning)}.beam--success{color:var(--sc-success)}.v-toast__item{border-radius:0;color:#fff;font-family:var(--sc-font-family)}.v-toast__item--success{background-color:var(--sc-success)!important;color:#fff}.v-toast__item--info{background-color:var(--sc-primary-text-color)!important}.v-toast__item--warning{background-color:var(--sc-warning)!important;color:#fff}.v-toast__item--error{background-color:var(--sc-alert)!important;color:#fff}.v-toast__item--default{background-color:var(--sc-primary-text-color)!important}
2
+ /*$vite$:1*/`,document.head.appendChild(hi);const Zs={class:"beam_action-footer"},Xs={class:"footer-action-wrapper"},ea=C.defineComponent({__name:"ActionFooter",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,t)=>{const e=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("footer",Zs,[C.createElementVNode("span",Xs,[C.createVNode(e,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Fe=(i,h)=>{const o=i.__vccOpts||i;for(const[a,l]of h)o[a]=l;return o},fi=Fe(ea,[["__scopeId","data-v-37933bd1"]]),ta={class:"beam_metadata_arrow"},ra={class:"beam_metadata_arrow-head"},na={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},di=Fe(C.defineComponent({__name:"BeamArrow",props:{color:{default:"#c4c4c4"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",ta,[C.createElementVNode("div",{class:"beam_metadata_arrow-body",style:C.normalizeStyle({background:i.color})},null,4),C.createElementVNode("div",ra,[(C.openBlock(),C.createElementBlock("svg",na,[C.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:C.normalizeStyle([{fill:"#c4c4c4"},{fill:i.color}])},null,4)]))])]))}}),[["__scopeId","data-v-2b1d7448"]]),ia={},oa={class:"beam_btn"};function sa(i,h){return C.openBlock(),C.createElementBlock("button",oa,[C.renderSlot(i.$slots,"default",{},()=>[h[0]||(h[0]=C.createTextVNode("Action",-1))],!0)])}const pi=Fe(ia,[["render",sa],["__scopeId","data-v-bc768596"]]),aa={class:"beam_day-divider"},gr=Fe(C.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(i){const h=C.computed(()=>{if(!i.item.date||isNaN(Date.parse(i.item.date)))return i.item.date;const o=new Date(i.item.date);return i.item.dateFormat&&i.item.dateFormat.toLowerCase()==="iso"?o.toISOString():o.toDateString()});return(o,a)=>(C.openBlock(),C.createElementBlock(C.Fragment,null,[C.createElementVNode("div",aa,[C.createElementVNode("h2",null,C.toDisplayString(h.value),1)]),C.renderSlot(o.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),la={class:"beam_filters"},ua={class:"beam_filters-options"},gi=Fe(C.defineComponent({__name:"BeamFilter",setup(i){const h=C.ref(!1);return(o,a)=>{const l=C.resolveComponent("ToggleArrow"),t=C.resolveComponent("BeamHeading");return C.openBlock(),C.createElementBlock("div",la,[C.createElementVNode("div",{class:"beam_filters-heading",onClick:a[0]||(a[0]=e=>h.value=!h.value)},[C.createVNode(l,{open:h.value},null,8,["open"]),C.createVNode(t,null,{default:C.withCtx(()=>[...a[1]||(a[1]=[C.createTextVNode("Filter",-1)])]),_:1})]),C.withDirectives(C.createElementVNode("div",ua,[C.renderSlot(o.$slots,"default",{},void 0,!0)],512),[[C.vShow,h.value]])])}}}),[["__scopeId","data-v-f8d60c9f"]]);function ca(i,h){return C.getCurrentScope()?(C.onScopeDispose(i,h),!0):!1}const ha=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fa=Object.prototype.toString,da=i=>fa.call(i)==="[object Object]",bt=()=>{};function pa(...i){if(i.length!==1)return C.toRef(...i);const h=i[0];return typeof h=="function"?C.readonly(C.customRef(()=>({get:h,set:bt}))):C.ref(h)}function ga(i,h){function o(...a){return new Promise((l,t)=>{Promise.resolve(i(()=>h.apply(this,a),{fn:h,thisArg:this,args:a})).then(l).catch(t)})}return o}function ma(i,h={}){let o,a,l=bt;const t=r=>{clearTimeout(r),l(),l=bt};let e;return r=>{const s=C.toValue(i),u=C.toValue(h.maxWait);return o&&t(o),s<=0||u!==void 0&&u<=0?(a&&(t(a),a=void 0),Promise.resolve(r())):new Promise((d,p)=>{l=h.rejectOnCancel?p:d,e=r,u&&!a&&(a=setTimeout(()=>{o&&t(o),a=void 0,d(e())},u)),o=setTimeout(()=>{a&&t(a),a=void 0,d(r())},s)})}}function mr(i){return Array.isArray(i)?i:[i]}function Aa(i,h=200,o={}){return ga(ma(h,o),i)}function ba(i,h,o){return C.watch(i,h,{...o,immediate:!0})}const mi=ha?window:void 0;function Nt(i){var h;const o=C.toValue(i);return(h=o?.$el)!==null&&h!==void 0?h:o}function Ar(...i){const h=(a,l,t,e)=>(a.addEventListener(l,t,e),()=>a.removeEventListener(l,t,e)),o=C.computed(()=>{const a=mr(C.toValue(i[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0});return ba(()=>{var a,l;return[(a=(l=o.value)===null||l===void 0?void 0:l.map(t=>Nt(t)))!==null&&a!==void 0?a:[mi].filter(t=>t!=null),mr(C.toValue(o.value?i[1]:i[0])),mr(C.unref(o.value?i[2]:i[1])),C.toValue(o.value?i[3]:i[2])]},([a,l,t,e],n,r)=>{if(!a?.length||!l?.length||!t?.length)return;const s=da(e)?{...e}:e,u=a.flatMap(d=>l.flatMap(p=>t.map(g=>h(d,p,g,s))));r(()=>{u.forEach(d=>d())})},{flush:"post"})}function Ai(i,h,o={}){const{window:a=mi,ignore:l=[],capture:t=!0,detectIframe:e=!1,controls:n=!1}=o;if(!a)return n?{stop:bt,cancel:bt,trigger:bt}:bt;let r=!0;const s=y=>C.toValue(l).some(_=>{if(typeof _=="string")return Array.from(a.document.querySelectorAll(_)).some(A=>A===y.target||y.composedPath().includes(A));{const A=Nt(_);return A&&(y.target===A||y.composedPath().includes(A))}});function u(y){const _=C.toValue(y);return _&&_.$.subTree.shapeFlag===16}function d(y,_){const A=C.toValue(y),w=A.$.subTree&&A.$.subTree.children;return w==null||!Array.isArray(w)?!1:w.some(I=>I.el===_.target||_.composedPath().includes(I.el))}const p=y=>{const _=Nt(i);if(y.target!=null&&!(!(_ instanceof Element)&&u(i)&&d(i,y))&&!(!_||_===y.target||y.composedPath().includes(_))){if("detail"in y&&y.detail===0&&(r=!s(y)),!r){r=!0;return}h(y)}};let g=!1;const f=[Ar(a,"click",y=>{g||(g=!0,setTimeout(()=>{g=!1},0),p(y))},{passive:!0,capture:t}),Ar(a,"pointerdown",y=>{const _=Nt(i);r=!s(y)&&!!(_&&!y.composedPath().includes(_))},{passive:!0}),e&&Ar(a,"blur",y=>{setTimeout(()=>{var _;const A=Nt(i);((_=a.document.activeElement)===null||_===void 0?void 0:_.tagName)==="IFRAME"&&!A?.contains(a.document.activeElement)&&h(y)},0)},{passive:!0})].filter(Boolean),b=()=>f.forEach(y=>y());return n?{stop:b,cancel:()=>{r=!1},trigger:y=>{r=!0,p(y),r=!1}}:b}function br(i){return typeof Window<"u"&&i instanceof Window?i.document.documentElement:typeof Document<"u"&&i instanceof Document?i.documentElement:i}const yr=new WeakMap;function ya(i,h=!1){const o=C.shallowRef(h);let a="";C.watch(pa(i),e=>{const n=br(C.toValue(e));if(n){const r=n;if(yr.get(r)||yr.set(r,r.style.overflow),r.style.overflow!=="hidden"&&(a=r.style.overflow),r.style.overflow==="hidden")return o.value=!0;if(o.value)return r.style.overflow="hidden"}},{immediate:!0});const l=()=>{const e=br(C.toValue(i));!e||o.value||(e.style.overflow="hidden",o.value=!0)},t=()=>{const e=br(C.toValue(i));!e||!o.value||(e.style.overflow=a,yr.delete(e),o.value=!1)};return ca(t),C.computed({get(){return o.value},set(e){e?l():t()}})}const wr=new WeakMap,wa={mounted(i,h){const o=!h.modifiers.bubble;let a;if(typeof h.value=="function")a=Ai(i,h.value,{capture:o});else{const[l,t]=h.value;a=Ai(i,l,Object.assign({capture:o},t))}wr.set(i,a)},unmounted(i){const h=wr.get(i);h&&typeof h=="function"?h():h?.stop(),wr.delete(i)}};function va(){let i=!1;const h=C.shallowRef(!1);return(o,a)=>{if(h.value=a.value,i)return;i=!0;const l=ya(o,a.value);C.watch(h,t=>l.value=t)}}va();const _a={class:"beam_filter-container"},Ea={class:"beam_filter-option-select"},Sa={class:"beam_filter-label"},Ca={key:0,ref:"menu",class:"beam_filter-select-menu"},ka=["data-value","onClick"],bi=Fe(C.defineComponent({__name:"BeamFilterOption",props:{choices:{},title:{default:"title"}},emits:["select"],setup(i,{emit:h}){const o=h,a=C.ref(!1),l=C.ref(i.choices[0].label),t=C.ref(i.choices[0].value),e=n=>{l.value=n.label,t.value=n.value,o("select",n)};return(n,r)=>{const s=C.resolveComponent("BeamHeading");return C.withDirectives((C.openBlock(),C.createElementBlock("div",_a,[C.createVNode(s,{class:"beam_filter-option-heading"},{default:C.withCtx(()=>[C.createTextVNode(C.toDisplayString(i.title),1)]),_:1}),C.createElementVNode("div",{class:"beam_filter-option",onClick:r[0]||(r[0]=u=>a.value=!a.value)},[C.createElementVNode("div",Ea,[r[1]||(r[1]=C.createElementVNode("div",{class:"beam_filter-arrow"},[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),C.createElementVNode("div",Sa,[C.createElementVNode("label",null,C.toDisplayString(l.value),1)])]),a.value?(C.openBlock(),C.createElementBlock("ul",Ca,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.choices,u=>(C.openBlock(),C.createElementBlock("li",{key:u.value,class:C.normalizeClass([{selected:l.value==u.label},"beam_filter-select-option"]),"data-value":u.value,onClick:d=>e(u)},C.toDisplayString(u.label),11,ka))),128))],512)):C.createCommentVNode("",!0)])])),[[C.unref(wa),()=>a.value=!1]])}}}),[["__scopeId","data-v-ad8ee21c"]]),Ta={},Ia={class:"beam_header"};function Ba(i,h){return C.openBlock(),C.createElementBlock("h1",Ia,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const yi=Fe(Ta,[["render",Ba],["__scopeId","data-v-5182a4d5"]]),Oa={class:"beam_metadata"},xa={class:"beam_metadata_content"},Pa={class:"beam_metadata_block"},Ra={class:"beam_metadata_heading"},wi=Fe(C.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",Oa,[C.createElementVNode("div",xa,[C.renderSlot(h.$slots,"default",{},()=>[o[1]||(o[1]=C.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),C.createElementVNode("div",Pa,[C.createElementVNode("p",Ra,[o[0]||(o[0]=C.createTextVNode(" Status: ",-1)),C.createElementVNode("span",{class:C.normalizeClass([{alert:!i.order.complete},"beam_metadata--normal"])},C.toDisplayString(i.order.complete?"Complete":"In Progress"),3)])]),o[2]||(o[2]=C.createStaticVNode('<div class="beam_metadata_shipping beam_metadata_block" data-v-80484331><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Source</p></div><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Receiving</p></div></div>',1))],!0)]),o[3]||(o[3]=C.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),Ma={class:"beam_modal"},vi=Fe(C.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},emits:["closemodal","confirmmodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("BeamBtn"),l=C.resolveComponent("portal");return C.openBlock(),C.createBlock(l,{to:"beam_modal_outlet"},{default:C.withCtx(()=>[C.withDirectives(C.createElementVNode("div",Ma,[C.createVNode(a,{onClick:o[0]||(o[0]=t=>h.$emit("closemodal"))},{default:C.withCtx(()=>[...o[3]||(o[3]=[C.createTextVNode("Close Modal",-1)])]),_:1}),C.renderSlot(h.$slots,"default",{onClosemodal:o[1]||(o[1]=t=>h.$emit("closemodal")),onConfirmmodal:o[2]||(o[2]=t=>h.$emit("confirmmodal"))},void 0,!0)],512),[[C.vShow,i.showModal]])]),_:3})}}}),[["__scopeId","data-v-55f98302"]]),_i=C.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("portal-target");return C.openBlock(),C.createBlock(a,{name:"beam_modal_outlet"})}}}),Ua={class:"beam_metadata_heading"},Ei=C.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(i){const h=C.computed(()=>i.complete?i.completeMessage:i.progressMessage);return(o,a)=>(C.openBlock(),C.createElementBlock("p",Ua,[C.createTextVNode(C.toDisplayString(i.label)+": ",1),C.createElementVNode("span",{class:C.normalizeClass([{"beam--alert":!i.complete},"beam--normal"])},C.toDisplayString(h.value),3)]))}}),Da={},La={class:"beam_modal-confirm"};function Na(i,h){const o=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("div",La,[h[4]||(h[4]=C.createElementVNode("h2",null,"Would you like to continue?",-1)),C.createVNode(o,{onClick:h[0]||(h[0]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[2]||(h[2]=[C.createTextVNode("Yes",-1)])]),_:1}),C.createVNode(o,{onClick:h[1]||(h[1]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[3]||(h[3]=[C.createTextVNode("No",-1)])]),_:1})])}const Si=Fe(Da,[["render",Na],["__scopeId","data-v-5b430dca"]]),Fa={},ja={class:"fixed-top"};function Wa(i,h){return C.openBlock(),C.createElementBlock("div",ja,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const Ci=Fe(Fa,[["render",Wa],["__scopeId","data-v-a38a41d0"]]),Va={class:"container"},vr=Fe(C.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue");return(o,a)=>(C.openBlock(),C.createElementBlock("label",Va,[C.withDirectives(C.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>h.value=l),type:"checkbox",tabindex:"-1"},null,512),[[C.vModelCheckbox,h.value]]),a[1]||(a[1]=C.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-ad0dc7dc"]]),Qa={class:"beam_item-count"},Ka=["contenteditable"],Ha={key:0},qa={key:1},_r=Fe(C.defineComponent({__name:"ItemCount",props:C.mergeModels({denominator:{default:0},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue"),o=C.computed(()=>i.denominator!==0&&h.value===i.denominator),a=e=>{const n=Number(e.target.innerHTML)||0;h.value=i.denominator?Math.min(n,i.denominator):n},l=Aa(e=>a(e),i.debounce),t=async e=>await l(e);return(e,n)=>(C.openBlock(),C.createElementBlock("div",Qa,[C.createElementVNode("span",{contenteditable:i.editable,class:C.normalizeClass({"beam--alert":!o.value}),onClick:C.withModifiers(a,["stop","prevent"]),onInput:C.withModifiers(t,["stop","prevent"]),onPaste:a},C.toDisplayString(h.value),43,Ka),i.denominator?(C.openBlock(),C.createElementBlock("span",Ha,"/"+C.toDisplayString(i.denominator),1)):C.createCommentVNode("",!0),i.uom?(C.openBlock(),C.createElementBlock("span",qa,"  "+C.toDisplayString(i.uom),1)):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-d4f676ed"]]),$a=["href"],ki=Fe(C.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("a",{href:i.to,class:"beam_list-anchor"},[C.renderSlot(h.$slots,"default",{},void 0,!0)],8,$a))}}),[["__scopeId","data-v-7e3ecf0d"]]),za={tabindex:"0",class:"beam_list-item"},Ga={class:"beam_list-text"},Ya={class:"beam--bold"},zt=Fe(C.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(i,{emit:h}){const o=h,a=C.ref(i.item);return C.watch(a,l=>{o("update",l)},{deep:!0}),(l,t)=>(C.openBlock(),C.createElementBlock("li",za,[C.createElementVNode("div",Ga,[C.createElementVNode("label",Ya,C.toDisplayString(a.value.label),1),C.createElementVNode("p",null,C.toDisplayString(a.value.description),1)]),a.value.count?(C.openBlock(),C.createBlock(_r,{key:0,modelValue:a.value.count.count,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value.count.count=e),debounce:a.value.debounce,denominator:a.value.count.of,editable:!0,uom:a.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):C.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(C.openBlock(),C.createBlock(vr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":t[1]||(t[1]=e=>a.value.checked=e)},null,8,["modelValue"])):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Ja={class:"beam_list-view"},Ti=Fe(C.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(i,{emit:h}){const o=h;C.onMounted(()=>{window.addEventListener("scroll",l)}),C.onUnmounted(()=>{window.removeEventListener("scroll",l)});const a=t=>o("update",t),l=()=>{const t=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;t-e<=2&&o("scrollbottom")};return(t,e)=>(C.openBlock(),C.createElementBlock("ul",Ja,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.items,n=>(C.openBlock(),C.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(C.openBlock(),C.createBlock(gr,{key:0,item:n},null,8,["item"])):n.linkComponent?(C.openBlock(),C.createBlock(C.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:C.withCtx(()=>[C.createVNode(zt,{item:n,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(C.openBlock(),C.createBlock(zt,{key:2,item:n,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),Za={class:"beam_navbar"},Ii=Fe(C.defineComponent({__name:"Navbar",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,t)=>{const e=C.resolveComponent("BeamHeading"),n=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("nav",Za,[C.renderSlot(l.$slots,"title",{},()=>[C.createVNode(e,null,{default:C.withCtx(()=>[...t[0]||(t[0]=[C.createTextVNode("TITLE",-1)])]),_:1})],!0),C.createVNode(n,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"navbaraction",{},()=>[t[1]||(t[1]=C.createTextVNode("Action",-1))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function Xa(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Gt={exports:{}},el=Gt.exports,Bi;function tl(){return Bi||(Bi=1,(function(i,h){(function(o,a){i.exports=a()})(el,(function(){var o={attachTo:function(a,l){if(a.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+a);var t={onScan:function(e,n){},onScanError:function(e){},onKeyProcess:function(e,n){},onKeyDetect:function(e,n){},onPaste:function(e,n){},keyCodeMapper:function(e){return o.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1};return l=this._mergeOptions(t,l),a.scannerDetectionData={options:l,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste,l.captureEvents),l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp,l.captureEvents),(l.reactToKeydown===!0||l.scanButtonKeyCode!==!1)&&a.addEventListener("keydown",this._handleKeyDown,l.captureEvents),this},detachFrom:function(a){a.scannerDetectionData.options.reactToPaste&&a.removeEventListener("paste",this._handlePaste),a.scannerDetectionData.options.scanButtonKeyCode!==!1&&a.removeEventListener("keyup",this._handleKeyUp),a.removeEventListener("keydown",this._handleKeyDown),a.scannerDetectionData=void 0},getOptions:function(a){return a.scannerDetectionData.options},setOptions:function(a,l){switch(a.scannerDetectionData.options.reactToPaste){case!0:l.reactToPaste===!1&&a.removeEventListener("paste",this._handlePaste);break;case!1:l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste);break}return a.scannerDetectionData.options.scanButtonKeyCode===!1?l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp):l.scanButtonKeyCode===!1&&a.removeEventListener("keyup",this._handleKeyUp),a.scannerDetectionData.options=this._mergeOptions(a.scannerDetectionData.options,l),this._reinitialize(a),this},decodeKeyEvent:function(a){var l=this._getNormalizedKeyNum(a);switch(!0){case(l>=48&&l<=90):case(l>=106&&l<=111):if(a.key!==void 0&&a.key!=="")return a.key;var t=String.fromCharCode(l);switch(a.shiftKey){case!1:t=t.toLowerCase();break;case!0:t=t.toUpperCase();break}return t;case(l>=96&&l<=105):return 0+(l-96)}return""},simulate:function(a,l){return this._reinitialize(a),Array.isArray(l)?l.forEach(function(t){var e={};(typeof t=="object"||typeof t=="function")&&t!==null?e=t:e.keyCode=parseInt(t);var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(a,l),this},_reinitialize:function(a){var l=a.scannerDetectionData.vars;l.firstCharTime=0,l.lastCharTime=0,l.accumulatedString=""},_isFocusOnIgnoredElement:function(a){var l=a.scannerDetectionData.options.ignoreIfFocusOn;if(!l)return!1;var t=document.activeElement;if(Array.isArray(l)){for(var e=0;e<l.length;e++)if(t.matches(l[e])===!0)return!0}else if(t.matches(l))return!0;return!1},_validateScanCode:function(a,l){var t=a.scannerDetectionData,e=t.options,n=t.options.singleScanQty,r=t.vars.firstCharTime,s=t.vars.lastCharTime,u={},d;switch(!0){case l.length<e.minLength:u={message:"Receieved code is shorter then minimal length"};break;case s-r>l.length*e.avgTimeByChar:u={message:"Receieved code was not entered in time"};break;default:return e.onScan.call(a,l,n),d=new CustomEvent("scan",{detail:{scanCode:l,qty:n}}),a.dispatchEvent(d),o._reinitialize(a),!0}return u.scanCode=l,u.scanDuration=s-r,u.avgTimeByChar=e.avgTimeByChar,u.minLength=e.minLength,e.onScanError.call(a,u),d=new CustomEvent("scanError",{detail:u}),a.dispatchEvent(d),o._reinitialize(a),!1},_mergeOptions:function(a,l){var t={},e;for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);for(e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e]);return t},_getNormalizedKeyNum:function(a){return a.which||a.keyCode},_handleKeyDown:function(a){var l=o._getNormalizedKeyNum(a),t=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(t.onKeyDetect.call(this,l,a)!==!1&&!o._isFocusOnIgnoredElement(this)){if(t.scanButtonKeyCode!==!1&&l==t.scanButtonKeyCode){e.longPressed||(e.longPressTimer=setTimeout(t.onScanButtonLongPress,t.scanButtonLongPressTime,this),e.longPressed=!0);return}switch(!0){case(e.firstCharTime&&t.suffixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!0;break;case(!e.firstCharTime&&t.prefixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!1;break;default:var r=t.keyCodeMapper.call(this,a);if(r===null)return;e.accumulatedString+=r,t.preventDefault&&a.preventDefault(),t.stopPropagation&&a.stopImmediatePropagation(),n=!1;break}e.firstCharTime||(e.firstCharTime=Date.now()),e.lastCharTime=Date.now(),e.testTimer&&clearTimeout(e.testTimer),n?(o._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(o._validateScanCode,t.timeBeforeScanTest,this,e.accumulatedString),t.onKeyProcess.call(this,r,a)}},_handlePaste:function(a){var l=this.scannerDetectionData.options,t=this.scannerDetectionData.vars,e=(event.clipboardData||window.clipboardData).getData("text");o._isFocusOnIgnoredElement(this)||(a.preventDefault(),l.stopPropagation&&a.stopImmediatePropagation(),l.onPaste.call(this,e,event),t.firstCharTime=0,t.lastCharTime=0,o._validateScanCode(this,e))},_handleKeyUp:function(a){if(!o._isFocusOnIgnoredElement(this)){var l=o._getNormalizedKeyNum(a);l==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)}},isScanInProgressFor:function(a){return a.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(a){return a.scannerDetectionData!==void 0}};return o}))})(Gt)),Gt.exports}var rl=tl();const Oi=Xa(rl),nl={id:"scan_input"},xi=C.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(i,{emit:h}){const o=h,a=i;return C.onMounted(()=>{const l=Oi.attachTo(window,{onScan:a.scanHandler});o("scanInstance",l)}),C.onUnmounted(()=>{Oi.detachFrom(window)}),(l,t)=>(C.openBlock(),C.createElementBlock("div",nl))}}),Pi=Fe(C.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(i){const h=C.computed(()=>i.displayInput===0?0 .toFixed(i.decimalPlaces):i.displayInput.toFixed(i.decimalPlaces)),o=a=>a?.substring(0,2)=="--"?`var(${a})`:a;return(a,l)=>(C.openBlock(),C.createElementBlock("div",{class:"segmented-display",style:C.normalizeStyle({background:o(i.displayColor)})},[C.createElementVNode("h1",{class:"segmented-display-output",style:C.normalizeStyle({color:o(i.textColor)})},C.toDisplayString(h.value),5)],4))}}),[["__scopeId","data-v-1731e036"]]),il={class:"column column-left"},ol={class:"column column-right"},Ri=Fe(C.defineComponent({__name:"SplitColumn",props:{justifyContent:{default:"space-between"},alignItems:{default:"flex-start"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:"two-column",style:C.normalizeStyle({justifyContent:i.justifyContent,alignItems:i.alignItems})},[C.createElementVNode("div",il,[C.renderSlot(h.$slots,"left",{},void 0,!0)]),C.createElementVNode("div",ol,[C.renderSlot(h.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-3f65313d"]]),Mi=Fe(C.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:C.normalizeClass(["arrow-icon",{open:i.open}])},[...o[0]||(o[0]=[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)])],2))}}),[["__scopeId","data-v-05e7abed"]]);var Er=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,al=Object.getOwnPropertyNames,ll=Object.prototype.hasOwnProperty,He=(i,h)=>()=>(i&&(h=i(i=0)),h),fe=(i,h)=>()=>(h||i((h={exports:{}}).exports,h),h.exports),Rt=(i,h)=>{for(var o in h)Er(i,o,{get:h[o],enumerable:!0})},ul=(i,h,o,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of al(h))!ll.call(i,l)&&l!==o&&Er(i,l,{get:()=>h[l],enumerable:!(a=sl(h,l))||a.enumerable});return i},Be=i=>ul(Er({},"__esModule",{value:!0}),i),oe=He(()=>{}),ke={};Rt(ke,{_debugEnd:()=>nn,_debugProcess:()=>rn,_events:()=>wn,_eventsCount:()=>vn,_exiting:()=>Vr,_fatalExceptions:()=>Xr,_getActiveHandles:()=>Wi,_getActiveRequests:()=>ji,_kill:()=>Hr,_linkedBinding:()=>Ni,_maxListeners:()=>yn,_preload_modules:()=>mn,_rawDebug:()=>Fr,_startProfilerIdleNotifier:()=>on,_stopProfilerIdleNotifier:()=>sn,_tickCallback:()=>tn,abort:()=>cn,addListener:()=>_n,allowedNodeEnvironmentFlags:()=>Jr,arch:()=>kr,argv:()=>Br,argv0:()=>gn,assert:()=>Vi,binding:()=>Mr,chdir:()=>Lr,config:()=>Qr,cpuUsage:()=>jt,cwd:()=>Dr,debugPort:()=>pn,default:()=>On,dlopen:()=>Fi,domain:()=>Wr,emit:()=>Tn,emitWarning:()=>Rr,env:()=>Ir,execArgv:()=>Or,execPath:()=>dn,exit:()=>Gr,features:()=>Zr,hasUncaughtExceptionCaptureCallback:()=>Qi,hrtime:()=>Yt,kill:()=>zr,listeners:()=>Hi,memoryUsage:()=>$r,moduleLoadList:()=>jr,nextTick:()=>Di,off:()=>Sn,on:()=>rt,once:()=>En,openStdin:()=>Yr,pid:()=>hn,platform:()=>Tr,ppid:()=>fn,prependListener:()=>In,prependOnceListener:()=>Bn,reallyExit:()=>Kr,release:()=>Nr,removeAllListeners:()=>kn,removeListener:()=>Cn,resourceUsage:()=>qr,setSourceMapsEnabled:()=>An,setUncaughtExceptionCaptureCallback:()=>en,stderr:()=>ln,stdin:()=>un,stdout:()=>an,title:()=>Cr,umask:()=>Ur,uptime:()=>Ki,version:()=>xr,versions:()=>Pr});function Sr(i){throw new Error("Node.js process "+i+" is not supported by JSPM core outside of Node.js")}function cl(){!yt||!wt||(yt=!1,wt.length?Xe=wt.concat(Xe):Ft=-1,Xe.length&&Ui())}function Ui(){if(!yt){var i=setTimeout(cl,0);yt=!0;for(var h=Xe.length;h;){for(wt=Xe,Xe=[];++Ft<h;)wt&&wt[Ft].run();Ft=-1,h=Xe.length}wt=null,yt=!1,clearTimeout(i)}}function Di(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];Xe.push(new Li(i,h)),Xe.length===1&&!yt&&setTimeout(Ui,0)}function Li(i,h){this.fun=i,this.array=h}function Qe(){}function Ni(i){Sr("_linkedBinding")}function Fi(i){Sr("dlopen")}function ji(){return[]}function Wi(){return[]}function Vi(i,h){if(!i)throw new Error(h||"assertion error")}function Qi(){return!1}function Ki(){return nt.now()/1e3}function Yt(i){var h=Math.floor((Date.now()-nt.now())*.001),o=nt.now()*.001,a=Math.floor(o)+h,l=Math.floor(o%1*1e9);return i&&(a=a-i[0],l=l-i[1],l<0&&(a--,l+=Jt)),[a,l]}function rt(){return On}function Hi(i){return[]}var Xe,yt,wt,Ft,Cr,kr,Tr,Ir,Br,Or,xr,Pr,Rr,Mr,Ur,Dr,Lr,Nr,Fr,jr,Wr,Vr,Qr,Kr,Hr,jt,qr,$r,zr,Gr,Yr,Jr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,gn,mn,An,nt,bn,Jt,yn,wn,vn,_n,En,Sn,Cn,kn,Tn,In,Bn,On,hl=He(()=>{oe(),ae(),se(),Xe=[],yt=!1,Ft=-1,Li.prototype.run=function(){this.fun.apply(null,this.array)},Cr="browser",kr="x64",Tr="browser",Ir={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Br=["/usr/bin/node"],Or=[],xr="v16.8.0",Pr={},Rr=function(i,h){console.warn((h?h+": ":"")+i)},Mr=function(i){Sr("binding")},Ur=function(i){return 0},Dr=function(){return"/"},Lr=function(i){},Nr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Fr=Qe,jr=[],Wr={},Vr=!1,Qr={},Kr=Qe,Hr=Qe,jt=function(){return{}},qr=jt,$r=jt,zr=Qe,Gr=Qe,Yr=Qe,Jr={},Zr={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Xr=Qe,en=Qe,tn=Qe,rn=Qe,nn=Qe,on=Qe,sn=Qe,an=void 0,ln=void 0,un=void 0,cn=Qe,hn=2,fn=1,dn="/bin/usr/node",pn=9229,gn="node",mn=[],An=Qe,nt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},nt.now===void 0&&(bn=Date.now(),nt.timing&&nt.timing.navigationStart&&(bn=nt.timing.navigationStart),nt.now=()=>Date.now()-bn),Jt=1e9,Yt.bigint=function(i){var h=Yt(i);return typeof BigInt>"u"?h[0]*Jt+h[1]:BigInt(h[0]*Jt)+BigInt(h[1])},yn=10,wn={},vn=0,_n=rt,En=rt,Sn=rt,Cn=rt,kn=rt,Tn=Qe,In=rt,Bn=rt,On={version:xr,versions:Pr,arch:kr,platform:Tr,release:Nr,_rawDebug:Fr,moduleLoadList:jr,binding:Mr,_linkedBinding:Ni,_events:wn,_eventsCount:vn,_maxListeners:yn,on:rt,addListener:_n,once:En,off:Sn,removeListener:Cn,removeAllListeners:kn,emit:Tn,prependListener:In,prependOnceListener:Bn,listeners:Hi,domain:Wr,_exiting:Vr,config:Qr,dlopen:Fi,uptime:Ki,_getActiveRequests:ji,_getActiveHandles:Wi,reallyExit:Kr,_kill:Hr,cpuUsage:jt,resourceUsage:qr,memoryUsage:$r,kill:zr,exit:Gr,openStdin:Yr,allowedNodeEnvironmentFlags:Jr,assert:Vi,features:Zr,_fatalExceptions:Xr,setUncaughtExceptionCaptureCallback:en,hasUncaughtExceptionCaptureCallback:Qi,emitWarning:Rr,nextTick:Di,_tickCallback:tn,_debugProcess:rn,_debugEnd:nn,_startProfilerIdleNotifier:on,_stopProfilerIdleNotifier:sn,stdout:an,stdin:un,stderr:ln,abort:cn,umask:Ur,chdir:Lr,cwd:Dr,env:Ir,title:Cr,argv:Br,execArgv:Or,pid:hn,ppid:fn,execPath:dn,debugPort:pn,hrtime:Yt,argv0:gn,_preload_modules:mn,setSourceMapsEnabled:An}}),se=He(()=>{hl()}),We={};Rt(We,{Buffer:()=>Zt,INSPECT_MAX_BYTES:()=>qi,default:()=>it,kMaxLength:()=>$i});function fl(){if(xn)return Mt;xn=!0,Mt.byteLength=n,Mt.toByteArray=s,Mt.fromByteArray=p;for(var i=[],h=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,t=a.length;l<t;++l)i[l]=a[l],h[a.charCodeAt(l)]=l;h[45]=62,h[95]=63;function e(g){var f=g.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=f);var y=b===f?0:4-b%4;return[b,y]}function n(g){var f=e(g),b=f[0],y=f[1];return(b+y)*3/4-y}function r(g,f,b){return(f+b)*3/4-b}function s(g){var f,b=e(g),y=b[0],_=b[1],A=new o(r(g,y,_)),w=0,I=_>0?y-4:y,k;for(k=0;k<I;k+=4)f=h[g.charCodeAt(k)]<<18|h[g.charCodeAt(k+1)]<<12|h[g.charCodeAt(k+2)]<<6|h[g.charCodeAt(k+3)],A[w++]=f>>16&255,A[w++]=f>>8&255,A[w++]=f&255;return _===2&&(f=h[g.charCodeAt(k)]<<2|h[g.charCodeAt(k+1)]>>4,A[w++]=f&255),_===1&&(f=h[g.charCodeAt(k)]<<10|h[g.charCodeAt(k+1)]<<4|h[g.charCodeAt(k+2)]>>2,A[w++]=f>>8&255,A[w++]=f&255),A}function u(g){return i[g>>18&63]+i[g>>12&63]+i[g>>6&63]+i[g&63]}function d(g,f,b){for(var y,_=[],A=f;A<b;A+=3)y=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),_.push(u(y));return _.join("")}function p(g){for(var f,b=g.length,y=b%3,_=[],A=16383,w=0,I=b-y;w<I;w+=A)_.push(d(g,w,w+A>I?I:w+A));return y===1?(f=g[b-1],_.push(i[f>>2]+i[f<<4&63]+"==")):y===2&&(f=(g[b-2]<<8)+g[b-1],_.push(i[f>>10]+i[f>>4&63]+i[f<<2&63]+"=")),_.join("")}return Mt}function dl(){return Pn?Wt:(Pn=!0,Wt.read=function(i,h,o,a,l){var t,e,n=l*8-a-1,r=(1<<n)-1,s=r>>1,u=-7,d=o?l-1:0,p=o?-1:1,g=i[h+d];for(d+=p,t=g&(1<<-u)-1,g>>=-u,u+=n;u>0;t=t*256+i[h+d],d+=p,u-=8);for(e=t&(1<<-u)-1,t>>=-u,u+=a;u>0;e=e*256+i[h+d],d+=p,u-=8);if(t===0)t=1-s;else{if(t===r)return e?NaN:(g?-1:1)*(1/0);e=e+Math.pow(2,a),t=t-s}return(g?-1:1)*e*Math.pow(2,t-a)},Wt.write=function(i,h,o,a,l,t){var e,n,r,s=t*8-l-1,u=(1<<s)-1,d=u>>1,p=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:t-1,f=a?1:-1,b=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(n=isNaN(h)?1:0,e=u):(e=Math.floor(Math.log(h)/Math.LN2),h*(r=Math.pow(2,-e))<1&&(e--,r*=2),e+d>=1?h+=p/r:h+=p*Math.pow(2,1-d),h*r>=2&&(e++,r/=2),e+d>=u?(n=0,e=u):e+d>=1?(n=(h*r-1)*Math.pow(2,l),e=e+d):(n=h*Math.pow(2,d-1)*Math.pow(2,l),e=0));l>=8;i[o+g]=n&255,g+=f,n/=256,l-=8);for(e=e<<l|n,s+=l;s>0;i[o+g]=e&255,g+=f,e/=256,s-=8);i[o+g-f]|=b*128},Wt)}function pl(){if(Rn)return pt;Rn=!0;let i=fl(),h=dl(),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pt.Buffer=e,pt.SlowBuffer=_,pt.INSPECT_MAX_BYTES=50;let a=2147483647;pt.kMaxLength=a,e.TYPED_ARRAY_SUPPORT=l(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{let c=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(c,m),c.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(c){if(c>a)throw new RangeError('The value "'+c+'" is invalid for option "size"');let m=new Uint8Array(c);return Object.setPrototypeOf(m,e.prototype),m}function e(c,m,v){if(typeof c=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(c)}return n(c,m,v)}e.poolSize=8192;function n(c,m,v){if(typeof c=="string")return d(c,m);if(ArrayBuffer.isView(c))return g(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(L(c,ArrayBuffer)||c&&L(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(L(c,SharedArrayBuffer)||c&&L(c.buffer,SharedArrayBuffer)))return f(c,m,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let R=c.valueOf&&c.valueOf();if(R!=null&&R!==c)return e.from(R,m,v);let N=b(c);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return e.from(c[Symbol.toPrimitive]("string"),m,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}e.from=function(c,m,v){return n(c,m,v)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function r(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function s(c,m,v){return r(c),c<=0?t(c):m!==void 0?typeof v=="string"?t(c).fill(m,v):t(c).fill(m):t(c)}e.alloc=function(c,m,v){return s(c,m,v)};function u(c){return r(c),t(c<0?0:y(c)|0)}e.allocUnsafe=function(c){return u(c)},e.allocUnsafeSlow=function(c){return u(c)};function d(c,m){if((typeof m!="string"||m==="")&&(m="utf8"),!e.isEncoding(m))throw new TypeError("Unknown encoding: "+m);let v=A(c,m)|0,R=t(v),N=R.write(c,m);return N!==v&&(R=R.slice(0,N)),R}function p(c){let m=c.length<0?0:y(c.length)|0,v=t(m);for(let R=0;R<m;R+=1)v[R]=c[R]&255;return v}function g(c){if(L(c,Uint8Array)){let m=new Uint8Array(c);return f(m.buffer,m.byteOffset,m.byteLength)}return p(c)}function f(c,m,v){if(m<0||c.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<m+(v||0))throw new RangeError('"length" is outside of buffer bounds');let R;return m===void 0&&v===void 0?R=new Uint8Array(c):v===void 0?R=new Uint8Array(c,m):R=new Uint8Array(c,m,v),Object.setPrototypeOf(R,e.prototype),R}function b(c){if(e.isBuffer(c)){let m=y(c.length)|0,v=t(m);return v.length===0||c.copy(v,0,0,m),v}if(c.length!==void 0)return typeof c.length!="number"||ne(c.length)?t(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function y(c){if(c>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return c|0}function _(c){return+c!=c&&(c=0),e.alloc(+c)}e.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==e.prototype},e.compare=function(c,m){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),L(m,Uint8Array)&&(m=e.from(m,m.offset,m.byteLength)),!e.isBuffer(c)||!e.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===m)return 0;let v=c.length,R=m.length;for(let N=0,X=Math.min(v,R);N<X;++N)if(c[N]!==m[N]){v=c[N],R=m[N];break}return v<R?-1:R<v?1:0},e.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(c,m){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return e.alloc(0);let v;if(m===void 0)for(m=0,v=0;v<c.length;++v)m+=c[v].length;let R=e.allocUnsafe(m),N=0;for(v=0;v<c.length;++v){let X=c[v];if(L(X,Uint8Array))N+X.length>R.length?(e.isBuffer(X)||(X=e.from(X)),X.copy(R,N)):Uint8Array.prototype.set.call(R,X,N);else if(e.isBuffer(X))X.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=X.length}return R};function A(c,m){if(e.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||L(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let v=c.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let N=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return D(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ee(c).length;default:if(N)return R?-1:D(c).length;m=(""+m).toLowerCase(),N=!0}}e.byteLength=A;function w(c,m,v){let R=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,m>>>=0,v<=m))return"";for(c||(c="utf8");;)switch(c){case"hex":return pe(this,m,v);case"utf8":case"utf-8":return $(this,m,v);case"ascii":return me(this,m,v);case"latin1":case"binary":return le(this,m,v);case"base64":return U(this,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,m,v);default:if(R)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),R=!0}}e.prototype._isBuffer=!0;function I(c,m,v){let R=c[m];c[m]=c[v],c[v]=R}e.prototype.swap16=function(){let c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<c;m+=2)I(this,m,m+1);return this},e.prototype.swap32=function(){let c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<c;m+=4)I(this,m,m+3),I(this,m+1,m+2);return this},e.prototype.swap64=function(){let c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<c;m+=8)I(this,m,m+7),I(this,m+1,m+6),I(this,m+2,m+5),I(this,m+3,m+4);return this},e.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?$(this,0,c):w.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(c){if(!e.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:e.compare(this,c)===0},e.prototype.inspect=function(){let c="",m=pt.INSPECT_MAX_BYTES;return c=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(c+=" ... "),"<Buffer "+c+">"},o&&(e.prototype[o]=e.prototype.inspect),e.prototype.compare=function(c,m,v,R,N){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),!e.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(m===void 0&&(m=0),v===void 0&&(v=c?c.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),m<0||v>c.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&m>=v)return 0;if(R>=N)return-1;if(m>=v)return 1;if(m>>>=0,v>>>=0,R>>>=0,N>>>=0,this===c)return 0;let X=N-R,be=v-m,Ce=Math.min(X,be),je=this.slice(R,N),Pe=c.slice(m,v);for(let Ie=0;Ie<Ce;++Ie)if(je[Ie]!==Pe[Ie]){X=je[Ie],be=Pe[Ie];break}return X<be?-1:be<X?1:0};function k(c,m,v,R,N){if(c.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,ne(v)&&(v=N?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(N)return-1;v=c.length-1}else if(v<0)if(N)v=0;else return-1;if(typeof m=="string"&&(m=e.from(m,R)),e.isBuffer(m))return m.length===0?-1:E(c,m,v,R,N);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(c,m,v):Uint8Array.prototype.lastIndexOf.call(c,m,v):E(c,[m],v,R,N);throw new TypeError("val must be string, number or Buffer")}function E(c,m,v,R,N){let X=1,be=c.length,Ce=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(c.length<2||m.length<2)return-1;X=2,be/=2,Ce/=2,v/=2}function je(Ie,Ne){return X===1?Ie[Ne]:Ie.readUInt16BE(Ne*X)}let Pe;if(N){let Ie=-1;for(Pe=v;Pe<be;Pe++)if(je(c,Pe)===je(m,Ie===-1?0:Pe-Ie)){if(Ie===-1&&(Ie=Pe),Pe-Ie+1===Ce)return Ie*X}else Ie!==-1&&(Pe-=Pe-Ie),Ie=-1}else for(v+Ce>be&&(v=be-Ce),Pe=v;Pe>=0;Pe--){let Ie=!0;for(let Ne=0;Ne<Ce;Ne++)if(je(c,Pe+Ne)!==je(m,Ne)){Ie=!1;break}if(Ie)return Pe}return-1}e.prototype.includes=function(c,m,v){return this.indexOf(c,m,v)!==-1},e.prototype.indexOf=function(c,m,v){return k(this,c,m,v,!0)},e.prototype.lastIndexOf=function(c,m,v){return k(this,c,m,v,!1)};function T(c,m,v,R){v=Number(v)||0;let N=c.length-v;R?(R=Number(R),R>N&&(R=N)):R=N;let X=m.length;R>X/2&&(R=X/2);let be;for(be=0;be<R;++be){let Ce=parseInt(m.substr(be*2,2),16);if(ne(Ce))return be;c[v+be]=Ce}return be}function O(c,m,v,R){return ie(D(m,c.length-v),c,v,R)}function H(c,m,v,R){return ie(q(m),c,v,R)}function G(c,m,v,R){return ie(ee(m),c,v,R)}function de(c,m,v,R){return ie(te(m,c.length-v),c,v,R)}e.prototype.write=function(c,m,v,R){if(m===void 0)R="utf8",v=this.length,m=0;else if(v===void 0&&typeof m=="string")R=m,v=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(v)?(v=v>>>0,R===void 0&&(R="utf8")):(R=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let N=this.length-m;if((v===void 0||v>N)&&(v=N),c.length>0&&(v<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let X=!1;for(;;)switch(R){case"hex":return T(this,c,m,v);case"utf8":case"utf-8":return O(this,c,m,v);case"ascii":case"latin1":case"binary":return H(this,c,m,v);case"base64":return G(this,c,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,c,m,v);default:if(X)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(c,m,v){return m===0&&v===c.length?i.fromByteArray(c):i.fromByteArray(c.slice(m,v))}function $(c,m,v){v=Math.min(c.length,v);let R=[],N=m;for(;N<v;){let X=c[N],be=null,Ce=X>239?4:X>223?3:X>191?2:1;if(N+Ce<=v){let je,Pe,Ie,Ne;switch(Ce){case 1:X<128&&(be=X);break;case 2:je=c[N+1],(je&192)===128&&(Ne=(X&31)<<6|je&63,Ne>127&&(be=Ne));break;case 3:je=c[N+1],Pe=c[N+2],(je&192)===128&&(Pe&192)===128&&(Ne=(X&15)<<12|(je&63)<<6|Pe&63,Ne>2047&&(Ne<55296||Ne>57343)&&(be=Ne));break;case 4:je=c[N+1],Pe=c[N+2],Ie=c[N+3],(je&192)===128&&(Pe&192)===128&&(Ie&192)===128&&(Ne=(X&15)<<18|(je&63)<<12|(Pe&63)<<6|Ie&63,Ne>65535&&Ne<1114112&&(be=Ne))}}be===null?(be=65533,Ce=1):be>65535&&(be-=65536,R.push(be>>>10&1023|55296),be=56320|be&1023),R.push(be),N+=Ce}return F(R)}let z=4096;function F(c){let m=c.length;if(m<=z)return String.fromCharCode.apply(String,c);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,c.slice(R,R+=z));return v}function me(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]&127);return R}function le(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]);return R}function pe(c,m,v){let R=c.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let N="";for(let X=m;X<v;++X)N+=ge[c[X]];return N}function we(c,m,v){let R=c.slice(m,v),N="";for(let X=0;X<R.length-1;X+=2)N+=String.fromCharCode(R[X]+R[X+1]*256);return N}e.prototype.slice=function(c,m){let v=this.length;c=~~c,m=m===void 0?v:~~m,c<0?(c+=v,c<0&&(c=0)):c>v&&(c=v),m<0?(m+=v,m<0&&(m=0)):m>v&&(m=v),m<c&&(m=c);let R=this.subarray(c,m);return Object.setPrototypeOf(R,e.prototype),R};function Q(c,m,v){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+m>v)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return R},e.prototype.readUintBE=e.prototype.readUIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c+--m],N=1;for(;m>0&&(N*=256);)R+=this[c+--m]*N;return R},e.prototype.readUint8=e.prototype.readUInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]|this[c+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]<<8|this[c+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},e.prototype.readBigUInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,N=this[++c]+this[++c]*2**8+this[++c]*2**16+v*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),e.prototype.readBigUInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],N=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v;return(BigInt(R)<<BigInt(32))+BigInt(N)}),e.prototype.readIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*m)),R},e.prototype.readIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=m,N=1,X=this[c+--R];for(;R>0&&(N*=256);)X+=this[c+--R]*N;return N*=128,X>=N&&(X-=Math.pow(2,8*m)),X},e.prototype.readInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},e.prototype.readInt16LE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c]|this[c+1]<<8;return v&32768?v|4294901760:v},e.prototype.readInt16BE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c+1]|this[c]<<8;return v&32768?v|4294901760:v},e.prototype.readInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},e.prototype.readInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},e.prototype.readBigInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(v<<24);return(BigInt(R)<<BigInt(32))+BigInt(m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),e.prototype.readBigInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=(m<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(R)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v)}),e.prototype.readFloatLE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!0,23,4)},e.prototype.readFloatBE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!1,23,4)},e.prototype.readDoubleLE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!0,52,8)},e.prototype.readDoubleBE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!1,52,8)};function he(c,m,v,R,N,X){if(!e.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>N||m<X)throw new RangeError('"value" argument is out of bounds');if(v+R>c.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=1,X=0;for(this[m]=c&255;++X<v&&(N*=256);)this[m+X]=c/N&255;return m+v},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=v-1,X=1;for(this[m+N]=c&255;--N>=0&&(X*=256);)this[m+N]=c/X&255;return m+v},e.prototype.writeUint8=e.prototype.writeUInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,255,0),this[m]=c&255,m+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m+3]=c>>>24,this[m+2]=c>>>16,this[m+1]=c>>>8,this[m]=c&255,m+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4};function P(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,v}function ce(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v+7]=X,X=X>>8,c[v+6]=X,X=X>>8,c[v+5]=X,X=X>>8,c[v+4]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v+3]=be,be=be>>8,c[v+2]=be,be=be>>8,c[v+1]=be,be=be>>8,c[v]=be,v+8}e.prototype.writeBigUInt64LE=Y(function(c,m=0){return P(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Y(function(c,m=0){return ce(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=0,X=1,be=0;for(this[m]=c&255;++N<v&&(X*=256);)c<0&&be===0&&this[m+N-1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=v-1,X=1,be=0;for(this[m+N]=c&255;--N>=0&&(X*=256);)c<0&&be===0&&this[m+N+1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,127,-128),c<0&&(c=255+c+1),this[m]=c&255,m+1},e.prototype.writeInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),this[m]=c&255,this[m+1]=c>>>8,this[m+2]=c>>>16,this[m+3]=c>>>24,m+4},e.prototype.writeInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4},e.prototype.writeBigInt64LE=Y(function(c,m=0){return P(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Y(function(c,m=0){return ce(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(c,m,v,R,N,X){if(v+R>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function J(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,4),h.write(c,m,v,R,23,4),v+4}e.prototype.writeFloatLE=function(c,m,v){return J(this,c,m,!0,v)},e.prototype.writeFloatBE=function(c,m,v){return J(this,c,m,!1,v)};function _e(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,8),h.write(c,m,v,R,52,8),v+8}e.prototype.writeDoubleLE=function(c,m,v){return _e(this,c,m,!0,v)},e.prototype.writeDoubleBE=function(c,m,v){return _e(this,c,m,!1,v)},e.prototype.copy=function(c,m,v,R){if(!e.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),!R&&R!==0&&(R=this.length),m>=c.length&&(m=c.length),m||(m=0),R>0&&R<v&&(R=v),R===v||c.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),c.length-m<R-v&&(R=c.length-m+v);let N=R-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,v,R):Uint8Array.prototype.set.call(c,this.subarray(v,R),m),N},e.prototype.fill=function(c,m,v,R){if(typeof c=="string"){if(typeof m=="string"?(R=m,m=0,v=this.length):typeof v=="string"&&(R=v,v=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!e.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(c.length===1){let X=c.charCodeAt(0);(R==="utf8"&&X<128||R==="latin1")&&(c=X)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(m<0||this.length<m||this.length<v)throw new RangeError("Out of range index");if(v<=m)return this;m=m>>>0,v=v===void 0?this.length:v>>>0,c||(c=0);let N;if(typeof c=="number")for(N=m;N<v;++N)this[N]=c;else{let X=e.isBuffer(c)?c:e.from(c,R),be=X.length;if(be===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(N=0;N<v-m;++N)this[N+m]=X[N%be]}return this};let K={};function M(c,m,v){K[c]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}M("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),M("ERR_INVALID_ARG_TYPE",function(c,m){return`The "${c}" argument must be of type number. Received type ${typeof m}`},TypeError),M("ERR_OUT_OF_RANGE",function(c,m,v){let R=`The value of "${c}" is out of range.`,N=v;return Number.isInteger(v)&&Math.abs(v)>2**32?N=Z(String(v)):typeof v=="bigint"&&(N=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(N=Z(N)),N+="n"),R+=` It must be ${m}. Received ${N}`,R},RangeError);function Z(c){let m="",v=c.length,R=c[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${c.slice(v-3,v)}${m}`;return`${c.slice(0,v)}${m}`}function V(c,m,v){W(m,"offset"),(c[m]===void 0||c[m+v]===void 0)&&ue(m,c.length-(v+1))}function j(c,m,v,R,N,X){if(c>v||c<m){let be=typeof m=="bigint"?"n":"",Ce;throw m===0||m===BigInt(0)?Ce=`>= 0${be} and < 2${be} ** ${(X+1)*8}${be}`:Ce=`>= -(2${be} ** ${(X+1)*8-1}${be}) and < 2 ** ${(X+1)*8-1}${be}`,new K.ERR_OUT_OF_RANGE("value",Ce,c)}V(R,N,X)}function W(c,m){if(typeof c!="number")throw new K.ERR_INVALID_ARG_TYPE(m,"number",c)}function ue(c,m,v){throw Math.floor(c)!==c?(W(c,v),new K.ERR_OUT_OF_RANGE("offset","an integer",c)):m<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,c)}let re=/[^+/0-9A-Za-z-_]/g;function x(c){if(c=c.split("=")[0],c=c.trim().replace(re,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function D(c,m){m=m||1/0;let v,R=c.length,N=null,X=[];for(let be=0;be<R;++be){if(v=c.charCodeAt(be),v>55295&&v<57344){if(!N){if(v>56319){(m-=3)>-1&&X.push(239,191,189);continue}else if(be+1===R){(m-=3)>-1&&X.push(239,191,189);continue}N=v;continue}if(v<56320){(m-=3)>-1&&X.push(239,191,189),N=v;continue}v=(N-55296<<10|v-56320)+65536}else N&&(m-=3)>-1&&X.push(239,191,189);if(N=null,v<128){if((m-=1)<0)break;X.push(v)}else if(v<2048){if((m-=2)<0)break;X.push(v>>6|192,v&63|128)}else if(v<65536){if((m-=3)<0)break;X.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((m-=4)<0)break;X.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return X}function q(c){let m=[];for(let v=0;v<c.length;++v)m.push(c.charCodeAt(v)&255);return m}function te(c,m){let v,R,N,X=[];for(let be=0;be<c.length&&!((m-=2)<0);++be)v=c.charCodeAt(be),R=v>>8,N=v%256,X.push(N),X.push(R);return X}function ee(c){return i.toByteArray(x(c))}function ie(c,m,v,R){let N;for(N=0;N<R&&!(N+v>=m.length||N>=c.length);++N)m[N+v]=c[N];return N}function L(c,m){return c instanceof m||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===m.name}function ne(c){return c!==c}let ge=(function(){let c="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){let R=v*16;for(let N=0;N<16;++N)m[R+N]=c[v]+c[N]}return m})();function Y(c){return typeof BigInt>"u"?Se:c}function Se(){throw new Error("BigInt not supported")}return pt}var Mt,xn,Wt,Pn,pt,Rn,it,Zt,qi,$i,Ve=He(()=>{oe(),ae(),se(),Mt={},xn=!1,Wt={},Pn=!1,pt={},Rn=!1,it=pl(),it.Buffer,it.SlowBuffer,it.INSPECT_MAX_BYTES,it.kMaxLength,Zt=it.Buffer,qi=it.INSPECT_MAX_BYTES,$i=it.kMaxLength}),ae=He(()=>{Ve()}),gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(o){this.aliasToTopic={},this.max=o}put(o,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=o,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(o){return this.aliasToTopic[o]}clear(){this.aliasToTopic={}}};i.default=h}),Ue=fe((i,h)=>{oe(),ae(),se();var o=class extends Error{constructor(a){if(!Array.isArray(a))throw new TypeError(`Expected input to be an Array, got ${typeof a}`);let l="";for(let t=0;t<a.length;t++)l+=` ${a[t].stack}
3
+ `;super(l),this.name="AggregateError",this.errors=a}};h.exports={AggregateError:o,ArrayIsArray(a){return Array.isArray(a)},ArrayPrototypeIncludes(a,l){return a.includes(l)},ArrayPrototypeIndexOf(a,l){return a.indexOf(l)},ArrayPrototypeJoin(a,l){return a.join(l)},ArrayPrototypeMap(a,l){return a.map(l)},ArrayPrototypePop(a,l){return a.pop(l)},ArrayPrototypePush(a,l){return a.push(l)},ArrayPrototypeSlice(a,l,t){return a.slice(l,t)},Error,FunctionPrototypeCall(a,l,...t){return a.call(l,...t)},FunctionPrototypeSymbolHasInstance(a,l){return Function.prototype[Symbol.hasInstance].call(a,l)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(a,l){return Object.defineProperties(a,l)},ObjectDefineProperty(a,l,t){return Object.defineProperty(a,l,t)},ObjectGetOwnPropertyDescriptor(a,l){return Object.getOwnPropertyDescriptor(a,l)},ObjectKeys(a){return Object.keys(a)},ObjectSetPrototypeOf(a,l){return Object.setPrototypeOf(a,l)},Promise,PromisePrototypeCatch(a,l){return a.catch(l)},PromisePrototypeThen(a,l,t){return a.then(l,t)},PromiseReject(a){return Promise.reject(a)},PromiseResolve(a){return Promise.resolve(a)},ReflectApply:Reflect.apply,RegExpPrototypeTest(a,l){return a.test(l)},SafeSet:Set,String,StringPrototypeSlice(a,l,t){return a.slice(l,t)},StringPrototypeToLowerCase(a){return a.toLowerCase()},StringPrototypeToUpperCase(a){return a.toUpperCase()},StringPrototypeTrim(a){return a.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(a,l,t){return a.set(l,t)},Boolean,Uint8Array}}),zi=fe((i,h)=>{oe(),ae(),se(),h.exports={format(o,...a){return o.replace(/%([sdifj])/g,function(...[l,t]){let e=a.shift();return t==="f"?e.toFixed(6):t==="j"?JSON.stringify(e):t==="s"&&typeof e=="object"?`${e.constructor!==Object?e.constructor.name:""} {}`.trim():e.toString()})},inspect(o){switch(typeof o){case"string":if(o.includes("'"))if(o.includes('"')){if(!o.includes("`")&&!o.includes("${"))return`\`${o}\``}else return`"${o}"`;return`'${o}'`;case"number":return isNaN(o)?"NaN":Object.is(o,-0)?String(o):o;case"bigint":return`${String(o)}n`;case"boolean":case"undefined":return String(o);case"object":return"{}"}}}}),qe=fe((i,h)=>{oe(),ae(),se();var{format:o,inspect:a}=zi(),{AggregateError:l}=Ue(),t=globalThis.AggregateError||l,e=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],r=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",u={};function d(A,w){if(!A)throw new u.ERR_INTERNAL_ASSERTION(w)}function p(A){let w="",I=A.length,k=A[0]==="-"?1:0;for(;I>=k+4;I-=3)w=`_${A.slice(I-3,I)}${w}`;return`${A.slice(0,I)}${w}`}function g(A,w,I){if(typeof w=="function")return d(w.length<=I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${w.length}).`),w(...I);let k=(w.match(/%[dfijoOs]/g)||[]).length;return d(k===I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${k}).`),I.length===0?w:o(w,...I)}function f(A,w,I){I||(I=Error);class k extends I{constructor(...T){super(g(A,w,T))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(k.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),k.prototype.code=A,k.prototype[e]=!0,u[A]=k}function b(A){let w=s+A.name;return Object.defineProperty(A,"name",{value:w}),A}function y(A,w){if(A&&w&&A!==w){if(Array.isArray(w.errors))return w.errors.push(A),w;let I=new t([w,A],w.message);return I.code=w.code,I}return A||w}var _=class extends Error{constructor(A="The operation was aborted",w=void 0){if(w!==void 0&&typeof w!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",w);super(A,w),this.code="ABORT_ERR",this.name="AbortError"}};f("ERR_ASSERTION","%s",Error),f("ERR_INVALID_ARG_TYPE",(A,w,I)=>{d(typeof A=="string","'name' must be a string"),Array.isArray(w)||(w=[w]);let k="The ";A.endsWith(" argument")?k+=`${A} `:k+=`"${A}" ${A.includes(".")?"property":"argument"} `,k+="must be ";let E=[],T=[],O=[];for(let G of w)d(typeof G=="string","All expected entries have to be of type string"),n.includes(G)?E.push(G.toLowerCase()):r.test(G)?T.push(G):(d(G!=="object",'The value "object" should be written as "Object"'),O.push(G));if(T.length>0){let G=E.indexOf("object");G!==-1&&(E.splice(E,G,1),T.push("Object"))}if(E.length>0){switch(E.length){case 1:k+=`of type ${E[0]}`;break;case 2:k+=`one of type ${E[0]} or ${E[1]}`;break;default:{let G=E.pop();k+=`one of type ${E.join(", ")}, or ${G}`}}(T.length>0||O.length>0)&&(k+=" or ")}if(T.length>0){switch(T.length){case 1:k+=`an instance of ${T[0]}`;break;case 2:k+=`an instance of ${T[0]} or ${T[1]}`;break;default:{let G=T.pop();k+=`an instance of ${T.join(", ")}, or ${G}`}}O.length>0&&(k+=" or ")}switch(O.length){case 0:break;case 1:O[0].toLowerCase()!==O[0]&&(k+="an "),k+=`${O[0]}`;break;case 2:k+=`one of ${O[0]} or ${O[1]}`;break;default:{let G=O.pop();k+=`one of ${O.join(", ")}, or ${G}`}}if(I==null)k+=`. Received ${I}`;else if(typeof I=="function"&&I.name)k+=`. Received function ${I.name}`;else if(typeof I=="object"){var H;if((H=I.constructor)!==null&&H!==void 0&&H.name)k+=`. Received an instance of ${I.constructor.name}`;else{let G=a(I,{depth:-1});k+=`. Received ${G}`}}else{let G=a(I,{colors:!1});G.length>25&&(G=`${G.slice(0,25)}...`),k+=`. Received type ${typeof I} (${G})`}return k},TypeError),f("ERR_INVALID_ARG_VALUE",(A,w,I="is invalid")=>{let k=a(w);return k.length>128&&(k=k.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${I}. Received ${k}`},TypeError),f("ERR_INVALID_RETURN_VALUE",(A,w,I)=>{var k;let E=I!=null&&(k=I.constructor)!==null&&k!==void 0&&k.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${A} to be returned from the "${w}" function but got ${E}.`},TypeError),f("ERR_MISSING_ARGS",(...A)=>{d(A.length>0,"At least one arg needs to be specified");let w,I=A.length;switch(A=(Array.isArray(A)?A:[A]).map(k=>`"${k}"`).join(" or "),I){case 1:w+=`The ${A[0]} argument`;break;case 2:w+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let k=A.pop();w+=`The ${A.join(", ")}, and ${k} arguments`}break}return`${w} must be specified`},TypeError),f("ERR_OUT_OF_RANGE",(A,w,I)=>{d(w,'Missing "range" argument');let k;if(Number.isInteger(I)&&Math.abs(I)>2**32)k=p(String(I));else if(typeof I=="bigint"){k=String(I);let E=BigInt(2)**BigInt(32);(I>E||I<-E)&&(k=p(k)),k+="n"}else k=a(I);return`The value of "${A}" is out of range. It must be ${w}. Received ${k}`},RangeError),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),f("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),f("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),f("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),f("ERR_STREAM_WRITE_AFTER_END","write after end",Error),f("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),h.exports={AbortError:_,aggregateTwoErrors:b(y),hideStackFrames:b,codes:u}}),Vt=fe((i,h)=>{oe(),ae(),se();var{AbortController:o,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;h.exports=o,h.exports.AbortSignal=a,h.exports.default=o});function Oe(){Oe.init.call(this)}function Xt(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}function Gi(i){return i._maxListeners===void 0?Oe.defaultMaxListeners:i._maxListeners}function Yi(i,h,o,a){var l,t,e,n;if(Xt(o),(t=i._events)===void 0?(t=i._events=Object.create(null),i._eventsCount=0):(t.newListener!==void 0&&(i.emit("newListener",h,o.listener?o.listener:o),t=i._events),e=t[h]),e===void 0)e=t[h]=o,++i._eventsCount;else if(typeof e=="function"?e=t[h]=a?[o,e]:[e,o]:a?e.unshift(o):e.push(o),(l=Gi(i))>0&&e.length>l&&!e.warned){e.warned=!0;var r=new Error("Possible EventEmitter memory leak detected. "+e.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");r.name="MaxListenersExceededWarning",r.emitter=i,r.type=h,r.count=e.length,n=r,console&&console.warn&&console.warn(n)}return i}function ml(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ji(i,h,o){var a={fired:!1,wrapFn:void 0,target:i,type:h,listener:o},l=ml.bind(a);return l.listener=o,a.wrapFn=l,l}function Zi(i,h,o){var a=i._events;if(a===void 0)return[];var l=a[h];return l===void 0?[]:typeof l=="function"?o?[l.listener||l]:[l]:o?(function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e})(l):eo(l,l.length)}function Xi(i){var h=this._events;if(h!==void 0){var o=h[i];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}function eo(i,h){for(var o=new Array(h),a=0;a<h;++a)o[a]=i[a];return o}var to,ro,vt,Mn,Un,Dn,ze,no=He(()=>{oe(),ae(),se(),vt=typeof Reflect=="object"?Reflect:null,Mn=vt&&typeof vt.apply=="function"?vt.apply:function(i,h,o){return Function.prototype.apply.call(i,h,o)},ro=vt&&typeof vt.ownKeys=="function"?vt.ownKeys:Object.getOwnPropertySymbols?function(i){return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i))}:function(i){return Object.getOwnPropertyNames(i)},Un=Number.isNaN||function(i){return i!=i},to=Oe,Oe.EventEmitter=Oe,Oe.prototype._events=void 0,Oe.prototype._eventsCount=0,Oe.prototype._maxListeners=void 0,Dn=10,Object.defineProperty(Oe,"defaultMaxListeners",{enumerable:!0,get:function(){return Dn},set:function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Dn=i}}),Oe.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Oe.prototype.setMaxListeners=function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+i+".");return this._maxListeners=i,this},Oe.prototype.getMaxListeners=function(){return Gi(this)},Oe.prototype.emit=function(i){for(var h=[],o=1;o<arguments.length;o++)h.push(arguments[o]);var a=i==="error",l=this._events;if(l!==void 0)a=a&&l.error===void 0;else if(!a)return!1;if(a){var t;if(h.length>0&&(t=h[0]),t instanceof Error)throw t;var e=new Error("Unhandled error."+(t?" ("+t.message+")":""));throw e.context=t,e}var n=l[i];if(n===void 0)return!1;if(typeof n=="function")Mn(n,this,h);else{var r=n.length,s=eo(n,r);for(o=0;o<r;++o)Mn(s[o],this,h)}return!0},Oe.prototype.addListener=function(i,h){return Yi(this,i,h,!1)},Oe.prototype.on=Oe.prototype.addListener,Oe.prototype.prependListener=function(i,h){return Yi(this,i,h,!0)},Oe.prototype.once=function(i,h){return Xt(h),this.on(i,Ji(this,i,h)),this},Oe.prototype.prependOnceListener=function(i,h){return Xt(h),this.prependListener(i,Ji(this,i,h)),this},Oe.prototype.removeListener=function(i,h){var o,a,l,t,e;if(Xt(h),(a=this._events)===void 0)return this;if((o=a[i])===void 0)return this;if(o===h||o.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete a[i],a.removeListener&&this.emit("removeListener",i,o.listener||h));else if(typeof o!="function"){for(l=-1,t=o.length-1;t>=0;t--)if(o[t]===h||o[t].listener===h){e=o[t].listener,l=t;break}if(l<0)return this;l===0?o.shift():(function(n,r){for(;r+1<n.length;r++)n[r]=n[r+1];n.pop()})(o,l),o.length===1&&(a[i]=o[0]),a.removeListener!==void 0&&this.emit("removeListener",i,e||h)}return this},Oe.prototype.off=Oe.prototype.removeListener,Oe.prototype.removeAllListeners=function(i){var h,o,a;if((o=this._events)===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[i]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete o[i]),this;if(arguments.length===0){var l,t=Object.keys(o);for(a=0;a<t.length;++a)(l=t[a])!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(h=o[i])=="function")this.removeListener(i,h);else if(h!==void 0)for(a=h.length-1;a>=0;a--)this.removeListener(i,h[a]);return this},Oe.prototype.listeners=function(i){return Zi(this,i,!0)},Oe.prototype.rawListeners=function(i){return Zi(this,i,!1)},Oe.listenerCount=function(i,h){return typeof i.listenerCount=="function"?i.listenerCount(h):Xi.call(i,h)},Oe.prototype.listenerCount=Xi,Oe.prototype.eventNames=function(){return this._eventsCount>0?ro(this._events):[]},ze=to,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount}),gt={};Rt(gt,{EventEmitter:()=>io,default:()=>ze,defaultMaxListeners:()=>oo,init:()=>so,listenerCount:()=>ao,on:()=>lo,once:()=>uo});var io,oo,so,ao,lo,uo,_t=He(()=>{oe(),ae(),se(),no(),no(),ze.once=function(i,h){return new Promise((o,a)=>{function l(...e){t!==void 0&&i.removeListener("error",t),o(e)}let t;h!=="error"&&(t=e=>{i.removeListener(name,l),a(e)},i.once("error",t)),i.once(h,l)})},ze.on=function(i,h){let o=[],a=[],l=null,t=!1,e={async next(){let s=o.shift();if(s)return createIterResult(s,!1);if(l){let u=Promise.reject(l);return l=null,u}return t?createIterResult(void 0,!0):new Promise((u,d)=>a.push({resolve:u,reject:d}))},async return(){i.removeListener(h,n),i.removeListener("error",r),t=!0;for(let s of a)s.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(s){l=s,i.removeListener(h,n),i.removeListener("error",r)},[Symbol.asyncIterator](){return this}};return i.on(h,n),i.on("error",r),e;function n(...s){let u=a.shift();u?u.resolve(createIterResult(s,!1)):o.push(s)}function r(s){t=!0;let u=a.shift();u?u.reject(s):l=s,e.return()}},{EventEmitter:io,defaultMaxListeners:oo,init:so,listenerCount:ao,on:lo,once:uo}=ze}),$e=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),{format:a,inspect:l}=zi(),{codes:{ERR_INVALID_ARG_TYPE:t}}=qe(),{kResistStopPropagation:e,AggregateError:n,SymbolDispose:r}=Ue(),s=globalThis.AbortSignal||Vt().AbortSignal,u=globalThis.AbortController||Vt().AbortController,d=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||o.Blob,g=typeof p<"u"?function(y){return y instanceof p}:function(y){return!1},f=(y,_)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new t(_,"AbortSignal",y)},b=(y,_)=>{if(typeof y!="function")throw new t(_,"Function",y)};h.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(y){let _=!1;return function(...A){_||(_=!0,y.apply(this,A))}},createDeferredPromise:function(){let y,_;return{promise:new Promise((A,w)=>{y=A,_=w}),resolve:y,reject:_}},promisify(y){return new Promise((_,A)=>{y((w,...I)=>w?A(w):_(...I))})},debuglog(){return function(){}},format:a,inspect:l,types:{isAsyncFunction(y){return y instanceof d},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:g,deprecate(y,_){return y},addAbortListener:(_t(),Be(gt)).addAbortListener||function(y,_){if(y===void 0)throw new t("signal","AbortSignal",y);f(y,"signal"),b(_,"listener");let A;return y.aborted?queueMicrotask(()=>_()):(y.addEventListener("abort",_,{__proto__:null,once:!0,[e]:!0}),A=()=>{y.removeEventListener("abort",_)}),{__proto__:null,[r](){var w;(w=A)===null||w===void 0||w()}}},AbortSignalAny:s.any||function(y){if(y.length===1)return y[0];let _=new u,A=()=>_.abort();return y.forEach(w=>{f(w,"signals"),w.addEventListener("abort",A,{once:!0})}),_.signal.addEventListener("abort",()=>{y.forEach(w=>w.removeEventListener("abort",A))},{once:!0}),_.signal}},h.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Qt=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ArrayPrototypeIncludes:a,ArrayPrototypeJoin:l,ArrayPrototypeMap:t,NumberIsInteger:e,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:r,NumberMIN_SAFE_INTEGER:s,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:p,String:g,StringPrototypeToUpperCase:f,StringPrototypeTrim:b}=Ue(),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:I,ERR_UNKNOWN_SIGNAL:k}}=qe(),{normalizeEncoding:E}=$e(),{isAsyncFunction:T,isArrayBufferView:O}=$e().types,H={};function G(L){return L===(L|0)}function de(L){return L===L>>>0}var U=/^[0-7]+$/,$="must be a 32-bit unsigned integer or an octal string";function z(L,ne,ge){if(typeof L>"u"&&(L=ge),typeof L=="string"){if(p(U,L)===null)throw new w(ne,L,$);L=u(L,8)}return le(L,ne),L}var F=y((L,ne,ge=s,Y=r)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),me=y((L,ne,ge=-2147483648,Y=2147483647)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),le=y((L,ne,ge=!1)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);let Y=ge?1:0,Se=4294967295;if(L<Y||L>Se)throw new I(ne,`>= ${Y} && <= ${Se}`,L)});function pe(L,ne){if(typeof L!="string")throw new A(ne,"string",L)}function we(L,ne,ge=void 0,Y){if(typeof L!="number")throw new A(ne,"number",L);if(ge!=null&&L<ge||Y!=null&&L>Y||(ge!=null||Y!=null)&&n(L))throw new I(ne,`${ge!=null?`>= ${ge}`:""}${ge!=null&&Y!=null?" && ":""}${Y!=null?`<= ${Y}`:""}`,L)}var Q=y((L,ne,ge)=>{if(!a(ge,L)){let Y="must be one of: "+l(t(ge,Se=>typeof Se=="string"?`'${Se}'`:g(Se)),", ");throw new w(ne,L,Y)}});function he(L,ne){if(typeof L!="boolean")throw new A(ne,"boolean",L)}function P(L,ne,ge){return L==null||!d(L,ne)?ge:L[ne]}var ce=y((L,ne,ge=null)=>{let Y=P(ge,"allowArray",!1),Se=P(ge,"allowFunction",!1);if(!P(ge,"nullable",!1)&&L===null||!Y&&o(L)||typeof L!="object"&&(!Se||typeof L!="function"))throw new A(ne,"Object",L)}),ye=y((L,ne)=>{if(L!=null&&typeof L!="object"&&typeof L!="function")throw new A(ne,"a dictionary",L)}),J=y((L,ne,ge=0)=>{if(!o(L))throw new A(ne,"Array",L);if(L.length<ge){let Y=`must be longer than ${ge}`;throw new w(ne,L,Y)}});function _e(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)pe(L[ge],`${ne}[${ge}]`)}function K(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)he(L[ge],`${ne}[${ge}]`)}function M(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++){let Y=L[ge],Se=`${ne}[${ge}]`;if(Y==null)throw new A(Se,"AbortSignal",Y);ue(Y,Se)}}function Z(L,ne="signal"){if(pe(L,ne),H[L]===void 0)throw H[f(L)]!==void 0?new k(L+" (signals must use all capital letters)"):new k(L)}var V=y((L,ne="buffer")=>{if(!O(L))throw new A(ne,["Buffer","TypedArray","DataView"],L)});function j(L,ne){let ge=E(ne),Y=L.length;if(ge==="hex"&&Y%2!==0)throw new w("encoding",ne,`is invalid for data of length ${Y}`)}function W(L,ne="Port",ge=!0){if(typeof L!="number"&&typeof L!="string"||typeof L=="string"&&b(L).length===0||+L!==+L>>>0||L>65535||L===0&&!ge)throw new _(ne,L,ge);return L|0}var ue=y((L,ne)=>{if(L!==void 0&&(L===null||typeof L!="object"||!("aborted"in L)))throw new A(ne,"AbortSignal",L)}),re=y((L,ne)=>{if(typeof L!="function")throw new A(ne,"Function",L)}),x=y((L,ne)=>{if(typeof L!="function"||T(L))throw new A(ne,"Function",L)}),D=y((L,ne)=>{if(L!==void 0)throw new A(ne,"undefined",L)});function q(L,ne,ge){if(!a(ge,L))throw new A(ne,`('${l(ge,"|")}')`,L)}var te=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ee(L,ne){if(typeof L>"u"||!p(te,L))throw new w(ne,L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ie(L){if(typeof L=="string")return ee(L,"hints"),L;if(o(L)){let ne=L.length,ge="";if(ne===0)return ge;for(let Y=0;Y<ne;Y++){let Se=L[Y];ee(Se,"hints"),ge+=Se,Y!==ne-1&&(ge+=", ")}return ge}throw new w("hints",L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}h.exports={isInt32:G,isUint32:de,parseFileMode:z,validateArray:J,validateStringArray:_e,validateBooleanArray:K,validateAbortSignalArray:M,validateBoolean:he,validateBuffer:V,validateDictionary:ye,validateEncoding:j,validateFunction:re,validateInt32:me,validateInteger:F,validateNumber:we,validateObject:ce,validateOneOf:Q,validatePlainFunction:x,validatePort:W,validateSignalName:Z,validateString:pe,validateUint32:le,validateUndefined:D,validateUnion:q,validateAbortSignal:ue,validateLinkHeaderValue:ie}}),Et=fe((i,h)=>{oe(),ae(),se();var o=h.exports={},a,l;function t(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=t}catch{a=t}try{typeof clearTimeout=="function"?l=clearTimeout:l=e}catch{l=e}})();function n(_){if(a===setTimeout)return setTimeout(_,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(_,0);try{return a(_,0)}catch{try{return a.call(null,_,0)}catch{return a.call(this,_,0)}}}function r(_){if(l===clearTimeout)return clearTimeout(_);if((l===e||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(_);try{return l(_)}catch{try{return l.call(null,_)}catch{return l.call(this,_)}}}var s=[],u=!1,d,p=-1;function g(){!u||!d||(u=!1,d.length?s=d.concat(s):p=-1,s.length&&f())}function f(){if(!u){var _=n(g);u=!0;for(var A=s.length;A;){for(d=s,s=[];++p<A;)d&&d[p].run();p=-1,A=s.length}d=null,u=!1,r(_)}}o.nextTick=function(_){var A=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)A[w-1]=arguments[w];s.push(new b(_,A)),s.length===1&&!u&&n(f)};function b(_,A){this.fun=_,this.array=A}b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function y(){}o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(_){return[]},o.binding=function(_){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(_){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}}),ot=fe((i,h)=>{oe(),ae(),se();var{SymbolAsyncIterator:o,SymbolIterator:a,SymbolFor:l}=Ue(),t=l("nodejs.stream.destroyed"),e=l("nodejs.stream.errored"),n=l("nodejs.stream.readable"),r=l("nodejs.stream.writable"),s=l("nodejs.stream.disturbed"),u=l("nodejs.webstream.isClosedPromise"),d=l("nodejs.webstream.controllerErrorFunction");function p(P,ce=!1){var ye;return!!(P&&typeof P.pipe=="function"&&typeof P.on=="function"&&(!ce||typeof P.pause=="function"&&typeof P.resume=="function")&&(!P._writableState||((ye=P._readableState)===null||ye===void 0?void 0:ye.readable)!==!1)&&(!P._writableState||P._readableState))}function g(P){var ce;return!!(P&&typeof P.write=="function"&&typeof P.on=="function"&&(!P._readableState||((ce=P._writableState)===null||ce===void 0?void 0:ce.writable)!==!1))}function f(P){return!!(P&&typeof P.pipe=="function"&&P._readableState&&typeof P.on=="function"&&typeof P.write=="function")}function b(P){return P&&(P._readableState||P._writableState||typeof P.write=="function"&&typeof P.on=="function"||typeof P.pipe=="function"&&typeof P.on=="function")}function y(P){return!!(P&&!b(P)&&typeof P.pipeThrough=="function"&&typeof P.getReader=="function"&&typeof P.cancel=="function")}function _(P){return!!(P&&!b(P)&&typeof P.getWriter=="function"&&typeof P.abort=="function")}function A(P){return!!(P&&!b(P)&&typeof P.readable=="object"&&typeof P.writable=="object")}function w(P){return y(P)||_(P)||A(P)}function I(P,ce){return P==null?!1:ce===!0?typeof P[o]=="function":ce===!1?typeof P[a]=="function":typeof P[o]=="function"||typeof P[a]=="function"}function k(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!!(P.destroyed||P[t]||J!=null&&J.destroyed)}function E(P){if(!g(P))return null;if(P.writableEnded===!0)return!0;let ce=P._writableState;return ce!=null&&ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function T(P,ce){if(!g(P))return null;if(P.writableFinished===!0)return!0;let ye=P._writableState;return ye!=null&&ye.errored?!1:typeof ye?.finished!="boolean"?null:!!(ye.finished||ce===!1&&ye.ended===!0&&ye.length===0)}function O(P){if(!p(P))return null;if(P.readableEnded===!0)return!0;let ce=P._readableState;return!ce||ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function H(P,ce){if(!p(P))return null;let ye=P._readableState;return ye!=null&&ye.errored?!1:typeof ye?.endEmitted!="boolean"?null:!!(ye.endEmitted||ce===!1&&ye.ended===!0&&ye.length===0)}function G(P){return P&&P[n]!=null?P[n]:typeof P?.readable!="boolean"?null:k(P)?!1:p(P)&&P.readable&&!H(P)}function de(P){return P&&P[r]!=null?P[r]:typeof P?.writable!="boolean"?null:k(P)?!1:g(P)&&P.writable&&!E(P)}function U(P,ce){return b(P)?k(P)?!0:!(ce?.readable!==!1&&G(P)||ce?.writable!==!1&&de(P)):null}function $(P){var ce,ye;return b(P)?P.writableErrored?P.writableErrored:(ce=(ye=P._writableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function z(P){var ce,ye;return b(P)?P.readableErrored?P.readableErrored:(ce=(ye=P._readableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function F(P){if(!b(P))return null;if(typeof P.closed=="boolean")return P.closed;let ce=P._writableState,ye=P._readableState;return typeof ce?.closed=="boolean"||typeof ye?.closed=="boolean"?ce?.closed||ye?.closed:typeof P._closed=="boolean"&&me(P)?P._closed:null}function me(P){return typeof P._closed=="boolean"&&typeof P._defaultKeepAlive=="boolean"&&typeof P._removedConnection=="boolean"&&typeof P._removedContLen=="boolean"}function le(P){return typeof P._sent100=="boolean"&&me(P)}function pe(P){var ce;return typeof P._consuming=="boolean"&&typeof P._dumped=="boolean"&&((ce=P.req)===null||ce===void 0?void 0:ce.upgradeOrConnect)===void 0}function we(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!J&&le(P)||!!(J&&J.autoDestroy&&J.emitClose&&J.closed===!1)}function Q(P){var ce;return!!(P&&((ce=P[s])!==null&&ce!==void 0?ce:P.readableDidRead||P.readableAborted))}function he(P){var ce,ye,J,_e,K,M,Z,V,j,W;return!!(P&&((ce=(ye=(J=(_e=(K=(M=P[e])!==null&&M!==void 0?M:P.readableErrored)!==null&&K!==void 0?K:P.writableErrored)!==null&&_e!==void 0?_e:(Z=P._readableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&J!==void 0?J:(V=P._writableState)===null||V===void 0?void 0:V.errorEmitted)!==null&&ye!==void 0?ye:(j=P._readableState)===null||j===void 0?void 0:j.errored)!==null&&ce!==void 0?ce:!((W=P._writableState)===null||W===void 0)&&W.errored))}h.exports={isDestroyed:k,kIsDestroyed:t,isDisturbed:Q,kIsDisturbed:s,isErrored:he,kIsErrored:e,isReadable:G,kIsReadable:n,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:r,isClosed:F,isDuplexNodeStream:f,isFinished:U,isIterable:I,isReadableNodeStream:p,isReadableStream:y,isReadableEnded:O,isReadableFinished:H,isReadableErrored:z,isNodeStream:b,isWebStream:w,isWritable:de,isWritableNodeStream:g,isWritableStream:_,isWritableEnded:E,isWritableFinished:T,isWritableErrored:$,isServerRequest:pe,isServerResponse:le,willEmitClose:we,isTransformStream:A}}),mt=fe((i,h)=>{oe(),ae(),se();var o=Et(),{AbortError:a,codes:l}=qe(),{ERR_INVALID_ARG_TYPE:t,ERR_STREAM_PREMATURE_CLOSE:e}=l,{kEmptyObject:n,once:r}=$e(),{validateAbortSignal:s,validateFunction:u,validateObject:d,validateBoolean:p}=Qt(),{Promise:g,PromisePrototypeThen:f,SymbolDispose:b}=Ue(),{isClosed:y,isReadable:_,isReadableNodeStream:A,isReadableStream:w,isReadableFinished:I,isReadableErrored:k,isWritable:E,isWritableNodeStream:T,isWritableStream:O,isWritableFinished:H,isWritableErrored:G,isNodeStream:de,willEmitClose:U,kIsClosedPromise:$}=ot(),z;function F(Q){return Q.setHeader&&typeof Q.abort=="function"}var me=()=>{};function le(Q,he,P){var ce,ye;if(arguments.length===2?(P=he,he=n):he==null?he=n:d(he,"options"),u(P,"callback"),s(he.signal,"options.signal"),P=r(P),w(Q)||O(Q))return pe(Q,he,P);if(!de(Q))throw new t("stream",["ReadableStream","WritableStream","Stream"],Q);let J=(ce=he.readable)!==null&&ce!==void 0?ce:A(Q),_e=(ye=he.writable)!==null&&ye!==void 0?ye:T(Q),K=Q._writableState,M=Q._readableState,Z=()=>{Q.writable||W()},V=U(Q)&&A(Q)===J&&T(Q)===_e,j=H(Q,!1),W=()=>{j=!0,Q.destroyed&&(V=!1),!(V&&(!Q.readable||J))&&(!J||ue)&&P.call(Q)},ue=I(Q,!1),re=()=>{ue=!0,Q.destroyed&&(V=!1),!(V&&(!Q.writable||_e))&&(!_e||j)&&P.call(Q)},x=L=>{P.call(Q,L)},D=y(Q),q=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);if(J&&!ue&&A(Q,!0)&&!I(Q,!1))return P.call(Q,new e);if(_e&&!j&&!H(Q,!1))return P.call(Q,new e);P.call(Q)},te=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);P.call(Q)},ee=()=>{Q.req.on("finish",W)};F(Q)?(Q.on("complete",W),V||Q.on("abort",q),Q.req?ee():Q.on("request",ee)):_e&&!K&&(Q.on("end",Z),Q.on("close",Z)),!V&&typeof Q.aborted=="boolean"&&Q.on("aborted",q),Q.on("end",re),Q.on("finish",W),he.error!==!1&&Q.on("error",x),Q.on("close",q),D?o.nextTick(q):K!=null&&K.errorEmitted||M!=null&&M.errorEmitted?V||o.nextTick(te):(!J&&(!V||_(Q))&&(j||E(Q)===!1)||!_e&&(!V||E(Q))&&(ue||_(Q)===!1)||M&&Q.req&&Q.aborted)&&o.nextTick(te);let ie=()=>{P=me,Q.removeListener("aborted",q),Q.removeListener("complete",W),Q.removeListener("abort",q),Q.removeListener("request",ee),Q.req&&Q.req.removeListener("finish",W),Q.removeListener("end",Z),Q.removeListener("close",Z),Q.removeListener("finish",W),Q.removeListener("end",re),Q.removeListener("error",x),Q.removeListener("close",q)};if(he.signal&&!D){let L=()=>{let ne=P;ie(),ne.call(Q,new a(void 0,{cause:he.signal.reason}))};if(he.signal.aborted)o.nextTick(L);else{z=z||$e().addAbortListener;let ne=z(he.signal,L),ge=P;P=r((...Y)=>{ne[b](),ge.apply(Q,Y)})}}return ie}function pe(Q,he,P){let ce=!1,ye=me;if(he.signal)if(ye=()=>{ce=!0,P.call(Q,new a(void 0,{cause:he.signal.reason}))},he.signal.aborted)o.nextTick(ye);else{z=z||$e().addAbortListener;let _e=z(he.signal,ye),K=P;P=r((...M)=>{_e[b](),K.apply(Q,M)})}let J=(..._e)=>{ce||o.nextTick(()=>P.apply(Q,_e))};return f(Q[$].promise,J,J),me}function we(Q,he){var P;let ce=!1;return he===null&&(he=n),(P=he)!==null&&P!==void 0&&P.cleanup&&(p(he.cleanup,"cleanup"),ce=he.cleanup),new g((ye,J)=>{let _e=le(Q,he,K=>{ce&&_e(),K?J(K):ye()})})}h.exports=le,h.exports.finished=we}),Ut=fe((i,h)=>{oe(),ae(),se();var o=Et(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:l},AbortError:t}=qe(),{Symbol:e}=Ue(),{kIsDestroyed:n,isDestroyed:r,isFinished:s,isServerRequest:u}=ot(),d=e("kDestroy"),p=e("kConstruct");function g(U,$,z){U&&(U.stack,$&&!$.errored&&($.errored=U),z&&!z.errored&&(z.errored=U))}function f(U,$){let z=this._readableState,F=this._writableState,me=F||z;return F!=null&&F.destroyed||z!=null&&z.destroyed?(typeof $=="function"&&$(),this):(g(U,F,z),F&&(F.destroyed=!0),z&&(z.destroyed=!0),me.constructed?b(this,U,$):this.once(d,function(le){b(this,a(le,U),$)}),this)}function b(U,$,z){let F=!1;function me(le){if(F)return;F=!0;let pe=U._readableState,we=U._writableState;g(le,we,pe),we&&(we.closed=!0),pe&&(pe.closed=!0),typeof z=="function"&&z(le),le?o.nextTick(y,U,le):o.nextTick(_,U)}try{U._destroy($||null,me)}catch(le){me(le)}}function y(U,$){A(U,$),_(U)}function _(U){let $=U._readableState,z=U._writableState;z&&(z.closeEmitted=!0),$&&($.closeEmitted=!0),(z!=null&&z.emitClose||$!=null&&$.emitClose)&&U.emit("close")}function A(U,$){let z=U._readableState,F=U._writableState;F!=null&&F.errorEmitted||z!=null&&z.errorEmitted||(F&&(F.errorEmitted=!0),z&&(z.errorEmitted=!0),U.emit("error",$))}function w(){let U=this._readableState,$=this._writableState;U&&(U.constructed=!0,U.closed=!1,U.closeEmitted=!1,U.destroyed=!1,U.errored=null,U.errorEmitted=!1,U.reading=!1,U.ended=U.readable===!1,U.endEmitted=U.readable===!1),$&&($.constructed=!0,$.destroyed=!1,$.closed=!1,$.closeEmitted=!1,$.errored=null,$.errorEmitted=!1,$.finalCalled=!1,$.prefinished=!1,$.ended=$.writable===!1,$.ending=$.writable===!1,$.finished=$.writable===!1)}function I(U,$,z){let F=U._readableState,me=U._writableState;if(me!=null&&me.destroyed||F!=null&&F.destroyed)return this;F!=null&&F.autoDestroy||me!=null&&me.autoDestroy?U.destroy($):$&&($.stack,me&&!me.errored&&(me.errored=$),F&&!F.errored&&(F.errored=$),z?o.nextTick(A,U,$):A(U,$))}function k(U,$){if(typeof U._construct!="function")return;let z=U._readableState,F=U._writableState;z&&(z.constructed=!1),F&&(F.constructed=!1),U.once(p,$),!(U.listenerCount(p)>1)&&o.nextTick(E,U)}function E(U){let $=!1;function z(F){if($){I(U,F??new l);return}$=!0;let me=U._readableState,le=U._writableState,pe=le||me;me&&(me.constructed=!0),le&&(le.constructed=!0),pe.destroyed?U.emit(d,F):F?I(U,F,!0):o.nextTick(T,U)}try{U._construct(F=>{o.nextTick(z,F)})}catch(F){o.nextTick(z,F)}}function T(U){U.emit(p)}function O(U){return U?.setHeader&&typeof U.abort=="function"}function H(U){U.emit("close")}function G(U,$){U.emit("error",$),o.nextTick(H,U)}function de(U,$){!U||r(U)||(!$&&!s(U)&&($=new t),u(U)?(U.socket=null,U.destroy($)):O(U)?U.abort():O(U.req)?U.req.abort():typeof U.destroy=="function"?U.destroy($):typeof U.close=="function"?U.close():$?o.nextTick(G,U,$):o.nextTick(H,U),U.destroyed||(U[n]=!0))}h.exports={construct:k,destroyer:de,destroy:f,undestroy:w,errorOrDestroy:I}}),Ln=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ObjectSetPrototypeOf:a}=Ue(),{EventEmitter:l}=(_t(),Be(gt));function t(n){l.call(this,n)}a(t.prototype,l.prototype),a(t,l),t.prototype.pipe=function(n,r){let s=this;function u(_){n.writable&&n.write(_)===!1&&s.pause&&s.pause()}s.on("data",u);function d(){s.readable&&s.resume&&s.resume()}n.on("drain",d),!n._isStdio&&(!r||r.end!==!1)&&(s.on("end",g),s.on("close",f));let p=!1;function g(){p||(p=!0,n.end())}function f(){p||(p=!0,typeof n.destroy=="function"&&n.destroy())}function b(_){y(),l.listenerCount(this,"error")===0&&this.emit("error",_)}e(s,"error",b),e(n,"error",b);function y(){s.removeListener("data",u),n.removeListener("drain",d),s.removeListener("end",g),s.removeListener("close",f),s.removeListener("error",b),n.removeListener("error",b),s.removeListener("end",y),s.removeListener("close",y),n.removeListener("close",y)}return s.on("end",y),s.on("close",y),n.on("close",y),n.emit("pipe",s),n};function e(n,r,s){if(typeof n.prependListener=="function")return n.prependListener(r,s);!n._events||!n._events[r]?n.on(r,s):o(n._events[r])?n._events[r].unshift(s):n._events[r]=[s,n._events[r]]}h.exports={Stream:t,prependListener:e}}),er=fe((i,h)=>{oe(),ae(),se();var{SymbolDispose:o}=Ue(),{AbortError:a,codes:l}=qe(),{isNodeStream:t,isWebStream:e,kControllerErrorFunction:n}=ot(),r=mt(),{ERR_INVALID_ARG_TYPE:s}=l,u,d=(p,g)=>{if(typeof p!="object"||!("aborted"in p))throw new s(g,"AbortSignal",p)};h.exports.addAbortSignal=function(p,g){if(d(p,"signal"),!t(g)&&!e(g))throw new s("stream",["ReadableStream","WritableStream","Stream"],g);return h.exports.addAbortSignalNoValidate(p,g)},h.exports.addAbortSignalNoValidate=function(p,g){if(typeof p!="object"||!("aborted"in p))return g;let f=t(g)?()=>{g.destroy(new a(void 0,{cause:p.reason}))}:()=>{g[n](new a(void 0,{cause:p.reason}))};if(p.aborted)f();else{u=u||$e().addAbortListener;let b=u(p,f);r(g,b[o])}return g}}),Al=fe((i,h)=>{oe(),ae(),se();var{StringPrototypeSlice:o,SymbolIterator:a,TypedArrayPrototypeSet:l,Uint8Array:t}=Ue(),{Buffer:e}=(Ve(),Be(We)),{inspect:n}=$e();h.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(r){let s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}unshift(r){let s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}shift(){if(this.length===0)return;let r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}clear(){this.head=this.tail=null,this.length=0}join(r){if(this.length===0)return"";let s=this.head,u=""+s.data;for(;(s=s.next)!==null;)u+=r+s.data;return u}concat(r){if(this.length===0)return e.alloc(0);let s=e.allocUnsafe(r>>>0),u=this.head,d=0;for(;u;)l(s,u.data,d),d+=u.data.length,u=u.next;return s}consume(r,s){let u=this.head.data;if(r<u.length){let d=u.slice(0,r);return this.head.data=u.slice(r),d}return r===u.length?this.shift():s?this._getString(r):this._getBuffer(r)}first(){return this.head.data}*[a](){for(let r=this.head;r;r=r.next)yield r.data}_getString(r){let s="",u=this.head,d=0;do{let p=u.data;if(r>p.length)s+=p,r-=p.length;else{r===p.length?(s+=p,++d,u.next?this.head=u.next:this.head=this.tail=null):(s+=o(p,0,r),this.head=u,u.data=o(p,r));break}++d}while((u=u.next)!==null);return this.length-=d,s}_getBuffer(r){let s=e.allocUnsafe(r),u=r,d=this.head,p=0;do{let g=d.data;if(r>g.length)l(s,g,u-r),r-=g.length;else{r===g.length?(l(s,g,u-r),++p,d.next?this.head=d.next:this.head=this.tail=null):(l(s,new t(g.buffer,g.byteOffset,r),u-r),this.head=d,d.data=g.slice(r));break}++p}while((d=d.next)!==null);return this.length-=p,s}[Symbol.for("nodejs.util.inspect.custom")](r,s){return n(this,{...s,depth:0,customInspect:!1})}}}),tr=fe((i,h)=>{oe(),ae(),se();var{MathFloor:o,NumberIsInteger:a}=Ue(),{validateInteger:l}=Qt(),{ERR_INVALID_ARG_VALUE:t}=qe().codes,e=16*1024,n=16;function r(p,g,f){return p.highWaterMark!=null?p.highWaterMark:g?p[f]:null}function s(p){return p?n:e}function u(p,g){l(g,"value",0),p?n=g:e=g}function d(p,g,f,b){let y=r(g,b,f);if(y!=null){if(!a(y)||y<0){let _=b?`options.${f}`:"options.highWaterMark";throw new t(_,y)}return o(y)}return s(p.objectMode)}h.exports={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u}}),bl=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),a=o.Buffer;function l(e,n){for(var r in e)n[r]=e[r]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?h.exports=o:(l(o,i),i.Buffer=t);function t(e,n,r){return a(e,n,r)}t.prototype=Object.create(a.prototype),l(a,t),t.from=function(e,n,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return a(e,n,r)},t.alloc=function(e,n,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var s=a(e);return n!==void 0?typeof r=="string"?s.fill(n,r):s.fill(n):s.fill(0),s},t.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return a(e)},t.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}}),yl=fe(i=>{oe(),ae(),se();var h=bl().Buffer,o=h.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(A){if(!A)return"utf8";for(var w;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(w)return;A=(""+A).toLowerCase(),w=!0}}function l(A){var w=a(A);if(typeof w!="string"&&(h.isEncoding===o||!o(A)))throw new Error("Unknown encoding: "+A);return w||A}i.StringDecoder=t;function t(A){this.encoding=l(A);var w;switch(this.encoding){case"utf16le":this.text=p,this.end=g,w=4;break;case"utf8":this.fillLast=s,w=4;break;case"base64":this.text=f,this.end=b,w=3;break;default:this.write=y,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(w)}t.prototype.write=function(A){if(A.length===0)return"";var w,I;if(this.lastNeed){if(w=this.fillLast(A),w===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<A.length?w?w+this.text(A,I):this.text(A,I):w||""},t.prototype.end=d,t.prototype.text=u,t.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function e(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function n(A,w,I){var k=w.length-1;if(k<I)return 0;var E=e(w[k]);return E>=0?(E>0&&(A.lastNeed=E-1),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(A.lastNeed=E-2),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(E===2?E=0:A.lastNeed=E-3),E):0))}function r(A,w,I){if((w[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return A.lastNeed=2,"�"}}function s(A){var w=this.lastTotal-this.lastNeed,I=r(this,A);if(I!==void 0)return I;if(this.lastNeed<=A.length)return A.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,w,0,A.length),this.lastNeed-=A.length}function u(A,w){var I=n(this,A,w);if(!this.lastNeed)return A.toString("utf8",w);this.lastTotal=I;var k=A.length-(I-this.lastNeed);return A.copy(this.lastChar,0,k),A.toString("utf8",w,k)}function d(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+"�":w}function p(A,w){if((A.length-w)%2===0){var I=A.toString("utf16le",w);if(I){var k=I.charCodeAt(I.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",w,A.length-1)}function g(A){var w=A&&A.length?this.write(A):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,I)}return w}function f(A,w){var I=(A.length-w)%3;return I===0?A.toString("base64",w):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",w,A.length-I))}function b(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function y(A){return A.toString(this.encoding)}function _(A){return A&&A.length?this.write(A):""}}),co=fe((i,h)=>{oe(),ae(),se();var o=Et(),{PromisePrototypeThen:a,SymbolAsyncIterator:l,SymbolIterator:t}=Ue(),{Buffer:e}=(Ve(),Be(We)),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:r}=qe().codes;function s(u,d,p){let g;if(typeof d=="string"||d instanceof e)return new u({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let f;if(d&&d[l])f=!0,g=d[l]();else if(d&&d[t])f=!1,g=d[t]();else throw new n("iterable",["Iterable"],d);let b=new u({objectMode:!0,highWaterMark:1,...p}),y=!1;b._read=function(){y||(y=!0,A())},b._destroy=function(w,I){a(_(w),()=>o.nextTick(I,w),k=>o.nextTick(I,k||w))};async function _(w){let I=w!=null,k=typeof g.throw=="function";if(I&&k){let{value:E,done:T}=await g.throw(w);if(await E,T)return}if(typeof g.return=="function"){let{value:E}=await g.return();await E}}async function A(){for(;;){try{let{value:w,done:I}=f?await g.next():g.next();if(I)b.push(null);else{let k=w&&typeof w.then=="function"?await w:w;if(k===null)throw y=!1,new r;if(b.push(k))continue;y=!1}}catch(w){b.destroy(w)}break}}return b}h.exports=s}),rr=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeIndexOf:a,NumberIsInteger:l,NumberIsNaN:t,NumberParseInt:e,ObjectDefineProperties:n,ObjectKeys:r,ObjectSetPrototypeOf:s,Promise:u,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol:f}=Ue();h.exports=Y,Y.ReadableState=ge;var{EventEmitter:b}=(_t(),Be(gt)),{Stream:y,prependListener:_}=Ln(),{Buffer:A}=(Ve(),Be(We)),{addAbortSignal:w}=er(),I=mt(),k=$e().debuglog("stream",S=>{k=S}),E=Al(),T=Ut(),{getHighWaterMark:O,getDefaultHighWaterMark:H}=tr(),{aggregateTwoErrors:G,codes:{ERR_INVALID_ARG_TYPE:de,ERR_METHOD_NOT_IMPLEMENTED:U,ERR_OUT_OF_RANGE:$,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:F},AbortError:me}=qe(),{validateObject:le}=Qt(),pe=f("kPaused"),{StringDecoder:we}=yl(),Q=co();s(Y.prototype,y.prototype),s(Y,y);var he=()=>{},{errorOrDestroy:P}=T,ce=1,ye=2,J=4,_e=8,K=16,M=32,Z=64,V=128,j=256,W=512,ue=1024,re=2048,x=4096,D=8192,q=16384,te=32768,ee=65536,ie=1<<17,L=1<<18;function ne(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(B){B?this.state|=S:this.state&=~S}}}n(ge.prototype,{objectMode:ne(ce),ended:ne(ye),endEmitted:ne(J),reading:ne(_e),constructed:ne(K),sync:ne(M),needReadable:ne(Z),emittedReadable:ne(V),readableListening:ne(j),resumeScheduled:ne(W),errorEmitted:ne(ue),emitClose:ne(re),autoDestroy:ne(x),destroyed:ne(D),closed:ne(q),closeEmitted:ne(te),multiAwaitDrain:ne(ee),readingMore:ne(ie),dataEmitted:ne(L)});function ge(S,B,Ae){typeof Ae!="boolean"&&(Ae=B instanceof st()),this.state=re|x|K|M,S&&S.objectMode&&(this.state|=ce),Ae&&S&&S.readableObjectMode&&(this.state|=ce),this.highWaterMark=S?O(this,S,"readableHighWaterMark",Ae):H(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[pe]=null,S&&S.emitClose===!1&&(this.state&=~re),S&&S.autoDestroy===!1&&(this.state&=~x),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new we(S.encoding),this.encoding=S.encoding)}function Y(S){if(!(this instanceof Y))return new Y(S);let B=this instanceof st();this._readableState=new ge(S,this,B),S&&(typeof S.read=="function"&&(this._read=S.read),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&!B&&w(S.signal,this)),y.call(this,S),T.construct(this,()=>{this._readableState.needReadable&&Ce(this,this._readableState)})}Y.prototype.destroy=T.destroy,Y.prototype._undestroy=T.undestroy,Y.prototype._destroy=function(S,B){B(S)},Y.prototype[b.captureRejectionSymbol]=function(S){this.destroy(S)},Y.prototype[p]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new me,this.destroy(S)),new u((B,Ae)=>I(this,ve=>ve&&ve!==S?Ae(ve):B(null)))},Y.prototype.push=function(S,B){return Se(this,S,B,!1)},Y.prototype.unshift=function(S,B){return Se(this,S,B,!0)};function Se(S,B,Ae,ve){k("readableAddChunk",B);let Ee=S._readableState,Ke;if((Ee.state&ce)===0&&(typeof B=="string"?(Ae=Ae||Ee.defaultEncoding,Ee.encoding!==Ae&&(ve&&Ee.encoding?B=A.from(B,Ae).toString(Ee.encoding):(B=A.from(B,Ae),Ae=""))):B instanceof A?Ae="":y._isUint8Array(B)?(B=y._uint8ArrayToBuffer(B),Ae=""):B!=null&&(Ke=new de("chunk",["string","Buffer","Uint8Array"],B))),Ke)P(S,Ke);else if(B===null)Ee.state&=~_e,N(S,Ee);else if((Ee.state&ce)!==0||B&&B.length>0)if(ve)if((Ee.state&J)!==0)P(S,new F);else{if(Ee.destroyed||Ee.errored)return!1;c(S,Ee,B,!0)}else if(Ee.ended)P(S,new z);else{if(Ee.destroyed||Ee.errored)return!1;Ee.state&=~_e,Ee.decoder&&!Ae?(B=Ee.decoder.write(B),Ee.objectMode||B.length!==0?c(S,Ee,B,!1):Ce(S,Ee)):c(S,Ee,B,!1)}else ve||(Ee.state&=~_e,Ce(S,Ee));return!Ee.ended&&(Ee.length<Ee.highWaterMark||Ee.length===0)}function c(S,B,Ae,ve){B.flowing&&B.length===0&&!B.sync&&S.listenerCount("data")>0?((B.state&ee)!==0?B.awaitDrainWriters.clear():B.awaitDrainWriters=null,B.dataEmitted=!0,S.emit("data",Ae)):(B.length+=B.objectMode?1:Ae.length,ve?B.buffer.unshift(Ae):B.buffer.push(Ae),(B.state&Z)!==0&&X(S)),Ce(S,B)}Y.prototype.isPaused=function(){let S=this._readableState;return S[pe]===!0||S.flowing===!1},Y.prototype.setEncoding=function(S){let B=new we(S);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;let Ae=this._readableState.buffer,ve="";for(let Ee of Ae)ve+=B.write(Ee);return Ae.clear(),ve!==""&&Ae.push(ve),this._readableState.length=ve.length,this};var m=1073741824;function v(S){if(S>m)throw new $("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function R(S,B){return S<=0||B.length===0&&B.ended?0:(B.state&ce)!==0?1:t(S)?B.flowing&&B.length?B.buffer.first().length:B.length:S<=B.length?S:B.ended?B.length:0}Y.prototype.read=function(S){k("read",S),S===void 0?S=NaN:l(S)||(S=e(S,10));let B=this._readableState,Ae=S;if(S>B.highWaterMark&&(B.highWaterMark=v(S)),S!==0&&(B.state&=~V),S===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return k("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?ii(this):X(this),null;if(S=R(S,B),S===0&&B.ended)return B.length===0&&ii(this),null;let ve=(B.state&Z)!==0;if(k("need readable",ve),(B.length===0||B.length-S<B.highWaterMark)&&(ve=!0,k("length less than watermark",ve)),B.ended||B.reading||B.destroyed||B.errored||!B.constructed)ve=!1,k("reading, ended or constructing",ve);else if(ve){k("do read"),B.state|=_e|M,B.length===0&&(B.state|=Z);try{this._read(B.highWaterMark)}catch(Ke){P(this,Ke)}B.state&=~M,B.reading||(S=R(Ae,B))}let Ee;return S>0?Ee=Ls(S,B):Ee=null,Ee===null?(B.needReadable=B.length<=B.highWaterMark,S=0):(B.length-=S,B.multiAwaitDrain?B.awaitDrainWriters.clear():B.awaitDrainWriters=null),B.length===0&&(B.ended||(B.needReadable=!0),Ae!==S&&B.ended&&ii(this)),Ee!==null&&!B.errorEmitted&&!B.closeEmitted&&(B.dataEmitted=!0,this.emit("data",Ee)),Ee};function N(S,B){if(k("onEofChunk"),!B.ended){if(B.decoder){let Ae=B.decoder.end();Ae&&Ae.length&&(B.buffer.push(Ae),B.length+=B.objectMode?1:Ae.length)}B.ended=!0,B.sync?X(S):(B.needReadable=!1,B.emittedReadable=!0,be(S))}}function X(S){let B=S._readableState;k("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(k("emitReadable",B.flowing),B.emittedReadable=!0,o.nextTick(be,S))}function be(S){let B=S._readableState;k("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&!B.errored&&(B.length||B.ended)&&(S.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,Us(S)}function Ce(S,B){!B.readingMore&&B.constructed&&(B.readingMore=!0,o.nextTick(je,S,B))}function je(S,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){let Ae=B.length;if(k("maybeReadMore read 0"),S.read(0),Ae===B.length)break}B.readingMore=!1}Y.prototype._read=function(S){throw new U("_read()")},Y.prototype.pipe=function(S,B){let Ae=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new d(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(S),k("pipe count=%d opts=%j",ve.pipes.length,B);let Ee=(!B||B.end!==!1)&&S!==o.stdout&&S!==o.stderr?Ye:qt;ve.endEmitted?o.nextTick(Ee):Ae.once("end",Ee),S.on("unpipe",Ke);function Ke(Pt,dt){k("onunpipe"),Pt===Ae&&dt&&dt.hasUnpiped===!1&&(dt.hasUnpiped=!0,Nu())}function Ye(){k("onend"),S.end()}let xt,Fs=!1;function Nu(){k("cleanup"),S.removeListener("close",ai),S.removeListener("finish",li),xt&&S.removeListener("drain",xt),S.removeListener("error",si),S.removeListener("unpipe",Ke),Ae.removeListener("end",Ye),Ae.removeListener("end",qt),Ae.removeListener("data",Ws),Fs=!0,xt&&ve.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&xt()}function js(){Fs||(ve.pipes.length===1&&ve.pipes[0]===S?(k("false write response, pause",0),ve.awaitDrainWriters=S,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(S)&&(k("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(S)),Ae.pause()),xt||(xt=Pe(Ae,S),S.on("drain",xt))}Ae.on("data",Ws);function Ws(Pt){k("ondata");let dt=S.write(Pt);k("dest.write",dt),dt===!1&&js()}function si(Pt){if(k("onerror",Pt),qt(),S.removeListener("error",si),S.listenerCount("error")===0){let dt=S._writableState||S._readableState;dt&&!dt.errorEmitted?P(S,Pt):S.emit("error",Pt)}}_(S,"error",si);function ai(){S.removeListener("finish",li),qt()}S.once("close",ai);function li(){k("onfinish"),S.removeListener("close",ai),qt()}S.once("finish",li);function qt(){k("unpipe"),Ae.unpipe(S)}return S.emit("pipe",Ae),S.writableNeedDrain===!0?js():ve.flowing||(k("pipe resume"),Ae.resume()),S};function Pe(S,B){return function(){let Ae=S._readableState;Ae.awaitDrainWriters===B?(k("pipeOnDrain",1),Ae.awaitDrainWriters=null):Ae.multiAwaitDrain&&(k("pipeOnDrain",Ae.awaitDrainWriters.size),Ae.awaitDrainWriters.delete(B)),(!Ae.awaitDrainWriters||Ae.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}Y.prototype.unpipe=function(S){let B=this._readableState,Ae={hasUnpiped:!1};if(B.pipes.length===0)return this;if(!S){let Ee=B.pipes;B.pipes=[],this.pause();for(let Ke=0;Ke<Ee.length;Ke++)Ee[Ke].emit("unpipe",this,{hasUnpiped:!1});return this}let ve=a(B.pipes,S);return ve===-1?this:(B.pipes.splice(ve,1),B.pipes.length===0&&this.pause(),S.emit("unpipe",this,Ae),this)},Y.prototype.on=function(S,B){let Ae=y.prototype.on.call(this,S,B),ve=this._readableState;return S==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):S==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,k("on readable",ve.length,ve.reading),ve.length?X(this):ve.reading||o.nextTick(Ne,this)),Ae},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(S,B){let Ae=y.prototype.removeListener.call(this,S,B);return S==="readable"&&o.nextTick(Ie,this),Ae},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(S){let B=y.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&o.nextTick(Ie,this),B};function Ie(S){let B=S._readableState;B.readableListening=S.listenerCount("readable")>0,B.resumeScheduled&&B[pe]===!1?B.flowing=!0:S.listenerCount("data")>0?S.resume():B.readableListening||(B.flowing=null)}function Ne(S){k("readable nexttick read 0"),S.read(0)}Y.prototype.resume=function(){let S=this._readableState;return S.flowing||(k("resume"),S.flowing=!S.readableListening,Ru(this,S)),S[pe]=!1,this};function Ru(S,B){B.resumeScheduled||(B.resumeScheduled=!0,o.nextTick(Mu,S,B))}function Mu(S,B){k("resume",B.reading),B.reading||S.read(0),B.resumeScheduled=!1,S.emit("resume"),Us(S),B.flowing&&!B.reading&&S.read(0)}Y.prototype.pause=function(){return k("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(k("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[pe]=!0,this};function Us(S){let B=S._readableState;for(k("flow",B.flowing);B.flowing&&S.read()!==null;);}Y.prototype.wrap=function(S){let B=!1;S.on("data",ve=>{!this.push(ve)&&S.pause&&(B=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",ve=>{P(this,ve)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{B&&S.resume&&(B=!1,S.resume())};let Ae=r(S);for(let ve=1;ve<Ae.length;ve++){let Ee=Ae[ve];this[Ee]===void 0&&typeof S[Ee]=="function"&&(this[Ee]=S[Ee].bind(S))}return this},Y.prototype[g]=function(){return Ds(this)},Y.prototype.iterator=function(S){return S!==void 0&&le(S,"options"),Ds(this,S)};function Ds(S,B){typeof S.read!="function"&&(S=Y.wrap(S,{objectMode:!0}));let Ae=Uu(S,B);return Ae.stream=S,Ae}async function*Uu(S,B){let Ae=he;function ve(Ye){this===S?(Ae(),Ae=he):Ae=Ye}S.on("readable",ve);let Ee,Ke=I(S,{writable:!1},Ye=>{Ee=Ye?G(Ee,Ye):null,Ae(),Ae=he});try{for(;;){let Ye=S.destroyed?null:S.read();if(Ye!==null)yield Ye;else{if(Ee)throw Ee;if(Ee===null)return;await new u(ve)}}}catch(Ye){throw Ee=G(Ee,Ye),Ee}finally{(Ee||B?.destroyOnReturn!==!1)&&(Ee===void 0||S._readableState.autoDestroy)?T.destroyer(S,null):(S.off("readable",ve),Ke())}}n(Y.prototype,{readable:{__proto__:null,get(){let S=this._readableState;return!!S&&S.readable!==!1&&!S.destroyed&&!S.errorEmitted&&!S.endEmitted},set(S){this._readableState&&(this._readableState.readable=!!S)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(S){this._readableState&&(this._readableState.destroyed=S)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),n(ge.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[pe]!==!1},set(S){this[pe]=!!S}}}),Y._fromList=Ls;function Ls(S,B){if(B.length===0)return null;let Ae;return B.objectMode?Ae=B.buffer.shift():!S||S>=B.length?(B.decoder?Ae=B.buffer.join(""):B.buffer.length===1?Ae=B.buffer.first():Ae=B.buffer.concat(B.length),B.buffer.clear()):Ae=B.buffer.consume(S,B.decoder),Ae}function ii(S){let B=S._readableState;k("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,o.nextTick(Du,B,S))}function Du(S,B){if(k("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,B.emit("end"),B.writable&&B.allowHalfOpen===!1)o.nextTick(Lu,B);else if(S.autoDestroy){let Ae=B._writableState;(!Ae||Ae.autoDestroy&&(Ae.finished||Ae.writable===!1))&&B.destroy()}}}function Lu(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}Y.from=function(S,B){return Q(Y,S,B)};var oi;function Ns(){return oi===void 0&&(oi={}),oi}Y.fromWeb=function(S,B){return Ns().newStreamReadableFromReadableStream(S,B)},Y.toWeb=function(S,B){return Ns().newReadableStreamFromStreamReadable(S,B)},Y.wrap=function(S,B){var Ae,ve;return new Y({objectMode:(Ae=(ve=S.readableObjectMode)!==null&&ve!==void 0?ve:S.objectMode)!==null&&Ae!==void 0?Ae:!0,...B,destroy(Ee,Ke){T.destroyer(S,Ee),Ke(Ee)}}).wrap(S)}}),Nn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeSlice:a,Error:l,FunctionPrototypeSymbolHasInstance:t,ObjectDefineProperty:e,ObjectDefineProperties:n,ObjectSetPrototypeOf:r,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:d}=Ue();h.exports=le,le.WritableState=F;var{EventEmitter:p}=(_t(),Be(gt)),g=Ln().Stream,{Buffer:f}=(Ve(),Be(We)),b=Ut(),{addAbortSignal:y}=er(),{getHighWaterMark:_,getDefaultHighWaterMark:A}=tr(),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:k,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:O,ERR_STREAM_NULL_VALUES:H,ERR_STREAM_WRITE_AFTER_END:G,ERR_UNKNOWN_ENCODING:de}=qe().codes,{errorOrDestroy:U}=b;r(le.prototype,g.prototype),r(le,g);function $(){}var z=u("kOnFinished");function F(x,D,q){typeof q!="boolean"&&(q=D instanceof st()),this.objectMode=!!(x&&x.objectMode),q&&(this.objectMode=this.objectMode||!!(x&&x.writableObjectMode)),this.highWaterMark=x?_(this,x,"writableHighWaterMark",q):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let te=!!(x&&x.decodeStrings===!1);this.decodeStrings=!te,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=P.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,me(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!x||x.emitClose!==!1,this.autoDestroy=!x||x.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[z]=[]}function me(x){x.buffered=[],x.bufferedIndex=0,x.allBuffers=!0,x.allNoop=!0}F.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},e(F.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function le(x){let D=this instanceof st();if(!D&&!t(le,this))return new le(x);this._writableState=new F(x,this,D),x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final),typeof x.construct=="function"&&(this._construct=x.construct),x.signal&&y(x.signal,this)),g.call(this,x),b.construct(this,()=>{let q=this._writableState;q.writing||_e(this,q),V(this,q)})}e(le,d,{__proto__:null,value:function(x){return t(this,x)?!0:this!==le?!1:x&&x._writableState instanceof F}}),le.prototype.pipe=function(){U(this,new E)};function pe(x,D,q,te){let ee=x._writableState;if(typeof q=="function")te=q,q=ee.defaultEncoding;else{if(!q)q=ee.defaultEncoding;else if(q!=="buffer"&&!f.isEncoding(q))throw new de(q);typeof te!="function"&&(te=$)}if(D===null)throw new H;if(!ee.objectMode)if(typeof D=="string")ee.decodeStrings!==!1&&(D=f.from(D,q),q="buffer");else if(D instanceof f)q="buffer";else if(g._isUint8Array(D))D=g._uint8ArrayToBuffer(D),q="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],D);let ie;return ee.ending?ie=new G:ee.destroyed&&(ie=new T("write")),ie?(o.nextTick(te,ie),U(x,ie,!0),ie):(ee.pendingcb++,we(x,ee,D,q,te))}le.prototype.write=function(x,D,q){return pe(this,x,D,q)===!0},le.prototype.cork=function(){this._writableState.corked++},le.prototype.uncork=function(){let x=this._writableState;x.corked&&(x.corked--,x.writing||_e(this,x))},le.prototype.setDefaultEncoding=function(x){if(typeof x=="string"&&(x=s(x)),!f.isEncoding(x))throw new de(x);return this._writableState.defaultEncoding=x,this};function we(x,D,q,te,ee){let ie=D.objectMode?1:q.length;D.length+=ie;let L=D.length<D.highWaterMark;return L||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:q,encoding:te,callback:ee}),D.allBuffers&&te!=="buffer"&&(D.allBuffers=!1),D.allNoop&&ee!==$&&(D.allNoop=!1)):(D.writelen=ie,D.writecb=ee,D.writing=!0,D.sync=!0,x._write(q,te,D.onwrite),D.sync=!1),L&&!D.errored&&!D.destroyed}function Q(x,D,q,te,ee,ie,L){D.writelen=te,D.writecb=L,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new T("write")):q?x._writev(ee,D.onwrite):x._write(ee,ie,D.onwrite),D.sync=!1}function he(x,D,q,te){--D.pendingcb,te(q),J(D),U(x,q)}function P(x,D){let q=x._writableState,te=q.sync,ee=q.writecb;if(typeof ee!="function"){U(x,new k);return}q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0,D?(D.stack,q.errored||(q.errored=D),x._readableState&&!x._readableState.errored&&(x._readableState.errored=D),te?o.nextTick(he,x,q,D,ee):he(x,q,D,ee)):(q.buffered.length>q.bufferedIndex&&_e(x,q),te?q.afterWriteTickInfo!==null&&q.afterWriteTickInfo.cb===ee?q.afterWriteTickInfo.count++:(q.afterWriteTickInfo={count:1,cb:ee,stream:x,state:q},o.nextTick(ce,q.afterWriteTickInfo)):ye(x,q,1,ee))}function ce({stream:x,state:D,count:q,cb:te}){return D.afterWriteTickInfo=null,ye(x,D,q,te)}function ye(x,D,q,te){for(!D.ending&&!x.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,x.emit("drain"));q-- >0;)D.pendingcb--,te();D.destroyed&&J(D),V(x,D)}function J(x){if(x.writing)return;for(let ee=x.bufferedIndex;ee<x.buffered.length;++ee){var D;let{chunk:ie,callback:L}=x.buffered[ee],ne=x.objectMode?1:ie.length;x.length-=ne,L((D=x.errored)!==null&&D!==void 0?D:new T("write"))}let q=x[z].splice(0);for(let ee=0;ee<q.length;ee++){var te;q[ee]((te=x.errored)!==null&&te!==void 0?te:new T("end"))}me(x)}function _e(x,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;let{buffered:q,bufferedIndex:te,objectMode:ee}=D,ie=q.length-te;if(!ie)return;let L=te;if(D.bufferProcessing=!0,ie>1&&x._writev){D.pendingcb-=ie-1;let ne=D.allNoop?$:Y=>{for(let Se=L;Se<q.length;++Se)q[Se].callback(Y)},ge=D.allNoop&&L===0?q:a(q,L);ge.allBuffers=D.allBuffers,Q(x,D,!0,D.length,ge,"",ne),me(D)}else{do{let{chunk:ne,encoding:ge,callback:Y}=q[L];q[L++]=null;let Se=ee?1:ne.length;Q(x,D,!1,Se,ne,ge,Y)}while(L<q.length&&!D.writing);L===q.length?me(D):L>256?(q.splice(0,L),D.bufferedIndex=0):D.bufferedIndex=L}D.bufferProcessing=!1}le.prototype._write=function(x,D,q){if(this._writev)this._writev([{chunk:x,encoding:D}],q);else throw new I("_write()")},le.prototype._writev=null,le.prototype.end=function(x,D,q){let te=this._writableState;typeof x=="function"?(q=x,x=null,D=null):typeof D=="function"&&(q=D,D=null);let ee;if(x!=null){let ie=pe(this,x,D);ie instanceof l&&(ee=ie)}return te.corked&&(te.corked=1,this.uncork()),ee||(!te.errored&&!te.ending?(te.ending=!0,V(this,te,!0),te.ended=!0):te.finished?ee=new O("end"):te.destroyed&&(ee=new T("end"))),typeof q=="function"&&(ee||te.finished?o.nextTick(q,ee):te[z].push(q)),this};function K(x){return x.ending&&!x.destroyed&&x.constructed&&x.length===0&&!x.errored&&x.buffered.length===0&&!x.finished&&!x.writing&&!x.errorEmitted&&!x.closeEmitted}function M(x,D){let q=!1;function te(ee){if(q){U(x,ee??k());return}if(q=!0,D.pendingcb--,ee){let ie=D[z].splice(0);for(let L=0;L<ie.length;L++)ie[L](ee);U(x,ee,D.sync)}else K(D)&&(D.prefinished=!0,x.emit("prefinish"),D.pendingcb++,o.nextTick(j,x,D))}D.sync=!0,D.pendingcb++;try{x._final(te)}catch(ee){te(ee)}D.sync=!1}function Z(x,D){!D.prefinished&&!D.finalCalled&&(typeof x._final=="function"&&!D.destroyed?(D.finalCalled=!0,M(x,D)):(D.prefinished=!0,x.emit("prefinish")))}function V(x,D,q){K(D)&&(Z(x,D),D.pendingcb===0&&(q?(D.pendingcb++,o.nextTick((te,ee)=>{K(ee)?j(te,ee):ee.pendingcb--},x,D)):K(D)&&(D.pendingcb++,j(x,D))))}function j(x,D){D.pendingcb--,D.finished=!0;let q=D[z].splice(0);for(let te=0;te<q.length;te++)q[te]();if(x.emit("finish"),D.autoDestroy){let te=x._readableState;(!te||te.autoDestroy&&(te.endEmitted||te.readable===!1))&&x.destroy()}}n(le.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(x){this._writableState&&(this._writableState.destroyed=x)}},writable:{__proto__:null,get(){let x=this._writableState;return!!x&&x.writable!==!1&&!x.destroyed&&!x.errored&&!x.ending&&!x.ended},set(x){this._writableState&&(this._writableState.writable=!!x)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let x=this._writableState;return x?!x.destroyed&&!x.ending&&x.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var W=b.destroy;le.prototype.destroy=function(x,D){let q=this._writableState;return!q.destroyed&&(q.bufferedIndex<q.buffered.length||q[z].length)&&o.nextTick(J,q),W.call(this,x,D),this},le.prototype._undestroy=b.undestroy,le.prototype._destroy=function(x,D){D(x)},le.prototype[p.captureRejectionSymbol]=function(x){this.destroy(x)};var ue;function re(){return ue===void 0&&(ue={}),ue}le.fromWeb=function(x,D){return re().newStreamWritableFromWritableStream(x,D)},le.toWeb=function(x){return re().newWritableStreamFromStreamWritable(x)}}),wl=fe((i,h)=>{oe(),ae(),se();var o=Et(),a=(Ve(),Be(We)),{isReadable:l,isWritable:t,isIterable:e,isNodeStream:n,isReadableNodeStream:r,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:p}=ot(),g=mt(),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=qe(),{destroyer:_}=Ut(),A=st(),w=rr(),I=Nn(),{createDeferredPromise:k}=$e(),E=co(),T=globalThis.Blob||a.Blob,O=typeof T<"u"?function(z){return z instanceof T}:function(z){return!1},H=globalThis.AbortController||Vt().AbortController,{FunctionPrototypeCall:G}=Ue(),de=class extends A{constructor(z){super(z),z?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),z?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};h.exports=function z(F,me){if(u(F))return F;if(r(F))return $({readable:F});if(s(F))return $({writable:F});if(n(F))return $({writable:!1,readable:!1});if(d(F))return $({readable:w.fromWeb(F)});if(p(F))return $({writable:I.fromWeb(F)});if(typeof F=="function"){let{value:pe,write:we,final:Q,destroy:he}=U(F);if(e(pe))return E(de,pe,{objectMode:!0,write:we,final:Q,destroy:he});let P=pe?.then;if(typeof P=="function"){let ce,ye=G(P,pe,J=>{if(J!=null)throw new y("nully","body",J)},J=>{_(ce,J)});return ce=new de({objectMode:!0,readable:!1,write:we,final(J){Q(async()=>{try{await ye,o.nextTick(J,null)}catch(_e){o.nextTick(J,_e)}})},destroy:he})}throw new y("Iterable, AsyncIterable or AsyncFunction",me,pe)}if(O(F))return z(F.arrayBuffer());if(e(F))return E(de,F,{objectMode:!0,writable:!1});if(d(F?.readable)&&p(F?.writable))return de.fromWeb(F);if(typeof F?.writable=="object"||typeof F?.readable=="object"){let pe=F!=null&&F.readable?r(F?.readable)?F?.readable:z(F.readable):void 0,we=F!=null&&F.writable?s(F?.writable)?F?.writable:z(F.writable):void 0;return $({readable:pe,writable:we})}let le=F?.then;if(typeof le=="function"){let pe;return G(le,F,we=>{we!=null&&pe.push(we),pe.push(null)},we=>{_(pe,we)}),pe=new de({objectMode:!0,writable:!1,read(){}})}throw new b(me,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],F)};function U(z){let{promise:F,resolve:me}=k(),le=new H,pe=le.signal;return{value:z((async function*(){for(;;){let we=F;F=null;let{chunk:Q,done:he,cb:P}=await we;if(o.nextTick(P),he)return;if(pe.aborted)throw new f(void 0,{cause:pe.reason});({promise:F,resolve:me}=k()),yield Q}})(),{signal:pe}),write(we,Q,he){let P=me;me=null,P({chunk:we,done:!1,cb:he})},final(we){let Q=me;me=null,Q({done:!0,cb:we})},destroy(we,Q){le.abort(),Q(we)}}}function $(z){let F=z.readable&&typeof z.readable.read!="function"?w.wrap(z.readable):z.readable,me=z.writable,le=!!l(F),pe=!!t(me),we,Q,he,P,ce;function ye(J){let _e=P;P=null,_e?_e(J):J&&ce.destroy(J)}return ce=new de({readableObjectMode:!!(F!=null&&F.readableObjectMode),writableObjectMode:!!(me!=null&&me.writableObjectMode),readable:le,writable:pe}),pe&&(g(me,J=>{pe=!1,J&&_(F,J),ye(J)}),ce._write=function(J,_e,K){me.write(J,_e)?K():we=K},ce._final=function(J){me.end(),Q=J},me.on("drain",function(){if(we){let J=we;we=null,J()}}),me.on("finish",function(){if(Q){let J=Q;Q=null,J()}})),le&&(g(F,J=>{le=!1,J&&_(F,J),ye(J)}),F.on("readable",function(){if(he){let J=he;he=null,J()}}),F.on("end",function(){ce.push(null)}),ce._read=function(){for(;;){let J=F.read();if(J===null){he=ce._read;return}if(!ce.push(J))return}}),ce._destroy=function(J,_e){!J&&P!==null&&(J=new f),he=null,we=null,Q=null,P===null?_e(J):(P=_e,_(me,J),_(F,J))},ce}}),st=fe((i,h)=>{oe(),ae(),se();var{ObjectDefineProperties:o,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:l,ObjectSetPrototypeOf:t}=Ue();h.exports=r;var e=rr(),n=Nn();t(r.prototype,e.prototype),t(r,e);{let p=l(n.prototype);for(let g=0;g<p.length;g++){let f=p[g];r.prototype[f]||(r.prototype[f]=n.prototype[f])}}function r(p){if(!(this instanceof r))return new r(p);e.call(this,p),n.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}o(r.prototype,{writable:{__proto__:null,...a(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(n.prototype,"writableLength")},writableFinished:{__proto__:null,...a(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});var s;function u(){return s===void 0&&(s={}),s}r.fromWeb=function(p,g){return u().newStreamDuplexFromReadableWritablePair(p,g)},r.toWeb=function(p){return u().newReadableWritablePairFromDuplex(p)};var d;r.from=function(p){return d||(d=wl()),d(p,"body")}}),ho=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o,Symbol:a}=Ue();h.exports=r;var{ERR_METHOD_NOT_IMPLEMENTED:l}=qe().codes,t=st(),{getHighWaterMark:e}=tr();o(r.prototype,t.prototype),o(r,t);var n=a("kCallback");function r(d){if(!(this instanceof r))return new r(d);let p=d?e(this,d,"readableHighWaterMark",!0):null;p===0&&(d={...d,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:d.writableHighWaterMark||0}),t.call(this,d),this._readableState.sync=!1,this[n]=null,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",u)}function s(d){typeof this._flush=="function"&&!this.destroyed?this._flush((p,g)=>{if(p){d?d(p):this.destroy(p);return}g!=null&&this.push(g),this.push(null),d&&d()}):(this.push(null),d&&d())}function u(){this._final!==s&&s.call(this)}r.prototype._final=s,r.prototype._transform=function(d,p,g){throw new l("_transform()")},r.prototype._write=function(d,p,g){let f=this._readableState,b=this._writableState,y=f.length;this._transform(d,p,(_,A)=>{if(_){g(_);return}A!=null&&this.push(A),b.ended||y===f.length||f.length<f.highWaterMark?g():this[n]=g})},r.prototype._read=function(){if(this[n]){let d=this[n];this[n]=null,d()}}}),fo=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o}=Ue();h.exports=l;var a=ho();o(l.prototype,a.prototype),o(l,a);function l(t){if(!(this instanceof l))return new l(t);a.call(this,t)}l.prototype._transform=function(t,e,n){n(null,t)}}),Fn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayIsArray:a,Promise:l,SymbolAsyncIterator:t,SymbolDispose:e}=Ue(),n=mt(),{once:r}=$e(),s=Ut(),u=st(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:b,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:_}=qe(),{validateFunction:A,validateAbortSignal:w}=Qt(),{isIterable:I,isReadable:k,isReadableNodeStream:E,isNodeStream:T,isTransformStream:O,isWebStream:H,isReadableStream:G,isReadableFinished:de}=ot(),U=globalThis.AbortController||Vt().AbortController,$,z,F;function me(J,_e,K){let M=!1;J.on("close",()=>{M=!0});let Z=n(J,{readable:_e,writable:K},V=>{M=!V});return{destroy:V=>{M||(M=!0,s.destroyer(J,V||new b("pipe")))},cleanup:Z}}function le(J){return A(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function pe(J){if(I(J))return J;if(E(J))return we(J);throw new p("val",["Readable","Iterable","AsyncIterable"],J)}async function*we(J){z||(z=rr()),yield*z.prototype[t].call(J)}async function Q(J,_e,K,{end:M}){let Z,V=null,j=re=>{if(re&&(Z=re),V){let x=V;V=null,x()}},W=()=>new l((re,x)=>{Z?x(Z):V=()=>{Z?x(Z):re()}});_e.on("drain",j);let ue=n(_e,{readable:!1},j);try{_e.writableNeedDrain&&await W();for await(let re of J)_e.write(re)||await W();M&&(_e.end(),await W()),K()}catch(re){K(Z!==re?d(Z,re):re)}finally{ue(),_e.off("drain",j)}}async function he(J,_e,K,{end:M}){O(_e)&&(_e=_e.writable);let Z=_e.getWriter();try{for await(let V of J)await Z.ready,Z.write(V).catch(()=>{});await Z.ready,M&&await Z.close(),K()}catch(V){try{await Z.abort(V),K(V)}catch(j){K(j)}}}function P(...J){return ce(J,r(le(J)))}function ce(J,_e,K){if(J.length===1&&a(J[0])&&(J=J[0]),J.length<2)throw new f("streams");let M=new U,Z=M.signal,V=K?.signal,j=[];w(V,"options.signal");function W(){ee(new _)}F=F||$e().addAbortListener;let ue;V&&(ue=F(V,W));let re,x,D=[],q=0;function te(ge){ee(ge,--q===0)}function ee(ge,Y){var Se;if(ge&&(!re||re.code==="ERR_STREAM_PREMATURE_CLOSE")&&(re=ge),!(!re&&!Y)){for(;D.length;)D.shift()(re);(Se=ue)===null||Se===void 0||Se[e](),M.abort(),Y&&(re||j.forEach(c=>c()),o.nextTick(_e,re,x))}}let ie;for(let ge=0;ge<J.length;ge++){let Y=J[ge],Se=ge<J.length-1,c=ge>0,m=Se||K?.end!==!1,v=ge===J.length-1;if(T(Y)){let R=function(N){N&&N.name!=="AbortError"&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"&&te(N)};if(m){let{destroy:N,cleanup:X}=me(Y,Se,c);D.push(N),k(Y)&&v&&j.push(X)}Y.on("error",R),k(Y)&&v&&j.push(()=>{Y.removeListener("error",R)})}if(ge===0)if(typeof Y=="function"){if(ie=Y({signal:Z}),!I(ie))throw new g("Iterable, AsyncIterable or Stream","source",ie)}else I(Y)||E(Y)||O(Y)?ie=Y:ie=u.from(Y);else if(typeof Y=="function"){if(O(ie)){var L;ie=pe((L=ie)===null||L===void 0?void 0:L.readable)}else ie=pe(ie);if(ie=Y(ie,{signal:Z}),Se){if(!I(ie,!0))throw new g("AsyncIterable",`transform[${ge-1}]`,ie)}else{var ne;$||($=fo());let R=new $({objectMode:!0}),N=(ne=ie)===null||ne===void 0?void 0:ne.then;if(typeof N=="function")q++,N.call(ie,Ce=>{x=Ce,Ce!=null&&R.write(Ce),m&&R.end(),o.nextTick(te)},Ce=>{R.destroy(Ce),o.nextTick(te,Ce)});else if(I(ie,!0))q++,Q(ie,R,te,{end:m});else if(G(ie)||O(ie)){let Ce=ie.readable||ie;q++,Q(Ce,R,te,{end:m})}else throw new g("AsyncIterable or Promise","destination",ie);ie=R;let{destroy:X,cleanup:be}=me(ie,!1,!0);D.push(X),v&&j.push(be)}}else if(T(Y)){if(E(ie)){q+=2;let R=ye(ie,Y,te,{end:m});k(Y)&&v&&j.push(R)}else if(O(ie)||G(ie)){let R=ie.readable||ie;q++,Q(R,Y,te,{end:m})}else if(I(ie))q++,Q(ie,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else if(H(Y)){if(E(ie))q++,he(pe(ie),Y,te,{end:m});else if(G(ie)||I(ie))q++,he(ie,Y,te,{end:m});else if(O(ie))q++,he(ie.readable,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else ie=u.from(Y)}return(Z!=null&&Z.aborted||V!=null&&V.aborted)&&o.nextTick(W),ie}function ye(J,_e,K,{end:M}){let Z=!1;if(_e.on("close",()=>{Z||K(new y)}),J.pipe(_e,{end:!1}),M){let V=function(){Z=!0,_e.end()};de(J)?o.nextTick(V):J.once("end",V)}else K();return n(J,{readable:!0,writable:!1},V=>{let j=J._readableState;V&&V.code==="ERR_STREAM_PREMATURE_CLOSE"&&j&&j.ended&&!j.errored&&!j.errorEmitted?J.once("end",K).once("error",K):K(V)}),n(_e,{readable:!1,writable:!0},K)}h.exports={pipelineImpl:ce,pipeline:P}}),po=fe((i,h)=>{oe(),ae(),se();var{pipeline:o}=Fn(),a=st(),{destroyer:l}=Ut(),{isNodeStream:t,isReadable:e,isWritable:n,isWebStream:r,isTransformStream:s,isWritableStream:u,isReadableStream:d}=ot(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:f}}=qe(),b=mt();h.exports=function(...y){if(y.length===0)throw new f("streams");if(y.length===1)return a.from(y[0]);let _=[...y];if(typeof y[0]=="function"&&(y[0]=a.from(y[0])),typeof y[y.length-1]=="function"){let U=y.length-1;y[U]=a.from(y[U])}for(let U=0;U<y.length;++U)if(!(!t(y[U])&&!r(y[U]))){if(U<y.length-1&&!(e(y[U])||d(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be readable");if(U>0&&!(n(y[U])||u(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be writable")}let A,w,I,k,E;function T(U){let $=k;k=null,$?$(U):U?E.destroy(U):!de&&!G&&E.destroy()}let O=y[0],H=o(y,T),G=!!(n(O)||u(O)||s(O)),de=!!(e(H)||d(H)||s(H));if(E=new a({writableObjectMode:!!(O!=null&&O.writableObjectMode),readableObjectMode:!!(H!=null&&H.readableObjectMode),writable:G,readable:de}),G){if(t(O))E._write=function($,z,F){O.write($,z)?F():A=F},E._final=function($){O.end(),w=$},O.on("drain",function(){if(A){let $=A;A=null,$()}});else if(r(O)){let $=(s(O)?O.writable:O).getWriter();E._write=async function(z,F,me){try{await $.ready,$.write(z).catch(()=>{}),me()}catch(le){me(le)}},E._final=async function(z){try{await $.ready,$.close().catch(()=>{}),w=z}catch(F){z(F)}}}let U=s(H)?H.readable:H;b(U,()=>{if(w){let $=w;w=null,$()}})}if(de){if(t(H))H.on("readable",function(){if(I){let U=I;I=null,U()}}),H.on("end",function(){E.push(null)}),E._read=function(){for(;;){let U=H.read();if(U===null){I=E._read;return}if(!E.push(U))return}};else if(r(H)){let U=(s(H)?H.readable:H).getReader();E._read=async function(){for(;;)try{let{value:$,done:z}=await U.read();if(!E.push($))return;if(z){E.push(null);return}}catch{return}}}}return E._destroy=function(U,$){!U&&k!==null&&(U=new p),I=null,A=null,w=null,k===null?$(U):(k=$,t(H)&&l(H,U))},E}}),vl=fe((i,h)=>{oe(),ae(),se();var o=globalThis.AbortController||Vt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:l,ERR_MISSING_ARGS:t,ERR_OUT_OF_RANGE:e},AbortError:n}=qe(),{validateAbortSignal:r,validateInteger:s,validateObject:u}=Qt(),d=Ue().Symbol("kWeak"),p=Ue().Symbol("kResistStopPropagation"),{finished:g}=mt(),f=po(),{addAbortSignalNoValidate:b}=er(),{isWritable:y,isNodeStream:_}=ot(),{deprecate:A}=$e(),{ArrayPrototypePush:w,Boolean:I,MathFloor:k,Number:E,NumberIsNaN:T,Promise:O,PromiseReject:H,PromiseResolve:G,PromisePrototypeThen:de,Symbol:U}=Ue(),$=U("kEmpty"),z=U("kEof");function F(V,j){if(j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),_(V)&&!y(V))throw new a("stream",V,"must be writable");let W=f(this,V);return j!=null&&j.signal&&b(j.signal,W),W}function me(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal");let W=1;j?.concurrency!=null&&(W=k(j.concurrency));let ue=W-1;return j?.highWaterMark!=null&&(ue=k(j.highWaterMark)),s(W,"options.concurrency",1),s(ue,"options.highWaterMark",0),ue+=W,(async function*(){let re=$e().AbortSignalAny([j?.signal].filter(I)),x=this,D=[],q={signal:re},te,ee,ie=!1,L=0;function ne(){ie=!0,ge()}function ge(){L-=1,Y()}function Y(){ee&&!ie&&L<W&&D.length<ue&&(ee(),ee=null)}async function Se(){try{for await(let c of x){if(ie)return;if(re.aborted)throw new n;try{if(c=V(c,q),c===$)continue;c=G(c)}catch(m){c=H(m)}L+=1,de(c,ge,ne),D.push(c),te&&(te(),te=null),!ie&&(D.length>=ue||L>=W)&&await new O(m=>{ee=m})}D.push(z)}catch(c){let m=H(c);de(m,ge,ne),D.push(m)}finally{ie=!0,te&&(te(),te=null)}}Se();try{for(;;){for(;D.length>0;){let c=await D[0];if(c===z)return;if(re.aborted)throw new n;c!==$&&(yield c),D.shift(),Y()}await new O(c=>{te=c})}}finally{ie=!0,ee&&(ee(),ee=null)}}).call(this)}function le(V=void 0){return V!=null&&u(V,"options"),V?.signal!=null&&r(V.signal,"options.signal"),(async function*(){let j=0;for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n({cause:V.signal.reason});yield[j++,ue]}}).call(this)}async function pe(V,j=void 0){for await(let W of P.call(this,V,j))return!0;return!1}async function we(V,j=void 0){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);return!await pe.call(this,async(...W)=>!await V(...W),j)}async function Q(V,j){for await(let W of P.call(this,V,j))return W}async function he(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re),$}for await(let ue of me.call(this,W,j));}function P(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re)?ue:$}return me.call(this,W,j)}var ce=class extends t{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ye(V,j,W){var ue;if(typeof V!="function")throw new l("reducer",["Function","AsyncFunction"],V);W!=null&&u(W,"options"),W?.signal!=null&&r(W.signal,"options.signal");let re=arguments.length>1;if(W!=null&&(ue=W.signal)!==null&&ue!==void 0&&ue.aborted){let ee=new n(void 0,{cause:W.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(ee)),ee}let x=new o,D=x.signal;if(W!=null&&W.signal){let ee={once:!0,[d]:this,[p]:!0};W.signal.addEventListener("abort",()=>x.abort(),ee)}let q=!1;try{for await(let ee of this){var te;if(q=!0,W!=null&&(te=W.signal)!==null&&te!==void 0&&te.aborted)throw new n;re?j=await V(j,ee,{signal:D}):(j=ee,re=!0)}if(!q&&!re)throw new ce}finally{x.abort()}return j}async function J(V){V!=null&&u(V,"options"),V?.signal!=null&&r(V.signal,"options.signal");let j=[];for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n(void 0,{cause:V.signal.reason});w(j,ue)}return j}function _e(V,j){let W=me.call(this,V,j);return(async function*(){for await(let ue of W)yield*ue}).call(this)}function K(V){if(V=E(V),T(V))return 0;if(V<0)throw new e("number",">= 0",V);return V}function M(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;V--<=0&&(yield re)}}).call(this)}function Z(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;if(V-- >0&&(yield re),V<=0)return}}).call(this)}h.exports.streamReturningOperators={asIndexedPairs:A(le,"readable.asIndexedPairs will be removed in a future version."),drop:M,filter:P,flatMap:_e,map:me,take:Z,compose:F},h.exports.promiseReturningOperators={every:we,forEach:he,reduce:ye,toArray:J,some:pe,find:Q}}),go=fe((i,h)=>{oe(),ae(),se();var{ArrayPrototypePop:o,Promise:a}=Ue(),{isIterable:l,isNodeStream:t,isWebStream:e}=ot(),{pipelineImpl:n}=Fn(),{finished:r}=mt();mo();function s(...u){return new a((d,p)=>{let g,f,b=u[u.length-1];if(b&&typeof b=="object"&&!t(b)&&!l(b)&&!e(b)){let y=o(u);g=y.signal,f=y.end}n(u,(y,_)=>{y?p(y):d(_)},{signal:g,end:f})})}h.exports={finished:r,pipeline:s}}),mo=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),{ObjectDefineProperty:a,ObjectKeys:l,ReflectApply:t}=Ue(),{promisify:{custom:e}}=$e(),{streamReturningOperators:n,promiseReturningOperators:r}=vl(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=qe(),u=po(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=tr(),{pipeline:g}=Fn(),{destroyer:f}=Ut(),b=mt(),y=go(),_=ot(),A=h.exports=Ln().Stream;A.isDestroyed=_.isDestroyed,A.isDisturbed=_.isDisturbed,A.isErrored=_.isErrored,A.isReadable=_.isReadable,A.isWritable=_.isWritable,A.Readable=rr();for(let I of l(n)){let k=function(...T){if(new.target)throw s();return A.Readable.from(t(E,this,T))},E=n[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}for(let I of l(r)){let k=function(...T){if(new.target)throw s();return t(E,this,T)},E=r[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Nn(),A.Duplex=st(),A.Transform=ho(),A.PassThrough=fo(),A.pipeline=g;var{addAbortSignal:w}=er();A.addAbortSignal=w,A.finished=b,A.destroy=f,A.compose=u,A.setDefaultHighWaterMark=d,A.getDefaultHighWaterMark=p,a(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return y}}),a(g,e,{__proto__:null,enumerable:!0,get(){return y.pipeline}}),a(b,e,{__proto__:null,enumerable:!0,get(){return y.finished}}),A.Stream=A,A._isUint8Array=function(I){return I instanceof Uint8Array},A._uint8ArrayToBuffer=function(I){return o.from(I.buffer,I.byteOffset,I.byteLength)}}),St=fe((i,h)=>{oe(),ae(),se();var o=mo(),a=go(),l=o.Readable.destroy;h.exports=o.Readable,h.exports._uint8ArrayToBuffer=o._uint8ArrayToBuffer,h.exports._isUint8Array=o._isUint8Array,h.exports.isDisturbed=o.isDisturbed,h.exports.isErrored=o.isErrored,h.exports.isReadable=o.isReadable,h.exports.Readable=o.Readable,h.exports.Writable=o.Writable,h.exports.Duplex=o.Duplex,h.exports.Transform=o.Transform,h.exports.PassThrough=o.PassThrough,h.exports.addAbortSignal=o.addAbortSignal,h.exports.finished=o.finished,h.exports.destroy=o.destroy,h.exports.destroy=l,h.exports.pipeline=o.pipeline,h.exports.compose=o.compose,Object.defineProperty(o,"promises",{configurable:!0,enumerable:!0,get(){return a}}),h.exports.Stream=o.Stream,h.exports.default=h.exports}),_l=fe((i,h)=>{oe(),ae(),se(),typeof Object.create=="function"?h.exports=function(o,a){a&&(o.super_=a,o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:h.exports=function(o,a){if(a){o.super_=a;var l=function(){};l.prototype=a.prototype,o.prototype=new l,o.prototype.constructor=o}}}),El=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=Symbol.for("BufferList");function l(t){if(!(this instanceof l))return new l(t);l._init.call(this,t)}l._init=function(t){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},l.prototype._new=function(t){return new l(t)},l.prototype._offset=function(t){if(t===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let r=e+this._bufs[n].length;if(t<r||n===this._bufs.length-1)return[n,t-e];e=r}},l.prototype._reverseOffset=function(t){let e=t[0],n=t[1];for(let r=0;r<e;r++)n+=this._bufs[r].length;return n},l.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]},l.prototype.slice=function(t,e){return typeof t=="number"&&t<0&&(t+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,t,e)},l.prototype.copy=function(t,e,n,r){if((typeof n!="number"||n<0)&&(n=0),(typeof r!="number"||r>this.length)&&(r=this.length),n>=this.length||r<=0)return t||o.alloc(0);let s=!!t,u=this._offset(n),d=r-n,p=d,g=s&&e||0,f=u[1];if(n===0&&r===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(t,g),g+=this._bufs[b].length;return t}if(p<=this._bufs[u[0]].length-f)return s?this._bufs[u[0]].copy(t,e,f,f+p):this._bufs[u[0]].slice(f,f+p);s||(t=o.allocUnsafe(d));for(let b=u[0];b<this._bufs.length;b++){let y=this._bufs[b].length-f;if(p>y)this._bufs[b].copy(t,g,f),g+=y;else{this._bufs[b].copy(t,g,f,f+p),g+=y;break}p-=y,f&&(f=0)}return t.length>g?t.slice(0,g):t},l.prototype.shallowSlice=function(t,e){if(t=t||0,e=typeof e!="number"?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let n=this._offset(t),r=this._offset(e),s=this._bufs.slice(n[0],r[0]+1);return r[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,r[1]),n[1]!==0&&(s[0]=s[0].slice(n[1])),this._new(s)},l.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)},l.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},l.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},l.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(o.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(o.from(t));return this},l.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},l.prototype.indexOf=function(t,e,n){if(n===void 0&&typeof e=="string"&&(n=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=o.from([t]):typeof t=="string"?t=o.from(t,n):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=o.from(t.buffer,t.byteOffset,t.byteLength):o.isBuffer(t)||(t=o.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let r=this._offset(e),s=r[0],u=r[1];for(;s<this._bufs.length;s++){let d=this._bufs[s];for(;u<d.length;)if(d.length-u>=t.length){let p=d.indexOf(t,u);if(p!==-1)return this._reverseOffset([s,p]);u=d.length-t.length+1}else{let p=this._reverseOffset([s,u]);if(this._match(p,t))return p;u++}u=0}return-1},l.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let n=0;n<e.length;n++)if(this.get(t+n)!==e[n])return!1;return!0},(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(n){t[n]===null?l.prototype[n]=function(r,s){return this.slice(r,r+s)[n](0,s)}:l.prototype[n]=function(r=0){return this.slice(r,r+t[n])[n](0)}})(e)})(),l.prototype._isBufferList=function(t){return t instanceof l||l.isBufferList(t)},l.isBufferList=function(t){return t!=null&&t[a]},h.exports=l}),Sl=fe((i,h)=>{oe(),ae(),se();var o=St().Duplex,a=_l(),l=El();function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="function"){this._callback=e;let n=(function(r){this._callback&&(this._callback(r),this._callback=null)}).bind(this);this.on("pipe",function(r){r.on("error",n)}),this.on("unpipe",function(r){r.removeListener("error",n)}),e=null}l._init.call(this,e),o.call(this)}a(t,o),Object.assign(t.prototype,l.prototype),t.prototype._new=function(e){return new t(e)},t.prototype._write=function(e,n,r){this._appendBuffer(e),typeof r=="function"&&r()},t.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},t.prototype.end=function(e){o.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},t.prototype._destroy=function(e,n){this._bufs.length=0,this.length=0,n(e)},t.prototype._isBufferList=function(e){return e instanceof t||e instanceof l||t.isBufferList(e)},t.isBufferList=l.isBufferList,h.exports=t,h.exports.BufferListStream=t,h.exports.BufferList=l}),Cl=fe((i,h)=>{oe(),ae(),se();var o=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};h.exports=o}),Ao=fe((i,h)=>{oe(),ae(),se();var o=h.exports,{Buffer:a}=(Ve(),Be(We));o.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},o.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},o.requiredHeaderFlagsErrors={};for(let t in o.requiredHeaderFlags){let e=o.requiredHeaderFlags[t];o.requiredHeaderFlagsErrors[t]="Invalid header flag bits, must be 0x"+e.toString(16)+" for "+o.types[t]+" packet"}o.codes={};for(let t in o.types){let e=o.types[t];o.codes[e]=t}o.CMD_SHIFT=4,o.CMD_MASK=240,o.DUP_MASK=8,o.QOS_MASK=3,o.QOS_SHIFT=1,o.RETAIN_MASK=1,o.VARBYTEINT_MASK=127,o.VARBYTEINT_FIN_MASK=128,o.VARBYTEINT_MAX=268435455,o.SESSIONPRESENT_MASK=1,o.SESSIONPRESENT_HEADER=a.from([o.SESSIONPRESENT_MASK]),o.CONNACK_HEADER=a.from([o.codes.connack<<o.CMD_SHIFT]),o.USERNAME_MASK=128,o.PASSWORD_MASK=64,o.WILL_RETAIN_MASK=32,o.WILL_QOS_MASK=24,o.WILL_QOS_SHIFT=3,o.WILL_FLAG_MASK=4,o.CLEAN_SESSION_MASK=2,o.CONNECT_HEADER=a.from([o.codes.connect<<o.CMD_SHIFT]),o.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},o.propertiesCodes={};for(let t in o.properties){let e=o.properties[t];o.propertiesCodes[e]=t}o.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function l(t){return[0,1,2].map(e=>[0,1].map(n=>[0,1].map(r=>{let s=a.alloc(1);return s.writeUInt8(o.codes[t]<<o.CMD_SHIFT|(n?o.DUP_MASK:0)|e<<o.QOS_SHIFT|r,0,!0),s})))}o.PUBLISH_HEADER=l("publish"),o.SUBSCRIBE_HEADER=l("subscribe"),o.SUBSCRIBE_OPTIONS_QOS_MASK=3,o.SUBSCRIBE_OPTIONS_NL_MASK=1,o.SUBSCRIBE_OPTIONS_NL_SHIFT=2,o.SUBSCRIBE_OPTIONS_RAP_MASK=1,o.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,o.SUBSCRIBE_OPTIONS_RH_MASK=3,o.SUBSCRIBE_OPTIONS_RH_SHIFT=4,o.SUBSCRIBE_OPTIONS_RH=[0,16,32],o.SUBSCRIBE_OPTIONS_NL=4,o.SUBSCRIBE_OPTIONS_RAP=8,o.SUBSCRIBE_OPTIONS_QOS=[0,1,2],o.UNSUBSCRIBE_HEADER=l("unsubscribe"),o.ACKS={unsuback:l("unsuback"),puback:l("puback"),pubcomp:l("pubcomp"),pubrel:l("pubrel"),pubrec:l("pubrec")},o.SUBACK_HEADER=a.from([o.codes.suback<<o.CMD_SHIFT]),o.VERSION3=a.from([3]),o.VERSION4=a.from([4]),o.VERSION5=a.from([5]),o.VERSION131=a.from([131]),o.VERSION132=a.from([132]),o.QOS=[0,1,2].map(t=>a.from([t])),o.EMPTY={pingreq:a.from([o.codes.pingreq<<4,0]),pingresp:a.from([o.codes.pingresp<<4,0]),disconnect:a.from([o.codes.disconnect<<4,0])},o.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},o.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},o.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},o.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),kl=fe((i,h)=>{oe(),ae(),se();var o=1e3,a=o*60,l=a*60,t=l*24,e=t*7,n=t*365.25;h.exports=function(p,g){g=g||{};var f=typeof p;if(f==="string"&&p.length>0)return r(p);if(f==="number"&&isFinite(p))return g.long?u(p):s(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function r(p){if(p=String(p),!(p.length>100)){var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(g){var f=parseFloat(g[1]),b=(g[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return f*n;case"weeks":case"week":case"w":return f*e;case"days":case"day":case"d":return f*t;case"hours":case"hour":case"hrs":case"hr":case"h":return f*l;case"minutes":case"minute":case"mins":case"min":case"m":return f*a;case"seconds":case"second":case"secs":case"sec":case"s":return f*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function s(p){var g=Math.abs(p);return g>=t?Math.round(p/t)+"d":g>=l?Math.round(p/l)+"h":g>=a?Math.round(p/a)+"m":g>=o?Math.round(p/o)+"s":p+"ms"}function u(p){var g=Math.abs(p);return g>=t?d(p,g,t,"day"):g>=l?d(p,g,l,"hour"):g>=a?d(p,g,a,"minute"):g>=o?d(p,g,o,"second"):p+" ms"}function d(p,g,f,b){var y=g>=f*1.5;return Math.round(p/f)+" "+b+(y?"s":"")}}),Tl=fe((i,h)=>{oe(),ae(),se();function o(a){t.debug=t,t.default=t,t.coerce=d,t.disable=s,t.enable=n,t.enabled=u,t.humanize=kl(),t.destroy=p,Object.keys(a).forEach(g=>{t[g]=a[g]}),t.names=[],t.skips=[],t.formatters={};function l(g){let f=0;for(let b=0;b<g.length;b++)f=(f<<5)-f+g.charCodeAt(b),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=l;function t(g){let f,b=null,y,_;function A(...w){if(!A.enabled)return;let I=A,k=Number(new Date),E=k-(f||k);I.diff=E,I.prev=f,I.curr=k,f=k,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let T=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(O,H)=>{if(O==="%%")return"%";T++;let G=t.formatters[H];if(typeof G=="function"){let de=w[T];O=G.call(I,de),w.splice(T,1),T--}return O}),t.formatArgs.call(I,w),(I.log||t.log).apply(I,w)}return A.namespace=g,A.useColors=t.useColors(),A.color=t.selectColor(g),A.extend=e,A.destroy=t.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(y!==t.namespaces&&(y=t.namespaces,_=t.enabled(g)),_),set:w=>{b=w}}),typeof t.init=="function"&&t.init(A),A}function e(g,f){let b=t(this.namespace+(typeof f>"u"?":":f)+g);return b.log=this.log,b}function n(g){t.save(g),t.namespaces=g,t.names=[],t.skips=[];let f=(typeof g=="string"?g:"").trim().replace(" ",",").split(",").filter(Boolean);for(let b of f)b[0]==="-"?t.skips.push(b.slice(1)):t.names.push(b)}function r(g,f){let b=0,y=0,_=-1,A=0;for(;b<g.length;)if(y<f.length&&(f[y]===g[b]||f[y]==="*"))f[y]==="*"?(_=y,A=b,y++):(b++,y++);else if(_!==-1)y=_+1,A++,b=A;else return!1;for(;y<f.length&&f[y]==="*";)y++;return y===f.length}function s(){let g=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),g}function u(g){for(let f of t.skips)if(r(g,f))return!1;for(let f of t.names)if(r(g,f))return!0;return!1}function d(g){return g instanceof Error?g.stack||g.message:g}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}h.exports=o}),at=fe((i,h)=>{oe(),ae(),se(),i.formatArgs=a,i.save=l,i.load=t,i.useColors=o,i.storage=e(),i.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+h.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;r.splice(1,0,s,"color: inherit");let u=0,d=0;r[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),r.splice(d,0,s)}i.log=console.debug||console.log||(()=>{});function l(r){try{r?i.storage.setItem("debug",r):i.storage.removeItem("debug")}catch{}}function t(){let r;try{r=i.storage.getItem("debug")}catch{}return!r&&typeof ke<"u"&&"env"in ke&&(r=ke.env.DEBUG),r}function e(){try{return localStorage}catch{}}h.exports=Tl()(i);var{formatters:n}=h.exports;n.j=function(r){try{return JSON.stringify(r)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}}),Il=fe((i,h)=>{oe(),ae(),se();var o=Sl(),{EventEmitter:a}=(_t(),Be(gt)),l=Cl(),t=Ao(),e=at()("mqtt-packet:parser"),n=class ui extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(s){return this instanceof ui?(this.settings=s||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new ui().parser(s)}_resetState(){e("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new l,this.error=null,this._list=o(),this._stateCounter=0}parse(s){for(this.error&&this._resetState(),this._list.append(s),e("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,e("parse: state complete. _stateCounter is now: %d",this._stateCounter),e("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return e("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let s=this._list.readUInt8(0),u=s>>t.CMD_SHIFT;this.packet.cmd=t.types[u];let d=s&15,p=t.requiredHeaderFlags[u];return p!=null&&d!==p?this._emitError(new Error(t.requiredHeaderFlagsErrors[u])):(this.packet.retain=(s&t.RETAIN_MASK)!==0,this.packet.qos=s>>t.QOS_SHIFT&t.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(s&t.DUP_MASK)!==0,e("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let s=this._parseVarByteNum(!0);return s&&(this.packet.length=s.value,this._list.consume(s.bytes)),e("_parseLength %d",s.value),!!s}_parsePayload(){e("_parsePayload: payload %O",this._list);let s=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}s=!0}return e("_parsePayload complete result: %s",s),s}_parseConnect(){e("_parseConnect");let s,u,d,p,g={},f=this.packet,b=this._parseString();if(b===null)return this._emitError(new Error("Cannot parse protocolId"));if(b!=="MQTT"&&b!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(f.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(f.protocolVersion=this._list.readUInt8(this._pos),f.protocolVersion>=128&&(f.bridgeMode=!0,f.protocolVersion=f.protocolVersion-128),f.protocolVersion!==3&&f.protocolVersion!==4&&f.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));g.username=this._list.readUInt8(this._pos)&t.USERNAME_MASK,g.password=this._list.readUInt8(this._pos)&t.PASSWORD_MASK,g.will=this._list.readUInt8(this._pos)&t.WILL_FLAG_MASK;let y=!!(this._list.readUInt8(this._pos)&t.WILL_RETAIN_MASK),_=(this._list.readUInt8(this._pos)&t.WILL_QOS_MASK)>>t.WILL_QOS_SHIFT;if(g.will)f.will={},f.will.retain=y,f.will.qos=_;else{if(y)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(_)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(f.clean=(this._list.readUInt8(this._pos)&t.CLEAN_SESSION_MASK)!==0,this._pos++,f.keepalive=this._parseNum(),f.keepalive===-1)return this._emitError(new Error("Packet too short"));if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.properties=w)}let A=this._parseString();if(A===null)return this._emitError(new Error("Packet too short"));if(f.clientId=A,e("_parseConnect: packet.clientId: %s",f.clientId),g.will){if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.will.properties=w)}if(s=this._parseString(),s===null)return this._emitError(new Error("Cannot parse will topic"));if(f.will.topic=s,e("_parseConnect: packet.will.topic: %s",f.will.topic),u=this._parseBuffer(),u===null)return this._emitError(new Error("Cannot parse will payload"));f.will.payload=u,e("_parseConnect: packet.will.paylaod: %s",f.will.payload)}if(g.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));f.username=p,e("_parseConnect: packet.username: %s",f.username)}if(g.password){if(d=this._parseBuffer(),d===null)return this._emitError(new Error("Cannot parse password"));f.password=d}return this.settings=f,e("_parseConnect: complete"),f}_parseConnack(){e("_parseConnack");let s=this.packet;if(this._list.length<1)return null;let u=this._list.readUInt8(this._pos++);if(u>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(s.sessionPresent=!!(u&t.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?s.reasonCode=this._list.readUInt8(this._pos++):s.reasonCode=0;else{if(this._list.length<2)return null;s.returnCode=this._list.readUInt8(this._pos++)}if(s.returnCode===-1||s.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d)}e("_parseConnack: complete")}_parsePublish(){e("_parsePublish");let s=this.packet;if(s.topic=this._parseString(),s.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(s.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}s.payload=this._list.slice(this._pos,s.length),e("_parsePublish: payload from buffer list: %o",s.payload)}}_parseSubscribe(){e("_parseSubscribe");let s=this.packet,u,d,p,g,f,b,y;if(s.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(s.properties=_)}if(s.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<s.length;){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=s.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(d=this._parseByte(),this.settings.protocolVersion===5){if(d&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(d&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(p=d&t.SUBSCRIBE_OPTIONS_QOS_MASK,p>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(b=(d>>t.SUBSCRIBE_OPTIONS_NL_SHIFT&t.SUBSCRIBE_OPTIONS_NL_MASK)!==0,f=(d>>t.SUBSCRIBE_OPTIONS_RAP_SHIFT&t.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,g=d>>t.SUBSCRIBE_OPTIONS_RH_SHIFT&t.SUBSCRIBE_OPTIONS_RH_MASK,g>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));y={topic:u,qos:p},this.settings.protocolVersion===5?(y.nl=b,y.rap=f,y.rh=g):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),e("_parseSubscribe: push subscription `%s` to subscription",y),s.subscriptions.push(y)}}}_parseSuback(){e("_parseSuback");let s=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let u=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!t.MQTT5_SUBACK_CODES[u])return this._emitError(new Error("Invalid suback code"))}else if(u>2&&u!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(u)}}}_parseUnsubscribe(){e("_parseUnsubscribe");let s=this.packet;if(s.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<s.length;){let u=this._parseString();if(u===null)return this._emitError(new Error("Cannot parse topic"));e("_parseUnsubscribe: push topic `%s` to unsubscriptions",u),s.unsubscriptions.push(u)}}}_parseUnsuback(){e("_parseUnsuback");let s=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&s.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(s.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let u=this._parseProperties();for(Object.getOwnPropertyNames(u).length&&(s.properties=u),s.granted=[];this._pos<this.packet.length;){let d=this._list.readUInt8(this._pos++);if(!t.MQTT5_UNSUBACK_CODES[d])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(d)}}}_parseConfirmation(){e("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let s=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(s.length>2){switch(s.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!t.MQTT5_PUBACK_PUBREC_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!t.MQTT5_PUBREL_PUBCOMP_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}e("_parseConfirmation: packet.reasonCode `%d`",s.reasonCode)}else s.reasonCode=0;if(s.length>3){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}}return!0}_parseDisconnect(){let s=this.packet;if(e("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(s.reasonCode=this._parseByte(),t.MQTT5_DISCONNECT_CODES[s.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):s.reasonCode=0;let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}return e("_parseDisconnect result: true"),!0}_parseAuth(){e("_parseAuth");let s=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(s.reasonCode=this._parseByte(),!t.MQTT5_AUTH_CODES[s.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let u=this._parseProperties();return Object.getOwnPropertyNames(u).length&&(s.properties=u),e("_parseAuth: result: true"),!0}_parseMessageId(){let s=this.packet;return s.messageId=this._parseNum(),s.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(e("_parseMessageId: packet.messageId %d",s.messageId),!0)}_parseString(s){let u=this._parseNum(),d=u+this._pos;if(u===-1||d>this._list.length||d>this.packet.length)return null;let p=this._list.toString("utf8",this._pos,d);return this._pos+=u,e("_parseString: result: %s",p),p}_parseStringPair(){return e("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let s=this._parseNum(),u=s+this._pos;if(s===-1||u>this._list.length||u>this.packet.length)return null;let d=this._list.slice(this._pos,u);return this._pos+=s,e("_parseBuffer: result: %o",d),d}_parseNum(){if(this._list.length-this._pos<2)return-1;let s=this._list.readUInt16BE(this._pos);return this._pos+=2,e("_parseNum: result: %s",s),s}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let s=this._list.readUInt32BE(this._pos);return this._pos+=4,e("_parse4ByteNum: result: %s",s),s}_parseVarByteNum(s){e("_parseVarByteNum");let u=4,d=0,p=1,g=0,f=!1,b,y=this._pos?this._pos:0;for(;d<u&&y+d<this._list.length;){if(b=this._list.readUInt8(y+d++),g+=p*(b&t.VARBYTEINT_MASK),p*=128,(b&t.VARBYTEINT_FIN_MASK)===0){f=!0;break}if(this._list.length<=d)break}return!f&&d===u&&this._list.length>=d&&this._emitError(new Error("Invalid variable byte integer")),y&&(this._pos+=d),f?s?f={bytes:d,value:g}:f=g:f=!1,e("_parseVarByteNum: result: %o",f),f}_parseByte(){let s;return this._pos<this._list.length&&(s=this._list.readUInt8(this._pos),this._pos++),e("_parseByte: result: %o",s),s}_parseByType(s){switch(e("_parseByType: type: %s",s),s){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){e("_parseProperties");let s=this._parseVarByteNum(),u=this._pos+s,d={};for(;this._pos<u;){let p=this._parseByte();if(!p)return this._emitError(new Error("Cannot parse property code type")),!1;let g=t.propertiesCodes[p];if(!g)return this._emitError(new Error("Unknown property")),!1;if(g==="userProperties"){d[g]||(d[g]=Object.create(null));let f=this._parseByType(t.propertiesTypes[g]);if(d[g][f.name])if(Array.isArray(d[g][f.name]))d[g][f.name].push(f.value);else{let b=d[g][f.name];d[g][f.name]=[b],d[g][f.name].push(f.value)}else d[g][f.name]=f.value;continue}d[g]?Array.isArray(d[g])?d[g].push(this._parseByType(t.propertiesTypes[g])):(d[g]=[d[g]],d[g].push(this._parseByType(t.propertiesTypes[g]))):d[g]=this._parseByType(t.propertiesTypes[g])}return d}_newPacket(){return e("_newPacket"),this.packet&&(this._list.consume(this.packet.length),e("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),e("_newPacket: new packet"),this.packet=new l,this._pos=0,!0}_emitError(s){e("_emitError",s),this.error=s,this.emit("error",s)}};h.exports=n}),Bl=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=65536,l={},t=o.isBuffer(o.from([1,2]).subarray(0,1));function e(u){let d=o.allocUnsafe(2);return d.writeUInt8(u>>8,0),d.writeUInt8(u&255,1),d}function n(){for(let u=0;u<a;u++)l[u]=e(u)}function r(u){let d=0,p=0,g=o.allocUnsafe(4);do d=u%128|0,u=u/128|0,u>0&&(d=d|128),g.writeUInt8(d,p++);while(u>0&&p<4);return u>0&&(p=0),t?g.subarray(0,p):g.slice(0,p)}function s(u){let d=o.allocUnsafe(4);return d.writeUInt32BE(u,0),d}h.exports={cache:l,generateCache:n,generateNumber:e,genBufVariableByteInt:r,generate4ByteBuffer:s}}),Ol=fe((i,h)=>{oe(),ae(),se(),typeof ke>"u"||!ke.version||ke.version.indexOf("v0.")===0||ke.version.indexOf("v1.")===0&&ke.version.indexOf("v1.8.")!==0?h.exports={nextTick:o}:h.exports=ke;function o(a,l,t,e){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,r,s;switch(n){case 0:case 1:return ke.nextTick(a);case 2:return ke.nextTick(function(){a.call(null,l)});case 3:return ke.nextTick(function(){a.call(null,l,t)});case 4:return ke.nextTick(function(){a.call(null,l,t,e)});default:for(r=new Array(n-1),s=0;s<r.length;)r[s++]=arguments[s];return ke.nextTick(function(){a.apply(null,r)})}}}),bo=fe((i,h)=>{oe(),ae(),se();var o=Ao(),{Buffer:a}=(Ve(),Be(We)),l=a.allocUnsafe(0),t=a.from([0]),e=Bl(),n=Ol().nextTick,r=at()("mqtt-packet:writeToStream"),s=e.cache,u=e.generateNumber,d=e.generateCache,p=e.genBufVariableByteInt,g=e.generate4ByteBuffer,f=le,b=!0;function y(K,M,Z){switch(r("generate called"),M.cork&&(M.cork(),n(_,M)),b&&(b=!1,d()),r("generate: packet.cmd: %s",K.cmd),K.cmd){case"connect":return A(K,M);case"connack":return w(K,M,Z);case"publish":return I(K,M,Z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return k(K,M,Z);case"subscribe":return E(K,M,Z);case"suback":return T(K,M,Z);case"unsubscribe":return O(K,M,Z);case"unsuback":return H(K,M,Z);case"pingreq":case"pingresp":return G(K,M);case"disconnect":return de(K,M,Z);case"auth":return U(K,M,Z);default:return M.destroy(new Error("Unknown command")),!1}}Object.defineProperty(y,"cacheNumbers",{get(){return f===le},set(K){K?((!s||Object.keys(s).length===0)&&(b=!0),f=le):(b=!1,f=pe)}});function _(K){K.uncork()}function A(K,M,Z){let V=K||{},j=V.protocolId||"MQTT",W=V.protocolVersion||4,ue=V.will,re=V.clean,x=V.keepalive||0,D=V.clientId||"",q=V.username,te=V.password,ee=V.properties;re===void 0&&(re=!0);let ie=0;if(typeof j!="string"&&!a.isBuffer(j))return M.destroy(new Error("Invalid protocolId")),!1;if(ie+=j.length+2,W!==3&&W!==4&&W!==5)return M.destroy(new Error("Invalid protocol version")),!1;if(ie+=1,(typeof D=="string"||a.isBuffer(D))&&(D||W>=4)&&(D||re))ie+=a.byteLength(D)+2;else{if(W<4)return M.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(re*1===0)return M.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!==0)return M.destroy(new Error("Invalid keepalive")),!1;ie+=2,ie+=1;let L,ne;if(W===5){if(L=he(M,ee),!L)return!1;ie+=L.length}if(ue){if(typeof ue!="object")return M.destroy(new Error("Invalid will")),!1;if(!ue.topic||typeof ue.topic!="string")return M.destroy(new Error("Invalid will topic")),!1;if(ie+=a.byteLength(ue.topic)+2,ie+=2,ue.payload)if(ue.payload.length>=0)typeof ue.payload=="string"?ie+=a.byteLength(ue.payload):ie+=ue.payload.length;else return M.destroy(new Error("Invalid will payload")),!1;if(ne={},W===5){if(ne=he(M,ue.properties),!ne)return!1;ie+=ne.length}}let ge=!1;if(q!=null)if(_e(q))ge=!0,ie+=a.byteLength(q)+2;else return M.destroy(new Error("Invalid username")),!1;if(te!=null){if(!ge)return M.destroy(new Error("Username is required to use password")),!1;if(_e(te))ie+=J(te)+2;else return M.destroy(new Error("Invalid password")),!1}M.write(o.CONNECT_HEADER),z(M,ie),Q(M,j),V.bridgeMode&&(W+=128),M.write(W===131?o.VERSION131:W===132?o.VERSION132:W===4?o.VERSION4:W===5?o.VERSION5:o.VERSION3);let Y=0;return Y|=q!=null?o.USERNAME_MASK:0,Y|=te!=null?o.PASSWORD_MASK:0,Y|=ue&&ue.retain?o.WILL_RETAIN_MASK:0,Y|=ue&&ue.qos?ue.qos<<o.WILL_QOS_SHIFT:0,Y|=ue?o.WILL_FLAG_MASK:0,Y|=re?o.CLEAN_SESSION_MASK:0,M.write(a.from([Y])),f(M,x),W===5&&L.write(),Q(M,D),ue&&(W===5&&ne.write(),F(M,ue.topic),Q(M,ue.payload)),q!=null&&Q(M,q),te!=null&&Q(M,te),!0}function w(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=V===5?j.reasonCode:j.returnCode,ue=j.properties,re=2;if(typeof W!="number")return M.destroy(new Error("Invalid return code")),!1;let x=null;if(V===5){if(x=he(M,ue),!x)return!1;re+=x.length}return M.write(o.CONNACK_HEADER),z(M,re),M.write(j.sessionPresent?o.SESSIONPRESENT_HEADER:t),M.write(a.from([W])),x?.write(),!0}function I(K,M,Z){r("publish: packet: %o",K);let V=Z?Z.protocolVersion:4,j=K||{},W=j.qos||0,ue=j.retain?o.RETAIN_MASK:0,re=j.topic,x=j.payload||l,D=j.messageId,q=j.properties,te=0;if(typeof re=="string")te+=a.byteLength(re)+2;else if(a.isBuffer(re))te+=re.length+2;else return M.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(x)?te+=x.length:te+=a.byteLength(x),W&&typeof D!="number")return M.destroy(new Error("Invalid messageId")),!1;W&&(te+=2);let ee=null;if(V===5){if(ee=he(M,q),!ee)return!1;te+=ee.length}return M.write(o.PUBLISH_HEADER[W][j.dup?1:0][ue?1:0]),z(M,te),f(M,J(re)),M.write(re),W>0&&f(M,D),ee?.write(),r("publish: payload: %o",x),M.write(x)}function k(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.cmd||"puback",ue=j.messageId,re=j.dup&&W==="pubrel"?o.DUP_MASK:0,x=0,D=j.reasonCode,q=j.properties,te=V===5?3:2;if(W==="pubrel"&&(x=1),typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;let ee=null;if(V===5&&typeof q=="object"){if(ee=P(M,q,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[W][x][re][0]),te===3&&(te+=D!==0?1:-1),z(M,te),f(M,ue),V===5&&te!==2&&M.write(a.from([D])),ee!==null?ee.write():te===4&&M.write(a.from([0])),!0}function E(K,M,Z){r("subscribe: packet: ");let V=Z?Z.protocolVersion:4,j=K||{},W=j.dup?o.DUP_MASK:0,ue=j.messageId,re=j.subscriptions,x=j.properties,D=0;if(typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;D+=2;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}if(typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){let ie=re[ee].topic,L=re[ee].qos;if(typeof ie!="string")return M.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof L!="number")return M.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(V===5){if(typeof(re[ee].nl||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(re[ee].rap||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let ne=re[ee].rh||0;if(typeof ne!="number"||ne>2)return M.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}D+=a.byteLength(ie)+2+1}else return M.destroy(new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",o.SUBSCRIBE_HEADER),M.write(o.SUBSCRIBE_HEADER[1][W?1:0][0]),z(M,D),f(M,ue),q!==null&&q.write();let te=!0;for(let ee of re){let ie=ee.topic,L=ee.qos,ne=+ee.nl,ge=+ee.rap,Y=ee.rh,Se;F(M,ie),Se=o.SUBSCRIBE_OPTIONS_QOS[L],V===5&&(Se|=ne?o.SUBSCRIBE_OPTIONS_NL:0,Se|=ge?o.SUBSCRIBE_OPTIONS_RAP:0,Se|=Y?o.SUBSCRIBE_OPTIONS_RH[Y]:0),te=M.write(a.from([Se]))}return te}function T(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.granted,re=j.properties,x=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(x+=2,typeof ue=="object"&&ue.length)for(let q=0;q<ue.length;q+=1){if(typeof ue[q]!="number")return M.destroy(new Error("Invalid qos vector")),!1;x+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let D=null;if(V===5){if(D=P(M,re,Z,x),!D)return!1;x+=D.length}return M.write(o.SUBACK_HEADER),z(M,x),f(M,W),D!==null&&D.write(),M.write(a.from(ue))}function O(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.unsubscriptions,x=j.properties,D=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(D+=2,typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){if(typeof re[ee]!="string")return M.destroy(new Error("Invalid unsubscriptions")),!1;D+=a.byteLength(re[ee])+2}else return M.destroy(new Error("Invalid unsubscriptions")),!1;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}M.write(o.UNSUBSCRIBE_HEADER[1][ue?1:0][0]),z(M,D),f(M,W),q!==null&&q.write();let te=!0;for(let ee=0;ee<re.length;ee++)te=F(M,re[ee]);return te}function H(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.granted,x=j.properties,D=j.cmd,q=0,te=2;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(V===5)if(typeof re=="object"&&re.length)for(let ie=0;ie<re.length;ie+=1){if(typeof re[ie]!="number")return M.destroy(new Error("Invalid qos vector")),!1;te+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let ee=null;if(V===5){if(ee=P(M,x,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[D][q][ue][0]),z(M,te),f(M,W),ee!==null&&ee.write(),V===5&&M.write(a.from(re)),!0}function G(K,M,Z){return M.write(o.EMPTY[K.cmd])}function de(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0,x=null;if(V===5){if(x=P(M,ue,Z,re),!x)return!1;re+=x.length}return M.write(a.from([o.codes.disconnect<<4])),z(M,re),V===5&&M.write(a.from([W])),x!==null&&x.write(),!0}function U(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0;V!==5&&M.destroy(new Error("Invalid mqtt version for auth packet"));let x=P(M,ue,Z,re);return x?(re+=x.length,M.write(a.from([o.codes.auth<<4])),z(M,re),M.write(a.from([W])),x!==null&&x.write(),!0):!1}var $={};function z(K,M){if(M>o.VARBYTEINT_MAX)return K.destroy(new Error(`Invalid variable byte integer: ${M}`)),!1;let Z=$[M];return Z||(Z=p(M),M<16384&&($[M]=Z)),r("writeVarByteInt: writing to stream: %o",Z),K.write(Z)}function F(K,M){let Z=a.byteLength(M);return f(K,Z),r("writeString: %s",M),K.write(M,"utf8")}function me(K,M,Z){F(K,M),F(K,Z)}function le(K,M){return r("writeNumberCached: number: %d",M),r("writeNumberCached: %o",s[M]),K.write(s[M])}function pe(K,M){let Z=u(M);return r("writeNumberGenerated: %o",Z),K.write(Z)}function we(K,M){let Z=g(M);return r("write4ByteNumber: %o",Z),K.write(Z)}function Q(K,M){typeof M=="string"?F(K,M):M?(f(K,M.length),K.write(M)):f(K,0)}function he(K,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){ye(K,{},0)}};let Z=0;function V(j,W){let ue=o.propertiesTypes[j],re=0;switch(ue){case"byte":{if(typeof W!="boolean")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"int8":{if(typeof W!="number"||W<0||W>255)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"binary":{if(W&&W===null)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(W)+2;break}case"int16":{if(typeof W!="number"||W<0||W>65535)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3;break}case"int32":{if(typeof W!="number"||W<0||W>4294967295)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=5;break}case"var":{if(typeof W!="number"||W<0||W>268435455)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(p(W));break}case"string":{if(typeof W!="string")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3+a.byteLength(W.toString());break}case"pair":{if(typeof W!="object")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=Object.getOwnPropertyNames(W).reduce((x,D)=>{let q=W[D];return Array.isArray(q)?x+=q.reduce((te,ee)=>(te+=3+a.byteLength(D.toString())+2+a.byteLength(ee.toString()),te),0):x+=3+a.byteLength(D.toString())+2+a.byteLength(W[D].toString()),x},0);break}default:return K.destroy(new Error(`Invalid property ${j}: ${W}`)),!1}return re}if(M)for(let j in M){let W=0,ue=0,re=M[j];if(re!==void 0){if(Array.isArray(re))for(let x=0;x<re.length;x++){if(ue=V(j,re[x]),!ue)return!1;W+=ue}else{if(ue=V(j,re),!ue)return!1;W=ue}if(!W)return!1;Z+=W}}return{length:a.byteLength(p(Z))+Z,write(){ye(K,M,Z)}}}function P(K,M,Z,V){let j=["reasonString","userProperties"],W=Z&&Z.properties&&Z.properties.maximumPacketSize?Z.properties.maximumPacketSize:0,ue=he(K,M);if(W)for(;V+ue.length>W;){let re=j.shift();if(re&&M[re])delete M[re],ue=he(K,M);else return!1}return ue}function ce(K,M,Z){switch(o.propertiesTypes[M]){case"byte":{K.write(a.from([o.properties[M]])),K.write(a.from([+Z]));break}case"int8":{K.write(a.from([o.properties[M]])),K.write(a.from([Z]));break}case"binary":{K.write(a.from([o.properties[M]])),Q(K,Z);break}case"int16":{K.write(a.from([o.properties[M]])),f(K,Z);break}case"int32":{K.write(a.from([o.properties[M]])),we(K,Z);break}case"var":{K.write(a.from([o.properties[M]])),z(K,Z);break}case"string":{K.write(a.from([o.properties[M]])),F(K,Z);break}case"pair":{Object.getOwnPropertyNames(Z).forEach(V=>{let j=Z[V];Array.isArray(j)?j.forEach(W=>{K.write(a.from([o.properties[M]])),me(K,V.toString(),W.toString())}):(K.write(a.from([o.properties[M]])),me(K,V.toString(),j.toString()))});break}default:return K.destroy(new Error(`Invalid property ${M} value: ${Z}`)),!1}}function ye(K,M,Z){z(K,Z);for(let V in M)if(Object.prototype.hasOwnProperty.call(M,V)&&M[V]!=null){let j=M[V];if(Array.isArray(j))for(let W=0;W<j.length;W++)ce(K,V,j[W]);else ce(K,V,j)}}function J(K){return K?K instanceof a?K.length:a.byteLength(K):0}function _e(K){return typeof K=="string"||K instanceof a}h.exports=y}),xl=fe((i,h)=>{oe(),ae(),se();var o=bo(),{EventEmitter:a}=(_t(),Be(gt)),{Buffer:l}=(Ve(),Be(We));function t(n,r){let s=new e;return o(n,s,r),s.concat()}var e=class extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(n){return this._array[this._i++]=n,!0}concat(){let n=0,r=new Array(this._array.length),s=this._array,u=0,d;for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?r[d]=s[d].length:r[d]=l.byteLength(s[d]),n+=r[d];let p=l.allocUnsafe(n);for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?(s[d].copy(p,u),u+=r[d]):(p.write(s[d],u),u+=r[d]);return p}destroy(n){n&&this.emit("error",n)}};h.exports=t}),Pl=fe(i=>{oe(),ae(),se(),i.parser=Il().parser,i.generate=xl(),i.writeToStream=bo()}),yo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let o=this.nextId++;return this.nextId===65536&&(this.nextId=1),o}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(o){return!0}deallocate(o){}clear(){}};i.default=h}),Rl=fe((i,h)=>{oe(),ae(),se(),h.exports=a;function o(t){return t instanceof Zt?Zt.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function a(t){if(t=t||{},t.circles)return l(t);let e=new Map;if(e.set(Date,d=>new Date(d)),e.set(Map,(d,p)=>new Map(r(Array.from(d),p))),e.set(Set,(d,p)=>new Set(r(Array.from(d),p))),t.constructorHandlers)for(let d of t.constructorHandlers)e.set(d[0],d[1]);let n=null;return t.proto?u:s;function r(d,p){let g=Object.keys(d),f=new Array(g.length);for(let b=0;b<g.length;b++){let y=g[b],_=d[y];typeof _!="object"||_===null?f[y]=_:_.constructor!==Object&&(n=e.get(_.constructor))?f[y]=n(_,p):ArrayBuffer.isView(_)?f[y]=o(_):f[y]=p(_)}return f}function s(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return r(d,s);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,s);let p={};for(let g in d){if(Object.hasOwnProperty.call(d,g)===!1)continue;let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,s):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=s(f)}return p}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return r(d,u);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,u);let p={};for(let g in d){let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,u):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=u(f)}return p}}function l(t){let e=[],n=[],r=new Map;if(r.set(Date,g=>new Date(g)),r.set(Map,(g,f)=>new Map(u(Array.from(g),f))),r.set(Set,(g,f)=>new Set(u(Array.from(g),f))),t.constructorHandlers)for(let g of t.constructorHandlers)r.set(g[0],g[1]);let s=null;return t.proto?p:d;function u(g,f){let b=Object.keys(g),y=new Array(b.length);for(let _=0;_<b.length;_++){let A=b[_],w=g[A];if(typeof w!="object"||w===null)y[A]=w;else if(w.constructor!==Object&&(s=r.get(w.constructor)))y[A]=s(w,f);else if(ArrayBuffer.isView(w))y[A]=o(w);else{let I=e.indexOf(w);I!==-1?y[A]=n[I]:y[A]=f(w)}}return y}function d(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,d);if(g.constructor!==Object&&(s=r.get(g.constructor)))return s(g,d);let f={};e.push(g),n.push(f);for(let b in g){if(Object.hasOwnProperty.call(g,b)===!1)continue;let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=r.get(y.constructor)))f[b]=s(y,d);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=d(y)}}return e.pop(),n.pop(),f}function p(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,p);if(g.constructor!==Object&&(s=r.get(g.constructor)))return s(g,p);let f={};e.push(g),n.push(f);for(let b in g){let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=r.get(y.constructor)))f[b]=s(y,p);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=p(y)}}return e.pop(),n.pop(),f}}}),Ml=fe((i,h)=>{oe(),ae(),se(),h.exports=Rl()()}),Ul=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.validateTopic=h,i.validateTopics=o;function h(a){let l=a.split("/");for(let t=0;t<l.length;t++)if(l[t]!=="+"){if(l[t]==="#")return t===l.length-1;if(l[t].indexOf("+")!==-1||l[t].indexOf("#")!==-1)return!1}return!0}function o(a){if(a.length===0)return"empty_topic_list";for(let l=0;l<a.length;l++)if(!h(a[l]))return a[l];return null}}),wo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=St(),o={objectMode:!0},a={clean:!0},l=class{constructor(t){this.options=t||{},this.options=Object.assign(Object.assign({},a),t),this._inflights=new Map}put(t,e){return this._inflights.set(t.messageId,t),e&&e(),this}createStream(){let t=new h.Readable(o),e=[],n=!1,r=0;return this._inflights.forEach((s,u)=>{e.push(s)}),t._read=()=>{!n&&r<e.length?t.push(e[r++]):t.push(null)},t.destroy=s=>{if(!n)return n=!0,setTimeout(()=>{t.emit("close")},0),t},t}del(t,e){let n=this._inflights.get(t.messageId);return n?(this._inflights.delete(t.messageId),e(null,n)):e&&e(new Error("missing packet")),this}get(t,e){let n=this._inflights.get(t.messageId);return n?e(null,n):e&&e(new Error("missing packet")),this}close(t){this.options.clean&&(this._inflights=null),t&&t()}};i.default=l}),Dl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=[0,16,128,131,135,144,145,151,153],o=(a,l,t)=>{a.log("handlePublish: packet %o",l),t=typeof t<"u"?t:a.noop;let e=l.topic.toString(),n=l.payload,{qos:r}=l,{messageId:s}=l,{options:u}=a;if(a.options.protocolVersion===5){let d;if(l.properties&&(d=l.properties.topicAlias),typeof d<"u")if(e.length===0)if(d>0&&d<=65535){let p=a.topicAliasRecv.getTopicByAlias(d);if(p)e=p,a.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",e,d);else{a.log("handlePublish :: unregistered topic alias. alias: %d",d),a.emit("error",new Error("Received unregistered Topic Alias"));return}}else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}else if(a.topicAliasRecv.put(e,d))a.log("handlePublish :: registered topic: %s - alias: %d",e,d);else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(a.log("handlePublish: qos %d",r),r){case 2:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for pubrec"));p?a._sendPacket({cmd:"pubrec",messageId:s,reasonCode:p},t):a.incomingStore.put(l,()=>{a._sendPacket({cmd:"pubrec",messageId:s},t)})});break}case 1:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for puback"));p||a.emit("message",e,n,l),a.handleMessage(l,g=>{if(g)return t&&t(g);a._sendPacket({cmd:"puback",messageId:s,reasonCode:p},t)})});break}case 0:a.emit("message",e,n,l),a.handleMessage(l,t);break;default:a.log("handlePublish: unknown QoS. Doing nothing.");break}};i.default=o}),Ll=fe((i,h)=>{h.exports={version:"5.13.1"}}),Dt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.MQTTJS_VERSION=i.nextTick=i.ErrorWithSubackPacket=i.ErrorWithReasonCode=void 0,i.applyMixin=a;var h=class Vs extends Error{constructor(t,e){super(t),this.code=e,Object.setPrototypeOf(this,Vs.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};i.ErrorWithReasonCode=h;var o=class Qs extends Error{constructor(t,e){super(t),this.packet=e,Object.setPrototypeOf(this,Qs.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};i.ErrorWithSubackPacket=o;function a(l,t,e=!1){var n;let r=[t];for(;;){let s=r[0],u=Object.getPrototypeOf(s);if(u?.prototype)r.unshift(u);else break}for(let s of r)for(let u of Object.getOwnPropertyNames(s.prototype))(e||u!=="constructor")&&Object.defineProperty(l.prototype,u,(n=Object.getOwnPropertyDescriptor(s.prototype,u))!==null&&n!==void 0?n:Object.create(null))}i.nextTick=typeof ke?.nextTick=="function"?ke.nextTick:l=>{setTimeout(l,0)},i.MQTTJS_VERSION=Ll().version}),nr=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=void 0;var h=Dt();i.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var o=(a,l)=>{let{messageId:t}=l,e=l.cmd,n=null,r=a.outgoing[t]?a.outgoing[t].cb:null,s=null;if(!r){a.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(a.log("_handleAck :: packet type",e),e){case"pubcomp":case"puback":{let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(t,()=>{r(s,l)})):a._removeOutgoingAndStoreMessage(t,r);break}case"pubrec":{n={cmd:"pubrel",qos:2,messageId:t};let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(t,()=>{r(s,l)})):a._sendPacket(n);break}case"suback":{delete a.outgoing[t],a.messageIdProvider.deallocate(t);let u=l.granted;for(let d=0;d<u.length;d++){let p=u[d];if((p&128)!==0){s=new Error(`Subscribe error: ${i.ReasonCodes[p]}`),s.code=p;let g=a.messageIdToTopic[t];g&&g.forEach(f=>{delete a._resubscribeTopics[f]})}}delete a.messageIdToTopic[t],a._invokeStoreProcessingQueue(),r(s,l);break}case"unsuback":{delete a.outgoing[t],a.messageIdProvider.deallocate(t),a._invokeStoreProcessingQueue(),r(null,l);break}default:a.emit("error",new Error("unrecognized packet type"))}a.disconnecting&&Object.keys(a.outgoing).length===0&&a.emit("outgoingEmpty")};i.default=o}),Nl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Dt(),o=nr(),a=(l,t)=>{let{options:e}=l,n=e.protocolVersion,r=n===5?t.reasonCode:t.returnCode;if(n!==5){let s=new h.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${n}`,r);l.emit("error",s);return}l.handleAuth(t,(s,u)=>{if(s){l.emit("error",s);return}if(r===24)l.reconnecting=!1,l._sendPacket(u);else{let d=new h.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[r]}`,r);l.emit("error",d)}})};i.default=a}),Fl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.LRUCache=void 0;var h=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,o=new Set,a=typeof ke=="object"&&ke?ke:{},l=(g,f,b,y)=>{typeof a.emitWarning=="function"?a.emitWarning(g,f,b,y):console.error(`[${b}] ${f}: ${g}`)},t=globalThis.AbortController,e=globalThis.AbortSignal;if(typeof t>"u"){e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(b,y){this._onabort.push(y)}},t=class{constructor(){f()}signal=new e;abort(b){if(!this.signal.aborted){this.signal.reason=b,this.signal.aborted=!0;for(let y of this.signal._onabort)y(b);this.signal.onabort?.(b)}}};let g=a.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",f=()=>{g&&(g=!1,l("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",f))}}var n=g=>!o.has(g),r=g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),s=g=>r(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(g){super(g),this.fill(0)}},d=class $t{heap;length;static#l=!1;static create(f){let b=s(f);if(!b)return[];$t.#l=!0;let y=new $t(f,b);return $t.#l=!1,y}constructor(f,b){if(!$t.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new b(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},p=class Ks{#l;#h;#g;#m;#O;#x;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#A;#n;#r;#e;#u;#f;#a;#o;#b;#s;#y;#w;#d;#v;#k;#c;static unsafeExposeInternals(f){return{starts:f.#w,ttls:f.#d,sizes:f.#y,keyMap:f.#n,keyList:f.#r,valList:f.#e,next:f.#u,prev:f.#f,get head(){return f.#a},get tail(){return f.#o},free:f.#b,isBackgroundFetch:b=>f.#t(b),backgroundFetch:(b,y,_,A)=>f.#M(b,y,_,A),moveToTail:b=>f.#B(b),indexes:b=>f.#_(b),rindexes:b=>f.#E(b),isStale:b=>f.#p(b)}}get max(){return this.#l}get maxSize(){return this.#h}get calculatedSize(){return this.#A}get size(){return this.#i}get fetchMethod(){return this.#O}get memoMethod(){return this.#x}get dispose(){return this.#g}get disposeAfter(){return this.#m}constructor(f){let{max:b=0,ttl:y,ttlResolution:_=1,ttlAutopurge:A,updateAgeOnGet:w,updateAgeOnHas:I,allowStale:k,dispose:E,disposeAfter:T,noDisposeOnSet:O,noUpdateTTL:H,maxSize:G=0,maxEntrySize:de=0,sizeCalculation:U,fetchMethod:$,memoMethod:z,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:me,allowStaleOnFetchRejection:le,allowStaleOnFetchAbort:pe,ignoreFetchAbort:we}=f;if(b!==0&&!r(b))throw new TypeError("max option must be a nonnegative integer");let Q=b?s(b):Array;if(!Q)throw new Error("invalid max value: "+b);if(this.#l=b,this.#h=G,this.maxEntrySize=de||this.#h,this.sizeCalculation=U,this.sizeCalculation){if(!this.#h&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(z!==void 0&&typeof z!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#x=z,$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=$,this.#k=!!$,this.#n=new Map,this.#r=new Array(b).fill(void 0),this.#e=new Array(b).fill(void 0),this.#u=new Q(b),this.#f=new Q(b),this.#a=0,this.#o=0,this.#b=d.create(b),this.#i=0,this.#A=0,typeof E=="function"&&(this.#g=E),typeof T=="function"?(this.#m=T,this.#s=[]):(this.#m=void 0,this.#s=void 0),this.#v=!!this.#g,this.#c=!!this.#m,this.noDisposeOnSet=!!O,this.noUpdateTTL=!!H,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!le,this.allowStaleOnFetchAbort=!!pe,this.ignoreFetchAbort=!!we,this.maxEntrySize!==0){if(this.#h!==0&&!r(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!r(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!k,this.noDeleteOnStaleGet=!!me,this.updateAgeOnGet=!!w,this.updateAgeOnHas=!!I,this.ttlResolution=r(_)||_===0?_:1,this.ttlAutopurge=!!A,this.ttl=y||0,this.ttl){if(!r(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#l===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#h){let he="LRU_CACHE_UNBOUNDED";n(he)&&(o.add(he),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",he,Ks))}}getRemainingTTL(f){return this.#n.has(f)?1/0:0}#U(){let f=new u(this.#l),b=new u(this.#l);this.#d=f,this.#w=b,this.#D=(A,w,I=h.now())=>{if(b[A]=w!==0?I:0,f[A]=w,w!==0&&this.ttlAutopurge){let k=setTimeout(()=>{this.#p(A)&&this.#S(this.#r[A],"expire")},w+1);k.unref&&k.unref()}},this.#T=A=>{b[A]=f[A]!==0?h.now():0},this.#C=(A,w)=>{if(f[w]){let I=f[w],k=b[w];if(!I||!k)return;A.ttl=I,A.start=k,A.now=y||_();let E=A.now-k;A.remainingTTL=I-E}};let y=0,_=()=>{let A=h.now();if(this.ttlResolution>0){y=A;let w=setTimeout(()=>y=0,this.ttlResolution);w.unref&&w.unref()}return A};this.getRemainingTTL=A=>{let w=this.#n.get(A);if(w===void 0)return 0;let I=f[w],k=b[w];if(!I||!k)return 1/0;let E=(y||_())-k;return I-E},this.#p=A=>{let w=b[A],I=f[A];return!!I&&!!w&&(y||_())-w>I}}#T=()=>{};#C=()=>{};#D=()=>{};#p=()=>!1;#W(){let f=new u(this.#l);this.#A=0,this.#y=f,this.#I=b=>{this.#A-=f[b],f[b]=0},this.#L=(b,y,_,A)=>{if(this.#t(y))return 0;if(!r(_))if(A){if(typeof A!="function")throw new TypeError("sizeCalculation must be a function");if(_=A(y,b),!r(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#P=(b,y,_)=>{if(f[b]=y,this.#h){let A=this.#h-f[b];for(;this.#A>A;)this.#R(!0)}this.#A+=f[b],_&&(_.entrySize=y,_.totalCalculatedSize=this.#A)}}#I=f=>{};#P=(f,b,y)=>{};#L=(f,b,y,_)=>{if(y||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#o;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#a));)b=this.#f[b]}*#E({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#a;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#o));)b=this.#u[b]}#N(f){return f!==void 0&&this.#n.get(this.#r[f])===f}*entries(){for(let f of this.#_())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*rentries(){for(let f of this.#E())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*keys(){for(let f of this.#_()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*rkeys(){for(let f of this.#E()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*values(){for(let f of this.#_())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}*rvalues(){for(let f of this.#E())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(f,b={}){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;if(A!==void 0&&f(A,this.#r[y],this))return this.get(this.#r[y],b)}}forEach(f,b=this){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}rforEach(f,b=this){for(let y of this.#E()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}purgeStale(){let f=!1;for(let b of this.#E({allowStale:!0}))this.#p(b)&&(this.#S(this.#r[b],"expire"),f=!0);return f}info(f){let b=this.#n.get(f);if(b===void 0)return;let y=this.#e[b],_=this.#t(y)?y.__staleWhileFetching:y;if(_===void 0)return;let A={value:_};if(this.#d&&this.#w){let w=this.#d[b],I=this.#w[b];if(w&&I){let k=w-(h.now()-I);A.ttl=k,A.start=Date.now()}}return this.#y&&(A.size=this.#y[b]),A}dump(){let f=[];for(let b of this.#_({allowStale:!0})){let y=this.#r[b],_=this.#e[b],A=this.#t(_)?_.__staleWhileFetching:_;if(A===void 0||y===void 0)continue;let w={value:A};if(this.#d&&this.#w){w.ttl=this.#d[b];let I=h.now()-this.#w[b];w.start=Math.floor(Date.now()-I)}this.#y&&(w.size=this.#y[b]),f.unshift([y,w])}return f}load(f){this.clear();for(let[b,y]of f){if(y.start){let _=Date.now()-y.start;y.start=h.now()-_}this.set(b,y.value,y)}}set(f,b,y={}){if(b===void 0)return this.delete(f),this;let{ttl:_=this.ttl,start:A,noDisposeOnSet:w=this.noDisposeOnSet,sizeCalculation:I=this.sizeCalculation,status:k}=y,{noUpdateTTL:E=this.noUpdateTTL}=y,T=this.#L(f,b,y.size||0,I);if(this.maxEntrySize&&T>this.maxEntrySize)return k&&(k.set="miss",k.maxEntrySizeExceeded=!0),this.#S(f,"set"),this;let O=this.#i===0?void 0:this.#n.get(f);if(O===void 0)O=this.#i===0?this.#o:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#R(!1):this.#i,this.#r[O]=f,this.#e[O]=b,this.#n.set(f,O),this.#u[this.#o]=O,this.#f[O]=this.#o,this.#o=O,this.#i++,this.#P(O,T,k),k&&(k.set="add"),E=!1;else{this.#B(O);let H=this.#e[O];if(b!==H){if(this.#k&&this.#t(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:G}=H;G!==void 0&&!w&&(this.#v&&this.#g?.(G,f,"set"),this.#c&&this.#s?.push([G,f,"set"]))}else w||(this.#v&&this.#g?.(H,f,"set"),this.#c&&this.#s?.push([H,f,"set"]));if(this.#I(O),this.#P(O,T,k),this.#e[O]=b,k){k.set="replace";let G=H&&this.#t(H)?H.__staleWhileFetching:H;G!==void 0&&(k.oldValue=G)}}else k&&(k.set="update")}if(_!==0&&!this.#d&&this.#U(),this.#d&&(E||this.#D(O,_,A),k&&this.#C(k,O)),!w&&this.#c&&this.#s){let H=this.#s,G;for(;G=H?.shift();)this.#m?.(...G)}return this}pop(){try{for(;this.#i;){let f=this.#e[this.#a];if(this.#R(!0),this.#t(f)){if(f.__staleWhileFetching)return f.__staleWhileFetching}else if(f!==void 0)return f}}finally{if(this.#c&&this.#s){let f=this.#s,b;for(;b=f?.shift();)this.#m?.(...b)}}}#R(f){let b=this.#a,y=this.#r[b],_=this.#e[b];return this.#k&&this.#t(_)?_.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(_,y,"evict"),this.#c&&this.#s?.push([_,y,"evict"])),this.#I(b),f&&(this.#r[b]=void 0,this.#e[b]=void 0,this.#b.push(b)),this.#i===1?(this.#a=this.#o=0,this.#b.length=0):this.#a=this.#u[b],this.#n.delete(y),this.#i--,b}has(f,b={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:_}=b,A=this.#n.get(f);if(A!==void 0){let w=this.#e[A];if(this.#t(w)&&w.__staleWhileFetching===void 0)return!1;if(this.#p(A))_&&(_.has="stale",this.#C(_,A));else return y&&this.#T(A),_&&(_.has="hit",this.#C(_,A)),!0}else _&&(_.has="miss");return!1}peek(f,b={}){let{allowStale:y=this.allowStale}=b,_=this.#n.get(f);if(_===void 0||!y&&this.#p(_))return;let A=this.#e[_];return this.#t(A)?A.__staleWhileFetching:A}#M(f,b,y,_){let A=b===void 0?void 0:this.#e[b];if(this.#t(A))return A;let w=new t,{signal:I}=y;I?.addEventListener("abort",()=>w.abort(I.reason),{signal:w.signal});let k={signal:w.signal,options:y,context:_},E=(U,$=!1)=>{let{aborted:z}=w.signal,F=y.ignoreFetchAbort&&U!==void 0;if(y.status&&(z&&!$?(y.status.fetchAborted=!0,y.status.fetchError=w.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),z&&!F&&!$)return O(w.signal.reason);let me=G;return this.#e[b]===G&&(U===void 0?me.__staleWhileFetching?this.#e[b]=me.__staleWhileFetching:this.#S(f,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(f,U,k.options))),U},T=U=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=U),O(U)),O=U=>{let{aborted:$}=w.signal,z=$&&y.allowStaleOnFetchAbort,F=z||y.allowStaleOnFetchRejection,me=F||y.noDeleteOnFetchRejection,le=G;if(this.#e[b]===G&&(!me||le.__staleWhileFetching===void 0?this.#S(f,"fetch"):z||(this.#e[b]=le.__staleWhileFetching)),F)return y.status&&le.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),le.__staleWhileFetching;if(le.__returned===le)throw U},H=(U,$)=>{let z=this.#O?.(f,A,k);z&&z instanceof Promise&&z.then(F=>U(F===void 0?void 0:F),$),w.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(U(void 0),y.allowStaleOnFetchAbort&&(U=F=>E(F,!0)))})};y.status&&(y.status.fetchDispatched=!0);let G=new Promise(H).then(E,T),de=Object.assign(G,{__abortController:w,__staleWhileFetching:A,__returned:void 0});return b===void 0?(this.set(f,de,{...k.options,status:void 0}),b=this.#n.get(f)):this.#e[b]=de,de}#t(f){if(!this.#k)return!1;let b=f;return!!b&&b instanceof Promise&&b.hasOwnProperty("__staleWhileFetching")&&b.__abortController instanceof t}async fetch(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,ttl:w=this.ttl,noDisposeOnSet:I=this.noDisposeOnSet,size:k=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:T=this.noUpdateTTL,noDeleteOnFetchRejection:O=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:de=this.allowStaleOnFetchAbort,context:U,forceRefresh:$=!1,status:z,signal:F}=b;if(!this.#k)return z&&(z.fetch="get"),this.get(f,{allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,status:z});let me={allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,ttl:w,noDisposeOnSet:I,size:k,sizeCalculation:E,noUpdateTTL:T,noDeleteOnFetchRejection:O,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:de,ignoreFetchAbort:G,status:z,signal:F},le=this.#n.get(f);if(le===void 0){z&&(z.fetch="miss");let pe=this.#M(f,le,me,U);return pe.__returned=pe}else{let pe=this.#e[le];if(this.#t(pe)){let P=y&&pe.__staleWhileFetching!==void 0;return z&&(z.fetch="inflight",P&&(z.returnedStale=!0)),P?pe.__staleWhileFetching:pe.__returned=pe}let we=this.#p(le);if(!$&&!we)return z&&(z.fetch="hit"),this.#B(le),_&&this.#T(le),z&&this.#C(z,le),pe;let Q=this.#M(f,le,me,U),he=Q.__staleWhileFetching!==void 0&&y;return z&&(z.fetch=we?"stale":"refresh",he&&we&&(z.returnedStale=!0)),he?Q.__staleWhileFetching:Q.__returned=Q}}async forceFetch(f,b={}){let y=await this.fetch(f,b);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(f,b={}){let y=this.#x;if(!y)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:A,...w}=b,I=this.get(f,w);if(!A&&I!==void 0)return I;let k=y(f,I,{options:w,context:_});return this.set(f,k,w),k}get(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,status:w}=b,I=this.#n.get(f);if(I!==void 0){let k=this.#e[I],E=this.#t(k);return w&&this.#C(w,I),this.#p(I)?(w&&(w.get="stale"),E?(w&&y&&k.__staleWhileFetching!==void 0&&(w.returnedStale=!0),y?k.__staleWhileFetching:void 0):(A||this.#S(f,"expire"),w&&y&&(w.returnedStale=!0),y?k:void 0)):(w&&(w.get="hit"),E?k.__staleWhileFetching:(this.#B(I),_&&this.#T(I),k))}else w&&(w.get="miss")}#F(f,b){this.#f[b]=f,this.#u[f]=b}#B(f){f!==this.#o&&(f===this.#a?this.#a=this.#u[f]:this.#F(this.#f[f],this.#u[f]),this.#F(this.#o,f),this.#o=f)}delete(f){return this.#S(f,"delete")}#S(f,b){let y=!1;if(this.#i!==0){let _=this.#n.get(f);if(_!==void 0)if(y=!0,this.#i===1)this.#j(b);else{this.#I(_);let A=this.#e[_];if(this.#t(A)?A.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(A,f,b),this.#c&&this.#s?.push([A,f,b])),this.#n.delete(f),this.#r[_]=void 0,this.#e[_]=void 0,_===this.#o)this.#o=this.#f[_];else if(_===this.#a)this.#a=this.#u[_];else{let w=this.#f[_];this.#u[w]=this.#u[_];let I=this.#u[_];this.#f[I]=this.#f[_]}this.#i--,this.#b.push(_)}}if(this.#c&&this.#s?.length){let _=this.#s,A;for(;A=_?.shift();)this.#m?.(...A)}return y}clear(){return this.#j("delete")}#j(f){for(let b of this.#E({allowStale:!0})){let y=this.#e[b];if(this.#t(y))y.__abortController.abort(new Error("deleted"));else{let _=this.#r[b];this.#v&&this.#g?.(y,_,f),this.#c&&this.#s?.push([y,_,f])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#y&&this.#y.fill(0),this.#a=0,this.#o=0,this.#b.length=0,this.#A=0,this.#i=0,this.#c&&this.#s){let b=this.#s,y;for(;y=b?.shift();)this.#m?.(...y)}}};i.LRUCache=p}),lt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.ContainerIterator=i.Container=i.Base=void 0;var h=class{constructor(l=0){this.iteratorType=l}equals(l){return this.o===l.o}};i.ContainerIterator=h;var o=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};i.Base=o;var a=class extends o{};i.Container=a}),jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.S=[];let t=this;l.forEach(function(e){t.push(e)})}clear(){this.i=0,this.S=[]}push(l){return this.S.push(l),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},a=o;i.default=a}),Wl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.j=0,this.q=[];let t=this;l.forEach(function(e){t.push(e)})}clear(){this.q=[],this.i=this.j=0}push(l){let t=this.q.length;if(this.j/t>.5&&this.j+this.i>=t&&t>4096){let e=this.i;for(let n=0;n<e;++n)this.q[n]=this.q[this.j+n];this.j=0,this.q[this.i]=l}else this.q[this.j+this.i]=l;return++this.i}pop(){if(this.i===0)return;let l=this.q[this.j++];return this.i-=1,l}front(){if(this.i!==0)return this.q[this.j]}},a=o;i.default=a}),Vl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[],t=function(n,r){return n>r?-1:n<r?1:0},e=!0){if(super(),this.v=t,Array.isArray(l))this.C=e?[...l]:l;else{this.C=[];let r=this;l.forEach(function(s){r.C.push(s)})}this.i=this.C.length;let n=this.i>>1;for(let r=this.i-1>>1;r>=0;--r)this.k(r,n)}m(l){let t=this.C[l];for(;l>0;){let e=l-1>>1,n=this.C[e];if(this.v(n,t)<=0)break;this.C[l]=n,l=e}this.C[l]=t}k(l,t){let e=this.C[l];for(;l<t;){let n=l<<1|1,r=n+1,s=this.C[n];if(r<this.i&&this.v(s,this.C[r])>0&&(n=r,s=this.C[r]),this.v(s,e)>=0)break;this.C[l]=s,l=n}this.C[l]=e}clear(){this.i=0,this.C.length=0}push(l){this.C.push(l),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let l=this.C[0],t=this.C.pop();return this.i-=1,this.i&&(this.C[0]=t,this.k(0,this.i>>1)),l}top(){return this.C[0]}find(l){return this.C.indexOf(l)>=0}remove(l){let t=this.C.indexOf(l);return t<0?!1:(t===0?this.pop():t===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(t,1,this.C.pop()),this.i-=1,this.m(t),this.k(t,this.i>>1)),!0)}updateItem(l){let t=this.C.indexOf(l);return t<0?!1:(this.m(t),this.k(t,this.i>>1),!0)}toArray(){return[...this.C]}},a=o;i.default=a}),jn=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Container{},a=o;i.default=a}),ut=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.throwIteratorAccessError=h;function h(){throw new RangeError("Iterator access denied!")}}),vo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.RandomIterator=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(l,t){super(t),this.o=l,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,o.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,o.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,o.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,o.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(l){this.container.setElementByPos(this.o,l)}};i.RandomIterator=a}),Ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=vo();function a(n){return n&&n.t?n:{default:n}}var l=class Hs extends o.RandomIterator{constructor(r,s,u){super(r,u),this.container=s}copy(){return new Hs(this.o,this.container,this.iteratorType)}},t=class extends h.default{constructor(n=[],r=!0){if(super(),Array.isArray(n))this.J=r?[...n]:n,this.i=n.length;else{this.J=[];let s=this;n.forEach(function(u){s.pushBack(u)})}}clear(){this.i=0,this.J.length=0}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J[n]}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J.splice(n,1),this.i-=1,this.i}eraseElementByValue(n){let r=0;for(let s=0;s<this.i;++s)this.J[s]!==n&&(this.J[r++]=this.J[s]);return this.i=this.J.length=r,this.i}eraseElementByIterator(n){let r=n.o;return n=n.next(),this.eraseElementByPos(r),n}pushBack(n){return this.J.push(n),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;this.J[n]=r}insert(n,r,s=1){if(n<0||n>this.i)throw new RangeError;return this.J.splice(n,0,...new Array(s).fill(r)),this.i+=s,this.i}find(n){for(let r=0;r<this.i;++r)if(this.J[r]===n)return new l(r,this);return this.end()}reverse(){this.J.reverse()}unique(){let n=1;for(let r=1;r<this.i;++r)this.J[r]!==this.J[r-1]&&(this.J[n++]=this.J[r]);return this.i=this.J.length=n,this.i}sort(n){this.J.sort(n)}forEach(n){for(let r=0;r<this.i;++r)n(this.J[r],r,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},e=t;i.default=e}),Kl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(jn()),o=lt(),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class qs extends o.ContainerIterator{constructor(s,u,d,p){super(p),this.o=s,this.h=u,this.container=d,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l}set pointer(s){this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l=s}copy(){return new qs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let s=this;r.forEach(function(u){s.pushBack(u)})}V(r){let{L:s,B:u}=r;s.B=u,u.L=s,r===this.p&&(this.p=u),r===this._&&(this._=s),this.i-=1}G(r,s){let u=s.B,d={l:r,L:s,B:u};s.B=d,u.L=d,s===this.h&&(this.p=d),u===this.h&&(this._=d),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return s.l}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return this.V(s),this.i}eraseElementByValue(r){let s=this.p;for(;s!==this.h;)s.l===r&&this.V(s),s=s.B;return this.i}eraseElementByIterator(r){let s=r.o;return s===this.h&&(0,a.throwIteratorAccessError)(),r=r.next(),this.V(s),r}pushBack(r){return this.G(r,this._),this.i}popBack(){if(this.i===0)return;let r=this._.l;return this.V(this._),r}pushFront(r){return this.G(r,this.h),this.i}popFront(){if(this.i===0)return;let r=this.p.l;return this.V(this.p),r}setElementByPos(r,s){if(r<0||r>this.i-1)throw new RangeError;let u=this.p;for(;r--;)u=u.B;u.l=s}insert(r,s,u=1){if(r<0||r>this.i)throw new RangeError;if(u<=0)return this.i;if(r===0)for(;u--;)this.pushFront(s);else if(r===this.i)for(;u--;)this.pushBack(s);else{let d=this.p;for(let g=1;g<r;++g)d=d.B;let p=d.B;for(this.i+=u;u--;)d.B={l:s,L:d},d.B.L=d,d=d.B;d.B=p,p.L=d}return this.i}find(r){let s=this.p;for(;s!==this.h;){if(s.l===r)return new t(s,this.h,this);s=s.B}return this.end()}reverse(){if(this.i<=1)return;let r=this.p,s=this._,u=0;for(;u<<1<this.i;){let d=r.l;r.l=s.l,s.l=d,r=r.B,s=s.L,u+=1}}unique(){if(this.i<=1)return this.i;let r=this.p;for(;r!==this.h;){let s=r;for(;s.B!==this.h&&s.l===s.B.l;)s=s.B,this.i-=1;r.B=s.B,r.B.L=r,r=r.B}return this.i}sort(r){if(this.i<=1)return;let s=[];this.forEach(function(d){s.push(d)}),s.sort(r);let u=this.p;s.forEach(function(d){u.l=d,u=u.B})}merge(r){let s=this;if(this.i===0)r.forEach(function(u){s.pushBack(u)});else{let u=this.p;r.forEach(function(d){for(;u!==s.h&&u.l<=d;)u=u.B;s.G(d,u.L)})}return this.i}forEach(r){let s=this.p,u=0;for(;s!==this.h;)r(s.l,u++,this),s=s.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let r=this.p;for(;r!==this.h;)yield r.l,r=r.B}).bind(this)()}},n=e;i.default=n}),Hl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=vo();function a(n){return n&&n.t?n:{default:n}}var l=class $s extends o.RandomIterator{constructor(r,s,u){super(r,u),this.container=s}copy(){return new $s(this.o,this.container,this.iteratorType)}},t=class extends h.default{constructor(n=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let s=(()=>{if(typeof n.length=="number")return n.length;if(typeof n.size=="number")return n.size;if(typeof n.size=="function")return n.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=r,this.P=Math.max(Math.ceil(s/this.F),1);for(let p=0;p<this.P;++p)this.A.push(new Array(this.F));let u=Math.ceil(s/this.F);this.j=this.R=(this.P>>1)-(u>>1),this.D=this.N=this.F-s%this.F>>1;let d=this;n.forEach(function(p){d.pushBack(p)})}T(){let n=[],r=Math.max(this.P>>1,1);for(let s=0;s<r;++s)n[s]=new Array(this.F);for(let s=this.j;s<this.P;++s)n[n.length]=this.A[s];for(let s=0;s<this.R;++s)n[n.length]=this.A[s];n[n.length]=[...this.A[this.R]],this.j=r,this.R=n.length-1;for(let s=0;s<r;++s)n[n.length]=new Array(this.F);this.A=n,this.P=n.length}O(n){let r=this.D+n+1,s=r%this.F,u=s-1,d=this.j+(r-s)/this.F;return s===0&&(d-=1),d%=this.P,u<0&&(u+=this.F),{curNodeBucketIndex:d,curNodePointerIndex:u}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(n){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=n,this.i}popBack(){if(this.i===0)return;let n=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,n}pushFront(n){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=n,this.i}popFront(){if(this.i===0)return;let n=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,n}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:s}=this.O(n);return this.A[r][s]}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:s,curNodePointerIndex:u}=this.O(n);this.A[s][u]=r}insert(n,r,s=1){if(n<0||n>this.i)throw new RangeError;if(n===0)for(;s--;)this.pushFront(r);else if(n===this.i)for(;s--;)this.pushBack(r);else{let u=[];for(let d=n;d<this.i;++d)u.push(this.getElementByPos(d));this.cut(n-1);for(let d=0;d<s;++d)this.pushBack(r);for(let d=0;d<u.length;++d)this.pushBack(u[d])}return this.i}cut(n){if(n<0)return this.clear(),0;let{curNodeBucketIndex:r,curNodePointerIndex:s}=this.O(n);return this.R=r,this.N=s,this.i=n+1,this.i}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;if(n===0)this.popFront();else if(n===this.i-1)this.popBack();else{let r=[];for(let u=n+1;u<this.i;++u)r.push(this.getElementByPos(u));this.cut(n),this.popBack();let s=this;r.forEach(function(u){s.pushBack(u)})}return this.i}eraseElementByValue(n){if(this.i===0)return 0;let r=[];for(let u=0;u<this.i;++u){let d=this.getElementByPos(u);d!==n&&r.push(d)}let s=r.length;for(let u=0;u<s;++u)this.setElementByPos(u,r[u]);return this.cut(s-1)}eraseElementByIterator(n){let r=n.o;return this.eraseElementByPos(r),n=n.next(),n}find(n){for(let r=0;r<this.i;++r)if(this.getElementByPos(r)===n)return new l(r,this);return this.end()}reverse(){let n=0,r=this.i-1;for(;n<r;){let s=this.getElementByPos(n);this.setElementByPos(n,this.getElementByPos(r)),this.setElementByPos(r,s),n+=1,r-=1}}unique(){if(this.i<=1)return this.i;let n=1,r=this.getElementByPos(0);for(let s=1;s<this.i;++s){let u=this.getElementByPos(s);u!==r&&(r=u,this.setElementByPos(n++,u))}for(;this.i>n;)this.popBack();return this.i}sort(n){let r=[];for(let s=0;s<this.i;++s)r.push(this.getElementByPos(s));r.sort(n);for(let s=0;s<this.i;++s)this.setElementByPos(s,r[s])}shrinkToFit(){if(this.i===0)return;let n=[];this.forEach(function(r){n.push(r)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let r=0;r<this.P;++r)this.A.push(new Array(this.F));for(let r=0;r<n.length;++r)this.pushBack(n[r])}forEach(n){for(let r=0;r<this.i;++r)n(this.getElementByPos(r),r,this)}[Symbol.iterator](){return(function*(){for(let n=0;n<this.i;++n)yield this.getElementByPos(n)}).bind(this)()}},e=t;i.default=e}),ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.TreeNodeEnableIndex=i.TreeNode=void 0;var h=class{constructor(a,l){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=a,this.l=l}L(){let a=this;if(a.ee===1&&a.tt.tt===a)a=a.W;else if(a.U)for(a=a.U;a.W;)a=a.W;else{let l=a.tt;for(;l.U===a;)a=l,l=a.tt;a=l}return a}B(){let a=this;if(a.W){for(a=a.W;a.U;)a=a.U;return a}else{let l=a.tt;for(;l.W===a;)a=l,l=a.tt;return a.W!==l?l:a}}te(){let a=this.tt,l=this.W,t=l.U;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.U=this,this.tt=l,this.W=t,t&&(t.tt=this),l}se(){let a=this.tt,l=this.U,t=l.W;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.W=this,this.tt=l,this.U=t,t&&(t.tt=this),l}};i.TreeNode=h;var o=class extends h{constructor(){super(...arguments),this.rt=1}te(){let a=super.te();return this.ie(),a.ie(),a}se(){let a=super.se();return this.ie(),a.ie(),a}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};i.TreeNodeEnableIndex=o}),_o=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=ql(),o=lt(),a=ut(),l=class extends o.Container{constructor(e=function(r,s){return r<s?-1:r>s?1:0},n=!1){super(),this.Y=void 0,this.v=e,n?(this.re=h.TreeNodeEnableIndex,this.M=function(r,s,u){let d=this.ne(r,s,u);if(d){let p=d.tt;for(;p!==this.h;)p.rt+=1,p=p.tt;let g=this.he(d);if(g){let{parentNode:f,grandParent:b,curNode:y}=g;f.ie(),b.ie(),y.ie()}}return this.i},this.V=function(r){let s=this.fe(r);for(;s!==this.h;)s.rt-=1,s=s.tt}):(this.re=h.TreeNode,this.M=function(r,s,u){let d=this.ne(r,s,u);return d&&this.he(d),this.i},this.V=this.fe),this.h=new this.re}X(e,n){let r=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)e=e.W;else if(s>0)r=e,e=e.U;else return e}return r}Z(e,n){let r=this.h;for(;e;)this.v(e.u,n)<=0?e=e.W:(r=e,e=e.U);return r}$(e,n){let r=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)r=e,e=e.W;else if(s>0)e=e.U;else return e}return r}rr(e,n){let r=this.h;for(;e;)this.v(e.u,n)<0?(r=e,e=e.W):e=e.U;return r}ue(e){for(;;){let n=e.tt;if(n===this.h)return;if(e.ee===1){e.ee=0;return}if(e===n.U){let r=n.W;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.te():n.te();else if(r.W&&r.W.ee===1){r.ee=n.ee,n.ee=0,r.W.ee=0,n===this.Y?this.Y=n.te():n.te();return}else r.U&&r.U.ee===1?(r.ee=1,r.U.ee=0,r.se()):(r.ee=1,e=n)}else{let r=n.U;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.se():n.se();else if(r.U&&r.U.ee===1){r.ee=n.ee,n.ee=0,r.U.ee=0,n===this.Y?this.Y=n.se():n.se();return}else r.W&&r.W.ee===1?(r.ee=1,r.W.ee=0,r.te()):(r.ee=1,e=n)}}}fe(e){if(this.i===1)return this.clear(),this.h;let n=e;for(;n.U||n.W;){if(n.W)for(n=n.W;n.U;)n=n.U;else n=n.U;[e.u,n.u]=[n.u,e.u],[e.l,n.l]=[n.l,e.l],e=n}this.h.U===n?this.h.U=n.tt:this.h.W===n&&(this.h.W=n.tt),this.ue(n);let r=n.tt;return n===r.U?r.U=void 0:r.W=void 0,this.i-=1,this.Y.ee=0,r}oe(e,n){return e===void 0?!1:this.oe(e.U,n)||n(e)?!0:this.oe(e.W,n)}he(e){for(;;){let n=e.tt;if(n.ee===0)return;let r=n.tt;if(n===r.U){let s=r.W;if(s&&s.ee===1){if(s.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.W){if(e.ee=0,e.U&&(e.U.tt=n),e.W&&(e.W.tt=r),n.W=e.U,r.U=e.W,e.U=n,e.W=r,r===this.Y)this.Y=e,this.h.tt=e;else{let u=r.tt;u.U===r?u.U=e:u.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.se():r.se(),r.ee=1}else{let s=r.U;if(s&&s.ee===1){if(s.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.U){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=n),r.W=e.U,n.U=e.W,e.U=r,e.W=n,r===this.Y)this.Y=e,this.h.tt=e;else{let u=r.tt;u.U===r?u.U=e:u.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.te():r.te(),r.ee=1}return}}ne(e,n,r){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,n),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let s,u=this.h.U,d=this.v(u.u,e);if(d===0){u.l=n;return}else if(d>0)u.U=new this.re(e,n),u.U.tt=u,s=u.U,this.h.U=s;else{let p=this.h.W,g=this.v(p.u,e);if(g===0){p.l=n;return}else if(g<0)p.W=new this.re(e,n),p.W.tt=p,s=p.W,this.h.W=s;else{if(r!==void 0){let f=r.o;if(f!==this.h){let b=this.v(f.u,e);if(b===0){f.l=n;return}else if(b>0){let y=f.L(),_=this.v(y.u,e);if(_===0){y.l=n;return}else _<0&&(s=new this.re(e,n),y.W===void 0?(y.W=s,s.tt=y):(f.U=s,s.tt=f))}}}if(s===void 0)for(s=this.Y;;){let f=this.v(s.u,e);if(f>0){if(s.U===void 0){s.U=new this.re(e,n),s.U.tt=s,s=s.U;break}s=s.U}else if(f<0){if(s.W===void 0){s.W=new this.re(e,n),s.W.tt=s,s=s.W;break}s=s.W}else{s.l=n;return}}}}return this.i+=1,s}I(e,n){for(;e;){let r=this.v(e.u,n);if(r<0)e=e.W;else if(r>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(e,n){let r=e.o;if(r===this.h&&(0,a.throwIteratorAccessError)(),this.i===1)return r.u=n,!0;if(r===this.h.U)return this.v(r.B().u,n)>0?(r.u=n,!0):!1;if(r===this.h.W)return this.v(r.L().u,n)<0?(r.u=n,!0):!1;let s=r.L().u;if(this.v(s,n)>=0)return!1;let u=r.B().u;return this.v(u,n)<=0?!1:(r.u=n,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=0,r=this;return this.oe(this.Y,function(s){return e===n?(r.V(s),!0):(n+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return!1;let n=this.I(this.Y,e);return n===this.h?!1:(this.V(n),!0)}eraseElementByIterator(e){let n=e.o;n===this.h&&(0,a.throwIteratorAccessError)();let r=n.W===void 0;return e.iteratorType===0?r&&e.next():(!r||n.U===void 0)&&e.next(),this.V(n),e}forEach(e){let n=0;for(let r of this)e(r,n++,this)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n,r=0;for(let s of this){if(r===e){n=s;break}r+=1}return n}getHeight(){if(this.i===0)return 0;let e=function(n){return n?Math.max(e(n.U),e(n.W))+1:0};return e(this.Y)}},t=l;i.default=t}),Eo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(t,e,n){super(n),this.o=t,this.h=e,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let t=this.o,e=this.h.tt;if(t===this.h)return e?e.rt-1:0;let n=0;for(t.U&&(n+=t.U.rt);t!==e;){let r=t.tt;t===r.W&&(n+=1,r.U&&(n+=r.U.rt)),t=r}return n}},l=a;i.default=l}),$l=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(_o()),o=l(Eo()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class zs extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.u}copy(){return new zs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[],s,u){super(s,u);let d=this;r.forEach(function(p){d.insert(p)})}*K(r){r!==void 0&&(yield*this.K(r.U),yield r.u,yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(r,s){return this.M(r,void 0,s)}find(r){let s=this.I(this.Y,r);return new t(s,this.h,this)}lowerBound(r){let s=this.X(this.Y,r);return new t(s,this.h,this)}upperBound(r){let s=this.Z(this.Y,r);return new t(s,this.h,this)}reverseLowerBound(r){let s=this.$(this.Y,r);return new t(s,this.h,this)}reverseUpperBound(r){let s=this.rr(this.Y,r);return new t(s,this.h,this)}union(r){let s=this;return r.forEach(function(u){s.insert(u)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),zl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(_o()),o=l(Eo()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class Gs extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Gs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[],s,u){super(s,u);let d=this;r.forEach(function(p){d.setElement(p[0],p[1])})}*K(r){r!==void 0&&(yield*this.K(r.U),yield[r.u,r.l],yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i===0)return;let r=this.h.U;return[r.u,r.l]}back(){if(this.i===0)return;let r=this.h.W;return[r.u,r.l]}lowerBound(r){let s=this.X(this.Y,r);return new t(s,this.h,this)}upperBound(r){let s=this.Z(this.Y,r);return new t(s,this.h,this)}reverseLowerBound(r){let s=this.$(this.Y,r);return new t(s,this.h,this)}reverseUpperBound(r){let s=this.rr(this.Y,r);return new t(s,this.h,this)}setElement(r,s,u){return this.M(r,s,u)}find(r){let s=this.I(this.Y,r);return new t(s,this.h,this)}getElementByKey(r){return this.I(this.Y,r).l}union(r){let s=this;return r.forEach(function(u){s.setElement(u[0],u[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),So=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=h;function h(o){let a=typeof o;return a==="object"&&o!==null||a==="function"}}),Co=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.HashContainerIterator=i.HashContainer=void 0;var h=lt(),o=l(So()),a=ut();function l(n){return n&&n.t?n:{default:n}}var t=class extends h.ContainerIterator{constructor(n,r,s){super(s),this.o=n,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}};i.HashContainerIterator=t;var e=class extends h.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(n){let{L:r,B:s}=n;r.B=s,s.L=r,n===this.p&&(this.p=s),n===this._&&(this._=r),this.i-=1}M(n,r,s){s===void 0&&(s=(0,o.default)(n));let u;if(s){let d=n[this.HASH_TAG];if(d!==void 0)return this.H[d].l=r,this.i;Object.defineProperty(n,this.HASH_TAG,{value:this.H.length,configurable:!0}),u={u:n,l:r,L:this._,B:this.h},this.H.push(u)}else{let d=this.g[n];if(d)return d.l=r,this.i;u={u:n,l:r,L:this._,B:this.h},this.g[n]=u}return this.i===0?(this.p=u,this.h.B=u):this._.B=u,this._=u,this.h.L=u,++this.i}I(n,r){if(r===void 0&&(r=(0,o.default)(n)),r){let s=n[this.HASH_TAG];return s===void 0?this.h:this.H[s]}else return this.g[n]||this.h}clear(){let n=this.HASH_TAG;this.H.forEach(function(r){delete r.u[n]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(n,r){let s;if(r===void 0&&(r=(0,o.default)(n)),r){let u=n[this.HASH_TAG];if(u===void 0)return!1;delete n[this.HASH_TAG],s=this.H[u],delete this.H[u]}else{if(s=this.g[n],s===void 0)return!1;delete this.g[n]}return this.V(s),!0}eraseElementByIterator(n){let r=n.o;return r===this.h&&(0,a.throwIteratorAccessError)(),this.V(r),n.next()}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let r=this.p;for(;n--;)r=r.B;return this.V(r),this.i}};i.HashContainer=e}),Gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=Co(),o=ut(),a=class Ys extends h.HashContainerIterator{constructor(n,r,s,u){super(n,r,u),this.container=s}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new Ys(this.o,this.h,this.container,this.iteratorType)}},l=class extends h.HashContainer{constructor(e=[]){super();let n=this;e.forEach(function(r){n.insert(r)})}begin(){return new a(this.p,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this._,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,n){return this.M(e,void 0,n)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=this.p;for(;e--;)n=n.B;return n.u}find(e,n){let r=this.I(e,n);return new a(r,this.h,this)}forEach(e){let n=0,r=this.p;for(;r!==this.h;)e(r.u,n++,this),r=r.B}[Symbol.iterator](){return(function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B}).bind(this)()}},t=l;i.default=t}),Yl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=Co(),o=l(So()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class Js extends h.HashContainerIterator{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Js(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.HashContainer{constructor(r=[]){super();let s=this;r.forEach(function(u){s.setElement(u[0],u[1])})}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(r,s,u){return this.M(r,s,u)}getElementByKey(r,s){if(s===void 0&&(s=(0,o.default)(r)),s){let d=r[this.HASH_TAG];return d!==void 0?this.H[d].l:void 0}let u=this.g[r];return u?u.l:void 0}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return[s.u,s.l]}find(r,s){let u=this.I(r,s);return new t(u,this.h,this)}forEach(r){let s=0,u=this.p;for(;u!==this.h;)r([u.u,u.l],s++,this),u=u.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield[r.u,r.l],r=r.B}).bind(this)()}},n=e;i.default=n}),Jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),Object.defineProperty(i,"Deque",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(i,"HashMap",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(i,"HashSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(i,"LinkList",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(i,"OrderedMap",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(i,"OrderedSet",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(i,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(i,"Queue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"Stack",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(i,"Vector",{enumerable:!0,get:function(){return l.default}});var h=d(jl()),o=d(Wl()),a=d(Vl()),l=d(Ql()),t=d(Kl()),e=d(Hl()),n=d($l()),r=d(zl()),s=d(Gl()),u=d(Yl());function d(p){return p&&p.t?p:{default:p}}}),Zl=fe((i,h)=>{oe(),ae(),se();var o=Jl().OrderedSet,a=at()("number-allocator:trace"),l=at()("number-allocator:error");function t(n,r){this.low=n,this.high=r}t.prototype.equals=function(n){return this.low===n.low&&this.high===n.high},t.prototype.compare=function(n){return this.low<n.low&&this.high<n.low?-1:n.low<this.low&&n.high<this.low?1:0};function e(n,r){if(!(this instanceof e))return new e(n,r);this.min=n,this.max=r,this.ss=new o([],(s,u)=>s.compare(u)),a("Create"),this.clear()}e.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},e.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;let n=this.ss.begin(),r=n.pointer.low,s=n.pointer.high,u=r;return u+1<=s?this.ss.updateKeyByIterator(n,new t(r+1,s)):this.ss.eraseElementByPos(0),a("alloc():"+u),u},e.prototype.use=function(n){let r=new t(n,n),s=this.ss.lowerBound(r);if(!s.equals(this.ss.end())){let u=s.pointer.low,d=s.pointer.high;return s.pointer.equals(r)?(this.ss.eraseElementByIterator(s),a("use():"+n),!0):u>n?!1:u===n?(this.ss.updateKeyByIterator(s,new t(u+1,d)),a("use():"+n),!0):d===n?(this.ss.updateKeyByIterator(s,new t(u,d-1)),a("use():"+n),!0):(this.ss.updateKeyByIterator(s,new t(n+1,d)),this.ss.insert(new t(u,n-1)),a("use():"+n),!0)}return a("use():failed"),!1},e.prototype.free=function(n){if(n<this.min||n>this.max){l("free():"+n+" is out of range");return}let r=new t(n,n),s=this.ss.upperBound(r);if(s.equals(this.ss.end())){if(s.equals(this.ss.begin())){this.ss.insert(r);return}s.pre();let u=s.pointer.high;s.pointer.high+1===n?this.ss.updateKeyByIterator(s,new t(u,n)):this.ss.insert(r)}else if(s.equals(this.ss.begin()))if(n+1===s.pointer.low){let u=s.pointer.high;this.ss.updateKeyByIterator(s,new t(n,u))}else this.ss.insert(r);else{let u=s.pointer.low,d=s.pointer.high;s.pre();let p=s.pointer.low;s.pointer.high+1===n?n+1===u?(this.ss.eraseElementByIterator(s),this.ss.updateKeyByIterator(s,new t(p,d))):this.ss.updateKeyByIterator(s,new t(p,n)):n+1===u?(this.ss.eraseElementByIterator(s.next()),this.ss.insert(new t(n,d))):this.ss.insert(r)}a("free():"+n)},e.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new t(this.min,this.max))},e.prototype.intervalCount=function(){return this.ss.size()},e.prototype.dump=function(){console.log("length:"+this.ss.size());for(let n of this.ss)console.log(n)},h.exports=e}),ko=fe((i,h)=>{oe(),ae(),se();var o=Zl();h.exports.NumberAllocator=o}),Xl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Fl(),o=ko(),a=class{constructor(l){l>0&&(this.aliasToTopic=new h.LRUCache({max:l}),this.topicToAlias={},this.numberAllocator=new o.NumberAllocator(1,l),this.max=l,this.length=0)}put(l,t){if(t===0||t>this.max)return!1;let e=this.aliasToTopic.get(t);return e&&delete this.topicToAlias[e],this.aliasToTopic.set(t,l),this.topicToAlias[l]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.size,!0}getTopicByAlias(l){return this.aliasToTopic.get(l)}getAliasByTopic(l){let t=this.topicToAlias[l];return typeof t<"u"&&this.aliasToTopic.get(t),t}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};i.default=a}),eu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});var o=nr(),a=h(Xl()),l=Dt(),t=(e,n)=>{e.log("_handleConnack");let{options:r}=e,s=r.protocolVersion===5?n.reasonCode:n.returnCode;if(clearTimeout(e.connackTimer),delete e.topicAliasSend,n.properties){if(n.properties.topicAliasMaximum){if(n.properties.topicAliasMaximum>65535){e.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}n.properties.topicAliasMaximum>0&&(e.topicAliasSend=new a.default(n.properties.topicAliasMaximum))}n.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=n.properties.serverKeepAlive),n.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=n.properties.maximumPacketSize)}if(s===0)e.reconnecting=!1,e._onConnect(n);else if(s>0){let u=new l.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[s]}`,s);e.emit("error",u),e.options.reconnectOnConnackError&&e._cleanUp(!0)}};i.default=t}),tu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(o,a,l)=>{o.log("handling pubrel packet");let t=typeof l<"u"?l:o.noop,{messageId:e}=a,n={cmd:"pubcomp",messageId:e};o.incomingStore.get(a,(r,s)=>{r?o._sendPacket(n,t):(o.emit("message",s.topic,s.payload,s),o.handleMessage(s,u=>{if(u)return t(u);o.incomingStore.del(s,o.noop),o._sendPacket(n,t)}))})};i.default=h}),ru=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(Dl()),a=h(Nl()),l=h(eu()),t=h(nr()),e=h(tu()),n=(r,s,u)=>{let{options:d}=r;if(d.protocolVersion===5&&d.properties&&d.properties.maximumPacketSize&&d.properties.maximumPacketSize<s.length)return r.emit("error",new Error(`exceeding packets size ${s.cmd}`)),r.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),r;switch(r.log("_handlePacket :: emitting packetreceive"),r.emit("packetreceive",s),s.cmd){case"publish":(0,o.default)(r,s,u);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":r.reschedulePing(),(0,t.default)(r,s),u();break;case"pubrel":r.reschedulePing(),(0,e.default)(r,s,u);break;case"connack":(0,l.default)(r,s),u();break;case"auth":r.reschedulePing(),(0,a.default)(r,s),u();break;case"pingresp":r.log("_handlePacket :: received pingresp"),r.reschedulePing(!0),u();break;case"disconnect":r.emit("disconnect",s),u();break;default:r.log("_handlePacket :: unknown command"),u();break}};i.default=n}),nu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.TypedEventEmitter=void 0;var o=h((_t(),Be(gt))),a=Dt(),l=class{};i.TypedEventEmitter=l,(0,a.applyMixin)(l,o.default)}),ir=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.isReactNativeBrowser=i.isWebWorker=void 0;var h=()=>{var t;return typeof window<"u"?typeof navigator<"u"&&((t=navigator.userAgent)===null||t===void 0?void 0:t.toLowerCase().indexOf(" electron/"))>-1&&ke!=null&&ke.versions?!Object.prototype.hasOwnProperty.call(ke.versions,"electron"):typeof window.document<"u":!1},o=()=>{var t,e;return!!(typeof self=="object"&&!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes("WorkerGlobalScope"))},a=()=>typeof navigator<"u"&&navigator.product==="ReactNative",l=h()||o()||a();i.isWebWorker=o(),i.isReactNativeBrowser=a(),i.default=l}),iu=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i):typeof define=="function"&&define.amd?define(["exports"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.fastUniqueNumbers={}))})(i,function(o){var a=function(g){return function(f){var b=g(f);return f.add(b),b}},l=function(g){return function(f,b){return g.set(f,b),b}},t=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,e=536870912,n=e*2,r=function(g,f){return function(b){var y=f.get(b),_=y===void 0?b.size:y<n?y+1:0;if(!b.has(_))return g(b,_);if(b.size<e){for(;b.has(_);)_=Math.floor(Math.random()*n);return g(b,_)}if(b.size>t)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;b.has(_);)_=Math.floor(Math.random()*t);return g(b,_)}},s=new WeakMap,u=l(s),d=r(u,s),p=a(d);o.addUniqueNumber=p,o.generateUniqueNumber=d})}),ou=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,iu()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimersBroker={},o.fastUniqueNumbers))})(i,function(o,a){var l=function(n){return n.method!==void 0&&n.method==="call"},t=function(n){return n.error===null&&typeof n.id=="number"},e=function(n){var r=new Map([[0,function(){}]]),s=new Map([[0,function(){}]]),u=new Map,d=new Worker(n);d.addEventListener("message",function(y){var _=y.data;if(l(_)){var A=_.params,w=A.timerId,I=A.timerType;if(I==="interval"){var k=r.get(w);if(typeof k=="number"){var E=u.get(k);if(E===void 0||E.timerId!==w||E.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof k<"u")k();else throw new Error("The timer is in an undefined state.")}else if(I==="timeout"){var T=s.get(w);if(typeof T=="number"){var O=u.get(T);if(O===void 0||O.timerId!==w||O.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof T<"u")T(),s.delete(w);else throw new Error("The timer is in an undefined state.")}}else if(t(_)){var H=_.id,G=u.get(H);if(G===void 0)throw new Error("The timer is in an undefined state.");var de=G.timerId,U=G.timerType;u.delete(H),U==="interval"?r.delete(de):s.delete(de)}else{var $=_.error.message;throw new Error($)}});var p=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"interval"}),r.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"interval"}})},g=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"timeout"}),s.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"timeout"}})},f=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(r);return r.set(A,function(){y(),typeof r.get(A)=="function"&&d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}})}),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}}),A},b=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(s);return s.set(A,y),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"timeout"}}),A};return{clearInterval:p,clearTimeout:g,setInterval:f,setTimeout:b}};o.load=e})}),su=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,ou()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimers={},o.workerTimersBroker))})(i,function(o,a){var l=function(d,p){var g=null;return function(){if(g!==null)return g;var f=new Blob([p],{type:"application/javascript; charset=utf-8"}),b=URL.createObjectURL(f);return g=d(b),setTimeout(function(){return URL.revokeObjectURL(b)}),g}},t=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i="function"==typeof(o=function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:"call",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,"interval"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,"timeout"))};addEventListener("message",(function(e){var t=e.data;try{if("clear"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if("interval"===c)r(d),postMessage({error:null,id:i});else{if("timeout"!==c)throw new Error('The given type "'.concat(c,'" is not supported'));o(d),postMessage({error:null,id:i})}}else{if("set"!==t.method)throw new Error('The given method "'.concat(t.method,'" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if("interval"===v)a(l,m,p);else{if("timeout"!==v)throw new Error('The given type "'.concat(v,'" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,e=l(a.load,t),n=function(d){return e().clearInterval(d)},r=function(d){return e().clearTimeout(d)},s=function(){var d;return(d=e()).setInterval.apply(d,arguments)},u=function(){var d;return(d=e()).setTimeout.apply(d,arguments)};o.clearInterval=n,o.clearTimeout=r,o.setInterval=s,o.setTimeout=u})}),au=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(s,u,d,p){p===void 0&&(p=d);var g=Object.getOwnPropertyDescriptor(u,d);(!g||("get"in g?!u.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(s,p,g)}:function(s,u,d,p){p===void 0&&(p=d),s[p]=u[d]}),o=i&&i.__setModuleDefault||(Object.create?function(s,u){Object.defineProperty(s,"default",{enumerable:!0,value:u})}:function(s,u){s.default=u}),a=i&&i.__importStar||(function(){var s=function(u){return s=Object.getOwnPropertyNames||function(d){var p=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(p[p.length]=g);return p},s(u)};return function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p=s(u),g=0;g<p.length;g++)p[g]!=="default"&&h(d,u,p[g]);return o(d,u),d}})();Object.defineProperty(i,"__esModule",{value:!0});var l=a(ir()),t=su(),e={set:t.setInterval,clear:t.clearInterval},n={set:(s,u)=>setInterval(s,u),clear:s=>clearInterval(s)},r=s=>{switch(s){case"native":return n;case"worker":return e;default:return l.default&&!l.isWebWorker&&!l.isReactNativeBrowser?e:n}};i.default=r}),To=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(au()),a=class{get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(l,t){this.destroyed=!1,this.client=l,this.timer=typeof t=="object"&&"set"in t&&"clear"in t?t:(0,o.default)(t),this.setKeepalive(l.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(l){if(l*=1e3,isNaN(l)||l<=0||l>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${l}`);this._keepalive=l,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${l}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let l=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+l,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};i.default=a}),Wn=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(k,E,T,O){O===void 0&&(O=T);var H=Object.getOwnPropertyDescriptor(E,T);(!H||("get"in H?!E.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return E[T]}}),Object.defineProperty(k,O,H)}:function(k,E,T,O){O===void 0&&(O=T),k[O]=E[T]}),o=i&&i.__setModuleDefault||(Object.create?function(k,E){Object.defineProperty(k,"default",{enumerable:!0,value:E})}:function(k,E){k.default=E}),a=i&&i.__importStar||(function(){var k=function(E){return k=Object.getOwnPropertyNames||function(T){var O=[];for(var H in T)Object.prototype.hasOwnProperty.call(T,H)&&(O[O.length]=H);return O},k(E)};return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null)for(var O=k(E),H=0;H<O.length;H++)O[H]!=="default"&&h(T,E,O[H]);return o(T,E),T}})(),l=i&&i.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(i,"__esModule",{value:!0});var t=l(gl()),e=l(Pl()),n=l(yo()),r=St(),s=l(Ml()),u=a(Ul()),d=l(at()),p=l(wo()),g=l(ru()),f=Dt(),b=nu(),y=l(To()),_=a(ir()),A=globalThis.setImmediate||((...k)=>{let E=k.shift();(0,f.nextTick)(()=>{E(...k)})}),w={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},I=class ci extends b.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(E,T){super(),this.options=T||{};for(let O in w)typeof this.options[O]>"u"?this.options[O]=w[O]:this.options[O]=T[O];this.log=this.options.log||(0,d.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",ci.VERSION),_.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",_.default?"browser":"node"),this.log("MqttClient :: options.protocol",T.protocol),this.log("MqttClient :: options.protocolVersion",T.protocolVersion),this.log("MqttClient :: options.username",T.username),this.log("MqttClient :: options.keepalive",T.keepalive),this.log("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",T.properties?T.properties.topicAliasMaximum:void 0),this.options.clientId=typeof T.clientId=="string"?T.clientId:ci.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:(...O)=>{O[3](null,0)},this.options.writeCache||(e.default.writeToStream.cacheNumbers=!1),this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new n.default:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new p.default,this.incomingStore=T.incomingStore||new p.default,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.properties&&T.properties.topicAliasMaximum>0&&(T.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new t.default(T.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:O}=this,H=()=>{let G=O.shift();this.log("deliver :: entry %o",G);let de=null;if(!G){this._resubscribe();return}de=G.packet,this.log("deliver :: call _sendPacket for %o",de);let U=!0;de.messageId&&de.messageId!==0&&(this.messageIdProvider.register(de.messageId)||(U=!1)),U?this._sendPacket(de,$=>{G.cb&&G.cb($),H()}):(this.log("messageId: %d has already used. The message is skipped and removed.",de.messageId),H())};this.log("connect :: sending queued packets"),H()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}handleAuth(E,T){T()}handleMessage(E,T){T()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var E;let T=new r.Writable,O=e.default.parser(this.options),H=null,G=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),O.on("packet",F=>{this.log("parser :: on packet push to packets array."),G.push(F)});let de=()=>{this.log("work :: getting next packet in queue");let F=G.shift();if(F)this.log("work :: packet pulled from queue"),(0,g.default)(this,F,U);else{this.log("work :: no packets in queue");let me=H;H=null,this.log("work :: done flag is %s",!!me),me&&me()}},U=()=>{if(G.length)(0,f.nextTick)(de);else{let F=H;H=null,F()}};T._write=(F,me,le)=>{H=le,this.log("writable stream :: parsing buffer"),O.parse(F),de()};let $=F=>{this.log("streamErrorHandler :: error",F.message),F.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",F)):this.noop(F)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",$),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let z={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(z.will=Object.assign(Object.assign({},this.options.will),{payload:(E=this.options.will)===null||E===void 0?void 0:E.payload})),this.topicAliasRecv&&(z.properties||(z.properties={}),this.topicAliasRecv&&(z.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(z),O.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let F=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(F)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(E,T,O,H){this.log("publish :: message `%s` to topic `%s`",T,E);let{options:G}=this;typeof O=="function"&&(H=O,O=null),O=O||{},O=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),O);let{qos:de,retain:U,dup:$,properties:z,cbStorePut:F}=O;if(this._checkDisconnecting(H))return this;let me=()=>{let le=0;if((de===1||de===2)&&(le=this._nextId(),le===null))return this.log("No messageId left"),!1;let pe={cmd:"publish",topic:E,payload:T,qos:de,retain:U,messageId:le,dup:$};switch(G.protocolVersion===5&&(pe.properties=z),this.log("publish :: qos",de),de){case 1:case 2:this.outgoing[pe.messageId]={volatile:!1,cb:H||this.noop},this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,void 0,F);break;default:this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,H,F);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,cbStorePut:O.cbStorePut,callback:H}),this}publishAsync(E,T,O){return new Promise((H,G)=>{this.publish(E,T,O,(de,U)=>{de?G(de):H(U)})})}subscribe(E,T,O){let H=this.options.protocolVersion;typeof T=="function"&&(O=T),O=O||this.noop;let G=!1,de=[];typeof E=="string"?(E=[E],de=E):Array.isArray(E)?de=E:typeof E=="object"&&(G=E.resubscribe,delete E.resubscribe,de=Object.keys(E));let U=u.validateTopics(de);if(U!==null)return A(O,new Error(`Invalid topic ${U}`)),this;if(this._checkDisconnecting(O))return this.log("subscribe: discconecting true"),this;let $={qos:0};H===5&&($.nl=!1,$.rap=!1,$.rh=0),T=Object.assign(Object.assign({},$),T);let z=T.properties,F=[],me=(we,Q)=>{if(Q=Q||T,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,we)||this._resubscribeTopics[we].qos<Q.qos||G){let he={topic:we,qos:Q.qos};H===5&&(he.nl=Q.nl,he.rap=Q.rap,he.rh=Q.rh,he.properties=z),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",he.topic,he.qos),F.push(he)}};if(Array.isArray(E)?E.forEach(we=>{this.log("subscribe: array topic %s",we),me(we)}):Object.keys(E).forEach(we=>{this.log("subscribe: object topic %s, %o",we,E[we]),me(we,E[we])}),!F.length)return O(null,[]),this;let le=(we,Q)=>{let he={cmd:"subscribe",subscriptions:we,messageId:Q};if(z&&(he.properties=z),this.options.resubscribe){this.log("subscribe :: resubscribe true");let ce=[];we.forEach(ye=>{if(this.options.reconnectPeriod>0){let J={qos:ye.qos};H===5&&(J.nl=ye.nl||!1,J.rap=ye.rap||!1,J.rh=ye.rh||0,J.properties=ye.properties),this._resubscribeTopics[ye.topic]=J,ce.push(ye.topic)}}),this.messageIdToTopic[he.messageId]=ce}let P=new Promise((ce,ye)=>{this.outgoing[he.messageId]={volatile:!0,cb(J,_e){if(!J){let{granted:K}=_e;for(let M=0;M<K.length;M+=1)we[M].qos=K[M]}J?ye(new f.ErrorWithSubackPacket(J.message,_e)):ce(_e)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(he),P},pe=()=>{var we;let Q=(we=this.options.subscribeBatchSize)!==null&&we!==void 0?we:F.length,he=[];for(let P=0;P<F.length;P+=Q){let ce=F.slice(P,P+Q),ye=this._nextId();if(ye===null)return this.log("No messageId left"),!1;he.push(le(ce,ye))}return Promise.all(he).then(P=>{O(null,F,P.at(-1))}).catch(P=>{O(P,F,P.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!pe())&&this._storeProcessingQueue.push({invoke:pe,callback:O}),this}subscribeAsync(E,T){return new Promise((O,H)=>{this.subscribe(E,T,(G,de)=>{G?H(G):O(de)})})}unsubscribe(E,T,O){typeof E=="string"&&(E=[E]),typeof T=="function"&&(O=T),O=O||this.noop;let H=u.validateTopics(E);if(H!==null)return A(O,new Error(`Invalid topic ${H}`)),this;if(this._checkDisconnecting(O))return this;let G=()=>{let de=this._nextId();if(de===null)return this.log("No messageId left"),!1;let U={cmd:"unsubscribe",messageId:de,unsubscriptions:[]};return typeof E=="string"?U.unsubscriptions=[E]:Array.isArray(E)&&(U.unsubscriptions=E),this.options.resubscribe&&U.unsubscriptions.forEach($=>{delete this._resubscribeTopics[$]}),typeof T=="object"&&T.properties&&(U.properties=T.properties),this.outgoing[U.messageId]={volatile:!0,cb:O},this.log("unsubscribe: call _sendPacket"),this._sendPacket(U),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!G())&&this._storeProcessingQueue.push({invoke:G,callback:O}),this}unsubscribeAsync(E,T){return new Promise((O,H)=>{this.unsubscribe(E,T,(G,de)=>{G?H(G):O(de)})})}end(E,T,O){this.log("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(O=O||T,T=E,E=!1),typeof T!="object"&&(O=O||T,T=null),this.log("end :: cb? %s",!!O),(!O||typeof O!="function")&&(O=this.noop);let H=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(de=>{this.outgoingStore.close(U=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),O){let $=de||U;this.log("end :: closeStores: invoking callback with args"),O($)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},G=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,E),this._cleanUp(E,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,f.nextTick)(H)},T)};return this.disconnecting?(O(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,G,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),G()),this)}endAsync(E,T){return new Promise((O,H)=>{this.end(E,T,G=>{G?H(G):O()})})}removeOutgoingMessage(E){if(this.outgoing[E]){let{cb:T}=this.outgoing[E];this._removeOutgoingAndStoreMessage(E,()=>{T(new Error("Message removed"))})}return this}reconnect(E){this.log("client reconnect");let T=()=>{E?(this.options.incomingStore=E.incomingStore,this.options.outgoingStore=E.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=T:T(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(E=>{this.outgoing[E].volatile&&typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(E=>{typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_removeTopicAliasAndRecoverTopicName(E){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",T,O),O.length===0){if(typeof T>"u")return new Error("Unregistered Topic Alias");if(O=this.topicAliasSend.getTopicByAlias(T),typeof O>"u")return new Error("Unregistered Topic Alias");E.topic=O}T&&delete E.properties.topicAlias}_checkDisconnecting(E){return this.disconnecting&&(E&&E!==this.noop?E(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(E,T,O={}){if(T&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),this.log("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let H=Object.assign({cmd:"disconnect"},O);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(H,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),A(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),T&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())}_storeAndSend(E,T,O){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",E.cmd);let H=E,G;if(H.cmd==="publish"&&(H=(0,s.default)(E),G=this._removeTopicAliasAndRecoverTopicName(H),G))return T&&T(G);this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O(),this._writePacket(E,T)})}_applyTopicAlias(E){if(this.options.protocolVersion===5&&E.cmd==="publish"){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.topicAliasSend)if(T){if(O.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",O,T),!this.topicAliasSend.put(O,T)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}else O.length!==0&&(this.options.autoAssignTopicAlias?(T=this.topicAliasSend.getAliasByTopic(O),T?(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",O,T)):(T=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(O,T),E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",O,T))):this.options.autoUseTopicAlias&&(T=this.topicAliasSend.getAliasByTopic(O),T&&(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",O,T))));else if(T)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}}_noop(E){this.log("noop ::",E)}_writePacket(E,T){this.log("_writePacket :: packet: %O",E),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",E),this.log("_writePacket :: writing to stream");let O=e.default.writeToStream(E,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",O),!O&&T&&T!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",T)):T&&(this.log("_writePacket :: invoking cb"),T())}_sendPacket(E,T,O,H){this.log("_sendPacket :: (%s) :: start",this.options.clientId),O=O||this.noop,T=T||this.noop;let G=this._applyTopicAlias(E);if(G){T(G);return}if(!this.connected){if(E.cmd==="auth"){this._writePacket(E,T);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,O);return}if(H){this._writePacket(E,T);return}switch(E.cmd){case"publish":break;case"pubrel":this._storeAndSend(E,T,O);return;default:this._writePacket(E,T);return}switch(E.qos){case 2:case 1:this._storeAndSend(E,T,O);break;default:this._writePacket(E,T);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(E,T,O){this.log("_storePacket :: packet: %o",E),this.log("_storePacket :: cb? %s",!!T),O=O||this.noop;let H=E;if(H.cmd==="publish"){H=(0,s.default)(E);let de=this._removeTopicAliasAndRecoverTopicName(H);if(de)return T&&T(de)}let G=H.qos||0;G===0&&this.queueQoSZero||H.cmd!=="publish"?this.queue.push({packet:H,cb:T}):G>0?(T=this.outgoing[H.messageId]?this.outgoing[H.messageId].cb:null,this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O()})):T&&T(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new y.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(E=!1){this.keepaliveManager&&this.options.keepalive&&(E||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let E=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&E.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let T=0;T<E.length;T++){let O={};O[E[T]]=this._resubscribeTopics[E[T]],O.resubscribe=!0,this.subscribe(O,{properties:O[E[T]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(E){if(this.disconnected){this.emit("connect",E);return}this.connackPacket=E,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let T=()=>{let O=this.outgoingStore.createStream(),H=()=>{O.destroy(),O=null,this._flushStoreProcessingQueue(),G()},G=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",H),O.on("error",U=>{G(),this._flushStoreProcessingQueue(),this.removeListener("close",H),this.emit("error",U)});let de=()=>{if(!O)return;let U=O.read(1),$;if(!U){O.once("readable",de);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[U.messageId]){de();return}!this.disconnecting&&!this.reconnectTimer?($=this.outgoing[U.messageId]?this.outgoing[U.messageId].cb:null,this.outgoing[U.messageId]={volatile:!1,cb(z,F){$&&$(z,F),de()}},this._packetIdsDuringStoreProcessing[U.messageId]=!0,this.messageIdProvider.register(U.messageId)?this._sendPacket(U,void 0,void 0,!0):this.log("messageId: %d has already used.",U.messageId)):O.destroy&&O.destroy()};O.on("end",()=>{let U=!0;for(let $ in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[$]){U=!1;break}this.removeListener("close",H),U?(G(),this._invokeAllStoreProcessingQueue(),this.emit("connect",E)):T()}),de()};T()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(E,T){delete this.outgoing[E],this.outgoingStore.del({messageId:E},(O,H)=>{T(O,H),this.messageIdProvider.deallocate(E),this._invokeStoreProcessingQueue()})}};I.VERSION=f.MQTTJS_VERSION,i.default=I}),lu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=ko(),o=class{constructor(){this.numberAllocator=new h.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(a){return this.numberAllocator.use(a)}deallocate(a){this.numberAllocator.free(a)}clear(){this.numberAllocator.clear()}};i.default=o});function Ct(i){throw new RangeError(Ro[i])}function Io(i,h){let o=i.split("@"),a="";o.length>1&&(a=o[0]+"@",i=o[1]);let l=(function(t,e){let n=[],r=t.length;for(;r--;)n[r]=e(t[r]);return n})((i=i.replace(Po,".")).split("."),h).join(".");return a+l}function Bo(i){let h=[],o=0,a=i.length;for(;o<a;){let l=i.charCodeAt(o++);if(l>=55296&&l<=56319&&o<a){let t=i.charCodeAt(o++);(64512&t)==56320?h.push(((1023&l)<<10)+(1023&t)+65536):(h.push(l),o--)}else h.push(l)}return h}var Oo,xo,Po,Ro,Je,or,Vn,Qn,Kn,Hn,At,uu=He(()=>{oe(),ae(),se(),Oo=/^xn--/,xo=/[^\0-\x7E]/,Po=/[\x2E\u3002\uFF0E\uFF61]/g,Ro={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Je=Math.floor,or=String.fromCharCode,Vn=function(i,h){return i+22+75*(i<26)-((h!=0)<<5)},Qn=function(i,h,o){let a=0;for(i=o?Je(i/700):i>>1,i+=Je(i/h);i>455;a+=36)i=Je(i/35);return Je(a+36*i/(i+38))},Kn=function(i){let h=[],o=i.length,a=0,l=128,t=72,e=i.lastIndexOf("-");e<0&&(e=0);for(let r=0;r<e;++r)i.charCodeAt(r)>=128&&Ct("not-basic"),h.push(i.charCodeAt(r));for(let r=e>0?e+1:0;r<o;){let s=a;for(let d=1,p=36;;p+=36){r>=o&&Ct("invalid-input");let g=(n=i.charCodeAt(r++))-48<10?n-22:n-65<26?n-65:n-97<26?n-97:36;(g>=36||g>Je((2147483647-a)/d))&&Ct("overflow"),a+=g*d;let f=p<=t?1:p>=t+26?26:p-t;if(g<f)break;let b=36-f;d>Je(2147483647/b)&&Ct("overflow"),d*=b}let u=h.length+1;t=Qn(a-s,u,s==0),Je(a/u)>2147483647-l&&Ct("overflow"),l+=Je(a/u),a%=u,h.splice(a++,0,l)}var n;return String.fromCodePoint(...h)},Hn=function(i){let h=[],o=(i=Bo(i)).length,a=128,l=0,t=72;for(let r of i)r<128&&h.push(or(r));let e=h.length,n=e;for(e&&h.push("-");n<o;){let r=2147483647;for(let u of i)u>=a&&u<r&&(r=u);let s=n+1;r-a>Je((2147483647-l)/s)&&Ct("overflow"),l+=(r-a)*s,a=r;for(let u of i)if(u<a&&++l>2147483647&&Ct("overflow"),u==a){let d=l;for(let p=36;;p+=36){let g=p<=t?1:p>=t+26?26:p-t;if(d<g)break;let f=d-g,b=36-g;h.push(or(Vn(g+f%b,0))),d=Je(f/b)}h.push(or(Vn(d,0))),t=Qn(l,s,n==e),l=0,++n}++l,++a}return h.join("")},At={version:"2.1.0",ucs2:{decode:Bo,encode:i=>String.fromCodePoint(...i)},decode:Kn,encode:Hn,toASCII:function(i){return Io(i,function(h){return xo.test(h)?"xn--"+Hn(h):h})},toUnicode:function(i){return Io(i,function(h){return Oo.test(h)?Kn(h.slice(4).toLowerCase()):h})}},At.decode,At.encode,At.toASCII,At.toUnicode,At.ucs2,At.version});function cu(i,h){return Object.prototype.hasOwnProperty.call(i,h)}var Mo,Lt,Uo,et,hu=He(()=>{oe(),ae(),se(),Mo=function(i,h,o,a){h=h||"&",o=o||"=";var l={};if(typeof i!="string"||i.length===0)return l;var t=/\+/g;i=i.split(h);var e=1e3;a&&typeof a.maxKeys=="number"&&(e=a.maxKeys);var n=i.length;e>0&&n>e&&(n=e);for(var r=0;r<n;++r){var s,u,d,p,g=i[r].replace(t,"%20"),f=g.indexOf(o);f>=0?(s=g.substr(0,f),u=g.substr(f+1)):(s=g,u=""),d=decodeURIComponent(s),p=decodeURIComponent(u),cu(l,d)?Array.isArray(l[d])?l[d].push(p):l[d]=[l[d],p]:l[d]=p}return l},Lt=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}},Uo=function(i,h,o,a){return h=h||"&",o=o||"=",i===null&&(i=void 0),typeof i=="object"?Object.keys(i).map(function(l){var t=encodeURIComponent(Lt(l))+o;return Array.isArray(i[l])?i[l].map(function(e){return t+encodeURIComponent(Lt(e))}).join(h):t+encodeURIComponent(Lt(i[l]))}).join(h):a?encodeURIComponent(Lt(a))+o+encodeURIComponent(Lt(i)):""},et={},et.decode=et.parse=Mo,et.encode=et.stringify=Uo,et.decode,et.encode,et.parse,et.stringify});function qn(){throw new Error("setTimeout has not been defined")}function $n(){throw new Error("clearTimeout has not been defined")}function Do(i){if(ht===setTimeout)return setTimeout(i,0);if((ht===qn||!ht)&&setTimeout)return ht=setTimeout,setTimeout(i,0);try{return ht(i,0)}catch{try{return ht.call(null,i,0)}catch{return ht.call(this||kt,i,0)}}}function fu(){It&&Tt&&(It=!1,Tt.length?tt=Tt.concat(tt):Kt=-1,tt.length&&Lo())}function Lo(){if(!It){var i=Do(fu);It=!0;for(var h=tt.length;h;){for(Tt=tt,tt=[];++Kt<h;)Tt&&Tt[Kt].run();Kt=-1,h=tt.length}Tt=null,It=!1,(function(o){if(ft===clearTimeout)return clearTimeout(o);if((ft===$n||!ft)&&clearTimeout)return ft=clearTimeout,clearTimeout(o);try{ft(o)}catch{try{return ft.call(null,o)}catch{return ft.call(this||kt,o)}}})(i)}}function No(i,h){(this||kt).fun=i,(this||kt).array=h}function ct(){}var Fo,ht,ft,kt,Le,Tt,tt,It,Kt,De,du=He(()=>{oe(),ae(),se(),kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Le=Fo={},(function(){try{ht=typeof setTimeout=="function"?setTimeout:qn}catch{ht=qn}try{ft=typeof clearTimeout=="function"?clearTimeout:$n}catch{ft=$n}})(),tt=[],It=!1,Kt=-1,Le.nextTick=function(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];tt.push(new No(i,h)),tt.length!==1||It||Do(Lo)},No.prototype.run=function(){(this||kt).fun.apply(null,(this||kt).array)},Le.title="browser",Le.browser=!0,Le.env={},Le.argv=[],Le.version="",Le.versions={},Le.on=ct,Le.addListener=ct,Le.once=ct,Le.off=ct,Le.removeListener=ct,Le.removeAllListeners=ct,Le.emit=ct,Le.prependListener=ct,Le.prependOnceListener=ct,Le.listeners=function(i){return[]},Le.binding=function(i){throw new Error("process.binding is not supported")},Le.cwd=function(){return"/"},Le.chdir=function(i){throw new Error("process.chdir is not supported")},Le.umask=function(){return 0},De=Fo,De.addListener,De.argv,De.binding,De.browser,De.chdir,De.cwd,De.emit,De.env,De.listeners,De.nextTick,De.off,De.on,De.once,De.prependListener,De.prependOnceListener,De.removeAllListeners,De.removeListener,De.title,De.umask,De.version,De.versions});function pu(){if(zn)return sr;zn=!0;var i=sr={},h,o;function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?h=setTimeout:h=a}catch{h=a}try{typeof clearTimeout=="function"?o=clearTimeout:o=l}catch{o=l}})();function t(b){if(h===setTimeout)return setTimeout(b,0);if((h===a||!h)&&setTimeout)return h=setTimeout,setTimeout(b,0);try{return h(b,0)}catch{try{return h.call(null,b,0)}catch{return h.call(this||Bt,b,0)}}}function e(b){if(o===clearTimeout)return clearTimeout(b);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(b);try{return o(b)}catch{try{return o.call(null,b)}catch{return o.call(this||Bt,b)}}}var n=[],r=!1,s,u=-1;function d(){!r||!s||(r=!1,s.length?n=s.concat(n):u=-1,n.length&&p())}function p(){if(!r){var b=t(d);r=!0;for(var y=n.length;y;){for(s=n,n=[];++u<y;)s&&s[u].run();u=-1,y=n.length}s=null,r=!1,e(b)}}i.nextTick=function(b){var y=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)y[_-1]=arguments[_];n.push(new g(b,y)),n.length===1&&!r&&t(p)};function g(b,y){(this||Bt).fun=b,(this||Bt).array=y}g.prototype.run=function(){(this||Bt).fun.apply(null,(this||Bt).array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function f(){}return i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(b){return[]},i.binding=function(b){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(b){throw new Error("process.chdir is not supported")},i.umask=function(){return 0},sr}var sr,zn,Bt,Re,jo=He(()=>{oe(),ae(),se(),sr={},zn=!1,Bt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Re=pu(),Re.platform="browser",Re.addListener,Re.argv,Re.binding,Re.browser,Re.chdir,Re.cwd,Re.emit,Re.env,Re.listeners,Re.nextTick,Re.off,Re.on,Re.once,Re.prependListener,Re.prependOnceListener,Re.removeAllListeners,Re.removeListener,Re.title,Re.umask,Re.version,Re.versions});function gu(){if(Gn)return ar;Gn=!0;var i=Re;function h(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n="",r=0,s=-1,u=0,d,p=0;p<=t.length;++p){if(p<t.length)d=t.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",r=0):(n=n.slice(0,g),r=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(s+1,p):n=t.slice(s+1,p),r=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var l={resolve:function(){for(var t="",e=!1,n,r=arguments.length-1;r>=-1&&!e;r--){var s;r>=0?s=arguments[r]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(t=s+"/"+t,e=s.charCodeAt(0)===47)}return t=o(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(h(t),t.length===0)return".";var e=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=o(t,!e),t.length===0&&!e&&(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return h(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":l.normalize(t)},relative:function(t,e){if(h(t),h(e),t===e||(t=l.resolve(t),e=l.resolve(e),t===e))return"";for(var n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var r=t.length,s=r-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(t.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=t.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=r;++b)(b===r||t.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(h(t),t.length===0)return".";for(var e=t.charCodeAt(0),n=e===47,r=-1,s=!0,u=t.length-1;u>=1;--u)if(e=t.charCodeAt(u),e===47){if(!s){r=u;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(t);var n=0,r=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var d=e.length-1,p=-1;for(u=t.length-1;u>=0;--u){var g=t.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(r=u):(d=-1,r=p))}return n===r?r=p:r===-1&&(r=t.length),t.slice(n,r)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!s){n=u+1;break}}else r===-1&&(s=!1,r=u+1);return r===-1?"":t.slice(n,r)}},extname:function(t){h(t);for(var e=-1,n=0,r=-1,s=!0,u=0,d=t.length-1;d>=0;--d){var p=t.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}r===-1&&(s=!1,r=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||r===-1||u===0||u===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return a("/",t)},parse:function(t){h(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var n=t.charCodeAt(0),r=n===47,s;r?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=t.length-1,b=0;f>=s;--f){if(n=t.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&r?e.base=e.name=t.slice(1,p):e.base=e.name=t.slice(d,p)):(d===0&&r?(e.name=t.slice(1,u),e.base=t.slice(1,p)):(e.name=t.slice(d,u),e.base=t.slice(d,p)),e.ext=t.slice(u,p)),d>0?e.dir=t.slice(0,d-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,ar=l,ar}var ar,Gn,Yn,mu=He(()=>{oe(),ae(),se(),jo(),ar={},Gn=!1,Yn=gu()}),Wo={};Rt(Wo,{URL:()=>ps,Url:()=>us,default:()=>xe,fileURLToPath:()=>Vo,format:()=>cs,parse:()=>ds,pathToFileURL:()=>Qo,resolve:()=>hs,resolveObject:()=>fs});function Ge(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Ht(i,h,o){if(i&&Ze.isObject(i)&&i instanceof Ge)return i;var a=new Ge;return a.parse(i,h,o),a}function Au(){if(ei)return hr;ei=!0;var i=De;function h(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n="",r=0,s=-1,u=0,d,p=0;p<=t.length;++p){if(p<t.length)d=t.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",r=0):(n=n.slice(0,g),r=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(s+1,p):n=t.slice(s+1,p),r=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var l={resolve:function(){for(var t="",e=!1,n,r=arguments.length-1;r>=-1&&!e;r--){var s;r>=0?s=arguments[r]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(t=s+"/"+t,e=s.charCodeAt(0)===47)}return t=o(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(h(t),t.length===0)return".";var e=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=o(t,!e),t.length===0&&!e&&(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return h(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":l.normalize(t)},relative:function(t,e){if(h(t),h(e),t===e||(t=l.resolve(t),e=l.resolve(e),t===e))return"";for(var n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var r=t.length,s=r-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(t.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=t.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=r;++b)(b===r||t.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(h(t),t.length===0)return".";for(var e=t.charCodeAt(0),n=e===47,r=-1,s=!0,u=t.length-1;u>=1;--u)if(e=t.charCodeAt(u),e===47){if(!s){r=u;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(t);var n=0,r=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var d=e.length-1,p=-1;for(u=t.length-1;u>=0;--u){var g=t.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(r=u):(d=-1,r=p))}return n===r?r=p:r===-1&&(r=t.length),t.slice(n,r)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!s){n=u+1;break}}else r===-1&&(s=!1,r=u+1);return r===-1?"":t.slice(n,r)}},extname:function(t){h(t);for(var e=-1,n=0,r=-1,s=!0,u=0,d=t.length-1;d>=0;--d){var p=t.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}r===-1&&(s=!1,r=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||r===-1||u===0||u===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return a("/",t)},parse:function(t){h(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var n=t.charCodeAt(0),r=n===47,s;r?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=t.length-1,b=0;f>=s;--f){if(n=t.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&r?e.base=e.name=t.slice(1,p):e.base=e.name=t.slice(d,p)):(d===0&&r?(e.name=t.slice(1,u),e.base=t.slice(1,p)):(e.name=t.slice(d,u),e.base=t.slice(d,p)),e.ext=t.slice(u,p)),d>0?e.dir=t.slice(0,d-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,hr=l,hr}function bu(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return fr?yu(i):wu(i)}function yu(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(rs,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<es||a>ts||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function wu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function vu(i){let h=ti.resolve(i),o=i.charCodeAt(i.length-1);(o===Xo||fr&&o===Zo)&&h[h.length-1]!==ti.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(ns,"%25")),!fr&&h.includes("\\")&&(h=h.replace(is,"%5C")),h.includes(`
4
+ `)&&(h=h.replace(os,"%0A")),h.includes("\r")&&(h=h.replace(ss,"%0D")),h.includes(" ")&&(h=h.replace(as,"%09")),a.pathname=h,a}function Vo(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return dr?_u(i):Eu(i)}function _u(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(ys,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<As||a>bs||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function Eu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function Qo(i){let h=Yn.resolve(i),o=i.charCodeAt(i.length-1);(o===ms||dr&&o===gs)&&h[h.length-1]!==Yn.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(ws,"%25")),!dr&&h.includes("\\")&&(h=h.replace(vs,"%5C")),h.includes(`
5
+ `)&&(h=h.replace(_s,"%0A")),h.includes("\r")&&(h=h.replace(Es,"%0D")),h.includes(" ")&&(h=h.replace(Ss,"%09")),a.pathname=h,a}var xe,Ko,Ze,Ho,qo,$o,zo,lr,Jn,Zn,Xn,Go,Yo,ur,Ot,cr,hr,ei,ti,Jo,Zo,Xo,es,ts,fr,rs,ns,is,os,ss,as,ls,us,cs,hs,fs,ds,ps,gs,ms,As,bs,dr,ys,ws,vs,_s,Es,Ss,Su=He(()=>{oe(),ae(),se(),uu(),hu(),du(),mu(),jo(),xe={},Ko=At,Ze={isString:function(i){return typeof i=="string"},isObject:function(i){return typeof i=="object"&&i!==null},isNull:function(i){return i===null},isNullOrUndefined:function(i){return i==null}},xe.parse=Ht,xe.resolve=function(i,h){return Ht(i,!1,!0).resolve(h)},xe.resolveObject=function(i,h){return i?Ht(i,!1,!0).resolveObject(h):h},xe.format=function(i){return Ze.isString(i)&&(i=Ht(i)),i instanceof Ge?i.format():Ge.prototype.format.call(i)},xe.Url=Ge,Ho=/^([a-z0-9.+-]+:)/i,qo=/:[0-9]*$/,$o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,zo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
6
+ `," "]),lr=["'"].concat(zo),Jn=["%","/","?",";","#"].concat(lr),Zn=["/","?","#"],Xn=/^[+a-z0-9A-Z_-]{0,63}$/,Go=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Yo={javascript:!0,"javascript:":!0},ur={javascript:!0,"javascript:":!0},Ot={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},cr=et,Ge.prototype.parse=function(i,h,o){if(!Ze.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var a=i.indexOf("?"),l=a!==-1&&a<i.indexOf("#")?"?":"#",t=i.split(l);t[0]=t[0].replace(/\\/g,"/");var e=i=t.join(l);if(e=e.trim(),!o&&i.split("#").length===1){var n=$o.exec(e);if(n)return this.path=e,this.href=e,this.pathname=n[1],n[2]?(this.search=n[2],this.query=h?cr.parse(this.search.substr(1)):this.search.substr(1)):h&&(this.search="",this.query={}),this}var r=Ho.exec(e);if(r){var s=(r=r[0]).toLowerCase();this.protocol=s,e=e.substr(r.length)}if(o||r||e.match(/^\/\/[^@\/]+@[^@\/]+/)){var u=e.substr(0,2)==="//";!u||r&&ur[r]||(e=e.substr(2),this.slashes=!0)}if(!ur[r]&&(u||r&&!Ot[r])){for(var d,p,g=-1,f=0;f<Zn.length;f++)(b=e.indexOf(Zn[f]))!==-1&&(g===-1||b<g)&&(g=b);for((p=g===-1?e.lastIndexOf("@"):e.lastIndexOf("@",g))!==-1&&(d=e.slice(0,p),e=e.slice(p+1),this.auth=decodeURIComponent(d)),g=-1,f=0;f<Jn.length;f++){var b;(b=e.indexOf(Jn[f]))!==-1&&(g===-1||b<g)&&(g=b)}g===-1&&(g=e.length),this.host=e.slice(0,g),e=e.slice(g),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var _=this.hostname.split(/\./),A=(f=0,_.length);f<A;f++){var w=_[f];if(w&&!w.match(Xn)){for(var I="",k=0,E=w.length;k<E;k++)w.charCodeAt(k)>127?I+="x":I+=w[k];if(!I.match(Xn)){var T=_.slice(0,f),O=_.slice(f+1),H=w.match(Go);H&&(T.push(H[1]),O.unshift(H[2])),O.length&&(e="/"+O.join(".")+e),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=Ko.toASCII(this.hostname));var G=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+G,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),e[0]!=="/"&&(e="/"+e))}if(!Yo[s])for(f=0,A=lr.length;f<A;f++){var U=lr[f];if(e.indexOf(U)!==-1){var $=encodeURIComponent(U);$===U&&($=escape(U)),e=e.split(U).join($)}}var z=e.indexOf("#");z!==-1&&(this.hash=e.substr(z),e=e.slice(0,z));var F=e.indexOf("?");if(F!==-1?(this.search=e.substr(F),this.query=e.substr(F+1),h&&(this.query=cr.parse(this.query)),e=e.slice(0,F)):h&&(this.search="",this.query={}),e&&(this.pathname=e),Ot[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){G=this.pathname||"";var me=this.search||"";this.path=G+me}return this.href=this.format(),this},Ge.prototype.format=function(){var i=this.auth||"";i&&(i=(i=encodeURIComponent(i)).replace(/%3A/i,":"),i+="@");var h=this.protocol||"",o=this.pathname||"",a=this.hash||"",l=!1,t="";this.host?l=i+this.host:this.hostname&&(l=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(l+=":"+this.port)),this.query&&Ze.isObject(this.query)&&Object.keys(this.query).length&&(t=cr.stringify(this.query));var e=this.search||t&&"?"+t||"";return h&&h.substr(-1)!==":"&&(h+=":"),this.slashes||(!h||Ot[h])&&l!==!1?(l="//"+(l||""),o&&o.charAt(0)!=="/"&&(o="/"+o)):l||(l=""),a&&a.charAt(0)!=="#"&&(a="#"+a),e&&e.charAt(0)!=="?"&&(e="?"+e),h+l+(o=o.replace(/[?#]/g,function(n){return encodeURIComponent(n)}))+(e=e.replace("#","%23"))+a},Ge.prototype.resolve=function(i){return this.resolveObject(Ht(i,!1,!0)).format()},Ge.prototype.resolveObject=function(i){if(Ze.isString(i)){var h=new Ge;h.parse(i,!1,!0),i=h}for(var o=new Ge,a=Object.keys(this),l=0;l<a.length;l++){var t=a[l];o[t]=this[t]}if(o.hash=i.hash,i.href==="")return o.href=o.format(),o;if(i.slashes&&!i.protocol){for(var e=Object.keys(i),n=0;n<e.length;n++){var r=e[n];r!=="protocol"&&(o[r]=i[r])}return Ot[o.protocol]&&o.hostname&&!o.pathname&&(o.path=o.pathname="/"),o.href=o.format(),o}if(i.protocol&&i.protocol!==o.protocol){if(!Ot[i.protocol]){for(var s=Object.keys(i),u=0;u<s.length;u++){var d=s[u];o[d]=i[d]}return o.href=o.format(),o}if(o.protocol=i.protocol,i.host||ur[i.protocol])o.pathname=i.pathname;else{for(var p=(i.pathname||"").split("/");p.length&&!(i.host=p.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),p[0]!==""&&p.unshift(""),p.length<2&&p.unshift(""),o.pathname=p.join("/")}if(o.search=i.search,o.query=i.query,o.host=i.host||"",o.auth=i.auth,o.hostname=i.hostname||i.host,o.port=i.port,o.pathname||o.search){var g=o.pathname||"",f=o.search||"";o.path=g+f}return o.slashes=o.slashes||i.slashes,o.href=o.format(),o}var b=o.pathname&&o.pathname.charAt(0)==="/",y=i.host||i.pathname&&i.pathname.charAt(0)==="/",_=y||b||o.host&&i.pathname,A=_,w=o.pathname&&o.pathname.split("/")||[],I=(p=i.pathname&&i.pathname.split("/")||[],o.protocol&&!Ot[o.protocol]);if(I&&(o.hostname="",o.port=null,o.host&&(w[0]===""?w[0]=o.host:w.unshift(o.host)),o.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(p[0]===""?p[0]=i.host:p.unshift(i.host)),i.host=null),_=_&&(p[0]===""||w[0]==="")),y)o.host=i.host||i.host===""?i.host:o.host,o.hostname=i.hostname||i.hostname===""?i.hostname:o.hostname,o.search=i.search,o.query=i.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),o.search=i.search,o.query=i.query;else if(!Ze.isNullOrUndefined(i.search))return I&&(o.hostname=o.host=w.shift(),(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),o.search=i.search,o.query=i.query,Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o;if(!w.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var k=w.slice(-1)[0],E=(o.host||i.host||w.length>1)&&(k==="."||k==="..")||k==="",T=0,O=w.length;O>=0;O--)(k=w[O])==="."?w.splice(O,1):k===".."?(w.splice(O,1),T++):T&&(w.splice(O,1),T--);if(!_&&!A)for(;T--;T)w.unshift("..");!_||w[0]===""||w[0]&&w[0].charAt(0)==="/"||w.unshift(""),E&&w.join("/").substr(-1)!=="/"&&w.push("");var H,G=w[0]===""||w[0]&&w[0].charAt(0)==="/";return I&&(o.hostname=o.host=G?"":w.length?w.shift():"",(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),(_=_||o.host&&w.length)&&!G&&w.unshift(""),w.length?o.pathname=w.join("/"):(o.pathname=null,o.path=null),Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=i.auth||o.auth,o.slashes=o.slashes||i.slashes,o.href=o.format(),o},Ge.prototype.parseHost=function(){var i=this.host,h=qo.exec(i);h&&((h=h[0])!==":"&&(this.port=h.substr(1)),i=i.substr(0,i.length-h.length)),i&&(this.hostname=i)},xe.Url,xe.format,xe.resolve,xe.resolveObject,hr={},ei=!1,ti=Au(),Jo=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=vu,xe.fileURLToPath=bu,xe.Url,xe.format,xe.resolve,xe.resolveObject,xe.URL,Zo=92,Xo=47,es=97,ts=122,fr=Jo==="win32",rs=/\//g,ns=/%/g,is=/\\/g,os=/\n/g,ss=/\r/g,as=/\t/g,ls=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=Qo,xe.fileURLToPath=Vo,us=xe.Url,cs=xe.format,hs=xe.resolve,fs=xe.resolveObject,ds=xe.parse,ps=xe.URL,gs=92,ms=47,As=97,bs=122,dr=ls==="win32",ys=/\//g,ws=/%/g,vs=/\\/g,_s=/\n/g,Es=/\r/g,Ss=/\t/g}),Cu=fe((i,h)=>{oe(),ae(),se(),h.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),ri=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.BufferedDuplex=void 0,i.writev=a;var h=St(),o=(Ve(),Be(We));function a(t,e){let n=new Array(t.length);for(let r=0;r<t.length;r++)typeof t[r].chunk=="string"?n[r]=o.Buffer.from(t[r].chunk,"utf8"):n[r]=t[r].chunk;this._write(o.Buffer.concat(n),"binary",e)}var l=class extends h.Duplex{constructor(t,e,n){super({objectMode:!0}),this.proxy=e,this.socket=n,this.writeQueue=[],t.objectMode||(this._writev=a.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",r=>{!this.destroyed&&this.readable&&this.push(r)})}_read(t){this.proxy.read(t)}_write(t,e,n){this.isSocketOpen?this.writeToProxy(t,e,n):this.writeQueue.push({chunk:t,encoding:e,cb:n})}_final(t){this.writeQueue=[],this.proxy.end(t)}_destroy(t,e){this.writeQueue=[],this.proxy.destroy(),e(t)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(t,e,n){this.proxy.write(t,e)===!1?this.proxy.once("drain",n):n()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:t,encoding:e,cb:n}=this.writeQueue.shift();this.writeToProxy(t,e,n)}}};i.BufferedDuplex=l}),pr=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(i,"__esModule",{value:!0}),i.streamBuilder=i.browserStreamBuilder=void 0;var o=(Ve(),Be(We)),a=h(Cu()),l=h(at()),t=St(),e=h(ir()),n=ri(),r=(0,l.default)("mqttjs:ws"),s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function u(_,A){let w=`${_.protocol}://${_.hostname}:${_.port}${_.path}`;return typeof _.transformWsUrl=="function"&&(w=_.transformWsUrl(w,_,A)),w}function d(_){let A=_;return _.port||(_.protocol==="wss"?A.port=443:A.port=80),_.path||(A.path="/"),_.wsOptions||(A.wsOptions={}),!e.default&&!_.forceNativeWebSocket&&_.protocol==="wss"&&s.forEach(w=>{Object.prototype.hasOwnProperty.call(_,w)&&!Object.prototype.hasOwnProperty.call(_.wsOptions,w)&&(A.wsOptions[w]=_[w])}),A}function p(_){let A=d(_);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let w=new URL(document.URL);A.hostname=w.hostname,A.port||(A.port=Number(w.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function g(_,A,w){r("createWebSocket"),r(`protocol: ${w.protocolId} ${w.protocolVersion}`);let I=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";r(`creating new Websocket for url: ${A} and protocol: ${I}`);let k;return w.createWebsocket?k=w.createWebsocket(A,[I],w):k=new a.default(A,[I],w.wsOptions),k}function f(_,A){let w=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",I=u(A,_),k;return A.createWebsocket?k=A.createWebsocket(I,[w],A):k=new WebSocket(I,[w]),k.binaryType="arraybuffer",k}var b=(_,A)=>{r("streamBuilder");let w=d(A);w.hostname=w.hostname||w.host||"localhost";let I=u(w,_),k=g(_,I,w),E=a.default.createWebSocketStream(k,w.wsOptions);return E.url=I,k.on("close",()=>{E.destroy()}),E};i.streamBuilder=b;var y=(_,A)=>{r("browserStreamBuilder");let w,I=p(A).browserBufferSize||1024*512,k=A.browserBufferTimeout||1e3,E=!A.objectMode,T=f(_,A),O=G(A,F,me);A.objectMode||(O._writev=n.writev.bind(O)),O.on("close",()=>{T.close()});let H=typeof T.addEventListener<"u";T.readyState===T.OPEN?(w=O,w.socket=T):(w=new n.BufferedDuplex(A,O,T),H?T.addEventListener("open",de):T.onopen=de),H?(T.addEventListener("close",U),T.addEventListener("error",$),T.addEventListener("message",z)):(T.onclose=U,T.onerror=$,T.onmessage=z);function G(le,pe,we){let Q=new t.Transform({objectMode:le.objectMode});return Q._write=pe,Q._flush=we,Q}function de(){r("WebSocket onOpen"),w instanceof n.BufferedDuplex&&w.socketReady()}function U(le){r("WebSocket onClose",le),w.end(),w.destroy()}function $(le){r("WebSocket onError",le);let pe=new Error("WebSocket error");pe.event=le,w.destroy(pe)}async function z(le){if(!O||O.destroyed||!O.readable)return;let{data:pe}=le;pe instanceof ArrayBuffer?pe=o.Buffer.from(pe):pe instanceof Blob?pe=o.Buffer.from(await new Response(pe).arrayBuffer()):pe=o.Buffer.from(pe,"utf8"),O.push(pe)}function F(le,pe,we){if(T.bufferedAmount>I){setTimeout(F,k,le,pe,we);return}E&&typeof le=="string"&&(le=o.Buffer.from(le,"utf8"));try{T.send(le)}catch(Q){return we(Q)}we()}function me(le){T.close(),le()}return w};i.browserStreamBuilder=y}),ni={};Rt(ni,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>Cs,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var Cs,ks=He(()=>{oe(),ae(),se(),Cs={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me}}),Ts=fe((i,h)=>{oe(),ae(),se(),h.exports={}}),Is=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(i,"__esModule",{value:!0});var o=h((ks(),Be(ni))),a=h(at()),l=h(Ts()),t=(0,a.default)("mqttjs:tcp"),e=(n,r)=>{if(r.port=r.port||1883,r.hostname=r.hostname||r.host||"localhost",r.socksProxy)return(0,l.default)(r.hostname,r.port,r.socksProxy,{timeout:r.socksTimeout});let{port:s,path:u}=r,d=r.hostname;return t("port %d and host %s",s,d),o.default.createConnection({port:s,host:d,path:u})};i.default=e}),Bs={};Rt(Bs,{default:()=>Os});var Os,ku=He(()=>{oe(),ae(),se(),Os={}}),xs=fe(i=>{oe(),ae(),se();var h=i&&i.__rest||function(u,d){var p={};for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&d.indexOf(g)<0&&(p[g]=u[g]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,g=Object.getOwnPropertySymbols(u);f<g.length;f++)d.indexOf(g[f])<0&&Object.prototype.propertyIsEnumerable.call(u,g[f])&&(p[g[f]]=u[g[f]]);return p},o=i&&i.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(i,"__esModule",{value:!0});var a=o((ku(),Be(Bs))),l=o((ks(),Be(ni))),t=o(at()),e=o(Ts()),n=(0,t.default)("mqttjs:tls");function r(u){let{host:d,port:p,socksProxy:g}=u,f=h(u,["host","port","socksProxy"]);return a.default.connect(g?Object.assign(Object.assign({},f),{socket:(0,e.default)(d,p,g,{timeout:u.socksTimeout})}):u)}var s=(u,d)=>{d.port=d.port||8883,d.host=d.hostname||d.host||"localhost",l.default.isIP(d.host)===0&&(d.servername=d.host),d.rejectUnauthorized=d.rejectUnauthorized!==!1,delete d.path,n("port %d host %s rejectUnauthorized %b",d.port,d.host,d.rejectUnauthorized);let p=r(d);p.on("secureConnect",()=>{d.rejectUnauthorized&&!p.authorized?p.emit("error",new Error("TLS not authorized")):p.removeListener("error",g)});function g(f){d.rejectUnauthorized&&u.emit("error",f),p.end()}return p.on("error",g),p};i.default=s}),Ps=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,t,e;function n(){let p=new o.Transform;return p._write=(g,f,b)=>{l.send({data:g.buffer,success(){b()},fail(y){b(new Error(y))}})},p._flush=g=>{l.close({success(){g()}})},p}function r(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function s(p,g){let f=p.protocol==="wxs"?"wss":"ws",b=`${f}://${p.hostname}${p.path}`;return p.port&&p.port!==80&&p.port!==443&&(b=`${f}://${p.hostname}:${p.port}${p.path}`),typeof p.transformWsUrl=="function"&&(b=p.transformWsUrl(b,p,g)),b}function u(){l.onOpen(()=>{e.socketReady()}),l.onMessage(p=>{let{data:g}=p;g instanceof ArrayBuffer?g=h.Buffer.from(g):g=h.Buffer.from(g,"utf8"),t.push(g)}),l.onClose(()=>{e.emit("close"),e.end(),e.destroy()}),l.onError(p=>{let g=new Error(p.errMsg);e.destroy(g)})}var d=(p,g)=>{if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let f=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";r(g);let b=s(g,p);l=wx.connectSocket({url:b,protocols:[f]}),t=n(),e=new a.BufferedDuplex(g,t,l),e._destroy=(_,A)=>{l.close({success(){A&&A(_)}})};let y=e.destroy;return e.destroy=(_,A)=>(e.destroy=y,setTimeout(()=>{l.close({fail(){e._destroy(_,A)}})},0),e),u(),e};i.default=d}),Rs=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,t,e,n=!1;function r(){let g=new o.Transform;return g._write=(f,b,y)=>{l.sendSocketMessage({data:f.buffer,success(){y()},fail(){y(new Error)}})},g._flush=f=>{l.closeSocket({success(){f()}})},g}function s(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function u(g,f){let b=g.protocol==="alis"?"wss":"ws",y=`${b}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(y=`${b}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(y=g.transformWsUrl(y,g,f)),y}function d(){n||(n=!0,l.onSocketOpen(()=>{e.socketReady()}),l.onSocketMessage(g=>{if(typeof g.data=="string"){let f=h.Buffer.from(g.data,"base64");t.push(f)}else{let f=new FileReader;f.addEventListener("load",()=>{let b=f.result;b instanceof ArrayBuffer?b=h.Buffer.from(b):b=h.Buffer.from(b,"utf8"),t.push(b)}),f.readAsArrayBuffer(g.data)}}),l.onSocketClose(()=>{e.end(),e.destroy()}),l.onSocketError(g=>{e.destroy(g)}))}var p=(g,f)=>{if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");let b=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";s(f);let y=u(f,g);return l=f.my,l.connectSocket({url:y,protocols:b}),t=r(),e=new a.BufferedDuplex(f,t,l),d(),e};i.default=p}),Tu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0}),i.connectAsync=u;var o=h(at()),a=h((Su(),Be(Wo))),l=h(Wn()),t=h(ir());typeof ke?.nextTick!="function"&&(ke.nextTick=setImmediate);var e=(0,o.default)("mqttjs"),n=null;function r(d){let p;d.auth&&(p=d.auth.match(/^(.+):(.+)$/),p?(d.username=p[1],d.password=p[2]):d.username=d.auth)}function s(d,p){var g,f,b;if(e("connecting to an MQTT broker..."),typeof d=="object"&&!p&&(p=d,d=""),p=p||{},d&&typeof d=="string"){let A=a.default.parse(d,!0),w={};if(A.port!=null&&(w.port=Number(A.port)),w.host=A.hostname,w.query=A.query,w.auth=A.auth,w.protocol=A.protocol,w.path=A.path,p=Object.assign(Object.assign({},w),p),!p.protocol)throw new Error("Missing protocol");p.protocol=p.protocol.replace(/:$/,"")}if(p.unixSocket=p.unixSocket||((g=p.protocol)===null||g===void 0?void 0:g.includes("+unix")),p.unixSocket?p.protocol=p.protocol.replace("+unix",""):!(!((f=p.protocol)===null||f===void 0)&&f.startsWith("ws"))&&!(!((b=p.protocol)===null||b===void 0)&&b.startsWith("wx"))&&delete p.path,r(p),p.query&&typeof p.query.clientId=="string"&&(p.clientId=p.query.clientId),t.default||p.unixSocket?p.socksProxy=void 0:p.socksProxy===void 0&&typeof ke<"u"&&(p.socksProxy=ke.env.MQTTJS_SOCKS_PROXY),p.cert&&p.key)if(p.protocol){if(["mqtts","wss","wxs","alis"].indexOf(p.protocol)===-1)switch(p.protocol){case"mqtt":p.protocol="mqtts";break;case"ws":p.protocol="wss";break;case"wx":p.protocol="wxs";break;case"ali":p.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(n||(n={},!t.default&&!p.forceNativeWebSocket?(n.ws=pr().streamBuilder,n.wss=pr().streamBuilder,n.mqtt=Is().default,n.tcp=Is().default,n.ssl=xs().default,n.tls=n.ssl,n.mqtts=xs().default):(n.ws=pr().browserStreamBuilder,n.wss=pr().browserStreamBuilder,n.wx=Ps().default,n.wxs=Ps().default,n.ali=Rs().default,n.alis=Rs().default)),!n[p.protocol]){let A=["mqtts","wss"].indexOf(p.protocol)!==-1;p.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((w,I)=>A&&I%2===0?!1:typeof n[w]=="function")[0]}if(p.clean===!1&&!p.clientId)throw new Error("Missing clientId for unclean clients");p.protocol&&(p.defaultProtocol=p.protocol);function y(A){return p.servers&&((!A._reconnectCount||A._reconnectCount===p.servers.length)&&(A._reconnectCount=0),p.host=p.servers[A._reconnectCount].host,p.port=p.servers[A._reconnectCount].port,p.protocol=p.servers[A._reconnectCount].protocol?p.servers[A._reconnectCount].protocol:p.defaultProtocol,p.hostname=p.host,A._reconnectCount++),e("calling streambuilder for",p.protocol),n[p.protocol](A,p)}let _=new l.default(y,p);return _.on("error",()=>{}),_}function u(d,p,g=!0){return new Promise((f,b)=>{let y=s(d,p),_={connect:w=>{A(),f(y)},end:()=>{A(),f(y)},error:w=>{A(),y.end(),b(w)}};g===!1&&(_.close=()=>{_.error(new Error("Couldn't connect to server"))});function A(){Object.keys(_).forEach(w=>{y.off(w,_[w])})}Object.keys(_).forEach(w=>{y.on(w,_[w])})})}i.default=s}),Ms=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(g,f,b,y){y===void 0&&(y=b);var _=Object.getOwnPropertyDescriptor(f,b);(!_||("get"in _?!f.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return f[b]}}),Object.defineProperty(g,y,_)}:function(g,f,b,y){y===void 0&&(y=b),g[y]=f[b]}),o=i&&i.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),a=i&&i.__importStar||(function(){var g=function(f){return g=Object.getOwnPropertyNames||function(b){var y=[];for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[y.length]=_);return y},g(f)};return function(f){if(f&&f.__esModule)return f;var b={};if(f!=null)for(var y=g(f),_=0;_<y.length;_++)y[_]!=="default"&&h(b,f,y[_]);return o(b,f),b}})(),l=i&&i.__exportStar||function(g,f){for(var b in g)b!=="default"&&!Object.prototype.hasOwnProperty.call(f,b)&&h(f,g,b)},t=i&&i.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=i.KeepaliveManager=i.UniqueMessageIdProvider=i.DefaultMessageIdProvider=i.Store=i.MqttClient=i.connectAsync=i.connect=i.Client=void 0;var e=t(Wn());i.MqttClient=e.default;var n=t(yo());i.DefaultMessageIdProvider=n.default;var r=t(lu());i.UniqueMessageIdProvider=r.default;var s=t(wo());i.Store=s.default;var u=a(Tu());i.connect=u.default,Object.defineProperty(i,"connectAsync",{enumerable:!0,get:function(){return u.connectAsync}});var d=t(To());i.KeepaliveManager=d.default,i.Client=e.default,l(Wn(),i),l(Dt(),i);var p=nr();Object.defineProperty(i,"ReasonCodes",{enumerable:!0,get:function(){return p.ReasonCodes}})}),Iu=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(e,n,r,s){s===void 0&&(s=r);var u=Object.getOwnPropertyDescriptor(n,r);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,s,u)}:function(e,n,r,s){s===void 0&&(s=r),e[s]=n[r]}),o=i&&i.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),a=i&&i.__importStar||(function(){var e=function(n){return e=Object.getOwnPropertyNames||function(r){var s=[];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(s[s.length]=u);return s},e(n)};return function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var s=e(n),u=0;u<s.length;u++)s[u]!=="default"&&h(r,n,s[u]);return o(r,n),r}})(),l=i&&i.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&h(n,e,r)};Object.defineProperty(i,"__esModule",{value:!0});var t=a(Ms());i.default=t,l(Ms(),i)});const Bu=Iu();const Ou=async i=>{if(i.host&&i.port&&!await xu(i.host,i.port))return;const h=C.ref(),o=C.ref({});return C.onMounted(()=>{h.value=Bu.connect(i),i.topics||(i.topics=["#"]);for(const a of i.topics)h.value.subscribe(a,l=>{if(l)throw l});h.value.on("message",(a,l)=>{o.value[a]||(o.value[a]=[]),o.value[a].push(l.toString())})}),C.onUnmounted(()=>{h.value?.end()}),{messages:o}},xu=async(i,h)=>{try{const o=new AbortController,a=setTimeout(()=>o.abort(),2e3);try{return await fetch(`${i}:${h}`,{mode:"no-cors",signal:o.signal}),clearTimeout(a),!0}catch(l){if(clearTimeout(a),l instanceof DOMException&&l.name==="AbortError")return!1;const t=String(l);return!(t.includes("NetworkError")||t.includes("Failed to fetch")||t.includes("net::ERR_CONNECTION_REFUSED"))}}catch{return!1}};function Pu(i){i.component("ActionFooter",fi),i.component("BeamArrow",di),i.component("BeamBtn",pi),i.component("BeamDayDivider",gr),i.component("BeamFilter",gi),i.component("BeamFilterOption",bi),i.component("BeamHeading",yi),i.component("BeamMetadata",wi),i.component("BeamModal",vi),i.component("BeamModalOutlet",_i),i.component("BeamProgress",Ei),i.component("Confirm",Si),i.component("FixedTop",Ci),i.component("ItemCheck",vr),i.component("ItemCount",_r),i.component("ListAnchor",ki),i.component("ListItem",zt),i.component("ListView",Ti),i.component("Navbar",Ii),i.component("ScanInput",xi),i.component("SegmentedDisplay",Pi),i.component("SplitColumn",Ri),i.component("ToggleArrow",Mi)}Te.ActionFooter=fi,Te.BeamArrow=di,Te.BeamBtn=pi,Te.BeamDayDivider=gr,Te.BeamFilter=gi,Te.BeamFilterOption=bi,Te.BeamHeading=yi,Te.BeamMetadata=wi,Te.BeamModal=vi,Te.BeamModalOutlet=_i,Te.BeamProgress=Ei,Te.Confirm=Si,Te.FixedTop=Ci,Te.ItemCheck=vr,Te.ItemCount=_r,Te.ListAnchor=ki,Te.ListItem=zt,Te.ListView=Ti,Te.Navbar=Ii,Te.ScanInput=xi,Te.SegmentedDisplay=Pi,Te.SplitColumn=Ri,Te.ToggleArrow=Mi,Te.install=Pu,Te.useMqttStream=Ou,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})}));
14
7
  //# sourceMappingURL=beam.umd.cjs.map