var Xn=Object.defineProperty;var eo=(t,e,n)=>e in t?Xn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>eo(t,typeof e!="symbol"?e+"":e,n);import{O as to,s as no,a as oo,b as io,c as ao,d as ro,e as so,f as lo,g as co,h as Vt,i as Dt,j as _e,k as uo,l as Ft,_ as po,m as fo}from"./index-yKORGt7p.js";import{s as ne,a as fe,R as he,b as Ue,c as ho,d as K,e as Mt,f as ft}from"./index-CucsYwBl.js";import{p as ee,u as c,A as y,B as C,C as B,H as d,K as W,J as V,T as Rt,L as je,M as Ke,r as ze,q as $,N as x,O as go,E as m,s as N,P as de,I as j,G as q,Q as H,R as Nt,S as ue,U as Y,V as ge,W as ae,X as Le,Y as He,b as Ge,l as J,F as p,w as X,Z as bo,i as kt,o as mo,_ as vo,$ as Ze,n as Qe}from"./style-rM6B2R_a.js";import{_ as $e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{B as oe,U as Pe,Z as Xe,O as U,D as A,C as yo,F as wo,u as ht,d as Ut,a as xe,b as Co}from"./index-DHbaENoy.js";import{c as ko}from"./chartRoutes-VVL9Kqkx.js";import{C as G,u as Io,a as le}from"./CoyoteLocalConnStore-BPobZHLz.js";import So from"./Circle1-Bq7ZGx-y.js";import{E as jt,w as It,h as se,S as Lo,G as St}from"./response-D0l7QWa1.js";import"./_commonjsHelpers-BosuxZz1.js";const Po=t=>(je("data-v-3d7c63b5"),t=t(),Ke(),t),Oo={class:"fixed bottom-0 left-0 w-full"},To={key:0,class:"toast-prompt flex items-center justify-between gap-8 rounded-lg p-4 mb-8 mx-4 md:mx-auto w-full md:w-[40rem] lg:w-[60rem]"},Bo=Po(()=>d("p",{class:"text-md text-white"},"是否保存当前配置？",-1)),_o=ee({name:"ConfigSavePrompt",__name:"ConfigSavePrompt",props:{visible:{type:Boolean}},emits:["save","cancel"],setup(t,{emit:e}){const n=t,i=e;return(a,o)=>{const r=ne;return c(),y("div",Oo,[C(Rt,{name:"slide-up"},{default:B(()=>[n.visible?(c(),y("div",To,[Bo,d("div",null,[C(r,{size:"small",severity:"secondary",class:"mr-4",onClick:o[0]||(o[0]=s=>i("save"))},{default:B(()=>[W("保存")]),_:1}),C(r,{size:"small",text:"",severity:"contrast",onClick:o[1]||(o[1]=s=>i("cancel"))},{default:B(()=>[W("取消")]),_:1})])])):V("",!0)]),_:1})])}}}),$o=$e(_o,[["__scopeId","data-v-3d7c63b5"]]),Eo=ee({name:"FadeAndSlideTransitionGroup",__name:"FadeAndSlideTransitionGroup",setup(t){const e=ze(null),n=(o,r)=>{console.log("onEnter");const s=e.value.$el,l=o;let u=o.clientHeight;s.style.height=`${u}px`,l.style.visibility="hidden";let f=setInterval(()=>{const k=o.clientHeight;k!==u&&(s.style.height=`${k}px`,u=k)},100);setTimeout(()=>{l.style.visibility="",s.style.opacity="1"},150),setTimeout(()=>{clearInterval(f),s.style.height="",s.style.opacity="",r()},400)},i=(o,r)=>{console.log("onLeave");const s=e.value.$el,l=o.clientHeight;s.style.height=`${l}px`,s.style.opacity="0",setTimeout(()=>{console.log("onLeave done"),r()},150)},a=()=>{};return(o,r)=>(c(),$(go,{name:"fade-and-slide",tag:"div",class:"fade-and-slide",ref_key:"transitionRef",ref:e,onEnter:n,onLeave:i,onAfterEnter:a,mode:"out-in"},{default:B(()=>[x(o.$slots,"default",{},void 0,!0)]),_:3},512))}}),gt=$e(Eo,[["__scopeId","data-v-f3577f21"]]);var Kt={name:"ChevronDownIcon",extends:fe},Ao=d("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1),xo=[Ao];function Vo(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),xo,16)}Kt.render=Vo;var Do=function(e){var n=e.dt;return`
.p-select {
    display: inline-flex;
    cursor: pointer;
    position: relative;
    user-select: none;
    background: `.concat(n("select.background"),`;
    border: 1px solid `).concat(n("select.border.color"),`;
    transition: background `).concat(n("select.transition.duration"),", color ").concat(n("select.transition.duration"),", border-color ").concat(n("select.transition.duration"),`,
        outline-color `).concat(n("select.transition.duration"),", box-shadow ").concat(n("select.transition.duration"),`;
    border-radius: `).concat(n("select.border.radius"),`;
    outline-color: transparent;
    box-shadow: `).concat(n("select.shadow"),`;
}

.p-select:not(.p-disabled):hover {
    border-color: `).concat(n("select.hover.border.color"),`;
}

.p-select:not(.p-disabled).p-focus {
    border-color: `).concat(n("select.focus.border.color"),`;
    box-shadow: `).concat(n("select.focus.ring.shadow"),`;
    outline: `).concat(n("select.focus.ring.width")," ").concat(n("select.focus.ring.style")," ").concat(n("select.focus.ring.color"),`;
    outline-offset: `).concat(n("select.focus.ring.offset"),`;
}

.p-select.p-variant-filled {
    background: `).concat(n("select.filled.background"),`;
}

.p-select.p-variant-filled.p-focus {
    background: `).concat(n("select.filled.focus.background"),`;
}

.p-select.p-invalid {
    border-color: `).concat(n("select.invalid.border.color"),`;
}

.p-select.p-disabled {
    opacity: 1;
    background: `).concat(n("select.disabled.background"),`;
}

.p-select-clear-icon {
    position: absolute;
    top: 50%;
    margin-top: -0.5rem;
    color: `).concat(n("select.clear.icon.color"),`;
    right: `).concat(n("select.dropdown.width"),`;
}

.p-select-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: `).concat(n("select.dropdown.color"),`;
    width: `).concat(n("select.dropdown.width"),`;
    border-top-right-radius: `).concat(n("select.border.radius"),`;
    border-bottom-right-radius: `).concat(n("select.border.radius"),`;
}

.p-select-label {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    flex: 1 1 auto;
    width: 1%;
    padding: `).concat(n("select.padding.y")," ").concat(n("select.padding.x"),`;
    text-overflow: ellipsis;
    cursor: pointer;
    color: `).concat(n("select.color"),`;
    background: transparent;
    border: 0 none;
    outline: 0 none;
}

.p-select-label.p-placeholder {
    color: `).concat(n("select.placeholder.color"),`;
}

.p-select:has(.p-select-clear-icon) .p-select-label {
    padding-right: calc(1rem + `).concat(n("select.padding.x"),`);
}

.p-select.p-disabled .p-select-label {
    color: `).concat(n("select.disabled.color"),`;
}

.p-select-label-empty {
    overflow: hidden;
    opacity: 0;
}

input.p-select-label {
    cursor: default;
}

.p-select .p-select-overlay {
    min-width: 100%;
}

.p-select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    background: `).concat(n("select.overlay.background"),`;
    color: `).concat(n("select.overlay.color"),`;
    border: 1px solid `).concat(n("select.overlay.border.color"),`;
    border-radius: `).concat(n("select.overlay.border.radius"),`;
    box-shadow: `).concat(n("select.overlay.shadow"),`;
}

.p-select-header {
    padding: `).concat(n("select.list.header.padding"),`;
}

.p-select-filter {
    width: 100%;
}

.p-select-list-container {
    overflow: auto;
}

.p-select-option-group {
    cursor: auto;
    margin: 0;
    padding: `).concat(n("select.option.group.padding"),`;
    background: `).concat(n("select.option.group.background"),`;
    color: `).concat(n("select.option.group.color"),`;
    font-weight: `).concat(n("select.option.group.font.weight"),`;
}

.p-select-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
    padding: `).concat(n("select.list.padding"),`;
    gap: `).concat(n("select.list.gap"),`;
    display: flex;
    flex-direction: column;
}

.p-select-option {
    cursor: pointer;
    font-weight: normal;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: `).concat(n("select.option.padding"),`;
    border: 0 none;
    color: `).concat(n("select.option.color"),`;
    background: transparent;
    transition: background `).concat(n("select.transition.duration"),", color ").concat(n("select.transition.duration"),", border-color ").concat(n("select.transition.duration"),`,
            box-shadow `).concat(n("select.transition.duration"),", outline-color ").concat(n("select.transition.duration"),`;
    border-radius: `).concat(n("select.option.border.radius"),`;
}

.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {
    background: `).concat(n("select.option.focus.background"),`;
    color: `).concat(n("select.option.focus.color"),`;
}

.p-select-option.p-select-option-selected {
    background: `).concat(n("select.option.selected.background"),`;
    color: `).concat(n("select.option.selected.color"),`;
}

.p-select-option.p-select-option-selected.p-focus {
    background: `).concat(n("select.option.selected.focus.background"),`;
    color: `).concat(n("select.option.selected.focus.color"),`;
}

.p-select-option-check-icon {
    position: relative;
    margin-inline-start: `).concat(n("select.checkmark.gutter.start"),`;
    margin-inline-end: `).concat(n("select.checkmark.gutter.end"),`;
    color: `).concat(n("select.checkmark.color"),`;
}

.p-select-empty-message {
    padding: `).concat(n("select.empty.message.padding"),`;
}

.p-fluid .p-select {
    display: flex;
}

.p-fluid .p-select-label {
    width: 1%;
}
`)},Fo={root:function(e){var n=e.instance,i=e.props,a=e.state;return["p-select p-component p-inputwrapper",{"p-disabled":i.disabled,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled"||n.$primevue.config.inputVariant==="filled","p-focus":a.focused,"p-inputwrapper-filled":n.hasSelectedOption,"p-inputwrapper-focus":a.focused||a.overlayVisible,"p-select-open":a.overlayVisible}]},label:function(e){var n=e.instance,i=e.props;return["p-select-label",{"p-placeholder":!i.editable&&n.label===i.placeholder,"p-select-label-empty":!i.editable&&!n.$slots.value&&(n.label==="p-emptylabel"||n.label.length===0)}]},clearIcon:"p-select-clear-icon",dropdown:"p-select-dropdown",loadingicon:"p-select-loading-icon",dropdownIcon:"p-select-dropdown-icon",overlay:"p-select-overlay p-component",header:"p-select-header",pcFilter:"p-select-filter",listContainer:"p-select-list-container",list:"p-select-list",optionGroup:"p-select-option-group",optionGroupLabel:"p-select-option-group-label",option:function(e){var n=e.instance,i=e.props,a=e.state,o=e.option,r=e.focusedOption;return["p-select-option",{"p-select-option-selected":n.isSelected(o)&&i.highlightOnSelect,"p-focus":a.focusedOptionIndex===r,"p-disabled":n.isOptionDisabled(o)}]},optionLabel:"p-select-option-label",optionCheckIcon:"p-select-option-check-icon",optionBlankIcon:"p-select-option-blank-icon",emptyMessage:"p-select-empty-message"},Mo=oe.extend({name:"select",theme:Do,classes:Fo}),Ro={name:"BaseSelect",extends:K,props:{modelValue:null,options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:"14rem"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},labelId:{type:String,default:null},labelClass:{type:[String,Object],default:null},labelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:Mo,provide:function(){return{$pcSelect:this,$parentInstance:this}}};function Oe(t){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(t)}function No(t){return zo(t)||Ko(t)||jo(t)||Uo()}function Uo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jo(t,e){if(t){if(typeof t=="string")return at(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(t,e):void 0}}function Ko(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function zo(t){if(Array.isArray(t))return at(t)}function at(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lt(Object(n),!0).forEach(function(i){zt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function zt(t,e,n){return(e=Ho(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ho(t){var e=Go(t,"string");return Oe(e)=="symbol"?e:e+""}function Go(t,e){if(Oe(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Oe(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var be={name:"Select",extends:Ro,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||Pe()},modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||Pe(),this.autoUpdateModel(),this.bindLabelClickListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(Xe.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,n){return this.virtualScrollerDisabled?e:n&&n(e).index},getOptionLabel:function(e){return this.optionLabel?U.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?U.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,n){return(this.dataKey?U.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+n},getPTItemOptions:function(e,n,i,a){return this.ptm(a,{context:{option:e,index:i,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,n),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?U.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return U.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return U.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var n=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(i){return n.isOptionGroup(i)}).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),e&&A.focus(this.$refs.focusInput)},hide:function(e){var n=this,i=function(){n.$emit("before-hide"),n.overlayVisible=!1,n.clicked=!1,n.focusedOptionIndex=-1,n.searchValue="",n.resetFilterOnHide&&(n.filterValue=null),e&&A.focus(n.$refs.focusInput)};setTimeout(function(){i()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||A.isAndroid()){e.preventDefault();return}var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!n&&U.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked=!1},onEditableInput:function(e){var n=e.target.value;this.searchValue="";var i=this.searchOptions(e,n);!i&&(this.focusedOptionIndex=-1),this.updateModel(e,n),!this.overlayVisible&&U.isNotEmpty(n)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]')||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?A.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;A.focus(n)},onLastHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?A.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;A.focus(n)},onOptionSelect:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=this.getOptionValue(n);this.updateModel(e,a),i&&this.hide(!0)},onOptionMouseMove:function(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)},onFilterChange:function(e){var n=e.target.value;this.filterValue=n,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:n}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){to.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{var n=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n)}e.preventDefault()},onArrowUpKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!n)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var i=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;e.shiftKey?i.setSelectionRange(0,e.target.selectionStart):(i.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onEndKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;if(e.shiftKey)i.setSelectionRange(e.target.selectionStart,i.value.length);else{var a=i.value.length;i.setSelectionRange(a,a),this.focusedOptionIndex=-1}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;!n&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()},onTabKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||(this.overlayVisible&&this.hasFocusableElements()?(A.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){Xe.set("overlay",e,this.$primevue.config.zIndex.overlay),A.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&A.focus(this.$refs.filterInput.$el)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){Xe.clear(e)},alignOverlay:function(){this.appendTo==="self"?A.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=A.getOuterWidth(this.$el)+"px",A.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.overlayVisible&&e.overlay&&!e.$el.contains(n.target)&&!e.overlay.contains(n.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new yo(this.$refs.container,function(){e.overlayVisible&&e.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!A.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var n=document.querySelector('label[for="'.concat(this.inputId,'"]'));n&&A.isVisible(n)&&(this.labelClickListener=function(){A.focus(e.$refs.focusInput)},n.addEventListener("click",this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector('label[for="'.concat(this.inputId,'"]'));e&&A.isVisible(e)&&e.removeEventListener("click",this.labelClickListener)}},hasFocusableElements:function(){return A.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){var n;return this.isValidOption(e)&&typeof this.getOptionLabel(e)=="string"&&((n=this.getOptionLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return U.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.isValidOption(e)&&U.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(n){return e.isValidOption(n)})},findLastOptionIndex:function(){var e=this;return U.findLastIndex(this.visibleOptions,function(n){return e.isValidOption(n)})},findNextOptionIndex:function(e){var n=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(a){return n.isValidOption(a)}):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var n=this,i=e>0?U.findLastIndex(this.visibleOptions.slice(0,e),function(a){return n.isValidOption(a)}):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex(function(n){return e.isValidSelectedOption(n)}):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,n){var i=this;this.searchValue=(this.searchValue||"")+n;var a=-1,o=!1;return U.isNotEmpty(this.searchValue)&&(this.focusedOptionIndex!==-1?(a=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(r){return i.isOptionMatched(r)}),a=a===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(function(r){return i.isOptionMatched(r)}):a+this.focusedOptionIndex):a=this.visibleOptions.findIndex(function(r){return i.isOptionMatched(r)}),a!==-1&&(o=!0),a===-1&&this.focusedOptionIndex===-1&&(a=this.findFirstFocusedOptionIndex()),a!==-1&&this.changeFocusedOptionIndex(e,a)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){i.searchValue="",i.searchTimeout=null},500),o},changeFocusedOptionIndex:function(e,n){this.focusedOptionIndex!==n&&(this.focusedOptionIndex=n,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[n],!1))},scrollInView:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var i=n!==-1?"".concat(e.id,"_").concat(n):e.focusedOptionId,a=A.findSingle(e.list,'li[id="'.concat(i,'"]'));a?a.scrollIntoView&&a.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(n!==-1?n:e.focusedOptionIndex)})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},flatOptions:function(e){var n=this;return(e||[]).reduce(function(i,a,o){i.push({optionGroup:a,group:!0,index:o});var r=n.getOptionGroupChildren(a);return r&&r.forEach(function(s){return i.push(s)}),i},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,n){this.list=e,n&&n(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,n=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var i=wo.filter(n,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var a=this.options||[],o=[];return a.forEach(function(r){var s=e.getOptionGroupChildren(r),l=s.filter(function(u){return i.includes(u)});l.length>0&&o.push(Pt(Pt({},r),{},zt({},typeof e.optionGroupChildren=="string"?e.optionGroupChildren:"items",No(l))))}),this.flatOptions(o)}return i}return n},hasSelectedOption:function(){return U.isNotEmpty(this.modelValue)},label:function(){var e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue:function(){var e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return U.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex!==-1?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(n){return!e.isOptionGroup(n)}).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:he},components:{InputText:Ue,VirtualScroller:no,Portal:oo,InputIcon:io,IconField:ao,TimesIcon:ro,ChevronDownIcon:Kt,SpinnerIcon:ho,SearchIcon:so,CheckIcon:lo,BlankIcon:co}},Wo=["id"],Jo=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],qo=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],Yo=["id"],Zo=["id"],Qo=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-selected","data-p-focused","data-p-disabled"];function Xo(t,e,n,i,a,o){var r=N("SpinnerIcon"),s=N("InputText"),l=N("SearchIcon"),u=N("InputIcon"),f=N("IconField"),k=N("CheckIcon"),g=N("BlankIcon"),h=N("VirtualScroller"),v=N("Portal"),I=de("ripple");return c(),y("div",m({ref:"container",id:a.id,class:t.cx("root"),onClick:e[11]||(e[11]=function(){return o.onContainerClick&&o.onContainerClick.apply(o,arguments)})},t.ptmi("root")),[t.editable?(c(),y("input",m({key:0,ref:"focusInput",id:t.labelId||t.inputId,type:"text",class:[t.cx("label"),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],value:o.editableInputValue,placeholder:t.placeholder,tabindex:t.disabled?-1:t.tabindex,disabled:t.disabled,autocomplete:"off",role:"combobox","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":a.overlayVisible,"aria-controls":a.id+"_list","aria-activedescendant":a.focused?o.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,onFocus:e[0]||(e[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[2]||(e[2]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)}),onInput:e[3]||(e[3]=function(){return o.onEditableInput&&o.onEditableInput.apply(o,arguments)})},t.ptm("label")),null,16,Jo)):(c(),y("span",m({key:1,ref:"focusInput",id:t.labelId||t.inputId,class:[t.cx("label"),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],tabindex:t.disabled?-1:t.tabindex,role:"combobox","aria-label":t.ariaLabel||(o.label==="p-emptylabel"?void 0:o.label),"aria-labelledby":t.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":a.overlayVisible,"aria-controls":a.id+"_list","aria-activedescendant":a.focused?o.focusedOptionId:void 0,"aria-disabled":t.disabled,onFocus:e[4]||(e[4]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[5]||(e[5]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[6]||(e[6]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)})},t.ptm("label")),[x(t.$slots,"value",{value:t.modelValue,placeholder:t.placeholder},function(){return[W(j(o.label==="p-emptylabel"?" ":o.label||"empty"),1)]})],16,qo)),t.showClear&&t.modelValue!=null?x(t.$slots,"clearicon",{key:2,class:H(t.cx("clearIcon")),clearCallback:o.onClearClick},function(){return[(c(),$(q(t.clearIcon?"i":"TimesIcon"),m({ref:"clearIcon",class:[t.cx("clearIcon"),t.clearIcon],onClick:o.onClearClick},t.ptm("clearIcon"),{"data-pc-section":"clearicon"}),null,16,["class","onClick"]))]}):V("",!0),d("div",m({class:t.cx("dropdown")},t.ptm("dropdown")),[t.loading?x(t.$slots,"loadingicon",{key:0,class:H(t.cx("loadingIcon"))},function(){return[t.loadingIcon?(c(),y("span",m({key:0,class:[t.cx("loadingIcon"),"pi-spin",t.loadingIcon],"aria-hidden":"true"},t.ptm("loadingIcon")),null,16)):(c(),$(r,m({key:1,class:t.cx("loadingIcon"),spin:"","aria-hidden":"true"},t.ptm("loadingIcon")),null,16,["class"]))]}):x(t.$slots,"dropdownicon",{key:1,class:H(t.cx("dropdownIcon"))},function(){return[(c(),$(q(t.dropdownIcon?"span":"ChevronDownIcon"),m({class:[t.cx("dropdownIcon"),t.dropdownIcon],"aria-hidden":"true"},t.ptm("dropdownIcon")),null,16,["class"]))]})],16),C(v,{appendTo:t.appendTo},{default:B(function(){return[C(Rt,m({name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},t.ptm("transition")),{default:B(function(){return[a.overlayVisible?(c(),y("div",m({key:0,ref:o.overlayRef,class:[t.cx("overlay"),t.panelClass,t.overlayClass],style:[t.panelStyle,t.overlayStyle],onClick:e[9]||(e[9]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),onKeydown:e[10]||(e[10]=function(){return o.onOverlayKeyDown&&o.onOverlayKeyDown.apply(o,arguments)})},t.ptm("overlay")),[d("span",m({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[7]||(e[7]=function(){return o.onFirstHiddenFocus&&o.onFirstHiddenFocus.apply(o,arguments)})},t.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),x(t.$slots,"header",{value:t.modelValue,options:o.visibleOptions}),t.filter?(c(),y("div",m({key:0,class:t.cx("header")},t.ptm("header")),[C(f,m({unstyled:t.unstyled},t.ptm("pcFilterContainer")),{default:B(function(){return[C(s,{ref:"filterInput",type:"text",value:a.filterValue,onVnodeMounted:o.onFilterUpdated,onVnodeUpdated:o.onFilterUpdated,class:H(t.cx("pcFilter")),placeholder:t.filterPlaceholder,variant:t.variant,unstyled:t.unstyled,role:"searchbox",autocomplete:"off","aria-owns":a.id+"_list","aria-activedescendant":o.focusedOptionId,onKeydown:o.onFilterKeyDown,onBlur:o.onFilterBlur,onInput:o.onFilterChange,pt:t.ptm("pcFilter")},null,8,["value","onVnodeMounted","onVnodeUpdated","class","placeholder","variant","unstyled","aria-owns","aria-activedescendant","onKeydown","onBlur","onInput","pt"]),C(u,m({unstyled:t.unstyled},t.ptm("pcFilterIconContainer")),{default:B(function(){return[x(t.$slots,"filtericon",{},function(){return[t.filterIcon?(c(),y("span",m({key:0,class:t.filterIcon},t.ptm("filterIcon")),null,16)):(c(),$(l,Nt(m({key:1},t.ptm("filterIcon"))),null,16))]})]}),_:3},16,["unstyled"])]}),_:3},16,["unstyled"]),d("span",m({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),j(o.filterResultMessageText),17)],16)):V("",!0),d("div",m({class:t.cx("listContainer"),style:{"max-height":o.virtualScrollerDisabled?t.scrollHeight:""}},t.ptm("listContainer")),[C(h,m({ref:o.virtualScrollerRef},t.virtualScrollerOptions,{items:o.visibleOptions,style:{height:t.scrollHeight},tabindex:-1,disabled:o.virtualScrollerDisabled,pt:t.ptm("virtualScroller")}),ue({content:B(function(L){var w=L.styleClass,O=L.contentRef,T=L.items,S=L.getItemOptions,P=L.contentStyle,_=L.itemSize;return[d("ul",m({ref:function(R){return o.listRef(R,O)},id:a.id+"_list",class:[t.cx("list"),w],style:P,role:"listbox"},t.ptm("list")),[(c(!0),y(Y,null,ge(T,function(E,R){return c(),y(Y,{key:o.getOptionRenderKey(E,o.getOptionIndex(R,S))},[o.isOptionGroup(E)?(c(),y("li",m({key:0,id:a.id+"_"+o.getOptionIndex(R,S),style:{height:_?_+"px":void 0},class:t.cx("optionGroup"),role:"option",ref_for:!0},t.ptm("optionGroup")),[x(t.$slots,"optiongroup",{option:E.optionGroup,index:o.getOptionIndex(R,S)},function(){return[d("span",m({class:t.cx("optionGroupLabel"),ref_for:!0},t.ptm("optionGroupLabel")),j(o.getOptionGroupLabel(E.optionGroup)),17)]})],16,Zo)):ae((c(),y("li",m({key:1,id:a.id+"_"+o.getOptionIndex(R,S),class:t.cx("option",{option:E,focusedOption:o.getOptionIndex(R,S)}),style:{height:_?_+"px":void 0},role:"option","aria-label":o.getOptionLabel(E),"aria-selected":o.isSelected(E),"aria-disabled":o.isOptionDisabled(E),"aria-setsize":o.ariaSetSize,"aria-posinset":o.getAriaPosInset(o.getOptionIndex(R,S)),onClick:function(z){return o.onOptionSelect(z,E)},onMousemove:function(z){return o.onOptionMouseMove(z,o.getOptionIndex(R,S))},"data-p-selected":o.isSelected(E),"data-p-focused":a.focusedOptionIndex===o.getOptionIndex(R,S),"data-p-disabled":o.isOptionDisabled(E),ref_for:!0},o.getPTItemOptions(E,S,R,"option")),[t.checkmark?(c(),y(Y,{key:0},[o.isSelected(E)?(c(),$(k,m({key:0,class:t.cx("optionCheckIcon"),ref_for:!0},t.ptm("optionCheckIcon")),null,16,["class"])):(c(),$(g,m({key:1,class:t.cx("optionBlankIcon"),ref_for:!0},t.ptm("optionBlankIcon")),null,16,["class"]))],64)):V("",!0),x(t.$slots,"option",{option:E,selected:o.isSelected(E),index:o.getOptionIndex(R,S)},function(){return[d("span",m({class:t.cx("optionLabel"),ref_for:!0},t.ptm("optionLabel")),j(o.getOptionLabel(E)),17)]})],16,Qo)),[[I]])],64)}),128)),a.filterValue&&(!T||T&&T.length===0)?(c(),y("li",m({key:0,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[x(t.$slots,"emptyfilter",{},function(){return[W(j(o.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(c(),y("li",m({key:1,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[x(t.$slots,"empty",{},function(){return[W(j(o.emptyMessageText),1)]})],16)):V("",!0)],16,Yo)]}),_:2},[t.$slots.loader?{name:"loader",fn:B(function(L){var w=L.options;return[x(t.$slots,"loader",{options:w})]}),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),x(t.$slots,"footer",{value:t.modelValue,options:o.visibleOptions}),!t.options||t.options&&t.options.length===0?(c(),y("span",m({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),j(o.emptyMessageText),17)):V("",!0),d("span",m({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),j(o.selectedMessageText),17),d("span",m({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[8]||(e[8]=function(){return o.onLastHiddenFocus&&o.onLastHiddenFocus.apply(o,arguments)})},t.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):V("",!0)]}),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])],16,Wo)}be.render=Xo;var ei=function(e){var n=e.dt;return`
.p-toggleswitch {
    display: inline-block;
    width: `.concat(n("toggleswitch.width"),`;
    height: `).concat(n("toggleswitch.height"),`;
}

