@stonecrop/beam 0.4.18 → 0.4.19
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/assets/index.css +1 -1
- package/dist/beam.js +593 -593
- package/dist/beam.js.map +1 -1
- package/dist/beam.umd.cjs +2 -2
- package/dist/beam.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ItemCount.vue +3 -3
package/dist/beam.umd.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(Te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],E):(Te=typeof globalThis<"u"?globalThis:Te||self,E(Te["@stonecrop/beam"]={},Te.Vue))})(this,function(Te,E){"use strict";var lc=Object.defineProperty;var Aa=Te=>{throw TypeError(Te)};var uc=(Te,E,ze)=>E in Te?lc(Te,E,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Te[E]=ze;var He=(Te,E,ze)=>uc(Te,typeof E!="symbol"?E+"":E,ze),Mi=(Te,E,ze)=>E.has(Te)||Aa("Cannot "+ze);var B=(Te,E,ze)=>(Mi(Te,E,"read from private field"),ze?ze.call(Te):E.get(Te)),Ue=(Te,E,ze)=>E.has(Te)?Aa("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(Te):E.set(Te,ze),Oe=(Te,E,ze,er)=>(Mi(Te,E,"write to private field"),er?er.call(Te,ze):E.set(Te,ze),ze),ke=(Te,E,ze)=>(Mi(Te,E,"access private method"),ze);var Nr=(Te,E,ze,er)=>({set _(Wr){Oe(Te,E,Wr,ze)},get _(){return B(Te,E,er)}});var ze=document.createElement("style");ze.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-94fbdac5]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-94fbdac5]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-94fbdac5]{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-63a79e46]{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-63a79e46]{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-63a79e46]{font-size:1rem}.beam_filters-options[data-v-63a79e46]{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-63a79e46]{flex-direction:column}}.beam_filter-option[data-v-be55508c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-be55508c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-be55508c]{align-items:stretch;-webkit-appearance:none;-moz-appearance:none;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-be55508c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-be55508c]{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-be55508c]{display:flex;align-items:center}svg[data-v-be55508c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-be55508c]{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-be55508c]{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-be55508c]:hover{background:var(--sc-primary-color)}.selected[data-v-be55508c],.selected[data-v-be55508c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-be55508c]{flex-grow:1;max-width:300px;width:50%}@media (max-width: 479px){.beam_filter-container[data-v-be55508c]{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-4f3f0253]{position:fixed;top:0;right:0;bottom:0;left: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-14a5f31b]{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-14a5f31b]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-14a5f31b]{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-14a5f31b]{background-color:#fff}.container input:checked~.checkmark[data-v-14a5f31b]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-14a5f31b]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-14a5f31b]:after{display:block}.container .checkmark[data-v-14a5f31b]: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-ec1a0218]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-ec1a0218]{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-140e435e]{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-140e435e]{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-c65440c0]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width: 400px){.two-column[data-v-c65440c0]{flex-direction:column;gap:0}}.column[data-v-c65440c0]{flex-grow:1;width:50%}@media screen and (max-width: 400px){.column[data-v-c65440c0]{width:100%}}.column-right[data-v-c65440c0]{text-align:right}@media screen and (max-width: 400px){.column-right[data-v-c65440c0]{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,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AAEAAAAIAAAAAAAEAAAAAAAAAAEAAAAAzD2izwAAAADPr89TAAAAAM+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(ze);const er={class:"beam_action-footer"},Wr={class:"footer-action-wrapper"},Ta=E.defineComponent({__name:"ActionFooter",emits:["click"],setup(o,{emit:h}){const i=h,a=()=>{i("click")};return(l,r)=>{const e=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("footer",er,[E.createElementVNode("span",Wr,[E.createVNode(e,{onClick:a},{default:E.withCtx(()=>[E.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Ye=(o,h)=>{const i=o.__vccOpts||o;for(const[a,l]of h)i[a]=l;return i},Wi=Ye(Ta,[["__scopeId","data-v-37933bd1"]]),Ba={class:"beam_metadata_arrow"},Oa={class:"beam_metadata_arrow-head"},Pa={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},Vi=Ye(E.defineComponent({__name:"BeamArrow",props:{color:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",Ba,[E.createElementVNode("div",{class:"beam_metadata_arrow-body",style:E.normalizeStyle({background:h.color||"#c4c4c4"})},null,4),E.createElementVNode("div",Oa,[(E.openBlock(),E.createElementBlock("svg",Pa,[E.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:E.normalizeStyle([{fill:"#c4c4c4"},{fill:h.color||"#c4c4c4"}])},null,4)]))])]))}}),[["__scopeId","data-v-94fbdac5"]]),xa={},Ra={class:"beam_btn"};function Ma(o,h){return E.openBlock(),E.createElementBlock("button",Ra,[E.renderSlot(o.$slots,"default",{},()=>[h[0]||(h[0]=E.createTextVNode("Action"))],!0)])}const Qi=Ye(xa,[["render",Ma],["__scopeId","data-v-bc768596"]]),Ua={class:"beam_day-divider"},Vr=Ye(E.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(o){const h=E.computed(()=>{if(!o.item.date||isNaN(Date.parse(o.item.date)))return o.item.date;const i=new Date(o.item.date);if(o.item.dateFormat)switch(o.item.dateFormat.toLowerCase()){case"iso":return i.toISOString()}return i.toDateString()});return(i,a)=>(E.openBlock(),E.createElementBlock(E.Fragment,null,[E.createElementVNode("div",Ua,[E.createElementVNode("h2",null,E.toDisplayString(h.value),1)]),E.renderSlot(i.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),Da={class:"beam_filters"},La={class:"beam_filters-options"},Ki=Ye(E.defineComponent({__name:"BeamFilter",setup(o){const h=E.ref(!1);return(i,a)=>{const l=E.resolveComponent("ToggleArrow"),r=E.resolveComponent("BeamHeading");return E.openBlock(),E.createElementBlock("div",Da,[E.createElementVNode("div",{onClick:a[0]||(a[0]=e=>h.value=!h.value),class:"beam_filters-heading"},[E.createVNode(l,{open:h.value},null,8,["open"]),E.createVNode(r,null,{default:E.withCtx(()=>a[1]||(a[1]=[E.createTextVNode("Filter")])),_:1,__:[1]})]),E.withDirectives(E.createElementVNode("div",La,[E.renderSlot(i.$slots,"default",{},void 0,!0)],512),[[E.vShow,h.value]])])}}}),[["__scopeId","data-v-63a79e46"]]);function Hi(o){return E.getCurrentScope()?(E.onScopeDispose(o),!0):!1}const qi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Na=Object.prototype.toString,Fa=o=>Na.call(o)==="[object Object]",wt=()=>{},Qr=ja();function ja(){var o,h;return qi&&((o=window==null?void 0:window.navigator)==null?void 0:o.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((h=window==null?void 0:window.navigator)==null?void 0:h.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Wa(...o){if(o.length!==1)return E.toRef(...o);const h=o[0];return typeof h=="function"?E.readonly(E.customRef(()=>({get:h,set:wt}))):E.ref(h)}function Va(o,h){function i(...a){return new Promise((l,r)=>{Promise.resolve(o(()=>h.apply(this,a),{fn:h,thisArg:this,args:a})).then(l).catch(r)})}return i}function Qa(o,h={}){let i,a,l=wt;const r=t=>{clearTimeout(t),l(),l=wt};let e;return t=>{const s=E.toValue(o),u=E.toValue(h.maxWait);return i&&r(i),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(()=>{i&&r(i),a=void 0,d(e())},u)),i=setTimeout(()=>{a&&r(a),a=void 0,d(t())},s)})}}function Kr(o){return Array.isArray(o)?o:[o]}function Ka(o,h=200,i={}){return Va(Qa(h,i),o)}function Ha(o,h,i){return E.watch(o,h,{...i,immediate:!0})}const $i=qi?window:void 0;function sr(o){var h;const i=E.toValue(o);return(h=i==null?void 0:i.$el)!=null?h:i}function mr(...o){const h=[],i=()=>{h.forEach(n=>n()),h.length=0},a=(n,t,s,u)=>(n.addEventListener(t,s,u),()=>n.removeEventListener(t,s,u)),l=E.computed(()=>{const n=Kr(E.toValue(o[0])).filter(t=>t!=null);return n.every(t=>typeof t!="string")?n:void 0}),r=Ha(()=>{var n,t;return[(t=(n=l.value)==null?void 0:n.map(s=>sr(s)))!=null?t:[$i].filter(s=>s!=null),Kr(E.toValue(l.value?o[1]:o[0])),Kr(E.unref(l.value?o[2]:o[1])),E.toValue(l.value?o[3]:o[2])]},([n,t,s,u])=>{if(i(),!(n!=null&&n.length)||!(t!=null&&t.length)||!(s!=null&&s.length))return;const d=Fa(u)?{...u}:u;h.push(...n.flatMap(p=>t.flatMap(m=>s.map(A=>a(p,m,A,d)))))},{flush:"post"}),e=()=>{r(),i()};return Hi(i),e}let zi=!1;function Gi(o,h,i={}){const{window:a=$i,ignore:l=[],capture:r=!0,detectIframe:e=!1,controls:n=!1}=i;if(!a)return n?{stop:wt,cancel:wt,trigger:wt}:wt;if(Qr&&!zi){zi=!0;const w={passive:!0};Array.from(a.document.body.children).forEach(C=>C.addEventListener("click",wt,w)),a.document.documentElement.addEventListener("click",wt,w)}let t=!0;const s=w=>E.toValue(l).some(C=>{if(typeof C=="string")return Array.from(a.document.querySelectorAll(C)).some(b=>b===w.target||w.composedPath().includes(b));{const b=sr(C);return b&&(w.target===b||w.composedPath().includes(b))}});function u(w){const C=E.toValue(w);return C&&C.$.subTree.shapeFlag===16}function d(w,C){const b=E.toValue(w),_=b.$.subTree&&b.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some(N=>N.el===C.target||C.composedPath().includes(N.el))}const p=w=>{const C=sr(o);if(w.target!=null&&!(!(C instanceof Element)&&u(o)&&d(o,w))&&!(!C||C===w.target||w.composedPath().includes(C))){if("detail"in w&&w.detail===0&&(t=!s(w)),!t){t=!0;return}h(w)}};let m=!1;const A=[mr(a,"click",w=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(w))},{passive:!0,capture:r}),mr(a,"pointerdown",w=>{const C=sr(o);t=!s(w)&&!!(C&&!w.composedPath().includes(C))},{passive:!0}),e&&mr(a,"blur",w=>{setTimeout(()=>{var C;const b=sr(o);((C=a.document.activeElement)==null?void 0:C.tagName)==="IFRAME"&&!(b!=null&&b.contains(a.document.activeElement))&&h(w)},0)},{passive:!0})].filter(Boolean),y=()=>A.forEach(w=>w());return n?{stop:y,cancel:()=>{t=!1},trigger:w=>{t=!0,p(w),t=!1}}:y}const Hr=new WeakMap,qa={mounted(o,h){const i=!h.modifiers.bubble;let a;if(typeof h.value=="function")a=Gi(o,h.value,{capture:i});else{const[l,r]=h.value;a=Gi(o,l,Object.assign({capture:i},r))}Hr.set(o,a)},unmounted(o){const h=Hr.get(o);h&&typeof h=="function"?h():h==null||h.stop(),Hr.delete(o)}};function qr(o){return typeof Window<"u"&&o instanceof Window?o.document.documentElement:typeof Document<"u"&&o instanceof Document?o.documentElement:o}function Yi(o){const h=window.getComputedStyle(o);if(h.overflowX==="scroll"||h.overflowY==="scroll"||h.overflowX==="auto"&&o.clientWidth<o.scrollWidth||h.overflowY==="auto"&&o.clientHeight<o.scrollHeight)return!0;{const i=o.parentNode;return!i||i.tagName==="BODY"?!1:Yi(i)}}function $a(o){const h=o||window.event,i=h.target;return Yi(i)?!1:h.touches.length>1?!0:(h.preventDefault&&h.preventDefault(),!1)}const $r=new WeakMap;function za(o,h=!1){const i=E.shallowRef(h);let a=null,l="";E.watch(Wa(o),n=>{const t=qr(E.toValue(n));if(t){const s=t;if($r.get(s)||$r.set(s,s.style.overflow),s.style.overflow!=="hidden"&&(l=s.style.overflow),s.style.overflow==="hidden")return i.value=!0;if(i.value)return s.style.overflow="hidden"}},{immediate:!0});const r=()=>{const n=qr(E.toValue(o));!n||i.value||(Qr&&(a=mr(n,"touchmove",t=>{$a(t)},{passive:!1})),n.style.overflow="hidden",i.value=!0)},e=()=>{const n=qr(E.toValue(o));!n||!i.value||(Qr&&(a==null||a()),n.style.overflow=l,$r.delete(n),i.value=!1)};return Hi(e),E.computed({get(){return i.value},set(n){n?r():e()}})}function Ga(){let o=!1;const h=E.shallowRef(!1);return(i,a)=>{if(h.value=a.value,o)return;o=!0;const l=za(i,a.value);E.watch(h,r=>l.value=r)}}Ga();const Ya={class:"beam_filter-container"},Ja={class:"beam_filter-option-select"},Za={class:"beam_filter-label"},Xa={key:0,ref:"menu",class:"beam_filter-select-menu"},el=["data-value","onClick"],Ji=Ye(E.defineComponent({__name:"BeamFilterOption",props:{choices:{default:()=>[]},title:{default:"title"}},emits:["select"],setup(o,{emit:h}){const i=h,a=E.ref(!1),l=E.ref(o.choices[0].label),r=E.ref(o.choices[0].value),e=n=>{l.value=n.label,r.value=n.value,i("select",n)};return(n,t)=>{const s=E.resolveComponent("BeamHeading");return E.withDirectives((E.openBlock(),E.createElementBlock("div",Ya,[E.createVNode(s,{class:"beam_filter-option-heading"},{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(n.title),1)]),_:1}),E.createElementVNode("div",{onClick:t[0]||(t[0]=u=>a.value=!a.value),class:"beam_filter-option"},[E.createElementVNode("div",Ja,[t[1]||(t[1]=E.createElementVNode("div",{class:"beam_filter-arrow"},[E.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[E.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),E.createElementVNode("div",Za,[E.createElementVNode("label",null,E.toDisplayString(l.value),1)])]),a.value?(E.openBlock(),E.createElementBlock("ul",Xa,[(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(n.choices,u=>(E.openBlock(),E.createElementBlock("li",{class:E.normalizeClass([{selected:l.value==u.label},"beam_filter-select-option"]),"data-value":u.value,key:u.value,onClick:d=>e(u)},E.toDisplayString(u.label),11,el))),128))],512)):E.createCommentVNode("",!0)])])),[[E.unref(qa),()=>a.value=!1]])}}}),[["__scopeId","data-v-be55508c"]]),tl={},rl={class:"beam_header"};function nl(o,h){return E.openBlock(),E.createElementBlock("h1",rl,[E.renderSlot(o.$slots,"default",{},void 0,!0)])}const Zi=Ye(tl,[["render",nl],["__scopeId","data-v-5182a4d5"]]),il={class:"beam_metadata"},ol={class:"beam_metadata_content"},sl={class:"beam_metadata_block"},al={class:"beam_metadata_heading"},Xi=Ye(E.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",il,[E.createElementVNode("div",ol,[E.renderSlot(h.$slots,"default",{},()=>[i[1]||(i[1]=E.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),E.createElementVNode("div",sl,[E.createElementVNode("p",al,[i[0]||(i[0]=E.createTextVNode(" Status: ")),E.createElementVNode("span",{class:E.normalizeClass([{alert:!h.order.complete},"beam_metadata--normal"])},E.toDisplayString(h.order.complete?"Complete":"In Progress"),3)])]),i[2]||(i[2]=E.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)]),i[3]||(i[3]=E.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),ll={class:"beam_modal"},eo=Ye(E.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},setup(o){return(h,i)=>{const a=E.resolveComponent("BeamBtn"),l=E.resolveComponent("portal");return E.openBlock(),E.createBlock(l,{to:"beam_modal_outlet"},{default:E.withCtx(()=>[E.withDirectives(E.createElementVNode("div",ll,[E.createVNode(a,{onClick:i[0]||(i[0]=r=>h.$emit("closemodal"))},{default:E.withCtx(()=>i[3]||(i[3]=[E.createTextVNode("Close Modal")])),_:1,__:[3]}),E.renderSlot(h.$slots,"default",{onClosemodal:i[1]||(i[1]=r=>h.$emit("closemodal")),onConfirmmodal:i[2]||(i[2]=r=>h.$emit("confirmmodal"))},void 0,!0)],512),[[E.vShow,h.showModal]])]),_:3})}}}),[["__scopeId","data-v-4f3f0253"]]),to=E.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(o){return(h,i)=>{const a=E.resolveComponent("portal-target");return E.openBlock(),E.createBlock(a,{name:"beam_modal_outlet"})}}}),ul={class:"beam_metadata_heading"},ro=E.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(o){const h=E.computed(()=>o.complete?o.completeMessage:o.progressMessage);return(i,a)=>(E.openBlock(),E.createElementBlock("p",ul,[E.createTextVNode(E.toDisplayString(i.label)+": ",1),E.createElementVNode("span",{class:E.normalizeClass([{"beam--alert":!i.complete},"beam--normal"])},E.toDisplayString(h.value),3)]))}}),cl={},hl={class:"beam_modal-confirm"};function fl(o,h){const i=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("div",hl,[h[4]||(h[4]=E.createElementVNode("h2",null,"Would you like to continue?",-1)),E.createVNode(i,{onClick:h[0]||(h[0]=a=>o.$emit("confirmmodal"))},{default:E.withCtx(()=>h[2]||(h[2]=[E.createTextVNode("Yes")])),_:1,__:[2]}),E.createVNode(i,{onClick:h[1]||(h[1]=a=>o.$emit("confirmmodal"))},{default:E.withCtx(()=>h[3]||(h[3]=[E.createTextVNode("No")])),_:1,__:[3]})])}const no=Ye(cl,[["render",fl],["__scopeId","data-v-5b430dca"]]),dl={},pl={class:"fixed-top"};function gl(o,h){return E.openBlock(),E.createElementBlock("div",pl,[E.renderSlot(o.$slots,"default",{},void 0,!0)])}const io=Ye(dl,[["render",gl],["__scopeId","data-v-a38a41d0"]]),ml={class:"container"},zr=Ye(E.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(o){const h=E.useModel(o,"modelValue");return(i,a)=>(E.openBlock(),E.createElementBlock("label",ml,[E.withDirectives(E.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=l=>h.value=l),tabindex:"-1"},null,512),[[E.vModelCheckbox,h.value]]),a[1]||(a[1]=E.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-14a5f31b"]]),Al={class:"beam_item-count"},bl=["contenteditable"],wl={key:0},yl={key:1},Gr=Ye(E.defineComponent({__name:"ItemCount",props:E.mergeModels({denominator:{},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const h=E.useModel(o,"modelValue"),i=E.computed(()=>h.value===o.denominator),a=e=>{const n=Number(e.target.innerHTML)||0;h.value=Math.min(n,o.denominator)},l=Ka(e=>a(e),o.debounce),r=async e=>await l(e);return(e,n)=>(E.openBlock(),E.createElementBlock("div",Al,[E.createElementVNode("span",{contenteditable:e.editable,class:E.normalizeClass({"beam--alert":!i.value}),onClick:E.withModifiers(a,["stop","prevent"]),onInput:E.withModifiers(r,["stop","prevent"]),onPaste:a},E.toDisplayString(h.value),43,bl),e.denominator?(E.openBlock(),E.createElementBlock("span",wl,"/"+E.toDisplayString(e.denominator),1)):E.createCommentVNode("",!0),e.uom?(E.openBlock(),E.createElementBlock("span",yl," "+E.toDisplayString(e.uom),1)):E.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec1a0218"]]),vl=["href"],oo=Ye(E.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("a",{href:h.to,class:"beam_list-anchor"},[E.renderSlot(h.$slots,"default",{},void 0,!0)],8,vl))}}),[["__scopeId","data-v-7e3ecf0d"]]),_l={tabindex:"0",class:"beam_list-item"},El={class:"beam_list-text"},Sl={class:"beam--bold"},Ar=Ye(E.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(o,{emit:h}){const i=h,a=E.ref(o.item);return E.watch(a,l=>{i("update",l)},{deep:!0}),(l,r)=>(E.openBlock(),E.createElementBlock("li",_l,[E.createElementVNode("div",El,[E.createElementVNode("label",Sl,E.toDisplayString(a.value.label),1),E.createElementVNode("p",null,E.toDisplayString(a.value.description),1)]),a.value.count?(E.openBlock(),E.createBlock(Gr,{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"])):E.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(E.openBlock(),E.createBlock(zr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":r[1]||(r[1]=e=>a.value.checked=e)},null,8,["modelValue"])):E.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Cl={class:"beam_list-view"},so=Ye(E.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(o,{emit:h}){const i=h;E.onMounted(()=>{window.addEventListener("scroll",l)}),E.onUnmounted(()=>{window.removeEventListener("scroll",l)});const a=r=>i("update",r),l=()=>{const r=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;r-e<=2&&i("scrollbottom")};return(r,e)=>(E.openBlock(),E.createElementBlock("ul",Cl,[(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(r.items,n=>(E.openBlock(),E.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(E.openBlock(),E.createBlock(Vr,{key:0,item:n},null,8,["item"])):n.linkComponent?(E.openBlock(),E.createBlock(E.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:E.withCtx(()=>[E.createVNode(Ar,{item:n,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(E.openBlock(),E.createBlock(Ar,{key:2,item:n,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),kl={class:"beam_navbar"},ao=Ye(E.defineComponent({__name:"Navbar",emits:["click"],setup(o,{emit:h}){const i=h,a=()=>{i("click")};return(l,r)=>{const e=E.resolveComponent("BeamHeading"),n=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("nav",kl,[E.renderSlot(l.$slots,"title",{},()=>[E.createVNode(e,null,{default:E.withCtx(()=>r[0]||(r[0]=[E.createTextVNode("TITLE")])),_:1,__:[0]})],!0),E.createVNode(n,{onClick:a},{default:E.withCtx(()=>[E.renderSlot(l.$slots,"navbaraction",{},()=>[r[1]||(r[1]=E.createTextVNode("Action"))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function Il(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var br={exports:{}},Tl=br.exports,lo;function Bl(){return lo||(lo=1,function(o,h){(function(i,a){o.exports=a()})(Tl,function(){var i={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 i.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),i._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),i._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=i._getNormalizedKeyNum(a),r=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(r.onKeyDetect.call(this,l,a)!==!1&&!i._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?(i._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(i._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");i._isFocusOnIgnoredElement(this)||(a.preventDefault(),l.stopPropagation&&a.stopImmediatePropagation(),l.onPaste.call(this,e,event),r.firstCharTime=0,r.lastCharTime=0,i._validateScanCode(this,e))},_handleKeyUp:function(a){if(!i._isFocusOnIgnoredElement(this)){var l=i._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 i})}(br)),br.exports}var Ol=Bl();const uo=Il(Ol),Pl={id:"scan_input"},co=E.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(o,{emit:h}){const i=h,a=o;return E.onMounted(()=>{const l=uo.attachTo(window,{onScan:a.scanHandler});i("scanInstance",l)}),E.onUnmounted(()=>{uo.detachFrom(window)}),(l,r)=>(E.openBlock(),E.createElementBlock("div",Pl))}}),ho=Ye(E.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(o){const h=E.computed(()=>o.displayInput===0?0 .toFixed(o.decimalPlaces):o.displayInput.toFixed(o.decimalPlaces)),i=a=>a.substr(0,2)=="--"?`var(${a})`:a;return(a,l)=>(E.openBlock(),E.createElementBlock("div",{class:"segmented-display",style:E.normalizeStyle({background:i(a.displayColor)})},[E.createElementVNode("h1",{class:"segmented-display-output",style:E.normalizeStyle({color:i(a.textColor)})},E.toDisplayString(h.value),5)],4))}}),[["__scopeId","data-v-140e435e"]]),xl={class:"column column-left"},Rl={class:"column column-right"},fo=Ye(E.defineComponent({__name:"SplitColumn",props:{justifyContent:{},alignItems:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",{class:"two-column",style:E.normalizeStyle({justifyContent:h.justifyContent||"space-between",alignItems:h.alignItems||"flex-start"})},[E.createElementVNode("div",xl,[E.renderSlot(h.$slots,"left",{},void 0,!0)]),E.createElementVNode("div",Rl,[E.renderSlot(h.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-c65440c0"]]),po=Ye(E.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(["arrow-icon",{open:h.open}])},i[0]||(i[0]=[E.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[E.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)]),2))}}),[["__scopeId","data-v-05e7abed"]]);var Yr=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Ul=Object.getOwnPropertyNames,Dl=Object.prototype.hasOwnProperty,it=(o,h)=>()=>(o&&(h=o(o=0)),h),Ae=(o,h)=>()=>(h||o((h={exports:{}}).exports,h),h.exports),tr=(o,h)=>{for(var i in h)Yr(o,i,{get:h[i],enumerable:!0})},Ll=(o,h,i,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of Ul(h))!Dl.call(o,l)&&l!==i&&Yr(o,l,{get:()=>h[l],enumerable:!(a=Ml(h,l))||a.enumerable});return o},Le=o=>Ll(Yr({},"__esModule",{value:!0}),o),ce=it(()=>{}),De={};tr(De,{_debugEnd:()=>Pn,_debugProcess:()=>On,_events:()=>$n,_eventsCount:()=>zn,_exiting:()=>mn,_fatalExceptions:()=>In,_getActiveHandles:()=>vo,_getActiveRequests:()=>yo,_kill:()=>wn,_linkedBinding:()=>bo,_maxListeners:()=>qn,_preload_modules:()=>Qn,_rawDebug:()=>dn,_startProfilerIdleNotifier:()=>xn,_stopProfilerIdleNotifier:()=>Rn,_tickCallback:()=>Bn,abort:()=>Ln,addListener:()=>Gn,allowedNodeEnvironmentFlags:()=>Cn,arch:()=>Xr,argv:()=>rn,argv0:()=>Vn,assert:()=>_o,binding:()=>ln,chdir:()=>hn,config:()=>An,cpuUsage:()=>lr,cwd:()=>cn,debugPort:()=>Wn,default:()=>ni,dlopen:()=>wo,domain:()=>gn,emit:()=>ei,emitWarning:()=>an,env:()=>tn,execArgv:()=>nn,execPath:()=>jn,exit:()=>En,features:()=>kn,hasUncaughtExceptionCaptureCallback:()=>Eo,hrtime:()=>wr,kill:()=>_n,listeners:()=>Co,memoryUsage:()=>vn,moduleLoadList:()=>pn,nextTick:()=>mo,off:()=>Jn,on:()=>yt,once:()=>Yn,openStdin:()=>Sn,pid:()=>Nn,platform:()=>en,ppid:()=>Fn,prependListener:()=>ti,prependOnceListener:()=>ri,reallyExit:()=>bn,release:()=>fn,removeAllListeners:()=>Xn,removeListener:()=>Zn,resourceUsage:()=>yn,setSourceMapsEnabled:()=>Kn,setUncaughtExceptionCaptureCallback:()=>Tn,stderr:()=>Un,stdin:()=>Dn,stdout:()=>Mn,title:()=>Zr,umask:()=>un,uptime:()=>So,version:()=>on,versions:()=>sn});function Jr(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function Nl(){!jt||!Wt||(jt=!1,Wt.length?gt=Wt.concat(gt):ar=-1,gt.length&&go())}function go(){if(!jt){var o=setTimeout(Nl,0);jt=!0;for(var h=gt.length;h;){for(Wt=gt,gt=[];++ar<h;)Wt&&Wt[ar].run();ar=-1,h=gt.length}Wt=null,jt=!1,clearTimeout(o)}}function mo(o){var h=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)h[i-1]=arguments[i];gt.push(new Ao(o,h)),gt.length===1&&!jt&&setTimeout(go,0)}function Ao(o,h){this.fun=o,this.array=h}function tt(){}function bo(o){Jr("_linkedBinding")}function wo(o){Jr("dlopen")}function yo(){return[]}function vo(){return[]}function _o(o,h){if(!o)throw new Error(h||"assertion error")}function Eo(){return!1}function So(){return vt.now()/1e3}function wr(o){var h=Math.floor((Date.now()-vt.now())*.001),i=vt.now()*.001,a=Math.floor(i)+h,l=Math.floor(i%1*1e9);return o&&(a=a-o[0],l=l-o[1],l<0&&(a--,l+=yr)),[a,l]}function yt(){return ni}function Co(o){return[]}var gt,jt,Wt,ar,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,gn,mn,An,bn,wn,lr,yn,vn,_n,En,Sn,Cn,kn,In,Tn,Bn,On,Pn,xn,Rn,Mn,Un,Dn,Ln,Nn,Fn,jn,Wn,Vn,Qn,Kn,vt,Hn,yr,qn,$n,zn,Gn,Yn,Jn,Zn,Xn,ei,ti,ri,ni,Fl=it(()=>{ce(),fe(),he(),gt=[],jt=!1,ar=-1,Ao.prototype.run=function(){this.fun.apply(null,this.array)},Zr="browser",Xr="x64",en="browser",tn={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},rn=["/usr/bin/node"],nn=[],on="v16.8.0",sn={},an=function(o,h){console.warn((h?h+": ":"")+o)},ln=function(o){Jr("binding")},un=function(o){return 0},cn=function(){return"/"},hn=function(o){},fn={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},dn=tt,pn=[],gn={},mn=!1,An={},bn=tt,wn=tt,lr=function(){return{}},yn=lr,vn=lr,_n=tt,En=tt,Sn=tt,Cn={},kn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},In=tt,Tn=tt,Bn=tt,On=tt,Pn=tt,xn=tt,Rn=tt,Mn=void 0,Un=void 0,Dn=void 0,Ln=tt,Nn=2,Fn=1,jn="/bin/usr/node",Wn=9229,Vn="node",Qn=[],Kn=tt,vt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},vt.now===void 0&&(Hn=Date.now(),vt.timing&&vt.timing.navigationStart&&(Hn=vt.timing.navigationStart),vt.now=()=>Date.now()-Hn),yr=1e9,wr.bigint=function(o){var h=wr(o);return typeof BigInt>"u"?h[0]*yr+h[1]:BigInt(h[0]*yr)+BigInt(h[1])},qn=10,$n={},zn=0,Gn=yt,Yn=yt,Jn=yt,Zn=yt,Xn=yt,ei=tt,ti=yt,ri=yt,ni={version:on,versions:sn,arch:Xr,platform:en,release:fn,_rawDebug:dn,moduleLoadList:pn,binding:ln,_linkedBinding:bo,_events:$n,_eventsCount:zn,_maxListeners:qn,on:yt,addListener:Gn,once:Yn,off:Jn,removeListener:Zn,removeAllListeners:Xn,emit:ei,prependListener:ti,prependOnceListener:ri,listeners:Co,domain:gn,_exiting:mn,config:An,dlopen:wo,uptime:So,_getActiveRequests:yo,_getActiveHandles:vo,reallyExit:bn,_kill:wn,cpuUsage:lr,resourceUsage:yn,memoryUsage:vn,kill:_n,exit:En,openStdin:Sn,allowedNodeEnvironmentFlags:Cn,assert:_o,features:kn,_fatalExceptions:In,setUncaughtExceptionCaptureCallback:Tn,hasUncaughtExceptionCaptureCallback:Eo,emitWarning:an,nextTick:mo,_tickCallback:Bn,_debugProcess:On,_debugEnd:Pn,_startProfilerIdleNotifier:xn,_stopProfilerIdleNotifier:Rn,stdout:Mn,stdin:Dn,stderr:Un,abort:Ln,umask:un,chdir:hn,cwd:cn,env:tn,title:Zr,argv:rn,execArgv:nn,pid:Nn,ppid:Fn,execPath:jn,debugPort:Wn,hrtime:wr,argv0:Vn,_preload_modules:Qn,setSourceMapsEnabled:Kn}}),he=it(()=>{Fl()}),Ze={};tr(Ze,{Buffer:()=>vr,INSPECT_MAX_BYTES:()=>ko,default:()=>_t,kMaxLength:()=>Io});function jl(){if(ii)return rr;ii=!0,rr.byteLength=n,rr.toByteArray=s,rr.fromByteArray=p;for(var o=[],h=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,r=a.length;l<r;++l)o[l]=a[l],h[a.charCodeAt(l)]=l;h[45]=62,h[95]=63;function e(m){var A=m.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=m.indexOf("=");y===-1&&(y=A);var w=y===A?0:4-y%4;return[y,w]}function n(m){var A=e(m),y=A[0],w=A[1];return(y+w)*3/4-w}function t(m,A,y){return(A+y)*3/4-y}function s(m){var A,y=e(m),w=y[0],C=y[1],b=new i(t(m,w,C)),_=0,N=C>0?w-4:w,M;for(M=0;M<N;M+=4)A=h[m.charCodeAt(M)]<<18|h[m.charCodeAt(M+1)]<<12|h[m.charCodeAt(M+2)]<<6|h[m.charCodeAt(M+3)],b[_++]=A>>16&255,b[_++]=A>>8&255,b[_++]=A&255;return C===2&&(A=h[m.charCodeAt(M)]<<2|h[m.charCodeAt(M+1)]>>4,b[_++]=A&255),C===1&&(A=h[m.charCodeAt(M)]<<10|h[m.charCodeAt(M+1)]<<4|h[m.charCodeAt(M+2)]>>2,b[_++]=A>>8&255,b[_++]=A&255),b}function u(m){return o[m>>18&63]+o[m>>12&63]+o[m>>6&63]+o[m&63]}function d(m,A,y){for(var w,C=[],b=A;b<y;b+=3)w=(m[b]<<16&16711680)+(m[b+1]<<8&65280)+(m[b+2]&255),C.push(u(w));return C.join("")}function p(m){for(var A,y=m.length,w=y%3,C=[],b=16383,_=0,N=y-w;_<N;_+=b)C.push(d(m,_,_+b>N?N:_+b));return w===1?(A=m[y-1],C.push(o[A>>2]+o[A<<4&63]+"==")):w===2&&(A=(m[y-2]<<8)+m[y-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}return rr}function Wl(){return oi?ur:(oi=!0,ur.read=function(o,h,i,a,l){var r,e,n=l*8-a-1,t=(1<<n)-1,s=t>>1,u=-7,d=i?l-1:0,p=i?-1:1,m=o[h+d];for(d+=p,r=m&(1<<-u)-1,m>>=-u,u+=n;u>0;r=r*256+o[h+d],d+=p,u-=8);for(e=r&(1<<-u)-1,r>>=-u,u+=a;u>0;e=e*256+o[h+d],d+=p,u-=8);if(r===0)r=1-s;else{if(r===t)return e?NaN:(m?-1:1)*(1/0);e=e+Math.pow(2,a),r=r-s}return(m?-1:1)*e*Math.pow(2,r-a)},ur.write=function(o,h,i,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,m=a?0:r-1,A=a?1:-1,y=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;o[i+m]=n&255,m+=A,n/=256,l-=8);for(e=e<<l|n,s+=l;s>0;o[i+m]=e&255,m+=A,e/=256,s-=8);o[i+m-A]|=y*128},ur)}function Vl(){if(si)return xt;si=!0;let o=jl(),h=Wl(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;xt.Buffer=e,xt.SlowBuffer=C,xt.INSPECT_MAX_BYTES=50;let a=2147483647;xt.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),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),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 f=new Uint8Array(c);return Object.setPrototypeOf(f,e.prototype),f}function e(c,f,g){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(c)}return n(c,f,g)}e.poolSize=8192;function n(c,f,g){if(typeof c=="string")return d(c,f);if(ArrayBuffer.isView(c))return m(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(W(c,ArrayBuffer)||c&&W(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(W(c,SharedArrayBuffer)||c&&W(c.buffer,SharedArrayBuffer)))return A(c,f,g);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=c.valueOf&&c.valueOf();if(v!=null&&v!==c)return e.from(v,f,g);let I=y(c);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return e.from(c[Symbol.toPrimitive]("string"),f,g);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,f,g){return n(c,f,g)},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,f,g){return t(c),c<=0?r(c):f!==void 0?typeof g=="string"?r(c).fill(f,g):r(c).fill(f):r(c)}e.alloc=function(c,f,g){return s(c,f,g)};function u(c){return t(c),r(c<0?0:w(c)|0)}e.allocUnsafe=function(c){return u(c)},e.allocUnsafeSlow=function(c){return u(c)};function d(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!e.isEncoding(f))throw new TypeError("Unknown encoding: "+f);let g=b(c,f)|0,v=r(g),I=v.write(c,f);return I!==g&&(v=v.slice(0,I)),v}function p(c){let f=c.length<0?0:w(c.length)|0,g=r(f);for(let v=0;v<f;v+=1)g[v]=c[v]&255;return g}function m(c){if(W(c,Uint8Array)){let f=new Uint8Array(c);return A(f.buffer,f.byteOffset,f.byteLength)}return p(c)}function A(c,f,g){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(g||0))throw new RangeError('"length" is outside of buffer bounds');let v;return f===void 0&&g===void 0?v=new Uint8Array(c):g===void 0?v=new Uint8Array(c,f):v=new Uint8Array(c,f,g),Object.setPrototypeOf(v,e.prototype),v}function y(c){if(e.isBuffer(c)){let f=w(c.length)|0,g=r(f);return g.length===0||c.copy(g,0,0,f),g}if(c.length!==void 0)return typeof c.length!="number"||se(c.length)?r(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function w(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(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,f){if(W(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),W(f,Uint8Array)&&(f=e.from(f,f.offset,f.byteLength)),!e.isBuffer(c)||!e.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===f)return 0;let g=c.length,v=f.length;for(let I=0,L=Math.min(g,v);I<L;++I)if(c[I]!==f[I]){g=c[I],v=f[I];break}return g<v?-1:v<g?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,f){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return e.alloc(0);let g;if(f===void 0)for(f=0,g=0;g<c.length;++g)f+=c[g].length;let v=e.allocUnsafe(f),I=0;for(g=0;g<c.length;++g){let L=c[g];if(W(L,Uint8Array))I+L.length>v.length?(e.isBuffer(L)||(L=e.from(L)),L.copy(v,I)):Uint8Array.prototype.set.call(v,L,I);else if(e.isBuffer(L))L.copy(v,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=L.length}return v};function b(c,f){if(e.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||W(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 g=c.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&g===0)return 0;let I=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return j(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return re(c).length;default:if(I)return v?-1:j(c).length;f=(""+f).toLowerCase(),I=!0}}e.byteLength=b;function _(c,f,g){let v=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,f>>>=0,g<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return me(this,f,g);case"utf8":case"utf-8":return G(this,f,g);case"ascii":return be(this,f,g);case"latin1":case"binary":return pe(this,f,g);case"base64":return P(this,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,f,g);default:if(v)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),v=!0}}e.prototype._isBuffer=!0;function N(c,f,g){let v=c[f];c[f]=c[g],c[g]=v}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 f=0;f<c;f+=2)N(this,f,f+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 f=0;f<c;f+=4)N(this,f,f+3),N(this,f+1,f+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 f=0;f<c;f+=8)N(this,f,f+7),N(this,f+1,f+6),N(this,f+2,f+5),N(this,f+3,f+4);return this},e.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?G(this,0,c):_.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="",f=xt.INSPECT_MAX_BYTES;return c=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(c+=" ... "),"<Buffer "+c+">"},i&&(e.prototype[i]=e.prototype.inspect),e.prototype.compare=function(c,f,g,v,I){if(W(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(f===void 0&&(f=0),g===void 0&&(g=c?c.length:0),v===void 0&&(v=0),I===void 0&&(I=this.length),f<0||g>c.length||v<0||I>this.length)throw new RangeError("out of range index");if(v>=I&&f>=g)return 0;if(v>=I)return-1;if(f>=g)return 1;if(f>>>=0,g>>>=0,v>>>=0,I>>>=0,this===c)return 0;let L=I-v,$=g-f,_e=Math.min(L,$),Ee=this.slice(v,I),Be=c.slice(f,g);for(let Me=0;Me<_e;++Me)if(Ee[Me]!==Be[Me]){L=Ee[Me],$=Be[Me];break}return L<$?-1:$<L?1:0};function M(c,f,g,v,I){if(c.length===0)return-1;if(typeof g=="string"?(v=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,se(g)&&(g=I?0:c.length-1),g<0&&(g=c.length+g),g>=c.length){if(I)return-1;g=c.length-1}else if(g<0)if(I)g=0;else return-1;if(typeof f=="string"&&(f=e.from(f,v)),e.isBuffer(f))return f.length===0?-1:k(c,f,g,v,I);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(c,f,g):Uint8Array.prototype.lastIndexOf.call(c,f,g):k(c,[f],g,v,I);throw new TypeError("val must be string, number or Buffer")}function k(c,f,g,v,I){let L=1,$=c.length,_e=f.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(c.length<2||f.length<2)return-1;L=2,$/=2,_e/=2,g/=2}function Ee(Me,xe){return L===1?Me[xe]:Me.readUInt16BE(xe*L)}let Be;if(I){let Me=-1;for(Be=g;Be<$;Be++)if(Ee(c,Be)===Ee(f,Me===-1?0:Be-Me)){if(Me===-1&&(Me=Be),Be-Me+1===_e)return Me*L}else Me!==-1&&(Be-=Be-Me),Me=-1}else for(g+_e>$&&(g=$-_e),Be=g;Be>=0;Be--){let Me=!0;for(let xe=0;xe<_e;xe++)if(Ee(c,Be+xe)!==Ee(f,xe)){Me=!1;break}if(Me)return Be}return-1}e.prototype.includes=function(c,f,g){return this.indexOf(c,f,g)!==-1},e.prototype.indexOf=function(c,f,g){return M(this,c,f,g,!0)},e.prototype.lastIndexOf=function(c,f,g){return M(this,c,f,g,!1)};function T(c,f,g,v){g=Number(g)||0;let I=c.length-g;v?(v=Number(v),v>I&&(v=I)):v=I;let L=f.length;v>L/2&&(v=L/2);let $;for($=0;$<v;++$){let _e=parseInt(f.substr($*2,2),16);if(se(_e))return $;c[g+$]=_e}return $}function U(c,f,g,v){return ue(j(f,c.length-g),c,g,v)}function J(c,f,g,v){return ue(Y(f),c,g,v)}function X(c,f,g,v){return ue(re(f),c,g,v)}function le(c,f,g,v){return ue(oe(f,c.length-g),c,g,v)}e.prototype.write=function(c,f,g,v){if(f===void 0)v="utf8",g=this.length,f=0;else if(g===void 0&&typeof f=="string")v=f,g=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(g)?(g=g>>>0,v===void 0&&(v="utf8")):(v=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let I=this.length-f;if((g===void 0||g>I)&&(g=I),c.length>0&&(g<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let L=!1;for(;;)switch(v){case"hex":return T(this,c,f,g);case"utf8":case"utf-8":return U(this,c,f,g);case"ascii":case"latin1":case"binary":return J(this,c,f,g);case"base64":return X(this,c,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,c,f,g);default:if(L)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),L=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(c,f,g){return f===0&&g===c.length?o.fromByteArray(c):o.fromByteArray(c.slice(f,g))}function G(c,f,g){g=Math.min(c.length,g);let v=[],I=f;for(;I<g;){let L=c[I],$=null,_e=L>239?4:L>223?3:L>191?2:1;if(I+_e<=g){let Ee,Be,Me,xe;switch(_e){case 1:L<128&&($=L);break;case 2:Ee=c[I+1],(Ee&192)===128&&(xe=(L&31)<<6|Ee&63,xe>127&&($=xe));break;case 3:Ee=c[I+1],Be=c[I+2],(Ee&192)===128&&(Be&192)===128&&(xe=(L&15)<<12|(Ee&63)<<6|Be&63,xe>2047&&(xe<55296||xe>57343)&&($=xe));break;case 4:Ee=c[I+1],Be=c[I+2],Me=c[I+3],(Ee&192)===128&&(Be&192)===128&&(Me&192)===128&&(xe=(L&15)<<18|(Ee&63)<<12|(Be&63)<<6|Me&63,xe>65535&&xe<1114112&&($=xe))}}$===null?($=65533,_e=1):$>65535&&($-=65536,v.push($>>>10&1023|55296),$=56320|$&1023),v.push($),I+=_e}return V(v)}let Z=4096;function V(c){let f=c.length;if(f<=Z)return String.fromCharCode.apply(String,c);let g="",v=0;for(;v<f;)g+=String.fromCharCode.apply(String,c.slice(v,v+=Z));return g}function be(c,f,g){let v="";g=Math.min(c.length,g);for(let I=f;I<g;++I)v+=String.fromCharCode(c[I]&127);return v}function pe(c,f,g){let v="";g=Math.min(c.length,g);for(let I=f;I<g;++I)v+=String.fromCharCode(c[I]);return v}function me(c,f,g){let v=c.length;(!f||f<0)&&(f=0),(!g||g<0||g>v)&&(g=v);let I="";for(let L=f;L<g;++L)I+=we[c[L]];return I}function ve(c,f,g){let v=c.slice(f,g),I="";for(let L=0;L<v.length-1;L+=2)I+=String.fromCharCode(v[L]+v[L+1]*256);return I}e.prototype.slice=function(c,f){let g=this.length;c=~~c,f=f===void 0?g:~~f,c<0?(c+=g,c<0&&(c=0)):c>g&&(c=g),f<0?(f+=g,f<0&&(f=0)):f>g&&(f=g),f<c&&(f=c);let v=this.subarray(c,f);return Object.setPrototypeOf(v,e.prototype),v};function z(c,f,g){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>g)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c],I=1,L=0;for(;++L<f&&(I*=256);)v+=this[c+L]*I;return v},e.prototype.readUintBE=e.prototype.readUIntBE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c+--f],I=1;for(;f>0&&(I*=256);)v+=this[c+--f]*I;return v},e.prototype.readUint8=e.prototype.readUInt8=function(c,f){return c=c>>>0,f||z(c,1,this.length),this[c]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(c,f){return c=c>>>0,f||z(c,2,this.length),this[c]|this[c+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(c,f){return c=c>>>0,f||z(c,2,this.length),this[c]<<8|this[c+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(c,f){return c=c>>>0,f||z(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,f){return c=c>>>0,f||z(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},e.prototype.readBigUInt64LE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,I=this[++c]+this[++c]*2**8+this[++c]*2**16+g*2**24;return BigInt(v)+(BigInt(I)<<BigInt(32))}),e.prototype.readBigUInt64BE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=f*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],I=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g;return(BigInt(v)<<BigInt(32))+BigInt(I)}),e.prototype.readIntLE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c],I=1,L=0;for(;++L<f&&(I*=256);)v+=this[c+L]*I;return I*=128,v>=I&&(v-=Math.pow(2,8*f)),v},e.prototype.readIntBE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=f,I=1,L=this[c+--v];for(;v>0&&(I*=256);)L+=this[c+--v]*I;return I*=128,L>=I&&(L-=Math.pow(2,8*f)),L},e.prototype.readInt8=function(c,f){return c=c>>>0,f||z(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},e.prototype.readInt16LE=function(c,f){c=c>>>0,f||z(c,2,this.length);let g=this[c]|this[c+1]<<8;return g&32768?g|4294901760:g},e.prototype.readInt16BE=function(c,f){c=c>>>0,f||z(c,2,this.length);let g=this[c+1]|this[c]<<8;return g&32768?g|4294901760:g},e.prototype.readInt32LE=function(c,f){return c=c>>>0,f||z(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},e.prototype.readInt32BE=function(c,f){return c=c>>>0,f||z(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},e.prototype.readBigInt64LE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(g<<24);return(BigInt(v)<<BigInt(32))+BigInt(f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),e.prototype.readBigInt64BE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=(f<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(v)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g)}),e.prototype.readFloatLE=function(c,f){return c=c>>>0,f||z(c,4,this.length),h.read(this,c,!0,23,4)},e.prototype.readFloatBE=function(c,f){return c=c>>>0,f||z(c,4,this.length),h.read(this,c,!1,23,4)},e.prototype.readDoubleLE=function(c,f){return c=c>>>0,f||z(c,8,this.length),h.read(this,c,!0,52,8)},e.prototype.readDoubleBE=function(c,f){return c=c>>>0,f||z(c,8,this.length),h.read(this,c,!1,52,8)};function de(c,f,g,v,I,L){if(!e.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>I||f<L)throw new RangeError('"value" argument is out of bounds');if(g+v>c.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(c,f,g,v){if(c=+c,f=f>>>0,g=g>>>0,!v){let $=Math.pow(2,8*g)-1;de(this,c,f,g,$,0)}let I=1,L=0;for(this[f]=c&255;++L<g&&(I*=256);)this[f+L]=c/I&255;return f+g},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(c,f,g,v){if(c=+c,f=f>>>0,g=g>>>0,!v){let $=Math.pow(2,8*g)-1;de(this,c,f,g,$,0)}let I=g-1,L=1;for(this[f+I]=c&255;--I>=0&&(L*=256);)this[f+I]=c/L&255;return f+g},e.prototype.writeUint8=e.prototype.writeUInt8=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,1,255,0),this[f]=c&255,f+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,65535,0),this[f]=c&255,this[f+1]=c>>>8,f+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,65535,0),this[f]=c>>>8,this[f+1]=c&255,f+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,4294967295,0),this[f+3]=c>>>24,this[f+2]=c>>>16,this[f+1]=c>>>8,this[f]=c&255,f+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,4294967295,0),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4};function x(c,f,g,v,I){K(f,v,I,c,g,7);let L=Number(f&BigInt(4294967295));c[g++]=L,L=L>>8,c[g++]=L,L=L>>8,c[g++]=L,L=L>>8,c[g++]=L;let $=Number(f>>BigInt(32)&BigInt(4294967295));return c[g++]=$,$=$>>8,c[g++]=$,$=$>>8,c[g++]=$,$=$>>8,c[g++]=$,g}function ne(c,f,g,v,I){K(f,v,I,c,g,7);let L=Number(f&BigInt(4294967295));c[g+7]=L,L=L>>8,c[g+6]=L,L=L>>8,c[g+5]=L,L=L>>8,c[g+4]=L;let $=Number(f>>BigInt(32)&BigInt(4294967295));return c[g+3]=$,$=$>>8,c[g+2]=$,$=$>>8,c[g+1]=$,$=$>>8,c[g]=$,g+8}e.prototype.writeBigUInt64LE=te(function(c,f=0){return x(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=te(function(c,f=0){return ne(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(c,f,g,v){if(c=+c,f=f>>>0,!v){let _e=Math.pow(2,8*g-1);de(this,c,f,g,_e-1,-_e)}let I=0,L=1,$=0;for(this[f]=c&255;++I<g&&(L*=256);)c<0&&$===0&&this[f+I-1]!==0&&($=1),this[f+I]=(c/L>>0)-$&255;return f+g},e.prototype.writeIntBE=function(c,f,g,v){if(c=+c,f=f>>>0,!v){let _e=Math.pow(2,8*g-1);de(this,c,f,g,_e-1,-_e)}let I=g-1,L=1,$=0;for(this[f+I]=c&255;--I>=0&&(L*=256);)c<0&&$===0&&this[f+I+1]!==0&&($=1),this[f+I]=(c/L>>0)-$&255;return f+g},e.prototype.writeInt8=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,1,127,-128),c<0&&(c=255+c+1),this[f]=c&255,f+1},e.prototype.writeInt16LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,32767,-32768),this[f]=c&255,this[f+1]=c>>>8,f+2},e.prototype.writeInt16BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,32767,-32768),this[f]=c>>>8,this[f+1]=c&255,f+2},e.prototype.writeInt32LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,2147483647,-2147483648),this[f]=c&255,this[f+1]=c>>>8,this[f+2]=c>>>16,this[f+3]=c>>>24,f+4},e.prototype.writeInt32BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4},e.prototype.writeBigInt64LE=te(function(c,f=0){return x(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=te(function(c,f=0){return ne(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(c,f,g,v,I,L){if(g+v>c.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function F(c,f,g,v,I){return f=+f,g=g>>>0,I||ge(c,f,g,4),h.write(c,f,g,v,23,4),g+4}e.prototype.writeFloatLE=function(c,f,g){return F(this,c,f,!0,g)},e.prototype.writeFloatBE=function(c,f,g){return F(this,c,f,!1,g)};function Ce(c,f,g,v,I){return f=+f,g=g>>>0,I||ge(c,f,g,8),h.write(c,f,g,v,52,8),g+8}e.prototype.writeDoubleLE=function(c,f,g){return Ce(this,c,f,!0,g)},e.prototype.writeDoubleBE=function(c,f,g){return Ce(this,c,f,!1,g)},e.prototype.copy=function(c,f,g,v){if(!e.isBuffer(c))throw new TypeError("argument should be a Buffer");if(g||(g=0),!v&&v!==0&&(v=this.length),f>=c.length&&(f=c.length),f||(f=0),v>0&&v<g&&(v=g),v===g||c.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),c.length-f<v-g&&(v=c.length-f+g);let I=v-g;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,g,v):Uint8Array.prototype.set.call(c,this.subarray(g,v),f),I},e.prototype.fill=function(c,f,g,v){if(typeof c=="string"){if(typeof f=="string"?(v=f,f=0,g=this.length):typeof g=="string"&&(v=g,g=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!e.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(c.length===1){let L=c.charCodeAt(0);(v==="utf8"&&L<128||v==="latin1")&&(c=L)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(f<0||this.length<f||this.length<g)throw new RangeError("Out of range index");if(g<=f)return this;f=f>>>0,g=g===void 0?this.length:g>>>0,c||(c=0);let I;if(typeof c=="number")for(I=f;I<g;++I)this[I]=c;else{let L=e.isBuffer(c)?c:e.from(c,v),$=L.length;if($===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(I=0;I<g-f;++I)this[I+f]=L[I%$]}return this};let q={};function D(c,f,g){q[c]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}D("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),D("ERR_INVALID_ARG_TYPE",function(c,f){return`The "${c}" argument must be of type number. Received type ${typeof f}`},TypeError),D("ERR_OUT_OF_RANGE",function(c,f,g){let v=`The value of "${c}" is out of range.`,I=g;return Number.isInteger(g)&&Math.abs(g)>2**32?I=ee(String(g)):typeof g=="bigint"&&(I=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(I=ee(I)),I+="n"),v+=` It must be ${f}. Received ${I}`,v},RangeError);function ee(c){let f="",g=c.length,v=c[0]==="-"?1:0;for(;g>=v+4;g-=3)f=`_${c.slice(g-3,g)}${f}`;return`${c.slice(0,g)}${f}`}function Q(c,f,g){H(f,"offset"),(c[f]===void 0||c[f+g]===void 0)&&ae(f,c.length-(g+1))}function K(c,f,g,v,I,L){if(c>g||c<f){let $=typeof f=="bigint"?"n":"",_e;throw f===0||f===BigInt(0)?_e=`>= 0${$} and < 2${$} ** ${(L+1)*8}${$}`:_e=`>= -(2${$} ** ${(L+1)*8-1}${$}) and < 2 ** ${(L+1)*8-1}${$}`,new q.ERR_OUT_OF_RANGE("value",_e,c)}Q(v,I,L)}function H(c,f){if(typeof c!="number")throw new q.ERR_INVALID_ARG_TYPE(f,"number",c)}function ae(c,f,g){throw Math.floor(c)!==c?(H(c,g),new q.ERR_OUT_OF_RANGE("offset","an integer",c)):f<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,c)}let ie=/[^+/0-9A-Za-z-_]/g;function R(c){if(c=c.split("=")[0],c=c.trim().replace(ie,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function j(c,f){f=f||1/0;let g,v=c.length,I=null,L=[];for(let $=0;$<v;++$){if(g=c.charCodeAt($),g>55295&&g<57344){if(!I){if(g>56319){(f-=3)>-1&&L.push(239,191,189);continue}else if($+1===v){(f-=3)>-1&&L.push(239,191,189);continue}I=g;continue}if(g<56320){(f-=3)>-1&&L.push(239,191,189),I=g;continue}g=(I-55296<<10|g-56320)+65536}else I&&(f-=3)>-1&&L.push(239,191,189);if(I=null,g<128){if((f-=1)<0)break;L.push(g)}else if(g<2048){if((f-=2)<0)break;L.push(g>>6|192,g&63|128)}else if(g<65536){if((f-=3)<0)break;L.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((f-=4)<0)break;L.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return L}function Y(c){let f=[];for(let g=0;g<c.length;++g)f.push(c.charCodeAt(g)&255);return f}function oe(c,f){let g,v,I,L=[];for(let $=0;$<c.length&&!((f-=2)<0);++$)g=c.charCodeAt($),v=g>>8,I=g%256,L.push(I),L.push(v);return L}function re(c){return o.toByteArray(R(c))}function ue(c,f,g,v){let I;for(I=0;I<v&&!(I+g>=f.length||I>=c.length);++I)f[I+g]=c[I];return I}function W(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function se(c){return c!==c}let we=function(){let c="0123456789abcdef",f=new Array(256);for(let g=0;g<16;++g){let v=g*16;for(let I=0;I<16;++I)f[v+I]=c[g]+c[I]}return f}();function te(c){return typeof BigInt>"u"?Pe:c}function Pe(){throw new Error("BigInt not supported")}return xt}var rr,ii,ur,oi,xt,si,_t,vr,ko,Io,Xe=it(()=>{ce(),fe(),he(),rr={},ii=!1,ur={},oi=!1,xt={},si=!1,_t=Vl(),_t.Buffer,_t.SlowBuffer,_t.INSPECT_MAX_BYTES,_t.kMaxLength,vr=_t.Buffer,ko=_t.INSPECT_MAX_BYTES,Io=_t.kMaxLength}),fe=it(()=>{Xe()}),Ql=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=class{constructor(i){this.aliasToTopic={},this.max=i}put(i,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=i,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(i){return this.aliasToTopic[i]}clear(){this.aliasToTopic={}}};o.default=h}),qe=Ae((o,h)=>{ce(),fe(),he();var i=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}
|
|
1
|
+
(function(Te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],E):(Te=typeof globalThis<"u"?globalThis:Te||self,E(Te["@stonecrop/beam"]={},Te.Vue))})(this,function(Te,E){"use strict";var lc=Object.defineProperty;var Aa=Te=>{throw TypeError(Te)};var uc=(Te,E,ze)=>E in Te?lc(Te,E,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Te[E]=ze;var He=(Te,E,ze)=>uc(Te,typeof E!="symbol"?E+"":E,ze),Mi=(Te,E,ze)=>E.has(Te)||Aa("Cannot "+ze);var B=(Te,E,ze)=>(Mi(Te,E,"read from private field"),ze?ze.call(Te):E.get(Te)),Ue=(Te,E,ze)=>E.has(Te)?Aa("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(Te):E.set(Te,ze),Oe=(Te,E,ze,er)=>(Mi(Te,E,"write to private field"),er?er.call(Te,ze):E.set(Te,ze),ze),ke=(Te,E,ze)=>(Mi(Te,E,"access private method"),ze);var Nr=(Te,E,ze,er)=>({set _(Wr){Oe(Te,E,Wr,ze)},get _(){return B(Te,E,er)}});var ze=document.createElement("style");ze.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-94fbdac5]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-94fbdac5]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-94fbdac5]{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-63a79e46]{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-63a79e46]{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-63a79e46]{font-size:1rem}.beam_filters-options[data-v-63a79e46]{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-63a79e46]{flex-direction:column}}.beam_filter-option[data-v-be55508c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-be55508c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-be55508c]{align-items:stretch;-webkit-appearance:none;-moz-appearance:none;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-be55508c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-be55508c]{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-be55508c]{display:flex;align-items:center}svg[data-v-be55508c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-be55508c]{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-be55508c]{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-be55508c]:hover{background:var(--sc-primary-color)}.selected[data-v-be55508c],.selected[data-v-be55508c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-be55508c]{flex-grow:1;max-width:300px;width:50%}@media (max-width: 479px){.beam_filter-container[data-v-be55508c]{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-4f3f0253]{position:fixed;top:0;right:0;bottom:0;left: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-14a5f31b]{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-14a5f31b]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-14a5f31b]{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-14a5f31b]{background-color:#fff}.container input:checked~.checkmark[data-v-14a5f31b]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-14a5f31b]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-14a5f31b]:after{display:block}.container .checkmark[data-v-14a5f31b]: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-fa0e6dff]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-fa0e6dff]{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-140e435e]{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-140e435e]{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-c65440c0]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width: 400px){.two-column[data-v-c65440c0]{flex-direction:column;gap:0}}.column[data-v-c65440c0]{flex-grow:1;width:50%}@media screen and (max-width: 400px){.column[data-v-c65440c0]{width:100%}}.column-right[data-v-c65440c0]{text-align:right}@media screen and (max-width: 400px){.column-right[data-v-c65440c0]{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(ze);const er={class:"beam_action-footer"},Wr={class:"footer-action-wrapper"},Ta=E.defineComponent({__name:"ActionFooter",emits:["click"],setup(o,{emit:h}){const i=h,a=()=>{i("click")};return(l,r)=>{const e=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("footer",er,[E.createElementVNode("span",Wr,[E.createVNode(e,{onClick:a},{default:E.withCtx(()=>[E.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Ye=(o,h)=>{const i=o.__vccOpts||o;for(const[a,l]of h)i[a]=l;return i},Wi=Ye(Ta,[["__scopeId","data-v-37933bd1"]]),Ba={class:"beam_metadata_arrow"},Oa={class:"beam_metadata_arrow-head"},Pa={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},Vi=Ye(E.defineComponent({__name:"BeamArrow",props:{color:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",Ba,[E.createElementVNode("div",{class:"beam_metadata_arrow-body",style:E.normalizeStyle({background:h.color||"#c4c4c4"})},null,4),E.createElementVNode("div",Oa,[(E.openBlock(),E.createElementBlock("svg",Pa,[E.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:E.normalizeStyle([{fill:"#c4c4c4"},{fill:h.color||"#c4c4c4"}])},null,4)]))])]))}}),[["__scopeId","data-v-94fbdac5"]]),xa={},Ra={class:"beam_btn"};function Ma(o,h){return E.openBlock(),E.createElementBlock("button",Ra,[E.renderSlot(o.$slots,"default",{},()=>[h[0]||(h[0]=E.createTextVNode("Action"))],!0)])}const Qi=Ye(xa,[["render",Ma],["__scopeId","data-v-bc768596"]]),Ua={class:"beam_day-divider"},Vr=Ye(E.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(o){const h=E.computed(()=>{if(!o.item.date||isNaN(Date.parse(o.item.date)))return o.item.date;const i=new Date(o.item.date);if(o.item.dateFormat)switch(o.item.dateFormat.toLowerCase()){case"iso":return i.toISOString()}return i.toDateString()});return(i,a)=>(E.openBlock(),E.createElementBlock(E.Fragment,null,[E.createElementVNode("div",Ua,[E.createElementVNode("h2",null,E.toDisplayString(h.value),1)]),E.renderSlot(i.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),Da={class:"beam_filters"},La={class:"beam_filters-options"},Ki=Ye(E.defineComponent({__name:"BeamFilter",setup(o){const h=E.ref(!1);return(i,a)=>{const l=E.resolveComponent("ToggleArrow"),r=E.resolveComponent("BeamHeading");return E.openBlock(),E.createElementBlock("div",Da,[E.createElementVNode("div",{onClick:a[0]||(a[0]=e=>h.value=!h.value),class:"beam_filters-heading"},[E.createVNode(l,{open:h.value},null,8,["open"]),E.createVNode(r,null,{default:E.withCtx(()=>a[1]||(a[1]=[E.createTextVNode("Filter")])),_:1,__:[1]})]),E.withDirectives(E.createElementVNode("div",La,[E.renderSlot(i.$slots,"default",{},void 0,!0)],512),[[E.vShow,h.value]])])}}}),[["__scopeId","data-v-63a79e46"]]);function Hi(o){return E.getCurrentScope()?(E.onScopeDispose(o),!0):!1}const qi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Na=Object.prototype.toString,Fa=o=>Na.call(o)==="[object Object]",wt=()=>{},Qr=ja();function ja(){var o,h;return qi&&((o=window==null?void 0:window.navigator)==null?void 0:o.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((h=window==null?void 0:window.navigator)==null?void 0:h.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Wa(...o){if(o.length!==1)return E.toRef(...o);const h=o[0];return typeof h=="function"?E.readonly(E.customRef(()=>({get:h,set:wt}))):E.ref(h)}function Va(o,h){function i(...a){return new Promise((l,r)=>{Promise.resolve(o(()=>h.apply(this,a),{fn:h,thisArg:this,args:a})).then(l).catch(r)})}return i}function Qa(o,h={}){let i,a,l=wt;const r=t=>{clearTimeout(t),l(),l=wt};let e;return t=>{const s=E.toValue(o),u=E.toValue(h.maxWait);return i&&r(i),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(()=>{i&&r(i),a=void 0,d(e())},u)),i=setTimeout(()=>{a&&r(a),a=void 0,d(t())},s)})}}function Kr(o){return Array.isArray(o)?o:[o]}function Ka(o,h=200,i={}){return Va(Qa(h,i),o)}function Ha(o,h,i){return E.watch(o,h,{...i,immediate:!0})}const $i=qi?window:void 0;function sr(o){var h;const i=E.toValue(o);return(h=i==null?void 0:i.$el)!=null?h:i}function mr(...o){const h=[],i=()=>{h.forEach(n=>n()),h.length=0},a=(n,t,s,u)=>(n.addEventListener(t,s,u),()=>n.removeEventListener(t,s,u)),l=E.computed(()=>{const n=Kr(E.toValue(o[0])).filter(t=>t!=null);return n.every(t=>typeof t!="string")?n:void 0}),r=Ha(()=>{var n,t;return[(t=(n=l.value)==null?void 0:n.map(s=>sr(s)))!=null?t:[$i].filter(s=>s!=null),Kr(E.toValue(l.value?o[1]:o[0])),Kr(E.unref(l.value?o[2]:o[1])),E.toValue(l.value?o[3]:o[2])]},([n,t,s,u])=>{if(i(),!(n!=null&&n.length)||!(t!=null&&t.length)||!(s!=null&&s.length))return;const d=Fa(u)?{...u}:u;h.push(...n.flatMap(p=>t.flatMap(m=>s.map(A=>a(p,m,A,d)))))},{flush:"post"}),e=()=>{r(),i()};return Hi(i),e}let zi=!1;function Gi(o,h,i={}){const{window:a=$i,ignore:l=[],capture:r=!0,detectIframe:e=!1,controls:n=!1}=i;if(!a)return n?{stop:wt,cancel:wt,trigger:wt}:wt;if(Qr&&!zi){zi=!0;const w={passive:!0};Array.from(a.document.body.children).forEach(C=>C.addEventListener("click",wt,w)),a.document.documentElement.addEventListener("click",wt,w)}let t=!0;const s=w=>E.toValue(l).some(C=>{if(typeof C=="string")return Array.from(a.document.querySelectorAll(C)).some(b=>b===w.target||w.composedPath().includes(b));{const b=sr(C);return b&&(w.target===b||w.composedPath().includes(b))}});function u(w){const C=E.toValue(w);return C&&C.$.subTree.shapeFlag===16}function d(w,C){const b=E.toValue(w),_=b.$.subTree&&b.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some(N=>N.el===C.target||C.composedPath().includes(N.el))}const p=w=>{const C=sr(o);if(w.target!=null&&!(!(C instanceof Element)&&u(o)&&d(o,w))&&!(!C||C===w.target||w.composedPath().includes(C))){if("detail"in w&&w.detail===0&&(t=!s(w)),!t){t=!0;return}h(w)}};let m=!1;const A=[mr(a,"click",w=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(w))},{passive:!0,capture:r}),mr(a,"pointerdown",w=>{const C=sr(o);t=!s(w)&&!!(C&&!w.composedPath().includes(C))},{passive:!0}),e&&mr(a,"blur",w=>{setTimeout(()=>{var C;const b=sr(o);((C=a.document.activeElement)==null?void 0:C.tagName)==="IFRAME"&&!(b!=null&&b.contains(a.document.activeElement))&&h(w)},0)},{passive:!0})].filter(Boolean),y=()=>A.forEach(w=>w());return n?{stop:y,cancel:()=>{t=!1},trigger:w=>{t=!0,p(w),t=!1}}:y}const Hr=new WeakMap,qa={mounted(o,h){const i=!h.modifiers.bubble;let a;if(typeof h.value=="function")a=Gi(o,h.value,{capture:i});else{const[l,r]=h.value;a=Gi(o,l,Object.assign({capture:i},r))}Hr.set(o,a)},unmounted(o){const h=Hr.get(o);h&&typeof h=="function"?h():h==null||h.stop(),Hr.delete(o)}};function qr(o){return typeof Window<"u"&&o instanceof Window?o.document.documentElement:typeof Document<"u"&&o instanceof Document?o.documentElement:o}function Yi(o){const h=window.getComputedStyle(o);if(h.overflowX==="scroll"||h.overflowY==="scroll"||h.overflowX==="auto"&&o.clientWidth<o.scrollWidth||h.overflowY==="auto"&&o.clientHeight<o.scrollHeight)return!0;{const i=o.parentNode;return!i||i.tagName==="BODY"?!1:Yi(i)}}function $a(o){const h=o||window.event,i=h.target;return Yi(i)?!1:h.touches.length>1?!0:(h.preventDefault&&h.preventDefault(),!1)}const $r=new WeakMap;function za(o,h=!1){const i=E.shallowRef(h);let a=null,l="";E.watch(Wa(o),n=>{const t=qr(E.toValue(n));if(t){const s=t;if($r.get(s)||$r.set(s,s.style.overflow),s.style.overflow!=="hidden"&&(l=s.style.overflow),s.style.overflow==="hidden")return i.value=!0;if(i.value)return s.style.overflow="hidden"}},{immediate:!0});const r=()=>{const n=qr(E.toValue(o));!n||i.value||(Qr&&(a=mr(n,"touchmove",t=>{$a(t)},{passive:!1})),n.style.overflow="hidden",i.value=!0)},e=()=>{const n=qr(E.toValue(o));!n||!i.value||(Qr&&(a==null||a()),n.style.overflow=l,$r.delete(n),i.value=!1)};return Hi(e),E.computed({get(){return i.value},set(n){n?r():e()}})}function Ga(){let o=!1;const h=E.shallowRef(!1);return(i,a)=>{if(h.value=a.value,o)return;o=!0;const l=za(i,a.value);E.watch(h,r=>l.value=r)}}Ga();const Ya={class:"beam_filter-container"},Ja={class:"beam_filter-option-select"},Za={class:"beam_filter-label"},Xa={key:0,ref:"menu",class:"beam_filter-select-menu"},el=["data-value","onClick"],Ji=Ye(E.defineComponent({__name:"BeamFilterOption",props:{choices:{default:()=>[]},title:{default:"title"}},emits:["select"],setup(o,{emit:h}){const i=h,a=E.ref(!1),l=E.ref(o.choices[0].label),r=E.ref(o.choices[0].value),e=n=>{l.value=n.label,r.value=n.value,i("select",n)};return(n,t)=>{const s=E.resolveComponent("BeamHeading");return E.withDirectives((E.openBlock(),E.createElementBlock("div",Ya,[E.createVNode(s,{class:"beam_filter-option-heading"},{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(n.title),1)]),_:1}),E.createElementVNode("div",{onClick:t[0]||(t[0]=u=>a.value=!a.value),class:"beam_filter-option"},[E.createElementVNode("div",Ja,[t[1]||(t[1]=E.createElementVNode("div",{class:"beam_filter-arrow"},[E.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[E.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),E.createElementVNode("div",Za,[E.createElementVNode("label",null,E.toDisplayString(l.value),1)])]),a.value?(E.openBlock(),E.createElementBlock("ul",Xa,[(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(n.choices,u=>(E.openBlock(),E.createElementBlock("li",{class:E.normalizeClass([{selected:l.value==u.label},"beam_filter-select-option"]),"data-value":u.value,key:u.value,onClick:d=>e(u)},E.toDisplayString(u.label),11,el))),128))],512)):E.createCommentVNode("",!0)])])),[[E.unref(qa),()=>a.value=!1]])}}}),[["__scopeId","data-v-be55508c"]]),tl={},rl={class:"beam_header"};function nl(o,h){return E.openBlock(),E.createElementBlock("h1",rl,[E.renderSlot(o.$slots,"default",{},void 0,!0)])}const Zi=Ye(tl,[["render",nl],["__scopeId","data-v-5182a4d5"]]),il={class:"beam_metadata"},ol={class:"beam_metadata_content"},sl={class:"beam_metadata_block"},al={class:"beam_metadata_heading"},Xi=Ye(E.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",il,[E.createElementVNode("div",ol,[E.renderSlot(h.$slots,"default",{},()=>[i[1]||(i[1]=E.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),E.createElementVNode("div",sl,[E.createElementVNode("p",al,[i[0]||(i[0]=E.createTextVNode(" Status: ")),E.createElementVNode("span",{class:E.normalizeClass([{alert:!h.order.complete},"beam_metadata--normal"])},E.toDisplayString(h.order.complete?"Complete":"In Progress"),3)])]),i[2]||(i[2]=E.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)]),i[3]||(i[3]=E.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),ll={class:"beam_modal"},eo=Ye(E.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},setup(o){return(h,i)=>{const a=E.resolveComponent("BeamBtn"),l=E.resolveComponent("portal");return E.openBlock(),E.createBlock(l,{to:"beam_modal_outlet"},{default:E.withCtx(()=>[E.withDirectives(E.createElementVNode("div",ll,[E.createVNode(a,{onClick:i[0]||(i[0]=r=>h.$emit("closemodal"))},{default:E.withCtx(()=>i[3]||(i[3]=[E.createTextVNode("Close Modal")])),_:1,__:[3]}),E.renderSlot(h.$slots,"default",{onClosemodal:i[1]||(i[1]=r=>h.$emit("closemodal")),onConfirmmodal:i[2]||(i[2]=r=>h.$emit("confirmmodal"))},void 0,!0)],512),[[E.vShow,h.showModal]])]),_:3})}}}),[["__scopeId","data-v-4f3f0253"]]),to=E.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(o){return(h,i)=>{const a=E.resolveComponent("portal-target");return E.openBlock(),E.createBlock(a,{name:"beam_modal_outlet"})}}}),ul={class:"beam_metadata_heading"},ro=E.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(o){const h=E.computed(()=>o.complete?o.completeMessage:o.progressMessage);return(i,a)=>(E.openBlock(),E.createElementBlock("p",ul,[E.createTextVNode(E.toDisplayString(i.label)+": ",1),E.createElementVNode("span",{class:E.normalizeClass([{"beam--alert":!i.complete},"beam--normal"])},E.toDisplayString(h.value),3)]))}}),cl={},hl={class:"beam_modal-confirm"};function fl(o,h){const i=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("div",hl,[h[4]||(h[4]=E.createElementVNode("h2",null,"Would you like to continue?",-1)),E.createVNode(i,{onClick:h[0]||(h[0]=a=>o.$emit("confirmmodal"))},{default:E.withCtx(()=>h[2]||(h[2]=[E.createTextVNode("Yes")])),_:1,__:[2]}),E.createVNode(i,{onClick:h[1]||(h[1]=a=>o.$emit("confirmmodal"))},{default:E.withCtx(()=>h[3]||(h[3]=[E.createTextVNode("No")])),_:1,__:[3]})])}const no=Ye(cl,[["render",fl],["__scopeId","data-v-5b430dca"]]),dl={},pl={class:"fixed-top"};function gl(o,h){return E.openBlock(),E.createElementBlock("div",pl,[E.renderSlot(o.$slots,"default",{},void 0,!0)])}const io=Ye(dl,[["render",gl],["__scopeId","data-v-a38a41d0"]]),ml={class:"container"},zr=Ye(E.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(o){const h=E.useModel(o,"modelValue");return(i,a)=>(E.openBlock(),E.createElementBlock("label",ml,[E.withDirectives(E.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=l=>h.value=l),tabindex:"-1"},null,512),[[E.vModelCheckbox,h.value]]),a[1]||(a[1]=E.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-14a5f31b"]]),Al={class:"beam_item-count"},bl=["contenteditable"],wl={key:0},yl={key:1},Gr=Ye(E.defineComponent({__name:"ItemCount",props:E.mergeModels({denominator:{default:0},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const h=E.useModel(o,"modelValue"),i=E.computed(()=>o.denominator!==0&&h.value===o.denominator),a=e=>{const n=Number(e.target.innerHTML)||0;h.value=o.denominator?Math.min(n,o.denominator):n},l=Ka(e=>a(e),o.debounce),r=async e=>await l(e);return(e,n)=>(E.openBlock(),E.createElementBlock("div",Al,[E.createElementVNode("span",{contenteditable:e.editable,class:E.normalizeClass({"beam--alert":!i.value}),onClick:E.withModifiers(a,["stop","prevent"]),onInput:E.withModifiers(r,["stop","prevent"]),onPaste:a},E.toDisplayString(h.value),43,bl),e.denominator?(E.openBlock(),E.createElementBlock("span",wl,"/"+E.toDisplayString(e.denominator),1)):E.createCommentVNode("",!0),e.uom?(E.openBlock(),E.createElementBlock("span",yl," "+E.toDisplayString(e.uom),1)):E.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-fa0e6dff"]]),vl=["href"],oo=Ye(E.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("a",{href:h.to,class:"beam_list-anchor"},[E.renderSlot(h.$slots,"default",{},void 0,!0)],8,vl))}}),[["__scopeId","data-v-7e3ecf0d"]]),_l={tabindex:"0",class:"beam_list-item"},El={class:"beam_list-text"},Sl={class:"beam--bold"},Ar=Ye(E.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(o,{emit:h}){const i=h,a=E.ref(o.item);return E.watch(a,l=>{i("update",l)},{deep:!0}),(l,r)=>(E.openBlock(),E.createElementBlock("li",_l,[E.createElementVNode("div",El,[E.createElementVNode("label",Sl,E.toDisplayString(a.value.label),1),E.createElementVNode("p",null,E.toDisplayString(a.value.description),1)]),a.value.count?(E.openBlock(),E.createBlock(Gr,{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"])):E.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(E.openBlock(),E.createBlock(zr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":r[1]||(r[1]=e=>a.value.checked=e)},null,8,["modelValue"])):E.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Cl={class:"beam_list-view"},so=Ye(E.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(o,{emit:h}){const i=h;E.onMounted(()=>{window.addEventListener("scroll",l)}),E.onUnmounted(()=>{window.removeEventListener("scroll",l)});const a=r=>i("update",r),l=()=>{const r=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;r-e<=2&&i("scrollbottom")};return(r,e)=>(E.openBlock(),E.createElementBlock("ul",Cl,[(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(r.items,n=>(E.openBlock(),E.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(E.openBlock(),E.createBlock(Vr,{key:0,item:n},null,8,["item"])):n.linkComponent?(E.openBlock(),E.createBlock(E.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:E.withCtx(()=>[E.createVNode(Ar,{item:n,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(E.openBlock(),E.createBlock(Ar,{key:2,item:n,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),kl={class:"beam_navbar"},ao=Ye(E.defineComponent({__name:"Navbar",emits:["click"],setup(o,{emit:h}){const i=h,a=()=>{i("click")};return(l,r)=>{const e=E.resolveComponent("BeamHeading"),n=E.resolveComponent("BeamBtn");return E.openBlock(),E.createElementBlock("nav",kl,[E.renderSlot(l.$slots,"title",{},()=>[E.createVNode(e,null,{default:E.withCtx(()=>r[0]||(r[0]=[E.createTextVNode("TITLE")])),_:1,__:[0]})],!0),E.createVNode(n,{onClick:a},{default:E.withCtx(()=>[E.renderSlot(l.$slots,"navbaraction",{},()=>[r[1]||(r[1]=E.createTextVNode("Action"))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function Il(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var br={exports:{}},Tl=br.exports,lo;function Bl(){return lo||(lo=1,function(o,h){(function(i,a){o.exports=a()})(Tl,function(){var i={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 i.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),i._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),i._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=i._getNormalizedKeyNum(a),r=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(r.onKeyDetect.call(this,l,a)!==!1&&!i._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?(i._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(i._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");i._isFocusOnIgnoredElement(this)||(a.preventDefault(),l.stopPropagation&&a.stopImmediatePropagation(),l.onPaste.call(this,e,event),r.firstCharTime=0,r.lastCharTime=0,i._validateScanCode(this,e))},_handleKeyUp:function(a){if(!i._isFocusOnIgnoredElement(this)){var l=i._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 i})}(br)),br.exports}var Ol=Bl();const uo=Il(Ol),Pl={id:"scan_input"},co=E.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(o,{emit:h}){const i=h,a=o;return E.onMounted(()=>{const l=uo.attachTo(window,{onScan:a.scanHandler});i("scanInstance",l)}),E.onUnmounted(()=>{uo.detachFrom(window)}),(l,r)=>(E.openBlock(),E.createElementBlock("div",Pl))}}),ho=Ye(E.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(o){const h=E.computed(()=>o.displayInput===0?0 .toFixed(o.decimalPlaces):o.displayInput.toFixed(o.decimalPlaces)),i=a=>a.substr(0,2)=="--"?`var(${a})`:a;return(a,l)=>(E.openBlock(),E.createElementBlock("div",{class:"segmented-display",style:E.normalizeStyle({background:i(a.displayColor)})},[E.createElementVNode("h1",{class:"segmented-display-output",style:E.normalizeStyle({color:i(a.textColor)})},E.toDisplayString(h.value),5)],4))}}),[["__scopeId","data-v-140e435e"]]),xl={class:"column column-left"},Rl={class:"column column-right"},fo=Ye(E.defineComponent({__name:"SplitColumn",props:{justifyContent:{},alignItems:{}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",{class:"two-column",style:E.normalizeStyle({justifyContent:h.justifyContent||"space-between",alignItems:h.alignItems||"flex-start"})},[E.createElementVNode("div",xl,[E.renderSlot(h.$slots,"left",{},void 0,!0)]),E.createElementVNode("div",Rl,[E.renderSlot(h.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-c65440c0"]]),po=Ye(E.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(o){return(h,i)=>(E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(["arrow-icon",{open:h.open}])},i[0]||(i[0]=[E.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[E.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)]),2))}}),[["__scopeId","data-v-05e7abed"]]);var Yr=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Ul=Object.getOwnPropertyNames,Dl=Object.prototype.hasOwnProperty,it=(o,h)=>()=>(o&&(h=o(o=0)),h),Ae=(o,h)=>()=>(h||o((h={exports:{}}).exports,h),h.exports),tr=(o,h)=>{for(var i in h)Yr(o,i,{get:h[i],enumerable:!0})},Ll=(o,h,i,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of Ul(h))!Dl.call(o,l)&&l!==i&&Yr(o,l,{get:()=>h[l],enumerable:!(a=Ml(h,l))||a.enumerable});return o},Le=o=>Ll(Yr({},"__esModule",{value:!0}),o),ce=it(()=>{}),De={};tr(De,{_debugEnd:()=>Pn,_debugProcess:()=>On,_events:()=>$n,_eventsCount:()=>zn,_exiting:()=>mn,_fatalExceptions:()=>In,_getActiveHandles:()=>vo,_getActiveRequests:()=>yo,_kill:()=>wn,_linkedBinding:()=>bo,_maxListeners:()=>qn,_preload_modules:()=>Qn,_rawDebug:()=>dn,_startProfilerIdleNotifier:()=>xn,_stopProfilerIdleNotifier:()=>Rn,_tickCallback:()=>Bn,abort:()=>Ln,addListener:()=>Gn,allowedNodeEnvironmentFlags:()=>Cn,arch:()=>Xr,argv:()=>rn,argv0:()=>Vn,assert:()=>_o,binding:()=>ln,chdir:()=>hn,config:()=>An,cpuUsage:()=>lr,cwd:()=>cn,debugPort:()=>Wn,default:()=>ni,dlopen:()=>wo,domain:()=>gn,emit:()=>ei,emitWarning:()=>an,env:()=>tn,execArgv:()=>nn,execPath:()=>jn,exit:()=>En,features:()=>kn,hasUncaughtExceptionCaptureCallback:()=>Eo,hrtime:()=>wr,kill:()=>_n,listeners:()=>Co,memoryUsage:()=>vn,moduleLoadList:()=>pn,nextTick:()=>mo,off:()=>Jn,on:()=>yt,once:()=>Yn,openStdin:()=>Sn,pid:()=>Nn,platform:()=>en,ppid:()=>Fn,prependListener:()=>ti,prependOnceListener:()=>ri,reallyExit:()=>bn,release:()=>fn,removeAllListeners:()=>Xn,removeListener:()=>Zn,resourceUsage:()=>yn,setSourceMapsEnabled:()=>Kn,setUncaughtExceptionCaptureCallback:()=>Tn,stderr:()=>Un,stdin:()=>Dn,stdout:()=>Mn,title:()=>Zr,umask:()=>un,uptime:()=>So,version:()=>on,versions:()=>sn});function Jr(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function Nl(){!jt||!Wt||(jt=!1,Wt.length?gt=Wt.concat(gt):ar=-1,gt.length&&go())}function go(){if(!jt){var o=setTimeout(Nl,0);jt=!0;for(var h=gt.length;h;){for(Wt=gt,gt=[];++ar<h;)Wt&&Wt[ar].run();ar=-1,h=gt.length}Wt=null,jt=!1,clearTimeout(o)}}function mo(o){var h=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)h[i-1]=arguments[i];gt.push(new Ao(o,h)),gt.length===1&&!jt&&setTimeout(go,0)}function Ao(o,h){this.fun=o,this.array=h}function tt(){}function bo(o){Jr("_linkedBinding")}function wo(o){Jr("dlopen")}function yo(){return[]}function vo(){return[]}function _o(o,h){if(!o)throw new Error(h||"assertion error")}function Eo(){return!1}function So(){return vt.now()/1e3}function wr(o){var h=Math.floor((Date.now()-vt.now())*.001),i=vt.now()*.001,a=Math.floor(i)+h,l=Math.floor(i%1*1e9);return o&&(a=a-o[0],l=l-o[1],l<0&&(a--,l+=yr)),[a,l]}function yt(){return ni}function Co(o){return[]}var gt,jt,Wt,ar,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,gn,mn,An,bn,wn,lr,yn,vn,_n,En,Sn,Cn,kn,In,Tn,Bn,On,Pn,xn,Rn,Mn,Un,Dn,Ln,Nn,Fn,jn,Wn,Vn,Qn,Kn,vt,Hn,yr,qn,$n,zn,Gn,Yn,Jn,Zn,Xn,ei,ti,ri,ni,Fl=it(()=>{ce(),fe(),he(),gt=[],jt=!1,ar=-1,Ao.prototype.run=function(){this.fun.apply(null,this.array)},Zr="browser",Xr="x64",en="browser",tn={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},rn=["/usr/bin/node"],nn=[],on="v16.8.0",sn={},an=function(o,h){console.warn((h?h+": ":"")+o)},ln=function(o){Jr("binding")},un=function(o){return 0},cn=function(){return"/"},hn=function(o){},fn={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},dn=tt,pn=[],gn={},mn=!1,An={},bn=tt,wn=tt,lr=function(){return{}},yn=lr,vn=lr,_n=tt,En=tt,Sn=tt,Cn={},kn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},In=tt,Tn=tt,Bn=tt,On=tt,Pn=tt,xn=tt,Rn=tt,Mn=void 0,Un=void 0,Dn=void 0,Ln=tt,Nn=2,Fn=1,jn="/bin/usr/node",Wn=9229,Vn="node",Qn=[],Kn=tt,vt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},vt.now===void 0&&(Hn=Date.now(),vt.timing&&vt.timing.navigationStart&&(Hn=vt.timing.navigationStart),vt.now=()=>Date.now()-Hn),yr=1e9,wr.bigint=function(o){var h=wr(o);return typeof BigInt>"u"?h[0]*yr+h[1]:BigInt(h[0]*yr)+BigInt(h[1])},qn=10,$n={},zn=0,Gn=yt,Yn=yt,Jn=yt,Zn=yt,Xn=yt,ei=tt,ti=yt,ri=yt,ni={version:on,versions:sn,arch:Xr,platform:en,release:fn,_rawDebug:dn,moduleLoadList:pn,binding:ln,_linkedBinding:bo,_events:$n,_eventsCount:zn,_maxListeners:qn,on:yt,addListener:Gn,once:Yn,off:Jn,removeListener:Zn,removeAllListeners:Xn,emit:ei,prependListener:ti,prependOnceListener:ri,listeners:Co,domain:gn,_exiting:mn,config:An,dlopen:wo,uptime:So,_getActiveRequests:yo,_getActiveHandles:vo,reallyExit:bn,_kill:wn,cpuUsage:lr,resourceUsage:yn,memoryUsage:vn,kill:_n,exit:En,openStdin:Sn,allowedNodeEnvironmentFlags:Cn,assert:_o,features:kn,_fatalExceptions:In,setUncaughtExceptionCaptureCallback:Tn,hasUncaughtExceptionCaptureCallback:Eo,emitWarning:an,nextTick:mo,_tickCallback:Bn,_debugProcess:On,_debugEnd:Pn,_startProfilerIdleNotifier:xn,_stopProfilerIdleNotifier:Rn,stdout:Mn,stdin:Dn,stderr:Un,abort:Ln,umask:un,chdir:hn,cwd:cn,env:tn,title:Zr,argv:rn,execArgv:nn,pid:Nn,ppid:Fn,execPath:jn,debugPort:Wn,hrtime:wr,argv0:Vn,_preload_modules:Qn,setSourceMapsEnabled:Kn}}),he=it(()=>{Fl()}),Ze={};tr(Ze,{Buffer:()=>vr,INSPECT_MAX_BYTES:()=>ko,default:()=>_t,kMaxLength:()=>Io});function jl(){if(ii)return rr;ii=!0,rr.byteLength=n,rr.toByteArray=s,rr.fromByteArray=p;for(var o=[],h=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,r=a.length;l<r;++l)o[l]=a[l],h[a.charCodeAt(l)]=l;h[45]=62,h[95]=63;function e(m){var A=m.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=m.indexOf("=");y===-1&&(y=A);var w=y===A?0:4-y%4;return[y,w]}function n(m){var A=e(m),y=A[0],w=A[1];return(y+w)*3/4-w}function t(m,A,y){return(A+y)*3/4-y}function s(m){var A,y=e(m),w=y[0],C=y[1],b=new i(t(m,w,C)),_=0,N=C>0?w-4:w,M;for(M=0;M<N;M+=4)A=h[m.charCodeAt(M)]<<18|h[m.charCodeAt(M+1)]<<12|h[m.charCodeAt(M+2)]<<6|h[m.charCodeAt(M+3)],b[_++]=A>>16&255,b[_++]=A>>8&255,b[_++]=A&255;return C===2&&(A=h[m.charCodeAt(M)]<<2|h[m.charCodeAt(M+1)]>>4,b[_++]=A&255),C===1&&(A=h[m.charCodeAt(M)]<<10|h[m.charCodeAt(M+1)]<<4|h[m.charCodeAt(M+2)]>>2,b[_++]=A>>8&255,b[_++]=A&255),b}function u(m){return o[m>>18&63]+o[m>>12&63]+o[m>>6&63]+o[m&63]}function d(m,A,y){for(var w,C=[],b=A;b<y;b+=3)w=(m[b]<<16&16711680)+(m[b+1]<<8&65280)+(m[b+2]&255),C.push(u(w));return C.join("")}function p(m){for(var A,y=m.length,w=y%3,C=[],b=16383,_=0,N=y-w;_<N;_+=b)C.push(d(m,_,_+b>N?N:_+b));return w===1?(A=m[y-1],C.push(o[A>>2]+o[A<<4&63]+"==")):w===2&&(A=(m[y-2]<<8)+m[y-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}return rr}function Wl(){return oi?ur:(oi=!0,ur.read=function(o,h,i,a,l){var r,e,n=l*8-a-1,t=(1<<n)-1,s=t>>1,u=-7,d=i?l-1:0,p=i?-1:1,m=o[h+d];for(d+=p,r=m&(1<<-u)-1,m>>=-u,u+=n;u>0;r=r*256+o[h+d],d+=p,u-=8);for(e=r&(1<<-u)-1,r>>=-u,u+=a;u>0;e=e*256+o[h+d],d+=p,u-=8);if(r===0)r=1-s;else{if(r===t)return e?NaN:(m?-1:1)*(1/0);e=e+Math.pow(2,a),r=r-s}return(m?-1:1)*e*Math.pow(2,r-a)},ur.write=function(o,h,i,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,m=a?0:r-1,A=a?1:-1,y=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;o[i+m]=n&255,m+=A,n/=256,l-=8);for(e=e<<l|n,s+=l;s>0;o[i+m]=e&255,m+=A,e/=256,s-=8);o[i+m-A]|=y*128},ur)}function Vl(){if(si)return xt;si=!0;let o=jl(),h=Wl(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;xt.Buffer=e,xt.SlowBuffer=C,xt.INSPECT_MAX_BYTES=50;let a=2147483647;xt.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),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),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 f=new Uint8Array(c);return Object.setPrototypeOf(f,e.prototype),f}function e(c,f,g){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(c)}return n(c,f,g)}e.poolSize=8192;function n(c,f,g){if(typeof c=="string")return d(c,f);if(ArrayBuffer.isView(c))return m(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(W(c,ArrayBuffer)||c&&W(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(W(c,SharedArrayBuffer)||c&&W(c.buffer,SharedArrayBuffer)))return A(c,f,g);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=c.valueOf&&c.valueOf();if(v!=null&&v!==c)return e.from(v,f,g);let I=y(c);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return e.from(c[Symbol.toPrimitive]("string"),f,g);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,f,g){return n(c,f,g)},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,f,g){return t(c),c<=0?r(c):f!==void 0?typeof g=="string"?r(c).fill(f,g):r(c).fill(f):r(c)}e.alloc=function(c,f,g){return s(c,f,g)};function u(c){return t(c),r(c<0?0:w(c)|0)}e.allocUnsafe=function(c){return u(c)},e.allocUnsafeSlow=function(c){return u(c)};function d(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!e.isEncoding(f))throw new TypeError("Unknown encoding: "+f);let g=b(c,f)|0,v=r(g),I=v.write(c,f);return I!==g&&(v=v.slice(0,I)),v}function p(c){let f=c.length<0?0:w(c.length)|0,g=r(f);for(let v=0;v<f;v+=1)g[v]=c[v]&255;return g}function m(c){if(W(c,Uint8Array)){let f=new Uint8Array(c);return A(f.buffer,f.byteOffset,f.byteLength)}return p(c)}function A(c,f,g){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(g||0))throw new RangeError('"length" is outside of buffer bounds');let v;return f===void 0&&g===void 0?v=new Uint8Array(c):g===void 0?v=new Uint8Array(c,f):v=new Uint8Array(c,f,g),Object.setPrototypeOf(v,e.prototype),v}function y(c){if(e.isBuffer(c)){let f=w(c.length)|0,g=r(f);return g.length===0||c.copy(g,0,0,f),g}if(c.length!==void 0)return typeof c.length!="number"||se(c.length)?r(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function w(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(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,f){if(W(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),W(f,Uint8Array)&&(f=e.from(f,f.offset,f.byteLength)),!e.isBuffer(c)||!e.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===f)return 0;let g=c.length,v=f.length;for(let I=0,L=Math.min(g,v);I<L;++I)if(c[I]!==f[I]){g=c[I],v=f[I];break}return g<v?-1:v<g?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,f){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return e.alloc(0);let g;if(f===void 0)for(f=0,g=0;g<c.length;++g)f+=c[g].length;let v=e.allocUnsafe(f),I=0;for(g=0;g<c.length;++g){let L=c[g];if(W(L,Uint8Array))I+L.length>v.length?(e.isBuffer(L)||(L=e.from(L)),L.copy(v,I)):Uint8Array.prototype.set.call(v,L,I);else if(e.isBuffer(L))L.copy(v,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=L.length}return v};function b(c,f){if(e.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||W(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 g=c.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&g===0)return 0;let I=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return j(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return re(c).length;default:if(I)return v?-1:j(c).length;f=(""+f).toLowerCase(),I=!0}}e.byteLength=b;function _(c,f,g){let v=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,f>>>=0,g<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return me(this,f,g);case"utf8":case"utf-8":return G(this,f,g);case"ascii":return be(this,f,g);case"latin1":case"binary":return pe(this,f,g);case"base64":return P(this,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,f,g);default:if(v)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),v=!0}}e.prototype._isBuffer=!0;function N(c,f,g){let v=c[f];c[f]=c[g],c[g]=v}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 f=0;f<c;f+=2)N(this,f,f+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 f=0;f<c;f+=4)N(this,f,f+3),N(this,f+1,f+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 f=0;f<c;f+=8)N(this,f,f+7),N(this,f+1,f+6),N(this,f+2,f+5),N(this,f+3,f+4);return this},e.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?G(this,0,c):_.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="",f=xt.INSPECT_MAX_BYTES;return c=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(c+=" ... "),"<Buffer "+c+">"},i&&(e.prototype[i]=e.prototype.inspect),e.prototype.compare=function(c,f,g,v,I){if(W(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(f===void 0&&(f=0),g===void 0&&(g=c?c.length:0),v===void 0&&(v=0),I===void 0&&(I=this.length),f<0||g>c.length||v<0||I>this.length)throw new RangeError("out of range index");if(v>=I&&f>=g)return 0;if(v>=I)return-1;if(f>=g)return 1;if(f>>>=0,g>>>=0,v>>>=0,I>>>=0,this===c)return 0;let L=I-v,$=g-f,_e=Math.min(L,$),Ee=this.slice(v,I),Be=c.slice(f,g);for(let Me=0;Me<_e;++Me)if(Ee[Me]!==Be[Me]){L=Ee[Me],$=Be[Me];break}return L<$?-1:$<L?1:0};function M(c,f,g,v,I){if(c.length===0)return-1;if(typeof g=="string"?(v=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,se(g)&&(g=I?0:c.length-1),g<0&&(g=c.length+g),g>=c.length){if(I)return-1;g=c.length-1}else if(g<0)if(I)g=0;else return-1;if(typeof f=="string"&&(f=e.from(f,v)),e.isBuffer(f))return f.length===0?-1:k(c,f,g,v,I);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(c,f,g):Uint8Array.prototype.lastIndexOf.call(c,f,g):k(c,[f],g,v,I);throw new TypeError("val must be string, number or Buffer")}function k(c,f,g,v,I){let L=1,$=c.length,_e=f.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(c.length<2||f.length<2)return-1;L=2,$/=2,_e/=2,g/=2}function Ee(Me,xe){return L===1?Me[xe]:Me.readUInt16BE(xe*L)}let Be;if(I){let Me=-1;for(Be=g;Be<$;Be++)if(Ee(c,Be)===Ee(f,Me===-1?0:Be-Me)){if(Me===-1&&(Me=Be),Be-Me+1===_e)return Me*L}else Me!==-1&&(Be-=Be-Me),Me=-1}else for(g+_e>$&&(g=$-_e),Be=g;Be>=0;Be--){let Me=!0;for(let xe=0;xe<_e;xe++)if(Ee(c,Be+xe)!==Ee(f,xe)){Me=!1;break}if(Me)return Be}return-1}e.prototype.includes=function(c,f,g){return this.indexOf(c,f,g)!==-1},e.prototype.indexOf=function(c,f,g){return M(this,c,f,g,!0)},e.prototype.lastIndexOf=function(c,f,g){return M(this,c,f,g,!1)};function T(c,f,g,v){g=Number(g)||0;let I=c.length-g;v?(v=Number(v),v>I&&(v=I)):v=I;let L=f.length;v>L/2&&(v=L/2);let $;for($=0;$<v;++$){let _e=parseInt(f.substr($*2,2),16);if(se(_e))return $;c[g+$]=_e}return $}function U(c,f,g,v){return ue(j(f,c.length-g),c,g,v)}function J(c,f,g,v){return ue(Y(f),c,g,v)}function X(c,f,g,v){return ue(re(f),c,g,v)}function le(c,f,g,v){return ue(oe(f,c.length-g),c,g,v)}e.prototype.write=function(c,f,g,v){if(f===void 0)v="utf8",g=this.length,f=0;else if(g===void 0&&typeof f=="string")v=f,g=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(g)?(g=g>>>0,v===void 0&&(v="utf8")):(v=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let I=this.length-f;if((g===void 0||g>I)&&(g=I),c.length>0&&(g<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let L=!1;for(;;)switch(v){case"hex":return T(this,c,f,g);case"utf8":case"utf-8":return U(this,c,f,g);case"ascii":case"latin1":case"binary":return J(this,c,f,g);case"base64":return X(this,c,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,c,f,g);default:if(L)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),L=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(c,f,g){return f===0&&g===c.length?o.fromByteArray(c):o.fromByteArray(c.slice(f,g))}function G(c,f,g){g=Math.min(c.length,g);let v=[],I=f;for(;I<g;){let L=c[I],$=null,_e=L>239?4:L>223?3:L>191?2:1;if(I+_e<=g){let Ee,Be,Me,xe;switch(_e){case 1:L<128&&($=L);break;case 2:Ee=c[I+1],(Ee&192)===128&&(xe=(L&31)<<6|Ee&63,xe>127&&($=xe));break;case 3:Ee=c[I+1],Be=c[I+2],(Ee&192)===128&&(Be&192)===128&&(xe=(L&15)<<12|(Ee&63)<<6|Be&63,xe>2047&&(xe<55296||xe>57343)&&($=xe));break;case 4:Ee=c[I+1],Be=c[I+2],Me=c[I+3],(Ee&192)===128&&(Be&192)===128&&(Me&192)===128&&(xe=(L&15)<<18|(Ee&63)<<12|(Be&63)<<6|Me&63,xe>65535&&xe<1114112&&($=xe))}}$===null?($=65533,_e=1):$>65535&&($-=65536,v.push($>>>10&1023|55296),$=56320|$&1023),v.push($),I+=_e}return V(v)}let Z=4096;function V(c){let f=c.length;if(f<=Z)return String.fromCharCode.apply(String,c);let g="",v=0;for(;v<f;)g+=String.fromCharCode.apply(String,c.slice(v,v+=Z));return g}function be(c,f,g){let v="";g=Math.min(c.length,g);for(let I=f;I<g;++I)v+=String.fromCharCode(c[I]&127);return v}function pe(c,f,g){let v="";g=Math.min(c.length,g);for(let I=f;I<g;++I)v+=String.fromCharCode(c[I]);return v}function me(c,f,g){let v=c.length;(!f||f<0)&&(f=0),(!g||g<0||g>v)&&(g=v);let I="";for(let L=f;L<g;++L)I+=we[c[L]];return I}function ve(c,f,g){let v=c.slice(f,g),I="";for(let L=0;L<v.length-1;L+=2)I+=String.fromCharCode(v[L]+v[L+1]*256);return I}e.prototype.slice=function(c,f){let g=this.length;c=~~c,f=f===void 0?g:~~f,c<0?(c+=g,c<0&&(c=0)):c>g&&(c=g),f<0?(f+=g,f<0&&(f=0)):f>g&&(f=g),f<c&&(f=c);let v=this.subarray(c,f);return Object.setPrototypeOf(v,e.prototype),v};function z(c,f,g){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>g)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c],I=1,L=0;for(;++L<f&&(I*=256);)v+=this[c+L]*I;return v},e.prototype.readUintBE=e.prototype.readUIntBE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c+--f],I=1;for(;f>0&&(I*=256);)v+=this[c+--f]*I;return v},e.prototype.readUint8=e.prototype.readUInt8=function(c,f){return c=c>>>0,f||z(c,1,this.length),this[c]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(c,f){return c=c>>>0,f||z(c,2,this.length),this[c]|this[c+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(c,f){return c=c>>>0,f||z(c,2,this.length),this[c]<<8|this[c+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(c,f){return c=c>>>0,f||z(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,f){return c=c>>>0,f||z(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},e.prototype.readBigUInt64LE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,I=this[++c]+this[++c]*2**8+this[++c]*2**16+g*2**24;return BigInt(v)+(BigInt(I)<<BigInt(32))}),e.prototype.readBigUInt64BE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=f*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],I=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g;return(BigInt(v)<<BigInt(32))+BigInt(I)}),e.prototype.readIntLE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=this[c],I=1,L=0;for(;++L<f&&(I*=256);)v+=this[c+L]*I;return I*=128,v>=I&&(v-=Math.pow(2,8*f)),v},e.prototype.readIntBE=function(c,f,g){c=c>>>0,f=f>>>0,g||z(c,f,this.length);let v=f,I=1,L=this[c+--v];for(;v>0&&(I*=256);)L+=this[c+--v]*I;return I*=128,L>=I&&(L-=Math.pow(2,8*f)),L},e.prototype.readInt8=function(c,f){return c=c>>>0,f||z(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},e.prototype.readInt16LE=function(c,f){c=c>>>0,f||z(c,2,this.length);let g=this[c]|this[c+1]<<8;return g&32768?g|4294901760:g},e.prototype.readInt16BE=function(c,f){c=c>>>0,f||z(c,2,this.length);let g=this[c+1]|this[c]<<8;return g&32768?g|4294901760:g},e.prototype.readInt32LE=function(c,f){return c=c>>>0,f||z(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},e.prototype.readInt32BE=function(c,f){return c=c>>>0,f||z(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},e.prototype.readBigInt64LE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(g<<24);return(BigInt(v)<<BigInt(32))+BigInt(f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),e.prototype.readBigInt64BE=te(function(c){c=c>>>0,H(c,"offset");let f=this[c],g=this[c+7];(f===void 0||g===void 0)&&ae(c,this.length-8);let v=(f<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(v)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g)}),e.prototype.readFloatLE=function(c,f){return c=c>>>0,f||z(c,4,this.length),h.read(this,c,!0,23,4)},e.prototype.readFloatBE=function(c,f){return c=c>>>0,f||z(c,4,this.length),h.read(this,c,!1,23,4)},e.prototype.readDoubleLE=function(c,f){return c=c>>>0,f||z(c,8,this.length),h.read(this,c,!0,52,8)},e.prototype.readDoubleBE=function(c,f){return c=c>>>0,f||z(c,8,this.length),h.read(this,c,!1,52,8)};function de(c,f,g,v,I,L){if(!e.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>I||f<L)throw new RangeError('"value" argument is out of bounds');if(g+v>c.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(c,f,g,v){if(c=+c,f=f>>>0,g=g>>>0,!v){let $=Math.pow(2,8*g)-1;de(this,c,f,g,$,0)}let I=1,L=0;for(this[f]=c&255;++L<g&&(I*=256);)this[f+L]=c/I&255;return f+g},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(c,f,g,v){if(c=+c,f=f>>>0,g=g>>>0,!v){let $=Math.pow(2,8*g)-1;de(this,c,f,g,$,0)}let I=g-1,L=1;for(this[f+I]=c&255;--I>=0&&(L*=256);)this[f+I]=c/L&255;return f+g},e.prototype.writeUint8=e.prototype.writeUInt8=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,1,255,0),this[f]=c&255,f+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,65535,0),this[f]=c&255,this[f+1]=c>>>8,f+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,65535,0),this[f]=c>>>8,this[f+1]=c&255,f+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,4294967295,0),this[f+3]=c>>>24,this[f+2]=c>>>16,this[f+1]=c>>>8,this[f]=c&255,f+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,4294967295,0),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4};function x(c,f,g,v,I){K(f,v,I,c,g,7);let L=Number(f&BigInt(4294967295));c[g++]=L,L=L>>8,c[g++]=L,L=L>>8,c[g++]=L,L=L>>8,c[g++]=L;let $=Number(f>>BigInt(32)&BigInt(4294967295));return c[g++]=$,$=$>>8,c[g++]=$,$=$>>8,c[g++]=$,$=$>>8,c[g++]=$,g}function ne(c,f,g,v,I){K(f,v,I,c,g,7);let L=Number(f&BigInt(4294967295));c[g+7]=L,L=L>>8,c[g+6]=L,L=L>>8,c[g+5]=L,L=L>>8,c[g+4]=L;let $=Number(f>>BigInt(32)&BigInt(4294967295));return c[g+3]=$,$=$>>8,c[g+2]=$,$=$>>8,c[g+1]=$,$=$>>8,c[g]=$,g+8}e.prototype.writeBigUInt64LE=te(function(c,f=0){return x(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=te(function(c,f=0){return ne(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(c,f,g,v){if(c=+c,f=f>>>0,!v){let _e=Math.pow(2,8*g-1);de(this,c,f,g,_e-1,-_e)}let I=0,L=1,$=0;for(this[f]=c&255;++I<g&&(L*=256);)c<0&&$===0&&this[f+I-1]!==0&&($=1),this[f+I]=(c/L>>0)-$&255;return f+g},e.prototype.writeIntBE=function(c,f,g,v){if(c=+c,f=f>>>0,!v){let _e=Math.pow(2,8*g-1);de(this,c,f,g,_e-1,-_e)}let I=g-1,L=1,$=0;for(this[f+I]=c&255;--I>=0&&(L*=256);)c<0&&$===0&&this[f+I+1]!==0&&($=1),this[f+I]=(c/L>>0)-$&255;return f+g},e.prototype.writeInt8=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,1,127,-128),c<0&&(c=255+c+1),this[f]=c&255,f+1},e.prototype.writeInt16LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,32767,-32768),this[f]=c&255,this[f+1]=c>>>8,f+2},e.prototype.writeInt16BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,2,32767,-32768),this[f]=c>>>8,this[f+1]=c&255,f+2},e.prototype.writeInt32LE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,2147483647,-2147483648),this[f]=c&255,this[f+1]=c>>>8,this[f+2]=c>>>16,this[f+3]=c>>>24,f+4},e.prototype.writeInt32BE=function(c,f,g){return c=+c,f=f>>>0,g||de(this,c,f,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4},e.prototype.writeBigInt64LE=te(function(c,f=0){return x(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=te(function(c,f=0){return ne(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(c,f,g,v,I,L){if(g+v>c.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function F(c,f,g,v,I){return f=+f,g=g>>>0,I||ge(c,f,g,4),h.write(c,f,g,v,23,4),g+4}e.prototype.writeFloatLE=function(c,f,g){return F(this,c,f,!0,g)},e.prototype.writeFloatBE=function(c,f,g){return F(this,c,f,!1,g)};function Ce(c,f,g,v,I){return f=+f,g=g>>>0,I||ge(c,f,g,8),h.write(c,f,g,v,52,8),g+8}e.prototype.writeDoubleLE=function(c,f,g){return Ce(this,c,f,!0,g)},e.prototype.writeDoubleBE=function(c,f,g){return Ce(this,c,f,!1,g)},e.prototype.copy=function(c,f,g,v){if(!e.isBuffer(c))throw new TypeError("argument should be a Buffer");if(g||(g=0),!v&&v!==0&&(v=this.length),f>=c.length&&(f=c.length),f||(f=0),v>0&&v<g&&(v=g),v===g||c.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),c.length-f<v-g&&(v=c.length-f+g);let I=v-g;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,g,v):Uint8Array.prototype.set.call(c,this.subarray(g,v),f),I},e.prototype.fill=function(c,f,g,v){if(typeof c=="string"){if(typeof f=="string"?(v=f,f=0,g=this.length):typeof g=="string"&&(v=g,g=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!e.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(c.length===1){let L=c.charCodeAt(0);(v==="utf8"&&L<128||v==="latin1")&&(c=L)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(f<0||this.length<f||this.length<g)throw new RangeError("Out of range index");if(g<=f)return this;f=f>>>0,g=g===void 0?this.length:g>>>0,c||(c=0);let I;if(typeof c=="number")for(I=f;I<g;++I)this[I]=c;else{let L=e.isBuffer(c)?c:e.from(c,v),$=L.length;if($===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(I=0;I<g-f;++I)this[I+f]=L[I%$]}return this};let q={};function D(c,f,g){q[c]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}D("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),D("ERR_INVALID_ARG_TYPE",function(c,f){return`The "${c}" argument must be of type number. Received type ${typeof f}`},TypeError),D("ERR_OUT_OF_RANGE",function(c,f,g){let v=`The value of "${c}" is out of range.`,I=g;return Number.isInteger(g)&&Math.abs(g)>2**32?I=ee(String(g)):typeof g=="bigint"&&(I=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(I=ee(I)),I+="n"),v+=` It must be ${f}. Received ${I}`,v},RangeError);function ee(c){let f="",g=c.length,v=c[0]==="-"?1:0;for(;g>=v+4;g-=3)f=`_${c.slice(g-3,g)}${f}`;return`${c.slice(0,g)}${f}`}function Q(c,f,g){H(f,"offset"),(c[f]===void 0||c[f+g]===void 0)&&ae(f,c.length-(g+1))}function K(c,f,g,v,I,L){if(c>g||c<f){let $=typeof f=="bigint"?"n":"",_e;throw f===0||f===BigInt(0)?_e=`>= 0${$} and < 2${$} ** ${(L+1)*8}${$}`:_e=`>= -(2${$} ** ${(L+1)*8-1}${$}) and < 2 ** ${(L+1)*8-1}${$}`,new q.ERR_OUT_OF_RANGE("value",_e,c)}Q(v,I,L)}function H(c,f){if(typeof c!="number")throw new q.ERR_INVALID_ARG_TYPE(f,"number",c)}function ae(c,f,g){throw Math.floor(c)!==c?(H(c,g),new q.ERR_OUT_OF_RANGE("offset","an integer",c)):f<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,c)}let ie=/[^+/0-9A-Za-z-_]/g;function R(c){if(c=c.split("=")[0],c=c.trim().replace(ie,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function j(c,f){f=f||1/0;let g,v=c.length,I=null,L=[];for(let $=0;$<v;++$){if(g=c.charCodeAt($),g>55295&&g<57344){if(!I){if(g>56319){(f-=3)>-1&&L.push(239,191,189);continue}else if($+1===v){(f-=3)>-1&&L.push(239,191,189);continue}I=g;continue}if(g<56320){(f-=3)>-1&&L.push(239,191,189),I=g;continue}g=(I-55296<<10|g-56320)+65536}else I&&(f-=3)>-1&&L.push(239,191,189);if(I=null,g<128){if((f-=1)<0)break;L.push(g)}else if(g<2048){if((f-=2)<0)break;L.push(g>>6|192,g&63|128)}else if(g<65536){if((f-=3)<0)break;L.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((f-=4)<0)break;L.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return L}function Y(c){let f=[];for(let g=0;g<c.length;++g)f.push(c.charCodeAt(g)&255);return f}function oe(c,f){let g,v,I,L=[];for(let $=0;$<c.length&&!((f-=2)<0);++$)g=c.charCodeAt($),v=g>>8,I=g%256,L.push(I),L.push(v);return L}function re(c){return o.toByteArray(R(c))}function ue(c,f,g,v){let I;for(I=0;I<v&&!(I+g>=f.length||I>=c.length);++I)f[I+g]=c[I];return I}function W(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function se(c){return c!==c}let we=function(){let c="0123456789abcdef",f=new Array(256);for(let g=0;g<16;++g){let v=g*16;for(let I=0;I<16;++I)f[v+I]=c[g]+c[I]}return f}();function te(c){return typeof BigInt>"u"?Pe:c}function Pe(){throw new Error("BigInt not supported")}return xt}var rr,ii,ur,oi,xt,si,_t,vr,ko,Io,Xe=it(()=>{ce(),fe(),he(),rr={},ii=!1,ur={},oi=!1,xt={},si=!1,_t=Vl(),_t.Buffer,_t.SlowBuffer,_t.INSPECT_MAX_BYTES,_t.kMaxLength,vr=_t.Buffer,ko=_t.INSPECT_MAX_BYTES,Io=_t.kMaxLength}),fe=it(()=>{Xe()}),Ql=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=class{constructor(i){this.aliasToTopic={},this.max=i}put(i,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=i,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(i){return this.aliasToTopic[i]}clear(){this.aliasToTopic={}}};o.default=h}),qe=Ae((o,h)=>{ce(),fe(),he();var i=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
3
|
`;super(l),this.name="AggregateError",this.errors=a}};h.exports={AggregateError:i,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}}),To=Ae((o,h)=>{ce(),fe(),he(),h.exports={format(i,...a){return i.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(i){switch(typeof i){case"string":if(i.includes("'"))if(i.includes('"')){if(!i.includes("`")&&!i.includes("${"))return`\`${i}\``}else return`"${i}"`;return`'${i}'`;case"number":return isNaN(i)?"NaN":Object.is(i,-0)?String(i):i;case"bigint":return`${String(i)}n`;case"boolean":case"undefined":return String(i);case"object":return"{}"}}}}),ot=Ae((o,h)=>{ce(),fe(),he();var{format:i,inspect:a}=To(),{AggregateError:l}=qe(),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(b,_){if(!b)throw new u.ERR_INTERNAL_ASSERTION(_)}function p(b){let _="",N=b.length,M=b[0]==="-"?1:0;for(;N>=M+4;N-=3)_=`_${b.slice(N-3,N)}${_}`;return`${b.slice(0,N)}${_}`}function m(b,_,N){if(typeof _=="function")return d(_.length<=N.length,`Code: ${b}; The provided arguments length (${N.length}) does not match the required ones (${_.length}).`),_(...N);let M=(_.match(/%[dfijoOs]/g)||[]).length;return d(M===N.length,`Code: ${b}; The provided arguments length (${N.length}) does not match the required ones (${M}).`),N.length===0?_:i(_,...N)}function A(b,_,N){N||(N=Error);class M extends N{constructor(...T){super(m(b,_,T))}toString(){return`${this.name} [${b}]: ${this.message}`}}Object.defineProperties(M.prototype,{name:{value:N.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${b}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),M.prototype.code=b,M.prototype[e]=!0,u[b]=M}function y(b){let _=s+b.name;return Object.defineProperty(b,"name",{value:_}),b}function w(b,_){if(b&&_&&b!==_){if(Array.isArray(_.errors))return _.errors.push(b),_;let N=new r([_,b],_.message);return N.code=_.code,N}return b||_}var C=class extends Error{constructor(b="The operation was aborted",_=void 0){if(_!==void 0&&typeof _!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",_);super(b,_),this.code="ABORT_ERR",this.name="AbortError"}};A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(b,_,N)=>{d(typeof b=="string","'name' must be a string"),Array.isArray(_)||(_=[_]);let M="The ";b.endsWith(" argument")?M+=`${b} `:M+=`"${b}" ${b.includes(".")?"property":"argument"} `,M+="must be ";let k=[],T=[],U=[];for(let X of _)d(typeof X=="string","All expected entries have to be of type string"),n.includes(X)?k.push(X.toLowerCase()):t.test(X)?T.push(X):(d(X!=="object",'The value "object" should be written as "Object"'),U.push(X));if(T.length>0){let X=k.indexOf("object");X!==-1&&(k.splice(k,X,1),T.push("Object"))}if(k.length>0){switch(k.length){case 1:M+=`of type ${k[0]}`;break;case 2:M+=`one of type ${k[0]} or ${k[1]}`;break;default:{let X=k.pop();M+=`one of type ${k.join(", ")}, or ${X}`}}(T.length>0||U.length>0)&&(M+=" or ")}if(T.length>0){switch(T.length){case 1:M+=`an instance of ${T[0]}`;break;case 2:M+=`an instance of ${T[0]} or ${T[1]}`;break;default:{let X=T.pop();M+=`an instance of ${T.join(", ")}, or ${X}`}}U.length>0&&(M+=" or ")}switch(U.length){case 0:break;case 1:U[0].toLowerCase()!==U[0]&&(M+="an "),M+=`${U[0]}`;break;case 2:M+=`one of ${U[0]} or ${U[1]}`;break;default:{let X=U.pop();M+=`one of ${U.join(", ")}, or ${X}`}}if(N==null)M+=`. Received ${N}`;else if(typeof N=="function"&&N.name)M+=`. Received function ${N.name}`;else if(typeof N=="object"){var J;if((J=N.constructor)!==null&&J!==void 0&&J.name)M+=`. Received an instance of ${N.constructor.name}`;else{let X=a(N,{depth:-1});M+=`. Received ${X}`}}else{let X=a(N,{colors:!1});X.length>25&&(X=`${X.slice(0,25)}...`),M+=`. Received type ${typeof N} (${X})`}return M},TypeError),A("ERR_INVALID_ARG_VALUE",(b,_,N="is invalid")=>{let M=a(_);return M.length>128&&(M=M.slice(0,128)+"..."),`The ${b.includes(".")?"property":"argument"} '${b}' ${N}. Received ${M}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(b,_,N)=>{var M;let k=N!=null&&(M=N.constructor)!==null&&M!==void 0&&M.name?`instance of ${N.constructor.name}`:`type ${typeof N}`;return`Expected ${b} to be returned from the "${_}" function but got ${k}.`},TypeError),A("ERR_MISSING_ARGS",(...b)=>{d(b.length>0,"At least one arg needs to be specified");let _,N=b.length;switch(b=(Array.isArray(b)?b:[b]).map(M=>`"${M}"`).join(" or "),N){case 1:_+=`The ${b[0]} argument`;break;case 2:_+=`The ${b[0]} and ${b[1]} arguments`;break;default:{let M=b.pop();_+=`The ${b.join(", ")}, and ${M} arguments`}break}return`${_} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(b,_,N)=>{d(_,'Missing "range" argument');let M;if(Number.isInteger(N)&&Math.abs(N)>2**32)M=p(String(N));else if(typeof N=="bigint"){M=String(N);let k=BigInt(2)**BigInt(32);(N>k||N<-k)&&(M=p(M)),M+="n"}else M=a(N);return`The value of "${b}" is out of range. It must be ${_}. Received ${M}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),h.exports={AbortError:C,aggregateTwoErrors:y(w),hideStackFrames:y,codes:u}}),cr=Ae((o,h)=>{ce(),fe(),he();var{AbortController:i,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;h.exports=i,h.exports.AbortSignal=a,h.exports.default=i});function Ne(){Ne.init.call(this)}function _r(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}function Bo(o){return o._maxListeners===void 0?Ne.defaultMaxListeners:o._maxListeners}function Oo(o,h,i,a){var l,r,e,n;if(_r(i),(r=o._events)===void 0?(r=o._events=Object.create(null),o._eventsCount=0):(r.newListener!==void 0&&(o.emit("newListener",h,i.listener?i.listener:i),r=o._events),e=r[h]),e===void 0)e=r[h]=i,++o._eventsCount;else if(typeof e=="function"?e=r[h]=a?[i,e]:[e,i]:a?e.unshift(i):e.push(i),(l=Bo(o))>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=o,t.type=h,t.count=e.length,n=t,console&&console.warn&&console.warn(n)}return o}function Kl(){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 Po(o,h,i){var a={fired:!1,wrapFn:void 0,target:o,type:h,listener:i},l=Kl.bind(a);return l.listener=i,a.wrapFn=l,l}function xo(o,h,i){var a=o._events;if(a===void 0)return[];var l=a[h];return l===void 0?[]:typeof l=="function"?i?[l.listener||l]:[l]:i?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):Mo(l,l.length)}function Ro(o){var h=this._events;if(h!==void 0){var i=h[o];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}function Mo(o,h){for(var i=new Array(h),a=0;a<h;++a)i[a]=o[a];return i}var Uo,Do,Vt,ai,li,ui,ut,Lo=it(()=>{ce(),fe(),he(),Vt=typeof Reflect=="object"?Reflect:null,ai=Vt&&typeof Vt.apply=="function"?Vt.apply:function(o,h,i){return Function.prototype.apply.call(o,h,i)},Do=Vt&&typeof Vt.ownKeys=="function"?Vt.ownKeys:Object.getOwnPropertySymbols?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:function(o){return Object.getOwnPropertyNames(o)},li=Number.isNaN||function(o){return o!=o},Uo=Ne,Ne.EventEmitter=Ne,Ne.prototype._events=void 0,Ne.prototype._eventsCount=0,Ne.prototype._maxListeners=void 0,ui=10,Object.defineProperty(Ne,"defaultMaxListeners",{enumerable:!0,get:function(){return ui},set:function(o){if(typeof o!="number"||o<0||li(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");ui=o}}),Ne.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},Ne.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||li(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this},Ne.prototype.getMaxListeners=function(){return Bo(this)},Ne.prototype.emit=function(o){for(var h=[],i=1;i<arguments.length;i++)h.push(arguments[i]);var a=o==="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[o];if(n===void 0)return!1;if(typeof n=="function")ai(n,this,h);else{var t=n.length,s=Mo(n,t);for(i=0;i<t;++i)ai(s[i],this,h)}return!0},Ne.prototype.addListener=function(o,h){return Oo(this,o,h,!1)},Ne.prototype.on=Ne.prototype.addListener,Ne.prototype.prependListener=function(o,h){return Oo(this,o,h,!0)},Ne.prototype.once=function(o,h){return _r(h),this.on(o,Po(this,o,h)),this},Ne.prototype.prependOnceListener=function(o,h){return _r(h),this.prependListener(o,Po(this,o,h)),this},Ne.prototype.removeListener=function(o,h){var i,a,l,r,e;if(_r(h),(a=this._events)===void 0)return this;if((i=a[o])===void 0)return this;if(i===h||i.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete a[o],a.removeListener&&this.emit("removeListener",o,i.listener||h));else if(typeof i!="function"){for(l=-1,r=i.length-1;r>=0;r--)if(i[r]===h||i[r].listener===h){e=i[r].listener,l=r;break}if(l<0)return this;l===0?i.shift():function(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}(i,l),i.length===1&&(a[o]=i[0]),a.removeListener!==void 0&&this.emit("removeListener",o,e||h)}return this},Ne.prototype.off=Ne.prototype.removeListener,Ne.prototype.removeAllListeners=function(o){var h,i,a;if((i=this._events)===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[o]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete i[o]),this;if(arguments.length===0){var l,r=Object.keys(i);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=i[o])=="function")this.removeListener(o,h);else if(h!==void 0)for(a=h.length-1;a>=0;a--)this.removeListener(o,h[a]);return this},Ne.prototype.listeners=function(o){return xo(this,o,!0)},Ne.prototype.rawListeners=function(o){return xo(this,o,!1)},Ne.listenerCount=function(o,h){return typeof o.listenerCount=="function"?o.listenerCount(h):Ro.call(o,h)},Ne.prototype.listenerCount=Ro,Ne.prototype.eventNames=function(){return this._eventsCount>0?Do(this._events):[]},ut=Uo,ut.EventEmitter,ut.defaultMaxListeners,ut.init,ut.listenerCount,ut.EventEmitter,ut.defaultMaxListeners,ut.init,ut.listenerCount}),Rt={};tr(Rt,{EventEmitter:()=>No,default:()=>ut,defaultMaxListeners:()=>Fo,init:()=>jo,listenerCount:()=>Wo,on:()=>Vo,once:()=>Qo});var No,Fo,jo,Wo,Vo,Qo,Qt=it(()=>{ce(),fe(),he(),Lo(),Lo(),ut.once=function(o,h){return new Promise((i,a)=>{function l(...e){r!==void 0&&o.removeListener("error",r),i(e)}let r;h!=="error"&&(r=e=>{o.removeListener(name,l),a(e)},o.once("error",r)),o.once(h,l)})},ut.on=function(o,h){let i=[],a=[],l=null,r=!1,e={async next(){let s=i.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(){o.removeListener(h,n),o.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,o.removeListener(h,n),o.removeListener("error",t)},[Symbol.asyncIterator](){return this}};return o.on(h,n),o.on("error",t),e;function n(...s){let u=a.shift();u?u.resolve(createIterResult(s,!1)):i.push(s)}function t(s){r=!0;let u=a.shift();u?u.reject(s):l=s,e.return()}},{EventEmitter:No,defaultMaxListeners:Fo,init:jo,listenerCount:Wo,on:Vo,once:Qo}=ut}),at=Ae((o,h)=>{ce(),fe(),he();var i=(Xe(),Le(Ze)),{format:a,inspect:l}=To(),{codes:{ERR_INVALID_ARG_TYPE:r}}=ot(),{kResistStopPropagation:e,AggregateError:n,SymbolDispose:t}=qe(),s=globalThis.AbortSignal||cr().AbortSignal,u=globalThis.AbortController||cr().AbortController,d=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||i.Blob,m=typeof p<"u"?function(w){return w instanceof p}:function(w){return!1},A=(w,C)=>{if(w!==void 0&&(w===null||typeof w!="object"||!("aborted"in w)))throw new r(C,"AbortSignal",w)},y=(w,C)=>{if(typeof w!="function")throw new r(C,"Function",w)};h.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(w){let C=!1;return function(...b){C||(C=!0,w.apply(this,b))}},createDeferredPromise:function(){let w,C;return{promise:new Promise((b,_)=>{w=b,C=_}),resolve:w,reject:C}},promisify(w){return new Promise((C,b)=>{w((_,...N)=>_?b(_):C(...N))})},debuglog(){return function(){}},format:a,inspect:l,types:{isAsyncFunction(w){return w instanceof d},isArrayBufferView(w){return ArrayBuffer.isView(w)}},isBlob:m,deprecate(w,C){return w},addAbortListener:(Qt(),Le(Rt)).addAbortListener||function(w,C){if(w===void 0)throw new r("signal","AbortSignal",w);A(w,"signal"),y(C,"listener");let b;return w.aborted?queueMicrotask(()=>C()):(w.addEventListener("abort",C,{__proto__:null,once:!0,[e]:!0}),b=()=>{w.removeEventListener("abort",C)}),{__proto__:null,[t](){var _;(_=b)===null||_===void 0||_()}}},AbortSignalAny:s.any||function(w){if(w.length===1)return w[0];let C=new u,b=()=>C.abort();return w.forEach(_=>{A(_,"signals"),_.addEventListener("abort",b,{once:!0})}),C.signal.addEventListener("abort",()=>{w.forEach(_=>_.removeEventListener("abort",b))},{once:!0}),C.signal}},h.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),hr=Ae((o,h)=>{ce(),fe(),he();var{ArrayIsArray:i,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:m,StringPrototypeToUpperCase:A,StringPrototypeTrim:y}=qe(),{hideStackFrames:w,codes:{ERR_SOCKET_BAD_PORT:C,ERR_INVALID_ARG_TYPE:b,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:N,ERR_UNKNOWN_SIGNAL:M}}=ot(),{normalizeEncoding:k}=at(),{isAsyncFunction:T,isArrayBufferView:U}=at().types,J={};function X(W){return W===(W|0)}function le(W){return W===W>>>0}var P=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function Z(W,se,we){if(typeof W>"u"&&(W=we),typeof W=="string"){if(p(P,W)===null)throw new _(se,W,G);W=u(W,8)}return pe(W,se),W}var V=w((W,se,we=s,te=t)=>{if(typeof W!="number")throw new b(se,"number",W);if(!e(W))throw new N(se,"an integer",W);if(W<we||W>te)throw new N(se,`>= ${we} && <= ${te}`,W)}),be=w((W,se,we=-2147483648,te=2147483647)=>{if(typeof W!="number")throw new b(se,"number",W);if(!e(W))throw new N(se,"an integer",W);if(W<we||W>te)throw new N(se,`>= ${we} && <= ${te}`,W)}),pe=w((W,se,we=!1)=>{if(typeof W!="number")throw new b(se,"number",W);if(!e(W))throw new N(se,"an integer",W);let te=we?1:0,Pe=4294967295;if(W<te||W>Pe)throw new N(se,`>= ${te} && <= ${Pe}`,W)});function me(W,se){if(typeof W!="string")throw new b(se,"string",W)}function ve(W,se,we=void 0,te){if(typeof W!="number")throw new b(se,"number",W);if(we!=null&&W<we||te!=null&&W>te||(we!=null||te!=null)&&n(W))throw new N(se,`${we!=null?`>= ${we}`:""}${we!=null&&te!=null?" && ":""}${te!=null?`<= ${te}`:""}`,W)}var z=w((W,se,we)=>{if(!a(we,W)){let te="must be one of: "+l(r(we,Pe=>typeof Pe=="string"?`'${Pe}'`:m(Pe)),", ");throw new _(se,W,te)}});function de(W,se){if(typeof W!="boolean")throw new b(se,"boolean",W)}function x(W,se,we){return W==null||!d(W,se)?we:W[se]}var ne=w((W,se,we=null)=>{let te=x(we,"allowArray",!1),Pe=x(we,"allowFunction",!1);if(!x(we,"nullable",!1)&&W===null||!te&&i(W)||typeof W!="object"&&(!Pe||typeof W!="function"))throw new b(se,"Object",W)}),ge=w((W,se)=>{if(W!=null&&typeof W!="object"&&typeof W!="function")throw new b(se,"a dictionary",W)}),F=w((W,se,we=0)=>{if(!i(W))throw new b(se,"Array",W);if(W.length<we){let te=`must be longer than ${we}`;throw new _(se,W,te)}});function Ce(W,se){F(W,se);for(let we=0;we<W.length;we++)me(W[we],`${se}[${we}]`)}function q(W,se){F(W,se);for(let we=0;we<W.length;we++)de(W[we],`${se}[${we}]`)}function D(W,se){F(W,se);for(let we=0;we<W.length;we++){let te=W[we],Pe=`${se}[${we}]`;if(te==null)throw new b(Pe,"AbortSignal",te);ae(te,Pe)}}function ee(W,se="signal"){if(me(W,se),J[W]===void 0)throw J[A(W)]!==void 0?new M(W+" (signals must use all capital letters)"):new M(W)}var Q=w((W,se="buffer")=>{if(!U(W))throw new b(se,["Buffer","TypedArray","DataView"],W)});function K(W,se){let we=k(se),te=W.length;if(we==="hex"&&te%2!==0)throw new _("encoding",se,`is invalid for data of length ${te}`)}function H(W,se="Port",we=!0){if(typeof W!="number"&&typeof W!="string"||typeof W=="string"&&y(W).length===0||+W!==+W>>>0||W>65535||W===0&&!we)throw new C(se,W,we);return W|0}var ae=w((W,se)=>{if(W!==void 0&&(W===null||typeof W!="object"||!("aborted"in W)))throw new b(se,"AbortSignal",W)}),ie=w((W,se)=>{if(typeof W!="function")throw new b(se,"Function",W)}),R=w((W,se)=>{if(typeof W!="function"||T(W))throw new b(se,"Function",W)}),j=w((W,se)=>{if(W!==void 0)throw new b(se,"undefined",W)});function Y(W,se,we){if(!a(we,W))throw new b(se,`('${l(we,"|")}')`,W)}var oe=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function re(W,se){if(typeof W>"u"||!p(oe,W))throw new _(se,W,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ue(W){if(typeof W=="string")return re(W,"hints"),W;if(i(W)){let se=W.length,we="";if(se===0)return we;for(let te=0;te<se;te++){let Pe=W[te];re(Pe,"hints"),we+=Pe,te!==se-1&&(we+=", ")}return we}throw new _("hints",W,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}h.exports={isInt32:X,isUint32:le,parseFileMode:Z,validateArray:F,validateStringArray:Ce,validateBooleanArray:q,validateAbortSignalArray:D,validateBoolean:de,validateBuffer:Q,validateDictionary:ge,validateEncoding:K,validateFunction:ie,validateInt32:be,validateInteger:V,validateNumber:ve,validateObject:ne,validateOneOf:z,validatePlainFunction:R,validatePort:H,validateSignalName:ee,validateString:me,validateUint32:pe,validateUndefined:j,validateUnion:Y,validateAbortSignal:ae,validateLinkHeaderValue:ue}}),Kt=Ae((o,h)=>{ce(),fe(),he();var i=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(C){if(a===setTimeout)return setTimeout(C,0);if((a===r||!a)&&setTimeout)return a=setTimeout,setTimeout(C,0);try{return a(C,0)}catch{try{return a.call(null,C,0)}catch{return a.call(this,C,0)}}}function t(C){if(l===clearTimeout)return clearTimeout(C);if((l===e||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(C);try{return l(C)}catch{try{return l.call(null,C)}catch{return l.call(this,C)}}}var s=[],u=!1,d,p=-1;function m(){!u||!d||(u=!1,d.length?s=d.concat(s):p=-1,s.length&&A())}function A(){if(!u){var C=n(m);u=!0;for(var b=s.length;b;){for(d=s,s=[];++p<b;)d&&d[p].run();p=-1,b=s.length}d=null,u=!1,t(C)}}i.nextTick=function(C){var b=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)b[_-1]=arguments[_];s.push(new y(C,b)),s.length===1&&!u&&n(A)};function y(C,b){this.fun=C,this.array=b}y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function w(){}i.on=w,i.addListener=w,i.once=w,i.off=w,i.removeListener=w,i.removeAllListeners=w,i.emit=w,i.prependListener=w,i.prependOnceListener=w,i.listeners=function(C){return[]},i.binding=function(C){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(C){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}),Et=Ae((o,h)=>{ce(),fe(),he();var{SymbolAsyncIterator:i,SymbolIterator:a,SymbolFor:l}=qe(),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(x,ne=!1){var ge;return!!(x&&typeof x.pipe=="function"&&typeof x.on=="function"&&(!ne||typeof x.pause=="function"&&typeof x.resume=="function")&&(!x._writableState||((ge=x._readableState)===null||ge===void 0?void 0:ge.readable)!==!1)&&(!x._writableState||x._readableState))}function m(x){var ne;return!!(x&&typeof x.write=="function"&&typeof x.on=="function"&&(!x._readableState||((ne=x._writableState)===null||ne===void 0?void 0:ne.writable)!==!1))}function A(x){return!!(x&&typeof x.pipe=="function"&&x._readableState&&typeof x.on=="function"&&typeof x.write=="function")}function y(x){return x&&(x._readableState||x._writableState||typeof x.write=="function"&&typeof x.on=="function"||typeof x.pipe=="function"&&typeof x.on=="function")}function w(x){return!!(x&&!y(x)&&typeof x.pipeThrough=="function"&&typeof x.getReader=="function"&&typeof x.cancel=="function")}function C(x){return!!(x&&!y(x)&&typeof x.getWriter=="function"&&typeof x.abort=="function")}function b(x){return!!(x&&!y(x)&&typeof x.readable=="object"&&typeof x.writable=="object")}function _(x){return w(x)||C(x)||b(x)}function N(x,ne){return x==null?!1:ne===!0?typeof x[i]=="function":ne===!1?typeof x[a]=="function":typeof x[i]=="function"||typeof x[a]=="function"}function M(x){if(!y(x))return null;let ne=x._writableState,ge=x._readableState,F=ne||ge;return!!(x.destroyed||x[r]||F!=null&&F.destroyed)}function k(x){if(!m(x))return null;if(x.writableEnded===!0)return!0;let ne=x._writableState;return ne!=null&&ne.errored?!1:typeof(ne==null?void 0:ne.ended)!="boolean"?null:ne.ended}function T(x,ne){if(!m(x))return null;if(x.writableFinished===!0)return!0;let ge=x._writableState;return ge!=null&&ge.errored?!1:typeof(ge==null?void 0:ge.finished)!="boolean"?null:!!(ge.finished||ne===!1&&ge.ended===!0&&ge.length===0)}function U(x){if(!p(x))return null;if(x.readableEnded===!0)return!0;let ne=x._readableState;return!ne||ne.errored?!1:typeof(ne==null?void 0:ne.ended)!="boolean"?null:ne.ended}function J(x,ne){if(!p(x))return null;let ge=x._readableState;return ge!=null&&ge.errored?!1:typeof(ge==null?void 0:ge.endEmitted)!="boolean"?null:!!(ge.endEmitted||ne===!1&&ge.ended===!0&&ge.length===0)}function X(x){return x&&x[n]!=null?x[n]:typeof(x==null?void 0:x.readable)!="boolean"?null:M(x)?!1:p(x)&&x.readable&&!J(x)}function le(x){return x&&x[t]!=null?x[t]:typeof(x==null?void 0:x.writable)!="boolean"?null:M(x)?!1:m(x)&&x.writable&&!k(x)}function P(x,ne){return y(x)?M(x)?!0:!((ne==null?void 0:ne.readable)!==!1&&X(x)||(ne==null?void 0:ne.writable)!==!1&&le(x)):null}function G(x){var ne,ge;return y(x)?x.writableErrored?x.writableErrored:(ne=(ge=x._writableState)===null||ge===void 0?void 0:ge.errored)!==null&&ne!==void 0?ne:null:null}function Z(x){var ne,ge;return y(x)?x.readableErrored?x.readableErrored:(ne=(ge=x._readableState)===null||ge===void 0?void 0:ge.errored)!==null&&ne!==void 0?ne:null:null}function V(x){if(!y(x))return null;if(typeof x.closed=="boolean")return x.closed;let ne=x._writableState,ge=x._readableState;return typeof(ne==null?void 0:ne.closed)=="boolean"||typeof(ge==null?void 0:ge.closed)=="boolean"?(ne==null?void 0:ne.closed)||(ge==null?void 0:ge.closed):typeof x._closed=="boolean"&&be(x)?x._closed:null}function be(x){return typeof x._closed=="boolean"&&typeof x._defaultKeepAlive=="boolean"&&typeof x._removedConnection=="boolean"&&typeof x._removedContLen=="boolean"}function pe(x){return typeof x._sent100=="boolean"&&be(x)}function me(x){var ne;return typeof x._consuming=="boolean"&&typeof x._dumped=="boolean"&&((ne=x.req)===null||ne===void 0?void 0:ne.upgradeOrConnect)===void 0}function ve(x){if(!y(x))return null;let ne=x._writableState,ge=x._readableState,F=ne||ge;return!F&&pe(x)||!!(F&&F.autoDestroy&&F.emitClose&&F.closed===!1)}function z(x){var ne;return!!(x&&((ne=x[s])!==null&&ne!==void 0?ne:x.readableDidRead||x.readableAborted))}function de(x){var ne,ge,F,Ce,q,D,ee,Q,K,H;return!!(x&&((ne=(ge=(F=(Ce=(q=(D=x[e])!==null&&D!==void 0?D:x.readableErrored)!==null&&q!==void 0?q:x.writableErrored)!==null&&Ce!==void 0?Ce:(ee=x._readableState)===null||ee===void 0?void 0:ee.errorEmitted)!==null&&F!==void 0?F:(Q=x._writableState)===null||Q===void 0?void 0:Q.errorEmitted)!==null&&ge!==void 0?ge:(K=x._readableState)===null||K===void 0?void 0:K.errored)!==null&&ne!==void 0?ne:!((H=x._writableState)===null||H===void 0)&&H.errored))}h.exports={isDestroyed:M,kIsDestroyed:r,isDisturbed:z,kIsDisturbed:s,isErrored:de,kIsErrored:e,isReadable:X,kIsReadable:n,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:t,isClosed:V,isDuplexNodeStream:A,isFinished:P,isIterable:N,isReadableNodeStream:p,isReadableStream:w,isReadableEnded:U,isReadableFinished:J,isReadableErrored:Z,isNodeStream:y,isWebStream:_,isWritable:le,isWritableNodeStream:m,isWritableStream:C,isWritableEnded:k,isWritableFinished:T,isWritableErrored:G,isServerRequest:me,isServerResponse:pe,willEmitClose:ve,isTransformStream:b}}),Mt=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{AbortError:a,codes:l}=ot(),{ERR_INVALID_ARG_TYPE:r,ERR_STREAM_PREMATURE_CLOSE:e}=l,{kEmptyObject:n,once:t}=at(),{validateAbortSignal:s,validateFunction:u,validateObject:d,validateBoolean:p}=hr(),{Promise:m,PromisePrototypeThen:A,SymbolDispose:y}=qe(),{isClosed:w,isReadable:C,isReadableNodeStream:b,isReadableStream:_,isReadableFinished:N,isReadableErrored:M,isWritable:k,isWritableNodeStream:T,isWritableStream:U,isWritableFinished:J,isWritableErrored:X,isNodeStream:le,willEmitClose:P,kIsClosedPromise:G}=Et(),Z;function V(z){return z.setHeader&&typeof z.abort=="function"}var be=()=>{};function pe(z,de,x){var ne,ge;if(arguments.length===2?(x=de,de=n):de==null?de=n:d(de,"options"),u(x,"callback"),s(de.signal,"options.signal"),x=t(x),_(z)||U(z))return me(z,de,x);if(!le(z))throw new r("stream",["ReadableStream","WritableStream","Stream"],z);let F=(ne=de.readable)!==null&&ne!==void 0?ne:b(z),Ce=(ge=de.writable)!==null&&ge!==void 0?ge:T(z),q=z._writableState,D=z._readableState,ee=()=>{z.writable||H()},Q=P(z)&&b(z)===F&&T(z)===Ce,K=J(z,!1),H=()=>{K=!0,z.destroyed&&(Q=!1),!(Q&&(!z.readable||F))&&(!F||ae)&&x.call(z)},ae=N(z,!1),ie=()=>{ae=!0,z.destroyed&&(Q=!1),!(Q&&(!z.writable||Ce))&&(!Ce||K)&&x.call(z)},R=W=>{x.call(z,W)},j=w(z),Y=()=>{j=!0;let W=X(z)||M(z);if(W&&typeof W!="boolean")return x.call(z,W);if(F&&!ae&&b(z,!0)&&!N(z,!1))return x.call(z,new e);if(Ce&&!K&&!J(z,!1))return x.call(z,new e);x.call(z)},oe=()=>{j=!0;let W=X(z)||M(z);if(W&&typeof W!="boolean")return x.call(z,W);x.call(z)},re=()=>{z.req.on("finish",H)};V(z)?(z.on("complete",H),Q||z.on("abort",Y),z.req?re():z.on("request",re)):Ce&&!q&&(z.on("end",ee),z.on("close",ee)),!Q&&typeof z.aborted=="boolean"&&z.on("aborted",Y),z.on("end",ie),z.on("finish",H),de.error!==!1&&z.on("error",R),z.on("close",Y),j?i.nextTick(Y):q!=null&&q.errorEmitted||D!=null&&D.errorEmitted?Q||i.nextTick(oe):(!F&&(!Q||C(z))&&(K||k(z)===!1)||!Ce&&(!Q||k(z))&&(ae||C(z)===!1)||D&&z.req&&z.aborted)&&i.nextTick(oe);let ue=()=>{x=be,z.removeListener("aborted",Y),z.removeListener("complete",H),z.removeListener("abort",Y),z.removeListener("request",re),z.req&&z.req.removeListener("finish",H),z.removeListener("end",ee),z.removeListener("close",ee),z.removeListener("finish",H),z.removeListener("end",ie),z.removeListener("error",R),z.removeListener("close",Y)};if(de.signal&&!j){let W=()=>{let se=x;ue(),se.call(z,new a(void 0,{cause:de.signal.reason}))};if(de.signal.aborted)i.nextTick(W);else{Z=Z||at().addAbortListener;let se=Z(de.signal,W),we=x;x=t((...te)=>{se[y](),we.apply(z,te)})}}return ue}function me(z,de,x){let ne=!1,ge=be;if(de.signal)if(ge=()=>{ne=!0,x.call(z,new a(void 0,{cause:de.signal.reason}))},de.signal.aborted)i.nextTick(ge);else{Z=Z||at().addAbortListener;let Ce=Z(de.signal,ge),q=x;x=t((...D)=>{Ce[y](),q.apply(z,D)})}let F=(...Ce)=>{ne||i.nextTick(()=>x.apply(z,Ce))};return A(z[G].promise,F,F),be}function ve(z,de){var x;let ne=!1;return de===null&&(de=n),(x=de)!==null&&x!==void 0&&x.cleanup&&(p(de.cleanup,"cleanup"),ne=de.cleanup),new m((ge,F)=>{let Ce=pe(z,de,q=>{ne&&Ce(),q?F(q):ge()})})}h.exports=pe,h.exports.finished=ve}),nr=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:l},AbortError:r}=ot(),{Symbol:e}=qe(),{kIsDestroyed:n,isDestroyed:t,isFinished:s,isServerRequest:u}=Et(),d=e("kDestroy"),p=e("kConstruct");function m(P,G,Z){P&&(P.stack,G&&!G.errored&&(G.errored=P),Z&&!Z.errored&&(Z.errored=P))}function A(P,G){let Z=this._readableState,V=this._writableState,be=V||Z;return V!=null&&V.destroyed||Z!=null&&Z.destroyed?(typeof G=="function"&&G(),this):(m(P,V,Z),V&&(V.destroyed=!0),Z&&(Z.destroyed=!0),be.constructed?y(this,P,G):this.once(d,function(pe){y(this,a(pe,P),G)}),this)}function y(P,G,Z){let V=!1;function be(pe){if(V)return;V=!0;let me=P._readableState,ve=P._writableState;m(pe,ve,me),ve&&(ve.closed=!0),me&&(me.closed=!0),typeof Z=="function"&&Z(pe),pe?i.nextTick(w,P,pe):i.nextTick(C,P)}try{P._destroy(G||null,be)}catch(pe){be(pe)}}function w(P,G){b(P,G),C(P)}function C(P){let G=P._readableState,Z=P._writableState;Z&&(Z.closeEmitted=!0),G&&(G.closeEmitted=!0),(Z!=null&&Z.emitClose||G!=null&&G.emitClose)&&P.emit("close")}function b(P,G){let Z=P._readableState,V=P._writableState;V!=null&&V.errorEmitted||Z!=null&&Z.errorEmitted||(V&&(V.errorEmitted=!0),Z&&(Z.errorEmitted=!0),P.emit("error",G))}function _(){let P=this._readableState,G=this._writableState;P&&(P.constructed=!0,P.closed=!1,P.closeEmitted=!1,P.destroyed=!1,P.errored=null,P.errorEmitted=!1,P.reading=!1,P.ended=P.readable===!1,P.endEmitted=P.readable===!1),G&&(G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1)}function N(P,G,Z){let V=P._readableState,be=P._writableState;if(be!=null&&be.destroyed||V!=null&&V.destroyed)return this;V!=null&&V.autoDestroy||be!=null&&be.autoDestroy?P.destroy(G):G&&(G.stack,be&&!be.errored&&(be.errored=G),V&&!V.errored&&(V.errored=G),Z?i.nextTick(b,P,G):b(P,G))}function M(P,G){if(typeof P._construct!="function")return;let Z=P._readableState,V=P._writableState;Z&&(Z.constructed=!1),V&&(V.constructed=!1),P.once(p,G),!(P.listenerCount(p)>1)&&i.nextTick(k,P)}function k(P){let G=!1;function Z(V){if(G){N(P,V??new l);return}G=!0;let be=P._readableState,pe=P._writableState,me=pe||be;be&&(be.constructed=!0),pe&&(pe.constructed=!0),me.destroyed?P.emit(d,V):V?N(P,V,!0):i.nextTick(T,P)}try{P._construct(V=>{i.nextTick(Z,V)})}catch(V){i.nextTick(Z,V)}}function T(P){P.emit(p)}function U(P){return(P==null?void 0:P.setHeader)&&typeof P.abort=="function"}function J(P){P.emit("close")}function X(P,G){P.emit("error",G),i.nextTick(J,P)}function le(P,G){!P||t(P)||(!G&&!s(P)&&(G=new r),u(P)?(P.socket=null,P.destroy(G)):U(P)?P.abort():U(P.req)?P.req.abort():typeof P.destroy=="function"?P.destroy(G):typeof P.close=="function"?P.close():G?i.nextTick(X,P,G):i.nextTick(J,P),P.destroyed||(P[n]=!0))}h.exports={construct:M,destroyer:le,destroy:A,undestroy:_,errorOrDestroy:N}}),ci=Ae((o,h)=>{ce(),fe(),he();var{ArrayIsArray:i,ObjectSetPrototypeOf:a}=qe(),{EventEmitter:l}=(Qt(),Le(Rt));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(C){n.writable&&n.write(C)===!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",m),s.on("close",A));let p=!1;function m(){p||(p=!0,n.end())}function A(){p||(p=!0,typeof n.destroy=="function"&&n.destroy())}function y(C){w(),l.listenerCount(this,"error")===0&&this.emit("error",C)}e(s,"error",y),e(n,"error",y);function w(){s.removeListener("data",u),n.removeListener("drain",d),s.removeListener("end",m),s.removeListener("close",A),s.removeListener("error",y),n.removeListener("error",y),s.removeListener("end",w),s.removeListener("close",w),n.removeListener("close",w)}return s.on("end",w),s.on("close",w),n.on("close",w),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):i(n._events[t])?n._events[t].unshift(s):n._events[t]=[s,n._events[t]]}h.exports={Stream:r,prependListener:e}}),Er=Ae((o,h)=>{ce(),fe(),he();var{SymbolDispose:i}=qe(),{AbortError:a,codes:l}=ot(),{isNodeStream:r,isWebStream:e,kControllerErrorFunction:n}=Et(),t=Mt(),{ERR_INVALID_ARG_TYPE:s}=l,u,d=(p,m)=>{if(typeof p!="object"||!("aborted"in p))throw new s(m,"AbortSignal",p)};h.exports.addAbortSignal=function(p,m){if(d(p,"signal"),!r(m)&&!e(m))throw new s("stream",["ReadableStream","WritableStream","Stream"],m);return h.exports.addAbortSignalNoValidate(p,m)},h.exports.addAbortSignalNoValidate=function(p,m){if(typeof p!="object"||!("aborted"in p))return m;let A=r(m)?()=>{m.destroy(new a(void 0,{cause:p.reason}))}:()=>{m[n](new a(void 0,{cause:p.reason}))};if(p.aborted)A();else{u=u||at().addAbortListener;let y=u(p,A);t(m,y[i])}return m}}),Hl=Ae((o,h)=>{ce(),fe(),he();var{StringPrototypeSlice:i,SymbolIterator:a,TypedArrayPrototypeSet:l,Uint8Array:r}=qe(),{Buffer:e}=(Xe(),Le(Ze)),{inspect:n}=at();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+=i(p,0,t),this.head=u,u.data=i(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 m=d.data;if(t>m.length)l(s,m,u-t),t-=m.length;else{t===m.length?(l(s,m,u-t),++p,d.next?this.head=d.next:this.head=this.tail=null):(l(s,new r(m.buffer,m.byteOffset,t),u-t),this.head=d,d.data=m.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})}}}),Sr=Ae((o,h)=>{ce(),fe(),he();var{MathFloor:i,NumberIsInteger:a}=qe(),{validateInteger:l}=hr(),{ERR_INVALID_ARG_VALUE:r}=ot().codes,e=16*1024,n=16;function t(p,m,A){return p.highWaterMark!=null?p.highWaterMark:m?p[A]:null}function s(p){return p?n:e}function u(p,m){l(m,"value",0),p?n=m:e=m}function d(p,m,A,y){let w=t(m,y,A);if(w!=null){if(!a(w)||w<0){let C=y?`options.${A}`:"options.highWaterMark";throw new r(C,w)}return i(w)}return s(p.objectMode)}h.exports={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u}}),ql=Ae((o,h)=>{ce(),fe(),he();var i=(Xe(),Le(Ze)),a=i.Buffer;function l(e,n){for(var t in e)n[t]=e[t]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?h.exports=i:(l(i,o),o.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 i.SlowBuffer(e)}}),$l=Ae(o=>{ce(),fe(),he();var h=ql().Buffer,i=h.isEncoding||function(b){switch(b=""+b,b&&b.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(b){if(!b)return"utf8";for(var _;;)switch(b){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 b;default:if(_)return;b=(""+b).toLowerCase(),_=!0}}function l(b){var _=a(b);if(typeof _!="string"&&(h.isEncoding===i||!i(b)))throw new Error("Unknown encoding: "+b);return _||b}o.StringDecoder=r;function r(b){this.encoding=l(b);var _;switch(this.encoding){case"utf16le":this.text=p,this.end=m,_=4;break;case"utf8":this.fillLast=s,_=4;break;case"base64":this.text=A,this.end=y,_=3;break;default:this.write=w,this.end=C;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(_)}r.prototype.write=function(b){if(b.length===0)return"";var _,N;if(this.lastNeed){if(_=this.fillLast(b),_===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<b.length?_?_+this.text(b,N):this.text(b,N):_||""},r.prototype.end=d,r.prototype.text=u,r.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function e(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function n(b,_,N){var M=_.length-1;if(M<N)return 0;var k=e(_[M]);return k>=0?(k>0&&(b.lastNeed=k-1),k):--M<N||k===-2?0:(k=e(_[M]),k>=0?(k>0&&(b.lastNeed=k-2),k):--M<N||k===-2?0:(k=e(_[M]),k>=0?(k>0&&(k===2?k=0:b.lastNeed=k-3),k):0))}function t(b,_,N){if((_[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&_.length>1){if((_[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&_.length>2&&(_[2]&192)!==128)return b.lastNeed=2,"�"}}function s(b){var _=this.lastTotal-this.lastNeed,N=t(this,b);if(N!==void 0)return N;if(this.lastNeed<=b.length)return b.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,_,0,b.length),this.lastNeed-=b.length}function u(b,_){var N=n(this,b,_);if(!this.lastNeed)return b.toString("utf8",_);this.lastTotal=N;var M=b.length-(N-this.lastNeed);return b.copy(this.lastChar,0,M),b.toString("utf8",_,M)}function d(b){var _=b&&b.length?this.write(b):"";return this.lastNeed?_+"�":_}function p(b,_){if((b.length-_)%2===0){var N=b.toString("utf16le",_);if(N){var M=N.charCodeAt(N.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",_,b.length-1)}function m(b){var _=b&&b.length?this.write(b):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,N)}return _}function A(b,_){var N=(b.length-_)%3;return N===0?b.toString("base64",_):(this.lastNeed=3-N,this.lastTotal=3,N===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",_,b.length-N))}function y(b){var _=b&&b.length?this.write(b):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function w(b){return b.toString(this.encoding)}function C(b){return b&&b.length?this.write(b):""}}),Ko=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{PromisePrototypeThen:a,SymbolAsyncIterator:l,SymbolIterator:r}=qe(),{Buffer:e}=(Xe(),Le(Ze)),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:t}=ot().codes;function s(u,d,p){let m;if(typeof d=="string"||d instanceof e)return new u({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let A;if(d&&d[l])A=!0,m=d[l]();else if(d&&d[r])A=!1,m=d[r]();else throw new n("iterable",["Iterable"],d);let y=new u({objectMode:!0,highWaterMark:1,...p}),w=!1;y._read=function(){w||(w=!0,b())},y._destroy=function(_,N){a(C(_),()=>i.nextTick(N,_),M=>i.nextTick(N,M||_))};async function C(_){let N=_!=null,M=typeof m.throw=="function";if(N&&M){let{value:k,done:T}=await m.throw(_);if(await k,T)return}if(typeof m.return=="function"){let{value:k}=await m.return();await k}}async function b(){for(;;){try{let{value:_,done:N}=A?await m.next():m.next();if(N)y.push(null);else{let M=_&&typeof _.then=="function"?await _:_;if(M===null)throw w=!1,new t;if(y.push(M))continue;w=!1}}catch(_){y.destroy(_)}break}}return y}h.exports=s}),Cr=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{ArrayPrototypeIndexOf:a,NumberIsInteger:l,NumberIsNaN:r,NumberParseInt:e,ObjectDefineProperties:n,ObjectKeys:t,ObjectSetPrototypeOf:s,Promise:u,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:m,Symbol:A}=qe();h.exports=te,te.ReadableState=we;var{EventEmitter:y}=(Qt(),Le(Rt)),{Stream:w,prependListener:C}=ci(),{Buffer:b}=(Xe(),Le(Ze)),{addAbortSignal:_}=Er(),N=Mt(),M=at().debuglog("stream",S=>{M=S}),k=Hl(),T=nr(),{getHighWaterMark:U,getDefaultHighWaterMark:J}=Sr(),{aggregateTwoErrors:X,codes:{ERR_INVALID_ARG_TYPE:le,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:G,ERR_STREAM_PUSH_AFTER_EOF:Z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:V},AbortError:be}=ot(),{validateObject:pe}=hr(),me=A("kPaused"),{StringDecoder:ve}=$l(),z=Ko();s(te.prototype,w.prototype),s(te,w);var de=()=>{},{errorOrDestroy:x}=T,ne=1,ge=2,F=4,Ce=8,q=16,D=32,ee=64,Q=128,K=256,H=512,ae=1024,ie=2048,R=4096,j=8192,Y=16384,oe=32768,re=65536,ue=1<<17,W=1<<18;function se(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(O){O?this.state|=S:this.state&=~S}}}n(we.prototype,{objectMode:se(ne),ended:se(ge),endEmitted:se(F),reading:se(Ce),constructed:se(q),sync:se(D),needReadable:se(ee),emittedReadable:se(Q),readableListening:se(K),resumeScheduled:se(H),errorEmitted:se(ae),emitClose:se(ie),autoDestroy:se(R),destroyed:se(j),closed:se(Y),closeEmitted:se(oe),multiAwaitDrain:se(re),readingMore:se(ue),dataEmitted:se(W)});function we(S,O,ye){typeof ye!="boolean"&&(ye=O instanceof St()),this.state=ie|R|q|D,S&&S.objectMode&&(this.state|=ne),ye&&S&&S.readableObjectMode&&(this.state|=ne),this.highWaterMark=S?U(this,S,"readableHighWaterMark",ye):J(!1),this.buffer=new k,this.length=0,this.pipes=[],this.flowing=null,this[me]=null,S&&S.emitClose===!1&&(this.state&=~ie),S&&S.autoDestroy===!1&&(this.state&=~R),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new ve(S.encoding),this.encoding=S.encoding)}function te(S){if(!(this instanceof te))return new te(S);let O=this instanceof St();this._readableState=new we(S,this,O),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&&!O&&_(S.signal,this)),w.call(this,S),T.construct(this,()=>{this._readableState.needReadable&&_e(this,this._readableState)})}te.prototype.destroy=T.destroy,te.prototype._undestroy=T.undestroy,te.prototype._destroy=function(S,O){O(S)},te.prototype[y.captureRejectionSymbol]=function(S){this.destroy(S)},te.prototype[p]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new be,this.destroy(S)),new u((O,ye)=>N(this,Se=>Se&&Se!==S?ye(Se):O(null)))},te.prototype.push=function(S,O){return Pe(this,S,O,!1)},te.prototype.unshift=function(S,O){return Pe(this,S,O,!0)};function Pe(S,O,ye,Se){M("readableAddChunk",O);let Ie=S._readableState,nt;if((Ie.state&ne)===0&&(typeof O=="string"?(ye=ye||Ie.defaultEncoding,Ie.encoding!==ye&&(Se&&Ie.encoding?O=b.from(O,ye).toString(Ie.encoding):(O=b.from(O,ye),ye=""))):O instanceof b?ye="":w._isUint8Array(O)?(O=w._uint8ArrayToBuffer(O),ye=""):O!=null&&(nt=new le("chunk",["string","Buffer","Uint8Array"],O))),nt)x(S,nt);else if(O===null)Ie.state&=~Ce,I(S,Ie);else if((Ie.state&ne)!==0||O&&O.length>0)if(Se)if((Ie.state&F)!==0)x(S,new V);else{if(Ie.destroyed||Ie.errored)return!1;c(S,Ie,O,!0)}else if(Ie.ended)x(S,new Z);else{if(Ie.destroyed||Ie.errored)return!1;Ie.state&=~Ce,Ie.decoder&&!ye?(O=Ie.decoder.write(O),Ie.objectMode||O.length!==0?c(S,Ie,O,!1):_e(S,Ie)):c(S,Ie,O,!1)}else Se||(Ie.state&=~Ce,_e(S,Ie));return!Ie.ended&&(Ie.length<Ie.highWaterMark||Ie.length===0)}function c(S,O,ye,Se){O.flowing&&O.length===0&&!O.sync&&S.listenerCount("data")>0?((O.state&re)!==0?O.awaitDrainWriters.clear():O.awaitDrainWriters=null,O.dataEmitted=!0,S.emit("data",ye)):(O.length+=O.objectMode?1:ye.length,Se?O.buffer.unshift(ye):O.buffer.push(ye),(O.state&ee)!==0&&L(S)),_e(S,O)}te.prototype.isPaused=function(){let S=this._readableState;return S[me]===!0||S.flowing===!1},te.prototype.setEncoding=function(S){let O=new ve(S);this._readableState.decoder=O,this._readableState.encoding=this._readableState.decoder.encoding;let ye=this._readableState.buffer,Se="";for(let Ie of ye)Se+=O.write(Ie);return ye.clear(),Se!==""&&ye.push(Se),this._readableState.length=Se.length,this};var f=1073741824;function g(S){if(S>f)throw new G("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function v(S,O){return S<=0||O.length===0&&O.ended?0:(O.state&ne)!==0?1:r(S)?O.flowing&&O.length?O.buffer.first().length:O.length:S<=O.length?S:O.ended?O.length:0}te.prototype.read=function(S){M("read",S),S===void 0?S=NaN:l(S)||(S=e(S,10));let O=this._readableState,ye=S;if(S>O.highWaterMark&&(O.highWaterMark=g(S)),S!==0&&(O.state&=~Q),S===0&&O.needReadable&&((O.highWaterMark!==0?O.length>=O.highWaterMark:O.length>0)||O.ended))return M("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?je(this):L(this),null;if(S=v(S,O),S===0&&O.ended)return O.length===0&&je(this),null;let Se=(O.state&ee)!==0;if(M("need readable",Se),(O.length===0||O.length-S<O.highWaterMark)&&(Se=!0,M("length less than watermark",Se)),O.ended||O.reading||O.destroyed||O.errored||!O.constructed)Se=!1,M("reading, ended or constructing",Se);else if(Se){M("do read"),O.state|=Ce|D,O.length===0&&(O.state|=ee);try{this._read(O.highWaterMark)}catch(nt){x(this,nt)}O.state&=~D,O.reading||(S=v(ye,O))}let Ie;return S>0?Ie=Re(S,O):Ie=null,Ie===null?(O.needReadable=O.length<=O.highWaterMark,S=0):(O.length-=S,O.multiAwaitDrain?O.awaitDrainWriters.clear():O.awaitDrainWriters=null),O.length===0&&(O.ended||(O.needReadable=!0),ye!==S&&O.ended&&je(this)),Ie!==null&&!O.errorEmitted&&!O.closeEmitted&&(O.dataEmitted=!0,this.emit("data",Ie)),Ie};function I(S,O){if(M("onEofChunk"),!O.ended){if(O.decoder){let ye=O.decoder.end();ye&&ye.length&&(O.buffer.push(ye),O.length+=O.objectMode?1:ye.length)}O.ended=!0,O.sync?L(S):(O.needReadable=!1,O.emittedReadable=!0,$(S))}}function L(S){let O=S._readableState;M("emitReadable",O.needReadable,O.emittedReadable),O.needReadable=!1,O.emittedReadable||(M("emitReadable",O.flowing),O.emittedReadable=!0,i.nextTick($,S))}function $(S){let O=S._readableState;M("emitReadable_",O.destroyed,O.length,O.ended),!O.destroyed&&!O.errored&&(O.length||O.ended)&&(S.emit("readable"),O.emittedReadable=!1),O.needReadable=!O.flowing&&!O.ended&&O.length<=O.highWaterMark,ct(S)}function _e(S,O){!O.readingMore&&O.constructed&&(O.readingMore=!0,i.nextTick(Ee,S,O))}function Ee(S,O){for(;!O.reading&&!O.ended&&(O.length<O.highWaterMark||O.flowing&&O.length===0);){let ye=O.length;if(M("maybeReadMore read 0"),S.read(0),ye===O.length)break}O.readingMore=!1}te.prototype._read=function(S){throw new P("_read()")},te.prototype.pipe=function(S,O){let ye=this,Se=this._readableState;Se.pipes.length===1&&(Se.multiAwaitDrain||(Se.multiAwaitDrain=!0,Se.awaitDrainWriters=new d(Se.awaitDrainWriters?[Se.awaitDrainWriters]:[]))),Se.pipes.push(S),M("pipe count=%d opts=%j",Se.pipes.length,O);let Ie=(!O||O.end!==!1)&&S!==i.stdout&&S!==i.stderr?ft:pr;Se.endEmitted?i.nextTick(Ie):ye.once("end",Ie),S.on("unpipe",nt);function nt(Xt,Pt){M("onunpipe"),Xt===ye&&Pt&&Pt.hasUnpiped===!1&&(Pt.hasUnpiped=!0,ac())}function ft(){M("onend"),S.end()}let Zt,pa=!1;function ac(){M("cleanup"),S.removeListener("close",xi),S.removeListener("finish",Ri),Zt&&S.removeListener("drain",Zt),S.removeListener("error",Pi),S.removeListener("unpipe",nt),ye.removeListener("end",ft),ye.removeListener("end",pr),ye.removeListener("data",ma),pa=!0,Zt&&Se.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&Zt()}function ga(){pa||(Se.pipes.length===1&&Se.pipes[0]===S?(M("false write response, pause",0),Se.awaitDrainWriters=S,Se.multiAwaitDrain=!1):Se.pipes.length>1&&Se.pipes.includes(S)&&(M("false write response, pause",Se.awaitDrainWriters.size),Se.awaitDrainWriters.add(S)),ye.pause()),Zt||(Zt=Be(ye,S),S.on("drain",Zt))}ye.on("data",ma);function ma(Xt){M("ondata");let Pt=S.write(Xt);M("dest.write",Pt),Pt===!1&&ga()}function Pi(Xt){if(M("onerror",Xt),pr(),S.removeListener("error",Pi),S.listenerCount("error")===0){let Pt=S._writableState||S._readableState;Pt&&!Pt.errorEmitted?x(S,Xt):S.emit("error",Xt)}}C(S,"error",Pi);function xi(){S.removeListener("finish",Ri),pr()}S.once("close",xi);function Ri(){M("onfinish"),S.removeListener("close",xi),pr()}S.once("finish",Ri);function pr(){M("unpipe"),ye.unpipe(S)}return S.emit("pipe",ye),S.writableNeedDrain===!0?ga():Se.flowing||(M("pipe resume"),ye.resume()),S};function Be(S,O){return function(){let ye=S._readableState;ye.awaitDrainWriters===O?(M("pipeOnDrain",1),ye.awaitDrainWriters=null):ye.multiAwaitDrain&&(M("pipeOnDrain",ye.awaitDrainWriters.size),ye.awaitDrainWriters.delete(O)),(!ye.awaitDrainWriters||ye.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}te.prototype.unpipe=function(S){let O=this._readableState,ye={hasUnpiped:!1};if(O.pipes.length===0)return this;if(!S){let Ie=O.pipes;O.pipes=[],this.pause();for(let nt=0;nt<Ie.length;nt++)Ie[nt].emit("unpipe",this,{hasUnpiped:!1});return this}let Se=a(O.pipes,S);return Se===-1?this:(O.pipes.splice(Se,1),O.pipes.length===0&&this.pause(),S.emit("unpipe",this,ye),this)},te.prototype.on=function(S,O){let ye=w.prototype.on.call(this,S,O),Se=this._readableState;return S==="data"?(Se.readableListening=this.listenerCount("readable")>0,Se.flowing!==!1&&this.resume()):S==="readable"&&!Se.endEmitted&&!Se.readableListening&&(Se.readableListening=Se.needReadable=!0,Se.flowing=!1,Se.emittedReadable=!1,M("on readable",Se.length,Se.reading),Se.length?L(this):Se.reading||i.nextTick(xe,this)),ye},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(S,O){let ye=w.prototype.removeListener.call(this,S,O);return S==="readable"&&i.nextTick(Me,this),ye},te.prototype.off=te.prototype.removeListener,te.prototype.removeAllListeners=function(S){let O=w.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&i.nextTick(Me,this),O};function Me(S){let O=S._readableState;O.readableListening=S.listenerCount("readable")>0,O.resumeScheduled&&O[me]===!1?O.flowing=!0:S.listenerCount("data")>0?S.resume():O.readableListening||(O.flowing=null)}function xe(S){M("readable nexttick read 0"),S.read(0)}te.prototype.resume=function(){let S=this._readableState;return S.flowing||(M("resume"),S.flowing=!S.readableListening,bt(this,S)),S[me]=!1,this};function bt(S,O){O.resumeScheduled||(O.resumeScheduled=!0,i.nextTick(lt,S,O))}function lt(S,O){M("resume",O.reading),O.reading||S.read(0),O.resumeScheduled=!1,S.emit("resume"),ct(S),O.flowing&&!O.reading&&S.read(0)}te.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[me]=!0,this};function ct(S){let O=S._readableState;for(M("flow",O.flowing);O.flowing&&S.read()!==null;);}te.prototype.wrap=function(S){let O=!1;S.on("data",Se=>{!this.push(Se)&&S.pause&&(O=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",Se=>{x(this,Se)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{O&&S.resume&&(O=!1,S.resume())};let ye=t(S);for(let Se=1;Se<ye.length;Se++){let Ie=ye[Se];this[Ie]===void 0&&typeof S[Ie]=="function"&&(this[Ie]=S[Ie].bind(S))}return this},te.prototype[m]=function(){return Ke(this)},te.prototype.iterator=function(S){return S!==void 0&&pe(S,"options"),Ke(this,S)};function Ke(S,O){typeof S.read!="function"&&(S=te.wrap(S,{objectMode:!0}));let ye=et(S,O);return ye.stream=S,ye}async function*et(S,O){let ye=de;function Se(ft){this===S?(ye(),ye=de):ye=ft}S.on("readable",Se);let Ie,nt=N(S,{writable:!1},ft=>{Ie=ft?X(Ie,ft):null,ye(),ye=de});try{for(;;){let ft=S.destroyed?null:S.read();if(ft!==null)yield ft;else{if(Ie)throw Ie;if(Ie===null)return;await new u(Se)}}}catch(ft){throw Ie=X(Ie,ft),Ie}finally{(Ie||(O==null?void 0:O.destroyOnReturn)!==!1)&&(Ie===void 0||S._readableState.autoDestroy)?T.destroyer(S,null):(S.off("readable",Se),nt())}}n(te.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(we.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[me]!==!1},set(S){this[me]=!!S}}}),te._fromList=Re;function Re(S,O){if(O.length===0)return null;let ye;return O.objectMode?ye=O.buffer.shift():!S||S>=O.length?(O.decoder?ye=O.buffer.join(""):O.buffer.length===1?ye=O.buffer.first():ye=O.buffer.concat(O.length),O.buffer.clear()):ye=O.buffer.consume(S,O.decoder),ye}function je(S){let O=S._readableState;M("endReadable",O.endEmitted),O.endEmitted||(O.ended=!0,i.nextTick(rt,O,S))}function rt(S,O){if(M("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,O.emit("end"),O.writable&&O.allowHalfOpen===!1)i.nextTick(Je,O);else if(S.autoDestroy){let ye=O._writableState;(!ye||ye.autoDestroy&&(ye.finished||ye.writable===!1))&&O.destroy()}}}function Je(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}te.from=function(S,O){return z(te,S,O)};var st;function Dt(){return st===void 0&&(st={}),st}te.fromWeb=function(S,O){return Dt().newStreamReadableFromReadableStream(S,O)},te.toWeb=function(S,O){return Dt().newReadableStreamFromStreamReadable(S,O)},te.wrap=function(S,O){var ye,Se;return new te({objectMode:(ye=(Se=S.readableObjectMode)!==null&&Se!==void 0?Se:S.objectMode)!==null&&ye!==void 0?ye:!0,...O,destroy(Ie,nt){T.destroyer(S,Ie),nt(Ie)}}).wrap(S)}}),hi=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{ArrayPrototypeSlice:a,Error:l,FunctionPrototypeSymbolHasInstance:r,ObjectDefineProperty:e,ObjectDefineProperties:n,ObjectSetPrototypeOf:t,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:d}=qe();h.exports=pe,pe.WritableState=V;var{EventEmitter:p}=(Qt(),Le(Rt)),m=ci().Stream,{Buffer:A}=(Xe(),Le(Ze)),y=nr(),{addAbortSignal:w}=Er(),{getHighWaterMark:C,getDefaultHighWaterMark:b}=Sr(),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_MULTIPLE_CALLBACK:M,ERR_STREAM_CANNOT_PIPE:k,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:U,ERR_STREAM_NULL_VALUES:J,ERR_STREAM_WRITE_AFTER_END:X,ERR_UNKNOWN_ENCODING:le}=ot().codes,{errorOrDestroy:P}=y;t(pe.prototype,m.prototype),t(pe,m);function G(){}var Z=u("kOnFinished");function V(R,j,Y){typeof Y!="boolean"&&(Y=j instanceof St()),this.objectMode=!!(R&&R.objectMode),Y&&(this.objectMode=this.objectMode||!!(R&&R.writableObjectMode)),this.highWaterMark=R?C(this,R,"writableHighWaterMark",Y):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let oe=!!(R&&R.decodeStrings===!1);this.decodeStrings=!oe,this.defaultEncoding=R&&R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=x.bind(void 0,j),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,be(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!R||R.emitClose!==!1,this.autoDestroy=!R||R.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Z]=[]}function be(R){R.buffered=[],R.bufferedIndex=0,R.allBuffers=!0,R.allNoop=!0}V.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},e(V.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function pe(R){let j=this instanceof St();if(!j&&!r(pe,this))return new pe(R);this._writableState=new V(R,this,j),R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final),typeof R.construct=="function"&&(this._construct=R.construct),R.signal&&w(R.signal,this)),m.call(this,R),y.construct(this,()=>{let Y=this._writableState;Y.writing||Ce(this,Y),Q(this,Y)})}e(pe,d,{__proto__:null,value:function(R){return r(this,R)?!0:this!==pe?!1:R&&R._writableState instanceof V}}),pe.prototype.pipe=function(){P(this,new k)};function me(R,j,Y,oe){let re=R._writableState;if(typeof Y=="function")oe=Y,Y=re.defaultEncoding;else{if(!Y)Y=re.defaultEncoding;else if(Y!=="buffer"&&!A.isEncoding(Y))throw new le(Y);typeof oe!="function"&&(oe=G)}if(j===null)throw new J;if(!re.objectMode)if(typeof j=="string")re.decodeStrings!==!1&&(j=A.from(j,Y),Y="buffer");else if(j instanceof A)Y="buffer";else if(m._isUint8Array(j))j=m._uint8ArrayToBuffer(j),Y="buffer";else throw new _("chunk",["string","Buffer","Uint8Array"],j);let ue;return re.ending?ue=new X:re.destroyed&&(ue=new T("write")),ue?(i.nextTick(oe,ue),P(R,ue,!0),ue):(re.pendingcb++,ve(R,re,j,Y,oe))}pe.prototype.write=function(R,j,Y){return me(this,R,j,Y)===!0},pe.prototype.cork=function(){this._writableState.corked++},pe.prototype.uncork=function(){let R=this._writableState;R.corked&&(R.corked--,R.writing||Ce(this,R))},pe.prototype.setDefaultEncoding=function(R){if(typeof R=="string"&&(R=s(R)),!A.isEncoding(R))throw new le(R);return this._writableState.defaultEncoding=R,this};function ve(R,j,Y,oe,re){let ue=j.objectMode?1:Y.length;j.length+=ue;let W=j.length<j.highWaterMark;return W||(j.needDrain=!0),j.writing||j.corked||j.errored||!j.constructed?(j.buffered.push({chunk:Y,encoding:oe,callback:re}),j.allBuffers&&oe!=="buffer"&&(j.allBuffers=!1),j.allNoop&&re!==G&&(j.allNoop=!1)):(j.writelen=ue,j.writecb=re,j.writing=!0,j.sync=!0,R._write(Y,oe,j.onwrite),j.sync=!1),W&&!j.errored&&!j.destroyed}function z(R,j,Y,oe,re,ue,W){j.writelen=oe,j.writecb=W,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new T("write")):Y?R._writev(re,j.onwrite):R._write(re,ue,j.onwrite),j.sync=!1}function de(R,j,Y,oe){--j.pendingcb,oe(Y),F(j),P(R,Y)}function x(R,j){let Y=R._writableState,oe=Y.sync,re=Y.writecb;if(typeof re!="function"){P(R,new M);return}Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0,j?(j.stack,Y.errored||(Y.errored=j),R._readableState&&!R._readableState.errored&&(R._readableState.errored=j),oe?i.nextTick(de,R,Y,j,re):de(R,Y,j,re)):(Y.buffered.length>Y.bufferedIndex&&Ce(R,Y),oe?Y.afterWriteTickInfo!==null&&Y.afterWriteTickInfo.cb===re?Y.afterWriteTickInfo.count++:(Y.afterWriteTickInfo={count:1,cb:re,stream:R,state:Y},i.nextTick(ne,Y.afterWriteTickInfo)):ge(R,Y,1,re))}function ne({stream:R,state:j,count:Y,cb:oe}){return j.afterWriteTickInfo=null,ge(R,j,Y,oe)}function ge(R,j,Y,oe){for(!j.ending&&!R.destroyed&&j.length===0&&j.needDrain&&(j.needDrain=!1,R.emit("drain"));Y-- >0;)j.pendingcb--,oe();j.destroyed&&F(j),Q(R,j)}function F(R){if(R.writing)return;for(let re=R.bufferedIndex;re<R.buffered.length;++re){var j;let{chunk:ue,callback:W}=R.buffered[re],se=R.objectMode?1:ue.length;R.length-=se,W((j=R.errored)!==null&&j!==void 0?j:new T("write"))}let Y=R[Z].splice(0);for(let re=0;re<Y.length;re++){var oe;Y[re]((oe=R.errored)!==null&&oe!==void 0?oe:new T("end"))}be(R)}function Ce(R,j){if(j.corked||j.bufferProcessing||j.destroyed||!j.constructed)return;let{buffered:Y,bufferedIndex:oe,objectMode:re}=j,ue=Y.length-oe;if(!ue)return;let W=oe;if(j.bufferProcessing=!0,ue>1&&R._writev){j.pendingcb-=ue-1;let se=j.allNoop?G:te=>{for(let Pe=W;Pe<Y.length;++Pe)Y[Pe].callback(te)},we=j.allNoop&&W===0?Y:a(Y,W);we.allBuffers=j.allBuffers,z(R,j,!0,j.length,we,"",se),be(j)}else{do{let{chunk:se,encoding:we,callback:te}=Y[W];Y[W++]=null;let Pe=re?1:se.length;z(R,j,!1,Pe,se,we,te)}while(W<Y.length&&!j.writing);W===Y.length?be(j):W>256?(Y.splice(0,W),j.bufferedIndex=0):j.bufferedIndex=W}j.bufferProcessing=!1}pe.prototype._write=function(R,j,Y){if(this._writev)this._writev([{chunk:R,encoding:j}],Y);else throw new N("_write()")},pe.prototype._writev=null,pe.prototype.end=function(R,j,Y){let oe=this._writableState;typeof R=="function"?(Y=R,R=null,j=null):typeof j=="function"&&(Y=j,j=null);let re;if(R!=null){let ue=me(this,R,j);ue instanceof l&&(re=ue)}return oe.corked&&(oe.corked=1,this.uncork()),re||(!oe.errored&&!oe.ending?(oe.ending=!0,Q(this,oe,!0),oe.ended=!0):oe.finished?re=new U("end"):oe.destroyed&&(re=new T("end"))),typeof Y=="function"&&(re||oe.finished?i.nextTick(Y,re):oe[Z].push(Y)),this};function q(R){return R.ending&&!R.destroyed&&R.constructed&&R.length===0&&!R.errored&&R.buffered.length===0&&!R.finished&&!R.writing&&!R.errorEmitted&&!R.closeEmitted}function D(R,j){let Y=!1;function oe(re){if(Y){P(R,re??M());return}if(Y=!0,j.pendingcb--,re){let ue=j[Z].splice(0);for(let W=0;W<ue.length;W++)ue[W](re);P(R,re,j.sync)}else q(j)&&(j.prefinished=!0,R.emit("prefinish"),j.pendingcb++,i.nextTick(K,R,j))}j.sync=!0,j.pendingcb++;try{R._final(oe)}catch(re){oe(re)}j.sync=!1}function ee(R,j){!j.prefinished&&!j.finalCalled&&(typeof R._final=="function"&&!j.destroyed?(j.finalCalled=!0,D(R,j)):(j.prefinished=!0,R.emit("prefinish")))}function Q(R,j,Y){q(j)&&(ee(R,j),j.pendingcb===0&&(Y?(j.pendingcb++,i.nextTick((oe,re)=>{q(re)?K(oe,re):re.pendingcb--},R,j)):q(j)&&(j.pendingcb++,K(R,j))))}function K(R,j){j.pendingcb--,j.finished=!0;let Y=j[Z].splice(0);for(let oe=0;oe<Y.length;oe++)Y[oe]();if(R.emit("finish"),j.autoDestroy){let oe=R._readableState;(!oe||oe.autoDestroy&&(oe.endEmitted||oe.readable===!1))&&R.destroy()}}n(pe.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(R){this._writableState&&(this._writableState.destroyed=R)}},writable:{__proto__:null,get(){let R=this._writableState;return!!R&&R.writable!==!1&&!R.destroyed&&!R.errored&&!R.ending&&!R.ended},set(R){this._writableState&&(this._writableState.writable=!!R)}},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 R=this._writableState;return R?!R.destroyed&&!R.ending&&R.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 H=y.destroy;pe.prototype.destroy=function(R,j){let Y=this._writableState;return!Y.destroyed&&(Y.bufferedIndex<Y.buffered.length||Y[Z].length)&&i.nextTick(F,Y),H.call(this,R,j),this},pe.prototype._undestroy=y.undestroy,pe.prototype._destroy=function(R,j){j(R)},pe.prototype[p.captureRejectionSymbol]=function(R){this.destroy(R)};var ae;function ie(){return ae===void 0&&(ae={}),ae}pe.fromWeb=function(R,j){return ie().newStreamWritableFromWritableStream(R,j)},pe.toWeb=function(R){return ie().newWritableStreamFromStreamWritable(R)}}),zl=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),a=(Xe(),Le(Ze)),{isReadable:l,isWritable:r,isIterable:e,isNodeStream:n,isReadableNodeStream:t,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:p}=Et(),m=Mt(),{AbortError:A,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:w}}=ot(),{destroyer:C}=nr(),b=St(),_=Cr(),N=hi(),{createDeferredPromise:M}=at(),k=Ko(),T=globalThis.Blob||a.Blob,U=typeof T<"u"?function(Z){return Z instanceof T}:function(Z){return!1},J=globalThis.AbortController||cr().AbortController,{FunctionPrototypeCall:X}=qe(),le=class extends b{constructor(Z){super(Z),(Z==null?void 0:Z.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(Z==null?void 0:Z.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};h.exports=function Z(V,be){if(u(V))return V;if(t(V))return G({readable:V});if(s(V))return G({writable:V});if(n(V))return G({writable:!1,readable:!1});if(d(V))return G({readable:_.fromWeb(V)});if(p(V))return G({writable:N.fromWeb(V)});if(typeof V=="function"){let{value:me,write:ve,final:z,destroy:de}=P(V);if(e(me))return k(le,me,{objectMode:!0,write:ve,final:z,destroy:de});let x=me==null?void 0:me.then;if(typeof x=="function"){let ne,ge=X(x,me,F=>{if(F!=null)throw new w("nully","body",F)},F=>{C(ne,F)});return ne=new le({objectMode:!0,readable:!1,write:ve,final(F){z(async()=>{try{await ge,i.nextTick(F,null)}catch(Ce){i.nextTick(F,Ce)}})},destroy:de})}throw new w("Iterable, AsyncIterable or AsyncFunction",be,me)}if(U(V))return Z(V.arrayBuffer());if(e(V))return k(le,V,{objectMode:!0,writable:!1});if(d(V==null?void 0:V.readable)&&p(V==null?void 0:V.writable))return le.fromWeb(V);if(typeof(V==null?void 0:V.writable)=="object"||typeof(V==null?void 0:V.readable)=="object"){let me=V!=null&&V.readable?t(V==null?void 0:V.readable)?V==null?void 0:V.readable:Z(V.readable):void 0,ve=V!=null&&V.writable?s(V==null?void 0:V.writable)?V==null?void 0:V.writable:Z(V.writable):void 0;return G({readable:me,writable:ve})}let pe=V==null?void 0:V.then;if(typeof pe=="function"){let me;return X(pe,V,ve=>{ve!=null&&me.push(ve),me.push(null)},ve=>{C(me,ve)}),me=new le({objectMode:!0,writable:!1,read(){}})}throw new y(be,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],V)};function P(Z){let{promise:V,resolve:be}=M(),pe=new J,me=pe.signal;return{value:Z(async function*(){for(;;){let ve=V;V=null;let{chunk:z,done:de,cb:x}=await ve;if(i.nextTick(x),de)return;if(me.aborted)throw new A(void 0,{cause:me.reason});({promise:V,resolve:be}=M()),yield z}}(),{signal:me}),write(ve,z,de){let x=be;be=null,x({chunk:ve,done:!1,cb:de})},final(ve){let z=be;be=null,z({done:!0,cb:ve})},destroy(ve,z){pe.abort(),z(ve)}}}function G(Z){let V=Z.readable&&typeof Z.readable.read!="function"?_.wrap(Z.readable):Z.readable,be=Z.writable,pe=!!l(V),me=!!r(be),ve,z,de,x,ne;function ge(F){let Ce=x;x=null,Ce?Ce(F):F&&ne.destroy(F)}return ne=new le({readableObjectMode:!!(V!=null&&V.readableObjectMode),writableObjectMode:!!(be!=null&&be.writableObjectMode),readable:pe,writable:me}),me&&(m(be,F=>{me=!1,F&&C(V,F),ge(F)}),ne._write=function(F,Ce,q){be.write(F,Ce)?q():ve=q},ne._final=function(F){be.end(),z=F},be.on("drain",function(){if(ve){let F=ve;ve=null,F()}}),be.on("finish",function(){if(z){let F=z;z=null,F()}})),pe&&(m(V,F=>{pe=!1,F&&C(V,F),ge(F)}),V.on("readable",function(){if(de){let F=de;de=null,F()}}),V.on("end",function(){ne.push(null)}),ne._read=function(){for(;;){let F=V.read();if(F===null){de=ne._read;return}if(!ne.push(F))return}}),ne._destroy=function(F,Ce){!F&&x!==null&&(F=new A),de=null,ve=null,z=null,x===null?Ce(F):(x=Ce,C(be,F),C(V,F))},ne}}),St=Ae((o,h)=>{ce(),fe(),he();var{ObjectDefineProperties:i,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:l,ObjectSetPrototypeOf:r}=qe();h.exports=t;var e=Cr(),n=hi();r(t.prototype,e.prototype),r(t,e);{let p=l(n.prototype);for(let m=0;m<p.length;m++){let A=p[m];t.prototype[A]||(t.prototype[A]=n.prototype[A])}}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}i(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,m){return u().newStreamDuplexFromReadableWritablePair(p,m)},t.toWeb=function(p){return u().newReadableWritablePairFromDuplex(p)};var d;t.from=function(p){return d||(d=zl()),d(p,"body")}}),Ho=Ae((o,h)=>{ce(),fe(),he();var{ObjectSetPrototypeOf:i,Symbol:a}=qe();h.exports=t;var{ERR_METHOD_NOT_IMPLEMENTED:l}=ot().codes,r=St(),{getHighWaterMark:e}=Sr();i(t.prototype,r.prototype),i(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,m)=>{if(p){d?d(p):this.destroy(p);return}m!=null&&this.push(m),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,m){throw new l("_transform()")},t.prototype._write=function(d,p,m){let A=this._readableState,y=this._writableState,w=A.length;this._transform(d,p,(C,b)=>{if(C){m(C);return}b!=null&&this.push(b),y.ended||w===A.length||A.length<A.highWaterMark?m():this[n]=m})},t.prototype._read=function(){if(this[n]){let d=this[n];this[n]=null,d()}}}),qo=Ae((o,h)=>{ce(),fe(),he();var{ObjectSetPrototypeOf:i}=qe();h.exports=l;var a=Ho();i(l.prototype,a.prototype),i(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)}}),fi=Ae((o,h)=>{ce(),fe(),he();var i=Kt(),{ArrayIsArray:a,Promise:l,SymbolAsyncIterator:r,SymbolDispose:e}=qe(),n=Mt(),{once:t}=at(),s=nr(),u=St(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:m,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:w},AbortError:C}=ot(),{validateFunction:b,validateAbortSignal:_}=hr(),{isIterable:N,isReadable:M,isReadableNodeStream:k,isNodeStream:T,isTransformStream:U,isWebStream:J,isReadableStream:X,isReadableFinished:le}=Et(),P=globalThis.AbortController||cr().AbortController,G,Z,V;function be(F,Ce,q){let D=!1;F.on("close",()=>{D=!0});let ee=n(F,{readable:Ce,writable:q},Q=>{D=!Q});return{destroy:Q=>{D||(D=!0,s.destroyer(F,Q||new y("pipe")))},cleanup:ee}}function pe(F){return b(F[F.length-1],"streams[stream.length - 1]"),F.pop()}function me(F){if(N(F))return F;if(k(F))return ve(F);throw new p("val",["Readable","Iterable","AsyncIterable"],F)}async function*ve(F){Z||(Z=Cr()),yield*Z.prototype[r].call(F)}async function z(F,Ce,q,{end:D}){let ee,Q=null,K=ie=>{if(ie&&(ee=ie),Q){let R=Q;Q=null,R()}},H=()=>new l((ie,R)=>{ee?R(ee):Q=()=>{ee?R(ee):ie()}});Ce.on("drain",K);let ae=n(Ce,{readable:!1},K);try{Ce.writableNeedDrain&&await H();for await(let ie of F)Ce.write(ie)||await H();D&&(Ce.end(),await H()),q()}catch(ie){q(ee!==ie?d(ee,ie):ie)}finally{ae(),Ce.off("drain",K)}}async function de(F,Ce,q,{end:D}){U(Ce)&&(Ce=Ce.writable);let ee=Ce.getWriter();try{for await(let Q of F)await ee.ready,ee.write(Q).catch(()=>{});await ee.ready,D&&await ee.close(),q()}catch(Q){try{await ee.abort(Q),q(Q)}catch(K){q(K)}}}function x(...F){return ne(F,t(pe(F)))}function ne(F,Ce,q){if(F.length===1&&a(F[0])&&(F=F[0]),F.length<2)throw new A("streams");let D=new P,ee=D.signal,Q=q==null?void 0:q.signal,K=[];_(Q,"options.signal");function H(){re(new C)}V=V||at().addAbortListener;let ae;Q&&(ae=V(Q,H));let ie,R,j=[],Y=0;function oe(we){re(we,--Y===0)}function re(we,te){var Pe;if(we&&(!ie||ie.code==="ERR_STREAM_PREMATURE_CLOSE")&&(ie=we),!(!ie&&!te)){for(;j.length;)j.shift()(ie);(Pe=ae)===null||Pe===void 0||Pe[e](),D.abort(),te&&(ie||K.forEach(c=>c()),i.nextTick(Ce,ie,R))}}let ue;for(let we=0;we<F.length;we++){let te=F[we],Pe=we<F.length-1,c=we>0,f=Pe||(q==null?void 0:q.end)!==!1,g=we===F.length-1;if(T(te)){let v=function(I){I&&I.name!=="AbortError"&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"&&oe(I)};if(f){let{destroy:I,cleanup:L}=be(te,Pe,c);j.push(I),M(te)&&g&&K.push(L)}te.on("error",v),M(te)&&g&&K.push(()=>{te.removeListener("error",v)})}if(we===0)if(typeof te=="function"){if(ue=te({signal:ee}),!N(ue))throw new m("Iterable, AsyncIterable or Stream","source",ue)}else N(te)||k(te)||U(te)?ue=te:ue=u.from(te);else if(typeof te=="function"){if(U(ue)){var W;ue=me((W=ue)===null||W===void 0?void 0:W.readable)}else ue=me(ue);if(ue=te(ue,{signal:ee}),Pe){if(!N(ue,!0))throw new m("AsyncIterable",`transform[${we-1}]`,ue)}else{var se;G||(G=qo());let v=new G({objectMode:!0}),I=(se=ue)===null||se===void 0?void 0:se.then;if(typeof I=="function")Y++,I.call(ue,_e=>{R=_e,_e!=null&&v.write(_e),f&&v.end(),i.nextTick(oe)},_e=>{v.destroy(_e),i.nextTick(oe,_e)});else if(N(ue,!0))Y++,z(ue,v,oe,{end:f});else if(X(ue)||U(ue)){let _e=ue.readable||ue;Y++,z(_e,v,oe,{end:f})}else throw new m("AsyncIterable or Promise","destination",ue);ue=v;let{destroy:L,cleanup:$}=be(ue,!1,!0);j.push(L),g&&K.push($)}}else if(T(te)){if(k(ue)){Y+=2;let v=ge(ue,te,oe,{end:f});M(te)&&g&&K.push(v)}else if(U(ue)||X(ue)){let v=ue.readable||ue;Y++,z(v,te,oe,{end:f})}else if(N(ue))Y++,z(ue,te,oe,{end:f});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ue);ue=te}else if(J(te)){if(k(ue))Y++,de(me(ue),te,oe,{end:f});else if(X(ue)||N(ue))Y++,de(ue,te,oe,{end:f});else if(U(ue))Y++,de(ue.readable,te,oe,{end:f});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ue);ue=te}else ue=u.from(te)}return(ee!=null&&ee.aborted||Q!=null&&Q.aborted)&&i.nextTick(H),ue}function ge(F,Ce,q,{end:D}){let ee=!1;if(Ce.on("close",()=>{ee||q(new w)}),F.pipe(Ce,{end:!1}),D){let Q=function(){ee=!0,Ce.end()};le(F)?i.nextTick(Q):F.once("end",Q)}else q();return n(F,{readable:!0,writable:!1},Q=>{let K=F._readableState;Q&&Q.code==="ERR_STREAM_PREMATURE_CLOSE"&&K&&K.ended&&!K.errored&&!K.errorEmitted?F.once("end",q).once("error",q):q(Q)}),n(Ce,{readable:!1,writable:!0},q)}h.exports={pipelineImpl:ne,pipeline:x}}),$o=Ae((o,h)=>{ce(),fe(),he();var{pipeline:i}=fi(),a=St(),{destroyer:l}=nr(),{isNodeStream:r,isReadable:e,isWritable:n,isWebStream:t,isTransformStream:s,isWritableStream:u,isReadableStream:d}=Et(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:A}}=ot(),y=Mt();h.exports=function(...w){if(w.length===0)throw new A("streams");if(w.length===1)return a.from(w[0]);let C=[...w];if(typeof w[0]=="function"&&(w[0]=a.from(w[0])),typeof w[w.length-1]=="function"){let P=w.length-1;w[P]=a.from(w[P])}for(let P=0;P<w.length;++P)if(!(!r(w[P])&&!t(w[P]))){if(P<w.length-1&&!(e(w[P])||d(w[P])||s(w[P])))throw new m(`streams[${P}]`,C[P],"must be readable");if(P>0&&!(n(w[P])||u(w[P])||s(w[P])))throw new m(`streams[${P}]`,C[P],"must be writable")}let b,_,N,M,k;function T(P){let G=M;M=null,G?G(P):P?k.destroy(P):!le&&!X&&k.destroy()}let U=w[0],J=i(w,T),X=!!(n(U)||u(U)||s(U)),le=!!(e(J)||d(J)||s(J));if(k=new a({writableObjectMode:!!(U!=null&&U.writableObjectMode),readableObjectMode:!!(J!=null&&J.readableObjectMode),writable:X,readable:le}),X){if(r(U))k._write=function(G,Z,V){U.write(G,Z)?V():b=V},k._final=function(G){U.end(),_=G},U.on("drain",function(){if(b){let G=b;b=null,G()}});else if(t(U)){let G=(s(U)?U.writable:U).getWriter();k._write=async function(Z,V,be){try{await G.ready,G.write(Z).catch(()=>{}),be()}catch(pe){be(pe)}},k._final=async function(Z){try{await G.ready,G.close().catch(()=>{}),_=Z}catch(V){Z(V)}}}let P=s(J)?J.readable:J;y(P,()=>{if(_){let G=_;_=null,G()}})}if(le){if(r(J))J.on("readable",function(){if(N){let P=N;N=null,P()}}),J.on("end",function(){k.push(null)}),k._read=function(){for(;;){let P=J.read();if(P===null){N=k._read;return}if(!k.push(P))return}};else if(t(J)){let P=(s(J)?J.readable:J).getReader();k._read=async function(){for(;;)try{let{value:G,done:Z}=await P.read();if(!k.push(G))return;if(Z){k.push(null);return}}catch{return}}}}return k._destroy=function(P,G){!P&&M!==null&&(P=new p),N=null,b=null,_=null,M===null?G(P):(M=G,r(J)&&l(J,P))},k}}),Gl=Ae((o,h)=>{ce(),fe(),he();var i=globalThis.AbortController||cr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:l,ERR_MISSING_ARGS:r,ERR_OUT_OF_RANGE:e},AbortError:n}=ot(),{validateAbortSignal:t,validateInteger:s,validateObject:u}=hr(),d=qe().Symbol("kWeak"),p=qe().Symbol("kResistStopPropagation"),{finished:m}=Mt(),A=$o(),{addAbortSignalNoValidate:y}=Er(),{isWritable:w,isNodeStream:C}=Et(),{deprecate:b}=at(),{ArrayPrototypePush:_,Boolean:N,MathFloor:M,Number:k,NumberIsNaN:T,Promise:U,PromiseReject:J,PromiseResolve:X,PromisePrototypeThen:le,Symbol:P}=qe(),G=P("kEmpty"),Z=P("kEof");function V(Q,K){if(K!=null&&u(K,"options"),(K==null?void 0:K.signal)!=null&&t(K.signal,"options.signal"),C(Q)&&!w(Q))throw new a("stream",Q,"must be writable");let H=A(this,Q);return K!=null&&K.signal&&y(K.signal,H),H}function be(Q,K){if(typeof Q!="function")throw new l("fn",["Function","AsyncFunction"],Q);K!=null&&u(K,"options"),(K==null?void 0:K.signal)!=null&&t(K.signal,"options.signal");let H=1;(K==null?void 0:K.concurrency)!=null&&(H=M(K.concurrency));let ae=H-1;return(K==null?void 0:K.highWaterMark)!=null&&(ae=M(K.highWaterMark)),s(H,"options.concurrency",1),s(ae,"options.highWaterMark",0),ae+=H,(async function*(){let ie=at().AbortSignalAny([K==null?void 0:K.signal].filter(N)),R=this,j=[],Y={signal:ie},oe,re,ue=!1,W=0;function se(){ue=!0,we()}function we(){W-=1,te()}function te(){re&&!ue&&W<H&&j.length<ae&&(re(),re=null)}async function Pe(){try{for await(let c of R){if(ue)return;if(ie.aborted)throw new n;try{if(c=Q(c,Y),c===G)continue;c=X(c)}catch(f){c=J(f)}W+=1,le(c,we,se),j.push(c),oe&&(oe(),oe=null),!ue&&(j.length>=ae||W>=H)&&await new U(f=>{re=f})}j.push(Z)}catch(c){let f=J(c);le(f,we,se),j.push(f)}finally{ue=!0,oe&&(oe(),oe=null)}}Pe();try{for(;;){for(;j.length>0;){let c=await j[0];if(c===Z)return;if(ie.aborted)throw new n;c!==G&&(yield c),j.shift(),te()}await new U(c=>{oe=c})}}finally{ue=!0,re&&(re(),re=null)}}).call(this)}function pe(Q=void 0){return Q!=null&&u(Q,"options"),(Q==null?void 0:Q.signal)!=null&&t(Q.signal,"options.signal"),(async function*(){let K=0;for await(let ae of this){var H;if(Q!=null&&(H=Q.signal)!==null&&H!==void 0&&H.aborted)throw new n({cause:Q.signal.reason});yield[K++,ae]}}).call(this)}async function me(Q,K=void 0){for await(let H of x.call(this,Q,K))return!0;return!1}async function ve(Q,K=void 0){if(typeof Q!="function")throw new l("fn",["Function","AsyncFunction"],Q);return!await me.call(this,async(...H)=>!await Q(...H),K)}async function z(Q,K){for await(let H of x.call(this,Q,K))return H}async function de(Q,K){if(typeof Q!="function")throw new l("fn",["Function","AsyncFunction"],Q);async function H(ae,ie){return await Q(ae,ie),G}for await(let ae of be.call(this,H,K));}function x(Q,K){if(typeof Q!="function")throw new l("fn",["Function","AsyncFunction"],Q);async function H(ae,ie){return await Q(ae,ie)?ae:G}return be.call(this,H,K)}var ne=class extends r{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ge(Q,K,H){var ae;if(typeof Q!="function")throw new l("reducer",["Function","AsyncFunction"],Q);H!=null&&u(H,"options"),(H==null?void 0:H.signal)!=null&&t(H.signal,"options.signal");let ie=arguments.length>1;if(H!=null&&(ae=H.signal)!==null&&ae!==void 0&&ae.aborted){let re=new n(void 0,{cause:H.signal.reason});throw this.once("error",()=>{}),await m(this.destroy(re)),re}let R=new i,j=R.signal;if(H!=null&&H.signal){let re={once:!0,[d]:this,[p]:!0};H.signal.addEventListener("abort",()=>R.abort(),re)}let Y=!1;try{for await(let re of this){var oe;if(Y=!0,H!=null&&(oe=H.signal)!==null&&oe!==void 0&&oe.aborted)throw new n;ie?K=await Q(K,re,{signal:j}):(K=re,ie=!0)}if(!Y&&!ie)throw new ne}finally{R.abort()}return K}async function F(Q){Q!=null&&u(Q,"options"),(Q==null?void 0:Q.signal)!=null&&t(Q.signal,"options.signal");let K=[];for await(let ae of this){var H;if(Q!=null&&(H=Q.signal)!==null&&H!==void 0&&H.aborted)throw new n(void 0,{cause:Q.signal.reason});_(K,ae)}return K}function Ce(Q,K){let H=be.call(this,Q,K);return(async function*(){for await(let ae of H)yield*ae}).call(this)}function q(Q){if(Q=k(Q),T(Q))return 0;if(Q<0)throw new e("number",">= 0",Q);return Q}function D(Q,K=void 0){return K!=null&&u(K,"options"),(K==null?void 0:K.signal)!=null&&t(K.signal,"options.signal"),Q=q(Q),(async function*(){var H;if(K!=null&&(H=K.signal)!==null&&H!==void 0&&H.aborted)throw new n;for await(let ie of this){var ae;if(K!=null&&(ae=K.signal)!==null&&ae!==void 0&&ae.aborted)throw new n;Q--<=0&&(yield ie)}}).call(this)}function ee(Q,K=void 0){return K!=null&&u(K,"options"),(K==null?void 0:K.signal)!=null&&t(K.signal,"options.signal"),Q=q(Q),(async function*(){var H;if(K!=null&&(H=K.signal)!==null&&H!==void 0&&H.aborted)throw new n;for await(let ie of this){var ae;if(K!=null&&(ae=K.signal)!==null&&ae!==void 0&&ae.aborted)throw new n;if(Q-- >0&&(yield ie),Q<=0)return}}).call(this)}h.exports.streamReturningOperators={asIndexedPairs:b(pe,"readable.asIndexedPairs will be removed in a future version."),drop:D,filter:x,flatMap:Ce,map:be,take:ee,compose:V},h.exports.promiseReturningOperators={every:ve,forEach:de,reduce:ge,toArray:F,some:me,find:z}}),zo=Ae((o,h)=>{ce(),fe(),he();var{ArrayPrototypePop:i,Promise:a}=qe(),{isIterable:l,isNodeStream:r,isWebStream:e}=Et(),{pipelineImpl:n}=fi(),{finished:t}=Mt();Go();function s(...u){return new a((d,p)=>{let m,A,y=u[u.length-1];if(y&&typeof y=="object"&&!r(y)&&!l(y)&&!e(y)){let w=i(u);m=w.signal,A=w.end}n(u,(w,C)=>{w?p(w):d(C)},{signal:m,end:A})})}h.exports={finished:t,pipeline:s}}),Go=Ae((o,h)=>{ce(),fe(),he();var{Buffer:i}=(Xe(),Le(Ze)),{ObjectDefineProperty:a,ObjectKeys:l,ReflectApply:r}=qe(),{promisify:{custom:e}}=at(),{streamReturningOperators:n,promiseReturningOperators:t}=Gl(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=ot(),u=$o(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=Sr(),{pipeline:m}=fi(),{destroyer:A}=nr(),y=Mt(),w=zo(),C=Et(),b=h.exports=ci().Stream;b.isDestroyed=C.isDestroyed,b.isDisturbed=C.isDisturbed,b.isErrored=C.isErrored,b.isReadable=C.isReadable,b.isWritable=C.isWritable,b.Readable=Cr();for(let N of l(n)){let M=function(...T){if(new.target)throw s();return b.Readable.from(r(k,this,T))},k=n[N];a(M,"name",{__proto__:null,value:k.name}),a(M,"length",{__proto__:null,value:k.length}),a(b.Readable.prototype,N,{__proto__:null,value:M,enumerable:!1,configurable:!0,writable:!0})}for(let N of l(t)){let M=function(...T){if(new.target)throw s();return r(k,this,T)},k=t[N];a(M,"name",{__proto__:null,value:k.name}),a(M,"length",{__proto__:null,value:k.length}),a(b.Readable.prototype,N,{__proto__:null,value:M,enumerable:!1,configurable:!0,writable:!0})}b.Writable=hi(),b.Duplex=St(),b.Transform=Ho(),b.PassThrough=qo(),b.pipeline=m;var{addAbortSignal:_}=Er();b.addAbortSignal=_,b.finished=y,b.destroy=A,b.compose=u,b.setDefaultHighWaterMark=d,b.getDefaultHighWaterMark=p,a(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return w}}),a(m,e,{__proto__:null,enumerable:!0,get(){return w.pipeline}}),a(y,e,{__proto__:null,enumerable:!0,get(){return w.finished}}),b.Stream=b,b._isUint8Array=function(N){return N instanceof Uint8Array},b._uint8ArrayToBuffer=function(N){return i.from(N.buffer,N.byteOffset,N.byteLength)}}),Ht=Ae((o,h)=>{ce(),fe(),he();var i=Go(),a=zo(),l=i.Readable.destroy;h.exports=i.Readable,h.exports._uint8ArrayToBuffer=i._uint8ArrayToBuffer,h.exports._isUint8Array=i._isUint8Array,h.exports.isDisturbed=i.isDisturbed,h.exports.isErrored=i.isErrored,h.exports.isReadable=i.isReadable,h.exports.Readable=i.Readable,h.exports.Writable=i.Writable,h.exports.Duplex=i.Duplex,h.exports.Transform=i.Transform,h.exports.PassThrough=i.PassThrough,h.exports.addAbortSignal=i.addAbortSignal,h.exports.finished=i.finished,h.exports.destroy=i.destroy,h.exports.destroy=l,h.exports.pipeline=i.pipeline,h.exports.compose=i.compose,Object.defineProperty(i,"promises",{configurable:!0,enumerable:!0,get(){return a}}),h.exports.Stream=i.Stream,h.exports.default=h.exports}),Yl=Ae((o,h)=>{ce(),fe(),he(),typeof Object.create=="function"?h.exports=function(i,a){a&&(i.super_=a,i.prototype=Object.create(a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:h.exports=function(i,a){if(a){i.super_=a;var l=function(){};l.prototype=a.prototype,i.prototype=new l,i.prototype.constructor=i}}}),Jl=Ae((o,h)=>{ce(),fe(),he();var{Buffer:i}=(Xe(),Le(Ze)),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||i.alloc(0);let s=!!r,u=this._offset(n),d=t-n,p=d,m=s&&e||0,A=u[1];if(n===0&&t===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:i.concat(this._bufs,this.length);for(let y=0;y<this._bufs.length;y++)this._bufs[y].copy(r,m),m+=this._bufs[y].length;return r}if(p<=this._bufs[u[0]].length-A)return s?this._bufs[u[0]].copy(r,e,A,A+p):this._bufs[u[0]].slice(A,A+p);s||(r=i.allocUnsafe(d));for(let y=u[0];y<this._bufs.length;y++){let w=this._bufs[y].length-A;if(p>w)this._bufs[y].copy(r,m,A),m+=w;else{this._bufs[y].copy(r,m,A,A+p),m+=w;break}p-=w,A&&(A=0)}return r.length>m?r.slice(0,m):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(i.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(i.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=i.from([r]):typeof r=="string"?r=i.from(r,n):this._isBufferList(r)?r=r.slice():Array.isArray(r.buffer)?r=i.from(r.buffer,r.byteOffset,r.byteLength):i.isBuffer(r)||(r=i.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}),Zl=Ae((o,h)=>{ce(),fe(),he();var i=Ht().Duplex,a=Yl(),l=Jl();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),i.call(this)}a(r,i),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){i.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}),Xl=Ae((o,h)=>{ce(),fe(),he();var i=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=i}),Yo=Ae((o,h)=>{ce(),fe(),he();var i=h.exports,{Buffer:a}=(Xe(),Le(Ze));i.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"},i.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},i.requiredHeaderFlagsErrors={};for(let r in i.requiredHeaderFlags){let e=i.requiredHeaderFlags[r];i.requiredHeaderFlagsErrors[r]="Invalid header flag bits, must be 0x"+e.toString(16)+" for "+i.types[r]+" packet"}i.codes={};for(let r in i.types){let e=i.types[r];i.codes[e]=r}i.CMD_SHIFT=4,i.CMD_MASK=240,i.DUP_MASK=8,i.QOS_MASK=3,i.QOS_SHIFT=1,i.RETAIN_MASK=1,i.VARBYTEINT_MASK=127,i.VARBYTEINT_FIN_MASK=128,i.VARBYTEINT_MAX=268435455,i.SESSIONPRESENT_MASK=1,i.SESSIONPRESENT_HEADER=a.from([i.SESSIONPRESENT_MASK]),i.CONNACK_HEADER=a.from([i.codes.connack<<i.CMD_SHIFT]),i.USERNAME_MASK=128,i.PASSWORD_MASK=64,i.WILL_RETAIN_MASK=32,i.WILL_QOS_MASK=24,i.WILL_QOS_SHIFT=3,i.WILL_FLAG_MASK=4,i.CLEAN_SESSION_MASK=2,i.CONNECT_HEADER=a.from([i.codes.connect<<i.CMD_SHIFT]),i.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},i.propertiesCodes={};for(let r in i.properties){let e=i.properties[r];i.propertiesCodes[e]=r}i.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(i.codes[r]<<i.CMD_SHIFT|(n?i.DUP_MASK:0)|e<<i.QOS_SHIFT|t,0,!0),s})))}i.PUBLISH_HEADER=l("publish"),i.SUBSCRIBE_HEADER=l("subscribe"),i.SUBSCRIBE_OPTIONS_QOS_MASK=3,i.SUBSCRIBE_OPTIONS_NL_MASK=1,i.SUBSCRIBE_OPTIONS_NL_SHIFT=2,i.SUBSCRIBE_OPTIONS_RAP_MASK=1,i.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,i.SUBSCRIBE_OPTIONS_RH_MASK=3,i.SUBSCRIBE_OPTIONS_RH_SHIFT=4,i.SUBSCRIBE_OPTIONS_RH=[0,16,32],i.SUBSCRIBE_OPTIONS_NL=4,i.SUBSCRIBE_OPTIONS_RAP=8,i.SUBSCRIBE_OPTIONS_QOS=[0,1,2],i.UNSUBSCRIBE_HEADER=l("unsubscribe"),i.ACKS={unsuback:l("unsuback"),puback:l("puback"),pubcomp:l("pubcomp"),pubrel:l("pubrel"),pubrec:l("pubrec")},i.SUBACK_HEADER=a.from([i.codes.suback<<i.CMD_SHIFT]),i.VERSION3=a.from([3]),i.VERSION4=a.from([4]),i.VERSION5=a.from([5]),i.VERSION131=a.from([131]),i.VERSION132=a.from([132]),i.QOS=[0,1,2].map(r=>a.from([r])),i.EMPTY={pingreq:a.from([i.codes.pingreq<<4,0]),pingresp:a.from([i.codes.pingresp<<4,0]),disconnect:a.from([i.codes.disconnect<<4,0])},i.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"},i.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},i.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"},i.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"},i.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"},i.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),eu=Ae((o,h)=>{ce(),fe(),he();var i=1e3,a=i*60,l=a*60,r=l*24,e=r*7,n=r*365.25;h.exports=function(p,m){m=m||{};var A=typeof p;if(A==="string"&&p.length>0)return t(p);if(A==="number"&&isFinite(p))return m.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 m=/^(-?(?:\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(m){var A=parseFloat(m[1]),y=(m[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return A*n;case"weeks":case"week":case"w":return A*e;case"days":case"day":case"d":return A*r;case"hours":case"hour":case"hrs":case"hr":case"h":return A*l;case"minutes":case"minute":case"mins":case"min":case"m":return A*a;case"seconds":case"second":case"secs":case"sec":case"s":return A*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return}}}}function s(p){var m=Math.abs(p);return m>=r?Math.round(p/r)+"d":m>=l?Math.round(p/l)+"h":m>=a?Math.round(p/a)+"m":m>=i?Math.round(p/i)+"s":p+"ms"}function u(p){var m=Math.abs(p);return m>=r?d(p,m,r,"day"):m>=l?d(p,m,l,"hour"):m>=a?d(p,m,a,"minute"):m>=i?d(p,m,i,"second"):p+" ms"}function d(p,m,A,y){var w=m>=A*1.5;return Math.round(p/A)+" "+y+(w?"s":"")}}),tu=Ae((o,h)=>{ce(),fe(),he();function i(a){r.debug=r,r.default=r,r.coerce=d,r.disable=s,r.enable=n,r.enabled=u,r.humanize=eu(),r.destroy=p,Object.keys(a).forEach(m=>{r[m]=a[m]}),r.names=[],r.skips=[],r.formatters={};function l(m){let A=0;for(let y=0;y<m.length;y++)A=(A<<5)-A+m.charCodeAt(y),A|=0;return r.colors[Math.abs(A)%r.colors.length]}r.selectColor=l;function r(m){let A,y=null,w,C;function b(..._){if(!b.enabled)return;let N=b,M=Number(new Date),k=M-(A||M);N.diff=k,N.prev=A,N.curr=M,A=M,_[0]=r.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let T=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(U,J)=>{if(U==="%%")return"%";T++;let X=r.formatters[J];if(typeof X=="function"){let le=_[T];U=X.call(N,le),_.splice(T,1),T--}return U}),r.formatArgs.call(N,_),(N.log||r.log).apply(N,_)}return b.namespace=m,b.useColors=r.useColors(),b.color=r.selectColor(m),b.extend=e,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(w!==r.namespaces&&(w=r.namespaces,C=r.enabled(m)),C),set:_=>{y=_}}),typeof r.init=="function"&&r.init(b),b}function e(m,A){let y=r(this.namespace+(typeof A>"u"?":":A)+m);return y.log=this.log,y}function n(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let A=(typeof m=="string"?m:"").trim().replace(" ",",").split(",").filter(Boolean);for(let y of A)y[0]==="-"?r.skips.push(y.slice(1)):r.names.push(y)}function t(m,A){let y=0,w=0,C=-1,b=0;for(;y<m.length;)if(w<A.length&&(A[w]===m[y]||A[w]==="*"))A[w]==="*"?(C=w,b=y,w++):(y++,w++);else if(C!==-1)w=C+1,b++,y=b;else return!1;for(;w<A.length&&A[w]==="*";)w++;return w===A.length}function s(){let m=[...r.names,...r.skips.map(A=>"-"+A)].join(",");return r.enable(""),m}function u(m){for(let A of r.skips)if(t(m,A))return!1;for(let A of r.names)if(t(m,A))return!0;return!1}function d(m){return m instanceof Error?m.stack||m.message:m}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=i}),Ct=Ae((o,h)=>{ce(),fe(),he(),o.formatArgs=a,o.save=l,o.load=r,o.useColors=i,o.storage=e(),o.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`."))}})(),o.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 i(){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)}o.log=console.debug||console.log||(()=>{});function l(t){try{t?o.storage.setItem("debug",t):o.storage.removeItem("debug")}catch{}}function r(){let t;try{t=o.storage.getItem("debug")}catch{}return!t&&typeof De<"u"&&"env"in De&&(t=De.env.DEBUG),t}function e(){try{return localStorage}catch{}}h.exports=tu()(o);var{formatters:n}=h.exports;n.j=function(t){try{return JSON.stringify(t)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}}),ru=Ae((o,h)=>{ce(),fe(),he();var i=Zl(),{EventEmitter:a}=(Qt(),Le(Rt)),l=Xl(),r=Yo(),e=Ct()("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=i(),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,m={},A=this.packet,y=this._parseString();if(y===null)return this._emitError(new Error("Cannot parse protocolId"));if(y!=="MQTT"&&y!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(A.protocolId=y,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(A.protocolVersion=this._list.readUInt8(this._pos),A.protocolVersion>=128&&(A.bridgeMode=!0,A.protocolVersion=A.protocolVersion-128),A.protocolVersion!==3&&A.protocolVersion!==4&&A.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"));m.username=this._list.readUInt8(this._pos)&r.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&r.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&r.WILL_FLAG_MASK;let w=!!(this._list.readUInt8(this._pos)&r.WILL_RETAIN_MASK),C=(this._list.readUInt8(this._pos)&r.WILL_QOS_MASK)>>r.WILL_QOS_SHIFT;if(m.will)A.will={},A.will.retain=w,A.will.qos=C;else{if(w)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(C)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(A.clean=(this._list.readUInt8(this._pos)&r.CLEAN_SESSION_MASK)!==0,this._pos++,A.keepalive=this._parseNum(),A.keepalive===-1)return this._emitError(new Error("Packet too short"));if(A.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(A.properties=_)}let b=this._parseString();if(b===null)return this._emitError(new Error("Packet too short"));if(A.clientId=b,e("_parseConnect: packet.clientId: %s",A.clientId),m.will){if(A.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(A.will.properties=_)}if(s=this._parseString(),s===null)return this._emitError(new Error("Cannot parse will topic"));if(A.will.topic=s,e("_parseConnect: packet.will.topic: %s",A.will.topic),u=this._parseBuffer(),u===null)return this._emitError(new Error("Cannot parse will payload"));A.will.payload=u,e("_parseConnect: packet.will.paylaod: %s",A.will.payload)}if(m.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));A.username=p,e("_parseConnect: packet.username: %s",A.username)}if(m.password){if(d=this._parseBuffer(),d===null)return this._emitError(new Error("Cannot parse password"));A.password=d}return this.settings=A,e("_parseConnect: complete"),A}_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,m,A,y,w;if(s.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let C=this._parseProperties();Object.getOwnPropertyNames(C).length&&(s.properties=C)}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(y=(d>>r.SUBSCRIBE_OPTIONS_NL_SHIFT&r.SUBSCRIBE_OPTIONS_NL_MASK)!==0,A=(d>>r.SUBSCRIBE_OPTIONS_RAP_SHIFT&r.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,m=d>>r.SUBSCRIBE_OPTIONS_RH_SHIFT&r.SUBSCRIBE_OPTIONS_RH_MASK,m>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));w={topic:u,qos:p},this.settings.protocolVersion===5?(w.nl=y,w.rap=A,w.rh=m):this.settings.bridgeMode&&(w.rh=0,w.rap=!0,w.nl=!0),e("_parseSubscribe: push subscription `%s` to subscription",w),s.subscriptions.push(w)}}}_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,m=0,A=!1,y,w=this._pos?this._pos:0;for(;d<u&&w+d<this._list.length;){if(y=this._list.readUInt8(w+d++),m+=p*(y&r.VARBYTEINT_MASK),p*=128,(y&r.VARBYTEINT_FIN_MASK)===0){A=!0;break}if(this._list.length<=d)break}return!A&&d===u&&this._list.length>=d&&this._emitError(new Error("Invalid variable byte integer")),w&&(this._pos+=d),A?s?A={bytes:d,value:m}:A=m:A=!1,e("_parseVarByteNum: result: %o",A),A}_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 m=r.propertiesCodes[p];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m==="userProperties"){d[m]||(d[m]=Object.create(null));let A=this._parseByType(r.propertiesTypes[m]);if(d[m][A.name])if(Array.isArray(d[m][A.name]))d[m][A.name].push(A.value);else{let y=d[m][A.name];d[m][A.name]=[y],d[m][A.name].push(A.value)}else d[m][A.name]=A.value;continue}d[m]?Array.isArray(d[m])?d[m].push(this._parseByType(r.propertiesTypes[m])):(d[m]=[d[m]],d[m].push(this._parseByType(r.propertiesTypes[m]))):d[m]=this._parseByType(r.propertiesTypes[m])}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}),nu=Ae((o,h)=>{ce(),fe(),he();var{Buffer:i}=(Xe(),Le(Ze)),a=65536,l={},r=i.isBuffer(i.from([1,2]).subarray(0,1));function e(u){let d=i.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,m=i.allocUnsafe(4);do d=u%128|0,u=u/128|0,u>0&&(d=d|128),m.writeUInt8(d,p++);while(u>0&&p<4);return u>0&&(p=0),r?m.subarray(0,p):m.slice(0,p)}function s(u){let d=i.allocUnsafe(4);return d.writeUInt32BE(u,0),d}h.exports={cache:l,generateCache:n,generateNumber:e,genBufVariableByteInt:t,generate4ByteBuffer:s}}),iu=Ae((o,h)=>{ce(),fe(),he(),typeof De>"u"||!De.version||De.version.indexOf("v0.")===0||De.version.indexOf("v1.")===0&&De.version.indexOf("v1.8.")!==0?h.exports={nextTick:i}:h.exports=De;function i(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 De.nextTick(a);case 2:return De.nextTick(function(){a.call(null,l)});case 3:return De.nextTick(function(){a.call(null,l,r)});case 4:return De.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 De.nextTick(function(){a.apply(null,t)})}}}),Jo=Ae((o,h)=>{ce(),fe(),he();var i=Yo(),{Buffer:a}=(Xe(),Le(Ze)),l=a.allocUnsafe(0),r=a.from([0]),e=nu(),n=iu().nextTick,t=Ct()("mqtt-packet:writeToStream"),s=e.cache,u=e.generateNumber,d=e.generateCache,p=e.genBufVariableByteInt,m=e.generate4ByteBuffer,A=pe,y=!0;function w(q,D,ee){switch(t("generate called"),D.cork&&(D.cork(),n(C,D)),y&&(y=!1,d()),t("generate: packet.cmd: %s",q.cmd),q.cmd){case"connect":return b(q,D);case"connack":return _(q,D,ee);case"publish":return N(q,D,ee);case"puback":case"pubrec":case"pubrel":case"pubcomp":return M(q,D,ee);case"subscribe":return k(q,D,ee);case"suback":return T(q,D,ee);case"unsubscribe":return U(q,D,ee);case"unsuback":return J(q,D,ee);case"pingreq":case"pingresp":return X(q,D);case"disconnect":return le(q,D,ee);case"auth":return P(q,D,ee);default:return D.destroy(new Error("Unknown command")),!1}}Object.defineProperty(w,"cacheNumbers",{get(){return A===pe},set(q){q?((!s||Object.keys(s).length===0)&&(y=!0),A=pe):(y=!1,A=me)}});function C(q){q.uncork()}function b(q,D,ee){let Q=q||{},K=Q.protocolId||"MQTT",H=Q.protocolVersion||4,ae=Q.will,ie=Q.clean,R=Q.keepalive||0,j=Q.clientId||"",Y=Q.username,oe=Q.password,re=Q.properties;ie===void 0&&(ie=!0);let ue=0;if(typeof K!="string"&&!a.isBuffer(K))return D.destroy(new Error("Invalid protocolId")),!1;if(ue+=K.length+2,H!==3&&H!==4&&H!==5)return D.destroy(new Error("Invalid protocol version")),!1;if(ue+=1,(typeof j=="string"||a.isBuffer(j))&&(j||H>=4)&&(j||ie))ue+=a.byteLength(j)+2;else{if(H<4)return D.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(ie*1===0)return D.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof R!="number"||R<0||R>65535||R%1!==0)return D.destroy(new Error("Invalid keepalive")),!1;ue+=2,ue+=1;let W,se;if(H===5){if(W=de(D,re),!W)return!1;ue+=W.length}if(ae){if(typeof ae!="object")return D.destroy(new Error("Invalid will")),!1;if(!ae.topic||typeof ae.topic!="string")return D.destroy(new Error("Invalid will topic")),!1;if(ue+=a.byteLength(ae.topic)+2,ue+=2,ae.payload)if(ae.payload.length>=0)typeof ae.payload=="string"?ue+=a.byteLength(ae.payload):ue+=ae.payload.length;else return D.destroy(new Error("Invalid will payload")),!1;if(se={},H===5){if(se=de(D,ae.properties),!se)return!1;ue+=se.length}}let we=!1;if(Y!=null)if(Ce(Y))we=!0,ue+=a.byteLength(Y)+2;else return D.destroy(new Error("Invalid username")),!1;if(oe!=null){if(!we)return D.destroy(new Error("Username is required to use password")),!1;if(Ce(oe))ue+=F(oe)+2;else return D.destroy(new Error("Invalid password")),!1}D.write(i.CONNECT_HEADER),Z(D,ue),z(D,K),Q.bridgeMode&&(H+=128),D.write(H===131?i.VERSION131:H===132?i.VERSION132:H===4?i.VERSION4:H===5?i.VERSION5:i.VERSION3);let te=0;return te|=Y!=null?i.USERNAME_MASK:0,te|=oe!=null?i.PASSWORD_MASK:0,te|=ae&&ae.retain?i.WILL_RETAIN_MASK:0,te|=ae&&ae.qos?ae.qos<<i.WILL_QOS_SHIFT:0,te|=ae?i.WILL_FLAG_MASK:0,te|=ie?i.CLEAN_SESSION_MASK:0,D.write(a.from([te])),A(D,R),H===5&&W.write(),z(D,j),ae&&(H===5&&se.write(),V(D,ae.topic),z(D,ae.payload)),Y!=null&&z(D,Y),oe!=null&&z(D,oe),!0}function _(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=Q===5?K.reasonCode:K.returnCode,ae=K.properties,ie=2;if(typeof H!="number")return D.destroy(new Error("Invalid return code")),!1;let R=null;if(Q===5){if(R=de(D,ae),!R)return!1;ie+=R.length}return D.write(i.CONNACK_HEADER),Z(D,ie),D.write(K.sessionPresent?i.SESSIONPRESENT_HEADER:r),D.write(a.from([H])),R==null||R.write(),!0}function N(q,D,ee){t("publish: packet: %o",q);let Q=ee?ee.protocolVersion:4,K=q||{},H=K.qos||0,ae=K.retain?i.RETAIN_MASK:0,ie=K.topic,R=K.payload||l,j=K.messageId,Y=K.properties,oe=0;if(typeof ie=="string")oe+=a.byteLength(ie)+2;else if(a.isBuffer(ie))oe+=ie.length+2;else return D.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(R)?oe+=R.length:oe+=a.byteLength(R),H&&typeof j!="number")return D.destroy(new Error("Invalid messageId")),!1;H&&(oe+=2);let re=null;if(Q===5){if(re=de(D,Y),!re)return!1;oe+=re.length}return D.write(i.PUBLISH_HEADER[H][K.dup?1:0][ae?1:0]),Z(D,oe),A(D,F(ie)),D.write(ie),H>0&&A(D,j),re==null||re.write(),t("publish: payload: %o",R),D.write(R)}function M(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.cmd||"puback",ae=K.messageId,ie=K.dup&&H==="pubrel"?i.DUP_MASK:0,R=0,j=K.reasonCode,Y=K.properties,oe=Q===5?3:2;if(H==="pubrel"&&(R=1),typeof ae!="number")return D.destroy(new Error("Invalid messageId")),!1;let re=null;if(Q===5&&typeof Y=="object"){if(re=x(D,Y,ee,oe),!re)return!1;oe+=re.length}return D.write(i.ACKS[H][R][ie][0]),oe===3&&(oe+=j!==0?1:-1),Z(D,oe),A(D,ae),Q===5&&oe!==2&&D.write(a.from([j])),re!==null?re.write():oe===4&&D.write(a.from([0])),!0}function k(q,D,ee){t("subscribe: packet: ");let Q=ee?ee.protocolVersion:4,K=q||{},H=K.dup?i.DUP_MASK:0,ae=K.messageId,ie=K.subscriptions,R=K.properties,j=0;if(typeof ae!="number")return D.destroy(new Error("Invalid messageId")),!1;j+=2;let Y=null;if(Q===5){if(Y=de(D,R),!Y)return!1;j+=Y.length}if(typeof ie=="object"&&ie.length)for(let re=0;re<ie.length;re+=1){let ue=ie[re].topic,W=ie[re].qos;if(typeof ue!="string")return D.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof W!="number")return D.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(Q===5){if(typeof(ie[re].nl||!1)!="boolean")return D.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ie[re].rap||!1)!="boolean")return D.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let se=ie[re].rh||0;if(typeof se!="number"||se>2)return D.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}j+=a.byteLength(ue)+2+1}else return D.destroy(new Error("Invalid subscriptions")),!1;t("subscribe: writing to stream: %o",i.SUBSCRIBE_HEADER),D.write(i.SUBSCRIBE_HEADER[1][H?1:0][0]),Z(D,j),A(D,ae),Y!==null&&Y.write();let oe=!0;for(let re of ie){let ue=re.topic,W=re.qos,se=+re.nl,we=+re.rap,te=re.rh,Pe;V(D,ue),Pe=i.SUBSCRIBE_OPTIONS_QOS[W],Q===5&&(Pe|=se?i.SUBSCRIBE_OPTIONS_NL:0,Pe|=we?i.SUBSCRIBE_OPTIONS_RAP:0,Pe|=te?i.SUBSCRIBE_OPTIONS_RH[te]:0),oe=D.write(a.from([Pe]))}return oe}function T(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.messageId,ae=K.granted,ie=K.properties,R=0;if(typeof H!="number")return D.destroy(new Error("Invalid messageId")),!1;if(R+=2,typeof ae=="object"&&ae.length)for(let Y=0;Y<ae.length;Y+=1){if(typeof ae[Y]!="number")return D.destroy(new Error("Invalid qos vector")),!1;R+=1}else return D.destroy(new Error("Invalid qos vector")),!1;let j=null;if(Q===5){if(j=x(D,ie,ee,R),!j)return!1;R+=j.length}return D.write(i.SUBACK_HEADER),Z(D,R),A(D,H),j!==null&&j.write(),D.write(a.from(ae))}function U(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.messageId,ae=K.dup?i.DUP_MASK:0,ie=K.unsubscriptions,R=K.properties,j=0;if(typeof H!="number")return D.destroy(new Error("Invalid messageId")),!1;if(j+=2,typeof ie=="object"&&ie.length)for(let re=0;re<ie.length;re+=1){if(typeof ie[re]!="string")return D.destroy(new Error("Invalid unsubscriptions")),!1;j+=a.byteLength(ie[re])+2}else return D.destroy(new Error("Invalid unsubscriptions")),!1;let Y=null;if(Q===5){if(Y=de(D,R),!Y)return!1;j+=Y.length}D.write(i.UNSUBSCRIBE_HEADER[1][ae?1:0][0]),Z(D,j),A(D,H),Y!==null&&Y.write();let oe=!0;for(let re=0;re<ie.length;re++)oe=V(D,ie[re]);return oe}function J(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.messageId,ae=K.dup?i.DUP_MASK:0,ie=K.granted,R=K.properties,j=K.cmd,Y=0,oe=2;if(typeof H!="number")return D.destroy(new Error("Invalid messageId")),!1;if(Q===5)if(typeof ie=="object"&&ie.length)for(let ue=0;ue<ie.length;ue+=1){if(typeof ie[ue]!="number")return D.destroy(new Error("Invalid qos vector")),!1;oe+=1}else return D.destroy(new Error("Invalid qos vector")),!1;let re=null;if(Q===5){if(re=x(D,R,ee,oe),!re)return!1;oe+=re.length}return D.write(i.ACKS[j][Y][ae][0]),Z(D,oe),A(D,H),re!==null&&re.write(),Q===5&&D.write(a.from(ie)),!0}function X(q,D,ee){return D.write(i.EMPTY[q.cmd])}function le(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.reasonCode,ae=K.properties,ie=Q===5?1:0,R=null;if(Q===5){if(R=x(D,ae,ee,ie),!R)return!1;ie+=R.length}return D.write(a.from([i.codes.disconnect<<4])),Z(D,ie),Q===5&&D.write(a.from([H])),R!==null&&R.write(),!0}function P(q,D,ee){let Q=ee?ee.protocolVersion:4,K=q||{},H=K.reasonCode,ae=K.properties,ie=Q===5?1:0;Q!==5&&D.destroy(new Error("Invalid mqtt version for auth packet"));let R=x(D,ae,ee,ie);return R?(ie+=R.length,D.write(a.from([i.codes.auth<<4])),Z(D,ie),D.write(a.from([H])),R!==null&&R.write(),!0):!1}var G={};function Z(q,D){if(D>i.VARBYTEINT_MAX)return q.destroy(new Error(`Invalid variable byte integer: ${D}`)),!1;let ee=G[D];return ee||(ee=p(D),D<16384&&(G[D]=ee)),t("writeVarByteInt: writing to stream: %o",ee),q.write(ee)}function V(q,D){let ee=a.byteLength(D);return A(q,ee),t("writeString: %s",D),q.write(D,"utf8")}function be(q,D,ee){V(q,D),V(q,ee)}function pe(q,D){return t("writeNumberCached: number: %d",D),t("writeNumberCached: %o",s[D]),q.write(s[D])}function me(q,D){let ee=u(D);return t("writeNumberGenerated: %o",ee),q.write(ee)}function ve(q,D){let ee=m(D);return t("write4ByteNumber: %o",ee),q.write(ee)}function z(q,D){typeof D=="string"?V(q,D):D?(A(q,D.length),q.write(D)):A(q,0)}function de(q,D){if(typeof D!="object"||D.length!=null)return{length:1,write(){ge(q,{},0)}};let ee=0;function Q(K,H){let ae=i.propertiesTypes[K],ie=0;switch(ae){case"byte":{if(typeof H!="boolean")return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=2;break}case"int8":{if(typeof H!="number"||H<0||H>255)return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=2;break}case"binary":{if(H&&H===null)return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=1+a.byteLength(H)+2;break}case"int16":{if(typeof H!="number"||H<0||H>65535)return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=3;break}case"int32":{if(typeof H!="number"||H<0||H>4294967295)return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=5;break}case"var":{if(typeof H!="number"||H<0||H>268435455)return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=1+a.byteLength(p(H));break}case"string":{if(typeof H!="string")return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=3+a.byteLength(H.toString());break}case"pair":{if(typeof H!="object")return q.destroy(new Error(`Invalid ${K}: ${H}`)),!1;ie+=Object.getOwnPropertyNames(H).reduce((R,j)=>{let Y=H[j];return Array.isArray(Y)?R+=Y.reduce((oe,re)=>(oe+=3+a.byteLength(j.toString())+2+a.byteLength(re.toString()),oe),0):R+=3+a.byteLength(j.toString())+2+a.byteLength(H[j].toString()),R},0);break}default:return q.destroy(new Error(`Invalid property ${K}: ${H}`)),!1}return ie}if(D)for(let K in D){let H=0,ae=0,ie=D[K];if(ie!==void 0){if(Array.isArray(ie))for(let R=0;R<ie.length;R++){if(ae=Q(K,ie[R]),!ae)return!1;H+=ae}else{if(ae=Q(K,ie),!ae)return!1;H=ae}if(!H)return!1;ee+=H}}return{length:a.byteLength(p(ee))+ee,write(){ge(q,D,ee)}}}function x(q,D,ee,Q){let K=["reasonString","userProperties"],H=ee&&ee.properties&&ee.properties.maximumPacketSize?ee.properties.maximumPacketSize:0,ae=de(q,D);if(H)for(;Q+ae.length>H;){let ie=K.shift();if(ie&&D[ie])delete D[ie],ae=de(q,D);else return!1}return ae}function ne(q,D,ee){switch(i.propertiesTypes[D]){case"byte":{q.write(a.from([i.properties[D]])),q.write(a.from([+ee]));break}case"int8":{q.write(a.from([i.properties[D]])),q.write(a.from([ee]));break}case"binary":{q.write(a.from([i.properties[D]])),z(q,ee);break}case"int16":{q.write(a.from([i.properties[D]])),A(q,ee);break}case"int32":{q.write(a.from([i.properties[D]])),ve(q,ee);break}case"var":{q.write(a.from([i.properties[D]])),Z(q,ee);break}case"string":{q.write(a.from([i.properties[D]])),V(q,ee);break}case"pair":{Object.getOwnPropertyNames(ee).forEach(Q=>{let K=ee[Q];Array.isArray(K)?K.forEach(H=>{q.write(a.from([i.properties[D]])),be(q,Q.toString(),H.toString())}):(q.write(a.from([i.properties[D]])),be(q,Q.toString(),K.toString()))});break}default:return q.destroy(new Error(`Invalid property ${D} value: ${ee}`)),!1}}function ge(q,D,ee){Z(q,ee);for(let Q in D)if(Object.prototype.hasOwnProperty.call(D,Q)&&D[Q]!=null){let K=D[Q];if(Array.isArray(K))for(let H=0;H<K.length;H++)ne(q,Q,K[H]);else ne(q,Q,K)}}function F(q){return q?q instanceof a?q.length:a.byteLength(q):0}function Ce(q){return typeof q=="string"||q instanceof a}h.exports=w}),ou=Ae((o,h)=>{ce(),fe(),he();var i=Jo(),{EventEmitter:a}=(Qt(),Le(Rt)),{Buffer:l}=(Xe(),Le(Ze));function r(n,t){let s=new e;return i(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}),su=Ae(o=>{ce(),fe(),he(),o.parser=ru().parser,o.generate=ou(),o.writeToStream=Jo()}),Zo=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let i=this.nextId++;return this.nextId===65536&&(this.nextId=1),i}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(i){return!0}deallocate(i){}clear(){}};o.default=h}),au=Ae((o,h)=>{ce(),fe(),he(),h.exports=a;function i(r){return r instanceof vr?vr.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 m=Object.keys(d),A=new Array(m.length);for(let y=0;y<m.length;y++){let w=m[y],C=d[w];typeof C!="object"||C===null?A[w]=C:C.constructor!==Object&&(n=e.get(C.constructor))?A[w]=n(C,p):ArrayBuffer.isView(C)?A[w]=i(C):A[w]=p(C)}return A}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 m in d){if(Object.hasOwnProperty.call(d,m)===!1)continue;let A=d[m];typeof A!="object"||A===null?p[m]=A:A.constructor!==Object&&(n=e.get(A.constructor))?p[m]=n(A,s):ArrayBuffer.isView(A)?p[m]=i(A):p[m]=s(A)}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 m in d){let A=d[m];typeof A!="object"||A===null?p[m]=A:A.constructor!==Object&&(n=e.get(A.constructor))?p[m]=n(A,u):ArrayBuffer.isView(A)?p[m]=i(A):p[m]=u(A)}return p}}function l(r){let e=[],n=[],t=new Map;if(t.set(Date,m=>new Date(m)),t.set(Map,(m,A)=>new Map(u(Array.from(m),A))),t.set(Set,(m,A)=>new Set(u(Array.from(m),A))),r.constructorHandlers)for(let m of r.constructorHandlers)t.set(m[0],m[1]);let s=null;return r.proto?p:d;function u(m,A){let y=Object.keys(m),w=new Array(y.length);for(let C=0;C<y.length;C++){let b=y[C],_=m[b];if(typeof _!="object"||_===null)w[b]=_;else if(_.constructor!==Object&&(s=t.get(_.constructor)))w[b]=s(_,A);else if(ArrayBuffer.isView(_))w[b]=i(_);else{let N=e.indexOf(_);N!==-1?w[b]=n[N]:w[b]=A(_)}}return w}function d(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return u(m,d);if(m.constructor!==Object&&(s=t.get(m.constructor)))return s(m,d);let A={};e.push(m),n.push(A);for(let y in m){if(Object.hasOwnProperty.call(m,y)===!1)continue;let w=m[y];if(typeof w!="object"||w===null)A[y]=w;else if(w.constructor!==Object&&(s=t.get(w.constructor)))A[y]=s(w,d);else if(ArrayBuffer.isView(w))A[y]=i(w);else{let C=e.indexOf(w);C!==-1?A[y]=n[C]:A[y]=d(w)}}return e.pop(),n.pop(),A}function p(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return u(m,p);if(m.constructor!==Object&&(s=t.get(m.constructor)))return s(m,p);let A={};e.push(m),n.push(A);for(let y in m){let w=m[y];if(typeof w!="object"||w===null)A[y]=w;else if(w.constructor!==Object&&(s=t.get(w.constructor)))A[y]=s(w,p);else if(ArrayBuffer.isView(w))A[y]=i(w);else{let C=e.indexOf(w);C!==-1?A[y]=n[C]:A[y]=p(w)}}return e.pop(),n.pop(),A}}}),lu=Ae((o,h)=>{ce(),fe(),he(),h.exports=au()()}),uu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0}),o.validateTopic=h,o.validateTopics=i;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 i(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}}),Xo=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=Ht(),i={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(i),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()}};o.default=l}),cu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=[0,16,128,131,135,144,145,151,153],i=(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,m=>{if(m)return r&&r(m);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}};o.default=i}),hu=Ae((o,h)=>{h.exports={version:"5.13.1"}}),ir=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0}),o.MQTTJS_VERSION=o.nextTick=o.ErrorWithSubackPacket=o.ErrorWithReasonCode=void 0,o.applyMixin=a;var h=class ba extends Error{constructor(r,e){super(r),this.code=e,Object.setPrototypeOf(this,ba.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};o.ErrorWithReasonCode=h;var i=class wa extends Error{constructor(r,e){super(r),this.packet=e,Object.setPrototypeOf(this,wa.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};o.ErrorWithSubackPacket=i;function a(l,r,e=!1){var n;let t=[r];for(;;){let s=t[0],u=Object.getPrototypeOf(s);if(u!=null&&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))}o.nextTick=typeof(De==null?void 0:De.nextTick)=="function"?De.nextTick:l=>{setTimeout(l,0)},o.MQTTJS_VERSION=hu().version}),kr=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0}),o.ReasonCodes=void 0;var h=ir();o.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 i=(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: ${o.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: ${o.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: ${o.ReasonCodes[p]}`),s.code=p;let m=a.messageIdToTopic[r];m&&m.forEach(A=>{delete a._resubscribeTopics[A]})}}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")};o.default=i}),fu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=ir(),i=kr(),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: ${i.ReasonCodes[t]}`,t);l.emit("error",d)}})};o.default=a}),du=Ae(o=>{var m,A,y,w,C,b,_,N,M,k,T,U,J,X,le,P,G,Z,V,be,pe,me,ve,z,de,x,ne,ge,F,Di,q,D,ee,Q,ya,H,ae,ie,Lt,Nt,Li,Fr,jr,We,Ni,gr,Ft,Fi,Pe;ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0}),o.LRUCache=void 0;var h=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,i=new Set,a=typeof De=="object"&&De?De:{},l=(c,f,g,v)=>{typeof a.emitWarning=="function"?a.emitWarning(c,f,g,v):console.error(`[${g}] ${f}: ${c}`)},r=globalThis.AbortController,e=globalThis.AbortSignal;if(typeof r>"u"){e=class{constructor(){He(this,"onabort");He(this,"_onabort",[]);He(this,"reason");He(this,"aborted",!1)}addEventListener(g,v){this._onabort.push(v)}},r=class{constructor(){He(this,"signal",new e);f()}abort(g){var v,I;if(!this.signal.aborted){this.signal.reason=g,this.signal.aborted=!0;for(let L of this.signal._onabort)L(g);(I=(v=this.signal).onabort)==null||I.call(v,g)}}};let c=((m=a.env)==null?void 0:m.LRU_CACHE_IGNORE_AC_WARNING)!=="1",f=()=>{c&&(c=!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=c=>!i.has(c),t=c=>c&&c===Math.floor(c)&&c>0&&isFinite(c),s=c=>t(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(c){super(c),this.fill(0)}},d=(A=class{constructor(f,g){He(this,"heap");He(this,"length");if(!B(A,y))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new g(f),this.length=0}static create(f){let g=s(f);if(!g)return[];Oe(A,y,!0);let v=new A(f,g);return Oe(A,y,!1),v}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},y=new WeakMap,Ue(A,y,!1),A),p=(Pe=class{constructor(f){Ue(this,F);Ue(this,b);Ue(this,_);Ue(this,N);Ue(this,M);Ue(this,k);Ue(this,T);He(this,"ttl");He(this,"ttlResolution");He(this,"ttlAutopurge");He(this,"updateAgeOnGet");He(this,"updateAgeOnHas");He(this,"allowStale");He(this,"noDisposeOnSet");He(this,"noUpdateTTL");He(this,"maxEntrySize");He(this,"sizeCalculation");He(this,"noDeleteOnFetchRejection");He(this,"noDeleteOnStaleGet");He(this,"allowStaleOnFetchAbort");He(this,"allowStaleOnFetchRejection");He(this,"ignoreFetchAbort");Ue(this,U);Ue(this,J);Ue(this,X);Ue(this,le);Ue(this,P);Ue(this,G);Ue(this,Z);Ue(this,V);Ue(this,be);Ue(this,pe);Ue(this,me);Ue(this,ve);Ue(this,z);Ue(this,de);Ue(this,x);Ue(this,ne);Ue(this,ge);Ue(this,q,()=>{});Ue(this,D,()=>{});Ue(this,ee,()=>{});Ue(this,Q,()=>!1);Ue(this,H,f=>{});Ue(this,ae,(f,g,v)=>{});Ue(this,ie,(f,g,v,I)=>{if(v||I)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});He(this,w,"LRUCache");let{max:g=0,ttl:v,ttlResolution:I=1,ttlAutopurge:L,updateAgeOnGet:$,updateAgeOnHas:_e,allowStale:Ee,dispose:Be,disposeAfter:Me,noDisposeOnSet:xe,noUpdateTTL:bt,maxSize:lt=0,maxEntrySize:ct=0,sizeCalculation:Ke,fetchMethod:et,memoMethod:Re,noDeleteOnFetchRejection:je,noDeleteOnStaleGet:rt,allowStaleOnFetchRejection:Je,allowStaleOnFetchAbort:st,ignoreFetchAbort:Dt}=f;if(g!==0&&!t(g))throw new TypeError("max option must be a nonnegative integer");let S=g?s(g):Array;if(!S)throw new Error("invalid max value: "+g);if(Oe(this,b,g),Oe(this,_,lt),this.maxEntrySize=ct||B(this,_),this.sizeCalculation=Ke,this.sizeCalculation){if(!B(this,_)&&!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(Re!==void 0&&typeof Re!="function")throw new TypeError("memoMethod must be a function if defined");if(Oe(this,T,Re),et!==void 0&&typeof et!="function")throw new TypeError("fetchMethod must be a function if specified");if(Oe(this,k,et),Oe(this,ne,!!et),Oe(this,X,new Map),Oe(this,le,new Array(g).fill(void 0)),Oe(this,P,new Array(g).fill(void 0)),Oe(this,G,new S(g)),Oe(this,Z,new S(g)),Oe(this,V,0),Oe(this,be,0),Oe(this,pe,d.create(g)),Oe(this,U,0),Oe(this,J,0),typeof Be=="function"&&Oe(this,N,Be),typeof Me=="function"?(Oe(this,M,Me),Oe(this,me,[])):(Oe(this,M,void 0),Oe(this,me,void 0)),Oe(this,x,!!B(this,N)),Oe(this,ge,!!B(this,M)),this.noDisposeOnSet=!!xe,this.noUpdateTTL=!!bt,this.noDeleteOnFetchRejection=!!je,this.allowStaleOnFetchRejection=!!Je,this.allowStaleOnFetchAbort=!!st,this.ignoreFetchAbort=!!Dt,this.maxEntrySize!==0){if(B(this,_)!==0&&!t(B(this,_)))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");ke(this,F,ya).call(this)}if(this.allowStale=!!Ee,this.noDeleteOnStaleGet=!!rt,this.updateAgeOnGet=!!$,this.updateAgeOnHas=!!_e,this.ttlResolution=t(I)||I===0?I:1,this.ttlAutopurge=!!L,this.ttl=v||0,this.ttl){if(!t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ke(this,F,Di).call(this)}if(B(this,b)===0&&this.ttl===0&&B(this,_)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!B(this,b)&&!B(this,_)){let O="LRU_CACHE_UNBOUNDED";n(O)&&(i.add(O),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,Pe))}}static unsafeExposeInternals(f){return{starts:B(f,z),ttls:B(f,de),sizes:B(f,ve),keyMap:B(f,X),keyList:B(f,le),valList:B(f,P),next:B(f,G),prev:B(f,Z),get head(){return B(f,V)},get tail(){return B(f,be)},free:B(f,pe),isBackgroundFetch:g=>{var v;return ke(v=f,F,We).call(v,g)},backgroundFetch:(g,v,I,L)=>{var $;return ke($=f,F,jr).call($,g,v,I,L)},moveToTail:g=>{var v;return ke(v=f,F,gr).call(v,g)},indexes:g=>{var v;return ke(v=f,F,Lt).call(v,g)},rindexes:g=>{var v;return ke(v=f,F,Nt).call(v,g)},isStale:g=>{var v;return B(v=f,Q).call(v,g)}}}get max(){return B(this,b)}get maxSize(){return B(this,_)}get calculatedSize(){return B(this,J)}get size(){return B(this,U)}get fetchMethod(){return B(this,k)}get memoMethod(){return B(this,T)}get dispose(){return B(this,N)}get disposeAfter(){return B(this,M)}getRemainingTTL(f){return B(this,X).has(f)?1/0:0}*entries(){for(let f of ke(this,F,Lt).call(this))B(this,P)[f]!==void 0&&B(this,le)[f]!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield[B(this,le)[f],B(this,P)[f]])}*rentries(){for(let f of ke(this,F,Nt).call(this))B(this,P)[f]!==void 0&&B(this,le)[f]!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield[B(this,le)[f],B(this,P)[f]])}*keys(){for(let f of ke(this,F,Lt).call(this)){let g=B(this,le)[f];g!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield g)}}*rkeys(){for(let f of ke(this,F,Nt).call(this)){let g=B(this,le)[f];g!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield g)}}*values(){for(let f of ke(this,F,Lt).call(this))B(this,P)[f]!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield B(this,P)[f])}*rvalues(){for(let f of ke(this,F,Nt).call(this))B(this,P)[f]!==void 0&&!ke(this,F,We).call(this,B(this,P)[f])&&(yield B(this,P)[f])}[(C=Symbol.iterator,w=Symbol.toStringTag,C)](){return this.entries()}find(f,g={}){for(let v of ke(this,F,Lt).call(this)){let I=B(this,P)[v],L=ke(this,F,We).call(this,I)?I.__staleWhileFetching:I;if(L!==void 0&&f(L,B(this,le)[v],this))return this.get(B(this,le)[v],g)}}forEach(f,g=this){for(let v of ke(this,F,Lt).call(this)){let I=B(this,P)[v],L=ke(this,F,We).call(this,I)?I.__staleWhileFetching:I;L!==void 0&&f.call(g,L,B(this,le)[v],this)}}rforEach(f,g=this){for(let v of ke(this,F,Nt).call(this)){let I=B(this,P)[v],L=ke(this,F,We).call(this,I)?I.__staleWhileFetching:I;L!==void 0&&f.call(g,L,B(this,le)[v],this)}}purgeStale(){let f=!1;for(let g of ke(this,F,Nt).call(this,{allowStale:!0}))B(this,Q).call(this,g)&&(ke(this,F,Ft).call(this,B(this,le)[g],"expire"),f=!0);return f}info(f){let g=B(this,X).get(f);if(g===void 0)return;let v=B(this,P)[g],I=ke(this,F,We).call(this,v)?v.__staleWhileFetching:v;if(I===void 0)return;let L={value:I};if(B(this,de)&&B(this,z)){let $=B(this,de)[g],_e=B(this,z)[g];if($&&_e){let Ee=$-(h.now()-_e);L.ttl=Ee,L.start=Date.now()}}return B(this,ve)&&(L.size=B(this,ve)[g]),L}dump(){let f=[];for(let g of ke(this,F,Lt).call(this,{allowStale:!0})){let v=B(this,le)[g],I=B(this,P)[g],L=ke(this,F,We).call(this,I)?I.__staleWhileFetching:I;if(L===void 0||v===void 0)continue;let $={value:L};if(B(this,de)&&B(this,z)){$.ttl=B(this,de)[g];let _e=h.now()-B(this,z)[g];$.start=Math.floor(Date.now()-_e)}B(this,ve)&&($.size=B(this,ve)[g]),f.unshift([v,$])}return f}load(f){this.clear();for(let[g,v]of f){if(v.start){let I=Date.now()-v.start;v.start=h.now()-I}this.set(g,v.value,v)}}set(f,g,v={}){var bt,lt,ct,Ke,et;if(g===void 0)return this.delete(f),this;let{ttl:I=this.ttl,start:L,noDisposeOnSet:$=this.noDisposeOnSet,sizeCalculation:_e=this.sizeCalculation,status:Ee}=v,{noUpdateTTL:Be=this.noUpdateTTL}=v,Me=B(this,ie).call(this,f,g,v.size||0,_e);if(this.maxEntrySize&&Me>this.maxEntrySize)return Ee&&(Ee.set="miss",Ee.maxEntrySizeExceeded=!0),ke(this,F,Ft).call(this,f,"set"),this;let xe=B(this,U)===0?void 0:B(this,X).get(f);if(xe===void 0)xe=B(this,U)===0?B(this,be):B(this,pe).length!==0?B(this,pe).pop():B(this,U)===B(this,b)?ke(this,F,Fr).call(this,!1):B(this,U),B(this,le)[xe]=f,B(this,P)[xe]=g,B(this,X).set(f,xe),B(this,G)[B(this,be)]=xe,B(this,Z)[xe]=B(this,be),Oe(this,be,xe),Nr(this,U)._++,B(this,ae).call(this,xe,Me,Ee),Ee&&(Ee.set="add"),Be=!1;else{ke(this,F,gr).call(this,xe);let Re=B(this,P)[xe];if(g!==Re){if(B(this,ne)&&ke(this,F,We).call(this,Re)){Re.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:je}=Re;je!==void 0&&!$&&(B(this,x)&&((bt=B(this,N))==null||bt.call(this,je,f,"set")),B(this,ge)&&((lt=B(this,me))==null||lt.push([je,f,"set"])))}else $||(B(this,x)&&((ct=B(this,N))==null||ct.call(this,Re,f,"set")),B(this,ge)&&((Ke=B(this,me))==null||Ke.push([Re,f,"set"])));if(B(this,H).call(this,xe),B(this,ae).call(this,xe,Me,Ee),B(this,P)[xe]=g,Ee){Ee.set="replace";let je=Re&&ke(this,F,We).call(this,Re)?Re.__staleWhileFetching:Re;je!==void 0&&(Ee.oldValue=je)}}else Ee&&(Ee.set="update")}if(I!==0&&!B(this,de)&&ke(this,F,Di).call(this),B(this,de)&&(Be||B(this,ee).call(this,xe,I,L),Ee&&B(this,D).call(this,Ee,xe)),!$&&B(this,ge)&&B(this,me)){let Re=B(this,me),je;for(;je=Re==null?void 0:Re.shift();)(et=B(this,M))==null||et.call(this,...je)}return this}pop(){var f;try{for(;B(this,U);){let g=B(this,P)[B(this,V)];if(ke(this,F,Fr).call(this,!0),ke(this,F,We).call(this,g)){if(g.__staleWhileFetching)return g.__staleWhileFetching}else if(g!==void 0)return g}}finally{if(B(this,ge)&&B(this,me)){let g=B(this,me),v;for(;v=g==null?void 0:g.shift();)(f=B(this,M))==null||f.call(this,...v)}}}has(f,g={}){let{updateAgeOnHas:v=this.updateAgeOnHas,status:I}=g,L=B(this,X).get(f);if(L!==void 0){let $=B(this,P)[L];if(ke(this,F,We).call(this,$)&&$.__staleWhileFetching===void 0)return!1;if(B(this,Q).call(this,L))I&&(I.has="stale",B(this,D).call(this,I,L));else return v&&B(this,q).call(this,L),I&&(I.has="hit",B(this,D).call(this,I,L)),!0}else I&&(I.has="miss");return!1}peek(f,g={}){let{allowStale:v=this.allowStale}=g,I=B(this,X).get(f);if(I===void 0||!v&&B(this,Q).call(this,I))return;let L=B(this,P)[I];return ke(this,F,We).call(this,L)?L.__staleWhileFetching:L}async fetch(f,g={}){let{allowStale:v=this.allowStale,updateAgeOnGet:I=this.updateAgeOnGet,noDeleteOnStaleGet:L=this.noDeleteOnStaleGet,ttl:$=this.ttl,noDisposeOnSet:_e=this.noDisposeOnSet,size:Ee=0,sizeCalculation:Be=this.sizeCalculation,noUpdateTTL:Me=this.noUpdateTTL,noDeleteOnFetchRejection:xe=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:bt=this.allowStaleOnFetchRejection,ignoreFetchAbort:lt=this.ignoreFetchAbort,allowStaleOnFetchAbort:ct=this.allowStaleOnFetchAbort,context:Ke,forceRefresh:et=!1,status:Re,signal:je}=g;if(!B(this,ne))return Re&&(Re.fetch="get"),this.get(f,{allowStale:v,updateAgeOnGet:I,noDeleteOnStaleGet:L,status:Re});let rt={allowStale:v,updateAgeOnGet:I,noDeleteOnStaleGet:L,ttl:$,noDisposeOnSet:_e,size:Ee,sizeCalculation:Be,noUpdateTTL:Me,noDeleteOnFetchRejection:xe,allowStaleOnFetchRejection:bt,allowStaleOnFetchAbort:ct,ignoreFetchAbort:lt,status:Re,signal:je},Je=B(this,X).get(f);if(Je===void 0){Re&&(Re.fetch="miss");let st=ke(this,F,jr).call(this,f,Je,rt,Ke);return st.__returned=st}else{let st=B(this,P)[Je];if(ke(this,F,We).call(this,st)){let ye=v&&st.__staleWhileFetching!==void 0;return Re&&(Re.fetch="inflight",ye&&(Re.returnedStale=!0)),ye?st.__staleWhileFetching:st.__returned=st}let Dt=B(this,Q).call(this,Je);if(!et&&!Dt)return Re&&(Re.fetch="hit"),ke(this,F,gr).call(this,Je),I&&B(this,q).call(this,Je),Re&&B(this,D).call(this,Re,Je),st;let S=ke(this,F,jr).call(this,f,Je,rt,Ke),O=S.__staleWhileFetching!==void 0&&v;return Re&&(Re.fetch=Dt?"stale":"refresh",O&&Dt&&(Re.returnedStale=!0)),O?S.__staleWhileFetching:S.__returned=S}}async forceFetch(f,g={}){let v=await this.fetch(f,g);if(v===void 0)throw new Error("fetch() returned undefined");return v}memo(f,g={}){let v=B(this,T);if(!v)throw new Error("no memoMethod provided to constructor");let{context:I,forceRefresh:L,...$}=g,_e=this.get(f,$);if(!L&&_e!==void 0)return _e;let Ee=v(f,_e,{options:$,context:I});return this.set(f,Ee,$),Ee}get(f,g={}){let{allowStale:v=this.allowStale,updateAgeOnGet:I=this.updateAgeOnGet,noDeleteOnStaleGet:L=this.noDeleteOnStaleGet,status:$}=g,_e=B(this,X).get(f);if(_e!==void 0){let Ee=B(this,P)[_e],Be=ke(this,F,We).call(this,Ee);return $&&B(this,D).call(this,$,_e),B(this,Q).call(this,_e)?($&&($.get="stale"),Be?($&&v&&Ee.__staleWhileFetching!==void 0&&($.returnedStale=!0),v?Ee.__staleWhileFetching:void 0):(L||ke(this,F,Ft).call(this,f,"expire"),$&&v&&($.returnedStale=!0),v?Ee:void 0)):($&&($.get="hit"),Be?Ee.__staleWhileFetching:(ke(this,F,gr).call(this,_e),I&&B(this,q).call(this,_e),Ee))}else $&&($.get="miss")}delete(f){return ke(this,F,Ft).call(this,f,"delete")}clear(){return ke(this,F,Fi).call(this,"delete")}},b=new WeakMap,_=new WeakMap,N=new WeakMap,M=new WeakMap,k=new WeakMap,T=new WeakMap,U=new WeakMap,J=new WeakMap,X=new WeakMap,le=new WeakMap,P=new WeakMap,G=new WeakMap,Z=new WeakMap,V=new WeakMap,be=new WeakMap,pe=new WeakMap,me=new WeakMap,ve=new WeakMap,z=new WeakMap,de=new WeakMap,x=new WeakMap,ne=new WeakMap,ge=new WeakMap,F=new WeakSet,Di=function(){let f=new u(B(this,b)),g=new u(B(this,b));Oe(this,de,f),Oe(this,z,g),Oe(this,ee,(L,$,_e=h.now())=>{if(g[L]=$!==0?_e:0,f[L]=$,$!==0&&this.ttlAutopurge){let Ee=setTimeout(()=>{B(this,Q).call(this,L)&&ke(this,F,Ft).call(this,B(this,le)[L],"expire")},$+1);Ee.unref&&Ee.unref()}}),Oe(this,q,L=>{g[L]=f[L]!==0?h.now():0}),Oe(this,D,(L,$)=>{if(f[$]){let _e=f[$],Ee=g[$];if(!_e||!Ee)return;L.ttl=_e,L.start=Ee,L.now=v||I();let Be=L.now-Ee;L.remainingTTL=_e-Be}});let v=0,I=()=>{let L=h.now();if(this.ttlResolution>0){v=L;let $=setTimeout(()=>v=0,this.ttlResolution);$.unref&&$.unref()}return L};this.getRemainingTTL=L=>{let $=B(this,X).get(L);if($===void 0)return 0;let _e=f[$],Ee=g[$];if(!_e||!Ee)return 1/0;let Be=(v||I())-Ee;return _e-Be},Oe(this,Q,L=>{let $=g[L],_e=f[L];return!!_e&&!!$&&(v||I())-$>_e})},q=new WeakMap,D=new WeakMap,ee=new WeakMap,Q=new WeakMap,ya=function(){let f=new u(B(this,b));Oe(this,J,0),Oe(this,ve,f),Oe(this,H,g=>{Oe(this,J,B(this,J)-f[g]),f[g]=0}),Oe(this,ie,(g,v,I,L)=>{if(ke(this,F,We).call(this,v))return 0;if(!t(I))if(L){if(typeof L!="function")throw new TypeError("sizeCalculation must be a function");if(I=L(v,g),!t(I))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 I}),Oe(this,ae,(g,v,I)=>{if(f[g]=v,B(this,_)){let L=B(this,_)-f[g];for(;B(this,J)>L;)ke(this,F,Fr).call(this,!0)}Oe(this,J,B(this,J)+f[g]),I&&(I.entrySize=v,I.totalCalculatedSize=B(this,J))})},H=new WeakMap,ae=new WeakMap,ie=new WeakMap,Lt=function*({allowStale:f=this.allowStale}={}){if(B(this,U))for(let g=B(this,be);!(!ke(this,F,Li).call(this,g)||((f||!B(this,Q).call(this,g))&&(yield g),g===B(this,V)));)g=B(this,Z)[g]},Nt=function*({allowStale:f=this.allowStale}={}){if(B(this,U))for(let g=B(this,V);!(!ke(this,F,Li).call(this,g)||((f||!B(this,Q).call(this,g))&&(yield g),g===B(this,be)));)g=B(this,G)[g]},Li=function(f){return f!==void 0&&B(this,X).get(B(this,le)[f])===f},Fr=function(f){var L,$;let g=B(this,V),v=B(this,le)[g],I=B(this,P)[g];return B(this,ne)&&ke(this,F,We).call(this,I)?I.__abortController.abort(new Error("evicted")):(B(this,x)||B(this,ge))&&(B(this,x)&&((L=B(this,N))==null||L.call(this,I,v,"evict")),B(this,ge)&&(($=B(this,me))==null||$.push([I,v,"evict"]))),B(this,H).call(this,g),f&&(B(this,le)[g]=void 0,B(this,P)[g]=void 0,B(this,pe).push(g)),B(this,U)===1?(Oe(this,V,Oe(this,be,0)),B(this,pe).length=0):Oe(this,V,B(this,G)[g]),B(this,X).delete(v),Nr(this,U)._--,g},jr=function(f,g,v,I){let L=g===void 0?void 0:B(this,P)[g];if(ke(this,F,We).call(this,L))return L;let $=new r,{signal:_e}=v;_e==null||_e.addEventListener("abort",()=>$.abort(_e.reason),{signal:$.signal});let Ee={signal:$.signal,options:v,context:I},Be=(Ke,et=!1)=>{let{aborted:Re}=$.signal,je=v.ignoreFetchAbort&&Ke!==void 0;if(v.status&&(Re&&!et?(v.status.fetchAborted=!0,v.status.fetchError=$.signal.reason,je&&(v.status.fetchAbortIgnored=!0)):v.status.fetchResolved=!0),Re&&!je&&!et)return xe($.signal.reason);let rt=lt;return B(this,P)[g]===lt&&(Ke===void 0?rt.__staleWhileFetching?B(this,P)[g]=rt.__staleWhileFetching:ke(this,F,Ft).call(this,f,"fetch"):(v.status&&(v.status.fetchUpdated=!0),this.set(f,Ke,Ee.options))),Ke},Me=Ke=>(v.status&&(v.status.fetchRejected=!0,v.status.fetchError=Ke),xe(Ke)),xe=Ke=>{let{aborted:et}=$.signal,Re=et&&v.allowStaleOnFetchAbort,je=Re||v.allowStaleOnFetchRejection,rt=je||v.noDeleteOnFetchRejection,Je=lt;if(B(this,P)[g]===lt&&(!rt||Je.__staleWhileFetching===void 0?ke(this,F,Ft).call(this,f,"fetch"):Re||(B(this,P)[g]=Je.__staleWhileFetching)),je)return v.status&&Je.__staleWhileFetching!==void 0&&(v.status.returnedStale=!0),Je.__staleWhileFetching;if(Je.__returned===Je)throw Ke},bt=(Ke,et)=>{var je;let Re=(je=B(this,k))==null?void 0:je.call(this,f,L,Ee);Re&&Re instanceof Promise&&Re.then(rt=>Ke(rt===void 0?void 0:rt),et),$.signal.addEventListener("abort",()=>{(!v.ignoreFetchAbort||v.allowStaleOnFetchAbort)&&(Ke(void 0),v.allowStaleOnFetchAbort&&(Ke=rt=>Be(rt,!0)))})};v.status&&(v.status.fetchDispatched=!0);let lt=new Promise(bt).then(Be,Me),ct=Object.assign(lt,{__abortController:$,__staleWhileFetching:L,__returned:void 0});return g===void 0?(this.set(f,ct,{...Ee.options,status:void 0}),g=B(this,X).get(f)):B(this,P)[g]=ct,ct},We=function(f){if(!B(this,ne))return!1;let g=f;return!!g&&g instanceof Promise&&g.hasOwnProperty("__staleWhileFetching")&&g.__abortController instanceof r},Ni=function(f,g){B(this,Z)[g]=f,B(this,G)[f]=g},gr=function(f){f!==B(this,be)&&(f===B(this,V)?Oe(this,V,B(this,G)[f]):ke(this,F,Ni).call(this,B(this,Z)[f],B(this,G)[f]),ke(this,F,Ni).call(this,B(this,be),f),Oe(this,be,f))},Ft=function(f,g){var I,L,$,_e;let v=!1;if(B(this,U)!==0){let Ee=B(this,X).get(f);if(Ee!==void 0)if(v=!0,B(this,U)===1)ke(this,F,Fi).call(this,g);else{B(this,H).call(this,Ee);let Be=B(this,P)[Ee];if(ke(this,F,We).call(this,Be)?Be.__abortController.abort(new Error("deleted")):(B(this,x)||B(this,ge))&&(B(this,x)&&((I=B(this,N))==null||I.call(this,Be,f,g)),B(this,ge)&&((L=B(this,me))==null||L.push([Be,f,g]))),B(this,X).delete(f),B(this,le)[Ee]=void 0,B(this,P)[Ee]=void 0,Ee===B(this,be))Oe(this,be,B(this,Z)[Ee]);else if(Ee===B(this,V))Oe(this,V,B(this,G)[Ee]);else{let Me=B(this,Z)[Ee];B(this,G)[Me]=B(this,G)[Ee];let xe=B(this,G)[Ee];B(this,Z)[xe]=B(this,Z)[Ee]}Nr(this,U)._--,B(this,pe).push(Ee)}}if(B(this,ge)&&(($=B(this,me))!=null&&$.length)){let Ee=B(this,me),Be;for(;Be=Ee==null?void 0:Ee.shift();)(_e=B(this,M))==null||_e.call(this,...Be)}return v},Fi=function(f){var g,v,I;for(let L of ke(this,F,Nt).call(this,{allowStale:!0})){let $=B(this,P)[L];if(ke(this,F,We).call(this,$))$.__abortController.abort(new Error("deleted"));else{let _e=B(this,le)[L];B(this,x)&&((g=B(this,N))==null||g.call(this,$,_e,f)),B(this,ge)&&((v=B(this,me))==null||v.push([$,_e,f]))}}if(B(this,X).clear(),B(this,P).fill(void 0),B(this,le).fill(void 0),B(this,de)&&B(this,z)&&(B(this,de).fill(0),B(this,z).fill(0)),B(this,ve)&&B(this,ve).fill(0),Oe(this,V,0),Oe(this,be,0),B(this,pe).length=0,Oe(this,J,0),Oe(this,U,0),B(this,ge)&&B(this,me)){let L=B(this,me),$;for(;$=L==null?void 0:L.shift();)(I=B(this,M))==null||I.call(this,...$)}},Pe);o.LRUCache=p}),kt=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.ContainerIterator=o.Container=o.Base=void 0;var h=class{constructor(l=0){this.iteratorType=l}equals(l){return this.o===l.o}};o.ContainerIterator=h;var i=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};o.Base=i;var a=class extends i{};o.Container=a}),pu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=kt(),i=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=i;o.default=a}),gu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=kt(),i=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=i;o.default=a}),mu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=kt(),i=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=i;o.default=a}),di=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=kt(),i=class extends h.Container{},a=i;o.default=a}),It=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.throwIteratorAccessError=h;function h(){throw new RangeError("Iterator access denied!")}}),es=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.RandomIterator=void 0;var h=kt(),i=It(),a=class extends h.ContainerIterator{constructor(l,r){super(r),this.o=l,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,i.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,i.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,i.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,i.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(l){this.container.setElementByPos(this.o,l)}};o.RandomIterator=a}),Au=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=a(di()),i=es();function a(n){return n&&n.t?n:{default:n}}var l=class va extends i.RandomIterator{constructor(t,s,u){super(t,u),this.container=s}copy(){return new va(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;o.default=e}),bu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=l(di()),i=kt(),a=It();function l(t){return t&&t.t?t:{default:t}}var r=class _a extends i.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 _a(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 m=1;m<t;++m)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;o.default=n}),wu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=a(di()),i=es();function a(n){return n&&n.t?n:{default:n}}var l=class Ea extends i.RandomIterator{constructor(t,s,u){super(t,u),this.container=s}copy(){return new Ea(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;o.default=e}),yu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.TreeNodeEnableIndex=o.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}};o.TreeNode=h;var i=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)}};o.TreeNodeEnableIndex=i}),ts=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=yu(),i=kt(),a=It(),l=class extends i.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 m=this.he(d);if(m){let{parentNode:A,grandParent:y,curNode:w}=m;A.ie(),y.ie(),w.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,m=this.v(p.u,e);if(m===0){p.l=n;return}else if(m<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 A=t.o;if(A!==this.h){let y=this.v(A.u,e);if(y===0){A.l=n;return}else if(y>0){let w=A.L(),C=this.v(w.u,e);if(C===0){w.l=n;return}else C<0&&(s=new this.re(e,n),w.W===void 0?(w.W=s,s.tt=w):(A.U=s,s.tt=A))}}}if(s===void 0)for(s=this.Y;;){let A=this.v(s.u,e);if(A>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(A<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;o.default=r}),rs=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=kt(),i=It(),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,i.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,i.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,i.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;o.default=l}),vu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=l(ts()),i=l(rs()),a=It();function l(t){return t&&t.t?t:{default:t}}var r=class Sa extends i.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 Sa(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;o.default=n}),_u=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=l(ts()),i=l(rs()),a=It();function l(t){return t&&t.t?t:{default:t}}var r=class Ca extends i.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 Ca(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;o.default=n}),ns=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=h;function h(i){let a=typeof i;return a==="object"&&i!==null||a==="function"}}),is=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.HashContainerIterator=o.HashContainer=void 0;var h=kt(),i=l(ns()),a=It();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})}};o.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,i.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,i.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,i.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}};o.HashContainer=e}),Eu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=is(),i=It(),a=class ka extends h.HashContainerIterator{constructor(n,t,s,u){super(n,t,u),this.container=s}get pointer(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.u}copy(){return new ka(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;o.default=r}),Su=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),o.default=void 0;var h=is(),i=l(ns()),a=It();function l(t){return t&&t.t?t:{default:t}}var r=class Ia 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 Ia(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,i.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;o.default=n}),Cu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"t",{value:!0}),Object.defineProperty(o,"Deque",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(o,"HashMap",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(o,"HashSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(o,"LinkList",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(o,"OrderedMap",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(o,"OrderedSet",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(o,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(o,"Queue",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(o,"Stack",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(o,"Vector",{enumerable:!0,get:function(){return l.default}});var h=d(pu()),i=d(gu()),a=d(mu()),l=d(Au()),r=d(bu()),e=d(wu()),n=d(vu()),t=d(_u()),s=d(Eu()),u=d(Su());function d(p){return p&&p.t?p:{default:p}}}),ku=Ae((o,h)=>{ce(),fe(),he();var i=Cu().OrderedSet,a=Ct()("number-allocator:trace"),l=Ct()("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 i([],(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}),os=Ae((o,h)=>{ce(),fe(),he();var i=ku();h.exports.NumberAllocator=i}),Iu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=du(),i=os(),a=class{constructor(l){l>0&&(this.aliasToTopic=new h.LRUCache({max:l}),this.topicToAlias={},this.numberAllocator=new i.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]}};o.default=a}),Tu=Ae(o=>{ce(),fe(),he();var h=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var i=kr(),a=h(Iu()),l=ir(),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: ${i.ReasonCodes[s]}`,s);e.emit("error",u),e.options.reconnectOnConnackError&&e._cleanUp(!0)}};o.default=r}),Bu=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=(i,a,l)=>{i.log("handling pubrel packet");let r=typeof l<"u"?l:i.noop,{messageId:e}=a,n={cmd:"pubcomp",messageId:e};i.incomingStore.get(a,(t,s)=>{t?i._sendPacket(n,r):(i.emit("message",s.topic,s.payload,s),i.handleMessage(s,u=>{if(u)return r(u);i.incomingStore.del(s,i.noop),i._sendPacket(n,r)}))})};o.default=h}),Ou=Ae(o=>{ce(),fe(),he();var h=o&&o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o,"__esModule",{value:!0});var i=h(cu()),a=h(fu()),l=h(Tu()),r=h(kr()),e=h(Bu()),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,i.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}};o.default=n}),Pu=Ae(o=>{ce(),fe(),he();var h=o&&o.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(o,"__esModule",{value:!0}),o.TypedEventEmitter=void 0;var i=h((Qt(),Le(Rt))),a=ir(),l=class{};o.TypedEventEmitter=l,(0,a.applyMixin)(l,i.default)}),Ir=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0}),o.isReactNativeBrowser=o.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&&De!=null&&De.versions?!Object.prototype.hasOwnProperty.call(De.versions,"electron"):typeof window.document<"u":!1},i=()=>{var r,e;return!!(typeof self=="object"&&!((e=(r=self==null?void 0: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()||i()||a();o.isWebWorker=i(),o.isReactNativeBrowser=a(),o.default=l}),xu=Ae((o,h)=>{ce(),fe(),he(),function(i,a){typeof o=="object"&&typeof h<"u"?a(o):typeof define=="function"&&define.amd?define(["exports"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i.fastUniqueNumbers={}))}(o,function(i){var a=function(m){return function(A){var y=m(A);return A.add(y),y}},l=function(m){return function(A,y){return m.set(A,y),y}},r=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,e=536870912,n=e*2,t=function(m,A){return function(y){var w=A.get(y),C=w===void 0?y.size:w<n?w+1:0;if(!y.has(C))return m(y,C);if(y.size<e){for(;y.has(C);)C=Math.floor(Math.random()*n);return m(y,C)}if(y.size>r)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;y.has(C);)C=Math.floor(Math.random()*r);return m(y,C)}},s=new WeakMap,u=l(s),d=t(u,s),p=a(d);i.addUniqueNumber=p,i.generateUniqueNumber=d})}),Ru=Ae((o,h)=>{ce(),fe(),he(),function(i,a){typeof o=="object"&&typeof h<"u"?a(o,xu()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i.workerTimersBroker={},i.fastUniqueNumbers))}(o,function(i,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(w){var C=w.data;if(l(C)){var b=C.params,_=b.timerId,N=b.timerType;if(N==="interval"){var M=t.get(_);if(typeof M=="number"){var k=u.get(M);if(k===void 0||k.timerId!==_||k.timerType!==N)throw new Error("The timer is in an undefined state.")}else if(typeof M<"u")M();else throw new Error("The timer is in an undefined state.")}else if(N==="timeout"){var T=s.get(_);if(typeof T=="number"){var U=u.get(T);if(U===void 0||U.timerId!==_||U.timerType!==N)throw new Error("The timer is in an undefined state.")}else if(typeof T<"u")T(),s.delete(_);else throw new Error("The timer is in an undefined state.")}}else if(r(C)){var J=C.id,X=u.get(J);if(X===void 0)throw new Error("The timer is in an undefined state.");var le=X.timerId,P=X.timerType;u.delete(J),P==="interval"?t.delete(le):s.delete(le)}else{var G=C.error.message;throw new Error(G)}});var p=function(w){var C=a.generateUniqueNumber(u);u.set(C,{timerId:w,timerType:"interval"}),t.set(w,C),d.postMessage({id:C,method:"clear",params:{timerId:w,timerType:"interval"}})},m=function(w){var C=a.generateUniqueNumber(u);u.set(C,{timerId:w,timerType:"timeout"}),s.set(w,C),d.postMessage({id:C,method:"clear",params:{timerId:w,timerType:"timeout"}})},A=function(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=a.generateUniqueNumber(t);return t.set(b,function(){w(),typeof t.get(b)=="function"&&d.postMessage({id:null,method:"set",params:{delay:C,now:performance.now(),timerId:b,timerType:"interval"}})}),d.postMessage({id:null,method:"set",params:{delay:C,now:performance.now(),timerId:b,timerType:"interval"}}),b},y=function(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=a.generateUniqueNumber(s);return s.set(b,w),d.postMessage({id:null,method:"set",params:{delay:C,now:performance.now(),timerId:b,timerType:"timeout"}}),b};return{clearInterval:p,clearTimeout:m,setInterval:A,setTimeout:y}};i.load=e})}),Mu=Ae((o,h)=>{ce(),fe(),he(),function(i,a){typeof o=="object"&&typeof h<"u"?a(o,Ru()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i.workerTimers={},i.workerTimersBroker))}(o,function(i,a){var l=function(d,p){var m=null;return function(){if(m!==null)return m;var A=new Blob([p],{type:"application/javascript; charset=utf-8"}),y=URL.createObjectURL(A);return m=d(y),setTimeout(function(){return URL.revokeObjectURL(y)}),m}},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)};i.clearInterval=n,i.clearTimeout=t,i.setInterval=s,i.setTimeout=u})}),Uu=Ae(o=>{ce(),fe(),he();var h=o&&o.__createBinding||(Object.create?function(s,u,d,p){p===void 0&&(p=d);var m=Object.getOwnPropertyDescriptor(u,d);(!m||("get"in m?!u.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(s,p,m)}:function(s,u,d,p){p===void 0&&(p=d),s[p]=u[d]}),i=o&&o.__setModuleDefault||(Object.create?function(s,u){Object.defineProperty(s,"default",{enumerable:!0,value:u})}:function(s,u){s.default=u}),a=o&&o.__importStar||function(){var s=function(u){return s=Object.getOwnPropertyNames||function(d){var p=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(p[p.length]=m);return p},s(u)};return function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p=s(u),m=0;m<p.length;m++)p[m]!=="default"&&h(d,u,p[m]);return i(d,u),d}}();Object.defineProperty(o,"__esModule",{value:!0});var l=a(Ir()),r=Mu(),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}};o.default=t}),ss=Ae(o=>{ce(),fe(),he();var h=o&&o.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(o,"__esModule",{value:!0});var i=h(Uu()),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,i.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)}};o.default=a}),pi=Ae(o=>{ce(),fe(),he();var h=o&&o.__createBinding||(Object.create?function(M,k,T,U){U===void 0&&(U=T);var J=Object.getOwnPropertyDescriptor(k,T);(!J||("get"in J?!k.__esModule:J.writable||J.configurable))&&(J={enumerable:!0,get:function(){return k[T]}}),Object.defineProperty(M,U,J)}:function(M,k,T,U){U===void 0&&(U=T),M[U]=k[T]}),i=o&&o.__setModuleDefault||(Object.create?function(M,k){Object.defineProperty(M,"default",{enumerable:!0,value:k})}:function(M,k){M.default=k}),a=o&&o.__importStar||function(){var M=function(k){return M=Object.getOwnPropertyNames||function(T){var U=[];for(var J in T)Object.prototype.hasOwnProperty.call(T,J)&&(U[U.length]=J);return U},M(k)};return function(k){if(k&&k.__esModule)return k;var T={};if(k!=null)for(var U=M(k),J=0;J<U.length;J++)U[J]!=="default"&&h(T,k,U[J]);return i(T,k),T}}(),l=o&&o.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(o,"__esModule",{value:!0});var r=l(Ql()),e=l(su()),n=l(Zo()),t=Ht(),s=l(lu()),u=a(uu()),d=l(Ct()),p=l(Xo()),m=l(Ou()),A=ir(),y=Pu(),w=l(ss()),C=a(Ir()),b=globalThis.setImmediate||((...M)=>{let k=M.shift();(0,A.nextTick)(()=>{k(...M)})}),_={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},N=class ji extends y.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(k,T){super(),this.options=T||{};for(let U in _)typeof this.options[U]>"u"?this.options[U]=_[U]:this.options[U]=T[U];this.log=this.options.log||(0,d.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",ji.VERSION),C.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",C.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:ji.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:(...U)=>{U[3](null,0)},this.options.writeCache||(e.default.writeToStream.cacheNumbers=!1),this.streamBuilder=k,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:U}=this,J=()=>{let X=U.shift();this.log("deliver :: entry %o",X);let le=null;if(!X){this._resubscribe();return}le=X.packet,this.log("deliver :: call _sendPacket for %o",le);let P=!0;le.messageId&&le.messageId!==0&&(this.messageIdProvider.register(le.messageId)||(P=!1)),P?this._sendPacket(le,G=>{X.cb&&X.cb(G),J()}):(this.log("messageId: %d has already used. The message is skipped and removed.",le.messageId),J())};this.log("connect :: sending queued packets"),J()}),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(k,T){T()}handleMessage(k,T){T()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var k;let T=new t.Writable,U=e.default.parser(this.options),J=null,X=[];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),U.on("packet",V=>{this.log("parser :: on packet push to packets array."),X.push(V)});let le=()=>{this.log("work :: getting next packet in queue");let V=X.shift();if(V)this.log("work :: packet pulled from queue"),(0,m.default)(this,V,P);else{this.log("work :: no packets in queue");let be=J;J=null,this.log("work :: done flag is %s",!!be),be&&be()}},P=()=>{if(X.length)(0,A.nextTick)(le);else{let V=J;J=null,V()}};T._write=(V,be,pe)=>{J=pe,this.log("writable stream :: parsing buffer"),U.parse(V),le()};let G=V=>{this.log("streamErrorHandler :: error",V.message),V.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",V)):this.noop(V)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",G),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:(k=this.options.will)===null||k===void 0?void 0:k.payload})),this.topicAliasRecv&&(Z.properties||(Z.properties={}),this.topicAliasRecv&&(Z.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(Z),U.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 V=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(V)}}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(k,T,U,J){this.log("publish :: message `%s` to topic `%s`",T,k);let{options:X}=this;typeof U=="function"&&(J=U,U=null),U=U||{},U=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),U);let{qos:le,retain:P,dup:G,properties:Z,cbStorePut:V}=U;if(this._checkDisconnecting(J))return this;let be=()=>{let pe=0;if((le===1||le===2)&&(pe=this._nextId(),pe===null))return this.log("No messageId left"),!1;let me={cmd:"publish",topic:k,payload:T,qos:le,retain:P,messageId:pe,dup:G};switch(X.protocolVersion===5&&(me.properties=Z),this.log("publish :: qos",le),le){case 1:case 2:this.outgoing[me.messageId]={volatile:!1,cb:J||this.noop},this.log("MqttClient:publish: packet cmd: %s",me.cmd),this._sendPacket(me,void 0,V);break;default:this.log("MqttClient:publish: packet cmd: %s",me.cmd),this._sendPacket(me,J,V);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!be())&&this._storeProcessingQueue.push({invoke:be,cbStorePut:U.cbStorePut,callback:J}),this}publishAsync(k,T,U){return new Promise((J,X)=>{this.publish(k,T,U,(le,P)=>{le?X(le):J(P)})})}subscribe(k,T,U){let J=this.options.protocolVersion;typeof T=="function"&&(U=T),U=U||this.noop;let X=!1,le=[];typeof k=="string"?(k=[k],le=k):Array.isArray(k)?le=k:typeof k=="object"&&(X=k.resubscribe,delete k.resubscribe,le=Object.keys(k));let P=u.validateTopics(le);if(P!==null)return b(U,new Error(`Invalid topic ${P}`)),this;if(this._checkDisconnecting(U))return this.log("subscribe: discconecting true"),this;let G={qos:0};J===5&&(G.nl=!1,G.rap=!1,G.rh=0),T=Object.assign(Object.assign({},G),T);let Z=T.properties,V=[],be=(ve,z)=>{if(z=z||T,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,ve)||this._resubscribeTopics[ve].qos<z.qos||X){let de={topic:ve,qos:z.qos};J===5&&(de.nl=z.nl,de.rap=z.rap,de.rh=z.rh,de.properties=Z),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",de.topic,de.qos),V.push(de)}};if(Array.isArray(k)?k.forEach(ve=>{this.log("subscribe: array topic %s",ve),be(ve)}):Object.keys(k).forEach(ve=>{this.log("subscribe: object topic %s, %o",ve,k[ve]),be(ve,k[ve])}),!V.length)return U(null,[]),this;let pe=(ve,z)=>{let de={cmd:"subscribe",subscriptions:ve,messageId:z};if(Z&&(de.properties=Z),this.options.resubscribe){this.log("subscribe :: resubscribe true");let ne=[];ve.forEach(ge=>{if(this.options.reconnectPeriod>0){let F={qos:ge.qos};J===5&&(F.nl=ge.nl||!1,F.rap=ge.rap||!1,F.rh=ge.rh||0,F.properties=ge.properties),this._resubscribeTopics[ge.topic]=F,ne.push(ge.topic)}}),this.messageIdToTopic[de.messageId]=ne}let x=new Promise((ne,ge)=>{this.outgoing[de.messageId]={volatile:!0,cb(F,Ce){if(!F){let{granted:q}=Ce;for(let D=0;D<q.length;D+=1)ve[D].qos=q[D]}F?ge(new A.ErrorWithSubackPacket(F.message,Ce)):ne(Ce)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(de),x},me=()=>{var ve;let z=(ve=this.options.subscribeBatchSize)!==null&&ve!==void 0?ve:V.length,de=[];for(let x=0;x<V.length;x+=z){let ne=V.slice(x,x+z),ge=this._nextId();if(ge===null)return this.log("No messageId left"),!1;de.push(pe(ne,ge))}return Promise.all(de).then(x=>{U(null,V,x.at(-1))}).catch(x=>{U(x,V,x.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,callback:U}),this}subscribeAsync(k,T){return new Promise((U,J)=>{this.subscribe(k,T,(X,le)=>{X?J(X):U(le)})})}unsubscribe(k,T,U){typeof k=="string"&&(k=[k]),typeof T=="function"&&(U=T),U=U||this.noop;let J=u.validateTopics(k);if(J!==null)return b(U,new Error(`Invalid topic ${J}`)),this;if(this._checkDisconnecting(U))return this;let X=()=>{let le=this._nextId();if(le===null)return this.log("No messageId left"),!1;let P={cmd:"unsubscribe",messageId:le,unsubscriptions:[]};return typeof k=="string"?P.unsubscriptions=[k]:Array.isArray(k)&&(P.unsubscriptions=k),this.options.resubscribe&&P.unsubscriptions.forEach(G=>{delete this._resubscribeTopics[G]}),typeof T=="object"&&T.properties&&(P.properties=T.properties),this.outgoing[P.messageId]={volatile:!0,cb:U},this.log("unsubscribe: call _sendPacket"),this._sendPacket(P),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!X())&&this._storeProcessingQueue.push({invoke:X,callback:U}),this}unsubscribeAsync(k,T){return new Promise((U,J)=>{this.unsubscribe(k,T,(X,le)=>{X?J(X):U(le)})})}end(k,T,U){this.log("end :: (%s)",this.options.clientId),(k==null||typeof k!="boolean")&&(U=U||T,T=k,k=!1),typeof T!="object"&&(U=U||T,T=null),this.log("end :: cb? %s",!!U),(!U||typeof U!="function")&&(U=this.noop);let J=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(le=>{this.outgoingStore.close(P=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),U){let G=le||P;this.log("end :: closeStores: invoking callback with args"),U(G)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},X=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,k),this._cleanUp(k,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,A.nextTick)(J)},T)};return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!k&&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,X,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),X()),this)}endAsync(k,T){return new Promise((U,J)=>{this.end(k,T,X=>{X?J(X):U()})})}removeOutgoingMessage(k){if(this.outgoing[k]){let{cb:T}=this.outgoing[k];this._removeOutgoingAndStoreMessage(k,()=>{T(new Error("Message removed"))})}return this}reconnect(k){this.log("client reconnect");let T=()=>{k?(this.options.incomingStore=k.incomingStore,this.options.outgoingStore=k.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(k=>{this.outgoing[k].volatile&&typeof this.outgoing[k].cb=="function"&&(this.outgoing[k].cb(new Error("Connection closed")),delete this.outgoing[k])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(k=>{typeof this.outgoing[k].cb=="function"&&(this.outgoing[k].cb(new Error("Connection closed")),delete this.outgoing[k])}))}_removeTopicAliasAndRecoverTopicName(k){let T;k.properties&&(T=k.properties.topicAlias);let U=k.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",T,U),U.length===0){if(typeof T>"u")return new Error("Unregistered Topic Alias");if(U=this.topicAliasSend.getTopicByAlias(T),typeof U>"u")return new Error("Unregistered Topic Alias");k.topic=U}T&&delete k.properties.topicAlias}_checkDisconnecting(k){return this.disconnecting&&(k&&k!==this.noop?k(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(k,T,U={}){if(T&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),this.log("_cleanUp :: forced? %s",k),k)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let J=Object.assign({cmd:"disconnect"},U);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(J,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),b(()=>{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(k,T,U){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",k.cmd);let J=k,X;if(J.cmd==="publish"&&(J=(0,s.default)(k),X=this._removeTopicAliasAndRecoverTopicName(J),X))return T&&T(X);this.outgoingStore.put(J,le=>{if(le)return T&&T(le);U(),this._writePacket(k,T)})}_applyTopicAlias(k){if(this.options.protocolVersion===5&&k.cmd==="publish"){let T;k.properties&&(T=k.properties.topicAlias);let U=k.topic.toString();if(this.topicAliasSend)if(T){if(U.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",U,T),!this.topicAliasSend.put(U,T)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",U,T),new Error("Sending Topic Alias out of range")}else U.length!==0&&(this.options.autoAssignTopicAlias?(T=this.topicAliasSend.getAliasByTopic(U),T?(k.topic="",k.properties=Object.assign(Object.assign({},k.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",U,T)):(T=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(U,T),k.properties=Object.assign(Object.assign({},k.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",U,T))):this.options.autoUseTopicAlias&&(T=this.topicAliasSend.getAliasByTopic(U),T&&(k.topic="",k.properties=Object.assign(Object.assign({},k.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",U,T))));else if(T)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",U,T),new Error("Sending Topic Alias out of range")}}_noop(k){this.log("noop ::",k)}_writePacket(k,T){this.log("_writePacket :: packet: %O",k),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",k),this.log("_writePacket :: writing to stream");let U=e.default.writeToStream(k,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",U),!U&&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(k,T,U,J){this.log("_sendPacket :: (%s) :: start",this.options.clientId),U=U||this.noop,T=T||this.noop;let X=this._applyTopicAlias(k);if(X){T(X);return}if(!this.connected){if(k.cmd==="auth"){this._writePacket(k,T);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(k,T,U);return}if(J){this._writePacket(k,T);return}switch(k.cmd){case"publish":break;case"pubrel":this._storeAndSend(k,T,U);return;default:this._writePacket(k,T);return}switch(k.qos){case 2:case 1:this._storeAndSend(k,T,U);break;case 0:default:this._writePacket(k,T);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(k,T,U){this.log("_storePacket :: packet: %o",k),this.log("_storePacket :: cb? %s",!!T),U=U||this.noop;let J=k;if(J.cmd==="publish"){J=(0,s.default)(k);let le=this._removeTopicAliasAndRecoverTopicName(J);if(le)return T&&T(le)}let X=J.qos||0;X===0&&this.queueQoSZero||J.cmd!=="publish"?this.queue.push({packet:J,cb:T}):X>0?(T=this.outgoing[J.messageId]?this.outgoing[J.messageId].cb:null,this.outgoingStore.put(J,le=>{if(le)return T&&T(le);U()})):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 w.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(k=!1){this.keepaliveManager&&this.options.keepalive&&(k||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 k=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&k.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let T=0;T<k.length;T++){let U={};U[k[T]]=this._resubscribeTopics[k[T]],U.resubscribe=!0,this.subscribe(U,{properties:U[k[T]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(k){if(this.disconnected){this.emit("connect",k);return}this.connackPacket=k,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let T=()=>{let U=this.outgoingStore.createStream(),J=()=>{U.destroy(),U=null,this._flushStoreProcessingQueue(),X()},X=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",J),U.on("error",P=>{X(),this._flushStoreProcessingQueue(),this.removeListener("close",J),this.emit("error",P)});let le=()=>{if(!U)return;let P=U.read(1),G;if(!P){U.once("readable",le);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[P.messageId]){le();return}!this.disconnecting&&!this.reconnectTimer?(G=this.outgoing[P.messageId]?this.outgoing[P.messageId].cb:null,this.outgoing[P.messageId]={volatile:!1,cb(Z,V){G&&G(Z,V),le()}},this._packetIdsDuringStoreProcessing[P.messageId]=!0,this.messageIdProvider.register(P.messageId)?this._sendPacket(P,void 0,void 0,!0):this.log("messageId: %d has already used.",P.messageId)):U.destroy&&U.destroy()};U.on("end",()=>{let P=!0;for(let G in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[G]){P=!1;break}this.removeListener("close",J),P?(X(),this._invokeAllStoreProcessingQueue(),this.emit("connect",k)):T()}),le()};T()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let k=this._storeProcessingQueue[0];if(k&&k.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let k of this._storeProcessingQueue)k.cbStorePut&&k.cbStorePut(new Error("Connection closed")),k.callback&&k.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(k,T){delete this.outgoing[k],this.outgoingStore.del({messageId:k},(U,J)=>{T(U,J),this.messageIdProvider.deallocate(k),this._invokeStoreProcessingQueue()})}};N.VERSION=A.MQTTJS_VERSION,o.default=N}),Du=Ae(o=>{ce(),fe(),he(),Object.defineProperty(o,"__esModule",{value:!0});var h=os(),i=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()}};o.default=i});function qt(o){throw new RangeError(fs[o])}function as(o,h){let i=o.split("@"),a="";i.length>1&&(a=i[0]+"@",o=i[1]);let l=function(r,e){let n=[],t=r.length;for(;t--;)n[t]=e(r[t]);return n}((o=o.replace(hs,".")).split("."),h).join(".");return a+l}function ls(o){let h=[],i=0,a=o.length;for(;i<a;){let l=o.charCodeAt(i++);if(l>=55296&&l<=56319&&i<a){let r=o.charCodeAt(i++);(64512&r)==56320?h.push(((1023&l)<<10)+(1023&r)+65536):(h.push(l),i--)}else h.push(l)}return h}var us,cs,hs,fs,dt,Tr,gi,mi,Ai,bi,Ut,Lu=it(()=>{ce(),fe(),he(),us=/^xn--/,cs=/[^\0-\x7E]/,hs=/[\x2E\u3002\uFF0E\uFF61]/g,fs={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},dt=Math.floor,Tr=String.fromCharCode,gi=function(o,h){return o+22+75*(o<26)-((h!=0)<<5)},mi=function(o,h,i){let a=0;for(o=i?dt(o/700):o>>1,o+=dt(o/h);o>455;a+=36)o=dt(o/35);return dt(a+36*o/(o+38))},Ai=function(o){let h=[],i=o.length,a=0,l=128,r=72,e=o.lastIndexOf("-");e<0&&(e=0);for(let t=0;t<e;++t)o.charCodeAt(t)>=128&&qt("not-basic"),h.push(o.charCodeAt(t));for(let t=e>0?e+1:0;t<i;){let s=a;for(let d=1,p=36;;p+=36){t>=i&&qt("invalid-input");let m=(n=o.charCodeAt(t++))-48<10?n-22:n-65<26?n-65:n-97<26?n-97:36;(m>=36||m>dt((2147483647-a)/d))&&qt("overflow"),a+=m*d;let A=p<=r?1:p>=r+26?26:p-r;if(m<A)break;let y=36-A;d>dt(2147483647/y)&&qt("overflow"),d*=y}let u=h.length+1;r=mi(a-s,u,s==0),dt(a/u)>2147483647-l&&qt("overflow"),l+=dt(a/u),a%=u,h.splice(a++,0,l)}var n;return String.fromCodePoint(...h)},bi=function(o){let h=[],i=(o=ls(o)).length,a=128,l=0,r=72;for(let t of o)t<128&&h.push(Tr(t));let e=h.length,n=e;for(e&&h.push("-");n<i;){let t=2147483647;for(let u of o)u>=a&&u<t&&(t=u);let s=n+1;t-a>dt((2147483647-l)/s)&&qt("overflow"),l+=(t-a)*s,a=t;for(let u of o)if(u<a&&++l>2147483647&&qt("overflow"),u==a){let d=l;for(let p=36;;p+=36){let m=p<=r?1:p>=r+26?26:p-r;if(d<m)break;let A=d-m,y=36-m;h.push(Tr(gi(m+A%y,0))),d=dt(A/y)}h.push(Tr(gi(d,0))),r=mi(l,s,n==e),l=0,++n}++l,++a}return h.join("")},Ut={version:"2.1.0",ucs2:{decode:ls,encode:o=>String.fromCodePoint(...o)},decode:Ai,encode:bi,toASCII:function(o){return as(o,function(h){return cs.test(h)?"xn--"+bi(h):h})},toUnicode:function(o){return as(o,function(h){return us.test(h)?Ai(h.slice(4).toLowerCase()):h})}},Ut.decode,Ut.encode,Ut.toASCII,Ut.toUnicode,Ut.ucs2,Ut.version});function Nu(o,h){return Object.prototype.hasOwnProperty.call(o,h)}var ds,or,ps,mt,Fu=it(()=>{ce(),fe(),he(),ds=function(o,h,i,a){h=h||"&",i=i||"=";var l={};if(typeof o!="string"||o.length===0)return l;var r=/\+/g;o=o.split(h);var e=1e3;a&&typeof a.maxKeys=="number"&&(e=a.maxKeys);var n=o.length;e>0&&n>e&&(n=e);for(var t=0;t<n;++t){var s,u,d,p,m=o[t].replace(r,"%20"),A=m.indexOf(i);A>=0?(s=m.substr(0,A),u=m.substr(A+1)):(s=m,u=""),d=decodeURIComponent(s),p=decodeURIComponent(u),Nu(l,d)?Array.isArray(l[d])?l[d].push(p):l[d]=[l[d],p]:l[d]=p}return l},or=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}},ps=function(o,h,i,a){return h=h||"&",i=i||"=",o===null&&(o=void 0),typeof o=="object"?Object.keys(o).map(function(l){var r=encodeURIComponent(or(l))+i;return Array.isArray(o[l])?o[l].map(function(e){return r+encodeURIComponent(or(e))}).join(h):r+encodeURIComponent(or(o[l]))}).join(h):a?encodeURIComponent(or(a))+i+encodeURIComponent(or(o)):""},mt={},mt.decode=mt.parse=ds,mt.encode=mt.stringify=ps,mt.decode,mt.encode,mt.parse,mt.stringify});function wi(){throw new Error("setTimeout has not been defined")}function yi(){throw new Error("clearTimeout has not been defined")}function gs(o){if(Bt===setTimeout)return setTimeout(o,0);if((Bt===wi||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(o,0);try{return Bt(o,0)}catch{try{return Bt.call(null,o,0)}catch{return Bt.call(this||$t,o,0)}}}function ju(){Gt&&zt&&(Gt=!1,zt.length?At=zt.concat(At):fr=-1,At.length&&ms())}function ms(){if(!Gt){var o=gs(ju);Gt=!0;for(var h=At.length;h;){for(zt=At,At=[];++fr<h;)zt&&zt[fr].run();fr=-1,h=At.length}zt=null,Gt=!1,function(i){if(Ot===clearTimeout)return clearTimeout(i);if((Ot===yi||!Ot)&&clearTimeout)return Ot=clearTimeout,clearTimeout(i);try{Ot(i)}catch{try{return Ot.call(null,i)}catch{return Ot.call(this||$t,i)}}}(o)}}function As(o,h){(this||$t).fun=o,(this||$t).array=h}function Tt(){}var bs,Bt,Ot,$t,Ge,zt,At,Gt,fr,$e,Wu=it(()=>{ce(),fe(),he(),$t=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Ge=bs={},function(){try{Bt=typeof setTimeout=="function"?setTimeout:wi}catch{Bt=wi}try{Ot=typeof clearTimeout=="function"?clearTimeout:yi}catch{Ot=yi}}(),At=[],Gt=!1,fr=-1,Ge.nextTick=function(o){var h=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)h[i-1]=arguments[i];At.push(new As(o,h)),At.length!==1||Gt||gs(ms)},As.prototype.run=function(){(this||$t).fun.apply(null,(this||$t).array)},Ge.title="browser",Ge.browser=!0,Ge.env={},Ge.argv=[],Ge.version="",Ge.versions={},Ge.on=Tt,Ge.addListener=Tt,Ge.once=Tt,Ge.off=Tt,Ge.removeListener=Tt,Ge.removeAllListeners=Tt,Ge.emit=Tt,Ge.prependListener=Tt,Ge.prependOnceListener=Tt,Ge.listeners=function(o){return[]},Ge.binding=function(o){throw new Error("process.binding is not supported")},Ge.cwd=function(){return"/"},Ge.chdir=function(o){throw new Error("process.chdir is not supported")},Ge.umask=function(){return 0},$e=bs,$e.addListener,$e.argv,$e.binding,$e.browser,$e.chdir,$e.cwd,$e.emit,$e.env,$e.listeners,$e.nextTick,$e.off,$e.on,$e.once,$e.prependListener,$e.prependOnceListener,$e.removeAllListeners,$e.removeListener,$e.title,$e.umask,$e.version,$e.versions});function Vu(){if(vi)return Br;vi=!0;var o=Br={},h,i;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"?i=clearTimeout:i=l}catch{i=l}})();function r(y){if(h===setTimeout)return setTimeout(y,0);if((h===a||!h)&&setTimeout)return h=setTimeout,setTimeout(y,0);try{return h(y,0)}catch{try{return h.call(null,y,0)}catch{return h.call(this||Yt,y,0)}}}function e(y){if(i===clearTimeout)return clearTimeout(y);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(y);try{return i(y)}catch{try{return i.call(null,y)}catch{return i.call(this||Yt,y)}}}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 y=r(d);t=!0;for(var w=n.length;w;){for(s=n,n=[];++u<w;)s&&s[u].run();u=-1,w=n.length}s=null,t=!1,e(y)}}o.nextTick=function(y){var w=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)w[C-1]=arguments[C];n.push(new m(y,w)),n.length===1&&!t&&r(p)};function m(y,w){(this||Yt).fun=y,(this||Yt).array=w}m.prototype.run=function(){(this||Yt).fun.apply(null,(this||Yt).array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function A(){}return o.on=A,o.addListener=A,o.once=A,o.off=A,o.removeListener=A,o.removeAllListeners=A,o.emit=A,o.prependListener=A,o.prependOnceListener=A,o.listeners=function(y){return[]},o.binding=function(y){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(y){throw new Error("process.chdir is not supported")},o.umask=function(){return 0},Br}var Br,vi,Yt,Ve,ws=it(()=>{ce(),fe(),he(),Br={},vi=!1,Yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Ve=Vu(),Ve.platform="browser",Ve.addListener,Ve.argv,Ve.binding,Ve.browser,Ve.chdir,Ve.cwd,Ve.emit,Ve.env,Ve.listeners,Ve.nextTick,Ve.off,Ve.on,Ve.once,Ve.prependListener,Ve.prependOnceListener,Ve.removeAllListeners,Ve.removeListener,Ve.title,Ve.umask,Ve.version,Ve.versions});function Qu(){if(_i)return Or;_i=!0;var o=Ve;function h(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function i(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 m=n.lastIndexOf("/");if(m!==n.length-1){m===-1?(n="",t=0):(n=n.slice(0,m),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=o.cwd()),s=n),h(s),s.length!==0&&(r=s+"/"+r,e=s.charCodeAt(0)===47)}return r=i(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=i(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,m=s<p?s:p,A=-1,y=0;y<=m;++y){if(y===m){if(p>m){if(e.charCodeAt(u+y)===47)return e.slice(u+y+1);if(y===0)return e.slice(u+y)}else s>m&&(r.charCodeAt(n+y)===47?A=y:y===0&&(A=0));break}var w=r.charCodeAt(n+y),C=e.charCodeAt(u+y);if(w!==C)break;w===47&&(A=y)}var b="";for(y=n+A+1;y<=t;++y)(y===t||r.charCodeAt(y)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+e.slice(u+A):(u+=A,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 m=r.charCodeAt(u);if(m===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(m===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,m=!0,A=r.length-1,y=0;A>=s;--A){if(n=r.charCodeAt(A),n===47){if(!m){d=A+1;break}continue}p===-1&&(m=!1,p=A+1),n===46?u===-1?u=A:y!==1&&(y=1):u!==-1&&(y=-1)}return u===-1||p===-1||y===0||y===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,Or=l,Or}var Or,_i,Ei,Ku=it(()=>{ce(),fe(),he(),ws(),Or={},_i=!1,Ei=Qu()}),ys={};tr(ys,{URL:()=>$s,Url:()=>Vs,default:()=>Fe,fileURLToPath:()=>vs,format:()=>Qs,parse:()=>qs,pathToFileURL:()=>_s,resolve:()=>Ks,resolveObject:()=>Hs});function ht(){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 dr(o,h,i){if(o&&pt.isObject(o)&&o instanceof ht)return o;var a=new ht;return a.parse(o,h,i),a}function Hu(){if(Ii)return Mr;Ii=!0;var o=$e;function h(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function i(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 m=n.lastIndexOf("/");if(m!==n.length-1){m===-1?(n="",t=0):(n=n.slice(0,m),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=o.cwd()),s=n),h(s),s.length!==0&&(r=s+"/"+r,e=s.charCodeAt(0)===47)}return r=i(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=i(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,m=s<p?s:p,A=-1,y=0;y<=m;++y){if(y===m){if(p>m){if(e.charCodeAt(u+y)===47)return e.slice(u+y+1);if(y===0)return e.slice(u+y)}else s>m&&(r.charCodeAt(n+y)===47?A=y:y===0&&(A=0));break}var w=r.charCodeAt(n+y),C=e.charCodeAt(u+y);if(w!==C)break;w===47&&(A=y)}var b="";for(y=n+A+1;y<=t;++y)(y===t||r.charCodeAt(y)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+e.slice(u+A):(u+=A,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 m=r.charCodeAt(u);if(m===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(m===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,m=!0,A=r.length-1,y=0;A>=s;--A){if(n=r.charCodeAt(A),n===47){if(!m){d=A+1;break}continue}p===-1&&(m=!1,p=A+1),n===46?u===-1?u=A:y!==1&&(y=1):u!==-1&&(y=-1)}return u===-1||p===-1||y===0||y===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,Mr=l,Mr}function qu(o){if(typeof o=="string")o=new URL(o);else if(!(o instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(o.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Ur?$u(o):zu(o)}function $u(o){let h=o.hostname,i=o.pathname;for(let a=0;a<i.length;a++)if(i[a]==="%"){let l=i.codePointAt(a+2)||32;if(i[a+1]==="2"&&l===102||i[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(i=i.replace(Us,"\\"),i=decodeURIComponent(i),h!=="")return`\\\\${h}${i}`;{let a=i.codePointAt(1)|32,l=i[2];if(a<Rs||a>Ms||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return i.slice(1)}}function zu(o){if(o.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=o.pathname;for(let i=0;i<h.length;i++)if(h[i]==="%"){let a=h.codePointAt(i+2)||32;if(h[i+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function Gu(o){let h=Ti.resolve(o),i=o.charCodeAt(o.length-1);(i===xs||Ur&&i===Ps)&&h[h.length-1]!==Ti.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(Ds,"%25")),!Ur&&h.includes("\\")&&(h=h.replace(Ls,"%5C")),h.includes(`
|
|
4
4
|
`)&&(h=h.replace(Ns,"%0A")),h.includes("\r")&&(h=h.replace(Fs,"%0D")),h.includes(" ")&&(h=h.replace(js,"%09")),a.pathname=h,a}function vs(o){if(typeof o=="string")o=new URL(o);else if(!(o instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(o.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Dr?Yu(o):Ju(o)}function Yu(o){let h=o.hostname,i=o.pathname;for(let a=0;a<i.length;a++)if(i[a]==="%"){let l=i.codePointAt(a+2)||32;if(i[a+1]==="2"&&l===102||i[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(i=i.replace(Zs,"\\"),i=decodeURIComponent(i),h!=="")return`\\\\${h}${i}`;{let a=i.codePointAt(1)|32,l=i[2];if(a<Ys||a>Js||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return i.slice(1)}}function Ju(o){if(o.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=o.pathname;for(let i=0;i<h.length;i++)if(h[i]==="%"){let a=h.codePointAt(i+2)||32;if(h[i+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function _s(o){let h=Ei.resolve(o),i=o.charCodeAt(o.length-1);(i===Gs||Dr&&i===zs)&&h[h.length-1]!==Ei.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(Xs,"%25")),!Dr&&h.includes("\\")&&(h=h.replace(ea,"%5C")),h.includes(`
|
|
5
5
|
`)&&(h=h.replace(ta,"%0A")),h.includes("\r")&&(h=h.replace(ra,"%0D")),h.includes(" ")&&(h=h.replace(na,"%09")),a.pathname=h,a}var Fe,Es,pt,Ss,Cs,ks,Is,Pr,Si,Ci,ki,Ts,Bs,xr,Jt,Rr,Mr,Ii,Ti,Os,Ps,xs,Rs,Ms,Ur,Us,Ds,Ls,Ns,Fs,js,Ws,Vs,Qs,Ks,Hs,qs,$s,zs,Gs,Ys,Js,Dr,Zs,Xs,ea,ta,ra,na,Zu=it(()=>{ce(),fe(),he(),Lu(),Fu(),Wu(),Ku(),ws(),Fe={},Es=Ut,pt={isString:function(o){return typeof o=="string"},isObject:function(o){return typeof o=="object"&&o!==null},isNull:function(o){return o===null},isNullOrUndefined:function(o){return o==null}},Fe.parse=dr,Fe.resolve=function(o,h){return dr(o,!1,!0).resolve(h)},Fe.resolveObject=function(o,h){return o?dr(o,!1,!0).resolveObject(h):h},Fe.format=function(o){return pt.isString(o)&&(o=dr(o)),o instanceof ht?o.format():ht.prototype.format.call(o)},Fe.Url=ht,Ss=/^([a-z0-9.+-]+:)/i,Cs=/:[0-9]*$/,ks=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Is=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|