.p-toggleswitch-input {
    cursor: pointer;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    z-index: 1;
    outline: 0 none;
    border-radius: `).concat(n("toggleswitch.border.radius"),`;
}

.p-toggleswitch-slider {
    display: inline-block;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border-width: `).concat(n("toggleswitch.border.width"),`;
    border-style: solid;
    border-color: `).concat(n("toggleswitch.border.color"),`;
    background: `).concat(n("toggleswitch.background"),`;
    transition: background `).concat(n("toggleswitch.transition.duration"),", color ").concat(n("toggleswitch.transition.duration"),", border-color ").concat(n("toggleswitch.transition.duration"),", outline-color ").concat(n("toggleswitch.transition.duration"),", box-shadow ").concat(n("toggleswitch.transition.duration"),`;
    border-radius: `).concat(n("toggleswitch.border.radius"),`;
    outline-color: transparent;
    box-shadow: `).concat(n("toggleswitch.shadow"),`;
}

.p-toggleswitch-slider:before {
    position: absolute;
    content: "";
    top: 50%;
    background: `).concat(n("toggleswitch.handle.background"),`;
    width: `).concat(n("toggleswitch.handle.size"),`;
    height: `).concat(n("toggleswitch.handle.size"),`;
    left: `).concat(n("toggleswitch.gap"),`;
    margin-top: calc(-1 * calc(`).concat(n("toggleswitch.handle.size"),` / 2));
    border-radius: `).concat(n("toggleswitch.handle.border.radius"),`;
    transition: background `).concat(n("toggleswitch.transition.duration"),", left ").concat(n("toggleswitch.slide.duration"),`;
}

.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
    background: `).concat(n("toggleswitch.checked.background"),`;
    border-color: `).concat(n("toggleswitch.checked.border.color"),`;
}

.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider:before {
    background: `).concat(n("toggleswitch.handle.checked.background"),`;
    left: calc(`).concat(n("toggleswitch.width")," - calc(").concat(n("toggleswitch.handle.size")," + ").concat(n("toggleswitch.gap"),`));
}

.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
    background: `).concat(n("toggleswitch.hover.background"),`;
    border-color: `).concat(n("toggleswitch.hover.border.color"),`;
}

.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider:before {
    background: `).concat(n("toggleswitch.handle.hover.background"),`;
}

.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
    background: `).concat(n("toggleswitch.checked.hover.background"),`;
    border-color: `).concat(n("toggleswitch.checked.hover.border.color"),`;
}

.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider:before {
    background: `).concat(n("toggleswitch.handle.checked.hover.background"),`;
}

.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {
    box-shadow: `).concat(n("toggleswitch.focus.ring.shadow"),`;
    outline: `).concat(n("toggleswitch.focus.ring.width")," ").concat(n("toggleswitch.focus.ring.style")," ").concat(n("toggleswitch.focus.ring.color"),`;
    outline-offset: `).concat(n("toggleswitch.focus.ring.offset"),`;
}

.p-toggleswitch.p-invalid > .p-toggleswitch-slider {
    border-color: `).concat(n("toggleswitch.invalid.border.color"),`;
}
`)},ti={root:{position:"relative"}},ni={root:function(e){var n=e.instance,i=e.props;return["p-toggleswitch p-component",{"p-toggleswitch-checked":n.checked,"p-disabled":i.disabled,"p-invalid":i.invalid}]},input:"p-toggleswitch-input",slider:"p-toggleswitch-slider"},oi=oe.extend({name:"toggleswitch",theme:ei,classes:ni,inlineStyles:ti}),ii={name:"BaseToggleSwitch",extends:K,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:oi,provide:function(){return{$pcToggleSwitch:this,$parentInstance:this}}},Ht={name:"ToggleSwitch",extends:ii,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(e){var n=e==="root"?this.ptmi:this.ptm;return n(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){if(!this.disabled&&!this.readonly){var n=this.checked?this.falseValue:this.trueValue;this.$emit("update:modelValue",n),this.$emit("change",e)}},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}},ai=["data-p-checked","data-p-disabled"],ri=["id","checked","tabindex","disabled","readonly","aria-checked","aria-labelledby","aria-label","aria-invalid"];function si(t,e,n,i,a,o){return c(),y("div",m({class:t.cx("root"),style:t.sx("root")},o.getPTOptions("root"),{"data-p-checked":o.checked,"data-p-disabled":t.disabled}),[d("input",m({id:t.inputId,type:"checkbox",role:"switch",class:[t.cx("input"),t.inputClass],style:t.inputStyle,checked:o.checked,tabindex:t.tabindex,disabled:t.disabled,readonly:t.readonly,"aria-checked":o.checked,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-invalid":t.invalid||void 0,onFocus:e[0]||(e[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onChange:e[2]||(e[2]=function(){return o.onChange&&o.onChange.apply(o,arguments)})},o.getPTOptions("input")),null,16,ri),d("span",m({class:t.cx("slider")},o.getPTOptions("slider")),null,16)],16,ai)}Ht.render=si;const Ot=(t,e)=>{if(!t||!e)return[];let n=[];for(let i in t){const a=t[i],o=e[i];if(typeof a!=typeof o)n.push(i);else if(Array.isArray(a)&&Array.isArray(o)){if(a.length!==o.length)n.push(i);else for(let r=0;r<a.length;r++)if(a[r]!==o[r]){n.push(i);break}}else typeof a=="object"&&typeof o=="object"?JSON.stringify(a)!==JSON.stringify(o)&&n.push(i):t[i]!==e[i]&&n.push(i)}return n.length>0?n:!1};function Tt(t){return new Promise(e=>{setTimeout(e,t)})}function Gt(t){t.select(),document.execCommand?document.execCommand("copy"):navigator.clipboard&&navigator.clipboard.writeText(t.value)}const Wt=t=>(je("data-v-8b523981"),t=t(),Ke(),t),li={key:0},ci=["src"],ui={class:"flex flex-col items-start mt-4"},di=Wt(()=>d("span",{class:"block font-semibold mb-2"},"选择主题：",-1)),pi={key:0,class:"flex justify-start gap-4 items-center mt-4"},fi={class:"block font-semibold"},hi={key:1,class:"flex flex-col items-start mt-4"},gi={class:"block font-semibold mb-2"},bi={key:2,class:"flex flex-col items-start mt-4"},mi={class:"block font-semibold mb-2"},vi={key:3,class:"flex flex-col items-start mt-4"},yi={class:"block font-semibold mb-2"},wi={class:"flex flex-col items-start mt-4"},Ci=Wt(()=>d("span",{class:"block font-semibold mb-2"},"请使用以下URL添加浏览器源：",-1)),ki={key:1,class:"flex items-center justify-center h-[20rem]"},Ii=ee({name:"GetLiveCompDialog",__name:"GetLiveCompDialog",props:Le({clientId:{}},{visible:{},visibleModifiers:{}}),emits:["update:visible"],setup(t){const e=ht(),n=t,i=He(t,"visible"),a=Ge({theme:"default",chartParams:{},themeLoading:!1}),o=g=>g.replace(/^\//,"")||"default",r=J(()=>ko.map(g=>{var h;return{label:g.name,value:o(g.path),params:((h=g.meta)==null?void 0:h.params)??[]}})),s=g=>{const h={};for(let[v,I]of Object.entries(g))typeof I=="string"?I!==""&&(h[v]=I):typeof I=="boolean"?I&&(h[v]="true"):I!=null&&(h[v]=I.toString());return h},l=J(()=>{var g;return((g=r.value.find(h=>h.value===a.theme))==null?void 0:g.params)??[]}),u=J(()=>{const g=location.origin+"/".replace(/\/$/,"");if(n.clientId){const h=a.theme==="default"?"":a.theme;let v=`${g}/viewer.html?clientId=${n.clientId}#/${h}`;return Object.keys(a.chartParams).length&&(v+="?"+new URLSearchParams(s(a.chartParams)).toString()),v}else return""}),f=ze(null),k=()=>{f.value&&(Gt(f.value.$el),e.add({severity:"success",summary:"提示",detail:"复制成功",life:3e3}))};return(g,h)=>{const v=Ue,I=Mt,L=ne,w=ft,O=Dt,T=gt,S=_e;return c(),$(S,{visible:i.value,"onUpdate:visible":h[1]||(h[1]=P=>i.value=P),modal:"",header:"添加到OBS",class:"mx-4 w-full md:w-[40rem]"},{default:B(()=>[C(p(Vt)),C(T,null,{default:B(()=>[n.clientId?(c(),y("div",li,[d("iframe",{src:p(u),class:"w-full h-[20rem] mb-2"},null,8,ci),d("div",ui,[di,C(p(be),{modelValue:p(a).theme,"onUpdate:modelValue":h[0]||(h[0]=P=>p(a).theme=P),options:p(r),optionLabel:"label",optionValue:"value",loading:p(a).themeLoading,placeholder:"请选择主题",class:"w-full"},null,8,["modelValue","options","loading"])]),(c(!0),y(Y,null,ge(p(l),P=>(c(),y(Y,{key:P.name},[P.type==="boolean"?(c(),y("div",pi,[d("span",fi,j(P.name)+"：",1),C(p(Ht),{modelValue:p(a).chartParams[P.prop],"onUpdate:modelValue":_=>p(a).chartParams[P.prop]=_,class:"w-[4rem]"},null,8,["modelValue","onUpdate:modelValue"])])):P.type==="string"?(c(),y("div",hi,[d("span",gi,j(P.name)+"：",1),C(v,{modelValue:p(a).chartParams[P.prop],"onUpdate:modelValue":_=>p(a).chartParams[P.prop]=_,class:"w-full"},null,8,["modelValue","onUpdate:modelValue"])])):P.type==="int"||P.type==="float"?(c(),y("div",bi,[d("span",mi,j(P.name)+"：",1),P.type==="int"?(c(),$(I,{key:0,modelValue:p(a).chartParams[P.prop],"onUpdate:modelValue":_=>p(a).chartParams[P.prop]=_,class:"w-full",showButtons:""},null,8,["modelValue","onUpdate:modelValue"])):(c(),$(I,{key:1,modelValue:p(a).chartParams[P.prop],"onUpdate:modelValue":_=>p(a).chartParams[P.prop]=_,class:"w-full",showButtons:"",minFractionDigits:1,maxFractionDigits:6},null,8,["modelValue","onUpdate:modelValue"]))])):P.type==="select"&&Array.isArray(P.options)?(c(),y("div",vi,[d("span",yi,j(P.name)+"：",1),C(p(be),{modelValue:p(a).chartParams[P.prop],"onUpdate:modelValue":_=>p(a).chartParams[P.prop]=_,options:P.options,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options"])])):V("",!0)],64))),128)),d("div",wi,[Ci,C(w,null,{default:B(()=>[C(v,{value:p(u),class:"copy-input",ref_key:"urlInputRef",ref:f,readonly:""},null,8,["value"]),C(L,{icon:"pi pi-copy",label:"复制地址",severity:"secondary",onClick:k})]),_:1})])])):(c(),y("div",ki,[C(O)]))]),_:1})]),_:1},8,["visible"])}}}),Si=$e(Ii,[["__scopeId","data-v-8b523981"]]);var Ee={},Li=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Jt={},Z={};let bt;const Pi=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Z.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Z.getSymbolTotalCodewords=function(e){return Pi[e]};Z.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Z.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');bt=e};Z.isKanjiModeEnabled=function(){return typeof bt<"u"};Z.toSJIS=function(e){return bt(e)};var We={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,a){if(t.isValid(i))return i;try{return e(i)}catch{return a}}})(We);function qt(){this.buffer=[],this.length=0}qt.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Oi=qt;function Ae(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Ae.prototype.set=function(t,e,n,i){const a=t*this.size+e;this.data[a]=n,i&&(this.reservedBit[a]=!0)};Ae.prototype.get=function(t,e){return this.data[t*this.size+e]};Ae.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Ae.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Ti=Ae,Yt={};(function(t){const e=Z.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const a=Math.floor(i/7)+2,o=e(i),r=o===145?26:Math.ceil((o-13)/(2*a-2))*2,s=[o-7];for(let l=1;l<a-1;l++)s[l]=s[l-1]-r;return s.push(6),s.reverse()},t.getPositions=function(i){const a=[],o=t.getRowColCoords(i),r=o.length;for(let s=0;s<r;s++)for(let l=0;l<r;l++)s===0&&l===0||s===0&&l===r-1||s===r-1&&l===0||a.push([o[s],o[l]]);return a}})(Yt);var Zt={};const Bi=Z.getSymbolSize,Bt=7;Zt.getPositions=function(e){const n=Bi(e);return[[0,0],[n-Bt,0],[0,n-Bt]]};var Qt={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(a){return a!=null&&a!==""&&!isNaN(a)&&a>=0&&a<=7},t.from=function(a){return t.isValid(a)?parseInt(a,10):void 0},t.getPenaltyN1=function(a){const o=a.size;let r=0,s=0,l=0,u=null,f=null;for(let k=0;k<o;k++){s=l=0,u=f=null;for(let g=0;g<o;g++){let h=a.get(k,g);h===u?s++:(s>=5&&(r+=e.N1+(s-5)),u=h,s=1),h=a.get(g,k),h===f?l++:(l>=5&&(r+=e.N1+(l-5)),f=h,l=1)}s>=5&&(r+=e.N1+(s-5)),l>=5&&(r+=e.N1+(l-5))}return r},t.getPenaltyN2=function(a){const o=a.size;let r=0;for(let s=0;s<o-1;s++)for(let l=0;l<o-1;l++){const u=a.get(s,l)+a.get(s,l+1)+a.get(s+1,l)+a.get(s+1,l+1);(u===4||u===0)&&r++}return r*e.N2},t.getPenaltyN3=function(a){const o=a.size;let r=0,s=0,l=0;for(let u=0;u<o;u++){s=l=0;for(let f=0;f<o;f++)s=s<<1&2047|a.get(u,f),f>=10&&(s===1488||s===93)&&r++,l=l<<1&2047|a.get(f,u),f>=10&&(l===1488||l===93)&&r++}return r*e.N3},t.getPenaltyN4=function(a){let o=0;const r=a.data.length;for(let l=0;l<r;l++)o+=a.data[l];return Math.abs(Math.ceil(o*100/r/5)-10)*e.N4};function n(i,a,o){switch(i){case t.Patterns.PATTERN000:return(a+o)%2===0;case t.Patterns.PATTERN001:return a%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(a+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return a*o%2+a*o%3===0;case t.Patterns.PATTERN110:return(a*o%2+a*o%3)%2===0;case t.Patterns.PATTERN111:return(a*o%3+(a+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(a,o){const r=o.size;for(let s=0;s<r;s++)for(let l=0;l<r;l++)o.isReserved(l,s)||o.xor(l,s,n(a,l,s))},t.getBestMask=function(a,o){const r=Object.keys(t.Patterns).length;let s=0,l=1/0;for(let u=0;u<r;u++){o(u),t.applyMask(u,a);const f=t.getPenaltyN1(a)+t.getPenaltyN2(a)+t.getPenaltyN3(a)+t.getPenaltyN4(a);t.applyMask(u,a),f<l&&(l=f,s=u)}return s}})(Qt);var Je={};const ce=We,Ve=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],De=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Je.getBlocksCount=function(e,n){switch(n){case ce.L:return Ve[(e-1)*4+0];case ce.M:return Ve[(e-1)*4+1];case ce.Q:return Ve[(e-1)*4+2];case ce.H:return Ve[(e-1)*4+3];default:return}};Je.getTotalCodewordsCount=function(e,n){switch(n){case ce.L:return De[(e-1)*4+0];case ce.M:return De[(e-1)*4+1];case ce.Q:return De[(e-1)*4+2];case ce.H:return De[(e-1)*4+3];default:return}};var Xt={},qe={};const Se=new Uint8Array(512),Me=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)Se[n]=e,Me[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)Se[n]=Se[n-255]})();qe.log=function(e){if(e<1)throw new Error("log("+e+")");return Me[e]};qe.exp=function(e){return Se[e]};qe.mul=function(e,n){return e===0||n===0?0:Se[Me[e]+Me[n]]};(function(t){const e=qe;t.mul=function(i,a){const o=new Uint8Array(i.length+a.length-1);for(let r=0;r<i.length;r++)for(let s=0;s<a.length;s++)o[r+s]^=e.mul(i[r],a[s]);return o},t.mod=function(i,a){let o=new Uint8Array(i);for(;o.length-a.length>=0;){const r=o[0];for(let l=0;l<a.length;l++)o[l]^=e.mul(a[l],r);let s=0;for(;s<o.length&&o[s]===0;)s++;o=o.slice(s)}return o},t.generateECPolynomial=function(i){let a=new Uint8Array([1]);for(let o=0;o<i;o++)a=t.mul(a,new Uint8Array([1,e.exp(o)]));return a}})(Xt);const en=Xt;function mt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}mt.prototype.initialize=function(e){this.degree=e,this.genPoly=en.generateECPolynomial(this.degree)};mt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const i=en.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){const o=new Uint8Array(this.degree);return o.set(i,a),o}return i};var _i=mt,tn={},pe={},vt={};vt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var ie={};const nn="[0-9]+",$i="[A-Z $%*+\\-./:]+";let Te="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Te=Te.replace(/u/g,"\\u");const Ei="(?:(?![A-Z0-9 $%*+\\-./:]|"+Te+`)(?:.|[\r
]))+`;ie.KANJI=new RegExp(Te,"g");ie.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ie.BYTE=new RegExp(Ei,"g");ie.NUMERIC=new RegExp(nn,"g");ie.ALPHANUMERIC=new RegExp($i,"g");const Ai=new RegExp("^"+Te+"$"),xi=new RegExp("^"+nn+"$"),Vi=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ie.testKanji=function(e){return Ai.test(e)};ie.testNumeric=function(e){return xi.test(e)};ie.testAlphanumeric=function(e){return Vi.test(e)};(function(t){const e=vt,n=ie;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function i(a){if(typeof a!="string")throw new Error("Param is not a string");switch(a.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+a)}}t.from=function(o,r){if(t.isValid(o))return o;try{return i(o)}catch{return r}}})(pe);(function(t){const e=Z,n=Je,i=We,a=pe,o=vt,r=7973,s=e.getBCHDigit(r);function l(g,h,v){for(let I=1;I<=40;I++)if(h<=t.getCapacity(I,v,g))return I}function u(g,h){return a.getCharCountIndicator(g,h)+4}function f(g,h){let v=0;return g.forEach(function(I){const L=u(I.mode,h);v+=L+I.getBitsLength()}),v}function k(g,h){for(let v=1;v<=40;v++)if(f(g,v)<=t.getCapacity(v,h,a.MIXED))return v}t.from=function(h,v){return o.isValid(h)?parseInt(h,10):v},t.getCapacity=function(h,v,I){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof I>"u"&&(I=a.BYTE);const L=e.getSymbolTotalCodewords(h),w=n.getTotalCodewordsCount(h,v),O=(L-w)*8;if(I===a.MIXED)return O;const T=O-u(I,h);switch(I){case a.NUMERIC:return Math.floor(T/10*3);case a.ALPHANUMERIC:return Math.floor(T/11*2);case a.KANJI:return Math.floor(T/13);case a.BYTE:default:return Math.floor(T/8)}},t.getBestVersionForData=function(h,v){let I;const L=i.from(v,i.M);if(Array.isArray(h)){if(h.length>1)return k(h,L);if(h.length===0)return 1;I=h[0]}else I=h;return l(I.mode,I.getLength(),L)},t.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let v=h<<12;for(;e.getBCHDigit(v)-s>=0;)v^=r<<e.getBCHDigit(v)-s;return h<<12|v}})(tn);var on={};const rt=Z,an=1335,Di=21522,_t=rt.getBCHDigit(an);on.getEncodedBits=function(e,n){const i=e.bit<<3|n;let a=i<<10;for(;rt.getBCHDigit(a)-_t>=0;)a^=an<<rt.getBCHDigit(a)-_t;return(i<<10|a)^Di};var rn={};const Fi=pe;function me(t){this.mode=Fi.NUMERIC,this.data=t.toString()}me.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};me.prototype.getLength=function(){return this.data.length};me.prototype.getBitsLength=function(){return me.getBitsLength(this.data.length)};me.prototype.write=function(e){let n,i,a;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),a=parseInt(i,10),e.put(a,10);const o=this.data.length-n;o>0&&(i=this.data.substr(n),a=parseInt(i,10),e.put(a,o*3+1))};var Mi=me;const Ri=pe,et=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ve(t){this.mode=Ri.ALPHANUMERIC,this.data=t}ve.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};ve.prototype.getLength=function(){return this.data.length};ve.prototype.getBitsLength=function(){return ve.getBitsLength(this.data.length)};ve.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=et.indexOf(this.data[n])*45;i+=et.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(et.indexOf(this.data[n]),6)};var Ni=ve,Ui=function(e){for(var n=[],i=e.length,a=0;a<i;a++){var o=e.charCodeAt(a);if(o>=55296&&o<=56319&&i>a+1){var r=e.charCodeAt(a+1);r>=56320&&r<=57343&&(o=(o-55296)*1024+r-56320+65536,a+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const ji=Ui,Ki=pe;function ye(t){this.mode=Ki.BYTE,typeof t=="string"&&(t=ji(t)),this.data=new Uint8Array(t)}ye.getBitsLength=function(e){return e*8};ye.prototype.getLength=function(){return this.data.length};ye.prototype.getBitsLength=function(){return ye.getBitsLength(this.data.length)};ye.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var zi=ye;const Hi=pe,Gi=Z;function we(t){this.mode=Hi.KANJI,this.data=t}we.getBitsLength=function(e){return e*13};we.prototype.getLength=function(){return this.data.length};we.prototype.getBitsLength=function(){return we.getBitsLength(this.data.length)};we.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=Gi.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var Wi=we,sn={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,a){var o={},r={};r[i]=0;var s=e.PriorityQueue.make();s.push(i,0);for(var l,u,f,k,g,h,v,I,L;!s.empty();){l=s.pop(),u=l.value,k=l.cost,g=n[u]||{};for(f in g)g.hasOwnProperty(f)&&(h=g[f],v=k+h,I=r[f],L=typeof r[f]>"u",(L||I>v)&&(r[f]=v,s.push(f,v),o[f]=u))}if(typeof a<"u"&&typeof r[a]>"u"){var w=["Could not find a path from ",i," to ",a,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,i){for(var a=[],o=i;o;)a.push(o),n[o],o=n[o];return a.reverse(),a},find_path:function(n,i,a){var o=e.single_source_shortest_paths(n,i,a);return e.extract_shortest_path_from_predecessor_list(o,a)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,a={},o;n=n||{};for(o in i)i.hasOwnProperty(o)&&(a[o]=i[o]);return a.queue=[],a.sorter=n.sorter||i.default_sorter,a},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var a={value:n,cost:i};this.queue.push(a),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(sn);var Ji=sn.exports;(function(t){const e=pe,n=Mi,i=Ni,a=zi,o=Wi,r=ie,s=Z,l=Ji;function u(w){return unescape(encodeURIComponent(w)).length}function f(w,O,T){const S=[];let P;for(;(P=w.exec(T))!==null;)S.push({data:P[0],index:P.index,mode:O,length:P[0].length});return S}function k(w){const O=f(r.NUMERIC,e.NUMERIC,w),T=f(r.ALPHANUMERIC,e.ALPHANUMERIC,w);let S,P;return s.isKanjiModeEnabled()?(S=f(r.BYTE,e.BYTE,w),P=f(r.KANJI,e.KANJI,w)):(S=f(r.BYTE_KANJI,e.BYTE,w),P=[]),O.concat(T,S,P).sort(function(E,R){return E.index-R.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function g(w,O){switch(O){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return i.getBitsLength(w);case e.KANJI:return o.getBitsLength(w);case e.BYTE:return a.getBitsLength(w)}}function h(w){return w.reduce(function(O,T){const S=O.length-1>=0?O[O.length-1]:null;return S&&S.mode===T.mode?(O[O.length-1].data+=T.data,O):(O.push(T),O)},[])}function v(w){const O=[];for(let T=0;T<w.length;T++){const S=w[T];switch(S.mode){case e.NUMERIC:O.push([S,{data:S.data,mode:e.ALPHANUMERIC,length:S.length},{data:S.data,mode:e.BYTE,length:S.length}]);break;case e.ALPHANUMERIC:O.push([S,{data:S.data,mode:e.BYTE,length:S.length}]);break;case e.KANJI:O.push([S,{data:S.data,mode:e.BYTE,length:u(S.data)}]);break;case e.BYTE:O.push([{data:S.data,mode:e.BYTE,length:u(S.data)}])}}return O}function I(w,O){const T={},S={start:{}};let P=["start"];for(let _=0;_<w.length;_++){const E=w[_],R=[];for(let Q=0;Q<E.length;Q++){const z=E[Q],re=""+_+Q;R.push(re),T[re]={node:z,lastCount:0},S[re]={};for(let Ce=0;Ce<P.length;Ce++){const te=P[Ce];T[te]&&T[te].node.mode===z.mode?(S[te][re]=g(T[te].lastCount+z.length,z.mode)-g(T[te].lastCount,z.mode),T[te].lastCount+=z.length):(T[te]&&(T[te].lastCount=z.length),S[te][re]=g(z.length,z.mode)+4+e.getCharCountIndicator(z.mode,O))}}P=R}for(let _=0;_<P.length;_++)S[P[_]].end=0;return{map:S,table:T}}function L(w,O){let T;const S=e.getBestModeForData(w);if(T=e.from(O,S),T!==e.BYTE&&T.bit<S.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(T)+`.
 Suggested mode is: `+e.toString(S));switch(T===e.KANJI&&!s.isKanjiModeEnabled()&&(T=e.BYTE),T){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new i(w);case e.KANJI:return new o(w);case e.BYTE:return new a(w)}}t.fromArray=function(O){return O.reduce(function(T,S){return typeof S=="string"?T.push(L(S,null)):S.data&&T.push(L(S.data,S.mode)),T},[])},t.fromString=function(O,T){const S=k(O,s.isKanjiModeEnabled()),P=v(S),_=I(P,T),E=l.find_path(_.map,"start","end"),R=[];for(let Q=1;Q<E.length-1;Q++)R.push(_.table[E[Q]].node);return t.fromArray(h(R))},t.rawSplit=function(O){return t.fromArray(k(O,s.isKanjiModeEnabled()))}})(rn);const Ye=Z,tt=We,qi=Oi,Yi=Ti,Zi=Yt,Qi=Zt,st=Qt,lt=Je,Xi=_i,Re=tn,ea=on,ta=pe,nt=rn;function na(t,e){const n=t.size,i=Qi.getPositions(e);for(let a=0;a<i.length;a++){const o=i[a][0],r=i[a][1];for(let s=-1;s<=7;s++)if(!(o+s<=-1||n<=o+s))for(let l=-1;l<=7;l++)r+l<=-1||n<=r+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(o+s,r+l,!0,!0):t.set(o+s,r+l,!1,!0))}}function oa(t){const e=t.size;for(let n=8;n<e-8;n++){const i=n%2===0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}function ia(t,e){const n=Zi.getPositions(e);for(let i=0;i<n.length;i++){const a=n[i][0],o=n[i][1];for(let r=-2;r<=2;r++)for(let s=-2;s<=2;s++)r===-2||r===2||s===-2||s===2||r===0&&s===0?t.set(a+r,o+s,!0,!0):t.set(a+r,o+s,!1,!0)}}function aa(t,e){const n=t.size,i=Re.getEncodedBits(e);let a,o,r;for(let s=0;s<18;s++)a=Math.floor(s/3),o=s%3+n-8-3,r=(i>>s&1)===1,t.set(a,o,r,!0),t.set(o,a,r,!0)}function ot(t,e,n){const i=t.size,a=ea.getEncodedBits(e,n);let o,r;for(o=0;o<15;o++)r=(a>>o&1)===1,o<6?t.set(o,8,r,!0):o<8?t.set(o+1,8,r,!0):t.set(i-15+o,8,r,!0),o<8?t.set(8,i-o-1,r,!0):o<9?t.set(8,15-o-1+1,r,!0):t.set(8,15-o-1,r,!0);t.set(i-8,8,1,!0)}function ra(t,e){const n=t.size;let i=-1,a=n-1,o=7,r=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(a,s-l)){let u=!1;r<e.length&&(u=(e[r]>>>o&1)===1),t.set(a,s-l,u),o--,o===-1&&(r++,o=7)}if(a+=i,a<0||n<=a){a-=i,i=-i;break}}}function sa(t,e,n){const i=new qi;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),ta.getCharCountIndicator(l.mode,t)),l.write(i)});const a=Ye.getSymbolTotalCodewords(t),o=lt.getTotalCodewordsCount(t,e),r=(a-o)*8;for(i.getLengthInBits()+4<=r&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const s=(r-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return la(i,t,e)}function la(t,e,n){const i=Ye.getSymbolTotalCodewords(e),a=lt.getTotalCodewordsCount(e,n),o=i-a,r=lt.getBlocksCount(e,n),s=i%r,l=r-s,u=Math.floor(i/r),f=Math.floor(o/r),k=f+1,g=u-f,h=new Xi(g);let v=0;const I=new Array(r),L=new Array(r);let w=0;const O=new Uint8Array(t.buffer);for(let E=0;E<r;E++){const R=E<l?f:k;I[E]=O.slice(v,v+R),L[E]=h.encode(I[E]),v+=R,w=Math.max(w,R)}const T=new Uint8Array(i);let S=0,P,_;for(P=0;P<w;P++)for(_=0;_<r;_++)P<I[_].length&&(T[S++]=I[_][P]);for(P=0;P<g;P++)for(_=0;_<r;_++)T[S++]=L[_][P];return T}function ca(t,e,n,i){let a;if(Array.isArray(t))a=nt.fromArray(t);else if(typeof t=="string"){let u=e;if(!u){const f=nt.rawSplit(t);u=Re.getBestVersionForData(f,n)}a=nt.fromString(t,u||40)}else throw new Error("Invalid data");const o=Re.getBestVersionForData(a,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+o+`.
`);const r=sa(e,n,a),s=Ye.getSymbolSize(e),l=new Yi(s);return na(l,e),oa(l),ia(l,e),ot(l,n,0),e>=7&&aa(l,e),ra(l,r),isNaN(i)&&(i=st.getBestMask(l,ot.bind(null,l,n))),st.applyMask(i,l),ot(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:a}}Jt.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=tt.M,a,o;return typeof n<"u"&&(i=tt.from(n.errorCorrectionLevel,tt.M),a=Re.from(n.version),o=st.from(n.maskPattern),n.toSJISFunc&&Ye.setToSJISFunction(n.toSJISFunc)),ca(e,a,i,o)};var ln={},yt={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const a=parseInt(i.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:a&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const a=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,r=i.scale||4;return{width:o,scale:o?4:r,margin:a,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,a){return a.width&&a.width>=i+a.margin*2?a.width/(i+a.margin*2):a.scale},t.getImageWidth=function(i,a){const o=t.getScale(i,a);return Math.floor((i+a.margin*2)*o)},t.qrToImageData=function(i,a,o){const r=a.modules.size,s=a.modules.data,l=t.getScale(r,o),u=Math.floor((r+o.margin*2)*l),f=o.margin*l,k=[o.color.light,o.color.dark];for(let g=0;g<u;g++)for(let h=0;h<u;h++){let v=(g*u+h)*4,I=o.color.light;if(g>=f&&h>=f&&g<u-f&&h<u-f){const L=Math.floor((g-f)/l),w=Math.floor((h-f)/l);I=k[s[L*r+w]?1:0]}i[v++]=I.r,i[v++]=I.g,i[v++]=I.b,i[v]=I.a}}})(yt);(function(t){const e=yt;function n(a,o,r){a.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=r,o.width=r,o.style.height=r+"px",o.style.width=r+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,r,s){let l=s,u=r;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),r||(u=i()),l=e.getOptions(l);const f=e.getImageWidth(o.modules.size,l),k=u.getContext("2d"),g=k.createImageData(f,f);return e.qrToImageData(g.data,o,l),n(k,u,f),k.putImageData(g,0,0),u},t.renderToDataURL=function(o,r,s){let l=s;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const u=t.render(o,r,l),f=l.type||"image/png",k=l.rendererOpts||{};return u.toDataURL(f,k.quality)}})(ln);var cn={};const ua=yt;function $t(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function it(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function da(t,e,n){let i="",a=0,o=!1,r=0;for(let s=0;s<t.length;s++){const l=Math.floor(s%e),u=Math.floor(s/e);!l&&!o&&(o=!0),t[s]?(r++,s>0&&l>0&&t[s-1]||(i+=o?it("M",l+n,.5+u+n):it("m",a,0),a=0,o=!1),l+1<e&&t[s+1]||(i+=it("h",r),r=0)):a++}return i}cn.render=function(e,n,i){const a=ua.getOptions(n),o=e.modules.size,r=e.modules.data,s=o+a.margin*2,l=a.color.light.a?"<path "+$t(a.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",u="<path "+$t(a.color.dark,"stroke")+' d="'+da(r,o,a.margin)+'"/>',f='viewBox="0 0 '+s+" "+s+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+u+`</svg>
`;return typeof i=="function"&&i(null,g),g};const pa=Li,ct=Jt,un=ln,fa=cn;function wt(t,e,n,i,a){const o=[].slice.call(arguments,1),r=o.length,s=typeof o[r-1]=="function";if(!s&&!pa())throw new Error("Callback required as last argument");if(s){if(r<2)throw new Error("Too few arguments provided");r===2?(a=n,n=e,e=i=void 0):r===3&&(e.getContext&&typeof a>"u"?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=e,e=i=void 0):r===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,u){try{const f=ct.create(n,i);l(t(f,e,i))}catch(f){u(f)}})}try{const l=ct.create(n,i);a(null,t(l,e,i))}catch(l){a(l)}}Ee.create=ct.create;Ee.toCanvas=wt.bind(null,un.render);Ee.toDataURL=wt.bind(null,un.renderToDataURL);Ee.toString=wt.bind(null,function(t,e,n){return fa.render(t,n)});var ha=Object.defineProperty,ga=Object.defineProperties,ba=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,Et=(t,e,n)=>e in t?ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ma=(t,e)=>{for(var n in e||(e={}))dn.call(e,n)&&Et(t,n,e[n]);if(Ne)for(var n of Ne(e))pn.call(e,n)&&Et(t,n,e[n]);return t},va=(t,e)=>ga(t,ba(e)),ya=(t,e)=>{var n={};for(var i in t)dn.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Ne)for(var i of Ne(t))e.indexOf(i)<0&&pn.call(t,i)&&(n[i]=t[i]);return n};const wa=["low","medium","quartile","high","L","M","Q","H"],Ca=[0,1,2,3,4,5,6,7],ka=["alphanumeric","numeric","kanji","byte"],Ia=["image/png","image/jpeg","image/webp"],Sa=40;var La=ee({props:{version:{type:Number,validator:t=>t===Number.parseInt(String(t),10)&&t>=1&&t<=Sa},errorCorrectionLevel:{type:String,validator:t=>wa.includes(t)},maskPattern:{type:Number,validator:t=>Ca.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e])),required:!0},type:{type:String,validator:t=>Ia.includes(t),required:!0},quality:{type:Number,validator:t=>t===Number.parseFloat(String(t))&&t>=0&&t<=1,required:!1},value:{type:[String,Array],required:!0,validator(t){return typeof t=="string"?!0:t.every(e=>typeof e.data=="string"&&"mode"in e&&e.mode&&ka.includes(e.mode))}}},setup(t,{attrs:e,emit:n}){const i=ze();return X(t,()=>{const o=t,{quality:r,value:s}=o,l=ya(o,["quality","value"]);Ee.toDataURL(s,Object.assign(l,r==null||{renderOptions:{quality:r}})).then(u=>{i.value=u,n("change",u)}).catch(u=>n("error",u))},{immediate:!0}),()=>bo("img",va(ma({},e),{src:i.value}))}}),Pa=function(e){var n=e.dt;return`
.p-tabs {
    display: flex;
    flex-direction: column;
}

.p-tablist {
    position: relative;
}

.p-tabs-scrollable > .p-tablist {
    overflow: hidden;
}

.p-tablist-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior: contain auto;
}

.p-tablist-viewport::-webkit-scrollbar {
    display: none;
}

.p-tablist-tab-list {
    position: relative;
    display: flex;
    background: `.concat(n("tabs.tablist.background"),`;
    border-style: solid;
    border-color: `).concat(n("tabs.tablist.border.color"),`;
    border-width: `).concat(n("tabs.tablist.border.width"),`;
}

.p-tablist-nav-button {
    all: unset;
    position: absolute;
    top: 0;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: `).concat(n("tabs.nav.button.background"),`;
    color: `).concat(n("tabs.nav.button.color"),`;
    width: `).concat(n("tabs.nav.button.width"),`;
    transition: color `).concat(n("tabs.transition.duration"),", outline-color ").concat(n("tabs.transition.duration"),", box-shadow ").concat(n("tabs.transition.duration"),`;
    box-shadow: `).concat(n("tabs.nav.button.shadow"),`;
    outline-color: transparent;
    cursor: pointer;
}

.p-tablist-nav-button:focus-visible {
    z-index: 1;
    box-shadow: `).concat(n("tabs.nav.button.focus.ring.shadow"),`;
    outline: `).concat(n("tabs.nav.button.focus.ring.width")," ").concat(n("tabs.nav.button.focus.ring.style")," ").concat(n("tabs.nav.button.focus.ring.color"),`;
    outline-offset: `).concat(n("tabs.nav.button.focus.ring.offset"),`;
}

.p-tablist-nav-button:hover {
    color: `).concat(n("tabs.nav.button.hover.color"),`;
}

.p-tablist-prev-button {
    left: 0;
}

.p-tablist-next-button {
    right: 0;
}

.p-tab {
    cursor: pointer;
    user-select: none;
    position: relative;
    border-style: solid;
    white-space: nowrap;
    background: `).concat(n("tabs.tab.background"),`;
    border-width: `).concat(n("tabs.tab.border.width"),`;
    border-color: `).concat(n("tabs.tab.border.color"),`;
    color: `).concat(n("tabs.tab.color"),`;
    padding: `).concat(n("tabs.tab.padding"),`;
    font-weight: `).concat(n("tabs.tab.font.weight"),`;
    transition: background `).concat(n("tabs.transition.duration"),", border-color ").concat(n("tabs.transition.duration"),", color ").concat(n("tabs.transition.duration"),", outline-color ").concat(n("tabs.transition.duration"),", box-shadow ").concat(n("tabs.transition.duration"),`;
    margin: `).concat(n("tabs.tab.margin"),`;
    outline-color: transparent;
}

.p-tab:not(.p-disabled):focus-visible {
    z-index: 1;
    box-shadow: `).concat(n("tabs.tab.focus.ring.shadow"),`;
    outline: `).concat(n("tabs.tab.focus.ring.width")," ").concat(n("tabs.tab.focus.ring.style")," ").concat(n("tabs.tab.focus.ring.color"),`;
    outline-offset: `).concat(n("tabs.tab.focus.ring.offset"),`;
}

.p-tab:not(.p-tab-active):not(.p-disabled):hover {
    background: `).concat(n("tabs.tab.hover.background"),`;
    border-color: `).concat(n("tabs.tab.hover.border.color"),`;
    color: `).concat(n("tabs.tab.hover.color"),`;
}

.p-tab-active {
    background: `).concat(n("tabs.tab.active.background"),`;
    border-color: `).concat(n("tabs.tab.active.border.color"),`;
    color: `).concat(n("tabs.tab.active.color"),`;
}

.p-tabpanels {
    background: `).concat(n("tabs.tabpanel.background"),`;
    color: `).concat(n("tabs.tabpanel.color"),`;
    padding: `).concat(n("tabs.tabpanel.padding"),`;
    outline: 0 none;
}

.p-tabpanel:focus-visible {
    box-shadow: `).concat(n("tabs.tabpanel.focus.ring.shadow"),`;
    outline: `).concat(n("tabs.tabpanel.focus.ring.width")," ").concat(n("tabs.tabpanel.focus.ring.style")," ").concat(n("tabs.tabpanel.focus.ring.color"),`;
    outline-offset: `).concat(n("tabs.tabpanel.focus.ring.offset"),`;
}

.p-tablist-active-bar {
    z-index: 1;
    display: block;
    position: absolute;
    bottom: `).concat(n("tabs.active.bar.bottom"),`;
    height: `).concat(n("tabs.active.bar.height"),`;
    background: `).concat(n("tabs.active.bar.background"),`;
    transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);
}
`)},Oa={root:function(e){var n=e.props;return["p-tabs p-component",{"p-tabs-scrollable":n.scrollable}]}},Ta=oe.extend({name:"tabs",theme:Pa,classes:Oa}),Ba={name:"BaseTabs",extends:K,props:{value:{type:String,default:void 0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},showNavigators:{type:Boolean,default:!0},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1}},style:Ta,provide:function(){return{$pcTabs:this,$parentInstance:this}}},fn={name:"Tabs",extends:Ba,inheritAttrs:!1,emits:["update:value"],data:function(){return{id:this.$attrs.id,d_value:this.value}},watch:{"$attrs.id":function(e){this.id=e||Pe()},value:function(e){this.d_value=e}},mounted:function(){this.id=this.id||Pe()},methods:{updateValue:function(e){this.d_value!==e&&(this.d_value=e,this.$emit("update:value",e))},isVertical:function(){return this.orientation==="vertical"}}};function _a(t,e,n,i,a,o){return c(),y("div",m({class:t.cx("root")},t.ptmi("root")),[x(t.$slots,"default")],16)}fn.render=_a;var $a={root:function(e){var n=e.instance,i=e.props;return["p-tab",{"p-tab-active":n.active,"p-disabled":i.disabled}]}},Ea=oe.extend({name:"tab",classes:$a}),Aa={name:"BaseTab",extends:K,props:{value:{type:String,default:void 0},disabled:{type:Boolean,default:!1},as:{type:String,default:"BUTTON"},asChild:{type:Boolean,default:!1}},style:Ea,provide:function(){return{$pcTab:this,$parentInstance:this}}},Ie={name:"Tab",extends:Aa,inheritAttrs:!1,inject:["$pcTabs","$pcTabList"],methods:{onFocus:function(){this.$pcTabs.selectOnFocus&&this.changeActiveValue()},onClick:function(){this.changeActiveValue()},onKeydown:function(e){switch(e.code){case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break}},onArrowRightKey:function(e){var n=this.findNextTab(e.currentTarget);n?this.changeFocusedTab(e,n):this.onHomeKey(e),e.preventDefault()},onArrowLeftKey:function(e){var n=this.findPrevTab(e.currentTarget);n?this.changeFocusedTab(e,n):this.onEndKey(e),e.preventDefault()},onHomeKey:function(e){var n=this.findFirstTab();this.changeFocusedTab(e,n),e.preventDefault()},onEndKey:function(e){var n=this.findLastTab();this.changeFocusedTab(e,n),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.findLastTab()),e.preventDefault()},onPageUpKey:function(e){this.scrollInView(this.findFirstTab()),e.preventDefault()},onEnterKey:function(e){this.changeActiveValue(),e.preventDefault()},findNextTab:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n?e:e.nextElementSibling;return i?A.getAttribute(i,"data-p-disabled")||A.getAttribute(i,"data-pc-section")==="inkbar"?this.findNextTab(i):A.findSingle(i,'[data-pc-name="tab"]'):null},findPrevTab:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n?e:e.previousElementSibling;return i?A.getAttribute(i,"data-p-disabled")||A.getAttribute(i,"data-pc-section")==="inkbar"?this.findPrevTab(i):A.findSingle(i,'[data-pc-name="tab"]'):null},findFirstTab:function(){return this.findNextTab(this.$pcTabList.$refs.content.firstElementChild,!0)},findLastTab:function(){return this.findPrevTab(this.$pcTabList.$refs.content.lastElementChild,!0)},changeActiveValue:function(){this.$pcTabs.updateValue(this.value)},changeFocusedTab:function(e,n){A.focus(n),this.scrollInView(n)},scrollInView:function(e){var n;e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"})}},computed:{active:function(){var e;return U.equals((e=this.$pcTabs)===null||e===void 0?void 0:e.d_value,this.value)},id:function(){var e;return"".concat((e=this.$pcTabs)===null||e===void 0?void 0:e.id,"_tab_").concat(this.value)},ariaControls:function(){var e;return"".concat((e=this.$pcTabs)===null||e===void 0?void 0:e.id,"_tabpanel_").concat(this.value)},attrs:function(){return m(this.asAttrs,this.a11yAttrs,this.ptmi("root",this.ptParams))},asAttrs:function(){return this.as==="BUTTON"?{type:"button",disabled:this.disabled}:void 0},a11yAttrs:function(){return{id:this.id,tabindex:this.active?this.$pcTabs.tabindex:-1,role:"tab","aria-selected":this.active,"aria-controls":this.ariaControls,"data-pc-name":"tab","data-p-disabled":this.disabled,"data-p-active":this.active,onFocus:this.onFocus,onKeydown:this.onKeydown}},ptParams:function(){return{context:{active:this.active}}}},directives:{ripple:he}};function xa(t,e,n,i,a,o){var r=de("ripple");return t.asChild?x(t.$slots,"default",{key:1,class:H(t.cx("root")),active:o.active,a11yAttrs:o.a11yAttrs,onClick:o.onClick}):ae((c(),$(q(t.as),m({key:0,class:t.cx("root"),onClick:o.onClick},o.attrs),{default:B(function(){return[x(t.$slots,"default")]}),_:3},16,["class","onClick"])),[[r]])}Ie.render=xa;var hn={name:"ChevronLeftIcon",extends:fe},Va=d("path",{d:"M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z",fill:"currentColor"},null,-1),Da=[Va];function Fa(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Da,16)}hn.render=Fa;var gn={name:"ChevronRightIcon",extends:fe},Ma=d("path",{d:"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z",fill:"currentColor"},null,-1),Ra=[Ma];function Na(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Ra,16)}gn.render=Na;var Ua={root:"p-tablist",content:function(e){var n=e.instance;return["p-tablist-content",{"p-tablist-viewport":n.$pcTabs.scrollable}]},tabs:"p-tablist-tab-list",inkbar:"p-tablist-active-bar",prevButton:"p-tablist-prev-button p-tablist-nav-button",nextButton:"p-tablist-next-button p-tablist-nav-button"},ja=oe.extend({name:"tablist",classes:Ua}),Ka={name:"BaseTabList",extends:K,props:{},style:ja,provide:function(){return{$pcTabList:this,$parentInstance:this}}},bn={name:"TabList",extends:Ka,inheritAttrs:!1,inject:["$pcTabs"],data:function(){return{isPrevButtonEnabled:!1,isNextButtonEnabled:!0}},resizeObserver:void 0,watch:{showNavigators:function(e){e?this.bindResizeObserver():this.unbindResizeObserver()},activeValue:{flush:"post",handler:function(){this.updateInkBar()}}},mounted:function(){var e=this;this.$nextTick(function(){e.updateInkBar()}),this.showNavigators&&(this.updateButtonState(),this.bindResizeObserver())},updated:function(){this.showNavigators&&this.updateButtonState()},beforeUnmount:function(){this.unbindResizeObserver()},methods:{onScroll:function(e){this.showNavigators&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,n=A.getWidth(e),i=e.scrollLeft-n;e.scrollLeft=i<=0?0:i},onNextButtonClick:function(){var e=this.$refs.content,n=A.getWidth(e)-this.getVisibleButtonWidths(),i=e.scrollLeft+n,a=e.scrollWidth-n;e.scrollLeft=i>=a?a:i},bindResizeObserver:function(){var e=this;this.resizeObserver=new ResizeObserver(function(){return e.updateButtonState()}),this.resizeObserver.observe(this.$refs.list)},unbindResizeObserver:function(){var e;(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.$refs.list),this.resizeObserver=void 0},updateInkBar:function(){var e=this.$refs,n=e.content,i=e.inkbar,a=e.tabs,o=A.findSingle(n,'[data-pc-name="tab"][data-p-active="true"]');this.$pcTabs.isVertical()?(i.style.height=A.getOuterHeight(o)+"px",i.style.top=A.getOffset(o).top-A.getOffset(a).top+"px"):(i.style.width=A.getOuterWidth(o)+"px",i.style.left=A.getOffset(o).left-A.getOffset(a).left+"px")},updateButtonState:function(){var e=this.$refs,n=e.list,i=e.content,a=i.scrollLeft,o=i.scrollTop,r=i.scrollWidth,s=i.scrollHeight,l=i.offsetWidth,u=i.offsetHeight,f=[A.getWidth(i),A.getHeight(i)],k=f[0],g=f[1];this.$pcTabs.isVertical()?(this.isPrevButtonEnabled=o!==0,this.isNextButtonEnabled=n.offsetHeight>=u&&parseInt(o)!==s-g):(this.isPrevButtonEnabled=a!==0,this.isNextButtonEnabled=n.offsetWidth>=l&&parseInt(a)!==r-k)},getVisibleButtonWidths:function(){var e=this.$refs,n=e.prevBtn,i=e.nextBtn;return[n,i].reduce(function(a,o){return o?a+A.getWidth(o):a},0)}},computed:{templates:function(){return this.$pcTabs.$slots},activeValue:function(){return this.$pcTabs.d_value},showNavigators:function(){return this.$pcTabs.scrollable&&this.$pcTabs.showNavigators},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0}},components:{ChevronLeftIcon:hn,ChevronRightIcon:gn}},za=["aria-label","tabindex"],Ha=["aria-orientation"],Ga=["aria-label","tabindex"];function Wa(t,e,n,i,a,o){var r=de("ripple");return c(),y("div",m({ref:"list",class:t.cx("root")},t.ptmi("root")),[o.showNavigators&&a.isPrevButtonEnabled?ae((c(),y("button",m({key:0,ref:"prevButton",class:t.cx("prevButton"),"aria-label":o.prevButtonAriaLabel,tabindex:o.$pcTabs.tabindex,onClick:e[0]||(e[0]=function(){return o.onPrevButtonClick&&o.onPrevButtonClick.apply(o,arguments)})},t.ptm("prevButton"),{"data-pc-group-section":"navigator"}),[(c(),$(q(o.templates.previcon||"ChevronLeftIcon"),m({"aria-hidden":"true"},t.ptm("prevIcon")),null,16))],16,za)),[[r]]):V("",!0),d("div",m({ref:"content",class:t.cx("content"),onScroll:e[1]||(e[1]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)})},t.ptm("content")),[d("div",m({ref:"tabs",class:t.cx("tabs"),role:"tablist","aria-orientation":o.$pcTabs.orientation||"horizontal"},t.ptm("tabs")),[x(t.$slots,"default"),d("span",m({ref:"inkbar",class:t.cx("inkbar"),role:"presentation","aria-hidden":"true"},t.ptm("inkbar")),null,16)],16,Ha)],16),o.showNavigators&&a.isNextButtonEnabled?ae((c(),y("button",m({key:1,ref:"nextButton",class:t.cx("nextButton"),"aria-label":o.nextButtonAriaLabel,tabindex:o.$pcTabs.tabindex,onClick:e[2]||(e[2]=function(){return o.onNextButtonClick&&o.onNextButtonClick.apply(o,arguments)})},t.ptm("nextButton"),{"data-pc-group-section":"navigator"}),[(c(),$(q(o.templates.nexticon||"ChevronRightIcon"),m({"aria-hidden":"true"},t.ptm("nextIcon")),null,16))],16,Ga)),[[r]]):V("",!0)],16)}bn.render=Wa;var Ja={root:"p-tabpanels"},qa=oe.extend({name:"tabpanels",classes:Ja}),Ya={name:"BaseTabPanels",extends:K,props:{},style:qa,provide:function(){return{$pcTabPanels:this,$parentInstance:this}}},mn={name:"TabPanels",extends:Ya,inheritAttrs:!1};function Za(t,e,n,i,a,o){return c(),y("div",m({class:t.cx("root"),role:"presentation"},t.ptmi("root")),[x(t.$slots,"default")],16)}mn.render=Za;const Qa={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"},Xa=d("path",{d:"m595.888 512 190.064-190.064A47.87 47.87 0 0 0 800 288c0-13.264-5.376-25.248-14.064-33.936l-240-240A48 48 0 0 0 464 48v332.128L305.936 222.064a48 48 0 1 0-67.872 67.872L460.128 512 238.064 734.064a48 48 0 1 0 67.872 67.872L464 643.888V976a48 48 0 0 0 81.936 33.936l240-240A47.8 47.8 0 0 0 800 736a47.84 47.84 0 0 0-14.064-33.936zM560 163.888 684.112 288 560 412.112zm0 696.224V611.888L684.112 736z",style:{fill:"currentColor"}},null,-1),er=[Xa];function tr(t,e){return c(),y("svg",Qa,[...er])}const At={render:tr},nr={key:0},or={key:0},ir={class:"w-full flex flex-col items-top gap-2 mb-4"},ar=d("label",{class:"font-semibold"},"当前客户端ID",-1),rr=d("span",{class:"block text-sm text-gray-500"},"将客户端ID复制给他人，可以让他们远程连接到此设备。",-1),sr=d("span",{class:"block text-sm text-gray-500"},"若是客户端ID泄露，可以点击“重置”按钮。",-1),lr=d("span",{class:"block font-semibold mb-2"},"请使用DG-Lab扫描以下二维码：",-1),cr={class:"flex justify-center mb-4 min-h-256px"},ur={class:"w-full flex flex-col items-top gap-2"},dr=d("label",{class:"font-semibold"},"连接地址",-1),pr={key:1},fr={key:0,class:"flex flex-col items-center gap-4"},hr={class:"pi"},gr={class:"pi"},br={key:1},mr=d("p",{class:"text-red-500 font-semibold text-lg"},"您的浏览器不支持蓝牙连接",-1),vr=d("p",null,[W("可以尝试使用Chrome或"),d("a",{href:"https://www.microsoft.com/edge/download"},"Edge浏览器")],-1),yr=d("p",null,[W("iOS设备请使用"),d("a",{href:"https://apps.apple.com/app/bluefy-web-ble-browser/id1492822055"},"Bluefy浏览器")],-1),wr=[mr,vr,yr],Cr={key:2},kr={class:"w-full flex flex-col items-top gap-2"},Ir=d("p",null,"此功能用于连接到其他人，或者恢复连接到先前的设备。",-1),Sr=d("p",null,"仅支持连接相同站点的客户端。",-1),Lr=d("label",{class:"font-semibold"},"客户端ID",-1),Pr={key:3},Or={class:"w-full flex flex-col items-top gap-2"},Tr=d("p",null,"此功能用于在没有设备的情况下进行调试。",-1),Br=d("p",null,"主要用于开发插件时调试，郊狼事件将会通过桌面通知发送，如果没有通知，请检测桌面通知权限。",-1),_r={key:1,class:"flex items-center justify-center h-[20rem]"},$r=ee({name:"ConnectToClientDialog",__name:"ConnectToClientDialog",props:Le({clientWsUrlList:{},clientId:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:Le(["resetClientId","update:clientId","startBluetoothConnect","startDebugConnect"],["update:visible"]),setup(t,{emit:e}){const n=t,i=He(t,"visible"),a=!1,o=e,r=Ge({selectedWsUrlIndex:0,selectedTab:"dglab",clientIdResetting:!1,formClientId:""}),s=J(()=>"bluetooth"in navigator),l=J(()=>{var h;return(((h=n.clientWsUrlList)==null?void 0:h.map(v=>({...v,connectUrl:v.connectUrl.replace(/\{clientId\}/g,n.clientId??"")})))??[]).sort((v,I)=>v.domain.startsWith("192.168.")?-1:I.domain.startsWith("192.168.")?1:0)}),u=async()=>{r.clientIdResetting||confirm("确定要重置客户端ID吗？")&&(r.clientIdResetting=!0,o("resetClientId"))},f=()=>{o("update:clientId",r.formClientId)},k=h=>{o("startBluetoothConnect",h)},g=()=>{o("startDebugConnect")};return X(()=>n.clientId,h=>{h&&(r.clientIdResetting=!1)}),(h,v)=>{const I=Ue,L=ne,w=ft,O=uo,T=gt,S=Dt,P=_e;return c(),$(P,{visible:i.value,"onUpdate:visible":v[6]||(v[6]=_=>i.value=_),modal:"",header:"连接设备",class:"mx-4 w-full md:w-[40rem]"},{default:B(()=>[C(T,null,{default:B(()=>[n.clientWsUrlList?(c(),y("div",nr,[C(p(fn),{value:p(r).selectedTab,"onUpdate:value":v[5]||(v[5]=_=>p(r).selectedTab=_)},{default:B(()=>[C(p(bn),null,{default:B(()=>[C(p(Ie),{value:"dglab"},{default:B(()=>[W("连接 DG-Lab")]),_:1}),C(p(Ie),{value:"coyoteble"},{default:B(()=>[W("蓝牙连接郊狼")]),_:1}),C(p(Ie),{value:"clientId"},{default:B(()=>[W("通过客户端ID连接")]),_:1}),p(a)?(c(),$(p(Ie),{key:0,value:"debugConnect"},{default:B(()=>[W("无设备调试")]),_:1})):V("",!0)]),_:1}),C(p(mn),null,{default:B(()=>[C(T,null,{default:B(()=>[p(r).selectedTab==="dglab"?(c(),y("div",or,[d("div",ir,[ar,C(w,null,{default:B(()=>[C(I,{value:n.clientId,"read-only":""},null,8,["value"]),C(L,{icon:p(r).clientIdResetting?"pi pi-spinner pi-spin":"pi pi-refresh",label:"重置",severity:"secondary",onClick:u,disabled:p(r).clientIdResetting},null,8,["icon","disabled"])]),_:1}),rr,sr]),lr,d("div",cr,[p(l)[p(r).selectedWsUrlIndex].connectUrl?(c(),$(p(La),{key:0,value:p(l)[p(r).selectedWsUrlIndex].connectUrl,type:"image/png",color:{dark:"#000000ff",light:"#ffffffff"},width:256,height:256},null,8,["value"])):V("",!0)]),d("div",ur,[dr,C(p(be),{modelValue:p(r).selectedWsUrlIndex,"onUpdate:modelValue":v[0]||(v[0]=_=>p(r).selectedWsUrlIndex=_),options:p(l).map((_,E)=>({value:E,label:_.domain})),optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])])])):V("",!0),p(r).selectedTab==="coyoteble"?(c(),y("div",pr,[p(s)?(c(),y("div",fr,[C(L,{label:"连接郊狼 3.0",class:"w-full",size:"large",onClick:v[1]||(v[1]=_=>k(p(G).V3))},{icon:B(()=>[d("i",hr,[C(p(At))])]),_:1}),C(L,{label:"连接郊狼 2.0",class:"w-full",size:"large",onClick:v[2]||(v[2]=_=>k(p(G).V2))},{icon:B(()=>[d("i",gr,[C(p(At))])]),_:1})])):(c(),y("div",br,wr))])):V("",!0),p(r).selectedTab==="clientId"?(c(),y("div",Cr,[d("div",kr,[C(O,{severity:"info",class:"m-1"},{default:B(()=>[Ir,Sr]),_:1}),Lr,C(w,null,{default:B(()=>[C(I,{modelValue:p(r).formClientId,"onUpdate:modelValue":v[3]||(v[3]=_=>p(r).formClientId=_),placeholder:"请输入目标客户端ID"},null,8,["modelValue"]),C(L,{icon:"pi pi-link",label:"连接",onClick:f})]),_:1})])])):V("",!0),p(r).selectedTab==="debugConnect"?(c(),y("div",Pr,[d("div",Or,[C(O,{severity:"info",class:"m-1"},{default:B(()=>[Tr,Br]),_:1}),C(L,{label:"开始本地调试",onClick:v[4]||(v[4]=_=>g())})])])):V("",!0)]),_:1})]),_:1})]),_:1},8,["value"])])):(c(),y("div",_r,[C(S)]))]),_:1})]),_:1},8,["visible"])}}});var Er=function(e){var n=e.dt;return`
.p-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: `.concat(n("toolbar.padding"),`;
    background: `).concat(n("toolbar.background"),`;
    border: 1px solid `).concat(n("toolbar.border.color"),`;
    color: `).concat(n("toolbar.color"),`;
    border-radius: `).concat(n("toolbar.border.radius"),`;
    gap: `).concat(n("toolbar.gap"),`;
}

.p-toolbar-start,
.p-toolbar-center,
.p-toolbar-end {
    display: flex;
    align-items: center;
}
`)},Ar={root:"p-toolbar p-component",start:"p-toolbar-start",center:"p-toolbar-center",end:"p-toolbar-end"},xr=oe.extend({name:"toolbar",theme:Er,classes:Ar}),Vr={name:"BaseToolbar",extends:K,props:{ariaLabelledby:{type:String,default:null}},style:xr,provide:function(){return{$pcToolbar:this,$parentInstance:this}}},vn={name:"Toolbar",extends:Vr,inheritAttrs:!1},Dr=["aria-labelledby"];function Fr(t,e,n,i,a,o){return c(),y("div",m({class:t.cx("root"),role:"toolbar","aria-labelledby":t.ariaLabelledby},t.ptmi("root")),[d("div",m({class:t.cx("start")},t.ptm("start")),[x(t.$slots,"start")],16),d("div",m({class:t.cx("center")},t.ptm("center")),[x(t.$slots,"center")],16),d("div",m({class:t.cx("end")},t.ptm("end")),[x(t.$slots,"end")],16)],16,Dr)}vn.render=Fr;const yn=Ut("remoteNotification",{state:()=>({ignoredIds:[]}),actions:{isIgnored(t){return this.ignoredIds.includes(t)},ignore(t){this.ignoredIds.push(t)}},persist:{key:"CGH_RemoteNotification"}}),Mr=t=>(je("data-v-822d00e6"),t=t(),Ke(),t),Rr={class:"p-toast-message-content","data-pc-section":"messagecontent"},Nr={class:"p-toast-message-text","data-pc-section":"messagetext"},Ur={class:"p-toast-summary","data-pc-section":"summary"},jr={class:"p-toast-detail","data-pc-section":"detail"},Kr={key:0,class:"p-toast-message-buttons flex gap-2","data-pc-section":"messagebuttons"},zr={"data-pc-section":"buttoncontainer"},Hr={class:"p-toast-close-button",type:"button","aria-label":"Close",autofocus:"false","data-pc-section":"closebutton"},Gr=Mr(()=>d("path",{d:"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",fill:"currentColor"},null,-1)),Wr=[Gr],Jr=ee({name:"CustomToastContent",__name:"CustomToastContent",props:{message:{},closeCallback:{type:Function}},setup(t){const e=t,n=yn(),i=J(()=>{const u=e.message.detail;if(typeof u=="string")return{title:e.message.summary,message:u};switch(u==null?void 0:u.type){case"custom":return{...u,title:e.message.summary}}return{title:e.message.summary,message:"（消息内容为空）"}}),a=J(()=>i.value.icon??"pi pi-info-circle"),o=J(()=>i.value.ignoreId||i.value.url),r=()=>{var u;(u=e.closeCallback)==null||u.call(e)},s=()=>{var u;i.value.ignoreId&&n.ignore(i.value.ignoreId),(u=e.closeCallback)==null||u.call(e)},l=()=>{var u;i.value.url&&window.open(i.value.url,"_blank"),(u=e.closeCallback)==null||u.call(e)};return(u,f)=>(c(),y("div",Rr,[d("div",{class:H([p(a),"p-toast-message-icon"]),"data-pc-section":"messageicon"},null,2),d("div",Nr,[d("span",Ur,j(p(i).title),1),d("div",jr,j(p(i).message),1),p(o)?(c(),y("div",Kr,[p(i).ignoreId?(c(),$(p(ne),{key:0,size:"small",outlined:"",severity:"contrast",label:"忽略",onClick:s})):V("",!0),p(i).url?(c(),$(p(ne),{key:1,size:"small",label:p(i).urlLabel??"查看详情",onClick:l},null,8,["label"])):V("",!0)])):V("",!0)]),d("div",zr,[d("button",Hr,[(c(),y("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"p-icon p-toast-close-icon","aria-hidden":"true","data-pc-section":"closeicon",onClick:r},Wr))])])]))}}),qr=$e(Jr,[["__scopeId","data-v-822d00e6"]]);var Yr=function(e){var n=e.dt;return`
.p-confirmdialog .p-dialog-content {
    display: flex;
    align-items: center;
    gap:  `.concat(n("confirmdialog.content.gap"),`;
}

.p-confirmdialog-icon {
    color: `).concat(n("confirmdialog.icon.color"),`;
    font-size: `).concat(n("confirmdialog.icon.size"),`;
    width: `).concat(n("confirmdialog.icon.size"),`;
    height: `).concat(n("confirmdialog.icon.size"),`;
}
`)},Zr={root:"p-confirmdialog",icon:"p-confirmdialog-icon",message:"p-confirmdialog-message",pcRejectButton:"p-confirmdialog-reject-button",pcAcceptButton:"p-confirmdialog-accept-button"},Qr=oe.extend({name:"confirmdialog",theme:Yr,classes:Zr}),Xr={name:"BaseConfirmDialog",extends:K,props:{group:String,breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0}},style:Qr,provide:function(){return{$pcConfirmDialog:this,$parentInstance:this}}},wn={name:"ConfirmDialog",extends:Xr,confirmListener:null,closeListener:null,data:function(){return{visible:!1,confirmation:null}},mounted:function(){var e=this;this.confirmListener=function(n){n&&n.group===e.group&&(e.confirmation=n,e.confirmation.onShow&&e.confirmation.onShow(),e.visible=!0)},this.closeListener=function(){e.visible=!1,e.confirmation=null},xe.on("confirm",this.confirmListener),xe.on("close",this.closeListener)},beforeUnmount:function(){xe.off("confirm",this.confirmListener),xe.off("close",this.closeListener)},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},getCXOptions:function(e,n){return{contenxt:{icon:e,iconClass:n.class}}}},computed:{header:function(){return this.confirmation?this.confirmation.header:null},message:function(){return this.confirmation?this.confirmation.message:null},blockScroll:function(){return this.confirmation?this.confirmation.blockScroll:!0},position:function(){return this.confirmation?this.confirmation.position:null},acceptLabel:function(){if(this.confirmation){var e=this.confirmation;return e.acceptLabel?e.acceptLabel:e.acceptProps?e.acceptProps.label||this.$primevue.config.locale.accept:null}return null},rejectLabel:function(){if(this.confirmation){var e=this.confirmation;return e.rejectLabel?e.rejectLabel:e.rejectProps?e.rejectProps.label||this.$primevue.config.locale.reject:null}return null},acceptIcon:function(){var e;return this.confirmation?this.confirmation.acceptIcon:(e=this.confirmation)!==null&&e!==void 0&&e.acceptProps?this.confirmation.acceptProps.icon:null},rejectIcon:function(){var e;return this.confirmation?this.confirmation.rejectIcon:(e=this.confirmation)!==null&&e!==void 0&&e.rejectProps?this.confirmation.rejectProps.icon:null},autoFocusAccept:function(){return this.confirmation.defaultFocus===void 0||this.confirmation.defaultFocus==="accept"},autoFocusReject:function(){return this.confirmation.defaultFocus==="reject"},closeOnEscape:function(){return this.confirmation?this.confirmation.closeOnEscape:!0}},components:{Dialog:_e,Button:ne}};function es(t,e,n,i,a,o){var r=N("Button"),s=N("Dialog");return c(),$(s,{visible:a.visible,"onUpdate:visible":[e[2]||(e[2]=function(l){return a.visible=l}),o.onHide],role:"alertdialog",class:H(t.cx("root")),modal:!0,header:o.header,blockScroll:o.blockScroll,position:o.position,breakpoints:t.breakpoints,closeOnEscape:o.closeOnEscape,draggable:t.draggable,pt:t.pt,unstyled:t.unstyled},ue({default:B(function(){return[t.$slots.container?V("",!0):(c(),y(Y,{key:0},[t.$slots.message?(c(),$(q(t.$slots.message),{key:1,message:a.confirmation},null,8,["message"])):(c(),y(Y,{key:0},[x(t.$slots,"icon",{},function(){return[t.$slots.icon?(c(),$(q(t.$slots.icon),{key:0,class:H(t.cx("icon"))},null,8,["class"])):a.confirmation.icon?(c(),y("span",m({key:1,class:[a.confirmation.icon,t.cx("icon")]},t.ptm("icon")),null,16)):V("",!0)]}),d("span",m({class:t.cx("message")},t.ptm("message")),j(o.message),17)],64))],64))]}),_:2},[t.$slots.container?{name:"container",fn:B(function(l){return[x(t.$slots,"container",{message:a.confirmation,closeCallback:l.onclose,acceptCallback:o.accept,rejectCallback:o.reject})]}),key:"0"}:void 0,t.$slots.container?void 0:{name:"footer",fn:B(function(){var l;return[C(r,m({class:[t.cx("pcRejectButton"),a.confirmation.rejectClass],autofocus:o.autoFocusReject,unstyled:t.unstyled,text:((l=a.confirmation.rejectProps)===null||l===void 0?void 0:l.text)||!1,onClick:e[0]||(e[0]=function(u){return o.reject()})},a.confirmation.rejectProps,{label:o.rejectLabel,pt:t.ptm("pcRejectButton")}),ue({_:2},[o.rejectIcon||t.$slots.rejecticon?{name:"icon",fn:B(function(u){return[x(t.$slots,"rejecticon",{},function(){return[d("span",m({class:[o.rejectIcon,u.class]},t.ptm("pcRejectButton").icon,{"data-pc-section":"rejectbuttonicon"}),null,16)]})]}),key:"0"}:void 0]),1040,["class","autofocus","unstyled","text","label","pt"]),C(r,m({label:o.acceptLabel,class:[t.cx("pcAcceptButton"),a.confirmation.acceptClass],autofocus:o.autoFocusAccept,unstyled:t.unstyled,onClick:e[1]||(e[1]=function(u){return o.accept()})},a.confirmation.acceptProps,{pt:t.ptm("pcAcceptButton")}),ue({_:2},[o.acceptIcon||t.$slots.accepticon?{name:"icon",fn:B(function(u){return[x(t.$slots,"accepticon",{},function(){return[d("span",m({class:[o.acceptIcon,u.class]},t.ptm("pcAcceptButton").icon,{"data-pc-section":"acceptbuttonicon"}),null,16)]})]}),key:"0"}:void 0]),1040,["label","class","autofocus","unstyled","pt"])]}),key:"1"}]),1032,["visible","class","header","blockScroll","position","breakpoints","closeOnEscape","draggable","onUpdate:visible","pt","unstyled"])}wn.render=es;function ts(t){return new Worker("/assets/SocketToCoyote3-_8tQBIDD.js",{name:t==null?void 0:t.name})}function ns(t){return new Worker("/assets/SocketToCoyote2-CL4SS6Q_.js",{name:t==null?void 0:t.name})}const os={[G.V2]:"D-LAB",[G.V3]:"47"},Fe={[G.V2]:{main:"955a180b-0fe2-f5aa-a094-84b8d4f3e8ad",battery:"955a180a-0fe2-f5aa-a094-84b8d4f3e8ad"},[G.V3]:{main:"0000180c-0000-1000-8000-00805f9b34fb",battery:"0000180a-0000-1000-8000-00805f9b34fb"}};class is{constructor(e,n){F(this,"deviceVersion",G.V3);F(this,"clientId","");F(this,"events",new jt);F(this,"stopping",!1);F(this,"device",null);F(this,"gattServer",null);F(this,"mainService",null);F(this,"batteryService",null);F(this,"batteryTask",null);F(this,"characteristics",new Map);F(this,"worker",null);F(this,"on",this.events.on.bind(this.events));F(this,"once",this.events.once.bind(this.events));F(this,"off",this.events.off.bind(this.events));F(this,"handleDisconnected",()=>{this.gattServer=null,this.mainService=null,this.batteryService=null,this.characteristics.clear(),this.batteryTask&&(clearInterval(this.batteryTask),this.batteryTask=null),this.startReconnect()});F(this,"handleBTResponse",async e=>{var a,o;const i=e.target.value;if(i&&i.byteLength!==0){if(this.deviceVersion===G.V3)switch(i.getUint8(0)){case 177:const s=i.getInt8(2),l=i.getInt8(3);this.events.emit("strengthChange",s,l),(a=this.worker)==null||a.postMessage({type:"setStrength",strengthA:s,strengthB:l});break}else if(this.deviceVersion===G.V2){const r=new Uint8Array(i.buffer);r.reverse();let s=(r[0]&63)<<5|(r[1]&248)>>3,l=(r[1]&7)<<8|r[2];s=Math.ceil(s/2047*200),l=Math.ceil(l/2047*200),this.events.emit("strengthChange",s,l),(o=this.worker)==null||o.postMessage({type:"setStrength",strengthA:s,strengthB:l})}}});F(this,"handleWorkerMessage",async e=>{if(!e.type){console.error("Unknown message type");return}switch(e.type){case"onLoad":this.events.emit("workerInit");break;case"sendBluetoothData":if(!this.gattServer||!this.mainService)return;try{const n=e.data;let i=[];for(let a in n){const o=n[a];i.push(this.sendBluetoothData(a,o))}await Promise.all(i)}catch(n){console.error("波形写入异常: ",n)}break;case"stop":this.stopping||this.cleanup();break;default:console.error("Unknown message type",e);break}});F(this,"runBatteryTask",async()=>{if(this.batteryService)try{const e=this.characteristics.get("00001500-0000-1000-8000-00805f9b34fb");if(!e)return;const i=(await e.readValue()).getUint8(0);this.events.emit("batteryLevelChange",i)}catch(e){console.error("获取电量异常: ",e)}});this.deviceVersion=e,this.clientId=n}async scan(){if(!("bluetooth"in navigator)){this.events.emit("error",new Error("Bluetooth is not supported"));return}const e=os[this.deviceVersion],n=[Fe[this.deviceVersion].main,Fe[this.deviceVersion].battery];this.device=await navigator.bluetooth.requestDevice({filters:[{namePrefix:e}],optionalServices:n})}async connect(){if(!this.device)throw new Error("No device");if(this.device.addEventListener("gattserverdisconnected",this.handleDisconnected),!this.device.gatt)return console.log("Failed to get GATT server"),this.events.emit("error",new Error("Failed to get GATT server")),!1;this.device.gatt.connected||await this.device.gatt.connect();try{this.gattServer=this.device.gatt;const e=Fe[this.deviceVersion].main;this.mainService=await this.gattServer.getPrimaryService(e);const n=Fe[this.deviceVersion].battery;return this.batteryService=await this.gattServer.getPrimaryService(n),await this.addBTLisener(),this.events.emit("connect"),this.startWorker(),this.batteryTask=setInterval(this.runBatteryTask,120*1e3),!0}catch(e){throw this.disconnect(),e}}async addBTLisener(){if(this.deviceVersion===G.V3){const e=await this.mainService.getCharacteristic("0000150b-0000-1000-8000-00805f9b34fb");this.characteristics.set("0000150b-0000-1000-8000-00805f9b34fb",e),await e.startNotifications(),e.addEventListener("characteristicvaluechanged",this.handleBTResponse);const n=await this.batteryService.getCharacteristic("00001500-0000-1000-8000-00805f9b34fb");this.characteristics.set("00001500-0000-1000-8000-00805f9b34fb",n);const a=(await n.readValue()).getUint8(0);this.events.emit("batteryLevelChange",a);const o=await this.mainService.getCharacteristic("0000150a-0000-1000-8000-00805f9b34fb");this.characteristics.set("0000150a-0000-1000-8000-00805f9b34fb",o)}else if(this.deviceVersion===G.V2){const e=await this.mainService.getCharacteristic("955a1504-0fe2-f5aa-a094-84b8d4f3e8ad");this.characteristics.set("955a1504-0fe2-f5aa-a094-84b8d4f3e8ad",e),await e.startNotifications(),e.addEventListener("characteristicvaluechanged",this.handleBTResponse);const n=await this.batteryService.getCharacteristic("955a1500-0fe2-f5aa-a094-84b8d4f3e8ad");this.characteristics.set("955a1500-0fe2-f5aa-a094-84b8d4f3e8ad",n);const a=(await n.readValue()).getUint8(0);this.events.emit("batteryLevelChange",a);const o=await this.mainService.getCharacteristic("955a1505-0fe2-f5aa-a094-84b8d4f3e8ad");this.characteristics.set("955a1505-0fe2-f5aa-a094-84b8d4f3e8ad",o);const r=await this.mainService.getCharacteristic("955a1506-0fe2-f5aa-a094-84b8d4f3e8ad");this.characteristics.set("955a1506-0fe2-f5aa-a094-84b8d4f3e8ad",r)}}disconnect(){var e;this.stopping=!0,this.device&&(this.device.removeEventListener("gattserverdisconnected",this.handleDisconnected),(e=this.device.gatt)==null||e.disconnect()),this.worker&&this.stopWorker(),this.batteryTask&&(clearInterval(this.batteryTask),this.batteryTask=null),this.device=null,this.gattServer=null,this.mainService=null,this.batteryService=null,this.characteristics.clear(),this.events.emit("disconnect")}async startReconnect(){var e,n;for(this.events.emit("reconnecting");!this.stopping;){let i=Date.now();try{if(!this.device){this.cleanup();break}if(await((e=this.device.gatt)==null?void 0:e.connect()),(n=this.device.gatt)!=null&&n.connected){if(this.stopping){this.disconnect();break}console.log("Reconnect success"),await Tt(1e3),await this.connect();break}}catch(o){console.error("Reconnect failed: ",o)}let a=Date.now()-i;a<5e3&&await Tt(5e3-a)}}startWorker(){if(this.worker===null){switch(this.deviceVersion){case G.V3:this.worker=new ts;break;case G.V2:this.worker=new ns;break;default:console.error("Unknown device version");break}this.bindWorkerEvents()}else this.worker.postMessage({type:"reconnect"})}stopWorker(){if(this.worker){const e=this.worker;this.worker=null,e.postMessage({type:"disconnect"}),setTimeout(()=>{e.terminate()},3e3)}}bindWorkerEvents(){this.worker&&this.worker.addEventListener("message",e=>{e.data&&this.handleWorkerMessage(e.data)})}async sendBluetoothData(e,n){const i=this.characteristics.get(e);if(!i){console.error("No characteristic: ",e);return}await i.writeValueWithoutResponse(n)}startWs(){var i;const n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/dglab_ws/${this.clientId}`;(i=this.worker)==null||i.postMessage({type:"connect",url:n})}setStrengthLimit(e,n){var i;(i=this.worker)==null||i.postMessage({type:"setStrengthLimit",strengthLimitA:e,strengthLimitB:n})}setFreqBalance(e){var n;(n=this.worker)==null||n.postMessage({type:"setFreqBalance",freqBalance:e})}cleanup(){this.stopping=!0,this.disconnect(),this.events.removeAllListeners()}}function as(t){return new Worker("/assets/SocketToDebug-DdhTji1m.js",{name:t==null?void 0:t.name})}class rs{constructor(e){F(this,"deviceVersion",G.SIMULATOR);F(this,"events",new jt);F(this,"stopping",!1);F(this,"worker",null);F(this,"clientId");F(this,"on",this.events.on.bind(this.events));F(this,"once",this.events.once.bind(this.events));F(this,"off",this.events.off.bind(this.events));F(this,"handleWorkerMessage",async e=>{var n,i,a,o;if(!e.type){console.error("Unknown message type");return}switch(e.type){case"onLoad":this.events.emit("workerInit");break;case"strengthChange":new Notification(`强度变化 A: ${(n=e.data)==null?void 0:n.strengthA}, B: ${(i=e.data)==null?void 0:i.strengthB}`,{tag:"coyoteDebugStrengthChanged"}),this.events.emit("strengthChange",((a=e.data)==null?void 0:a.strengthA)??0,((o=e.data)==null?void 0:o.strengthB)??0);break;case"stop":this.stopping||this.cleanup();break;default:console.error("Unknown message type",e);break}});this.clientId=e}async scan(){throw new Error("Method not implemented.")}async connect(){await Notification.requestPermission(),this.events.emit("connect"),this.events.emit("batteryLevelChange",100),this.startWorker()}async disconnect(){this.stopWorker(),this.events.emit("disconnect")}startWorker(){this.worker===null?(this.worker=new as,this.bindWorkerEvents()):this.worker.postMessage({type:"reconnect"})}stopWorker(){if(this.worker){const e=this.worker;this.worker=null,e.postMessage({type:"disconnect"}),setTimeout(()=>{e.terminate()},3e3)}}bindWorkerEvents(){this.worker&&this.worker.addEventListener("message",e=>{e.data&&this.handleWorkerMessage(e.data)})}startWs(){var i;const n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/dglab_ws/${this.clientId}`;(i=this.worker)==null||i.postMessage({type:"connect",url:n})}setStrengthLimit(e,n){var i;(i=this.worker)==null||i.postMessage({type:"setStrengthLimit",strengthLimitA:e,strengthLimitB:n})}setFreqBalance(e){var n;(n=this.worker)==null||n.postMessage({type:"setFreqBalance",freqBalance:e})}async cleanup(){this.stopping=!0,await this.disconnect()}}const ss=ee({name:"CoyoteLocalConnectService",__name:"CoyoteLocalConnectService",props:{state:{}},setup(t,{expose:e}){const n=t;let i;X(()=>n.state,f=>{i=f},{immediate:!0});const a=Io(),o=kt("parentToast"),r=kt("parentConfirm"),s=async f=>{i.showConnectionDialog=!1,a.controller||(a.controller=new is(f,i.clientId));try{r==null||r.require({header:"蓝牙连接",message:"扫描中，请在弹出窗口中选择扫描到的设备，然后点击“配对”按钮。",acceptClass:"d-none",rejectClass:"d-none"}),await a.controller.scan(),r==null||r.require({header:"蓝牙连接",message:"正在连接到蓝牙设备，这可能需要十几秒的时间",acceptClass:"d-none",rejectClass:"d-none"}),await a.controller.connect(),u(),r==null||r.close(),o==null||o.add({severity:"success",summary:"连接成功",detail:"已连接到蓝牙控制器",life:3e3}),f===G.V2?i.connectorType=le.COYOTE_BLE_V2:i.connectorType=le.COYOTE_BLE_V3}catch(k){r==null||r.close(),console.error("Cannot connect via bluetooth:",k),o==null||o.add({severity:"error",summary:"连接失败",detail:k.message})}},l=async()=>{i.showConnectionDialog=!1,a.controller||(a.controller=new rs(i.clientId)),r==null||r.require({header:"本地调试",message:"请允许通知权限",acceptClass:"d-none",rejectClass:"d-none"});try{await a.controller.connect(),u(),r==null||r.close(),o==null||o.add({severity:"success",summary:"连接成功",detail:"已连接到本地调试控制器",life:3e3})}catch(f){r==null||r.close(),console.error("Cannot connect via local debug:",f),o==null||o.add({severity:"error",summary:"连接失败",detail:f.message})}i.connectorType=le.COYOTE_BLE_V3},u=()=>{a.controller&&(a.initConnection(),a.controller.on("reconnecting",()=>{r==null||r.require({header:"蓝牙连接",message:"连接已断开，正在重新连接到蓝牙设备",acceptClass:"d-none",rejectLabel:"取消",rejectProps:{severity:"secondary"},reject:()=>{a.disconnect(),r==null||r.close()}})}),a.controller.on("connect",()=>{r==null||r.close()}),a.controller.on("disconnect",()=>{r==null||r.close()}))};return X(()=>i.clientId,f=>{f&&a.disconnect()}),X(()=>[a.inputLimitA,a.inputLimitB],f=>{a.controller&&(a.controller.setStrengthLimit(f[0],f[1]),o==null||o.add({severity:"success",summary:"设置成功",detail:"已更新强度上限",life:3e3}))},{immediate:!0}),X(()=>a.freqBalance,f=>{a.controller&&i.connectorType===le.COYOTE_BLE_V2&&(a.controller.setFreqBalance(f),o==null||o.add({severity:"success",summary:"设置成功",detail:"已更新频率平衡参数",life:3e3}))},{immediate:!0}),e({startBluetoothConnect:s,startLocalDebugConnect:l}),(f,k)=>null}}),Ct=Ut("clients",{state:()=>({clientList:[]}),actions:{addClient(t,e){this.clientList.push({id:t,name:e,lastConnectTime:Date.now()})},getClientInfo(t){return this.clientList.find(e=>e.id===t)},updateClientName(t,e){const n=this.clientList.find(i=>i.id===t);n&&(n.name=e)},updateClientConnectTime(t){const e=this.clientList.find(n=>n.id===t);e&&(e.lastConnectTime=Date.now())}},persist:{key:"CGH_Clients"}}),ls={class:"flex items-center gap-2 mb-4"},cs=d("label",{class:"font-semibold w-30"},"游戏连接码",-1),us={class:"flex flex-col gap-2 mb-4"},ds={class:"flex items-center gap-2"},ps=d("label",{class:"font-semibold w-30"},"客户端备注名",-1),fs=d("span",{class:"text-gray-500 ml-28"},"客户端备注名会在每次打开页面的恢复连接窗口中显示",-1),hs={class:"flex items-center gap-2 mb-4"},gs=d("label",{class:"font-semibold w-30"},"客户端ID",-1),bs={class:"flex items-center gap-2 mb-4"},ms=d("label",{class:"font-semibold w-30"},"连接方式",-1),vs={class:"flex flex-col gap-2"},ys={class:"flex items-center gap-2"},ws=d("label",{class:"font-semibold w-30"},"MCP API",-1),Cs=d("span",{class:"text-gray-500 ml-28"},[W("可以使用支持MCP的AI客户端连接，如 "),d("a",{href:"https://www.cherry-ai.com/"},"Cherry Studio"),W(", "),d("a",{href:"https://cline.bot/"},"Cline")],-1),ks=ee({name:"ClientInfoDialog",__name:"ClientInfoDialog",props:Le({clientId:{},connectorType:{},controllerUrl:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const e=Ct(),n=He(t,"visible"),i=t,a=ht(),o=Ge({inputClientName:""}),r=J(()=>{switch(i.connectorType){case le.DGLAB:return"DGLab";case le.COYOTE_BLE_V2:case le.COYOTE_BLE_V3:return"蓝牙直连"}}),s=async k=>{e.updateClientName(i.clientId,k)},l=J(()=>i.controllerUrl?`${i.clientId}@${i.controllerUrl}`:i.clientId),u=J(()=>i.controllerUrl?`${i.controllerUrl}/api/mcp/${i.clientId}`:""),f=k=>{const g=document.getElementById(k);Gt(g),a.add({severity:"success",summary:"提示",detail:"复制成功",life:3e3})};return X(()=>n.value,k=>{if(k){const g=e.getClientInfo(i.clientId);console.log(g),g&&(o.inputClientName=g.name)}}),X(()=>o.inputClientName,k=>{s(k)}),(k,g)=>{const h=Ue,v=ne,I=ft,L=_e;return c(),$(L,{visible:n.value,"onUpdate:visible":g[2]||(g[2]=w=>n.value=w),modal:"",header:"连接信息",class:"mx-4 w-full md:w-[40rem]"},{default:B(()=>[d("div",ls,[cs,C(I,null,{default:B(()=>[C(h,{value:p(l),id:"input-gameConnectCode",class:"w-full",readonly:""},null,8,["value"]),C(v,{icon:"pi pi-copy",label:"复制",severity:"secondary",onClick:g[0]||(g[0]=w=>f("input-gameConnectCode"))})]),_:1})]),d("div",us,[d("div",ds,[ps,C(h,{modelValue:p(o).inputClientName,"onUpdate:modelValue":g[1]||(g[1]=w=>p(o).inputClientName=w),class:"w-full"},null,8,["modelValue"])]),fs]),d("div",hs,[gs,C(h,{value:i.clientId,class:"w-full",readonly:""},null,8,["value"])]),d("div",bs,[ms,C(h,{value:p(r),class:"w-full",readonly:""},null,8,["value"])]),d("div",vs,[d("div",ys,[ws,C(h,{value:p(u),class:"w-full",readonly:""},null,8,["value"])]),Cs])]),_:1},8,["visible"])}}});function Be(t){"@babel/helpers - typeof";return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(t)}function Is(t,e,n){return(e=Ss(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ss(t){var e=Ls(t,"string");return Be(e)=="symbol"?e:e+""}function Ls(t,e){if(Be(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Be(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ps=function(e){var n=e.dt;return`
.p-paginator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background: `.concat(n("paginator.background"),`;
    color: `).concat(n("paginator.color"),`;
    padding: `).concat(n("paginator.padding"),`;
    border-radius: `).concat(n("paginator.border.radius"),`;
    gap: `).concat(n("paginator.gap"),`;
}

.p-paginator-content-start {
    margin-right: auto;
}

.p-paginator-content-end {
    margin-left: auto;
}

.p-paginator-page,
.p-paginator-next,
.p-paginator-last,
.p-paginator-first,
.p-paginator-prev {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
    overflow: hidden;
    position: relative;
    background: `).concat(n("paginator.nav.button.background"),`;
    border: 0 none;
    color: `).concat(n("paginator.nav.button.color"),`;
    min-width: `).concat(n("paginator.nav.button.width"),`;
    height: `).concat(n("paginator.nav.button.height"),`;
    transition: background `).concat(n("paginator.transition.duration"),", color ").concat(n("paginator.transition.duration"),", outline-color ").concat(n("paginator.transition.duration"),", box-shadow ").concat(n("paginator.transition.duration"),`;
    border-radius: `).concat(n("paginator.nav.button.border.radius"),`;
    padding: 0;
    margin: 0;
}

.p-paginator-page:focus-visible,
.p-paginator-next:focus-visible,
.p-paginator-last:focus-visible,
.p-paginator-first:focus-visible,
.p-paginator-prev:focus-visible {
    box-shadow: `).concat(n("paginator.nav.button.focus.ring.shadow"),`;
    outline: `).concat(n("paginator.nav.button.focus.ring.width")," ").concat(n("paginator.nav.button.focus.ring.style")," ").concat(n("paginator.nav.button.focus.ring.color"),`;
    outline-offset: `).concat(n("paginator.nav.button.focus.ring.offset"),`;
}

.p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,
.p-paginator-first:not(.p-disabled):hover,
.p-paginator-prev:not(.p-disabled):hover,
.p-paginator-next:not(.p-disabled):hover,
.p-paginator-last:not(.p-disabled):hover {
    background: `).concat(n("paginator.nav.button.hover.background"),`;
    color: `).concat(n("paginator.nav.button.hover.color"),`;
}

.p-paginator-page.p-paginator-page-selected {
    background: `).concat(n("paginator.nav.button.selected.background"),`;
    color: `).concat(n("paginator.nav.button.selected.color"),`;
}

.p-paginator-current {
    color: `).concat(n("paginator.current.page.report.color"),`;
}

.p-paginator-pages {
    display: flex;
    align-items: center;
    gap: `).concat(n("paginator.gap"),`;
}

.p-paginator-jtp-input .p-inputtext {
    max-width: `).concat(n("paginator.jump.to.page.input.max.width"),`;
}
`)},Os={paginator:function(e){var n=e.instance,i=e.key;return["p-paginator p-component",Is({"p-paginator-default":!n.hasBreakpoints()},"p-paginator-".concat(i),n.hasBreakpoints())]},contentStart:"p-paginator-content-start",contentEnd:"p-paginator-content-end",first:function(e){var n=e.instance;return["p-paginator-first",{"p-disabled":n.$attrs.disabled}]},firstIcon:"p-paginator-first-icon",prev:function(e){var n=e.instance;return["p-paginator-prev",{"p-disabled":n.$attrs.disabled}]},prevIcon:"p-paginator-prev-icon",next:function(e){var n=e.instance;return["p-paginator-next",{"p-disabled":n.$attrs.disabled}]},nextIcon:"p-paginator-next-icon",last:function(e){var n=e.instance;return["p-paginator-last",{"p-disabled":n.$attrs.disabled}]},lastIcon:"p-paginator-last-icon",pages:"p-paginator-pages",page:function(e){var n=e.props,i=e.pageLink;return["p-paginator-page",{"p-paginator-page-selected":i-1===n.page}]},current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},Ts=oe.extend({name:"paginator",theme:Ps,classes:Os}),Cn={name:"AngleDoubleLeftIcon",extends:fe},Bs=d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z",fill:"currentColor"},null,-1),_s=[Bs];function $s(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),_s,16)}Cn.render=$s;var kn={name:"AngleDoubleRightIcon",extends:fe},Es=d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z",fill:"currentColor"},null,-1),As=[Es];function xs(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),As,16)}kn.render=xs;var In={name:"AngleRightIcon",extends:fe},Vs=d("path",{d:"M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z",fill:"currentColor"},null,-1),Ds=[Vs];function Fs(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Ds,16)}In.render=Fs;var Sn={name:"AngleLeftIcon",extends:fe},Ms=d("path",{d:"M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z",fill:"currentColor"},null,-1),Rs=[Ms];function Ns(t,e,n,i,a,o){return c(),y("svg",m({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Rs,16)}Sn.render=Ns;var Us={name:"BasePaginator",extends:K,props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:[Object,String],default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},style:Ts,provide:function(){return{$pcPaginator:this,$parentInstance:this}}},Ln={name:"CurrentPageReport",hostName:"Paginator",extends:K,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text:function(){var e=this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords);return e}}};function js(t,e,n,i,a,o){return c(),y("span",m({class:t.cx("current")},t.ptm("current")),j(o.text),17)}Ln.render=js;var Pn={name:"FirstPageLink",hostName:"Paginator",extends:K,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleDoubleLeftIcon:Cn},directives:{ripple:he}};function Ks(t,e,n,i,a,o){var r=de("ripple");return ae((c(),y("button",m({class:t.cx("first"),type:"button"},o.getPTOptions("first"),{"data-pc-group-section":"pagebutton"}),[(c(),$(q(n.template||"AngleDoubleLeftIcon"),m({class:t.cx("firstIcon")},o.getPTOptions("firstIcon")),null,16,["class"]))],16)),[[r]])}Pn.render=Ks;var On={name:"JumpToPageDropdown",hostName:"Paginator",extends:K,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean,templates:null},methods:{onChange:function(e){this.$emit("page-change",e)}},computed:{pageOptions:function(){for(var e=[],n=0;n<this.pageCount;n++)e.push({label:String(n+1),value:n});return e}},components:{JTPSelect:be}};function zs(t,e,n,i,a,o){var r=N("JTPSelect");return c(),$(r,{modelValue:n.page,options:o.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":e[0]||(e[0]=function(s){return o.onChange(s)}),class:H(t.cx("pcJumpToPageDropdown")),disabled:n.disabled,unstyled:t.unstyled,pt:t.ptm("pcJumpToPageDropdown"),"data-pc-group-section":"pagedropdown"},ue({_:2},[n.templates.jumptopagedropdownicon?{name:"dropdownicon",fn:B(function(s){return[(c(),$(q(n.templates.jumptopagedropdownicon),{class:H(s.class)},null,8,["class"]))]}),key:"0"}:void 0]),1032,["modelValue","options","class","disabled","unstyled","pt"])}On.render=zs;var Tn={name:"JumpToPageInput",hostName:"Paginator",extends:K,inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},data:function(){return{d_page:this.page}},watch:{page:function(e){this.d_page=e}},methods:{onChange:function(e){e!==this.page&&(this.d_page=e,this.$emit("page-change",e-1))}},computed:{inputArialabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.jumpToPageInputLabel:void 0}},components:{JTPInput:Mt}};function Hs(t,e,n,i,a,o){var r=N("JTPInput");return c(),$(r,{ref:"jtpInput",modelValue:a.d_page,class:H(t.cx("pcJumpToPageInput")),"aria-label":o.inputArialabel,disabled:n.disabled,"onUpdate:modelValue":o.onChange,unstyled:t.unstyled,pt:t.ptm("pcJumpToPageInput")},null,8,["modelValue","class","aria-label","disabled","onUpdate:modelValue","unstyled","pt"])}Tn.render=Hs;var Bn={name:"LastPageLink",hostName:"Paginator",extends:K,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleDoubleRightIcon:kn},directives:{ripple:he}};function Gs(t,e,n,i,a,o){var r=de("ripple");return ae((c(),y("button",m({class:t.cx("last"),type:"button"},o.getPTOptions("last"),{"data-pc-group-section":"pagebutton"}),[(c(),$(q(n.template||"AngleDoubleRightIcon"),m({class:t.cx("lastIcon")},o.getPTOptions("lastIcon")),null,16,["class"]))],16)),[[r]])}Bn.render=Gs;var _n={name:"NextPageLink",hostName:"Paginator",extends:K,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleRightIcon:In},directives:{ripple:he}};function Ws(t,e,n,i,a,o){var r=de("ripple");return ae((c(),y("button",m({class:t.cx("next"),type:"button"},o.getPTOptions("next"),{"data-pc-group-section":"pagebutton"}),[(c(),$(q(n.template||"AngleRightIcon"),m({class:t.cx("nextIcon")},o.getPTOptions("nextIcon")),null,16,["class"]))],16)),[[r]])}_n.render=Ws;var $n={name:"PageLinks",hostName:"Paginator",extends:K,inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{getPTOptions:function(e,n){return this.ptm(n,{context:{active:e===this.page}})},onPageLinkClick:function(e,n){this.$emit("click",{originalEvent:e,value:n})},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},directives:{ripple:he}},Js=["aria-label","aria-current","onClick","data-p-active"];function qs(t,e,n,i,a,o){var r=de("ripple");return c(),y("span",m({class:t.cx("pages")},t.ptm("pages")),[(c(!0),y(Y,null,ge(n.value,function(s){return ae((c(),y("button",m({key:s,class:t.cx("page",{pageLink:s}),type:"button","aria-label":o.ariaPageLabel(s),"aria-current":s-1===n.page?"page":void 0,onClick:function(u){return o.onPageLinkClick(u,s)},ref_for:!0},o.getPTOptions(s-1,"page"),{"data-p-active":s-1===n.page}),[W(j(s),1)],16,Js)),[[r]])}),128))],16)}$n.render=qs;var En={name:"PrevPageLink",hostName:"Paginator",extends:K,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleLeftIcon:Sn},directives:{ripple:he}};function Ys(t,e,n,i,a,o){var r=de("ripple");return ae((c(),y("button",m({class:t.cx("prev"),type:"button"},o.getPTOptions("prev"),{"data-pc-group-section":"pagebutton"}),[(c(),$(q(n.template||"AngleLeftIcon"),m({class:t.cx("prevIcon")},o.getPTOptions("prevIcon")),null,16,["class"]))],16)),[[r]])}En.render=Ys;var An={name:"RowsPerPageDropdown",hostName:"Paginator",extends:K,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean,templates:null},methods:{onChange:function(e){this.$emit("rows-change",e)}},computed:{rowsOptions:function(){var e=[];if(this.options)for(var n=0;n<this.options.length;n++)e.push({label:String(this.options[n]),value:this.options[n]});return e}},components:{RPPSelect:be}};function Zs(t,e,n,i,a,o){var r=N("RPPSelect");return c(),$(r,{modelValue:n.rows,options:o.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":e[0]||(e[0]=function(s){return o.onChange(s)}),class:H(t.cx("pcRowPerPageDropdown")),disabled:n.disabled,unstyled:t.unstyled,pt:t.ptm("pcRowPerPageDropdown"),"data-pc-group-section":"pagedropdown"},ue({_:2},[n.templates.rowsperpagedropdownicon?{name:"dropdownicon",fn:B(function(s){return[(c(),$(q(n.templates.rowsperpagedropdownicon),{class:H(s.class)},null,8,["class"]))]}),key:"0"}:void 0]),1032,["modelValue","options","class","disabled","unstyled","pt"])}An.render=Zs;function Qs(t){return tl(t)||el(t)||xn(t)||Xs()}function Xs(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function el(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tl(t){if(Array.isArray(t))return dt(t)}function ut(t){"@babel/helpers - typeof";return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(t)}function xt(t,e){return il(t)||ol(t,e)||xn(t,e)||nl()}function nl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xn(t,e){if(t){if(typeof t=="string")return dt(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dt(t,e):void 0}}function dt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ol(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,a,o,r,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(f){u=!0,a=f}finally{try{if(!l&&n.return!=null&&(r=n.return(),Object(r)!==r))return}finally{if(u)throw a}}return s}}function il(t){if(Array.isArray(t))return t}var Vn={name:"Paginator",extends:Us,inheritAttrs:!1,emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(e){this.d_first=e},rows:function(e){this.d_rows=e},totalRecords:function(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},mounted:function(){this.setPaginatorAttribute(),this.createStyle()},methods:{changePage:function(e){var n=this.pageCount;if(e>=0&&e<n){this.d_first=this.d_rows*e;var i={page:e,first:this.d_first,rows:this.d_rows,pageCount:n};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",i)}},changePageToFirst:function(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev:function(e){this.changePage(this.page-1),e.preventDefault()},changePageLink:function(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext:function(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast:function(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange:function(e){this.d_rows=e,this.changePage(this.page)},createStyle:function(){var e=this;if(this.hasBreakpoints()&&!this.isUnstyled){var n;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",A.setAttribute(this.styleElement,"nonce",(n=this.$primevue)===null||n===void 0||(n=n.config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce),document.head.appendChild(this.styleElement);var i="",a=Object.keys(this.template),o={};a.sort(function(v,I){return parseInt(v)-parseInt(I)}).forEach(function(v){o[v]=e.template[v]});for(var r=0,s=Object.entries(Object.entries(o));r<s.length;r++){var l=xt(s[r],2),u=l[0],f=xt(l[1],1),k=f[0],g=void 0,h=void 0;k!=="default"&&typeof Object.keys(o)[u-1]=="string"?h=Number(Object.keys(o)[u-1].slice(0,-2))+1+"px":h=Object.keys(o)[u-1],g=Object.entries(o)[u-1]?"and (min-width:".concat(h,")"):"",k==="default"?i+=`
                            @media screen `.concat(g,` {
                                .paginator[`).concat(this.attributeSelector,`],
                                    display: flex;
                                }
                            }
                        `):i+=`
.paginator[`.concat(this.attributeSelector,"], .p-paginator-").concat(k,` {
    display: none;
}
@media screen `).concat(g," and (max-width: ").concat(k,`) {
    .paginator[`).concat(this.attributeSelector,"], .p-paginator-").concat(k,` {
        display: flex;
    }
    .paginator[`).concat(this.attributeSelector,`],
    .p-paginator-default{
        display: none;
    }
}
                    `)}this.styleElement.innerHTML=i}},hasBreakpoints:function(){return ut(this.template)==="object"},setPaginatorAttribute:function(){var e=this;this.$refs.paginator&&this.$refs.paginator.length>=0&&Qs(this.$refs.paginator).forEach(function(n){n.setAttribute(e.attributeSelector,"")})},getAriaLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[e]:void 0}},computed:{templateItems:function(){var e={};if(this.hasBreakpoints()){e=this.template,e.default||(e.default="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown");for(var n in e)e[n]=this.template[n].split(" ").map(function(i){return i.trim()});return e}return e.default=this.template.split(" ").map(function(i){return i.trim()}),e},page:function(){return Math.floor(this.d_first/this.d_rows)},pageCount:function(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage:function(){return this.page===0},isLastPage:function(){return this.page===this.pageCount-1},calculatePageLinkBoundaries:function(){var e=this.pageCount,n=Math.min(this.pageLinkSize,e),i=Math.max(0,Math.ceil(this.page-n/2)),a=Math.min(e-1,i+n-1),o=this.pageLinkSize-(a-i+1);return i=Math.max(0,i-o),[i,a]},pageLinks:function(){for(var e=[],n=this.calculatePageLinkBoundaries,i=n[0],a=n[1],o=i;o<=a;o++)e.push(o+1);return e},currentState:function(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty:function(){return this.pageCount===0},currentPage:function(){return this.pageCount>0?this.page+1:0},attributeSelector:function(){return Pe()}},components:{CurrentPageReport:Ln,FirstPageLink:Pn,LastPageLink:Bn,NextPageLink:_n,PageLinks:$n,PrevPageLink:En,RowsPerPageDropdown:An,JumpToPageDropdown:On,JumpToPageInput:Tn}};function al(t,e,n,i,a,o){var r=N("FirstPageLink"),s=N("PrevPageLink"),l=N("NextPageLink"),u=N("LastPageLink"),f=N("PageLinks"),k=N("CurrentPageReport"),g=N("RowsPerPageDropdown"),h=N("JumpToPageDropdown"),v=N("JumpToPageInput");return t.alwaysShow||o.pageLinks&&o.pageLinks.length>1?(c(),y("nav",Nt(m({key:0},t.ptmi("paginatorContainer"))),[(c(!0),y(Y,null,ge(o.templateItems,function(I,L){return c(),y("div",m({key:L,ref_for:!0,ref:"paginator",class:t.cx("paginator",{key:L})},t.ptm("root")),[t.$slots.start?(c(),y("div",m({key:0,class:t.cx("contentStart"),ref_for:!0},t.ptm("contentStart")),[x(t.$slots,"start",{state:o.currentState})],16)):V("",!0),(c(!0),y(Y,null,ge(I,function(w){return c(),y(Y,{key:w},[w==="FirstPageLink"?(c(),$(r,{key:0,"aria-label":o.getAriaLabel("firstPageLabel"),template:t.$slots.firsticon||t.$slots.firstpagelinkicon,onClick:e[0]||(e[0]=function(O){return o.changePageToFirst(O)}),disabled:o.isFirstPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):w==="PrevPageLink"?(c(),$(s,{key:1,"aria-label":o.getAriaLabel("prevPageLabel"),template:t.$slots.previcon||t.$slots.prevpagelinkicon,onClick:e[1]||(e[1]=function(O){return o.changePageToPrev(O)}),disabled:o.isFirstPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):w==="NextPageLink"?(c(),$(l,{key:2,"aria-label":o.getAriaLabel("nextPageLabel"),template:t.$slots.nexticon||t.$slots.nextpagelinkicon,onClick:e[2]||(e[2]=function(O){return o.changePageToNext(O)}),disabled:o.isLastPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):w==="LastPageLink"?(c(),$(u,{key:3,"aria-label":o.getAriaLabel("lastPageLabel"),template:t.$slots.lasticon||t.$slots.lastpagelinkicon,onClick:e[3]||(e[3]=function(O){return o.changePageToLast(O)}),disabled:o.isLastPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):w==="PageLinks"?(c(),$(f,{key:4,"aria-label":o.getAriaLabel("pageLabel"),value:o.pageLinks,page:o.page,onClick:e[4]||(e[4]=function(O){return o.changePageLink(O)}),pt:t.pt},null,8,["aria-label","value","page","pt"])):w==="CurrentPageReport"?(c(),$(k,{key:5,"aria-live":"polite",template:t.currentPageReportTemplate,currentPage:o.currentPage,page:o.page,pageCount:o.pageCount,first:a.d_first,rows:a.d_rows,totalRecords:t.totalRecords,unstyled:t.unstyled,pt:t.pt},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords","unstyled","pt"])):w==="RowsPerPageDropdown"&&t.rowsPerPageOptions?(c(),$(g,{key:6,"aria-label":o.getAriaLabel("rowsPerPageLabel"),rows:a.d_rows,options:t.rowsPerPageOptions,onRowsChange:e[5]||(e[5]=function(O){return o.onRowChange(O)}),disabled:o.empty,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","rows","options","disabled","templates","unstyled","pt"])):w==="JumpToPageDropdown"?(c(),$(h,{key:7,"aria-label":o.getAriaLabel("jumpToPageDropdownLabel"),page:o.page,pageCount:o.pageCount,onPageChange:e[6]||(e[6]=function(O){return o.changePage(O)}),disabled:o.empty,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","page","pageCount","disabled","templates","unstyled","pt"])):w==="JumpToPageInput"?(c(),$(v,{key:8,page:o.currentPage,onPageChange:e[7]||(e[7]=function(O){return o.changePage(O)}),disabled:o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["page","disabled","unstyled","pt"])):V("",!0)],64)}),128)),t.$slots.end?(c(),y("div",m({key:1,class:t.cx("contentEnd"),ref_for:!0},t.ptm("contentEnd")),[x(t.$slots,"end",{state:o.currentState})],16)):V("",!0)],16)}),128))],16)):V("",!0)}Vn.render=al;var rl=function(e){var n=e.dt;return`
.p-dataview {
    border-color: `.concat(n("dataview.border.color"),`;
    border-width: `).concat(n("dataview.border.width"),`;
    border-style: solid;
    border-radius: `).concat(n("dataview.border.radius"),`;
    padding: `).concat(n("dataview.padding"),`;
}

.p-dataview-header {
    background: `).concat(n("dataview.header.background"),`;
    color: `).concat(n("dataview.header.color"),`;
    border-color: `).concat(n("dataview.header.border.color"),`;
    border-width: `).concat(n("dataview.header.border.width"),`;
    border-style: solid;
    padding: `).concat(n("dataview.header.padding"),`;
    border-radius: `).concat(n("dataview.header.border.radius"),`;
}

.p-dataview-content {
    background: `).concat(n("dataview.content.background"),`;
    border-color: `).concat(n("dataview.content.border.color"),`;
    border-width: `).concat(n("dataview.content.border.width"),`;
    border-style: solid;
    color: `).concat(n("dataview.content.color"),`;
    padding: `).concat(n("dataview.content.padding"),`;
    border-radius: `).concat(n("dataview.content.border.radius"),`;
}

.p-dataview-footer {
    background: `).concat(n("dataview.footer.background"),`;
    color: `).concat(n("dataview.footer.color"),`;
    border-color: `).concat(n("dataview.footer.border.color"),`;
    border-width: `).concat(n("dataview.footer.border.width"),`;
    border-style: solid;
    padding: `).concat(n("dataview.footer.padding"),`;
    border-radius: `).concat(n("dataview.footer.border.radius"),`;
}

.p-dataview-paginator-top {
    border-width: `).concat(n("dataview.paginator.top.border.width"),`;
    border-color: `).concat(n("dataview.paginator.top.border.color"),`;
    border-style: solid;
}

.p-dataview-paginator-bottom {
    border-width: `).concat(n("dataview.paginator.bottom.border.width"),`;
    border-color: `).concat(n("dataview.paginator.bottom.border.color"),`;
    border-style: solid;
}
`)},sl={root:function(e){var n=e.props;return["p-dataview p-component",{"p-dataview-list":n.layout==="list","p-dataview-grid":n.layout==="grid"}]},header:"p-dataview-header",pcPaginator:function(e){var n=e.position;return"p-dataview-paginator-"+n},content:"p-dataview-content",emptyMessage:"p-dataview-empty-message",footer:"p-dataview-footer"},ll=oe.extend({name:"dataview",theme:rl,classes:sl}),cl={name:"BaseDataView",extends:K,props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},style:ll,provide:function(){return{$pcDataView:this,$parentInstance:this}}};function ul(t){return hl(t)||fl(t)||pl(t)||dl()}function dl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pl(t,e){if(t){if(typeof t=="string")return pt(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(t,e):void 0}}function fl(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function hl(t){if(Array.isArray(t))return pt(t)}function pt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var Dn={name:"DataView",extends:cl,inheritAttrs:!1,emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(e){this.d_first=e},rows:function(e){this.d_rows=e},sortField:function(){this.resetPage()},sortOrder:function(){this.resetPage()}},methods:{getKey:function(e,n){return this.dataKey?U.resolveFieldData(e,this.dataKey):n},onPage:function(e){this.d_first=e.first,this.d_rows=e.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",e)},sort:function(){var e=this;if(this.value){var n=ul(this.value),i=U.localeComparator();return n.sort(function(a,o){var r=U.resolveFieldData(a,e.sortField),s=U.resolveFieldData(o,e.sortField);return U.sort(r,s,e.sortOrder,i)}),n}else return null},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{getTotalRecords:function(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty:function(){return!this.value||this.value.length===0},emptyMessageText:function(){var e;return((e=this.$primevue.config)===null||e===void 0||(e=e.locale)===null||e===void 0?void 0:e.emptyMessage)||""},paginatorTop:function(){return this.paginator&&(this.paginatorPosition!=="bottom"||this.paginatorPosition==="both")},paginatorBottom:function(){return this.paginator&&(this.paginatorPosition!=="top"||this.paginatorPosition==="both")},items:function(){if(this.value&&this.value.length){var e=this.value;if(e&&e.length&&this.sortField&&(e=this.sort()),this.paginator){var n=this.lazy?0:this.d_first;return e.slice(n,n+this.d_rows)}else return e}else return null}},components:{DVPaginator:Vn}};function gl(t,e,n,i,a,o){var r=N("DVPaginator");return c(),y("div",m({class:t.cx("root")},t.ptmi("root")),[t.$slots.header?(c(),y("div",m({key:0,class:t.cx("header")},t.ptm("header")),[x(t.$slots,"header")],16)):V("",!0),o.paginatorTop?(c(),$(r,{key:1,rows:a.d_rows,first:a.d_first,totalRecords:o.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:H(t.cx("pcPaginator",{position:"top"})),alwaysShow:t.alwaysShowPaginator,onPage:e[0]||(e[0]=function(s){return o.onPage(s)}),unstyled:t.unstyled,pt:t.ptm("pcPaginator")},ue({_:2},[t.$slots.paginatorstart?{name:"start",fn:B(function(){return[x(t.$slots,"paginatorstart")]}),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:B(function(){return[x(t.$slots,"paginatorend")]}),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):V("",!0),d("div",m({class:t.cx("content")},t.ptm("content")),[o.empty?(c(),y("div",m({key:1,class:t.cx("emptyMessage")},t.ptm("emptyMessage")),[x(t.$slots,"empty",{layout:t.layout},function(){return[W(j(o.emptyMessageText),1)]})],16)):(c(),y(Y,{key:0},[t.$slots.list&&t.layout==="list"?x(t.$slots,"list",{key:0,items:o.items}):V("",!0),t.$slots.grid&&t.layout==="grid"?x(t.$slots,"grid",{key:1,items:o.items}):V("",!0)],64))],16),o.paginatorBottom?(c(),$(r,{key:2,rows:a.d_rows,first:a.d_first,totalRecords:o.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:H(t.cx("pcPaginator",{position:"bottom"})),alwaysShow:t.alwaysShowPaginator,onPage:e[1]||(e[1]=function(s){return o.onPage(s)}),unstyled:t.unstyled,pt:t.ptm("pcPaginator")},ue({_:2},[t.$slots.paginatorstart?{name:"start",fn:B(function(){return[x(t.$slots,"paginatorstart")]}),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:B(function(){return[x(t.$slots,"paginatorend")]}),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):V("",!0),t.$slots.footer?(c(),y("div",m({key:3,class:t.cx("footer")},t.ptm("footer")),[x(t.$slots,"footer")],16)):V("",!0)],16)}Dn.render=gl;const bl=t=>(je("data-v-634254e4"),t=t(),Ke(),t),ml={class:"flex flex-col"},vl={class:"flex flex-col sm:flex-row sm:items-center gap-4"},yl=bl(()=>d("div",{class:"bg-primary text-primary-contrast rounded-full w-10 h-10 flex-shrink-0 flex items-center justify-center"},[d("i",{class:"pi pi-history"})],-1)),wl={class:"flex flex-col md:flex-row justify-between md:items-center flex-1 gap-6"},Cl={class:"flex flex-row md:flex-col justify-between items-start gap-2"},kl={class:"font-medium text-surface-500 dark:text-surface-400 text-sm"},Il={class:"text-lg font-medium"},Sl={class:"flex flex-col md:items-end gap-8"},Ll={class:"flex flex-row-reverse md:flex-row gap-2"},Pl=ee({name:"ConnectToSavedClientsList",__name:"ConnectToSavedClientsList",emits:["connectToClient"],setup(t,{emit:e}){const n=Ct(),i=e,a=J(()=>n.clientList.sort((r,s)=>s.lastConnectTime-r.lastConnectTime)),o=r=>{i("connectToClient",r)};return(r,s)=>{const l=ne,u=Ft,f=Dn;return c(),$(f,{class:"clientsList-container",value:p(a)},{list:B(k=>[d("div",ml,[(c(!0),y(Y,null,ge(k.items,(g,h)=>(c(),y("div",{key:h},[C(u,{class:"clientCard m-1"},{content:B(()=>[d("div",vl,[yl,d("div",wl,[d("div",Cl,[d("div",null,[d("span",kl,"ID: "+j(g.id),1),d("div",Il,j(g.name),1)])]),d("div",Sl,[d("div",Ll,[C(l,{icon:"pi pi-play",label:"继续",class:"flex-auto md:flex-initial whitespace-nowrap mr-2",onClick:v=>o(g.id)},null,8,["onClick"])])])])])]),_:2},1024)]))),128))])]),_:1},8,["value"])}}}),Ol=$e(Pl,[["__scopeId","data-v-634254e4"]]),Tl={class:"flex flex-col gap-4"},Bl={class:"flex justify-end mt-4 gap-4"},_l=ee({name:"ConnectToSavedClientsDialog",__name:"ConnectToSavedClientsDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:Le(["cancel","confirm"],["update:visible"]),setup(t,{emit:e}){const n=He(t,"visible"),i=e,a=()=>{n.value=!1},o=r=>{i("confirm",r),n.value=!1};return(r,s)=>{const l=ne,u=_e;return c(),$(u,{visible:n.value,"onUpdate:visible":s[0]||(s[0]=f=>n.value=f),modal:"",header:"连接过的设备",class:"connectedToSavedClients-dialog mx-4 w-full md:w-[40rem]"},{default:B(()=>[d("div",Tl,[C(Ol,{onConnectToClient:o}),d("div",Bl,[C(l,{label:"连接新设备",onClick:a})])])]),_:1},8,["visible"])}}}),$l={class:"w-full page-container"},El={class:"flex flex-col lg:flex-row items-center lg:items-start gap-8"},Al={class:"flex"},xl={key:2,class:"text-red-600 block flex items-center gap-1 mr-2"},Vl=d("i",{class:"pi pi-circle-off"},null,-1),Dl=d("span",null,"未连接",-1),Fl=[Vl,Dl],Ml={key:3,class:"text-green-600 block flex items-center gap-1 mr-2"},Rl=d("i",{class:"pi pi-circle-on"},null,-1),Nl=d("span",null,"已连接",-1),Ul=[Rl,Nl],jl={key:4,class:"text-yellow-600 block flex items-center gap-1 mr-2"},Kl=d("i",{class:"pi pi-spin pi-spinner"},null,-1),zl=d("span",null,"等待连接",-1),Hl=[Kl,zl],Gl={class:"w-full px-2 controller-page-tabs"},Wl={class:"flex flex-col items-center gap-2 px-2 py-1"},ac=ee({__name:"Controller",setup(t){const e=Ge({controllerPage:"strength",strengthVal:5,randomStrengthVal:5,fireStrengthLimit:30,strengthLimit:20,tempStrength:0,randomFreq:[5,10],bChannelEnabled:!1,bChannelMultiple:1,pulseList:null,customPulseList:[],selectPulseIds:[""],firePulseId:"",pulseMode:"single",pulseChangeInterval:60,newClientName:"",clientId:"",clientWsUrlList:null,clientStatus:"init",apiBaseHttpUrl:"",connectorType:le.DGLAB,gameStarted:!1,showConnectionDialog:!1,showClientInfoDialog:!1,showLiveCompDialog:!1,showConfigSavePrompt:!1,showClientNameDialog:!1,showConnectToSavedClientsDialog:!1}),n=vo(),i=ze(null),a=[{title:"强度配置",id:"strength",icon:"pi pi-bolt"},{title:"波形配置",id:"pulse",icon:"pi pi-wave-pulse"},{title:"游戏连接",id:"game",icon:"pi pi-map"}];X(()=>e.controllerPage,b=>{n.push({path:b})});let o=!1,r=null;const s=J({get:()=>({fireStrengthLimit:e.fireStrengthLimit,strengthChangeInterval:e.randomFreq,enableBChannel:e.bChannelEnabled,bChannelStrengthMultiplier:e.bChannelMultiple,pulseId:e.selectPulseIds.length===1?e.selectPulseIds[0]:e.selectPulseIds,firePulseId:e.firePulseId===""?null:e.firePulseId,pulseMode:e.pulseMode,pulseChangeInterval:e.pulseChangeInterval}),set:b=>{e.fireStrengthLimit=b.fireStrengthLimit,e.randomFreq=b.strengthChangeInterval,e.bChannelEnabled=b.enableBChannel,e.bChannelMultiple=b.bChannelStrengthMultiplier,e.selectPulseIds=typeof b.pulseId=="string"?[b.pulseId]:b.pulseId||[""],e.firePulseId=b.firePulseId||"",e.pulseMode=b.pulseMode,e.pulseChangeInterval=b.pulseChangeInterval}});let l=null;const u=J({get:()=>({strength:e.strengthVal,randomStrength:e.randomStrengthVal}),set:b=>{e.strengthVal=b.strength,e.randomStrengthVal=b.randomStrength}}),f=J(()=>({valLow:Math.min(e.strengthVal+e.tempStrength,e.strengthLimit),valHigh:Math.min(e.strengthVal+e.tempStrength+e.randomStrengthVal,e.strengthLimit),valLimit:e.strengthLimit})),k=ht(),g=Co(),h=Ct(),v=yn();Ze("parentToast",k),Ze("parentConfirm",g);let I,L,w=!1;const O=async()=>{try{let b=await It.getServerInfo();se(b),I=b,e.clientWsUrlList=I.server.clientWsUrls,e.apiBaseHttpUrl=I.server.apiBaseHttpUrl}catch(b){console.error("Cannot get server info:",b),k.add({severity:"error",summary:"获取服务器信息失败",detail:b.message})}},T=async()=>{L||(L=new Lo(I.server.wsUrl),L.on("open",()=>{console.log("WebSocket connected or re-connected"),e.clientId&&P()}),L.on("pulseListUpdated",b=>{console.log("Pulse list updated:",b),e.pulseList=b}),L.on("clientConnected",()=>{console.log("DG-Lab client connected"),e.showConnectionDialog=!1,e.clientStatus="connected",w=!0,_(),k.add({severity:"success",summary:"客户端连接成功",detail:"已连接到客户端",life:3e3})}),L.on("clientDisconnected",()=>{console.log("DG-Lab client disconnected"),e.clientStatus="waiting",e.gameStarted=!1,w=!1}),L.on("gameStarted",()=>{e.gameStarted=!0}),L.on("gameStopped",()=>{e.gameStarted=!1}),L.on("strengthChanged",b=>{e.strengthLimit=b.limit,e.tempStrength=b.tempStrength}),L.on("strengthConfigUpdated",b=>{e.showConfigSavePrompt?l=b:(u.value=b,l=b,o=!0,Qe(()=>{o=!1}))}),L.on("mainGameConfigUpdated",b=>{e.showConfigSavePrompt?r=b:(s.value=b,r=b,o=!0,Qe(()=>{o=!1}))}),L.on("customPulseConfigUpdated",b=>{e.customPulseList=b.customPulseList}),L.on("remoteNotification",b=>{b.ignoreId&&v.isIgnored(b.ignoreId)||k.add({severity:b.severity||"info",summary:b.title||"站点通知",detail:{type:"custom",...b},life:b.sticky?void 0:5e3})}),L.connect())},S=async()=>{try{let b=await It.getClientConnectInfo();se(b),e.clientId=b.clientId,P()}catch(b){console.error("Cannot get client ws url list:",b),k.add({severity:"error",summary:"获取客户端连接地址失败",detail:b.message})}},P=async()=>{if(e.clientId&&L!=null&&L.isConnected)try{e.clientStatus="waiting";let b=await L.bindClient(e.clientId);se(b)}catch(b){console.error("Cannot bind client:",b),k.add({severity:"error",summary:"绑定客户端失败",detail:b.message})}},_=()=>{e.clientId&&(h.getClientInfo(e.clientId)?h.updateClientConnectTime(e.clientId):(e.newClientName=new Date().toLocaleString()+" 连接的设备",e.showClientNameDialog=!0))},E=async b=>{h.addClient(e.clientId,b)},R=()=>{e.showConnectionDialog=!0,e.clientId||S()},Q=()=>{e.showLiveCompDialog=!0,e.clientId||S()},z=()=>{S()},re=b=>{e.clientId=b,P(),e.showConnectionDialog=!1},Ce=async()=>{try{if(Ot(l,u.value)){let b=await L.updateStrengthConfig(u.value);se(b),l=u.value}if(Ot(r,s.value)){let b=await L.updateConfig(St.MainGame,s.value);se(b),r=s.value}k.add({severity:"success",summary:"保存成功",detail:"游戏配置已保存",life:3e3})}catch(b){console.error("Cannot post config:",b)}};Ze("postCustomPulseConfig",async()=>{try{let b=await L.updateConfig(St.CustomPulse,{customPulseList:e.customPulseList});se(b)}catch(b){console.error("Cannot post custom pulse config:",b)}});const Fn=async()=>{if(!w){k.add({severity:"warn",summary:"未连接到客户端",detail:"启动输出需要先连接到客户端",life:5e3});return}try{let b=await L.startGame();se(b)}catch(b){console.error("Cannot start game:",b)}},Mn=async()=>{if(!w){k.add({severity:"warn",summary:"未连接到客户端",detail:"暂停输出需要先连接到客户端",life:5e3});return}try{let b=await L.stopGame();se(b)}catch(b){console.error("Cannot pause game:",b)}},Rn=()=>{Ce(),e.showConfigSavePrompt=!1},Nn=()=>{r&&(s.value=r),l&&(u.value=l),e.showConfigSavePrompt=!1,o=!0,Qe(()=>{o=!1})},Un=b=>{var D;(D=i.value)==null||D.startBluetoothConnect(b)},jn=()=>{var b;(b=i.value)==null||b.startLocalDebugConnect()};return mo(async()=>{h.clientList.length>0&&(e.showConnectToSavedClientsDialog=!0),await O(),await T()}),X(()=>e.pulseMode,b=>{b==="single"&&e.selectPulseIds.length>1&&(e.selectPulseIds=[e.selectPulseIds[0]])}),X([s,u],()=>{if(o){o=!1;return}e.showConfigSavePrompt=!0},{deep:!0}),(b,D)=>{const Kn=qr,ke=ne,zn=vn,Hn=gt,Gn=N("RouterView"),Wn=Ft,Jn=$r,qn=Si,Yn=$o,Zn=po;return c(),y("div",$l,[C(p(Vt),null,{container:B(({message:M,closeCallback:Qn})=>[C(Kn,{message:M,"close-callback":Qn},null,8,["message","close-callback"])]),_:1}),C(p(wn)),C(ss,{state:p(e),ref_key:"coyoteLocalRef",ref:i},null,8,["state"]),d("div",El,[d("div",Al,[C(So,{"val-low":p(f).valLow,"onUpdate:valLow":D[0]||(D[0]=M=>p(f).valLow=M),"val-high":p(f).valHigh,"onUpdate:valHigh":D[1]||(D[1]=M=>p(f).valHigh=M),"val-limit":p(f).valLimit,running:p(e).gameStarted,readonly:""},null,8,["val-low","val-high","val-limit","running"])]),C(Wn,{class:"controller-panel flex-grow-1 flex-shrink-1 w-full"},{header:B(()=>[d("div",null,[C(zn,{class:"controller-toolbar"},{start:B(()=>[p(e).clientStatus!=="connected"?(c(),$(ke,{key:0,icon:"pi pi-qrcode",class:"mr-4",severity:"secondary",label:"连接设备",onClick:D[2]||(D[2]=M=>R())})):(c(),$(ke,{key:1,icon:"pi pi-info-circle",class:"mr-4",severity:"secondary",label:"连接信息",onClick:D[3]||(D[3]=M=>p(e).showClientInfoDialog=!0)})),p(e).clientStatus==="init"?(c(),y("span",xl,Fl)):p(e).clientStatus==="connected"?(c(),y("span",Ml,Ul)):(c(),y("span",jl,Hl))]),end:B(()=>[C(ke,{icon:"pi pi-file-export",class:"mr-2",severity:"secondary",label:"添加到OBS",onClick:D[4]||(D[4]=M=>Q())}),p(e).gameStarted?(c(),$(ke,{key:1,icon:"pi pi-pause",class:"mr-2",severity:"secondary",label:"暂停输出",onClick:D[6]||(D[6]=M=>Mn())})):(c(),$(ke,{key:0,icon:"pi pi-play",class:"mr-2",severity:"secondary",label:"启动输出",onClick:D[5]||(D[5]=M=>Fn())}))]),_:1}),d("div",Gl,[C(p(fo),{modelValue:p(e).controllerPage,"onUpdate:modelValue":D[7]||(D[7]=M=>p(e).controllerPage=M),options:a,optionLabel:"title",optionValue:"id",dataKey:"id",allowEmpty:!1,"aria-labelledby":"custom"},{option:B(M=>[d("div",Wl,[d("i",{class:H(M.option.icon)},null,2),d("span",null,j(M.option.title),1)])]),_:1},8,["modelValue"])])])]),content:B(()=>[C(Gn,null,{default:B(({Component:M})=>[C(Hn,null,{default:B(()=>[(c(),$(q(M),{state:p(e)},null,8,["state"]))]),_:2},1024)]),_:1})]),_:1})]),C(Jn,{visible:p(e).showConnectionDialog,"onUpdate:visible":D[8]||(D[8]=M=>p(e).showConnectionDialog=M),clientWsUrlList:p(e).clientWsUrlList,"client-id":p(e).clientId,onResetClientId:z,"onUpdate:clientId":re,onStartBluetoothConnect:Un,onStartDebugConnect:jn},null,8,["visible","clientWsUrlList","client-id"]),C(ks,{visible:p(e).showClientInfoDialog,"onUpdate:visible":D[9]||(D[9]=M=>p(e).showClientInfoDialog=M),"client-id":p(e).clientId,"controller-url":p(e).apiBaseHttpUrl,"connector-type":p(e).connectorType},null,8,["visible","client-id","controller-url","connector-type"]),C(qn,{visible:p(e).showLiveCompDialog,"onUpdate:visible":D[10]||(D[10]=M=>p(e).showLiveCompDialog=M),"client-id":p(e).clientId},null,8,["visible","client-id"]),C(Yn,{visible:p(e).showConfigSavePrompt,onSave:Rn,onCancel:Nn},null,8,["visible"]),C(_l,{visible:p(e).showConnectToSavedClientsDialog,"onUpdate:visible":D[11]||(D[11]=M=>p(e).showConnectToSavedClientsDialog=M),onConfirm:re},null,8,["visible"]),C(Zn,{visible:p(e).showClientNameDialog,"onUpdate:visible":D[12]||(D[12]=M=>p(e).showClientNameDialog=M),title:"保存客户端",message:"将此设备保存到本地，以便于下次连接。波形列表将跟随设备保存。","input-label":"客户端备注名","default-value":p(e).newClientName,"allow-empty":!1,onConfirm:E},null,8,["visible","default-value"])])}}});export{ac as default};
