Greasy Fork is available in English.

115不大助手 (full)

Make 115 taerg again!

// ==UserScript==
// @name         115不大助手 (full)
// @namespace    com.cloud115.enhancer
// @version      0.6.24
// @author       生瓜太保
// @description  Make 115 taerg again!
// @license      MIT
// @homepage     https://greasyfork.org/zh-CN/scripts/474231-115不大助手?locale_override=1
// @supportURL   https://greasyfork.org/zh-CN/scripts/474231-115不大助手?locale_override=1
// @match        https://*.115.com/*
// @match        https://115.com/*
// @match        https://v.anxia.com/*
// @connect      *
// @grant        GM_addStyle
// @grant        GM_deleteValue
// @grant        GM_getValue
// @grant        GM_openInTab
// @grant        GM_registerMenuCommand
// @grant        GM_setClipboard
// @grant        GM_setValue
// @grant        GM_xmlhttpRequest
// @grant        unsafeWindow
// @run-at       document-body
// ==/UserScript==

(o=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=o,document.head.appendChild(e)})(`@charset "UTF-8";.pure-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;user-select:none;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-.43em}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#000c;border:none transparent;background-color:#e6e6e6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:focus,.pure-button:hover{background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px #00000026 inset,0 0 6px #0003 inset;border-color:#000}.pure-button-disabled,.pure-button-disabled:active,.pure-button-disabled:focus,.pure-button-disabled:hover,.pure-button[disabled]{border:none;background-image:none;opacity:.4;cursor:not-allowed;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-button-group .pure-button{margin:0;border-radius:0;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0}/*!
Pure v3.0.0
Copyright 2013 Yahoo!
Licensed under the BSD License.
https://github.com/pure-css/pure/blob/master/LICENSE
*/.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=color]:focus,.pure-form input[type=date]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=email]:focus,.pure-form input[type=month]:focus,.pure-form input[type=number]:focus,.pure-form input[type=password]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=text]:focus,.pure-form input[type=time]:focus,.pure-form input[type=url]:focus,.pure-form input[type=week]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129fea}.pure-form input:not([type]):focus{outline:0;border-color:#129fea}.pure-form input[type=checkbox]:focus,.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=color][disabled],.pure-form input[type=date][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=email][disabled],.pure-form input[type=month][disabled],.pure-form input[type=number][disabled],.pure-form input[type=password][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=text][disabled],.pure-form input[type=time][disabled],.pure-form input[type=url][disabled],.pure-form input[type=week][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form select:focus:invalid,.pure-form textarea:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=checkbox]:focus:invalid:focus,.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=color],.pure-form-stacked input[type=date],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=email],.pure-form-stacked input[type=file],.pure-form-stacked input[type=month],.pure-form-stacked input[type=number],.pure-form-stacked input[type=password],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=text],.pure-form-stacked input[type=time],.pure-form-stacked input[type=url],.pure-form-stacked input[type=week],.pure-form-stacked label,.pure-form-stacked select,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned select,.pure-form-aligned textarea,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form .pure-input-rounded,.pure-form input.pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=color],.pure-group input[type=date],.pure-group input[type=datetime-local],.pure-group input[type=datetime],.pure-group input[type=email],.pure-group input[type=month],.pure-group input[type=number],.pure-group input[type=password],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=text],.pure-group input[type=time],.pure-group input[type=url],.pure-group input[type=week]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form-message,.pure-form-message-inline{display:block;font-size:.75em;padding:.2em 0 .8em}}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper__popper{z-index:10000;top:0;left:0;outline:none}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s;pointer-events:none}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.v-popper__inner{position:relative;box-sizing:border-box;overflow-y:auto}.v-popper__inner>div{position:relative;z-index:1;max-width:inherit;max-height:inherit}.v-popper__arrow-container{position:absolute;width:10px;height:10px}.v-popper__popper--arrow-overflow .v-popper__arrow-container,.v-popper__popper--no-positioning .v-popper__arrow-container{display:none}.v-popper__arrow-inner,.v-popper__arrow-outer{border-style:solid;position:absolute;top:0;left:0;width:0;height:0}.v-popper__arrow-inner{visibility:hidden;border-width:7px}.v-popper__arrow-outer{border-width:6px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{left:-2px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{left:-1px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer{border-bottom-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{border-top-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{top:-4px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{top:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{top:-1px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{border-left-width:0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{left:-4px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{left:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-10px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer{border-right-width:0;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner{left:-2px}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;border-radius:6px;border:1px solid #ddd;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow-inner{visibility:visible;border-color:#fff}.v-popper--theme-dropdown .v-popper__arrow-outer{border-color:#ddd}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow-outer{border-color:#000c}.text-center{text-align:center}.text-bold{font-weight:700}.text-cross{text-decoration:line-through}.text-primary{color:#1890ff}.text-success{color:#13ce66}.text-warning{color:#ffba00}.text-danger{color:#ff4949}.text-info{color:#909399}.ce-label{padding:2px 4px;background:#909399;color:#fff;border-radius:4px}.ce-label.ce-label-primary{background:#1890ff}.ce-label.ce-label-warning{background:#ffba00}.ce-label.ce-label-danger{background:#ff4949}.ce-label.ce-label-success{background:#13ce66}.ce-label.ce-label-primary-plain{color:#409eff;background:#ecf5ff}input.ce-checkbox{width:20px;height:20px;cursor:pointer}.ce-hidden{display:none!important}.tabs-component .tabs-component-tabs{border:solid 1px #ddd;border-radius:6px;margin-bottom:5px}@media (min-width: 700px){.tabs-component .tabs-component-tabs{border:0;align-items:stretch;display:flex;justify-content:flex-start;margin-bottom:1px}}.tabs-component .tabs-component-tabs .tabs-component-tab{color:#999;font-size:14px;font-weight:600;margin-right:0;list-style:none;border-bottom:dotted 1px #ddd}.tabs-component .tabs-component-tabs .tabs-component-tab:hover{color:#666}.tabs-component .tabs-component-tabs .tabs-component-tab.is-disabled *{color:#cdcdcd;cursor:not-allowed!important}.tabs-component .tabs-component-tabs .tabs-component-tab.is-active{color:#000}.tabs-component .tabs-component-tabs .tabs-component-tab .tabs-component-tab-a{align-items:center;color:inherit;display:flex;padding:.75em 1em;text-decoration:none}@media (min-width: 700px){.tabs-component .tabs-component-tabs .tabs-component-tab{background-color:#fff;border:solid 1px #ddd;border-radius:3px 3px 0 0;margin-right:.5em;transform:translateY(2px);transition:transform .3s ease}.tabs-component .tabs-component-tabs .tabs-component-tab.is-active{border-bottom:solid 1px #fff;z-index:2;transform:translateY(2px)}}.tabs-component .tabs-component-panels{padding:1em 0}@media (min-width: 700px){.tabs-component .tabs-component-panels{background-color:#fff;border:solid 1px #ddd;border-radius:0 6px 6px;box-shadow:0 0 10px #0000000d;padding:1em 2em}}.tabs-component .tabs-component-btn{cursor:pointer;background:#e1ecf4;border-radius:3px;border:1px solid #7aa7c7;padding:4px 8px;color:#39739d}.tabs-component .tabs-component-btn:hover{background-color:#b3d3ea;color:#2c5777}.tabs-component .tabs-component-btn:active{background-color:#a0c7e4;box-shadow:none;color:#2c5777}.ce-tips{background:#eee;border-radius:4px;padding:4px;font-size:12px;color:#595959;margin-bottom:10px}.ce-hr{border:0;height:1px;background-image:linear-gradient(to right,rgba(0,0,0,0),#ccc,rgba(0,0,0,0))}.ce-config input[type=checkbox]{width:18px;height:18px;cursor:pointer}.ce-config legend{font-size:16px;color:#1890ff}.ce-config-help{font-size:11px;cursor:pointer}.ce-ec-detail{text-align:left;font-size:14px}.ce-ec-detail span{color:#1890ff;display:inline-block;width:90px;text-align:right}.ce-swal-text-left{text-align:left!important}div[class^=fp-].hidden-watermark{display:none!important}.ce-custom-url-help{position:fixed;top:0;left:0;z-index:10000;width:430px;height:100%;background:#fff;font-size:12px}.ce-custom-url-help .ce-custom-url-help-body{height:80%;overflow-y:auto;padding:20px 20px 300px}.ce-custom-url-help h1 a{float:right;color:#1e87f0;font-size:14px}.ce-custom-url-help h1 a:hover{color:#1e87f0;text-decoration:underline}.ce-custom-url-help table{width:100%;margin-bottom:20px}.ce-custom-url-help .ce-variable{cursor:pointer;color:#1e87f0;font-size:14px}.ce-custom-url-help .ce-variable:hover{color:#093d71}.ce-menu:not(.sub-item){background:#fffcea}.ce-menu img.ce-menu-icon{float:left;width:12px;height:12px;margin-right:4px}.ce-menu.list-item-hover-menu i.ce-menu-icon.icon-operate{scale:.75;margin-top:-4px}.ce-menu.list-item-hover-menu.ce-menu-parent{position:relative;float:left;cursor:pointer}.ce-menu.list-item-hover-menu.ce-menu-parent:after{content:"";position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background:rgba(39,119,248,.8);pointer-events:none}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-trigger{padding:0 12px;color:#2777f8}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-trigger:before{content:"\\2228";margin-right:4px;font-size:12px}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;left:0;padding:4px;border-radius:4px;display:none;text-align:center;width:160px}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub{margin:2px 0;background:#eee;color:#2877f8;width:100%;border-radius:4px;padding:6px 12px;line-height:12px;box-sizing:border-box}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub:hover{background-color:#f3e882}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub:after{display:none}.ce-menu.selection-menu.ce-menu-parent{position:relative;float:left;cursor:pointer}.ce-menu.selection-menu.ce-menu-parent:after{content:"";position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background:rgba(39,119,248,.8);pointer-events:none}.ce-menu.selection-menu.ce-menu-parent .ce-menu-trigger{color:#2777f8}.ce-menu.selection-menu.ce-menu-parent .ce-menu-trigger:before{content:"\\2228";margin-right:4px;font-size:12px}.ce-menu.selection-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#fff}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:30px;left:0;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding-left:4px;padding-right:4px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub span{font-weight:400;float:inherit}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub .ce-menu-icon{float:unset}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub:hover{background-color:#f3e882}.ce-menu.dir-context-menu>a img.ce-menu-icon{float:none;width:18px;height:18px;position:absolute;top:50%;left:14px;margin-top:-10px}.ce-menu.dir-context-menu.ce-menu-parent{position:relative;cursor:pointer;padding:6px 0}.ce-menu.dir-context-menu.ce-menu-parent:after{content:">";position:absolute;opacity:.5;right:10px;pointer-events:none}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-trigger{margin-left:43px;color:#2777f8}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened{background:#f3e882}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#1c0ccf}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened:after{opacity:0}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:0;left:100%;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding:4px 8px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub span{font-weight:400;float:inherit}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub:hover{background-color:#f3e882}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-icon{width:18px;height:18px;margin-right:8px}.ce-menu.list-item-context-menu.ce-menu-parent{position:relative;cursor:pointer;padding:6px 0}.ce-menu.list-item-context-menu.ce-menu-parent:after{content:">";position:absolute;opacity:.5;right:10px;pointer-events:none}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-trigger{margin-left:43px;color:#2777f8}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened{background:#f3e882}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#1c0ccf}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened:after{opacity:0}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:0;left:100%;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding:4px 8px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub span{font-weight:400;float:inherit}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub:hover{background-color:#f3e882}.context-menu.menu-upward{max-height:400px!important;overflow:unset!important}.ce-menu-divider{height:1px!important;display:block!important;background-color:#edeeef!important}.ce-menu-divider:after{display:none!important}.list-item-hover-menu .ce-menu-divider{height:6px!important;background-color:transparent!important}div#js_operate_box.only-icon li[menu] span{display:none}.list-contents{padding-bottom:300px}.header-name a.ce-open-dir-context-menu{cursor:pointer;background:#f2f4f8;border-radius:4px;padding:0 6px;color:#1890ff;margin-left:10px}.header-size a.ce-size-sort{cursor:pointer;background:#f2f4f8;border-radius:4px;padding:0 6px;color:#8c97a0;margin-left:10px}.header-size a.ce-size-sort i{display:none}.header-size a.ce-size-sort.by-desc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-desc i.icon-sort-desc{display:inline-block}.header-size a.ce-size-sort.by-asc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-asc i.icon-sort-asc{display:inline-block}.header-size a.ce-size-sort.ce-size-sort-ing{cursor:no-drop}.ce-offline-config{max-height:70vh;overflow-y:auto}.ce-offline-config .ce-tips{margin-top:20px;margin-left:56px}.ce-offline-config .pure-form-message{margin-left:56px}.ce-offline-exporter{position:absolute;left:140px;top:62px;background:#f4f2ff;padding:6px 10px;border-radius:4px}.ce-offline-exporter button{margin-right:6px}.offline-exporter-config-form{width:550px;padding:10px}.swal2-input#swalDeleteFile{width:20px;padding:0;height:20px;margin:0;vertical-align:sub;cursor:pointer}body.ce-list-s #js-main{padding-top:40px}body.ce-list-s .ce-offline-exporter{top:92px}.ce-offline-searcher{position:absolute;left:140px;top:58px;background:#f4f2ff;padding:4px 10px;border-radius:4px}.ce-offline-searcher.loading form{opacity:.5;pointer-events:none;cursor:wait}.ce-offline-searcher fieldset{padding:0}.ce-offline-searcher .clearable-wrap{position:relative;width:320px}.ce-offline-searcher .clearable-wrap.is-empty .btn-clear{display:none}.ce-offline-searcher .clearable-wrap input{width:300px;padding-right:35px!important}.ce-offline-searcher .clearable-wrap .btn-clear{position:absolute;right:30px;top:4px;display:block}.ce-offline-searcher .form-item{display:inline-block;margin-right:10px;vertical-align:middle}.ce-offline-searcher .form-item input{padding:.3em}.ce-offline-searcher .form-item select{height:2em;padding:.1em .3em}.ce-offline-searcher .form-item label{margin-right:5px}.ce-offline-searcher .help-trigger{font-size:12px}.ce-offline-searcher .list{display:none}.ce-offline-searcher .stop-on-found{width:16px;height:16px;vertical-align:middle;cursor:pointer}.ce-offline-searcher .search-tips{position:fixed;top:146px;bottom:30px;left:0;width:100%;background:#fff;z-index:9999}.ce-offline-searcher .search-tips .tips-body{padding:20px;position:absolute;top:70px;left:50%;transform:translate(-50%,-50%);background:#f4f2ff;width:80%;border-radius:6px}.cloud115-page-offline.ce-list-m .list-contents .file-name-wrap .desc-tips{left:75px}.cloud115-page-offline.ce-list-m li.ce-task-trouble .info-hash{left:210px!important}.cloud115-page-offline li .ce-buttons{float:left;margin-right:6px}.cloud115-page-offline .ce-checkbox{width:30px}.cloud115-page-offline .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp .info-hash{position:absolute;left:47px;top:25px;color:#ababab;cursor:pointer}.cloud115-page-offline #js-warp .info-hash.hover{color:#6ab2ff}.cloud115-page-offline #js-warp li.ce-selected:before{background:#ffe296!important}.cloud115-page-offline #js-warp li.ce-show-checkbox .info-hash{left:60px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-name{margin-left:15px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-type{left:25px!important}.cloud115-page-offline #js-warp li .ce-checkbox{width:30px;position:absolute;left:0}.cloud115-page-offline #js-warp li .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp li .desc-tips{position:absolute;left:60px;top:25px}.cloud115-eh-cleaner-trigger .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f}.v-popper.v-popper--theme-dropdown{display:inline-block}.group-manager{width:750px}.group-manager a{font-size:12px;padding:0 4px;margin-right:8px}.group-manager .group-label{color:#fff;font-size:12px;margin-right:10px;border-radius:4px;padding:2px 8px;background:#66acf9}.group-manager .label-readonly{background:#c93c3c;color:#fff;padding:0 4px;border-radius:4px;vertical-align:middle;margin-right:6px}.append-form{background:#fff;width:350px;padding:10px;border-radius:4px}.append-form input,.append-form textarea{width:100%}.group-form{background:#fff;width:540px;padding:10px;border-radius:4px}.group-form input,.group-form textarea{width:100%}.group-form .filter-label{cursor:pointer;padding:0 4px;text-decoration:underline}.group-form input#groupLabel{display:inline-block}.groups-list{background:#fff;width:565px;padding:10px;border-radius:4px;box-shadow:0 0 4px #d8d8d8}.groups-list table th,.groups-list table td{padding:4px 6px}.groups-list ul li{border-bottom:1px solid #eee;padding:4px}.groups-list ul li:nth-last-child(1){border-bottom:none}.groups-list span{display:inline-block}.groups-list .p-index{width:30px}.groups-list .p-label{width:120px}.groups-list .p-actions button{margin-right:8px}.group-confirm-delete{padding:20px}#cloud115Cleaner{margin-left:10px}.cloud115-eh-cleaner .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f;display:none}.cloud115-eh-cleaner .actions-bar{padding-bottom:10px}.cloud115-eh-cleaner .actions-bar .title{font-size:18px;font-weight:700;color:#15110c}.cloud115-eh-cleaner .actions-bar .close{margin-left:20px;margin-right:10px;color:#f40}.cloud115-eh-cleaner .actions-bar i.tp-folder{width:18px;height:18px;vertical-align:sub}.cloud115-eh-cleaner-help{position:fixed;top:60px;right:0;bottom:0;width:470px;z-index:1051;padding:10px 10px 150px 8px;background:#fdffdf;overflow-y:auto}.cloud115-eh-cleaner-help ul{list-style:decimal}.cloud115-eh-cleaner-drawer{position:fixed;top:60px;right:0;bottom:0;left:260px;background:#fff;z-index:1050;padding:10px 20px 200px;overflow-y:auto;box-shadow:-2px 2px 6px #bbb}.cloud115-eh-cleaner-drawer.loading{cursor:wait}.cloud115-eh-cleaner-drawer.loading button,.cloud115-eh-cleaner-drawer.loading input{cursor:no-drop;pointer-events:none}.cloud115-eh-cleaner-drawer .config-toggle{display:inline-block;background:#eee;border-radius:4px;opacity:.2;padding:2px 4px;cursor:pointer}.cloud115-eh-cleaner-drawer .config-toggle.hover{opacity:.7}.cloud115-eh-cleaner-drawer .by-box .by-header{padding-bottom:10px}.cloud115-eh-cleaner-drawer .by-box .by-header .title{font-size:16px;margin-right:8px;color:#0078e6;font-weight:400}.cloud115-eh-cleaner-drawer .by-box .by-header .filter-size{width:100px;font-size:14px;font-weight:700;color:#0078e6;text-indent:6px}.cloud115-eh-cleaner-drawer .by-box .pure-button-group{display:inline-block}.cloud115-eh-cleaner-drawer .by-box .pure-button-group .pure-button{vertical-align:inherit}.cloud115-eh-cleaner-drawer .by-box .pattern-groups{width:750px;text-align:right}.cloud115-eh-cleaner-drawer .by-box .pattern-groups a{font-size:12px;padding:0 4px;margin-right:8px}.cloud115-eh-cleaner-drawer .by-box table tr.active{background:#f7ffc3}.cloud115-eh-cleaner-drawer .by-box table tr.is-dir .pattern{color:#f40}.cloud115-eh-cleaner-drawer .by-box table tr th,.cloud115-eh-cleaner-drawer .by-box table tr td{padding:.5em;font-size:12px}.cloud115-eh-cleaner-drawer .by-box table td a{color:#2877f8}.cloud115-eh-cleaner-drawer .by-box table td .tp-folder{width:16px;height:16px;vertical-align:sub}.ce-empty-cleaner-trigger .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f}.ce-empty-cleaner-help[data-v-414bf5e0]{position:fixed;top:60px;right:0;bottom:0;width:360px;z-index:1051;padding:10px 10px 150px 8px;background:#fdffdf;overflow-y:auto}.ce-empty-cleaner-help ul[data-v-414bf5e0]{list-style:decimal}#cloud115EmptyCleaner{margin-left:10px}.v-popper__arrow-container{display:none}.ce-empty-cleaner .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f;display:none}.ce-empty-cleaner .top-actions .pure-control-group label{width:auto;text-align:left}.ce-empty-cleaner .actions-bar{padding-bottom:10px;width:72%}.ce-empty-cleaner .actions-bar .title{font-size:18px;font-weight:700;color:#15110c}.ce-empty-cleaner .actions-bar .close{margin-left:20px;margin-right:10px;color:#f40}.ce-empty-cleaner .actions-bar i.tp-folder{width:18px;height:18px;vertical-align:sub}.ce-empty-cleaner .actions-bar .ce-path{font-size:14px;margin-top:4px}.ce-empty-cleaner .actions-bar .ce-path a:hover{text-decoration:underline}.ce-empty-cleaner .ec-logs{max-height:250px;overflow-y:auto;max-width:72%;background:#f4f4f4;padding:10px;line-height:22px;font-size:12px;margin-bottom:20px}.ce-empty-cleaner .ec-items{margin-bottom:30px}.ce-empty-cleaner .ec-items table{font-size:12px;width:72%}.ce-empty-cleaner .ec-items table .tr-deleted>td:not(:last-child){text-decoration:line-through}.ce-empty-cleaner-drawer{position:fixed;top:60px;right:0;bottom:0;left:260px;background:#fff;z-index:1050;padding:10px 20px 200px;overflow-y:auto;box-shadow:-2px 2px 6px #bbb}.ce-empty-cleaner-drawer.loading{cursor:wait}.ce-empty-cleaner-drawer.loading button,.ce-empty-cleaner-drawer.loading input{cursor:no-drop;pointer-events:none}.button-xsmall,.button-mini{font-size:12px;padding:.2em .5em}.button-small{font-size:85%}.button-large{font-size:110%}.button-xlarge{font-size:125%}.button-success,.button-error,.button-warning,.button-secondary{color:#fff;border-radius:2px;text-shadow:0 1px 1px rgba(0,0,0,.2)}.button-success{background:rgb(28,184,65)}.button-error{background:rgb(202,60,60)}.button-warning{background:rgb(223,117,20)}.button-secondary{background:rgb(66,184,221)}.pure-form select{height:2.5em;font-size:12px}.pure-form input[type=number]{min-width:100px}.ce-basic-config .pure-form-message{margin-left:82px}.ce-basic-config .avatar-preview{display:inline-block;vertical-align:middle;margin-left:10px}.ce-basic-config .pure-control-group input.input-small{padding:2px 4px;width:auto}.ce-clouddrive-config-item{margin-bottom:20px;border:1px solid #cbcbcb;border-radius:0;padding:4px}.ce-clouddrive-config-item.active{background:#fefcea}.ce-clouddrive-config-item input:not([type]){font-size:12px}.ce-clouddrive-config-item .button-error{float:right}.ce-clouddrive-config .cd-tips a{text-decoration:underline}.ce-clouddrive-config .cd-code{font-size:110%;cursor:pointer;user-select:none}.ce-list-config .pure-control-group label{width:16em}.ce-list-config .pure-form-message{margin-left:3em}.ce-search-config .pure-control-group label{width:15em}.ce-search-config .pure-form-message{margin-left:3em}.ce-tools-config .pure-control-group label{width:15em}.ce-tools-config .pure-form-message{margin-left:3em}.menu-basic-config .pure-control-group label,.official-menu-config .pure-form label{width:170px!important}.official-menu-config .pure-form label small{color:#999}.official-menu-config .pure-form legend .ce-label{cursor:pointer;font-size:12px;float:right}.official-menu-config .pure-form .ce-toggle{font-size:12px;cursor:pointer;color:#909399}.official-menu-config .pure-form .hidden .ce-toggle{color:#1890ff}.ce-menu-config .menu-config-block{display:inline-block;border-radius:6px;margin:4px;vertical-align:top;padding:0 6px;background:#f9f9f9}.ce-menu-config .menu-config-block>form>legend{border:none;text-align:center;font-size:14px;color:#5092ff;padding:4px;margin-bottom:0}.ce-menu-config .menu-config-block>form>fieldset>div{background:#fff;margin-bottom:1px;padding:4px}.ce-menu-config .menu-config-block>form>fieldset>div:hover{background:#fefcea}.ce-menu-config .menu-config-block label{display:inline-block;width:120px;font-size:12px;line-height:20px;vertical-align:middle;cursor:pointer}.ce-menu-config input[type=checkbox]{margin-right:10px;width:18px;height:18px;cursor:pointer;vertical-align:middle}.ce-menu-config .btn-view-info{display:inline-block;margin-right:6px;vertical-align:middle;cursor:help}.ce-custom-url{border-radius:4px;box-shadow:0 0 5px #eee;border:1px solid #eee;margin-bottom:20px;padding:0 10px;background:#fff}.ce-custom-url label{cursor:pointer}.ce-custom-url input:not([type]){font-size:12px}.ce-custom-url textarea{font-size:12px;resize:vertical}.ce-custom-url input[type=checkbox]{width:18px;height:18px;cursor:pointer}.ce-custom-url .ce-custom-url-index{font-size:14px;font-weight:700;margin-right:20px}.ce-custom-url legend .button-error{float:right}.ce-custom-url fieldset>div{margin-bottom:1px;padding:4px}.ce-custom-url fieldset>div:hover{background:#fefcea}.ce-custom-urls{padding-bottom:100px}.ce-custom-urls .item-memo{display:inline-block;width:320px}.ce-play-urls{padding-bottom:100px}.ce-play-urls .item-memo{display:inline-block;width:340px}.ce-play-urls .extra-memo{font-size:12px;margin-left:10px}.ce-play-urls .extra-memo a{text-decoration:underline;color:#337ab7}.ce-anxia-config .pure-control-group label{width:9em}.ce-anxia-config .pure-form-message{margin-left:3em}.ce-drawer{visibility:hidden}.ce-drawer.is-visible{visibility:visible}.ce-drawer.is-open .ce-drawer__overlay{opacity:.5}.ce-drawer.is-open .ce-drawer__content{transform:translate(0)}.ce-drawer__overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;z-index:200;opacity:0;transition-property:opacity;background-color:#000;user-select:none}.ce-drawer__content{position:fixed;top:0;right:0;bottom:0;height:100%;width:100%;z-index:9999;overflow:auto;transition-property:transform;display:flex;flex-direction:column;transform:translate(100%);box-shadow:0 2px 6px #777}.ce-config-main .ce-intro{margin-left:35%;color:#7676ff}.ce-config-main .ce-intro small{color:#999}.ce-config-main .ce-config-main-body{padding:10px}.ce-config-main .ce-config-main-header{padding:10px;position:sticky;top:0;background:#fff;z-index:100000;box-shadow:0 1px 2px #e9e9e9}.ce-config-main .ce-config-main-header h1{display:inline;font-size:18px}.ce-config-main .ce-config-main-header .ce-config-main-close{float:right;vertical-align:top;color:#89929b;cursor:pointer;padding:2px 20px;border-radius:6px}.ce-config-main .ce-config-main-header .ce-config-main-close:hover{background:#fefcea;color:#0275ff}.ce-config-main .ce-offline-config{max-height:unset}.ce-login-page a.ce-entry{display:inline-block;background:#fefcea;padding:2px 6px;border-radius:4px;border:1px solid #234888;margin:0 4px}.list-contents ul li .ce-btn-folder-size{background:#f2f4f8;border-radius:6px;padding:4px;cursor:pointer}.list-contents ul li .ce-file-sha1{position:absolute;top:20px;color:#999;cursor:pointer;font-size:90%}.list-contents ul li.ce-show-sha1 .file-name{height:40px}.list-contents ul li.ce-size-got .ce-btn-folder-size{opacity:.6;margin-left:6px}.list-contents ul li.ce-size-got .ce-btn-folder-size:hover{opacity:1}#js_top_header_file_path_box .ce-path-btn{background-color:#f4f6fc;height:32px}#js_top_header_file_path_box .ce-path-btn#ceGotoPath{margin-right:6px}#js_top_header_file_path_box.ce-goto-path-active{height:60px}#js_top_header_file_path_box.ce-goto-path-active div#js_path_add_dir{height:32px}#js_top_header_file_path_box #ceGotoPathApp{position:absolute;top:40px}.ce-goto-main{position:relative;margin-right:5px}.ce-goto-main.ce-goto-sug-shown .ce-goto-input-wrap{border-radius:6px 6px 0 0}.ce-goto-main.ce-goto-sug-shown .ce-goto-sug{display:block}.ce-goto-main .ce-goto-input-wrap{position:relative;overflow:hidden;border:1px solid #cfcccc;border-radius:6px}.ce-goto-main .ce-goto-input-wrap .ce-goto-input{border-radius:6px 6px 0 0;border:none;padding:4px 10px;width:100%;box-sizing:border-box;color:#2877f8;border-bottom:none}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn{position:absolute;border:none}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn:hover{color:#ff723e}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd]{top:5px;font-size:12px;background:#aeaeae;color:#fff;padding:0 4px;border-radius:4px;cursor:pointer}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd]:hover{background:#ff723e}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd][disabled]{background:#d7d7d7;cursor:not-allowed}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd=clear]{right:10px}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd=toggle]{right:50px}.ce-goto-main .ce-goto-sug{display:none;position:absolute;background:#ffffff;width:100%;padding:10px 10px 10px 8px;max-height:250px;z-index:999999;overflow-y:auto;box-shadow:0 5px 8px #ededed;border-radius:0 0 6px 6px;border:1px solid #cfcccc;box-sizing:border-box;border-top:none}.ce-goto-main .ce-goto-sug .ce-goto-sug-item{padding:4px 10px;background:#f4f6fc;margin-bottom:4px;cursor:pointer;border-radius:4px;font-size:12px;color:#353535}.ce-goto-main .ce-goto-sug .ce-goto-sug-item:hover{background:#d7d7d7}.ce-goto-main .ce-goto-sug .ce-goto-sug-item.active{background:#f4e1cf;color:#2877f8}.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sug-prefix,.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sep{color:#a4a4a4}.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sug-index{display:inline-block;background:#6ab2ff;font-size:10px;min-width:20px;color:#fff;border-radius:4px;text-align:center;padding:0 2px;margin-right:4px}.ce-search-page .top-file-path .file-path{float:left}.ce-search-page .dir-tab.ce-btn-select{background:#fffcea;color:#2877f8;display:inline-block;height:32px;line-height:24px;font-size:12px;padding:4px 8px;box-sizing:border-box;border:1px solid #2877f8;border-radius:4px}.ce-search-page .dir-tab.ce-btn-select:hover{background:#ffff00}
`);

var yM=Object.defineProperty;var wM=(Os,Bn,Ds)=>Bn in Os?yM(Os,Bn,{enumerable:!0,configurable:!0,writable:!0,value:Ds}):Os[Bn]=Ds;var be=(Os,Bn,Ds)=>(wM(Os,typeof Bn!="symbol"?Bn+"":Bn,Ds),Ds);(function(){"use strict";const Os="",Bn="",Ds="",bM="",_M="",vM="",xM="",mm=typeof btoa=="function",Jr=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const pc=typeof TextEncoder=="function"?new TextEncoder:void 0,gm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wi=Array.prototype.slice.call(gm);(e=>{let t={};return e.forEach((n,s)=>t[n]=s),t})(wi);const pn=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const ym=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),hc=mm?e=>btoa(e):Jr?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,s,i,o="";const r=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|s<<8|i,o+=wi[t>>18&63]+wi[t>>12&63]+wi[t>>6&63]+wi[t&63]}return r?o.slice(0,r-3)+"===".substring(r):o},wm=Jr?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let s=0,i=e.length;s<i;s+=4096)n.push(pn.apply(null,e.subarray(s,s+4096)));return hc(n.join(""))},bm=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?pn(192|t>>>6)+pn(128|t&63):pn(224|t>>>12&15)+pn(128|t>>>6&63)+pn(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return pn(240|t>>>18&7)+pn(128|t>>>12&63)+pn(128|t>>>6&63)+pn(128|t&63)}},_m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,vm=e=>e.replace(_m,bm),mc=Jr?e=>Buffer.from(e,"utf8").toString("base64"):pc?e=>wm(pc.encode(e)):e=>hc(vm(e)),gc=(e,t=!1)=>t?ym(mc(e)):mc(e);var cs=window,Qr=(()=>cs.GM_setValue)(),xm=(()=>cs.GM_deleteValue)(),Cm=(()=>cs.GM_openInTab)(),uo=(()=>cs.GM_registerMenuCommand)(),Xr=(()=>cs.GM_xmlhttpRequest)(),bi=(()=>cs.GM_setClipboard)(),fo=(()=>cs.GM_getValue)(),Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $m(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var yc={exports:{}};/*!
* sweetalert2 v11.7.2
* Released under the MIT License.
*/(function(e,t){(function(n,s){e.exports=s()})(Fn,function(){var n={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const s="swal2-",i=d=>{const p={};for(const g in d)p[d[g]]=s+d[g];return p},o=i(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),r=i(["success","warning","info","question","error"]),a="SweetAlert2:",l=d=>{const p=[];for(let g=0;g<d.length;g++)p.indexOf(d[g])===-1&&p.push(d[g]);return p},u=d=>d.charAt(0).toUpperCase()+d.slice(1),f=d=>{console.warn(`${a} ${typeof d=="object"?d.join(" "):d}`)},h=d=>{console.error(`${a} ${d}`)},y=[],_=d=>{y.includes(d)||(y.push(d),f(d))},b=(d,p)=>{_(`"${d}" is deprecated and will be removed in the next major release. Please use "${p}" instead.`)},E=d=>typeof d=="function"?d():d,T=d=>d&&typeof d.toPromise=="function",M=d=>T(d)?d.toPromise():Promise.resolve(d),I=d=>d&&Promise.resolve(d)===d,P=()=>document.body.querySelector(`.${o.container}`),V=d=>{const p=P();return p?p.querySelector(d):null},oe=d=>V(`.${d}`),j=()=>oe(o.popup),X=()=>oe(o.icon),le=()=>oe(o["icon-content"]),ge=()=>oe(o.title),Le=()=>oe(o["html-container"]),_e=()=>oe(o.image),L=()=>oe(o["progress-steps"]),ie=()=>oe(o["validation-message"]),G=()=>V(`.${o.actions} .${o.confirm}`),Se=()=>V(`.${o.actions} .${o.cancel}`),D=()=>V(`.${o.actions} .${o.deny}`),Z=()=>oe(o["input-label"]),B=()=>V(`.${o.loader}`),ye=()=>oe(o.actions),Ee=()=>oe(o.footer),Oe=()=>oe(o["timer-progress-bar"]),ce=()=>oe(o.close),pe=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,
  [tabindex="0"],
  [contenteditable],
  audio[controls],
  video[controls],
  summary
`,je=()=>{const d=Array.from(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((g,v)=>{const U=parseInt(g.getAttribute("tabindex")),Pe=parseInt(v.getAttribute("tabindex"));return U>Pe?1:U<Pe?-1:0}),p=Array.from(j().querySelectorAll(pe)).filter(g=>g.getAttribute("tabindex")!=="-1");return l(d.concat(p)).filter(g=>J(g))},tt=()=>yt(document.body,o.shown)&&!yt(document.body,o["toast-shown"])&&!yt(document.body,o["no-backdrop"]),ke=()=>j()&&yt(j(),o.toast),ft=()=>j().hasAttribute("data-loading"),it={previousBodyPadding:null},ot=(d,p)=>{if(d.textContent="",p){const v=new DOMParser().parseFromString(p,"text/html");Array.from(v.querySelector("head").childNodes).forEach(U=>{d.appendChild(U)}),Array.from(v.querySelector("body").childNodes).forEach(U=>{U instanceof HTMLVideoElement||U instanceof HTMLAudioElement?d.appendChild(U.cloneNode(!0)):d.appendChild(U)})}},yt=(d,p)=>{if(!p)return!1;const g=p.split(/\s+/);for(let v=0;v<g.length;v++)if(!d.classList.contains(g[v]))return!1;return!0},ls=(d,p)=>{Array.from(d.classList).forEach(g=>{!Object.values(o).includes(g)&&!Object.values(r).includes(g)&&!Object.values(p.showClass).includes(g)&&d.classList.remove(g)})},C=(d,p,g)=>{if(ls(d,p),p.customClass&&p.customClass[g]){if(typeof p.customClass[g]!="string"&&!p.customClass[g].forEach){f(`Invalid type of customClass.${g}! Expected string or iterable object, got "${typeof p.customClass[g]}"`);return}R(d,p.customClass[g])}},A=(d,p)=>{if(!p)return null;switch(p){case"select":case"textarea":case"file":return d.querySelector(`.${o.popup} > .${o[p]}`);case"checkbox":return d.querySelector(`.${o.popup} > .${o.checkbox} input`);case"radio":return d.querySelector(`.${o.popup} > .${o.radio} input:checked`)||d.querySelector(`.${o.popup} > .${o.radio} input:first-child`);case"range":return d.querySelector(`.${o.popup} > .${o.range} input`);default:return d.querySelector(`.${o.popup} > .${o.input}`)}},F=d=>{if(d.focus(),d.type!=="file"){const p=d.value;d.value="",d.value=p}},ee=(d,p,g)=>{!d||!p||(typeof p=="string"&&(p=p.split(/\s+/).filter(Boolean)),p.forEach(v=>{Array.isArray(d)?d.forEach(U=>{g?U.classList.add(v):U.classList.remove(v)}):g?d.classList.add(v):d.classList.remove(v)}))},R=(d,p)=>{ee(d,p,!0)},re=(d,p)=>{ee(d,p,!1)},he=(d,p)=>{const g=Array.from(d.children);for(let v=0;v<g.length;v++){const U=g[v];if(U instanceof HTMLElement&&yt(U,p))return U}},ae=(d,p,g)=>{g===`${parseInt(g)}`&&(g=parseInt(g)),g||parseInt(g)===0?d.style[p]=typeof g=="number"?`${g}px`:g:d.style.removeProperty(p)},te=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";d.style.display=p},Y=d=>{d.style.display="none"},$e=(d,p,g,v)=>{const U=d.querySelector(p);U&&(U.style[g]=v)},we=function(d,p){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";p?te(d,g):Y(d)},J=d=>!!(d&&(d.offsetWidth||d.offsetHeight||d.getClientRects().length)),Ae=()=>!J(G())&&!J(D())&&!J(Se()),m=d=>d.scrollHeight>d.clientHeight,w=d=>{const p=window.getComputedStyle(d),g=parseFloat(p.getPropertyValue("animation-duration")||"0"),v=parseFloat(p.getPropertyValue("transition-duration")||"0");return g>0||v>0},x=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const g=Oe();J(g)&&(p&&(g.style.transition="none",g.style.width="100%"),setTimeout(()=>{g.style.transition=`width ${d/1e3}s linear`,g.style.width="0%"},10))},k=()=>{const d=Oe(),p=parseInt(window.getComputedStyle(d).width);d.style.removeProperty("transition"),d.style.width="100%";const g=parseInt(window.getComputedStyle(d).width),v=p/g*100;d.style.width=`${v}%`},O=100,S={},W=()=>{S.previousActiveElement instanceof HTMLElement?(S.previousActiveElement.focus(),S.previousActiveElement=null):document.body&&document.body.focus()},q=d=>new Promise(p=>{if(!d)return p();const g=window.scrollX,v=window.scrollY;S.restoreFocusTimeout=setTimeout(()=>{W(),p()},O),window.scrollTo(g,v)}),ne=()=>typeof window>"u"||typeof document>"u",xe=`
 <div aria-labelledby="${o.title}" aria-describedby="${o["html-container"]}" class="${o.popup}" tabindex="-1">
   <button type="button" class="${o.close}"></button>
   <ul class="${o["progress-steps"]}"></ul>
   <div class="${o.icon}"></div>
   <img class="${o.image}" />
   <h2 class="${o.title}" id="${o.title}"></h2>
   <div class="${o["html-container"]}" id="${o["html-container"]}"></div>
   <input class="${o.input}" />
   <input type="file" class="${o.file}" />
   <div class="${o.range}">
     <input type="range" />
     <output></output>
   </div>
   <select class="${o.select}"></select>
   <div class="${o.radio}"></div>
   <label for="${o.checkbox}" class="${o.checkbox}">
     <input type="checkbox" />
     <span class="${o.label}"></span>
   </label>
   <textarea class="${o.textarea}"></textarea>
   <div class="${o["validation-message"]}" id="${o["validation-message"]}"></div>
   <div class="${o.actions}">
     <div class="${o.loader}"></div>
     <button type="button" class="${o.confirm}"></button>
     <button type="button" class="${o.deny}"></button>
     <button type="button" class="${o.cancel}"></button>
   </div>
   <div class="${o.footer}"></div>
   <div class="${o["timer-progress-bar-container"]}">
     <div class="${o["timer-progress-bar"]}"></div>
   </div>
 </div>
`.replace(/(^|\n)\s*/g,""),De=()=>{const d=P();return d?(d.remove(),re([document.documentElement,document.body],[o["no-backdrop"],o["toast-shown"],o["has-column"]]),!0):!1},Ie=()=>{S.currentInstance.resetValidationMessage()},Ge=()=>{const d=j(),p=he(d,o.input),g=he(d,o.file),v=d.querySelector(`.${o.range} input`),U=d.querySelector(`.${o.range} output`),Pe=he(d,o.select),Xe=d.querySelector(`.${o.checkbox} input`),Gt=he(d,o.textarea);p.oninput=Ie,g.onchange=Ie,Pe.onchange=Ie,Xe.onchange=Ie,Gt.oninput=Ie,v.oninput=()=>{Ie(),U.value=v.value},v.onchange=()=>{Ie(),U.value=v.value}},Dt=d=>typeof d=="string"?document.querySelector(d):d,Ct=d=>{const p=j();p.setAttribute("role",d.toast?"alert":"dialog"),p.setAttribute("aria-live",d.toast?"polite":"assertive"),d.toast||p.setAttribute("aria-modal","true")},io=d=>{window.getComputedStyle(d).direction==="rtl"&&R(P(),o.rtl)},oo=d=>{const p=De();if(ne()){h("SweetAlert2 requires document to initialize");return}const g=document.createElement("div");g.className=o.container,p&&R(g,o["no-transition"]),ot(g,xe);const v=Dt(d.target);v.appendChild(g),Ct(d),io(v),Ge()},nc=(d,p)=>{d instanceof HTMLElement?p.appendChild(d):typeof d=="object"?GL(d,p):d&&ot(p,d)},GL=(d,p)=>{d.jquery?YL(p,d):ot(p,d.toString())},YL=(d,p)=>{if(d.textContent="",0 in p)for(let g=0;g in p;g++)d.appendChild(p[g].cloneNode(!0));else d.appendChild(p.cloneNode(!0))},ro=(()=>{if(ne())return!1;const d=document.createElement("div"),p={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const g in p)if(Object.prototype.hasOwnProperty.call(p,g)&&typeof d.style[g]<"u")return p[g];return!1})(),JL=()=>{const d=document.createElement("div");d.className=o["scrollbar-measure"],document.body.appendChild(d);const p=d.getBoundingClientRect().width-d.clientWidth;return document.body.removeChild(d),p},QL=(d,p)=>{const g=ye(),v=B();!p.showConfirmButton&&!p.showDenyButton&&!p.showCancelButton?Y(g):te(g),C(g,p,"actions"),XL(g,v,p),ot(v,p.loaderHtml),C(v,p,"loader")};function XL(d,p,g){const v=G(),U=D(),Pe=Se();sc(v,"confirm",g),sc(U,"deny",g),sc(Pe,"cancel",g),ZL(v,U,Pe,g),g.reverseButtons&&(g.toast?(d.insertBefore(Pe,v),d.insertBefore(U,v)):(d.insertBefore(Pe,p),d.insertBefore(U,p),d.insertBefore(v,p)))}function ZL(d,p,g,v){if(!v.buttonsStyling){re([d,p,g],o.styled);return}R([d,p,g],o.styled),v.confirmButtonColor&&(d.style.backgroundColor=v.confirmButtonColor,R(d,o["default-outline"])),v.denyButtonColor&&(p.style.backgroundColor=v.denyButtonColor,R(p,o["default-outline"])),v.cancelButtonColor&&(g.style.backgroundColor=v.cancelButtonColor,R(g,o["default-outline"]))}function sc(d,p,g){we(d,g[`show${u(p)}Button`],"inline-block"),ot(d,g[`${p}ButtonText`]),d.setAttribute("aria-label",g[`${p}ButtonAriaLabel`]),d.className=o[p],C(d,g,`${p}Button`),R(d,g[`${p}ButtonClass`])}const eO=(d,p)=>{const g=ce();ot(g,p.closeButtonHtml),C(g,p,"closeButton"),we(g,p.showCloseButton),g.setAttribute("aria-label",p.closeButtonAriaLabel)},tO=(d,p)=>{const g=P();!g||(nO(g,p.backdrop),sO(g,p.position),iO(g,p.grow),C(g,p,"container"))};function nO(d,p){typeof p=="string"?d.style.background=p:p||R([document.documentElement,document.body],o["no-backdrop"])}function sO(d,p){p in o?R(d,o[p]):(f('The "position" parameter is not valid, defaulting to "center"'),R(d,o.center))}function iO(d,p){if(p&&typeof p=="string"){const g=`grow-${p}`;g in o&&R(d,o[g])}}const oO=["input","file","range","select","radio","checkbox","textarea"],rO=(d,p)=>{const g=j(),v=n.innerParams.get(d),U=!v||p.input!==v.input;oO.forEach(Pe=>{const Xe=he(g,o[Pe]);cO(Pe,p.inputAttributes),Xe.className=o[Pe],U&&Y(Xe)}),p.input&&(U&&aO(p),uO(p))},aO=d=>{if(!qt[d.input]){h(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${d.input}"`);return}const p=Fh(d.input),g=qt[d.input](p,d);te(p),d.inputAutoFocus&&setTimeout(()=>{F(g)})},lO=d=>{for(let p=0;p<d.attributes.length;p++){const g=d.attributes[p].name;["type","value","style"].includes(g)||d.removeAttribute(g)}},cO=(d,p)=>{const g=A(j(),d);if(!!g){lO(g);for(const v in p)g.setAttribute(v,p[v])}},uO=d=>{const p=Fh(d.input);typeof d.customClass=="object"&&R(p,d.customClass.input)},ic=(d,p)=>{(!d.placeholder||p.inputPlaceholder)&&(d.placeholder=p.inputPlaceholder)},ao=(d,p,g)=>{if(g.inputLabel){d.id=o.input;const v=document.createElement("label"),U=o["input-label"];v.setAttribute("for",d.id),v.className=U,typeof g.customClass=="object"&&R(v,g.customClass.inputLabel),v.innerText=g.inputLabel,p.insertAdjacentElement("beforebegin",v)}},Fh=d=>he(j(),o[d]||o.input),Wr=(d,p)=>{["string","number"].includes(typeof p)?d.value=`${p}`:I(p)||f(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof p}"`)},qt={};qt.text=qt.email=qt.password=qt.number=qt.tel=qt.url=(d,p)=>(Wr(d,p.inputValue),ao(d,d,p),ic(d,p),d.type=p.input,d),qt.file=(d,p)=>(ao(d,d,p),ic(d,p),d),qt.range=(d,p)=>{const g=d.querySelector("input"),v=d.querySelector("output");return Wr(g,p.inputValue),g.type=p.input,Wr(v,p.inputValue),ao(g,d,p),d},qt.select=(d,p)=>{if(d.textContent="",p.inputPlaceholder){const g=document.createElement("option");ot(g,p.inputPlaceholder),g.value="",g.disabled=!0,g.selected=!0,d.appendChild(g)}return ao(d,d,p),d},qt.radio=d=>(d.textContent="",d),qt.checkbox=(d,p)=>{const g=A(j(),"checkbox");g.value="1",g.id=o.checkbox,g.checked=Boolean(p.inputValue);const v=d.querySelector("span");return ot(v,p.inputPlaceholder),g},qt.textarea=(d,p)=>{Wr(d,p.inputValue),ic(d,p),ao(d,d,p);const g=v=>parseInt(window.getComputedStyle(v).marginLeft)+parseInt(window.getComputedStyle(v).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const v=parseInt(window.getComputedStyle(j()).width),U=()=>{const Pe=d.offsetWidth+g(d);Pe>v?j().style.width=`${Pe}px`:j().style.width=null};new MutationObserver(U).observe(d,{attributes:!0,attributeFilter:["style"]})}}),d};const dO=(d,p)=>{const g=Le();C(g,p,"htmlContainer"),p.html?(nc(p.html,g),te(g,"block")):p.text?(g.textContent=p.text,te(g,"block")):Y(g),rO(d,p)},fO=(d,p)=>{const g=Ee();we(g,p.footer),p.footer&&nc(p.footer,g),C(g,p,"footer")},pO=(d,p)=>{const g=n.innerParams.get(d),v=X();if(g&&p.icon===g.icon){jh(v,p),Uh(v,p);return}if(!p.icon&&!p.iconHtml){Y(v);return}if(p.icon&&Object.keys(r).indexOf(p.icon)===-1){h(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${p.icon}"`),Y(v);return}te(v),jh(v,p),Uh(v,p),R(v,p.showClass.icon)},Uh=(d,p)=>{for(const g in r)p.icon!==g&&re(d,r[g]);R(d,r[p.icon]),yO(d,p),hO(),C(d,p,"icon")},hO=()=>{const d=j(),p=window.getComputedStyle(d).getPropertyValue("background-color"),g=d.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let v=0;v<g.length;v++)g[v].style.backgroundColor=p},mO=`
  <div class="swal2-success-circular-line-left"></div>
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
  <div class="swal2-success-circular-line-right"></div>
`,gO=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,jh=(d,p)=>{let g=d.innerHTML,v;p.iconHtml?v=Hh(p.iconHtml):p.icon==="success"?(v=mO,g=g.replace(/ style=".*?"/g,"")):p.icon==="error"?v=gO:v=Hh({question:"?",warning:"!",info:"i"}[p.icon]),g.trim()!==v.trim()&&ot(d,v)},yO=(d,p)=>{if(!!p.iconColor){d.style.color=p.iconColor,d.style.borderColor=p.iconColor;for(const g of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])$e(d,g,"backgroundColor",p.iconColor);$e(d,".swal2-success-ring","borderColor",p.iconColor)}},Hh=d=>`<div class="${o["icon-content"]}">${d}</div>`,wO=(d,p)=>{const g=_e();if(!p.imageUrl){Y(g);return}te(g,""),g.setAttribute("src",p.imageUrl),g.setAttribute("alt",p.imageAlt),ae(g,"width",p.imageWidth),ae(g,"height",p.imageHeight),g.className=o.image,C(g,p,"image")},bO=(d,p)=>{const g=P(),v=j();p.toast?(ae(g,"width",p.width),v.style.width="100%",v.insertBefore(B(),X())):ae(v,"width",p.width),ae(v,"padding",p.padding),p.color&&(v.style.color=p.color),p.background&&(v.style.background=p.background),Y(ie()),_O(v,p)},_O=(d,p)=>{d.className=`${o.popup} ${J(d)?p.showClass.popup:""}`,p.toast?(R([document.documentElement,document.body],o["toast-shown"]),R(d,o.toast)):R(d,o.modal),C(d,p,"popup"),typeof p.customClass=="string"&&R(d,p.customClass),p.icon&&R(d,o[`icon-${p.icon}`])},vO=(d,p)=>{const g=L();if(!p.progressSteps||p.progressSteps.length===0){Y(g);return}te(g),g.textContent="",p.currentProgressStep>=p.progressSteps.length&&f("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),p.progressSteps.forEach((v,U)=>{const Pe=xO(v);if(g.appendChild(Pe),U===p.currentProgressStep&&R(Pe,o["active-progress-step"]),U!==p.progressSteps.length-1){const Xe=CO(p);g.appendChild(Xe)}})},xO=d=>{const p=document.createElement("li");return R(p,o["progress-step"]),ot(p,d),p},CO=d=>{const p=document.createElement("li");return R(p,o["progress-step-line"]),d.progressStepsDistance&&ae(p,"width",d.progressStepsDistance),p},$O=(d,p)=>{const g=ge();we(g,p.title||p.titleText,"block"),p.title&&nc(p.title,g),p.titleText&&(g.innerText=p.titleText),C(g,p,"title")},qh=(d,p)=>{bO(d,p),tO(d,p),vO(d,p),pO(d,p),wO(d,p),$O(d,p),eO(d,p),dO(d,p),QL(d,p),fO(d,p),typeof p.didRender=="function"&&p.didRender(j())};function zh(){const d=n.innerParams.get(this);if(!d)return;const p=n.domCache.get(this);Y(p.loader),ke()?d.icon&&te(X()):EO(p),re([p.popup,p.actions],o.loading),p.popup.removeAttribute("aria-busy"),p.popup.removeAttribute("data-loading"),p.confirmButton.disabled=!1,p.denyButton.disabled=!1,p.cancelButton.disabled=!1}const EO=d=>{const p=d.popup.getElementsByClassName(d.loader.getAttribute("data-button-to-replace"));p.length?te(p[0],"inline-block"):Ae()&&Y(d.actions)};function kO(d){const p=n.innerParams.get(d||this),g=n.domCache.get(d||this);return g?A(g.popup,p.input):null}const SO=()=>J(j()),Vh=()=>G()&&G().click(),AO=()=>D()&&D().click(),PO=()=>Se()&&Se().click(),pi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Wh=d=>{d.keydownTarget&&d.keydownHandlerAdded&&(d.keydownTarget.removeEventListener("keydown",d.keydownHandler,{capture:d.keydownListenerCapture}),d.keydownHandlerAdded=!1)},IO=(d,p,g,v)=>{Wh(p),g.toast||(p.keydownHandler=U=>LO(d,U,v),p.keydownTarget=g.keydownListenerCapture?window:j(),p.keydownListenerCapture=g.keydownListenerCapture,p.keydownTarget.addEventListener("keydown",p.keydownHandler,{capture:p.keydownListenerCapture}),p.keydownHandlerAdded=!0)},oc=(d,p)=>{const g=je();if(g.length){d=d+p,d===g.length?d=0:d===-1&&(d=g.length-1),g[d].focus();return}j().focus()},Kh=["ArrowRight","ArrowDown"],TO=["ArrowLeft","ArrowUp"],LO=(d,p,g)=>{const v=n.innerParams.get(d);!v||p.isComposing||p.keyCode===229||(v.stopKeydownPropagation&&p.stopPropagation(),p.key==="Enter"?OO(d,p,v):p.key==="Tab"?DO(p):[...Kh,...TO].includes(p.key)?MO(p.key):p.key==="Escape"&&RO(p,v,g))},OO=(d,p,g)=>{if(!!E(g.allowEnterKey)&&p.target&&d.getInput()&&p.target instanceof HTMLElement&&p.target.outerHTML===d.getInput().outerHTML){if(["textarea","file"].includes(g.input))return;Vh(),p.preventDefault()}},DO=d=>{const p=d.target,g=je();let v=-1;for(let U=0;U<g.length;U++)if(p===g[U]){v=U;break}d.shiftKey?oc(v,-1):oc(v,1),d.stopPropagation(),d.preventDefault()},MO=d=>{const p=G(),g=D(),v=Se(),U=[p,g,v];if(document.activeElement instanceof HTMLElement&&!U.includes(document.activeElement))return;const Pe=Kh.includes(d)?"nextElementSibling":"previousElementSibling";let Xe=document.activeElement;for(let Gt=0;Gt<ye().children.length;Gt++){if(Xe=Xe[Pe],!Xe)return;if(Xe instanceof HTMLButtonElement&&J(Xe))break}Xe instanceof HTMLButtonElement&&Xe.focus()},RO=(d,p,g)=>{E(p.allowEscapeKey)&&(d.preventDefault(),g(pi.esc))};var lo={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const NO=()=>{Array.from(document.body.children).forEach(p=>{p===P()||p.contains(P())||(p.hasAttribute("aria-hidden")&&p.setAttribute("data-previous-aria-hidden",p.getAttribute("aria-hidden")),p.setAttribute("aria-hidden","true"))})},Gh=()=>{Array.from(document.body.children).forEach(p=>{p.hasAttribute("data-previous-aria-hidden")?(p.setAttribute("aria-hidden",p.getAttribute("data-previous-aria-hidden")),p.removeAttribute("data-previous-aria-hidden")):p.removeAttribute("aria-hidden")})},BO=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!yt(document.body,o.iosfix)){const p=document.body.scrollTop;document.body.style.top=`${p*-1}px`,R(document.body,o.iosfix),UO(),FO()}},FO=()=>{const d=navigator.userAgent,p=!!d.match(/iPad/i)||!!d.match(/iPhone/i),g=!!d.match(/WebKit/i);p&&g&&!d.match(/CriOS/i)&&j().scrollHeight>window.innerHeight-44&&(P().style.paddingBottom=`${44}px`)},UO=()=>{const d=P();let p;d.ontouchstart=g=>{p=jO(g)},d.ontouchmove=g=>{p&&(g.preventDefault(),g.stopPropagation())}},jO=d=>{const p=d.target,g=P();return HO(d)||qO(d)?!1:p===g||!m(g)&&p instanceof HTMLElement&&p.tagName!=="INPUT"&&p.tagName!=="TEXTAREA"&&!(m(Le())&&Le().contains(p))},HO=d=>d.touches&&d.touches.length&&d.touches[0].touchType==="stylus",qO=d=>d.touches&&d.touches.length>1,zO=()=>{if(yt(document.body,o.iosfix)){const d=parseInt(document.body.style.top,10);re(document.body,o.iosfix),document.body.style.top="",document.body.scrollTop=d*-1}},VO=()=>{it.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(it.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${it.previousBodyPadding+JL()}px`)},WO=()=>{it.previousBodyPadding!==null&&(document.body.style.paddingRight=`${it.previousBodyPadding}px`,it.previousBodyPadding=null)};function Yh(d,p,g,v){ke()?Jh(d,v):(q(g).then(()=>Jh(d,v)),Wh(S)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(p.setAttribute("style","display:none !important"),p.removeAttribute("class"),p.innerHTML=""):p.remove(),tt()&&(WO(),zO(),Gh()),KO()}function KO(){re([document.documentElement,document.body],[o.shown,o["height-auto"],o["no-backdrop"],o["toast-shown"]])}function Kr(d){d=QO(d);const p=lo.swalPromiseResolve.get(this),g=YO(this);this.isAwaitingPromise()?d.isDismissed||(co(this),p(d)):g&&p(d)}function GO(){return!!n.awaitingPromise.get(this)}const YO=d=>{const p=j();if(!p)return!1;const g=n.innerParams.get(d);if(!g||yt(p,g.hideClass.popup))return!1;re(p,g.showClass.popup),R(p,g.hideClass.popup);const v=P();return re(v,g.showClass.backdrop),R(v,g.hideClass.backdrop),XO(d,p,g),!0};function JO(d){const p=lo.swalPromiseReject.get(this);co(this),p&&p(d)}const co=d=>{d.isAwaitingPromise()&&(n.awaitingPromise.delete(d),n.innerParams.get(d)||d._destroy())},QO=d=>typeof d>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},d),XO=(d,p,g)=>{const v=P(),U=ro&&w(p);typeof g.willClose=="function"&&g.willClose(p),U?ZO(d,p,v,g.returnFocus,g.didClose):Yh(d,v,g.returnFocus,g.didClose)},ZO=(d,p,g,v,U)=>{S.swalCloseEventFinishedCallback=Yh.bind(null,d,g,v,U),p.addEventListener(ro,function(Pe){Pe.target===p&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback)})},Jh=(d,p)=>{setTimeout(()=>{typeof p=="function"&&p.bind(d.params)(),d._destroy()})};function Qh(d,p,g){const v=n.domCache.get(d);p.forEach(U=>{v[U].disabled=g})}function Xh(d,p){if(!!d)if(d.type==="radio"){const v=d.parentNode.parentNode.querySelectorAll("input");for(let U=0;U<v.length;U++)v[U].disabled=p}else d.disabled=p}function eD(){Qh(this,["confirmButton","denyButton","cancelButton"],!1)}function tD(){Qh(this,["confirmButton","denyButton","cancelButton"],!0)}function nD(){Xh(this.getInput(),!1)}function sD(){Xh(this.getInput(),!0)}function iD(d){const p=n.domCache.get(this),g=n.innerParams.get(this);ot(p.validationMessage,d),p.validationMessage.className=o["validation-message"],g.customClass&&g.customClass.validationMessage&&R(p.validationMessage,g.customClass.validationMessage),te(p.validationMessage);const v=this.getInput();v&&(v.setAttribute("aria-invalid",!0),v.setAttribute("aria-describedby",o["validation-message"]),F(v),R(v,o.inputerror))}function oD(){const d=n.domCache.get(this);d.validationMessage&&Y(d.validationMessage);const p=this.getInput();p&&(p.removeAttribute("aria-invalid"),p.removeAttribute("aria-describedby"),re(p,o.inputerror))}const hi={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},rD=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],aD={},lD=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Zh=d=>Object.prototype.hasOwnProperty.call(hi,d),em=d=>rD.indexOf(d)!==-1,rc=d=>aD[d],cD=d=>{Zh(d)||f(`Unknown parameter "${d}"`)},uD=d=>{lD.includes(d)&&f(`The parameter "${d}" is incompatible with toasts`)},dD=d=>{rc(d)&&b(d,rc(d))},fD=d=>{d.backdrop===!1&&d.allowOutsideClick&&f('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const p in d)cD(p),d.toast&&uD(p),dD(p)};function pD(d){const p=j(),g=n.innerParams.get(this);if(!p||yt(p,g.hideClass.popup)){f("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}const v=hD(d),U=Object.assign({},g,v);qh(this,U),n.innerParams.set(this,U),Object.defineProperties(this,{params:{value:Object.assign({},this.params,d),writable:!1,enumerable:!0}})}const hD=d=>{const p={};return Object.keys(d).forEach(g=>{em(g)?p[g]=d[g]:f(`Invalid parameter to update: ${g}`)}),p};function mD(){const d=n.domCache.get(this),p=n.innerParams.get(this);if(!p){tm(this);return}d.popup&&S.swalCloseEventFinishedCallback&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback),typeof p.didDestroy=="function"&&p.didDestroy(),gD(this)}const gD=d=>{tm(d),delete d.params,delete S.keydownHandler,delete S.keydownTarget,delete S.currentInstance},tm=d=>{d.isAwaitingPromise()?(ac(n,d),n.awaitingPromise.set(d,!0)):(ac(lo,d),ac(n,d))},ac=(d,p)=>{for(const g in d)d[g].delete(p)};var nm=Object.freeze({__proto__:null,_destroy:mD,close:Kr,closeModal:Kr,closePopup:Kr,closeToast:Kr,disableButtons:tD,disableInput:sD,disableLoading:zh,enableButtons:eD,enableInput:nD,getInput:kO,handleAwaitingPromise:co,hideLoading:zh,isAwaitingPromise:GO,rejectPromise:JO,resetValidationMessage:oD,showValidationMessage:iD,update:pD});const mi=d=>{let p=j();p||new Yr,p=j();const g=B();ke()?Y(X()):yD(p,d),te(g),p.setAttribute("data-loading","true"),p.setAttribute("aria-busy","true"),p.focus()},yD=(d,p)=>{const g=ye(),v=B();!p&&J(G())&&(p=G()),te(g),p&&(Y(p),v.setAttribute("data-button-to-replace",p.className)),v.parentNode.insertBefore(v,p),R([d,g],o.loading)},wD=(d,p)=>{p.input==="select"||p.input==="radio"?CD(d,p):["text","email","number","tel","textarea"].includes(p.input)&&(T(p.inputValue)||I(p.inputValue))&&(mi(G()),$D(d,p))},bD=(d,p)=>{const g=d.getInput();if(!g)return null;switch(p.input){case"checkbox":return _D(g);case"radio":return vD(g);case"file":return xD(g);default:return p.inputAutoTrim?g.value.trim():g.value}},_D=d=>d.checked?1:0,vD=d=>d.checked?d.value:null,xD=d=>d.files.length?d.getAttribute("multiple")!==null?d.files:d.files[0]:null,CD=(d,p)=>{const g=j(),v=U=>{ED[p.input](g,lc(U),p)};T(p.inputOptions)||I(p.inputOptions)?(mi(G()),M(p.inputOptions).then(U=>{d.hideLoading(),v(U)})):typeof p.inputOptions=="object"?v(p.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof p.inputOptions}`)},$D=(d,p)=>{const g=d.getInput();Y(g),M(p.inputValue).then(v=>{g.value=p.input==="number"?`${parseFloat(v)||0}`:`${v}`,te(g),g.focus(),d.hideLoading()}).catch(v=>{h(`Error in inputValue promise: ${v}`),g.value="",te(g),g.focus(),d.hideLoading()})},ED={select:(d,p,g)=>{const v=he(d,o.select),U=(Pe,Xe,Gt)=>{const Mt=document.createElement("option");Mt.value=Gt,ot(Mt,Xe),Mt.selected=sm(Gt,g.inputValue),Pe.appendChild(Mt)};p.forEach(Pe=>{const Xe=Pe[0],Gt=Pe[1];if(Array.isArray(Gt)){const Mt=document.createElement("optgroup");Mt.label=Xe,Mt.disabled=!1,v.appendChild(Mt),Gt.forEach(yi=>U(Mt,yi[1],yi[0]))}else U(v,Gt,Xe)}),v.focus()},radio:(d,p,g)=>{const v=he(d,o.radio);p.forEach(Pe=>{const Xe=Pe[0],Gt=Pe[1],Mt=document.createElement("input"),yi=document.createElement("label");Mt.type="radio",Mt.name=o.radio,Mt.value=Xe,sm(Xe,g.inputValue)&&(Mt.checked=!0);const fc=document.createElement("span");ot(fc,Gt),fc.className=o.label,yi.appendChild(Mt),yi.appendChild(fc),v.appendChild(yi)});const U=v.querySelectorAll("input");U.length&&U[0].focus()}},lc=d=>{const p=[];return typeof Map<"u"&&d instanceof Map?d.forEach((g,v)=>{let U=g;typeof U=="object"&&(U=lc(U)),p.push([v,U])}):Object.keys(d).forEach(g=>{let v=d[g];typeof v=="object"&&(v=lc(v)),p.push([g,v])}),p},sm=(d,p)=>p&&p.toString()===d.toString(),kD=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.input?im(d,"confirm"):uc(d,!0)},SD=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.returnInputValueOnDeny?im(d,"deny"):cc(d,!1)},AD=(d,p)=>{d.disableButtons(),p(pi.cancel)},im=(d,p)=>{const g=n.innerParams.get(d);if(!g.input){h(`The "input" parameter is needed to be set when using returnInputValueOn${u(p)}`);return}const v=bD(d,g);g.inputValidator?PD(d,v,p):d.getInput().checkValidity()?p==="deny"?cc(d,v):uc(d,v):(d.enableButtons(),d.showValidationMessage(g.validationMessage))},PD=(d,p,g)=>{const v=n.innerParams.get(d);d.disableInput(),Promise.resolve().then(()=>M(v.inputValidator(p,v.validationMessage))).then(Pe=>{d.enableButtons(),d.enableInput(),Pe?d.showValidationMessage(Pe):g==="deny"?cc(d,p):uc(d,p)})},cc=(d,p)=>{const g=n.innerParams.get(d||void 0);g.showLoaderOnDeny&&mi(D()),g.preDeny?(n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>M(g.preDeny(p,g.validationMessage))).then(U=>{U===!1?(d.hideLoading(),co(d)):d.close({isDenied:!0,value:typeof U>"u"?p:U})}).catch(U=>rm(d||void 0,U))):d.close({isDenied:!0,value:p})},om=(d,p)=>{d.close({isConfirmed:!0,value:p})},rm=(d,p)=>{d.rejectPromise(p)},uc=(d,p)=>{const g=n.innerParams.get(d||void 0);g.showLoaderOnConfirm&&mi(),g.preConfirm?(d.resetValidationMessage(),n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>M(g.preConfirm(p,g.validationMessage))).then(U=>{J(ie())||U===!1?(d.hideLoading(),co(d)):om(d,typeof U>"u"?p:U)}).catch(U=>rm(d||void 0,U))):om(d,p)},ID=(d,p,g)=>{n.innerParams.get(d).toast?TD(d,p,g):(OD(p),DD(p),MD(d,p,g))},TD=(d,p,g)=>{p.popup.onclick=()=>{const v=n.innerParams.get(d);v&&(LD(v)||v.timer||v.input)||g(pi.close)}},LD=d=>d.showConfirmButton||d.showDenyButton||d.showCancelButton||d.showCloseButton;let Gr=!1;const OD=d=>{d.popup.onmousedown=()=>{d.container.onmouseup=function(p){d.container.onmouseup=void 0,p.target===d.container&&(Gr=!0)}}},DD=d=>{d.container.onmousedown=()=>{d.popup.onmouseup=function(p){d.popup.onmouseup=void 0,(p.target===d.popup||d.popup.contains(p.target))&&(Gr=!0)}}},MD=(d,p,g)=>{p.container.onclick=v=>{const U=n.innerParams.get(d);if(Gr){Gr=!1;return}v.target===p.container&&E(U.allowOutsideClick)&&g(pi.backdrop)}},RD=d=>typeof d=="object"&&d.jquery,am=d=>d instanceof Element||RD(d),ND=d=>{const p={};return typeof d[0]=="object"&&!am(d[0])?Object.assign(p,d[0]):["title","html","icon"].forEach((g,v)=>{const U=d[v];typeof U=="string"||am(U)?p[g]=U:U!==void 0&&h(`Unexpected type of ${g}! Expected "string" or "Element", got ${typeof U}`)}),p};function BD(){const d=this;for(var p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];return new d(...g)}function FD(d){class p extends this{_main(v,U){return super._main(v,Object.assign({},d,U))}}return p}const UD=()=>S.timeout&&S.timeout.getTimerLeft(),lm=()=>{if(S.timeout)return k(),S.timeout.stop()},cm=()=>{if(S.timeout){const d=S.timeout.start();return x(d),d}},jD=()=>{const d=S.timeout;return d&&(d.running?lm():cm())},HD=d=>{if(S.timeout){const p=S.timeout.increase(d);return x(p,!0),p}},qD=()=>S.timeout&&S.timeout.isRunning();let um=!1;const dc={};function zD(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";dc[d]=this,um||(document.body.addEventListener("click",VD),um=!0)}const VD=d=>{for(let p=d.target;p&&p!==document;p=p.parentNode)for(const g in dc){const v=p.getAttribute(g);if(v){dc[g].fire({template:v});return}}};var WD=Object.freeze({__proto__:null,argsToParams:ND,bindClickHandler:zD,clickCancel:PO,clickConfirm:Vh,clickDeny:AO,enableLoading:mi,fire:BD,getActions:ye,getCancelButton:Se,getCloseButton:ce,getConfirmButton:G,getContainer:P,getDenyButton:D,getFocusableElements:je,getFooter:Ee,getHtmlContainer:Le,getIcon:X,getIconContent:le,getImage:_e,getInputLabel:Z,getLoader:B,getPopup:j,getProgressSteps:L,getTimerLeft:UD,getTimerProgressBar:Oe,getTitle:ge,getValidationMessage:ie,increaseTimer:HD,isDeprecatedParameter:rc,isLoading:ft,isTimerRunning:qD,isUpdatableParameter:em,isValidParameter:Zh,isVisible:SO,mixin:FD,resumeTimer:cm,showLoading:mi,stopTimer:lm,toggleTimer:jD});class KD{constructor(p,g){this.callback=p,this.remaining=g,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(p){const g=this.running;return g&&this.stop(),this.remaining+=p,g&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const dm=["swal-title","swal-html","swal-footer"],GD=d=>{const p=typeof d.template=="string"?document.querySelector(d.template):d.template;if(!p)return{};const g=p.content;return nM(g),Object.assign(YD(g),JD(g),QD(g),XD(g),ZD(g),eM(g),tM(g,dm))},YD=d=>{const p={};return Array.from(d.querySelectorAll("swal-param")).forEach(v=>{Ls(v,["name","value"]);const U=v.getAttribute("name"),Pe=v.getAttribute("value");typeof hi[U]=="boolean"?p[U]=Pe!=="false":typeof hi[U]=="object"?p[U]=JSON.parse(Pe):p[U]=Pe}),p},JD=d=>{const p={};return Array.from(d.querySelectorAll("swal-function-param")).forEach(v=>{const U=v.getAttribute("name"),Pe=v.getAttribute("value");p[U]=new Function(`return ${Pe}`)()}),p},QD=d=>{const p={};return Array.from(d.querySelectorAll("swal-button")).forEach(v=>{Ls(v,["type","color","aria-label"]);const U=v.getAttribute("type");p[`${U}ButtonText`]=v.innerHTML,p[`show${u(U)}Button`]=!0,v.hasAttribute("color")&&(p[`${U}ButtonColor`]=v.getAttribute("color")),v.hasAttribute("aria-label")&&(p[`${U}ButtonAriaLabel`]=v.getAttribute("aria-label"))}),p},XD=d=>{const p={},g=d.querySelector("swal-image");return g&&(Ls(g,["src","width","height","alt"]),g.hasAttribute("src")&&(p.imageUrl=g.getAttribute("src")),g.hasAttribute("width")&&(p.imageWidth=g.getAttribute("width")),g.hasAttribute("height")&&(p.imageHeight=g.getAttribute("height")),g.hasAttribute("alt")&&(p.imageAlt=g.getAttribute("alt"))),p},ZD=d=>{const p={},g=d.querySelector("swal-icon");return g&&(Ls(g,["type","color"]),g.hasAttribute("type")&&(p.icon=g.getAttribute("type")),g.hasAttribute("color")&&(p.iconColor=g.getAttribute("color")),p.iconHtml=g.innerHTML),p},eM=d=>{const p={},g=d.querySelector("swal-input");g&&(Ls(g,["type","label","placeholder","value"]),p.input=g.getAttribute("type")||"text",g.hasAttribute("label")&&(p.inputLabel=g.getAttribute("label")),g.hasAttribute("placeholder")&&(p.inputPlaceholder=g.getAttribute("placeholder")),g.hasAttribute("value")&&(p.inputValue=g.getAttribute("value")));const v=Array.from(d.querySelectorAll("swal-input-option"));return v.length&&(p.inputOptions={},v.forEach(U=>{Ls(U,["value"]);const Pe=U.getAttribute("value"),Xe=U.innerHTML;p.inputOptions[Pe]=Xe})),p},tM=(d,p)=>{const g={};for(const v in p){const U=p[v],Pe=d.querySelector(U);Pe&&(Ls(Pe,[]),g[U.replace(/^swal-/,"")]=Pe.innerHTML.trim())}return g},nM=d=>{const p=dm.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(d.children).forEach(g=>{const v=g.tagName.toLowerCase();p.includes(v)||f(`Unrecognized element <${v}>`)})},Ls=(d,p)=>{Array.from(d.attributes).forEach(g=>{p.indexOf(g.name)===-1&&f([`Unrecognized attribute "${g.name}" on <${d.tagName.toLowerCase()}>.`,`${p.length?`Allowed attributes are: ${p.join(", ")}`:"To set the value, use HTML within the element."}`])})},fm=10,sM=d=>{const p=P(),g=j();typeof d.willOpen=="function"&&d.willOpen(g);const U=window.getComputedStyle(document.body).overflowY;rM(p,g,d),setTimeout(()=>{iM(p,g)},fm),tt()&&(oM(p,d.scrollbarPadding,U),NO()),!ke()&&!S.previousActiveElement&&(S.previousActiveElement=document.activeElement),typeof d.didOpen=="function"&&setTimeout(()=>d.didOpen(g)),re(p,o["no-transition"])},pm=d=>{const p=j();if(d.target!==p)return;const g=P();p.removeEventListener(ro,pm),g.style.overflowY="auto"},iM=(d,p)=>{ro&&w(p)?(d.style.overflowY="hidden",p.addEventListener(ro,pm)):d.style.overflowY="auto"},oM=(d,p,g)=>{BO(),p&&g!=="hidden"&&VO(),setTimeout(()=>{d.scrollTop=0})},rM=(d,p,g)=>{R(d,g.showClass.backdrop),p.style.setProperty("opacity","0","important"),te(p,"grid"),setTimeout(()=>{R(p,g.showClass.popup),p.style.removeProperty("opacity")},fm),R([document.documentElement,document.body],o.shown),g.heightAuto&&g.backdrop&&!g.toast&&R([document.documentElement,document.body],o["height-auto"])};var hm={email:(d,p)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(d)?Promise.resolve():Promise.resolve(p||"Invalid email address"),url:(d,p)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(d)?Promise.resolve():Promise.resolve(p||"Invalid URL")};function aM(d){d.inputValidator||Object.keys(hm).forEach(p=>{d.input===p&&(d.inputValidator=hm[p])})}function lM(d){(!d.target||typeof d.target=="string"&&!document.querySelector(d.target)||typeof d.target!="string"&&!d.target.appendChild)&&(f('Target parameter is not valid, defaulting to "body"'),d.target="body")}function cM(d){aM(d),d.showLoaderOnConfirm&&!d.preConfirm&&f(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),lM(d),typeof d.title=="string"&&(d.title=d.title.split(`
`).join("<br />")),oo(d)}let xn;class gi{constructor(){if(typeof window>"u")return;xn=this;for(var p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];const U=Object.freeze(this.constructor.argsToParams(g));Object.defineProperties(this,{params:{value:U,writable:!1,enumerable:!0,configurable:!0}});const Pe=xn._main(xn.params);n.promise.set(this,Pe)}_main(p){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};fD(Object.assign({},g,p)),S.currentInstance&&(S.currentInstance._destroy(),tt()&&Gh()),S.currentInstance=xn;const v=dM(p,g);cM(v),Object.freeze(v),S.timeout&&(S.timeout.stop(),delete S.timeout),clearTimeout(S.restoreFocusTimeout);const U=fM(xn);return qh(xn,v),n.innerParams.set(xn,v),uM(xn,U,v)}then(p){return n.promise.get(this).then(p)}finally(p){return n.promise.get(this).finally(p)}}const uM=(d,p,g)=>new Promise((v,U)=>{const Pe=Xe=>{d.close({isDismissed:!0,dismiss:Xe})};lo.swalPromiseResolve.set(d,v),lo.swalPromiseReject.set(d,U),p.confirmButton.onclick=()=>{kD(d)},p.denyButton.onclick=()=>{SD(d)},p.cancelButton.onclick=()=>{AD(d,Pe)},p.closeButton.onclick=()=>{Pe(pi.close)},ID(d,p,Pe),IO(d,S,g,Pe),wD(d,g),sM(g),pM(S,g,Pe),hM(p,g),setTimeout(()=>{p.container.scrollTop=0})}),dM=(d,p)=>{const g=GD(d),v=Object.assign({},hi,p,g,d);return v.showClass=Object.assign({},hi.showClass,v.showClass),v.hideClass=Object.assign({},hi.hideClass,v.hideClass),v},fM=d=>{const p={popup:j(),container:P(),actions:ye(),confirmButton:G(),denyButton:D(),cancelButton:Se(),loader:B(),closeButton:ce(),validationMessage:ie(),progressSteps:L()};return n.domCache.set(d,p),p},pM=(d,p,g)=>{const v=Oe();Y(v),p.timer&&(d.timeout=new KD(()=>{g("timer"),delete d.timeout},p.timer),p.timerProgressBar&&(te(v),C(v,p,"timerProgressBar"),setTimeout(()=>{d.timeout&&d.timeout.running&&x(p.timer)})))},hM=(d,p)=>{if(!p.toast){if(!E(p.allowEnterKey)){gM();return}mM(d,p)||oc(-1,1)}},mM=(d,p)=>p.focusDeny&&J(d.denyButton)?(d.denyButton.focus(),!0):p.focusCancel&&J(d.cancelButton)?(d.cancelButton.focus(),!0):p.focusConfirm&&J(d.confirmButton)?(d.confirmButton.focus(),!0):!1,gM=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const d=new Date,p=localStorage.getItem("swal-initiation");p?(d.getTime()-Date.parse(p))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const g=document.createElement("audio");g.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",g.loop=!0,document.body.appendChild(g),setTimeout(()=>{g.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${d}`)}Object.assign(gi.prototype,nm),Object.assign(gi,WD),Object.keys(nm).forEach(d=>{gi[d]=function(){if(xn)return xn[d](...arguments)}}),gi.DismissReason=pi,gi.version="11.7.2";const Yr=gi;return Yr.default=Yr,Yr}),typeof Fn<"u"&&Fn.Sweetalert2&&(Fn.swal=Fn.sweetAlert=Fn.Swal=Fn.SweetAlert=Fn.Sweetalert2),typeof document<"u"&&function(n,s){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=s);else try{i.innerHTML=s}catch{i.innerText=s}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')})(yc);const fe=yc.exports,Em=["ts","wmv","3pg","mp4","mpg","m4v","iso","mkv","avi","dvd","wmv","i00","i01","i02","i03","i04","i05","i06","i07","i08","i09","i10","i11","i12","mpeg","mov","m2ts","bup","vob","rmvb","md0","md1","md2","md3","md4","md5","mdf","mds","nrg","flv"],km=["jpg","jpeg","png","gif","bmp","svg"],Sm=["mp3","wav","wma","ogg","ape","flac","aac"];function wc(e){return JSON.parse(JSON.stringify(e))}function bc(e){return e&&typeof e=="object"&&!Array.isArray(e)}function _c(...e){const t={};for(const n of e)for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(bc(n[s])&&bc(t[s])?t[s]=_c(t[s],n[s]):t[s]=n[s]);return t}function po(e,...t){return new e(t[0])}async function Am(e){return new Promise((t,n)=>{Xr({onload:s=>t(s),onerror:s=>n(s),...e})})}function _i(){return Math.floor(Date.now()/1e3)}function vi(e,t,n="text/plain"){const s=document.createElement("a");document.body.appendChild(s),s.setAttribute("style","display:none");const i=new Blob([e],{type:n}),o=window.URL.createObjectURL(i);s.href=o,s.download=t,s.click(),window.URL.revokeObjectURL(o)}function tn(e){if(typeof bi=="function")return bi(e,"text"),!0;const t=n=>{var s;(s=n.clipboardData)==null||s.setData("text/plain",e),n.preventDefault(),document.removeEventListener("copy",t)};return document.addEventListener("copy",t),document.execCommand("copy")}function vc(e,t){return e=e.replace(/^[\/]+/g,""),t?"/"+e:e}function xc(e){return/^magnet:\?xt=urn:btih/.test(e)}function Cc(e){return/^ed2k:\/\/\|file\|/.test(e)}function $c(e){return`magnet:?xt=urn:btih:${e.toUpperCase()}`}function Ec(e){const t=e.match(/([a-z\d]{32,40})/i);return t?t[1]:""}function Pm(e,t=!0){return(t?/^([a-z\d]{32})$|^([a-z\d]{40})$/i:/^[a-z\d]{32,40}$/i).test(e)}function kc(e,t=location.href){const n=new RegExp("(\\?|#|&)"+e+"=([^&#]*)(&|#|$)"),s=t.match(n);return s?s[2]:""}function ho(e,t=2){if(Number.isNaN(e)||(e=typeof e=="string"?parseInt(e):e,!e))return"0";const n=1024,s=t,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(s))+" "+i[o]}function Sc(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=new RegExp(`^(\\d+(?:\\.\\d+)?)(${t.join("|")})$`,"i"),s=e.match(n);if(!s)throw new Error(`无效的文件大小!${e}`);const i=parseFloat(s[1]),o=s[2].toUpperCase(),r=t.indexOf(o);if(r<0)throw new Error(`无效的文件大小!${e}`);return i*Math.pow(1024,r)}function Ac(e,t=document,n=XPathResult.ORDERED_NODE_SNAPSHOT_TYPE){const s=[],i=document.evaluate(e,t,null,n,null);for(let o=0;o<i.snapshotLength;o++){const r=i.snapshotItem(o);r&&s.push(r)}return s}async function Cn(e,t=100,n=12e4,s=document){const i=await us(e,t,n,s);if(i.length)return i[0];throw new Error(`未找到元素:${e}`)}async function us(e,t=100,n=12e4,s=document){const i=e.indexOf("//")===0;function o(r){if(i){const a=Ac(e);a.length>0&&r(a)}else{const a=s.querySelectorAll(e);a.length&&r(Array.from(a))}}try{return await jn(o,t,n)}catch(r){throw console.warn("[find]",r),new Error(`查找元素超时:${e}`)}}async function Un(e,t=100,n=12e4){const s=e.indexOf("//")===0;function i(o){if(s){const r=Ac(e);r.length>0&&o(unsafeWindow.$(r))}else{const r=unsafeWindow.$(e);r.length&&o(r)}}try{return await jn(i,t,n)}catch(o){throw console.warn("[findWithJQuery]",o),new Error(`查找元素超时:${e}`)}}async function jn(e,t,n){return new Promise(async(s,i)=>{if(typeof e!="function"){i("提供的参数`fulfill`不是一个Function!");return}let o=!1;e(l=>{o=!0,s(l)});let r=setInterval(async()=>{if(o){clearTimeout(a),clearInterval(r);return}e(l=>{clearTimeout(a),clearInterval(r),s(l)})},t),a=setTimeout(()=>{clearInterval(r),i("超时")},n)})}async function mt(e){return new Promise(t=>{setTimeout(t,e)})}function mo(e){const t=new URLSearchParams;let n;for(n in e)t.append(n,e[n].toString());return t.toString()}function Im(e,t=!1){const n=[];for(const s in e){let i=e[s].toString();i=t?encodeURIComponent(i):i,n.push(`${s}=${i}`)}return n.join("&")}async function se(e){return fe.fire({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",fe.stopTimer),t.addEventListener("mouseleave",fe.resumeTimer)},...e})}function ds(e,t){t=t||window,t.postMessage(e)}function fs(e,t,n){if(n){const s=fo(e,{});Qr(e,{...s,...t})}else Qr(e,t)}function Rt(e,t,n){let s;return function(...i){const o=()=>{s=void 0,n||e.apply(this,i)},r=n&&s===void 0;clearTimeout(s),s=setTimeout(o,t),r&&e.apply(this,i)}}function Tm(e){return e?Em.indexOf(e.toLowerCase())>-1:!1}function Lm(e){return e?km.indexOf(e.toLowerCase())>-1:!1}function Om(e){return e?Sm.indexOf(e.toLowerCase())>-1:!1}var Be=(e=>(e.listItemHover="listItemHover",e.listItemHoverSub="listItemHoverSub",e.listItemContext="listItemContext",e.listItemContextSub="listItemContextSub",e.selection="selection",e.selectionSub="selectionSub",e.dirContext="dirContext",e.dirContextSub="dirContextSub",e))(Be||{}),xi=(e=>(e.listItemHover="列表项悬浮菜单",e.listItemHoverSub="列表项悬浮子菜单",e.listItemContext="列表项右键菜单",e.listItemContextSub="列表项右键子菜单",e.selection="选中项菜单",e.selectionSub="选中项子菜单",e.dirContext="当前目录右键菜单",e.dirContextSub="当前目录右键子菜单",e))(xi||{}),ps=(e=>(e[e.after=0]="after",e[e.before=1]="before",e))(ps||{}),st=(e=>(e.basic="basic_config",e.anxia="anxia_config",e.clouddrive="clouddrive_configs",e.list="list_config",e.enabledCustomUrlsForSearch="enabled_custom_urls_for_search",e.enabledCustomUrlsForPlay="enabled_custom_urls_for_play",e.menuCustomUrlsForSearch="menu_custom_urls_for_search",e.menuCustomUrlsForPlay="menu_custom_urls_for_play",e.menu="ce_menu_config",e.hiddenOfficialMenuKeys="hidden_official_menu_keys",e.offline="offlineExporterConfig",e.search="search_config",e.tools="tools_config",e.cleanerConfig="cleanerConfig",e.cleanerSuffixGroups="suffixGroups",e.cleanerKeywordGroups="keywordGroups",e))(st||{});const Zr=Object.values(st),Pc=async(e,t)=>fo(e,t),Dm=async(e,t)=>Qr(e,t),Ic=async e=>xm(e),Mm=async()=>{for(const e of Zr)await Ic(e)},Tc=async()=>{const e={};for(const t of Zr)e[t]=await Pc(t,{});return e};async function Rm(){const e=await Tc(),t={name:"115不大助手",version:"0.6.24",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};e._meta={name:t.name,version:t.version,time:new Date().toLocaleString(),browser:navigator.userAgent},e._schema="pan115_enhancer_configs";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:"application/json"})),n.download=`${t.name}-v${t.version}-配置.json`,n.click()}async function Nm(){return new Promise((e,t)=>{const n=document.createElement("input");n.type="file",n.accept="application/json",n.oncancel=()=>{t("取消选择文件!")},n.onchange=async()=>{const s=n.files&&n.files[0];if(!s){t("未选择文件!");return}const i=await new Promise((r,a)=>{const l=new FileReader;l.onload=()=>{try{r(JSON.parse(l.result))}catch(u){a(u)}},l.onerror=()=>{a(l.error)},l.readAsText(s)});if(i._schema!=="pan115_enhancer_configs"){t("这不是一个脚本配置文件!");return}const o=[];for(const r of Zr)o.push(r),i[r]&&await Ze.set(r,i[r]);e({data:i,importedKeys:o})},n.click()})}const Ze={get:Pc,set:Dm,remove:Ic,clear:Mm,getAll:Tc};function Bm(e){if(navigator.clipboard){navigator.clipboard.writeText(e);return}if(document.execCommand){const t=document.createElement("input");t.style.position="fixed",t.style.opacity="0",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t);return}prompt("请复制以下内容:",e)}function Lc(e="",t=""){return e+Date.now().toString()+Math.random().toString(36).substring(5)+t}async function Oc(e,t=!1){try{return await navigator.clipboard.writeText(e),!0}catch(n){return console.warn("[copy]",n),t?(prompt("请复制内容:",e),!0):!1}}function Dc(e,t="NFD"){return e.normalize(t)}const Mc=st.clouddrive;var Rc=(e=>(e.windows="windows",e.macos="macos",e.linux="linux",e.android="android",e))(Rc||{});function ea(e){return{active:!1,url:"http://localhost:19798",root:"/115",memo:"",platform:void 0,...e}}async function Nc(){const e=[ea()],t=await Ze.get(Mc,e);return t||e}async function Bc(e){e.some(t=>t.active)||(e[0].active=!0),await Ze.set(Mc,e)}async function Ms(){return(await Nc()).find(t=>t.active)||ea()}var go=(e=>(e.play="play",e.download="download",e))(go||{});function Fc(e){return e.startsWith("file://")}async function Rs(e,t,n="play"){e.platform==="macos"&&(t=Dc(t,"NFD"));let{url:s,root:i}=e;if(!s)throw new Error("未设置CloudDrive地址!");(s.startsWith("/")||s.startsWith("\\"))&&(s=`file:///${s}`),Fc(s);const o=/^https?:\/\//.test(s);if(o&&!i)throw new Error("当协议为http/https时,必须设置CloudDrive资源根路径!");i&&(i=i.replace(/^(\/+)?/g,"/")),t=t.replace(/^(\/+)?/g,"/");const r=`${i}${t}`,a=n==="play"?"True":"False";let l="";return s=s.replace(/\/+$/,""),o?l=`${s}/static/${s.replace("://","/")}/${a}/${encodeURIComponent(r)}`:l=`${s}${r}`,console.log("[Cloud115 Enhancer] buildCloudDriveUrl",l),l}async function ta(e,t){let{url:n,root:s}=e;if(!n)throw new Error("未设置CloudDrive地址!");return(n.startsWith("/")||n.startsWith("\\"))&&(n=`file:///${n}`),Fc(n)?await Rs(e,t,"play"):await Rs(e,t,"play")+".clfsplaylist.m3u"}async function Fm(e,t){let{url:n}=e;if(!n)throw new Error("未设置CloudDrive地址!");return n.startsWith("http")||(n=`http://${n}`),n=n.replace(/\/+$/,""),t=e.root.replace(/\/+$/,"")+t,t=t.replace(/^(\/+)?/g,"/"),e.platform==="macos"&&(t=Dc(t,"NFD")),`${n}/#${t}?a=1`}var Nt=(e=>(e[e.any=-999]="any",e[e.failed=-1]="failed",e[e.illegal=0]="illegal",e[e.ing=1]="ing",e[e.success=2]="success",e))(Nt||{});const Um={[-1]:"失败",[0]:"违规",[1]:"下载中",[2]:"成功"};var Bt=(e=>(e.all="all",e.failed="failed",e.success="success",e.magnet="magnet",e.magnetEd2k="magnetEd2k",e))(Bt||{}),na=(e=>(e[e.true=1]="true",e[e.false=0]="false",e))(na||{}),$t=(e=>(e[e.all=0]="all",e[e.video=4]="video",e[e.audio=3]="audio",e[e.image=2]="image",e[e.doc=1]="doc",e[e.app=6]="app",e[e.archive=5]="archive",e))($t||{}),rt=(e=>(e.all="全部",e.video="视频",e.audio="音频",e.image="图片",e.doc="文档",e.app="应用",e.archive="压缩包",e))(rt||{}),Uc=(e=>(e.userPtime="user_ptime",e.fileName="file_name",e.fileSize="file_size",e.fileType="file_type",e))(Uc||{});function jm(e){return{offset:0,limit:1150,aid:1,cid:"",format:"json",o:"user_ptime",asc:0,search_value:"",...e}}function Hn(e){return{aid:1,cid:"",o:"user_ptime",asc:0,offset:0,show_dir:1,limit:115,natsort:0,format:"json",...e}}var sa=(e=>(e[e.normal=0]="normal",e[e.violation=1]="violation",e[e.auditing=2]="auditing",e))(sa||{});function jc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hc}=Object.prototype,{getPrototypeOf:ia}=Object,oa=(e=>t=>{const n=Hc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$n=e=>(e=e.toLowerCase(),t=>oa(t)===e),yo=e=>t=>typeof t===e,{isArray:Ns}=Array,Ci=yo("undefined");function Hm(e){return e!==null&&!Ci(e)&&e.constructor!==null&&!Ci(e.constructor)&&qn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qc=$n("ArrayBuffer");function qm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qc(e.buffer),t}const zm=yo("string"),qn=yo("function"),zc=yo("number"),ra=e=>e!==null&&typeof e=="object",Vm=e=>e===!0||e===!1,wo=e=>{if(oa(e)!=="object")return!1;const t=ia(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wm=$n("Date"),Km=$n("File"),Gm=$n("Blob"),Ym=$n("FileList"),Jm=e=>ra(e)&&qn(e.pipe),Qm=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Hc.call(e)===t||qn(e.toString)&&e.toString()===t)},Xm=$n("URLSearchParams"),Zm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $i(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),Ns(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let a;for(s=0;s<r;s++)a=o[s],t.call(null,e[a],a,e)}}function Vc(e,t){t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const Wc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Kc=e=>!Ci(e)&&e!==Wc;function aa(){const{caseless:e}=Kc(this)&&this||{},t={},n=(s,i)=>{const o=e&&Vc(t,i)||i;wo(t[o])&&wo(s)?t[o]=aa(t[o],s):wo(s)?t[o]=aa({},s):Ns(s)?t[o]=s.slice():t[o]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&$i(arguments[s],n);return t}const eg=(e,t,n,{allOwnKeys:s}={})=>($i(t,(i,o)=>{n&&qn(i)?e[o]=jc(i,n):e[o]=i},{allOwnKeys:s}),e),tg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ng=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},sg=(e,t,n,s)=>{let i,o,r;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)r=i[o],(!s||s(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&ia(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ig=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},og=e=>{if(!e)return null;if(Ns(e))return e;let t=e.length;if(!zc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ia(Uint8Array)),ag=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=s.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},lg=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},cg=$n("HTMLFormElement"),ug=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),Gc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dg=$n("RegExp"),Yc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};$i(n,(i,o)=>{t(i,o,e)!==!1&&(s[o]=i)}),Object.defineProperties(e,s)},fg=e=>{Yc(e,(t,n)=>{if(qn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(!!qn(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pg=(e,t)=>{const n={},s=i=>{i.forEach(o=>{n[o]=!0})};return Ns(e)?s(e):s(String(e).split(t)),n},hg=()=>{},mg=(e,t)=>(e=+e,Number.isFinite(e)?e:t),la="abcdefghijklmnopqrstuvwxyz",Jc="0123456789",Qc={DIGIT:Jc,ALPHA:la,ALPHA_DIGIT:la+la.toUpperCase()+Jc},gg=(e=16,t=Qc.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function yg(e){return!!(e&&qn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const K={isArray:Ns,isArrayBuffer:qc,isBuffer:Hm,isFormData:Qm,isArrayBufferView:qm,isString:zm,isNumber:zc,isBoolean:Vm,isObject:ra,isPlainObject:wo,isUndefined:Ci,isDate:Wm,isFile:Km,isBlob:Gm,isRegExp:dg,isFunction:qn,isStream:Jm,isURLSearchParams:Xm,isTypedArray:rg,isFileList:Ym,forEach:$i,merge:aa,extend:eg,trim:Zm,stripBOM:tg,inherits:ng,toFlatObject:sg,kindOf:oa,kindOfTest:$n,endsWith:ig,toArray:og,forEachEntry:ag,matchAll:lg,isHTMLForm:cg,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:Yc,freezeMethods:fg,toObjectSet:pg,toCamelCase:ug,noop:hg,toFiniteNumber:mg,findKey:Vc,global:Wc,isContextDefined:Kc,ALPHABET:Qc,generateString:gg,isSpecCompliantForm:yg,toJSONObject:e=>{const t=new Array(10),n=(s,i)=>{if(ra(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const o=Ns(s)?[]:{};return $i(s,(r,a)=>{const l=n(r,i+1);!Ci(l)&&(o[a]=l)}),t[i]=void 0,o}}return s};return n(e,0)}};function ze(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i)}K.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xc=ze.prototype,Zc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zc[e]={value:e}}),Object.defineProperties(ze,Zc),Object.defineProperty(Xc,"isAxiosError",{value:!0}),ze.from=(e,t,n,s,i,o)=>{const r=Object.create(Xc);return K.toFlatObject(e,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ze.call(r,e.message,t,n,s,i),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};const wg=null;function ca(e){return K.isPlainObject(e)||K.isArray(e)}function eu(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function tu(e,t,n){return e?e.concat(t).map(function(i,o){return i=eu(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function bg(e){return K.isArray(e)&&!e.some(ca)}const _g=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function bo(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,T){return!K.isUndefined(T[E])});const s=n.metaTokens,i=n.visitor||f,o=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(K.isDate(b))return b.toISOString();if(!l&&K.isBlob(b))throw new ze("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(b)||K.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,E,T){let M=b;if(b&&!T&&typeof b=="object"){if(K.endsWith(E,"{}"))E=s?E:E.slice(0,-2),b=JSON.stringify(b);else if(K.isArray(b)&&bg(b)||(K.isFileList(b)||K.endsWith(E,"[]"))&&(M=K.toArray(b)))return E=eu(E),M.forEach(function(P,V){!(K.isUndefined(P)||P===null)&&t.append(r===!0?tu([E],V,o):r===null?E:E+"[]",u(P))}),!1}return ca(b)?!0:(t.append(tu(T,E,o),u(b)),!1)}const h=[],y=Object.assign(_g,{defaultVisitor:f,convertValue:u,isVisitable:ca});function _(b,E){if(!K.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+E.join("."));h.push(b),K.forEach(b,function(M,I){(!(K.isUndefined(M)||M===null)&&i.call(t,M,K.isString(I)?I.trim():I,E,y))===!0&&_(M,E?E.concat(I):[I])}),h.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return _(e),t}function nu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function ua(e,t){this._pairs=[],e&&bo(e,this,t)}const su=ua.prototype;su.append=function(t,n){this._pairs.push([t,n])},su.toString=function(t){const n=t?function(s){return t.call(this,s,nu)}:nu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function vg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function iu(e,t,n){if(!t)return e;const s=n&&n.encode||vg,i=n&&n.serialize;let o;if(i?o=i(t,n):o=K.isURLSearchParams(t)?t.toString():new ua(t,n).toString(s),o){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class xg{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(s){s!==null&&t(s)})}}const ou=xg,ru={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cg=typeof URLSearchParams<"u"?URLSearchParams:ua,$g=typeof FormData<"u"?FormData:null,Eg=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),kg=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),hn={isBrowser:!0,classes:{URLSearchParams:Cg,FormData:$g,Blob},isStandardBrowserEnv:Eg,isStandardBrowserWebWorkerEnv:kg,protocols:["http","https","file","blob","url","data"]};function Sg(e,t){return bo(e,new hn.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,o){return hn.isNode&&K.isBuffer(n)?(this.append(s,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Ag(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Pg(e){const t={},n=Object.keys(e);let s;const i=n.length;let o;for(s=0;s<i;s++)o=n[s],t[o]=e[o];return t}function au(e){function t(n,s,i,o){let r=n[o++];const a=Number.isFinite(+r),l=o>=n.length;return r=!r&&K.isArray(i)?i.length:r,l?(K.hasOwnProp(i,r)?i[r]=[i[r],s]:i[r]=s,!a):((!i[r]||!K.isObject(i[r]))&&(i[r]=[]),t(n,s,i[r],o)&&K.isArray(i[r])&&(i[r]=Pg(i[r])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(s,i)=>{t(Ag(s),i,n,0)}),n}return null}const Ig={"Content-Type":void 0};function Tg(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const _o={transitional:ru,adapter:["xhr","http"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,o=K.isObject(t);if(o&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return i&&i?JSON.stringify(au(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Sg(t,this.formSerializer).toString();if((a=K.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Tg(t)):t}],transformResponse:[function(t){const n=this.transitional||_o.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&K.isString(t)&&(s&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?ze.from(a,ze.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:hn.classes.FormData,Blob:hn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],function(t){_o.headers[t]={}}),K.forEach(["post","put","patch"],function(t){_o.headers[t]=K.merge(Ig)});const da=_o,Lg=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Og=e=>{const t={};let n,s,i;return e&&e.split(`
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!n||t[n]&&Lg[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},lu=Symbol("internals");function Ei(e){return e&&String(e).trim().toLowerCase()}function vo(e){return e===!1||e==null?e:K.isArray(e)?e.map(vo):String(e)}function Dg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}function Mg(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function fa(e,t,n,s,i){if(K.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!K.isString(t)){if(K.isString(s))return t.indexOf(s)!==-1;if(K.isRegExp(s))return s.test(t)}}function Rg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Ng(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,o,r){return this[s].call(this,t,i,o,r)},configurable:!0})})}class xo{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function o(a,l,u){const f=Ei(l);if(!f)throw new Error("header name must be a non-empty string");const h=K.findKey(i,f);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||l]=vo(a))}const r=(a,l)=>K.forEach(a,(u,f)=>o(u,f,l));return K.isPlainObject(t)||t instanceof this.constructor?r(t,n):K.isString(t)&&(t=t.trim())&&!Mg(t)?r(Og(t),n):t!=null&&o(n,t,s),this}get(t,n){if(t=Ei(t),t){const s=K.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return Dg(i);if(K.isFunction(n))return n.call(this,i,s);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ei(t),t){const s=K.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||fa(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function o(r){if(r=Ei(r),r){const a=K.findKey(s,r);a&&(!n||fa(s,s[a],a,n))&&(delete s[a],i=!0)}}return K.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const o=n[s];(!t||fa(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,s={};return K.forEach(this,(i,o)=>{const r=K.findKey(s,o);if(r){n[r]=vo(i),delete n[o];return}const a=t?Rg(o):String(o).trim();a!==o&&delete n[o],n[a]=vo(i),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&K.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[lu]=this[lu]={accessors:{}}).accessors,i=this.prototype;function o(r){const a=Ei(r);s[a]||(Ng(i,r),s[a]=!0)}return K.isArray(t)?t.forEach(o):o(t),this}}xo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods(xo.prototype),K.freezeMethods(xo);const En=xo;function pa(e,t){const n=this||da,s=t||n,i=En.from(s.headers);let o=s.data;return K.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function cu(e){return!!(e&&e.__CANCEL__)}function ki(e,t,n){ze.call(this,e==null?"canceled":e,ze.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(ki,ze,{__CANCEL__:!0});function Bg(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ze("Request failed with status code "+n.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Fg=hn.isStandardBrowserEnv?function(){return{write:function(n,s,i,o,r,a){const l=[];l.push(n+"="+encodeURIComponent(s)),K.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),K.isString(o)&&l.push("path="+o),K.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ug(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jg(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function uu(e,t){return e&&!Ug(t)?jg(e,t):t}const Hg=hn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function i(o){let r=o;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=i(window.location.href),function(r){const a=K.isString(r)?i(r):r;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function qg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zg(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=s[o];r||(r=u),n[i]=l,s[i]=u;let h=o,y=0;for(;h!==i;)y+=n[h++],h=h%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-r<t)return;const _=f&&u-f;return _?Math.round(y*1e3/_):void 0}}function du(e,t){let n=0;const s=zg(50,250);return i=>{const o=i.loaded,r=i.lengthComputable?i.total:void 0,a=o-n,l=s(a),u=o<=r;n=o;const f={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&u?(r-o)/l:void 0,event:i};f[t?"download":"upload"]=!0,e(f)}}const Co={http:wg,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){let i=e.data;const o=En.from(e.headers).normalize(),r=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(i)&&(hn.isStandardBrowserEnv||hn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const _=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+b))}const f=uu(e.baseURL,e.url);u.open(e.method.toUpperCase(),iu(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function h(){if(!u)return;const _=En.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!r||r==="text"||r==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:_,config:e,request:u};Bg(function(M){n(M),l()},function(M){s(M),l()},E),u=null}if("onloadend"in u?u.onloadend=h:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(h)},u.onabort=function(){!u||(s(new ze("Request aborted",ze.ECONNABORTED,e,u)),u=null)},u.onerror=function(){s(new ze("Network Error",ze.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||ru;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),s(new ze(b,E.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,e,u)),u=null},hn.isStandardBrowserEnv){const _=(e.withCredentials||Hg(f))&&e.xsrfCookieName&&Fg.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&K.forEach(o.toJSON(),function(b,E){u.setRequestHeader(E,b)}),K.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),r&&r!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",du(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",du(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=_=>{!u||(s(!_||_.type?new ki(null,e,u):_),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const y=qg(f);if(y&&hn.protocols.indexOf(y)===-1){s(new ze("Unsupported protocol "+y+":",ze.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};K.forEach(Co,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Vg={getAdapter:e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,s;for(let i=0;i<t&&(n=e[i],!(s=K.isString(n)?Co[n.toLowerCase()]:n));i++);if(!s)throw s===!1?new ze(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(K.hasOwnProp(Co,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!K.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:Co};function ha(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ki(null,e)}function fu(e){return ha(e),e.headers=En.from(e.headers),e.data=pa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vg.getAdapter(e.adapter||da.adapter)(e).then(function(s){return ha(e),s.data=pa.call(e,e.transformResponse,s),s.headers=En.from(s.headers),s},function(s){return cu(s)||(ha(e),s&&s.response&&(s.response.data=pa.call(e,e.transformResponse,s.response),s.response.headers=En.from(s.response.headers))),Promise.reject(s)})}const pu=e=>e instanceof En?e.toJSON():e;function Bs(e,t){t=t||{};const n={};function s(u,f,h){return K.isPlainObject(u)&&K.isPlainObject(f)?K.merge.call({caseless:h},u,f):K.isPlainObject(f)?K.merge({},f):K.isArray(f)?f.slice():f}function i(u,f,h){if(K.isUndefined(f)){if(!K.isUndefined(u))return s(void 0,u,h)}else return s(u,f,h)}function o(u,f){if(!K.isUndefined(f))return s(void 0,f)}function r(u,f){if(K.isUndefined(f)){if(!K.isUndefined(u))return s(void 0,u)}else return s(void 0,f)}function a(u,f,h){if(h in t)return s(u,f);if(h in e)return s(void 0,u)}const l={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(u,f)=>i(pu(u),pu(f),!0)};return K.forEach(Object.keys(e).concat(Object.keys(t)),function(f){const h=l[f]||i,y=h(e[f],t[f],f);K.isUndefined(y)&&h!==a||(n[f]=y)}),n}const hu="1.3.3",ma={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ma[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const mu={};ma.transitional=function(t,n,s){function i(o,r){return"[Axios v"+hu+"] Transitional option '"+o+"'"+r+(s?". "+s:"")}return(o,r,a)=>{if(t===!1)throw new ze(i(r," has been removed"+(n?" in "+n:"")),ze.ERR_DEPRECATED);return n&&!mu[r]&&(mu[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,r,a):!0}};function Wg(e,t,n){if(typeof e!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const o=s[i],r=t[o];if(r){const a=e[o],l=a===void 0||r(a,o,e);if(l!==!0)throw new ze("option "+o+" must be "+l,ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ze("Unknown option "+o,ze.ERR_BAD_OPTION)}}const ga={assertOptions:Wg,validators:ma},zn=ga.validators;class $o{constructor(t){this.defaults=t,this.interceptors={request:new ou,response:new ou}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bs(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:o}=n;s!==void 0&&ga.assertOptions(s,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean)},!1),i!==void 0&&ga.assertOptions(i,{encode:zn.function,serialize:zn.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r;r=o&&K.merge(o.common,o[n.method]),r&&K.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=En.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(l=l&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let f,h=0,y;if(!l){const b=[fu.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,u),y=b.length,f=Promise.resolve(n);h<y;)f=f.then(b[h++],b[h++]);return f}y=a.length;let _=n;for(h=0;h<y;){const b=a[h++],E=a[h++];try{_=b(_)}catch(T){E.call(this,T);break}}try{f=fu.call(this,_)}catch(b){return Promise.reject(b)}for(h=0,y=u.length;h<y;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=Bs(this.defaults,t);const n=uu(t.baseURL,t.url);return iu(n,t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(t){$o.prototype[t]=function(n,s){return this.request(Bs(s||{},{method:t,url:n,data:(s||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(s){return function(o,r,a){return this.request(Bs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}$o.prototype[t]=n(),$o.prototype[t+"Form"]=n(!0)});const Eo=$o;class ya{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(i=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](i);s._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(a=>{s.subscribe(a),o=a}).then(i);return r.cancel=function(){s.unsubscribe(o)},r},t(function(o,r,a){s.reason||(s.reason=new ki(o,r,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ya(function(i){t=i}),cancel:t}}}const Kg=ya;function Gg(e){return function(n){return e.apply(null,n)}}function Yg(e){return K.isObject(e)&&e.isAxiosError===!0}const wa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wa).forEach(([e,t])=>{wa[t]=e});const Jg=wa;function gu(e){const t=new Eo(e),n=jc(Eo.prototype.request,t);return K.extend(n,Eo.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return gu(Bs(e,i))},n}const pt=gu(da);pt.Axios=Eo,pt.CanceledError=ki,pt.CancelToken=Kg,pt.isCancel=cu,pt.VERSION=hu,pt.toFormData=bo,pt.AxiosError=ze,pt.Cancel=pt.CanceledError,pt.all=function(t){return Promise.all(t)},pt.spread=Gg,pt.isAxiosError=Yg,pt.mergeConfig=Bs,pt.AxiosHeaders=En,pt.formToJSON=e=>au(K.isHTMLForm(e)?new FormData(e):e),pt.HttpStatusCode=Jg,pt.default=pt;const yu=pt,{Axios:SM,AxiosError:Qg,CanceledError:AM,isCancel:PM,CancelToken:IM,VERSION:TM,all:LM,Cancel:OM,isAxiosError:DM,spread:MM,toFormData:Xg,AxiosHeaders:RM,HttpStatusCode:NM,formToJSON:BM,mergeConfig:FM}=yu;class wu extends Error{}class ba extends wu{constructor(){super(...arguments);be(this,"message","搜索失败!")}}class bu extends ba{constructor(){super(...arguments);be(this,"message","搜索请求响应内容为空!")}}class _a extends wu{constructor(){super(...arguments);be(this,"message","目录不存在!")}toString(){return this.message}}var _u=(e=>(e[e.exist=20004]="exist",e))(_u||{});const Zg={[10013]:"超出任务大小限制",[10018]:"审核中...",[10016]:"文件内含违规内容"};class ut{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,n=!1){return this.onePassHasher.start().appendStr(t).end(n)}static hashAsciiStr(t,n=!1){return this.onePassHasher.start().appendAsciiStr(t).end(n)}static _hex(t){const n=ut.hexChars,s=ut.hexOut;let i,o,r,a;for(a=0;a<4;a+=1)for(o=a*8,i=t[a],r=0;r<8;r+=2)s[o+1+r]=n.charAt(i&15),i>>>=4,s[o+0+r]=n.charAt(i&15),i>>>=4;return s.join("")}static _md5cycle(t,n){let s=t[0],i=t[1],o=t[2],r=t[3];s+=(i&o|~i&r)+n[0]-680876936|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[1]-389564586|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[2]+606105819|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[3]-1044525330|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[4]-176418897|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[5]+1200080426|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[6]-1473231341|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[7]-45705983|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[8]+1770035416|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[9]-1958414417|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[10]-42063|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[11]-1990404162|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[12]+1804603682|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[13]-40341101|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[14]-1502002290|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[15]+1236535329|0,i=(i<<22|i>>>10)+o|0,s+=(i&r|o&~r)+n[1]-165796510|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[6]-1069501632|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[11]+643717713|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[0]-373897302|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[5]-701558691|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[10]+38016083|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[15]-660478335|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[4]-405537848|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[9]+568446438|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[14]-1019803690|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[3]-187363961|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[8]+1163531501|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[13]-1444681467|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[2]-51403784|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[7]+1735328473|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[12]-1926607734|0,i=(i<<20|i>>>12)+o|0,s+=(i^o^r)+n[5]-378558|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[8]-2022574463|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[11]+1839030562|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[14]-35309556|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[1]-1530992060|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[4]+1272893353|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[7]-155497632|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[10]-1094730640|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[13]+681279174|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[0]-358537222|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[3]-722521979|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[6]+76029189|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[9]-640364487|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[12]-421815835|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[15]+530742520|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[2]-995338651|0,i=(i<<23|i>>>9)+o|0,s+=(o^(i|~r))+n[0]-198630844|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[7]+1126891415|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[14]-1416354905|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[5]-57434055|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[12]+1700485571|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[3]-1894986606|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[10]-1051523|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[1]-2054922799|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[8]+1873313359|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[15]-30611744|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[6]-1560198380|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[13]+1309151649|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[4]-145523070|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[11]-1120210379|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[2]+718787259|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[9]-343485551|0,i=(i<<21|i>>>11)+o|0,t[0]=s+t[0]|0,t[1]=i+t[1]|0,t[2]=o+t[2]|0,t[3]=r+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(ut.stateIdentity),this}appendStr(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r;for(r=0;r<t.length;r+=1){if(o=t.charCodeAt(r),o<128)n[i++]=o;else if(o<2048)n[i++]=(o>>>6)+192,n[i++]=o&63|128;else if(o<55296||o>56319)n[i++]=(o>>>12)+224,n[i++]=o>>>6&63|128,n[i++]=o&63|128;else{if(o=(o-55296)*1024+(t.charCodeAt(++r)-56320)+65536,o>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[i++]=(o>>>18)+240,n[i++]=o>>>12&63|128,n[i++]=o>>>6&63|128,n[i++]=o&63|128}i>=64&&(this._dataLength+=64,ut._md5cycle(this._state,s),i-=64,s[0]=s[16])}return this._bufferLength=i,this}appendAsciiStr(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r=0;for(;;){for(o=Math.min(t.length-r,64-i);o--;)n[i++]=t.charCodeAt(r++);if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,s),i=0}return this._bufferLength=i,this}appendByteArray(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r=0;for(;;){for(o=Math.min(t.length-r,64-i);o--;)n[i++]=t[r++];if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,s),i=0}return this._bufferLength=i,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const n=t.buffer,s=t.state,i=this._state;let o;for(this._dataLength=t.length,this._bufferLength=t.buflen,i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],o=0;o<n.length;o+=1)this._buffer8[o]=n.charCodeAt(o)}end(t=!1){const n=this._bufferLength,s=this._buffer8,i=this._buffer32,o=(n>>2)+1;this._dataLength+=n;const r=this._dataLength*8;if(s[n]=128,s[n+1]=s[n+2]=s[n+3]=0,i.set(ut.buffer32Identity.subarray(o),o),n>55&&(ut._md5cycle(this._state,i),i.set(ut.buffer32Identity)),r<=4294967295)i[14]=r;else{const a=r.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;i[14]=l,i[15]=u}return ut._md5cycle(this._state,i),t?this._state:ut._hex(this._state)}}if(ut.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),ut.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ut.hexChars="0123456789abcdef",ut.hexOut=[],ut.onePassHasher=new ut,ut.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");var vu={exports:{}};(function(e){var t=function(n){var s=1e7,i=7,o=9007199254740992,r=b(o),a="0123456789abcdefghijklmnopqrstuvwxyz",l=typeof BigInt=="function";function u(m,w,x,k){return typeof m>"u"?u[0]:typeof w<"u"?+w==10&&!x?J(m):re(m,w,x,k):J(m)}function f(m,w){this.value=m,this.sign=w,this.isSmall=!1}f.prototype=Object.create(u.prototype);function h(m){this.value=m,this.sign=m<0,this.isSmall=!0}h.prototype=Object.create(u.prototype);function y(m){this.value=m}y.prototype=Object.create(u.prototype);function _(m){return-o<m&&m<o}function b(m){return m<1e7?[m]:m<1e14?[m%1e7,Math.floor(m/1e7)]:[m%1e7,Math.floor(m/1e7)%1e7,Math.floor(m/1e14)]}function E(m){T(m);var w=m.length;if(w<4&&Ee(m,r)<0)switch(w){case 0:return 0;case 1:return m[0];case 2:return m[0]+m[1]*s;default:return m[0]+(m[1]+m[2]*s)*s}return m}function T(m){for(var w=m.length;m[--w]===0;);m.length=w+1}function M(m){for(var w=new Array(m),x=-1;++x<m;)w[x]=0;return w}function I(m){return m>0?Math.floor(m):Math.ceil(m)}function P(m,w){var x=m.length,k=w.length,O=new Array(x),S=0,W=s,q,ne;for(ne=0;ne<k;ne++)q=m[ne]+w[ne]+S,S=q>=W?1:0,O[ne]=q-S*W;for(;ne<x;)q=m[ne]+S,S=q===W?1:0,O[ne++]=q-S*W;return S>0&&O.push(S),O}function V(m,w){return m.length>=w.length?P(m,w):P(w,m)}function oe(m,w){var x=m.length,k=new Array(x),O=s,S,W;for(W=0;W<x;W++)S=m[W]-O+w,w=Math.floor(S/O),k[W]=S-w*O,w+=1;for(;w>0;)k[W++]=w%O,w=Math.floor(w/O);return k}f.prototype.add=function(m){var w=J(m);if(this.sign!==w.sign)return this.subtract(w.negate());var x=this.value,k=w.value;return w.isSmall?new f(oe(x,Math.abs(k)),this.sign):new f(V(x,k),this.sign)},f.prototype.plus=f.prototype.add,h.prototype.add=function(m){var w=J(m),x=this.value;if(x<0!==w.sign)return this.subtract(w.negate());var k=w.value;if(w.isSmall){if(_(x+k))return new h(x+k);k=b(Math.abs(k))}return new f(oe(k,Math.abs(x)),x<0)},h.prototype.plus=h.prototype.add,y.prototype.add=function(m){return new y(this.value+J(m).value)},y.prototype.plus=y.prototype.add;function j(m,w){var x=m.length,k=w.length,O=new Array(x),S=0,W=s,q,ne;for(q=0;q<k;q++)ne=m[q]-S-w[q],ne<0?(ne+=W,S=1):S=0,O[q]=ne;for(q=k;q<x;q++){if(ne=m[q]-S,ne<0)ne+=W;else{O[q++]=ne;break}O[q]=ne}for(;q<x;q++)O[q]=m[q];return T(O),O}function X(m,w,x){var k;return Ee(m,w)>=0?k=j(m,w):(k=j(w,m),x=!x),k=E(k),typeof k=="number"?(x&&(k=-k),new h(k)):new f(k,x)}function le(m,w,x){var k=m.length,O=new Array(k),S=-w,W=s,q,ne;for(q=0;q<k;q++)ne=m[q]+S,S=Math.floor(ne/W),ne%=W,O[q]=ne<0?ne+W:ne;return O=E(O),typeof O=="number"?(x&&(O=-O),new h(O)):new f(O,x)}f.prototype.subtract=function(m){var w=J(m);if(this.sign!==w.sign)return this.add(w.negate());var x=this.value,k=w.value;return w.isSmall?le(x,Math.abs(k),this.sign):X(x,k,this.sign)},f.prototype.minus=f.prototype.subtract,h.prototype.subtract=function(m){var w=J(m),x=this.value;if(x<0!==w.sign)return this.add(w.negate());var k=w.value;return w.isSmall?new h(x-k):le(k,Math.abs(x),x>=0)},h.prototype.minus=h.prototype.subtract,y.prototype.subtract=function(m){return new y(this.value-J(m).value)},y.prototype.minus=y.prototype.subtract,f.prototype.negate=function(){return new f(this.value,!this.sign)},h.prototype.negate=function(){var m=this.sign,w=new h(-this.value);return w.sign=!m,w},y.prototype.negate=function(){return new y(-this.value)},f.prototype.abs=function(){return new f(this.value,!1)},h.prototype.abs=function(){return new h(Math.abs(this.value))},y.prototype.abs=function(){return new y(this.value>=0?this.value:-this.value)};function ge(m,w){var x=m.length,k=w.length,O=x+k,S=M(O),W=s,q,ne,xe,De,Ie;for(xe=0;xe<x;++xe){De=m[xe];for(var Ge=0;Ge<k;++Ge)Ie=w[Ge],q=De*Ie+S[xe+Ge],ne=Math.floor(q/W),S[xe+Ge]=q-ne*W,S[xe+Ge+1]+=ne}return T(S),S}function Le(m,w){var x=m.length,k=new Array(x),O=s,S=0,W,q;for(q=0;q<x;q++)W=m[q]*w+S,S=Math.floor(W/O),k[q]=W-S*O;for(;S>0;)k[q++]=S%O,S=Math.floor(S/O);return k}function _e(m,w){for(var x=[];w-- >0;)x.push(0);return x.concat(m)}function L(m,w){var x=Math.max(m.length,w.length);if(x<=30)return ge(m,w);x=Math.ceil(x/2);var k=m.slice(x),O=m.slice(0,x),S=w.slice(x),W=w.slice(0,x),q=L(O,W),ne=L(k,S),xe=L(V(O,k),V(W,S)),De=V(V(q,_e(j(j(xe,q),ne),x)),_e(ne,2*x));return T(De),De}function ie(m,w){return-.012*m-.012*w+15e-6*m*w>0}f.prototype.multiply=function(m){var w=J(m),x=this.value,k=w.value,O=this.sign!==w.sign,S;if(w.isSmall){if(k===0)return u[0];if(k===1)return this;if(k===-1)return this.negate();if(S=Math.abs(k),S<s)return new f(Le(x,S),O);k=b(S)}return ie(x.length,k.length)?new f(L(x,k),O):new f(ge(x,k),O)},f.prototype.times=f.prototype.multiply;function G(m,w,x){return m<s?new f(Le(w,m),x):new f(ge(w,b(m)),x)}h.prototype._multiplyBySmall=function(m){return _(m.value*this.value)?new h(m.value*this.value):G(Math.abs(m.value),b(Math.abs(this.value)),this.sign!==m.sign)},f.prototype._multiplyBySmall=function(m){return m.value===0?u[0]:m.value===1?this:m.value===-1?this.negate():G(Math.abs(m.value),this.value,this.sign!==m.sign)},h.prototype.multiply=function(m){return J(m)._multiplyBySmall(this)},h.prototype.times=h.prototype.multiply,y.prototype.multiply=function(m){return new y(this.value*J(m).value)},y.prototype.times=y.prototype.multiply;function Se(m){var w=m.length,x=M(w+w),k=s,O,S,W,q,ne;for(W=0;W<w;W++){q=m[W],S=0-q*q;for(var xe=W;xe<w;xe++)ne=m[xe],O=2*(q*ne)+x[W+xe]+S,S=Math.floor(O/k),x[W+xe]=O-S*k;x[W+w]=S}return T(x),x}f.prototype.square=function(){return new f(Se(this.value),!1)},h.prototype.square=function(){var m=this.value*this.value;return _(m)?new h(m):new f(Se(b(Math.abs(this.value))),!1)},y.prototype.square=function(m){return new y(this.value*this.value)};function D(m,w){var x=m.length,k=w.length,O=s,S=M(w.length),W=w[k-1],q=Math.ceil(O/(2*W)),ne=Le(m,q),xe=Le(w,q),De,Ie,Ge,Dt,Ct,io,oo;for(ne.length<=x&&ne.push(0),xe.push(0),W=xe[k-1],Ie=x-k;Ie>=0;Ie--){for(De=O-1,ne[Ie+k]!==W&&(De=Math.floor((ne[Ie+k]*O+ne[Ie+k-1])/W)),Ge=0,Dt=0,io=xe.length,Ct=0;Ct<io;Ct++)Ge+=De*xe[Ct],oo=Math.floor(Ge/O),Dt+=ne[Ie+Ct]-(Ge-oo*O),Ge=oo,Dt<0?(ne[Ie+Ct]=Dt+O,Dt=-1):(ne[Ie+Ct]=Dt,Dt=0);for(;Dt!==0;){for(De-=1,Ge=0,Ct=0;Ct<io;Ct++)Ge+=ne[Ie+Ct]-O+xe[Ct],Ge<0?(ne[Ie+Ct]=Ge+O,Ge=0):(ne[Ie+Ct]=Ge,Ge=1);Dt+=Ge}S[Ie]=De}return ne=B(ne,q)[0],[E(S),E(ne)]}function Z(m,w){for(var x=m.length,k=w.length,O=[],S=[],W=s,q,ne,xe,De,Ie;x;){if(S.unshift(m[--x]),T(S),Ee(S,w)<0){O.push(0);continue}ne=S.length,xe=S[ne-1]*W+S[ne-2],De=w[k-1]*W+w[k-2],ne>k&&(xe=(xe+1)*W),q=Math.ceil(xe/De);do{if(Ie=Le(w,q),Ee(Ie,S)<=0)break;q--}while(q);O.push(q),S=j(S,Ie)}return O.reverse(),[E(O),E(S)]}function B(m,w){var x=m.length,k=M(x),O=s,S,W,q,ne;for(q=0,S=x-1;S>=0;--S)ne=q*O+m[S],W=I(ne/w),q=ne-W*w,k[S]=W|0;return[k,q|0]}function ye(m,w){var x,k=J(w);if(l)return[new y(m.value/k.value),new y(m.value%k.value)];var O=m.value,S=k.value,W;if(S===0)throw new Error("Cannot divide by zero");if(m.isSmall)return k.isSmall?[new h(I(O/S)),new h(O%S)]:[u[0],m];if(k.isSmall){if(S===1)return[m,u[0]];if(S==-1)return[m.negate(),u[0]];var q=Math.abs(S);if(q<s){x=B(O,q),W=E(x[0]);var ne=x[1];return m.sign&&(ne=-ne),typeof W=="number"?(m.sign!==k.sign&&(W=-W),[new h(W),new h(ne)]):[new f(W,m.sign!==k.sign),new h(ne)]}S=b(q)}var xe=Ee(O,S);if(xe===-1)return[u[0],m];if(xe===0)return[u[m.sign===k.sign?1:-1],u[0]];O.length+S.length<=200?x=D(O,S):x=Z(O,S),W=x[0];var De=m.sign!==k.sign,Ie=x[1],Ge=m.sign;return typeof W=="number"?(De&&(W=-W),W=new h(W)):W=new f(W,De),typeof Ie=="number"?(Ge&&(Ie=-Ie),Ie=new h(Ie)):Ie=new f(Ie,Ge),[W,Ie]}f.prototype.divmod=function(m){var w=ye(this,m);return{quotient:w[0],remainder:w[1]}},y.prototype.divmod=h.prototype.divmod=f.prototype.divmod,f.prototype.divide=function(m){return ye(this,m)[0]},y.prototype.over=y.prototype.divide=function(m){return new y(this.value/J(m).value)},h.prototype.over=h.prototype.divide=f.prototype.over=f.prototype.divide,f.prototype.mod=function(m){return ye(this,m)[1]},y.prototype.mod=y.prototype.remainder=function(m){return new y(this.value%J(m).value)},h.prototype.remainder=h.prototype.mod=f.prototype.remainder=f.prototype.mod,f.prototype.pow=function(m){var w=J(m),x=this.value,k=w.value,O,S,W;if(k===0)return u[1];if(x===0)return u[0];if(x===1)return u[1];if(x===-1)return w.isEven()?u[1]:u[-1];if(w.sign)return u[0];if(!w.isSmall)throw new Error("The exponent "+w.toString()+" is too large.");if(this.isSmall&&_(O=Math.pow(x,k)))return new h(I(O));for(S=this,W=u[1];k&!0&&(W=W.times(S),--k),k!==0;)k/=2,S=S.square();return W},h.prototype.pow=f.prototype.pow,y.prototype.pow=function(m){var w=J(m),x=this.value,k=w.value,O=BigInt(0),S=BigInt(1),W=BigInt(2);if(k===O)return u[1];if(x===O)return u[0];if(x===S)return u[1];if(x===BigInt(-1))return w.isEven()?u[1]:u[-1];if(w.isNegative())return new y(O);for(var q=this,ne=u[1];(k&S)===S&&(ne=ne.times(q),--k),k!==O;)k/=W,q=q.square();return ne},f.prototype.modPow=function(m,w){if(m=J(m),w=J(w),w.isZero())throw new Error("Cannot take modPow with modulus 0");var x=u[1],k=this.mod(w);for(m.isNegative()&&(m=m.multiply(u[-1]),k=k.modInv(w));m.isPositive();){if(k.isZero())return u[0];m.isOdd()&&(x=x.multiply(k).mod(w)),m=m.divide(2),k=k.square().mod(w)}return x},y.prototype.modPow=h.prototype.modPow=f.prototype.modPow;function Ee(m,w){if(m.length!==w.length)return m.length>w.length?1:-1;for(var x=m.length-1;x>=0;x--)if(m[x]!==w[x])return m[x]>w[x]?1:-1;return 0}f.prototype.compareAbs=function(m){var w=J(m),x=this.value,k=w.value;return w.isSmall?1:Ee(x,k)},h.prototype.compareAbs=function(m){var w=J(m),x=Math.abs(this.value),k=w.value;return w.isSmall?(k=Math.abs(k),x===k?0:x>k?1:-1):-1},y.prototype.compareAbs=function(m){var w=this.value,x=J(m).value;return w=w>=0?w:-w,x=x>=0?x:-x,w===x?0:w>x?1:-1},f.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=J(m),x=this.value,k=w.value;return this.sign!==w.sign?w.sign?1:-1:w.isSmall?this.sign?-1:1:Ee(x,k)*(this.sign?-1:1)},f.prototype.compareTo=f.prototype.compare,h.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=J(m),x=this.value,k=w.value;return w.isSmall?x==k?0:x>k?1:-1:x<0!==w.sign?x<0?-1:1:x<0?1:-1},h.prototype.compareTo=h.prototype.compare,y.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=this.value,x=J(m).value;return w===x?0:w>x?1:-1},y.prototype.compareTo=y.prototype.compare,f.prototype.equals=function(m){return this.compare(m)===0},y.prototype.eq=y.prototype.equals=h.prototype.eq=h.prototype.equals=f.prototype.eq=f.prototype.equals,f.prototype.notEquals=function(m){return this.compare(m)!==0},y.prototype.neq=y.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=f.prototype.neq=f.prototype.notEquals,f.prototype.greater=function(m){return this.compare(m)>0},y.prototype.gt=y.prototype.greater=h.prototype.gt=h.prototype.greater=f.prototype.gt=f.prototype.greater,f.prototype.lesser=function(m){return this.compare(m)<0},y.prototype.lt=y.prototype.lesser=h.prototype.lt=h.prototype.lesser=f.prototype.lt=f.prototype.lesser,f.prototype.greaterOrEquals=function(m){return this.compare(m)>=0},y.prototype.geq=y.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=f.prototype.geq=f.prototype.greaterOrEquals,f.prototype.lesserOrEquals=function(m){return this.compare(m)<=0},y.prototype.leq=y.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals=f.prototype.leq=f.prototype.lesserOrEquals,f.prototype.isEven=function(){return(this.value[0]&1)===0},h.prototype.isEven=function(){return(this.value&1)===0},y.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},f.prototype.isOdd=function(){return(this.value[0]&1)===1},h.prototype.isOdd=function(){return(this.value&1)===1},y.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},f.prototype.isPositive=function(){return!this.sign},h.prototype.isPositive=function(){return this.value>0},y.prototype.isPositive=h.prototype.isPositive,f.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},y.prototype.isNegative=h.prototype.isNegative,f.prototype.isUnit=function(){return!1},h.prototype.isUnit=function(){return Math.abs(this.value)===1},y.prototype.isUnit=function(){return this.abs().value===BigInt(1)},f.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return this.value===0},y.prototype.isZero=function(){return this.value===BigInt(0)},f.prototype.isDivisibleBy=function(m){var w=J(m);return w.isZero()?!1:w.isUnit()?!0:w.compareAbs(2)===0?this.isEven():this.mod(w).isZero()},y.prototype.isDivisibleBy=h.prototype.isDivisibleBy=f.prototype.isDivisibleBy;function Oe(m){var w=m.abs();if(w.isUnit())return!1;if(w.equals(2)||w.equals(3)||w.equals(5))return!0;if(w.isEven()||w.isDivisibleBy(3)||w.isDivisibleBy(5))return!1;if(w.lesser(49))return!0}function ce(m,w){for(var x=m.prev(),k=x,O=0,S,W,q;k.isEven();)k=k.divide(2),O++;e:for(W=0;W<w.length;W++)if(!m.lesser(w[W])&&(q=t(w[W]).modPow(k,m),!(q.isUnit()||q.equals(x)))){for(S=O-1;S!=0;S--){if(q=q.square().mod(m),q.isUnit())return!1;if(q.equals(x))continue e}return!1}return!0}f.prototype.isPrime=function(m){var w=Oe(this);if(w!==n)return w;var x=this.abs(),k=x.bitLength();if(k<=64)return ce(x,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var O=Math.log(2)*k.toJSNumber(),S=Math.ceil(m===!0?2*Math.pow(O,2):O),W=[],q=0;q<S;q++)W.push(t(q+2));return ce(x,W)},y.prototype.isPrime=h.prototype.isPrime=f.prototype.isPrime,f.prototype.isProbablePrime=function(m,w){var x=Oe(this);if(x!==n)return x;for(var k=this.abs(),O=m===n?5:m,S=[],W=0;W<O;W++)S.push(t.randBetween(2,k.minus(2),w));return ce(k,S)},y.prototype.isProbablePrime=h.prototype.isProbablePrime=f.prototype.isProbablePrime,f.prototype.modInv=function(m){for(var w=t.zero,x=t.one,k=J(m),O=this.abs(),S,W,q;!O.isZero();)S=k.divide(O),W=w,q=k,w=x,k=O,x=W.subtract(S.multiply(x)),O=q.subtract(S.multiply(O));if(!k.isUnit())throw new Error(this.toString()+" and "+m.toString()+" are not co-prime");return w.compare(0)===-1&&(w=w.add(m)),this.isNegative()?w.negate():w},y.prototype.modInv=h.prototype.modInv=f.prototype.modInv,f.prototype.next=function(){var m=this.value;return this.sign?le(m,1,this.sign):new f(oe(m,1),this.sign)},h.prototype.next=function(){var m=this.value;return m+1<o?new h(m+1):new f(r,!1)},y.prototype.next=function(){return new y(this.value+BigInt(1))},f.prototype.prev=function(){var m=this.value;return this.sign?new f(oe(m,1),!0):le(m,1,this.sign)},h.prototype.prev=function(){var m=this.value;return m-1>-o?new h(m-1):new f(r,!0)},y.prototype.prev=function(){return new y(this.value-BigInt(1))};for(var pe=[1];2*pe[pe.length-1]<=s;)pe.push(2*pe[pe.length-1]);var je=pe.length,tt=pe[je-1];function ke(m){return Math.abs(m)<=s}f.prototype.shiftLeft=function(m){var w=J(m).toJSNumber();if(!ke(w))throw new Error(String(w)+" is too large for shifting.");if(w<0)return this.shiftRight(-w);var x=this;if(x.isZero())return x;for(;w>=je;)x=x.multiply(tt),w-=je-1;return x.multiply(pe[w])},y.prototype.shiftLeft=h.prototype.shiftLeft=f.prototype.shiftLeft,f.prototype.shiftRight=function(m){var w,x=J(m).toJSNumber();if(!ke(x))throw new Error(String(x)+" is too large for shifting.");if(x<0)return this.shiftLeft(-x);for(var k=this;x>=je;){if(k.isZero()||k.isNegative()&&k.isUnit())return k;w=ye(k,tt),k=w[1].isNegative()?w[0].prev():w[0],x-=je-1}return w=ye(k,pe[x]),w[1].isNegative()?w[0].prev():w[0]},y.prototype.shiftRight=h.prototype.shiftRight=f.prototype.shiftRight;function ft(m,w,x){w=J(w);for(var k=m.isNegative(),O=w.isNegative(),S=k?m.not():m,W=O?w.not():w,q=0,ne=0,xe=null,De=null,Ie=[];!S.isZero()||!W.isZero();)xe=ye(S,tt),q=xe[1].toJSNumber(),k&&(q=tt-1-q),De=ye(W,tt),ne=De[1].toJSNumber(),O&&(ne=tt-1-ne),S=xe[0],W=De[0],Ie.push(x(q,ne));for(var Ge=x(k?1:0,O?1:0)!==0?t(-1):t(0),Dt=Ie.length-1;Dt>=0;Dt-=1)Ge=Ge.multiply(tt).add(t(Ie[Dt]));return Ge}f.prototype.not=function(){return this.negate().prev()},y.prototype.not=h.prototype.not=f.prototype.not,f.prototype.and=function(m){return ft(this,m,function(w,x){return w&x})},y.prototype.and=h.prototype.and=f.prototype.and,f.prototype.or=function(m){return ft(this,m,function(w,x){return w|x})},y.prototype.or=h.prototype.or=f.prototype.or,f.prototype.xor=function(m){return ft(this,m,function(w,x){return w^x})},y.prototype.xor=h.prototype.xor=f.prototype.xor;var it=1<<30,ot=(s&-s)*(s&-s)|it;function yt(m){var w=m.value,x=typeof w=="number"?w|it:typeof w=="bigint"?w|BigInt(it):w[0]+w[1]*s|ot;return x&-x}function ls(m,w){if(w.compareTo(m)<=0){var x=ls(m,w.square(w)),k=x.p,O=x.e,S=k.multiply(w);return S.compareTo(m)<=0?{p:S,e:O*2+1}:{p:k,e:O*2}}return{p:t(1),e:0}}f.prototype.bitLength=function(){var m=this;return m.compareTo(t(0))<0&&(m=m.negate().subtract(t(1))),m.compareTo(t(0))===0?t(0):t(ls(m,t(2)).e).add(t(1))},y.prototype.bitLength=h.prototype.bitLength=f.prototype.bitLength;function C(m,w){return m=J(m),w=J(w),m.greater(w)?m:w}function A(m,w){return m=J(m),w=J(w),m.lesser(w)?m:w}function F(m,w){if(m=J(m).abs(),w=J(w).abs(),m.equals(w))return m;if(m.isZero())return w;if(w.isZero())return m;for(var x=u[1],k,O;m.isEven()&&w.isEven();)k=A(yt(m),yt(w)),m=m.divide(k),w=w.divide(k),x=x.multiply(k);for(;m.isEven();)m=m.divide(yt(m));do{for(;w.isEven();)w=w.divide(yt(w));m.greater(w)&&(O=w,w=m,m=O),w=w.subtract(m)}while(!w.isZero());return x.isUnit()?m:m.multiply(x)}function ee(m,w){return m=J(m).abs(),w=J(w).abs(),m.divide(F(m,w)).multiply(w)}function R(m,w,x){m=J(m),w=J(w);var k=x||Math.random,O=A(m,w),S=C(m,w),W=S.subtract(O).add(1);if(W.isSmall)return O.add(Math.floor(k()*W));for(var q=te(W,s).value,ne=[],xe=!0,De=0;De<q.length;De++){var Ie=xe?q[De]+(De+1<q.length?q[De+1]/s:0):s,Ge=I(k()*Ie);ne.push(Ge),Ge<q[De]&&(xe=!1)}return O.add(u.fromArray(ne,s,!1))}var re=function(m,w,x,k){x=x||a,m=String(m),k||(m=m.toLowerCase(),x=x.toLowerCase());var O=m.length,S,W=Math.abs(w),q={};for(S=0;S<x.length;S++)q[x[S]]=S;for(S=0;S<O;S++){var ne=m[S];if(ne!=="-"&&ne in q&&q[ne]>=W){if(ne==="1"&&W===1)continue;throw new Error(ne+" is not a valid digit in base "+w+".")}}w=J(w);var xe=[],De=m[0]==="-";for(S=De?1:0;S<m.length;S++){var ne=m[S];if(ne in q)xe.push(J(q[ne]));else if(ne==="<"){var Ie=S;do S++;while(m[S]!==">"&&S<m.length);xe.push(J(m.slice(Ie+1,S)))}else throw new Error(ne+" is not a valid character")}return he(xe,w,De)};function he(m,w,x){var k=u[0],O=u[1],S;for(S=m.length-1;S>=0;S--)k=k.add(m[S].times(O)),O=O.times(w);return x?k.negate():k}function ae(m,w){return w=w||a,m<w.length?w[m]:"<"+m+">"}function te(m,w){if(w=t(w),w.isZero()){if(m.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(w.equals(-1)){if(m.isZero())return{value:[0],isNegative:!1};if(m.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-m.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var x=Array.apply(null,Array(m.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return x.unshift([1]),{value:[].concat.apply([],x),isNegative:!1}}var k=!1;if(m.isNegative()&&w.isPositive()&&(k=!0,m=m.abs()),w.isUnit())return m.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(m.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:k};for(var O=[],S=m,W;S.isNegative()||S.compareAbs(w)>=0;){W=S.divmod(w),S=W.quotient;var q=W.remainder;q.isNegative()&&(q=w.minus(q).abs(),S=S.next()),O.push(q.toJSNumber())}return O.push(S.toJSNumber()),{value:O.reverse(),isNegative:k}}function Y(m,w,x){var k=te(m,w);return(k.isNegative?"-":"")+k.value.map(function(O){return ae(O,x)}).join("")}f.prototype.toArray=function(m){return te(this,m)},h.prototype.toArray=function(m){return te(this,m)},y.prototype.toArray=function(m){return te(this,m)},f.prototype.toString=function(m,w){if(m===n&&(m=10),m!==10)return Y(this,m,w);for(var x=this.value,k=x.length,O=String(x[--k]),S="0000000",W;--k>=0;)W=String(x[k]),O+=S.slice(W.length)+W;var q=this.sign?"-":"";return q+O},h.prototype.toString=function(m,w){return m===n&&(m=10),m!=10?Y(this,m,w):String(this.value)},y.prototype.toString=h.prototype.toString,y.prototype.toJSON=f.prototype.toJSON=h.prototype.toJSON=function(){return this.toString()},f.prototype.valueOf=function(){return parseInt(this.toString(),10)},f.prototype.toJSNumber=f.prototype.valueOf,h.prototype.valueOf=function(){return this.value},h.prototype.toJSNumber=h.prototype.valueOf,y.prototype.valueOf=y.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function $e(m){if(_(+m)){var w=+m;if(w===I(w))return l?new y(BigInt(w)):new h(w);throw new Error("Invalid integer: "+m)}var x=m[0]==="-";x&&(m=m.slice(1));var k=m.split(/e/i);if(k.length>2)throw new Error("Invalid integer: "+k.join("e"));if(k.length===2){var O=k[1];if(O[0]==="+"&&(O=O.slice(1)),O=+O,O!==I(O)||!_(O))throw new Error("Invalid integer: "+O+" is not a valid exponent.");var S=k[0],W=S.indexOf(".");if(W>=0&&(O-=S.length-W-1,S=S.slice(0,W)+S.slice(W+1)),O<0)throw new Error("Cannot include negative exponent part for integers");S+=new Array(O+1).join("0"),m=S}var q=/^([0-9][0-9]*)$/.test(m);if(!q)throw new Error("Invalid integer: "+m);if(l)return new y(BigInt(x?"-"+m:m));for(var ne=[],xe=m.length,De=i,Ie=xe-De;xe>0;)ne.push(+m.slice(Ie,xe)),Ie-=De,Ie<0&&(Ie=0),xe-=De;return T(ne),new f(ne,x)}function we(m){if(l)return new y(BigInt(m));if(_(m)){if(m!==I(m))throw new Error(m+" is not an integer.");return new h(m)}return $e(m.toString())}function J(m){return typeof m=="number"?we(m):typeof m=="string"?$e(m):typeof m=="bigint"?new y(m):m}for(var Ae=0;Ae<1e3;Ae++)u[Ae]=J(Ae),Ae>0&&(u[-Ae]=J(-Ae));return u.one=u[1],u.zero=u[0],u.minusOne=u[-1],u.max=C,u.min=A,u.gcd=F,u.lcm=ee,u.isInstance=function(m){return m instanceof f||m instanceof h||m instanceof y},u.randBetween=R,u.fromArray=function(m,w,x){return he(m.map(J),J(w||10),x)},u}();e.hasOwnProperty("exports")&&(e.exports=t)})(vu);const ko=vu.exports;class ey{constructor(){be(this,"n");be(this,"e");this.n=ko("8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683",16),this.e=ko("10001",16)}a2hex(t){let n="",s;for(let i=0;i<t.length;i++)s=t[i].toString(16),s.length<2&&(s="0"+s),n+=s;return n}hex2a(t){let n="";for(let s=0;s<t.length;s+=2)n+=String.fromCharCode(parseInt(t.substr(s,2),16));return n}pkcs1pad2(t,n){if(n<t.length+11)return null;let s=[],i=t.length-1;for(;i>=0&&n>0;)s[--n]=t.charCodeAt(i--);for(s[--n]=0;n>2;)s[--n]=255;s[--n]=2,s[--n]=0;let o=this.a2hex(s);return ko(o,16)}pkcs1unpad2(t){let n=t.toString(16);n.length%2!==0&&(n="0"+n);let s=this.hex2a(n),i=1;for(;s.charCodeAt(i)!==0;)i++;return s.slice(i+1)}encrypt(t){let n=this.pkcs1pad2(t,128),s=n==null?void 0:n.modPow(this.e,this.n),i=(s==null?void 0:s.toString(16))||"";for(;i.length<128*2;)i="0"+i;return i}decrypt(t){const n=[];let s=0;for(;s<t.length;)n[s]=t.charCodeAt(s),s+=1;const o=ko(this.a2hex(n),16).modPow(this.e,this.n);return this.pkcs1unpad2(o)}}class ty{constructor(){be(this,"rsa");be(this,"kts");be(this,"keyS");be(this,"keyL");this.rsa=new ey,this.kts=[240,229,105,174,191,220,191,138,26,69,232,190,125,166,115,184,222,143,231,196,69,218,134,196,155,100,139,20,106,180,241,170,56,1,53,158,38,105,44,134,0,107,79,165,54,52,98,166,42,150,104,24,242,74,253,189,107,151,143,77,143,137,19,183,108,142,147,237,14,13,72,62,215,47,136,216,254,254,126,134,80,149,79,209,235,131,38,52,219,102,123,156,126,157,122,129,50,234,182,51,222,58,169,89,52,102,59,170,186,129,96,72,185,213,129,156,248,108,132,119,255,84,120,38,95,190,232,30,54,159,52,128,92,69,44,155,118,213,27,143,204,195,184,245],this.keyS=[41,35,33,94],this.keyL=[120,6,173,76,51,134,93,24,76,1,63,70]}xor115Enc(t,n,s,i){let o,r,a,l,u,f,h,y;if(l=n%4,y=[],l!==0)for(o=r=0,u=l;u>=0?r<u:r>u;o=u>=0?++r:--r)y.push(t[o]^s[o%i]);for(o=a=f=l,h=n;f<=h?a<h:a>h;o=f<=h?++a:--a)y.push(t[o]^s[(o-l)%i]);return y}getkey(t,n){let s;return n!=null?(()=>{let i,o,r;for(r=[],s=i=0,o=t;o>=0?i<o:i>o;s=o>=0?++i:--i)r.push(n[s]+this.kts[t*s]&255^this.kts[t*(t-1-s)]);return r})():t===12?this.keyL.slice(0):this.keyS.slice(0)}asymEncode(t,n){let s,i,o,r,a;for(o=128-11,a="",s=i=0,r=Math.floor((n+o-1)/o);r>=0?i<r:i>r;s=r>=0?++i:--i)a+=this.rsa.encrypt(this.bytesToString(t.slice(s*o,Math.min((s+1)*o,n))));return window.btoa(this.rsa.hex2a(a))}asymDecode(t,n){let s,i,o,r,a;for(o=128,a="",s=i=0,r=Math.floor((n+o-1)/o);r>=0?i<r:i>r;s=r>=0?++i:--i)a+=this.rsa.decrypt(this.bytesToString(t.slice(s*o,Math.min((s+1)*o,n))));return this.stringToBytes(a)}symEncode(t,n,s,i){let o,r,a;return o=this.getkey(4,s),r=this.getkey(12,i),a=this.xor115Enc(t,n,o,4),a.reverse(),a=this.xor115Enc(a,n,r,12),a}symDecode(t,n,s,i){let o,r,a;return o=this.getkey(4,s),r=this.getkey(12,i),a=this.xor115Enc(t,n,r,12),a.reverse(),a=this.xor115Enc(a,n,o,4),a}bytesToString(t){let n,s,i,o;for(o="",s=0,i=t.length;s<i;s++)n=t[s],o+=String.fromCharCode(n);return o}stringToBytes(t){let n,s,i;for(i=[],n=0,s=t.length;n<s;n++)i.push(t.charCodeAt(n));return i}encode(t,n){const s=this.stringToBytes(ut.hashStr(`!@###@#${n}DFDR@#@#`));let i=this.stringToBytes(t);return i=this.symEncode(i,i.length,s,null),i=s.slice(0,16).concat(i),{data:this.asymEncode(i,i.length),key:s}}decode(t,n){let s=this.stringToBytes(window.atob(t));return s=this.asymDecode(s,s.length),this.bytesToString(this.symDecode(s.slice(16),s.length-16,n,s.slice(0,16)))}}const ny=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var sy=e=>!ny.has(e&&e.code);const va="axios-retry";function xu(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:sy(e)}const Cu=["get","head","options"],iy=Cu.concat(["put","delete"]);function xa(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function oy(e){var t;return(t=e.config)!=null&&t.method?xa(e)&&Cu.indexOf(e.config.method)!==-1:!1}function $u(e){var t;return(t=e.config)!=null&&t.method?xa(e)&&iy.indexOf(e.config.method)!==-1:!1}function Eu(e){return xu(e)||$u(e)}function ku(e=void 0){var s;const t=(s=e==null?void 0:e.response)==null?void 0:s.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function ry(e=0,t=void 0){return Math.max(0,ku(t))}function ay(e=0,t=void 0,n=100){const s=2**e*n,i=Math.max(s,ku(t)),o=i*.2*Math.random();return i+o}const ly={retries:3,retryCondition:Eu,retryDelay:ry,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function cy(e,t){return{...ly,...t,...e[va]}}function Su(e,t){const n=cy(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),e[va]=n,n}function uy(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function dy(e,t){const{retries:n,retryCondition:s}=e,i=(e.retryCount||0)<n&&s(t);if(typeof i=="object")try{return await i!==!1}catch{return!1}return i}async function fy(e,t,n,s){var l;t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:o,onRetry:r}=t,a=i(t.retryCount,n);if(uy(e,s),!o&&s.timeout&&t.lastRequestTime){const u=Date.now()-t.lastRequestTime,f=s.timeout-u-a;if(f<=0)return Promise.reject(n);s.timeout=f}return s.transformRequest=[u=>u],await r(t.retryCount,n,s),(l=s.signal)!=null&&l.aborted?Promise.resolve(e(s)):new Promise(u=>{var y;const f=()=>{clearTimeout(h),u(e(s))},h=setTimeout(()=>{var _;u(e(s)),(_=s.signal)!=null&&_.removeEventListener&&s.signal.removeEventListener("abort",f)},a);(y=s.signal)!=null&&y.addEventListener&&s.signal.addEventListener("abort",f,{once:!0})})}async function py(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const hs=(e,t)=>{const n=e.interceptors.request.use(i=>{var o;return Su(i,t),(o=i[va])!=null&&o.validateResponse&&(i.validateStatus=()=>!1),i}),s=e.interceptors.response.use(null,async i=>{var a;const{config:o}=i;if(!o)return Promise.reject(i);const r=Su(o,t);return i.response&&((a=r.validateResponse)==null?void 0:a.call(r,i.response))?i.response:await dy(r,i)?fy(e,r,i,o):(await py(r,i),Promise.reject(i))});return{requestInterceptorId:n,responseInterceptorId:s}};hs.isNetworkError=xu,hs.isSafeRequestError=oy,hs.isIdempotentRequestError=$u,hs.isNetworkOrIdempotentRequestError=Eu,hs.exponentialDelay=ay,hs.isRetryableError=xa;var So=class{constructor(t={}){this.points=t.points,this.duration=t.duration,this.blockDuration=t.blockDuration,this.execEvenly=t.execEvenly,this.execEvenlyMinDelayMs=t.execEvenlyMinDelayMs,this.keyPrefix=t.keyPrefix}get points(){return this._points}set points(t){this._points=t>=0?t:4}get duration(){return this._duration}set duration(t){this._duration=typeof t>"u"?1:t}get msDuration(){return this.duration*1e3}get blockDuration(){return this._blockDuration}set blockDuration(t){this._blockDuration=typeof t>"u"?0:t}get msBlockDuration(){return this.blockDuration*1e3}get execEvenly(){return this._execEvenly}set execEvenly(t){this._execEvenly=typeof t>"u"?!1:Boolean(t)}get execEvenlyMinDelayMs(){return this._execEvenlyMinDelayMs}set execEvenlyMinDelayMs(t){this._execEvenlyMinDelayMs=typeof t>"u"?Math.ceil(this.msDuration/this.points):t}get keyPrefix(){return this._keyPrefix}set keyPrefix(t){if(typeof t>"u"&&(t="rlflx"),typeof t!="string")throw new Error("keyPrefix must be string");this._keyPrefix=t}_getKeySecDuration(t={}){return t&&t.customDuration>=0?t.customDuration:this.duration}getKey(t){return this.keyPrefix.length>0?`${this.keyPrefix}:${t}`:t}parseKey(t){return t.substring(this.keyPrefix.length)}consume(){throw new Error("You have to implement the method 'consume'!")}penalty(){throw new Error("You have to implement the method 'penalty'!")}reward(){throw new Error("You have to implement the method 'reward'!")}get(){throw new Error("You have to implement the method 'get'!")}set(){throw new Error("You have to implement the method 'set'!")}block(){throw new Error("You have to implement the method 'block'!")}delete(){throw new Error("You have to implement the method 'delete'!")}},hy=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const t=Date.now();Object.keys(this._keys).forEach(n=>{this._keys[n]<=t&&delete this._keys[n]}),this._addedKeysAmount=Object.keys(this._keys).length}add(t,n){this.addMs(t,n*1e3)}addMs(t,n){this._keys[t]=Date.now()+n,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(t){const n=this._keys[t];if(n&&n>=Date.now()){this.collectExpired();const s=Date.now();return n>=s?n-s:0}return 0}delete(t){t?delete this._keys[t]:Object.keys(this._keys).forEach(n=>{delete this._keys[n]})}},my=hy,Ft=class{constructor(t,n,s,i){this.remainingPoints=typeof t>"u"?0:t,this.msBeforeNext=typeof n>"u"?0:n,this.consumedPoints=typeof s>"u"?0:s,this.isFirstInDuration=typeof i>"u"?!1:i}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(t){return this._msBeforeNext=t,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(t){return this._remainingPoints=t,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(t){return this._consumedPoints=t,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(t){this._isFirstInDuration=Boolean(t)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}};const Ca=So,gy=my,Au=Ft;var ms=class extends Ca{constructor(t={}){super(t),this.inMemoryBlockOnConsumed=t.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=t.inMemoryBlockDuration,this.insuranceLimiter=t.insuranceLimiter,this._inMemoryBlockedKeys=new gy}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("storeClient is not set");this._client=t}_afterConsume(t,n,s,i,o,r={}){const a=this._getRateLimiterRes(s,i,o);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&a.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(s,a.msBeforeNext),a.consumedPoints>this.points?n(a):t(a);if(a.consumedPoints>this.points){let l=Promise.resolve();this.blockDuration>0&&a.consumedPoints<=this.points+i&&(a.msBeforeNext=this.msBlockDuration,l=this._block(s,a.consumedPoints,this.msBlockDuration,r)),this.inMemoryBlockOnConsumed>0&&a.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(s,this.inMemoryBlockDuration),a.msBeforeNext=this.msInMemoryBlockDuration),l.then(()=>{n(a)}).catch(u=>{n(u)})}else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let l=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));l<this.execEvenlyMinDelayMs&&(l=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(t,l,a)}else t(a)}_handleError(t,n,s,i,o,r=!1,a={}){this.insuranceLimiter instanceof Ca?this.insuranceLimiter[n](o,r,a).then(l=>{s(l)}).catch(l=>{i(l)}):i(t)}getInMemoryBlockMsBeforeExpire(t){return this.inMemoryBlockOnConsumed>0?this._inMemoryBlockedKeys.msBeforeExpire(t):0}get inMemoryBlockOnConsumed(){return this._inMemoryBlockOnConsumed}set inMemoryBlockOnConsumed(t){if(this._inMemoryBlockOnConsumed=t?parseInt(t):0,this.inMemoryBlockOnConsumed>0&&this.points>this.inMemoryBlockOnConsumed)throw new Error('inMemoryBlockOnConsumed option must be greater or equal "points" option')}get inMemoryBlockDuration(){return this._inMemoryBlockDuration}set inMemoryBlockDuration(t){if(this._inMemoryBlockDuration=t?parseInt(t):0,this.inMemoryBlockDuration>0&&this.inMemoryBlockOnConsumed===0)throw new Error("inMemoryBlockOnConsumed option must be set up")}get msInMemoryBlockDuration(){return this._inMemoryBlockDuration*1e3}get insuranceLimiter(){return this._insuranceLimiter}set insuranceLimiter(t){if(typeof t<"u"&&!(t instanceof Ca))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=t,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(t,n,s={}){const i=n*1e3;return this._block(this.getKey(t),this.points+1,i,s)}set(t,n,s,i={}){const o=(s>=0?s:this.duration)*1e3;return this._block(this.getKey(t),n,o,i)}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=this.getKey(t),a=this.getInMemoryBlockMsBeforeExpire(r);if(a>0)return o(new Au(0,a));this._upsert(r,n,this._getKeySecDuration(s)*1e3,!1,s).then(l=>{this._afterConsume(i,o,r,n,l)}).catch(l=>{this._handleError(l,"consume",i,o,t,n,s)})})}penalty(t,n=1,s={}){const i=this.getKey(t);return new Promise((o,r)=>{this._upsert(i,n,this._getKeySecDuration(s)*1e3,!1,s).then(a=>{o(this._getRateLimiterRes(i,n,a))}).catch(a=>{this._handleError(a,"penalty",o,r,t,n,s)})})}reward(t,n=1,s={}){const i=this.getKey(t);return new Promise((o,r)=>{this._upsert(i,-n,this._getKeySecDuration(s)*1e3,!1,s).then(a=>{o(this._getRateLimiterRes(i,-n,a))}).catch(a=>{this._handleError(a,"reward",o,r,t,n,s)})})}get(t,n={}){const s=this.getKey(t);return new Promise((i,o)=>{this._get(s,n).then(r=>{i(r===null||typeof r>"u"?null:this._getRateLimiterRes(s,0,r))}).catch(r=>{this._handleError(r,"get",i,o,t,n)})})}delete(t,n={}){const s=this.getKey(t);return new Promise((i,o)=>{this._delete(s,n).then(r=>{this._inMemoryBlockedKeys.delete(s),i(r)}).catch(r=>{this._handleError(r,"delete",i,o,t,n)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(t,n,s){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(t,n,s,i={}){return new Promise((o,r)=>{this._upsert(t,n,s,!0,i).then(()=>{o(new Au(0,s>0?s:-1,n))}).catch(a=>{this._handleError(a,"block",o,r,this.parseKey(t),s/1e3,i)})})}_get(t,n={}){throw new Error("You have to implement the method '_get'!")}_delete(t,n={}){throw new Error("You have to implement the method '_delete'!")}_upsert(t,n,s,i=!1,o={}){throw new Error("You have to implement the method '_upsert'!")}};const yy=ms,wy=Ft,by="redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then   redis.call('expire', KEYS[1], ARGV[2])   ttl = 1000 * ARGV[2] end return {consumed, ttl} ";class _y extends yy{constructor(t){super(t),this.client=t.storeClient,this._rejectIfRedisNotReady=!!t.rejectIfRedisNotReady,this._incrTtlLuaScript=t.customIncrTtlLuaScript||by,this.useRedisPackage=t.useRedisPackage||this.client.constructor.name==="Commander"||!1,this.useRedis3AndLowerPackage=t.useRedis3AndLowerPackage,typeof this.client.defineCommand=="function"&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isRedisReady(){return this._rejectIfRedisNotReady?!(this.client.status&&this.client.status!=="ready"||typeof this.client.isReady=="function"&&!this.client.isReady()):!0}_getRateLimiterRes(t,n,s){let[i,o]=s;Array.isArray(i)&&([,i]=i,[,o]=o);const r=new wy;return r.consumedPoints=parseInt(i),r.isFirstInDuration=r.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o,r}async _upsert(t,n,s,i=!1){if(!this._isRedisReady())throw new Error("Redis connection is not ready");const o=Math.floor(s/1e3),r=this.client.multi();return i?(o>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.set(t,n,"EX",o):r.set(t,n,{EX:o}):r.set(t,n),!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.pttl(t).exec(!0):r.pTTL(t).exec(!0)):o>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.rlflxIncr([t].concat([String(n),String(o),String(this.points),String(this.duration)])):this.useRedis3AndLowerPackage?new Promise((a,l)=>{const u=function(f,h){return f?l(f):a(h)};typeof this.client.rlflxIncr=="function"?this.client.rlflxIncr(t,n,o,this.points,this.duration,u):this.client.eval(this._incrTtlLuaScript,1,t,n,o,this.points,this.duration,u)}):this.client.eval(this._incrTtlLuaScript,{keys:[t],arguments:[String(n),String(o),String(this.points),String(this.duration)]}):!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.incrby(t,n).pttl(t).exec(!0):r.incrBy(t,n).pTTL(t).exec(!0)}async _get(t){if(!this._isRedisReady())throw new Error("Redis connection is not ready");return!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.multi().get(t).pttl(t).exec().then(n=>{const[[,s]]=n;return s===null?null:n}):this.client.multi().get(t).pTTL(t).exec(!0).then(n=>{const[s]=n;return s===null?null:n})}_delete(t){return this.client.del(t).then(n=>n>0)}}var vy=_y;const xy=ms,Cy=Ft;function Pu(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(typeof t.topology>"u"){const{version:s}=t.options.metadata.driver;n=s.split("|",1)[0].split(".").map(i=>parseInt(i))}else{const{version:s}=t.topology.s.options.metadata.driver;n=s.split(".").map(i=>parseInt(i))}return{major:n[0],feature:n[1],patch:n[2]}}catch{return{major:0,feature:0,patch:0}}}class $a extends xy{constructor(t){super(t),this.dbName=t.dbName,this.tableName=t.tableName,this.indexKeyPrefix=t.indexKeyPrefix,t.mongo?this.client=t.mongo:this.client=t.storeClient,typeof this.client.then=="function"?this.client.then(n=>{this.client=n,this._initCollection(),this._driverVersion=Pu(this.client)}):(this._initCollection(),this._driverVersion=Pu(this.client))}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?$a.getDbName():t}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("mongo is not set");this._client=t}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(t){this._indexKeyPrefix=t||{}}_initCollection(){const n=(typeof this.client.db=="function"?this.client.db(this.dbName):this.client).collection(this.tableName);n.createIndex({expire:-1},{expireAfterSeconds:0}),n.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=n}_getRateLimiterRes(t,n,s){const i=new Cy;let o;return typeof s.value>"u"?o=s:o=s.value,i.isFirstInDuration=o.points===n,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!==null?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,s,i=!1,o={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=o.attrs||{};let a,l;i?(a={key:t},a=Object.assign(a,r),l={$set:{key:t,points:n,expire:s>0?new Date(Date.now()+s):null}},l.$set=Object.assign(l.$set,r)):(a={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:t},a=Object.assign(a,r),l={$setOnInsert:{key:t,expire:s>0?new Date(Date.now()+s):null},$inc:{points:n}},l.$setOnInsert=Object.assign(l.$setOnInsert,r));const u={upsert:!0};return this._driverVersion.major>=4||this._driverVersion.major===3&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?u.returnDocument="after":u.returnOriginal=!1,new Promise((f,h)=>{this._collection.findOneAndUpdate(a,l,u).then(y=>{f(y)}).catch(y=>{if(y&&y.code===11e3){const _=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:t},r),b={$set:Object.assign({key:t,points:n,expire:s>0?new Date(Date.now()+s):null},r)};this._collection.findOneAndUpdate(_,b,u).then(E=>{f(E)}).catch(E=>{E&&E.code===11e3?this._upsert(t,n,s,i).then(T=>f(T)).catch(T=>h(T)):h(E)})}else h(y)})})}_get(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const s=n.attrs||{},i=Object.assign({key:t,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},s);return this._collection.findOne(i)}_delete(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const s=n.attrs||{},i=Object.assign({key:t},s);return this._collection.deleteOne(i).then(o=>o.deletedCount>0)}}var $y=$a;const Ey=ms,ky=Ft;class Sy extends Ey{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.dbName=t.dbName,this.tableName=t.tableName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(s=>{if(typeof n=="function")n(s);else throw s})}clearExpired(t){return new Promise(n=>{this._getConnection().then(s=>{s.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,t],()=>{this._releaseConnection(s),n()})}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise((t,n)=>{this.client.getConnection((s,i)=>{if(s)return n(s);t(i)})});case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return t.release();case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);default:return!0}}_createDbAndTable(){return new Promise((t,n)=>{this._getConnection().then(s=>{s.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(s),n(i);s.query(this._getCreateTableStmt(),o=>{if(o)return this._releaseConnection(s),n(o);this._releaseConnection(s),t()})})}).catch(s=>{n(s)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS \`${this.dbName}\`.\`${this.tableName}\` (\`key\` VARCHAR(255) CHARACTER SET utf8 NOT NULL,\`points\` INT(9) NOT NULL default 0,\`expire\` BIGINT UNSIGNED,PRIMARY KEY (\`key\`)) ENGINE = INNODB;`}get clientType(){return this._clientType}set clientType(t){if(typeof t>"u")if(this.client.constructor.name==="Connection")t="connection";else if(this.client.constructor.name==="Pool")t="pool";else if(this.client.constructor.name==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?"rtlmtrflx":t}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,s){const i=new ky,[o]=s;return i.isFirstInDuration=n===o.points,i.consumedPoints=i.isFirstInDuration?n:o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,i}_upsertTransaction(t,n,s,i,o){return new Promise((r,a)=>{t.query("BEGIN",l=>{if(l)return t.rollback(),a(l);const u=Date.now(),f=i>0?u+i:null;let h,y;o?(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = ?, 
            expire = ?;`,y=[this.dbName,this.tableName,n,s,f,s,f]):(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = IF(expire <= ?, ?, points + (?)), 
            expire = IF(expire <= ?, ?, expire);`,y=[this.dbName,this.tableName,n,s,f,u,s,s,u,f]),t.query(h,y,_=>{if(_)return t.rollback(),a(_);t.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,n],(b,E)=>{if(b)return t.rollback(),a(b);t.query("COMMIT",T=>{if(T)return t.rollback(),a(T);r(E)})})})})})}_upsert(t,n,s,i=!1){return this.tableCreated?new Promise((o,r)=>{this._getConnection().then(a=>{this._upsertTransaction(a,t,n,s,i).then(l=>{o(l),this._releaseConnection(a)}).catch(l=>{r(l),this._releaseConnection(a)})}).catch(a=>{r(a)})}):Promise.reject(Error("Table is not created yet"))}_get(t){return this.tableCreated?new Promise((n,s)=>{this._getConnection().then(i=>{i.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,t,Date.now()],(o,r)=>{o?s(o):r.length===0?n(null):n(r),this._releaseConnection(i)})}).catch(i=>{s(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?new Promise((n,s)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,t],(o,r)=>{o?s(o):n(r.affectedRows>0),this._releaseConnection(i)})}).catch(i=>{s(i)})}):Promise.reject(Error("Table is not created yet"))}}var Ay=Sy;const Py=ms,Iy=Ft;class Ty extends Py{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.tableName=t.tableName,this.schemaName=t.schemaName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(s=>{if(typeof n=="function")n(s);else throw s})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(t){return new Promise(n=>{const s={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[t]};this._query(s).then(()=>{n()}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master);default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return!0;case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);case"typeorm":return!0;default:return!0}}_createTable(){return new Promise((t,n)=>{this._query({text:this._getCreateTableStmt()}).then(()=>{t()}).catch(s=>{s.code==="23505"?t():n(s)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS ${this._getTableIdentifier()} (
      key varchar(255) PRIMARY KEY,
      points integer NOT NULL DEFAULT 0,
      expire bigint
    );`}get clientType(){return this._clientType}set clientType(t){const n=this.client.constructor.name;if(typeof t>"u")if(n==="Client")t="client";else if(n==="Pool"||n==="BoundPool")t="pool";else if(n==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get schemaName(){return this._schemaName}set schemaName(t){this._schemaName=t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,s){const i=new Iy,o=s.rows[0];return i.isFirstInDuration=n===o.points,i.consumedPoints=i.isFirstInDuration?n:o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,i}_query(t){const s={name:`${this.tableName.toLowerCase()}:${t.name}`,text:t.text,values:t.values};return new Promise((i,o)=>{this._getConnection().then(r=>{r.query(s).then(a=>{i(a),this._releaseConnection(r)}).catch(a=>{o(a),this._releaseConnection(r)})}).catch(r=>{o(r)})})}_upsert(t,n,s,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const o=s>0?Date.now()+s:null,r=i?" $3 ":` CASE
             WHEN ${this._getTableIdentifier()}.expire <= $4 THEN $3
             ELSE ${this._getTableIdentifier()}.expire
            END `;return this._query({name:i?"rlflx-upsert-force":"rlflx-upsert",text:`
            INSERT INTO ${this._getTableIdentifier()} VALUES ($1, $2, $3)
              ON CONFLICT(key) DO UPDATE SET
                points = CASE
                          WHEN (${this._getTableIdentifier()}.expire <= $4 OR 1=${i?1:0}) THEN $2
                          ELSE ${this._getTableIdentifier()}.points + ($2)
                         END,
                expire = ${r}
            RETURNING points, expire;`,values:[t,n,o,Date.now()]})}_get(t){return this.tableCreated?new Promise((n,s)=>{this._query({name:"rlflx-get",text:`
            SELECT points, expire FROM ${this._getTableIdentifier()} WHERE key = $1 AND (expire > $2 OR expire IS NULL);`,values:[t,Date.now()]}).then(i=>{i.rowCount===0&&(i=null),n(i)}).catch(i=>{s(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?this._query({name:"rlflx-delete",text:`DELETE FROM ${this._getTableIdentifier()} WHERE key = $1`,values:[t]}).then(n=>n.rowCount>0):Promise.reject(Error("Table is not created yet"))}}var Ly=Ty;const Iu=$m(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Oy=class{constructor(t,n,s=null){this.value=t,this.expiresAt=n,this.timeoutId=s}get value(){return this._value}set value(t){this._value=parseInt(t)}get expiresAt(){return this._expiresAt}set expiresAt(t){!(t instanceof Date)&&Number.isInteger(t)&&(t=new Date(t)),this._expiresAt=t}get timeoutId(){return this._timeoutId}set timeoutId(t){this._timeoutId=t}};const Dy=Oy,Ea=Ft;var My=class{constructor(){this._storage={}}incrby(t,n,s){if(this._storage[t]){const i=this._storage[t].expiresAt?this._storage[t].expiresAt.getTime()-new Date().getTime():-1;return!this._storage[t].expiresAt||i>0?(this._storage[t].value=this._storage[t].value+n,new Ea(0,i,this._storage[t].value,!1)):this.set(t,n,s)}return this.set(t,n,s)}set(t,n,s){const i=s*1e3;return this._storage[t]&&this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),this._storage[t]=new Dy(n,i>0?new Date(Date.now()+i):null),i>0&&(this._storage[t].timeoutId=setTimeout(()=>{delete this._storage[t]},i),this._storage[t].timeoutId.unref&&this._storage[t].timeoutId.unref()),new Ea(0,i===0?-1:i,this._storage[t].value,!0)}get(t){if(this._storage[t]){const n=this._storage[t].expiresAt?this._storage[t].expiresAt.getTime()-new Date().getTime():-1;return new Ea(0,n,this._storage[t].value,!1)}return null}delete(t){return this._storage[t]?(this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),delete this._storage[t],!0):!1}};const Ry=So,Ny=My,Tu=Ft;class By extends Ry{constructor(t={}){super(t),this._memoryStorage=new Ny}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=this.getKey(t),a=this._getKeySecDuration(s);let l=this._memoryStorage.incrby(r,n,a);if(l.remainingPoints=Math.max(this.points-l.consumedPoints,0),l.consumedPoints>this.points)this.blockDuration>0&&l.consumedPoints<=this.points+n&&(l=this._memoryStorage.set(r,l.consumedPoints,this.blockDuration)),o(l);else if(this.execEvenly&&l.msBeforeNext>0&&!l.isFirstInDuration){let u=Math.ceil(l.msBeforeNext/(l.remainingPoints+2));u<this.execEvenlyMinDelayMs&&(u=l.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(i,u,l)}else i(l)})}penalty(t,n=1,s={}){const i=this.getKey(t);return new Promise(o=>{const r=this._getKeySecDuration(s),a=this._memoryStorage.incrby(i,n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),o(a)})}reward(t,n=1,s={}){const i=this.getKey(t);return new Promise(o=>{const r=this._getKeySecDuration(s),a=this._memoryStorage.incrby(i,-n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),o(a)})}block(t,n){const s=n*1e3,i=this.points+1;return this._memoryStorage.set(this.getKey(t),i,n),Promise.resolve(new Tu(0,s===0?-1:s,i))}set(t,n,s){const i=(s>=0?s:this.duration)*1e3;return this._memoryStorage.set(this.getKey(t),n,s),Promise.resolve(new Tu(0,i===0?-1:i,n))}get(t){const n=this._memoryStorage.get(this.getKey(t));return n!==null&&(n.remainingPoints=Math.max(this.points-n.consumedPoints,0)),Promise.resolve(n)}delete(t){return Promise.resolve(this._memoryStorage.delete(this.getKey(t)))}}var Lu=By;const Ou=Iu,Fy=Iu,Uy=So,Du=Lu,jy=Ft,Yt="rate_limiter_flexible";let Fs=null;const Mu=function(e,t,n,s){let i;s===null||s===!0||s===!1?i=s:i={remainingPoints:s.remainingPoints,msBeforeNext:s.msBeforeNext,consumedPoints:s.consumedPoints,isFirstInDuration:s.isFirstInDuration},e.send({channel:Yt,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:i})},Ru=function(e){setTimeout(()=>{this._initiated?process.send(e):typeof this._promises[e.promiseId]<"u"&&Ru.call(this,e)},30)},Us=function(e,t,n,s,i){const o={channel:Yt,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:s,opts:i}};this._initiated?process.send(o):Ru.call(this,o)},Nu=function(e,t){if(!t||t.channel!==Yt||typeof this._rateLimiters[t.keyPrefix]>"u")return!1;let n;switch(t.func){case"consume":n=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":n=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":n=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":n=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":n=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":n=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}n&&n.then(s=>{Mu(e,t,"resolve",s)}).catch(s=>{Mu(e,t,"reject",s)})},Hy=function(e){if(!e||e.channel!==Yt||e.keyPrefix!==this.keyPrefix)return!1;if(this._promises[e.promiseId]){clearTimeout(this._promises[e.promiseId].timeoutId);let t;switch(e.data===null||e.data===!0||e.data===!1?t=e.data:t=new jy(e.data.remainingPoints,e.data.msBeforeNext,e.data.consumedPoints,e.data.isFirstInDuration),e.type){case"resolve":this._promises[e.promiseId].resolve(t);break;case"reject":this._promises[e.promiseId].reject(t);break;default:throw new Error(`RateLimiterCluster: no such message type '${e.type}'`)}delete this._promises[e.promiseId]}},qy=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},js=function(e,t){const n=process.hrtime();let s=n[0].toString()+n[1].toString();return typeof this._promises[s]<"u"&&(s+=Fy.randomBytes(12).toString("base64")),this._promises[s]={resolve:e,reject:t,timeoutId:setTimeout(()=>{delete this._promises[s],t(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},s};class zy{constructor(){if(Fs)return Fs;this._rateLimiters={},Ou.setMaxListeners(0),Ou.on("message",(t,n)=>{n&&n.channel===Yt&&n.type==="init"?(typeof this._rateLimiters[n.opts.keyPrefix]>"u"&&(this._rateLimiters[n.opts.keyPrefix]=new Du(n.opts)),t.send({channel:Yt,type:"init",keyPrefix:n.opts.keyPrefix})):Nu.call(this,t,n)}),Fs=this}}class Vy{constructor(t){if(Fs)return Fs;this._rateLimiters={},t.launchBus((n,s)=>{s.on("process:msg",i=>{const o=i.raw;if(o&&o.channel===Yt&&o.type==="init")typeof this._rateLimiters[o.opts.keyPrefix]>"u"&&(this._rateLimiters[o.opts.keyPrefix]=new Du(o.opts)),t.sendDataToProcessId(i.process.pm_id,{data:{},topic:Yt,channel:Yt,type:"init",keyPrefix:o.opts.keyPrefix},(r,a)=>{r&&console.log(r,a)});else{const r={send:a=>{const l=a;l.topic=Yt,typeof l.data>"u"&&(l.data={}),t.sendDataToProcessId(i.process.pm_id,l,(u,f)=>{u&&console.log(u,f)})}};Nu.call(this,r,o)}})}),Fs=this}}class Wy extends Uy{get timeoutMs(){return this._timeoutMs}set timeoutMs(t){this._timeoutMs=typeof t>"u"?5e3:Math.abs(parseInt(t))}constructor(t={}){super(t),process.setMaxListeners(0),this.timeoutMs=t.timeoutMs,this._initiated=!1,process.on("message",n=>{n&&n.channel===Yt&&n.type==="init"&&n.keyPrefix===this.keyPrefix?this._initiated=!0:Hy.call(this,n)}),process.send({channel:Yt,type:"init",opts:qy.call(this)}),this._promises={}}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=js.call(this,i,o);Us.call(this,"consume",r,t,n,s)})}penalty(t,n=1,s={}){return new Promise((i,o)=>{const r=js.call(this,i,o);Us.call(this,"penalty",r,t,n,s)})}reward(t,n=1,s={}){return new Promise((i,o)=>{const r=js.call(this,i,o);Us.call(this,"reward",r,t,n,s)})}block(t,n,s={}){return new Promise((i,o)=>{const r=js.call(this,i,o);Us.call(this,"block",r,t,n,s)})}get(t,n={}){return new Promise((s,i)=>{const o=js.call(this,s,i);Us.call(this,"get",o,t,n)})}delete(t,n={}){return new Promise((s,i)=>{const o=js.call(this,s,i);Us.call(this,"delete",o,t,n)})}}var Ky={RateLimiterClusterMaster:zy,RateLimiterClusterMasterPM2:Vy,RateLimiterCluster:Wy};const Gy=ms,Yy=Ft;class Jy extends Gy{constructor(t){super(t),this.client=t.storeClient}_getRateLimiterRes(t,n,s){const i=new Yy;return i.consumedPoints=parseInt(s.consumedPoints),i.isFirstInDuration=s.consumedPoints===n,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.msBeforeNext,i}_upsert(t,n,s,i=!1,o={}){return new Promise((r,a)=>{const l=Date.now(),u=Math.floor(s/1e3);i?this.client.set(t,n,u,f=>{f?a(f):this.client.set(`${t}_expire`,u>0?l+u*1e3:-1,u,()=>{const h={consumedPoints:n,msBeforeNext:u>0?u*1e3:-1};r(h)})}):this.client.incr(t,n,(f,h)=>{f||h===!1?this.client.add(t,n,u,(y,_)=>{if(y||!_)if(typeof o.attemptNumber>"u"||o.attemptNumber<3){const b=Object.assign({},o);b.attemptNumber=b.attemptNumber?b.attemptNumber+1:1,this._upsert(t,n,s,i,b).then(E=>r(E)).catch(E=>a(E))}else a(new Error("Can not add key"));else this.client.add(`${t}_expire`,u>0?l+u*1e3:-1,u,()=>{const b={consumedPoints:n,msBeforeNext:u>0?u*1e3:-1};r(b)})}):this.client.get(`${t}_expire`,(y,_)=>{if(y)a(y);else{const b=_===!1?0:_,E={consumedPoints:h,msBeforeNext:b>=0?Math.max(b-l,0):-1};r(E)}})})})}_get(t){return new Promise((n,s)=>{const i=Date.now();this.client.get(t,(o,r)=>{r?this.client.get(`${t}_expire`,(a,l)=>{if(a)s(a);else{const u=l===!1?0:l,f={consumedPoints:r,msBeforeNext:u>=0?Math.max(u-i,0):-1};n(f)}}):n(null)})})}_delete(t){return new Promise((n,s)=>{this.client.del(t,(i,o)=>{i?s(i):o===!1?n(o):this.client.del(`${t}_expire`,r=>{r?s(r):n(o)})})})}}var Qy=Jy;const Bu=Ft;var Xy=class{constructor(t={}){this.limiter=t.limiter,this.blackList=t.blackList,this.whiteList=t.whiteList,this.isBlackListed=t.isBlackListed,this.isWhiteListed=t.isWhiteListed,this.runActionAnyway=t.runActionAnyway}get limiter(){return this._limiter}set limiter(t){if(typeof t>"u")throw new Error("limiter is not set");this._limiter=t}get runActionAnyway(){return this._runActionAnyway}set runActionAnyway(t){this._runActionAnyway=typeof t>"u"?!1:t}get blackList(){return this._blackList}set blackList(t){this._blackList=Array.isArray(t)?t:[]}get isBlackListed(){return this._isBlackListed}set isBlackListed(t){if(typeof t>"u"&&(t=()=>!1),typeof t!="function")throw new Error("isBlackListed must be function");this._isBlackListed=t}get whiteList(){return this._whiteList}set whiteList(t){this._whiteList=Array.isArray(t)?t:[]}get isWhiteListed(){return this._isWhiteListed}set isWhiteListed(t){if(typeof t>"u"&&(t=()=>!1),typeof t!="function")throw new Error("isWhiteListed must be function");this._isWhiteListed=t}isBlackListedSomewhere(t){return this.blackList.indexOf(t)>=0||this.isBlackListed(t)}isWhiteListedSomewhere(t){return this.whiteList.indexOf(t)>=0||this.isWhiteListed(t)}getBlackRes(){return new Bu(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new Bu(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(t,n=1){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.rejectBlack()),typeof s>"u"?this.limiter.consume(t,n):(this.runActionAnyway&&this.limiter.consume(t,n).catch(()=>{}),s)}block(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.block(t,n):(this.runActionAnyway&&this.limiter.block(t,n).catch(()=>{}),s)}penalty(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.penalty(t,n):(this.runActionAnyway&&this.limiter.penalty(t,n).catch(()=>{}),s)}reward(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.reward(t,n):(this.runActionAnyway&&this.limiter.reward(t,n).catch(()=>{}),s)}get(t){let n;return this.isWhiteListedSomewhere(t)?n=this.resolveWhite():this.isBlackListedSomewhere(t)&&(n=this.resolveBlack()),typeof n>"u"||this.runActionAnyway?this.limiter.get(t):n}delete(t){return this.limiter.delete(t)}};const Zy=So;var ew=class{constructor(...t){if(t.length<1)throw new Error("RateLimiterUnion: at least one limiter have to be passed");t.forEach(n=>{if(!(n instanceof Zy))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(t,n=1){return new Promise((s,i)=>{const o=[];this._limiters.forEach(r=>{o.push(r.consume(t,n).catch(a=>({rejected:!0,rej:a})))}),Promise.all(o).then(r=>{const a={};let l=!1;r.forEach(u=>{u.rejected===!0&&(l=!0)});for(let u=0;u<r.length;u++)l&&r[u].rejected===!0?a[this._limiters[u].keyPrefix]=r[u].rej:l||(a[this._limiters[u].keyPrefix]=r[u]);l?i(a):s(a)})})}},tw=class extends Error{constructor(t,n){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="CustomError",this.message=t,n&&(this.extra=n)}};const Fu=tw,Uu=4294967295,ka="limiter";var nw=class{constructor(t,n={maxQueueSize:Uu}){this._queueLimiters={KEY_DEFAULT:new ju(t,n)},this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(t=ka){return this._queueLimiters[t]?this._queueLimiters[t].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(t,n=ka){return this._queueLimiters[n]||(this._queueLimiters[n]=new ju(this._limiterFlexible,{key:n,maxQueueSize:this._maxQueueSize})),this._queueLimiters[n].removeTokens(t)}};class ju{constructor(t,n={maxQueueSize:Uu,key:ka}){this._key=n.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then(t=>t!==null?t.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((s,i)=>{if(t>n._limiterFlexible.points){i(new Fu(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`));return}n._queue.length>0?n._queueRequest.call(n,s,i,t):n._limiterFlexible.consume(n._key,t).then(o=>{s(o.remainingPoints)}).catch(o=>{o instanceof Error?i(o):(n._queueRequest.call(n,s,i,t),n._waitTimeout===null&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),o.msBeforeNext)))})})}_queueRequest(t,n,s){const i=this;i._queue.length<i._maxQueueSize?i._queue.push({resolve:t,reject:n,tokens:s}):n(new Fu(`Number of requests reached it's maximum ${i._maxQueueSize}`))}_processFIFO(){const t=this;if(t._waitTimeout!==null&&(clearTimeout(t._waitTimeout),t._waitTimeout=null),t._queue.length===0)return;const n=t._queue.shift();t._limiterFlexible.consume(t._key,n.tokens).then(s=>{n.resolve(s.remainingPoints),t._processFIFO.call(t)}).catch(s=>{s instanceof Error?(n.reject(s),t._processFIFO.call(t)):(t._queue.unshift(n),t._waitTimeout===null&&(t._waitTimeout=setTimeout(t._processFIFO.bind(t),s.msBeforeNext)))})}}const Sa=Ft;var sw=class{constructor(t,n){this._rateLimiter=t,this._burstLimiter=n}_combineRes(t,n){return t?new Sa(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,s={}){return this._rateLimiter.consume(t,n,s).catch(i=>i instanceof Sa?this._burstLimiter.consume(t,n,s).then(o=>Promise.resolve(this._combineRes(i,o))).catch(o=>o instanceof Sa?Promise.reject(this._combineRes(i,o)):Promise.reject(o)):Promise.reject(i))}get(t){return Promise.all([this._rateLimiter.get(t),this._burstLimiter.get(t)]).then(([n,s])=>this._combineRes(n,s))}get points(){return this._rateLimiter.points}};const iw=Ft,ow=ms;class Hu{constructor(t,n,s){this.key=t,this.points=n,this.expire=s}}const rw=25,aw=25;class lw extends ow{constructor(t,n=null){super(t),this.client=t.storeClient,this.tableName=t.tableName,this.tableCreated=t.tableCreated,this.tableCreated?this._setTTL().finally(()=>{typeof n=="function"&&n()}):this._createTable(t.dynamoTableOpts).then(s=>{this.tableCreated=!0,this._setTTL().finally(()=>{typeof n=="function"&&n()})}).catch(s=>{if(typeof n=="function")n(s);else throw s})}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?"node-rate-limiter-flexible":t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}async _createTable(t){const n={TableName:this.tableName,AttributeDefinitions:[{AttributeName:"key",AttributeType:"S"}],KeySchema:[{AttributeName:"key",KeyType:"HASH"}],ProvisionedThroughput:{ReadCapacityUnits:t&&t.readCapacityUnits?t.readCapacityUnits:rw,WriteCapacityUnits:t&&t.writeCapacityUnits?t.writeCapacityUnits:aw}};try{return await this.client.createTable(n)}catch(s){if(s.__type&&s.__type.includes("ResourceInUseException"))return null;throw s}}async _get(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}}},s=await this.client.getItem(n);return s.Item?new Hu(s.Item.key.S,Number(s.Item.points.N),Number(s.Item.expire.N)):null}async _delete(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}},ConditionExpression:"attribute_exists(#k)",ExpressionAttributeNames:{"#k":"key"}};try{return(await this._client.deleteItem(n)).$metadata.httpStatusCode===200}catch(s){if(s.__type&&s.__type.includes("ConditionalCheckFailedException"))return!1;throw s}}async _upsert(t,n,s,i=!1,o={}){if(!this.tableCreated)throw new Error("Table is not created yet");const r=Date.now(),a=r/1e3,l=s>0?(r+s)/1e3:-1;if(i)return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = :points, expire = :expire",ExpressionAttributeValues:{":points":{N:n.toString()},":expire":{N:l.toString()}},ReturnValues:"ALL_NEW"});try{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = :new_points, expire = :new_expire",ExpressionAttributeValues:{":new_points":{N:n.toString()},":new_expire":{N:l.toString()},":where_expire":{N:a.toString()}},ConditionExpression:"expire <= :where_expire OR attribute_not_exists(points)",ReturnValues:"ALL_NEW"})}catch{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = points + :new_points",ExpressionAttributeValues:{":new_points":{N:n.toString()},":where_expire":{N:a.toString()}},ConditionExpression:"expire > :where_expire",ReturnValues:"ALL_NEW"})}}async _baseUpsert(t){if(!this.tableCreated)throw new Error("Table is not created yet");try{const n=await this.client.updateItem(t);return new Hu(n.Attributes.key.S,Number(n.Attributes.points.N),Number(n.Attributes.expire.N))}catch(n){throw n}}async _setTTL(){if(!this.tableCreated)throw new Error("Table is not created yet");try{if(await this._isTTLSet())return;const n={TableName:this.tableName,TimeToLiveSpecification:{AttributeName:"expire",Enabled:!0}};return await this.client.updateTimeToLive(n)}catch(t){throw t}}async _isTTLSet(){if(!this.tableCreated)throw new Error("Table is not created yet");try{const t=await this.client.describeTimeToLive({TableName:this.tableName});return t.$metadata.httpStatusCode==200&&t.TimeToLiveDescription.TimeToLiveStatus==="ENABLED"&&t.TimeToLiveDescription.AttributeName==="expire"}catch(t){throw t}}_getRateLimiterRes(t,n,s){const i=new iw;return i.isFirstInDuration=n===s.points,i.consumedPoints=i.isFirstInDuration?n:s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire!=-1?Math.max(s.expire*1e3-Date.now(),0):-1,i}}var cw=lw;const uw=ms,dw=Ft;class fw extends uw{constructor(t){if(super(t),this.modelName=t.tableName||"RateLimiterFlexible",this.prismaClient=t.storeClient,this.clearExpiredByTimeout=t.clearExpiredByTimeout||!0,!this.prismaClient)throw new Error("Prisma client is not provided");this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(t,n,s){const i=new dw;let o=s;return i.isFirstInDuration=o.points===n,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!==null?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,s,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const o=new Date,r=s>0?new Date(o.getTime()+s):null;return this.prismaClient.$transaction(async a=>{const l=await a[this.modelName].findFirst({where:{key:t}});if(l){const u=i||!l.expire||l.expire<=o||r===null;return a[this.modelName].update({where:{key:t},data:{points:u?n:l.points+n,...u&&{expire:r}}})}else return a[this.modelName].create({data:{key:t,points:n,expire:r}})})}_get(t){return this.prismaClient?this.prismaClient[this.modelName].findFirst({where:{AND:[{key:t},{OR:[{expire:{gt:new Date}},{expire:null}]}]}}):Promise.reject(new Error("Prisma client is not established"))}_delete(t){return this.prismaClient?this.prismaClient[this.modelName].deleteMany({where:{key:t}}).then(n=>n.count>0):Promise.reject(new Error("Prisma client is not established"))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(async()=>{await this.prismaClient[this.modelName].deleteMany({where:{expire:{lt:new Date(Date.now()-36e5)}}}),this._clearExpiredHourAgo()},3e5)}}var pw=fw;const hw=vy,mw=$y,gw=Ay,yw=Ly,{RateLimiterClusterMaster:ww,RateLimiterClusterMasterPM2:bw,RateLimiterCluster:_w}=Ky;var qu={RateLimiterRedis:hw,RateLimiterMongo:mw,RateLimiterMySQL:gw,RateLimiterPostgres:yw,RateLimiterMemory:Lu,RateLimiterMemcache:Qy,RateLimiterClusterMaster:ww,RateLimiterClusterMasterPM2:bw,RateLimiterCluster:_w,RLWrapperBlackAndWhite:Xy,RateLimiterUnion:ew,RateLimiterQueue:nw,BurstyRateLimiter:sw,RateLimiterRes:Ft,RateLimiterDynamo:cw,RateLimiterPrisma:pw};const vw="pan115_api",zu={points:5,duration:1,execEvenly:!0};function Vu(e){return{clientId:vw,rateLimit:zu,msDelayAdjustment:30,...e}}function Wu(e){const t=Vu(e),n=yu.create();hs(n,{retries:5,shouldResetTimeout:!0,retryDelay:i=>(console.log(`[axios] Retry ${i}...`),i*1e3)});const s=new qu.RateLimiterMemory(t.rateLimit);return n.interceptors.request.use(async i=>{try{const o=await s.consume(t.clientId);return i}catch(o){if(console.warn("[axios] RateLimiter:",o),o instanceof qu.RateLimiterRes){const r=o.msBeforeNext+t.msDelayAdjustment;return console.log(`[axios] Delay ${r}ms for next request...`),await mt(r),i}else throw new Qg(o)}},i=>(console.warn("[axios] onRejected:",i),Promise.reject(i))),n}let Ku=Wu();async function xw(e){Ku=e}const Et=Ku;async function Gu(e,t,n){const s=new URLSearchParams({page:e.toString(),uid:n.toString(),sign:t,time:_i().toString()});return(await Et.post("https://115.com/web/lixian/?ct=lixian&ac=task_lists",s,{withCredentials:!0,timeout:6e4})).data}async function Yu(){return(await Et.get(`https://115.com/?ct=offline&ac=space&_=${Date.now()}`,{timeout:3e4,withCredentials:!0})).data}async function Ju(){const t=(await Et.get("https://my.115.com/?ct=ajax&ac=nav",{timeout:3e4,withCredentials:!0})).data;if(t.state)return t.data;throw new Error(t.error)}async function Qu(e){const t=mo(e),s=(await Et.get("https://webapi.115.com/files?"+t,{timeout:12e4,withCredentials:!0})).data;if(s.state)return s;throw new Error(s.error)}async function Xu(e,t=500){const n=await Hs(e,t);for(let s=0;s<n.length;s++){const i=n[s];if(i.fid)continue;const o=Hn({cid:i.cid,limit:e.limit||115}),r=await Xu(o,t);i.children=r}return n}async function Hs(e,t=500){let n=[],s=0;for(;;){e.offset=s;const i=await Qu(e);if(!i.data||!i.data.length||(n=[...n,...i.data],s+=e.limit,s>=i.count))break;await mt(t)}return n}async function Cw(e){const t=mo(e),n=await Et.get("https://webapi.115.com/files/search?"+t,{timeout:12e4,withCredentials:!0});if(n.data==="")throw new bu;const s=n.data;if(s.state)return s;throw new ba(s.error)}async function $w(e,t=500,n=!1){let s=[],i=0,o=e.limit;const r=1e4,a=115,l=r-r%o;let u=o;for(;;){if(n){if(i>=l&&i<r){const h=r-l;u=Math.min(h,u)}i>=r&&(u=a)}e.offset=i,e.limit=u;const f=await Cw(e);if(!f.data||!f.data.length||(s=[...s,...f.data],i+=u,i>=f.count))break;await mt(t)}return s}async function Aa(e,t){const n=new URLSearchParams({pid:e,ignore_warn:"1"});return t.forEach((i,o)=>{n.append(`fid[${o}]`,i)}),(await Et.post("https://webapi.115.com/rb/delete",n,{timeout:12e4,withCredentials:!0})).data}async function Zu(e,t,n,s){let i=0,o=0;for(;;){const r=t.slice(i,i+n);if((await Aa(e,r)).state&&(o+=r.length),i+=n,i>=t.length)break;await mt(s)}return o}async function ed(e,t){const n=new URLSearchParams({pid:e,cname:t});return(await Et.post("https://webapi.115.com/files/add",n,{timeout:12e4,withCredentials:!0})).data}async function Ew(e,t){const n=new URLSearchParams({pid:e});return t.forEach((i,o)=>{n.append(`fid[${o}]`,i)}),(await Et.post("https://webapi.115.com/files/move",n,{timeout:12e4,withCredentials:!0})).data}async function kw(e){const t={path:e};return(await Et.get("https://webapi.115.com/files/getid?"+mo(t),{timeout:12e4,withCredentials:!0})).data}async function kt(e){const t=new URLSearchParams({cid:e});return(await Et.get("https://webapi.115.com/category/get?"+t.toString(),{timeout:12e4,withCredentials:!0})).data}async function Pa(e,t,n,s){const i={uid:s.toString(),sign:t.sign,time:_i().toString()};n&&(i.flag="1");const o=Xg(i);return e.forEach((a,l)=>{o.append(`hash[${l}]`,a)}),(await Et.post("https://115.com/web/lixian/?ct=lixian&ac=task_del",o,{timeout:12e4,withCredentials:!0})).data}async function Sw(e){return new Promise((t,n)=>{const s=JSON.stringify({pickcode:e}),i=Math.floor(Date.now()).toString(),o=new ty,{data:r,key:a}=o.encode(s,i);Xr({method:"POST",url:`https://proapi.115.com/app/chrome/downurl?t=${i}`,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":navigator.userAgent,Accept:"application/json, text/javascript, */*; q=0.01"},data:`data=${encodeURIComponent(r)}`,responseType:"json",onload:l=>{const u=JSON.parse(l.responseText);if(u.state){const f=o.decode(u.data,a);if(f){const h=JSON.parse(f),y=Object.keys(h)[0],_=h[y];_.file_id=y;const b=l.responseHeaders.split(/[\r\n]+/).filter(E=>E.match(/set-cookie/i));b.length&&(b.forEach((E,T)=>{b[T]=E.replace(/set-cookie:[\s]*/i,"").split(";")[0]}),_.cookie=b.join("; ")),t(_)}else n({state:!1,error:"解密失败"})}else n(u)},onerror:l=>{n(l)}})})}async function Aw(e){if(!(await kt(e)).play_long)throw new Error("该目录下没有可以播放的媒体文件![by_attr]");const s=(await Hs(Hn({cid:e,limit:1150}))).find(i=>i.play_long&&i.play_long>0);if(!s)throw new Error("该目录下没有可以播放的媒体文件![by_files]");return Ai(s)}async function Pw(e,t){if(e=typeof e=="string"?e:e.join(","),!t){if(e.includes(","))throw new Error("target参数不能为空!");t=e}t=t.startsWith("U_1_")?t:`U_1_${t}`;const n=new URLSearchParams({file_ids:e,target:t});return(await Et.post("https://webapi.115.com/files/export_dir",n,{timeout:12e4,withCredentials:!0})).data}async function Iw(e,t=1e3,n=12e4){const s=new URLSearchParams({export_id:e.toString()}),i=async()=>(await Et.get("https://webapi.115.com/files/export_dir?"+s.toString(),{timeout:12e4,withCredentials:!0})).data;async function o(r){const a=await i();a.data&&!!a.data.pick_code&&r(a)}try{return await jn(o,t,n)}catch(r){throw new Error(`导出目录树结果获取失败:${r.message}`)}}async function Tw(e){/^\d+$/.test(e.target)&&(e.target=`U_1_${e.target}`);const t=mo(e);return(await Et.post("https://uplb.115.com/3.0/sampleinitupload.php",t,{timeout:12e4,withCredentials:!0})).data}async function Lw(e,t){const n=await Tw(t),s=new FormData;s.append("name",t.filename),s.append("key",n.object),s.append("policy",n.policy),s.append("OSSAccessKeyId",n.accessid),s.append("success_action_status","200"),s.append("callback",n.callback),s.append("signature",n.signature),s.append("file",e);const i=n.host.replace(/^http:/,"https:");return(await Et.post(i,s,{timeout:18e5})).data}async function Ow(e,t,n=!1){var o;const s=new Map;if(!e.length)return s;t=t||await Ms();let i=new Map;n||(se({text:"正在获取上级目录路径...",timer:0}),fe.showLoading());try{i=await Jw(e),n||fe.close()}catch(r){return console.error(r),n||se({text:`获取上级目录路径失败: ${r}`,timer:1200,icon:"error"}),s}finally{n||fe.hideLoading()}if(i.size===0)return s;for(let r=0;r<e.length;r++){const a=(o=i.get(e[r].parentId))==null?void 0:o.slice(1).join("/"),l=e[r].name,u=vc(a+"/"+l,!0),f=e[r].isFile?await Rs(t,u,go.play):await ta(t,u);s.set(u,f)}return console.log("[buildCloudDriveUrlsForFileItems] pathToUrl:",s),s}async function Dw(e,t){const n=await Rs(e,t);return(await Am({method:"HEAD",url:n})).status===200}async function Mw(e,t,n,s){const o=`waitFileExist_${Lc()} path: ${t}`;console.time(o);async function r(a){const l=await Dw(e,t);l===!0&&a(l)}try{await jn(r,n,s)}catch{throw new Error(`[waitFileExist] 检查文件存在超时!文件路径: ${t}`)}finally{console.timeEnd(o)}}async function Rw(e){let t=`#EXTM3U
`;for(const[n,s]of e)t+=`#EXTINF:0,${n}
${s}
`;return t}var Vn=(e=>(e.unix="/",e.windows="\\",e))(Vn||{});function Ao(e,t="/"){return e.map((n,s)=>s===0?n:Po(n,t)).join(t)}function Po(e,t="/"){return e=e.replace(/[\\/]/g,t),t==="/"?e=e.replace(/\/+/g,t):e=e.replace(/\\+/g,t),e.length>1&&e.endsWith(t)&&(e=e.slice(0,-1)),e}function Nw(e){return e.startsWith("/")}function Bw(e){return e===""||e==="/"||e==="\\"}function Ia(e,t,n="/"){if(Nw(t))return t;const s=new URL(e,"http://example.com");s.pathname=Fw(s.pathname,t);let i=decodeURIComponent(s.pathname);return Po(i,n)}function Fw(e,t){const n=e.endsWith("/")?e:e+"/",s=t.startsWith("/")?t.slice(1):t;return n+s}function Uw(e,t=/^\w+$/){const n=e.lastIndexOf(".");if(n===-1)return"";const s=e.slice(n+1);return t&&!t.test(s)?"":s}async function vt(e=!0){const t=Jt().GetCurWangPanCid();return!t&&e?(Jt().Core.MinMessage.Show({text:'不支持"根目录"!',timeout:1e3}),""):t}async function jw(e,t){let n=$(`li.temp-el[cate_id="${e}"]`);if(!n.length){const s=`
      <li class="selected temp-el" file_type="${0}">
        <input type="checkbox" value="${e}"/>
        <div class="checkbox" menu="file_check_one"></div>
        <div class="file-name-wrap">
          <span class="file-name" rel="file_name">
            <em>
              <a class="name" href="javascript:;" cate="1" menu="open" aid="1" cid="${e}" rel="view_folder">
                <span>名称</span>
              </a>
            </em>
          </span>
        </div>
      </li>
    `;n=$(s)}n.attr("title",t.file_name),n.find("a.name > span").text(t.file_name);for(let s in t){const i=typeof t[s];["string","number"].indexOf(i)>-1&&n.attr(s,t[s])}return n.attr("cate_id",e),n.attr("p_id",t.paths[t.paths.length-1].file_id),n}async function zt(e){const t=await Si(e);return Ai(t)}async function Si(e){const t=e.attr("file_size"),n=e.attr("iv")==="1",s=await Oa(),i=e.attr("file_id")||"",o=!!i,r=e.attr("c")||"",a=e.attr("fvs")||"",l={n:e.attr("title")||"",s:t?parseInt(t):0,pc:e.attr("pick_code")||"",t:e.attr("user_ptime")||"",te:"",tp:"",ico:e.attr("ico")||"",sha:e.attr("sha1")||"",iv:n,c:r?parseInt(r):0,fuuid:e.attr("fuuid"),fvs:a?parseInt(a):0};let u={n:l.n};if(!s)u={fid:i,cid:(o?e.attr("cid"):e.attr("cate_id"))||"",pid:o?"":e.attr("p_id")||"",...l};else if(u={fid:i,cid:(o?e.attr("cid"):e.attr("cate_id"))||"",...l},!o){const f=e.find(".file-directory a[cid]");if(f.length)u.pid=f.attr("cid");else throw console.warn("无法获取上级目录ID!",e),new Error("无法获取上级目录ID!")}return{...u,...l}}async function Wn(e){const t=await Ww(e);return Hw(t)}async function Hw(e){const t=[];for(let n=0;n<e.length;n++){const s=await Ai(e[n]);t.push(s)}return t}async function Ai(e){var s,i;const t=!!e.fid,n={id:t?e.fid:e.cid,name:e.n,hash:e.sha,parentId:t?e.cid:e.pid,sizeRaw:e.s,sizeDesc:(s=e.s)==null?void 0:s.toString(),sizeBytes:0,isFile:t,isDir:!t,isVideo:e.iv===!0||((i=e.iv)==null?void 0:i.toString())==="1",pickCode:e.pc,playDuration:e.play_long};return typeof e.s=="number"?n.sizeBytes=e.s:typeof e.s=="string"&&/^\d+$/.test(e.s)&&(n.sizeBytes=parseInt(e.s)),n.sizeDesc=ho(n.sizeBytes||0),n}function Jt(){return unsafeWindow.TOP?unsafeWindow.TOP:unsafeWindow}function qw(){return unsafeWindow.top===unsafeWindow?unsafeWindow.Ext:unsafeWindow.top.Ext}async function zw(e){return new Promise((t,n)=>{Jt().Core.DataAccess.Dir.GetDetail("1",e,s=>t(s))})}async function Vw(){const e=await vt(),t=await zw(e),n=await jw(e,t);return n.addClass("ce-temp-cur-dir"),n}async function Pi(){return window.top!==window?$(document):$('iframe[name="wangpan"], .wrap-view iframe:eq(0)').contents()}async function qs(){return(await Pi()).find(".list-contents, .list-thumb")}async function td(e){const t=await qs();return e?t.find("li.selected:not(.ce-temp-cur-dir)"):t.find("li:not(.ce-temp-cur-dir)")}async function Ww(e){const t=await td(e),n=[];for(let s=0;s<t.length;s++){const i=t.eq(s),o=await Si(i);n.push(o)}return n}async function Ta(e="/"){const t=await nd();return e+t.slice(1).join(e)}async function nd(){const e=await Pi(),t=[];return e.find("#js_top_header_file_path_box .top-file-path > .file-path").children().each(function(){t.push($(this).text().trim().replace(/[›]$/,""))}),t}async function Kw(){const e=await vt();(await qs()).find("li.selected").each(function(){const n=$(this);n.attr("cate_id")!==e&&(n.find('input[type="checkbox"]').prop("checked",!1),n.removeClass("selected"))})}async function kn(e=!1){const t=await vt();if(!t)return null;const n=await qs(),s=await Vw();return e||s.hide(),n.find(`li[cate_id="${t}"]`).length||n.append(s),s}async function La(e,t,n){n&&await Kw(),Jt().Core.FileMenu.DoEvent([e],t,null)}function Gw(e,t=""){return`https://115.com/?ct=preview&ac=location&pickcode=${e}&sha1=${t}`}function Ii(e){return`https://115.com/?${new URLSearchParams({cid:e}).toString()}&offset=0&mode=wangpan`}async function Oa(e=location.href){return e.includes("ac=search")}function Da(e,t=""){const n={aid:"1",cid:e.cid||"",old_cid:e.cid||"",old_cid_name:t,search_value:encodeURIComponent(e.search_value),ct:"file",ac:"search",is_wl_tpl:"1"};return"https://115.com/?url="+encodeURIComponent(`/?${Im(n)}`)+"&submode=wangpan&mode=search"}function Ma(e){return`https://v.anxia.com/?${new URLSearchParams({pickcode:e,share_id:"0"}).toString()}`}async function Yw(e){unsafeWindow.Main.ReInstance({type:e.type,offset:0,o:Uc.userPtime,asc:na.false,star:e.star,suffix:e.suffix})}async function sd(){return(await qs()).find("li.selected")}async function id(){const e=await sd();return e?await Si(e):null}function od(e){return e.replace(/[/\\:*?"<>|]/g,"_")}async function Io(e){const n=(await kt(e.id)).paths.slice(1).map(o=>o.file_name).join("/"),s=od(e.name);return`/${n}/${s}`.replace(/^[\/]+/g,"/")}async function Jw(e,t=100){var o;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(o=n.get(a))==null||o.push(r):n.set(a,[r])}const s=[];for(const r of n.values())s.push(r[0]);const i=new Map;for(const r of s){const a=await kt(r.id);await mt(t),i.set(r.parentId,a.paths.map(l=>l.file_name))}return i}async function Qw(e,t=100){var o;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(o=n.get(a))==null||o.push(r):n.set(a,[r])}const s=[];for(const r of n.values())s.push(r[0]);const i=new Map;for(const r of s){const a=await kt(r.id);await mt(t),i.set(r.parentId,a.paths)}return i}async function Xw(e,t){const n=new File([e],t.filename,{type:"text/plain"});return Lw(n,t)}async function Zw(e,t,n){const s=await Ow(e),i=await Rw(s);n=n||Lc();let o=t;return/m3u8$/.test(n)||(n+=".m3u8"),await Xw(i,{filename:n,target:o})}const Ra=new Map;async function zs(e,t=!0){if(e=Po(e,Vn.unix),e=e.replace(/^[\/]+/,"").replace(/[\/]+$/,""),t&&Ra.has(e))return Ra.get(e);if(e===""||e==="/")return"0";const n=await kw(e);if(!n.state)throw new Error(`根据路径"${e}"获取目录ID失败: ${n.error}`);if(n.id&&n.id.toString()!=="0")return Ra.set(e,n.id.toString()),n.id.toString();throw new _a(`根据路径"${e}"获取目录ID失败: 目录不存在!`)}async function eb(e){e=e.replace(/^\//,"").replace(/\/$/,"");const t={id:"",created:!1,pathToId:new Map};if(e===""||e==="/")return t.id="0",t;const n=e.split("/").filter(o=>o);let s="0",i="";for(const o of n){i+="/"+o;let r="";try{r=await zs(i,!0),t.pathToId.set(i,r)}catch(a){if(a instanceof _a){const l=await ed(s,o);if(!l.state)throw new Error(`创建目录"${o}"失败: ${l.error} - ${l.error}`);r=l.cid.toString()}else throw a}s=r,t.pathToId.set(i,r)}return t.id=s,t}async function tb(e,t,n=!0){let s="";const i=await ed(t,e);if(i.state)s=i.cid.toString();else{if(i.errno===_u.exist&&n){const o=await kt(t);if(!o.pick_code)throw new Error(`获取目录"${t}"属性失败: ${o.errno} - ${o.error}`);const r=[...o.paths.slice(1).map(a=>a.file_name),o.file_name,e].join("/");return await zs(r,!0)}throw new Error(`创建目录"${e}"失败: ${i.errno} - ${i.error}`)}return s}async function rd(e){if(!location.search.includes("ac=search")||!e.enableInSearch)return;const n=(await us("#js_data_list"))[0],s=[{label:"移动",body:'<a href="javascript:;" menu="move" style=""><i class="icon-operate ifo-move" menu="move"></i><span menu="move">移动</span></a>',enabled:!0},{label:"重命名",body:'<a href="javascript:;" menu="edit_name" style=""><i class="icon-operate ifo-rename" menu="edit_name"></i><span menu="edit_name">重命名</span></a>',enabled:!0},{label:"删除",body:'<a href="javascript:;" menu="delete" style=""><i class="icon-operate ifo-remove" menu="delete"></i><span menu="delete">删除</span></a>',enabled:!0},{label:"属性",body:'<a href="javascript:;" menu="attribute" style=""><i class="icon-operate ifo-property" menu="attribute"></i><span menu="attribute">属性</span></a>',enabled:!0}],i=a=>{let l="";for(const u of a)!u.enabled||(l+=u.body);return l},o=()=>{const a="ce-menu-init",l=document.querySelectorAll(`li[rel="item"]:not(.${a})`),u=i(s);for(let f=0;f<l.length;f++){const h=l[f];if(h.querySelector(".file-opr"))continue;const y=document.createElement("div");y.className="file-opr",y.setAttribute("rel","menu"),y.innerHTML=u,h.classList.add(a),h.appendChild(y)}};o(),new MutationObserver(async([a])=>{a.type==="childList"&&o()}).observe(n,{childList:!0})}async function nb(e){if(!e.hideSelectionMenuLabel)return;const n=(await us("#js_operate_box"))[0];new MutationObserver(async([i])=>{if(i.type==="childList"){const o=n.querySelectorAll("li[menu]");for(let r=0;r<o.length;r++){const a=o[r],l=a.textContent;a.setAttribute("title",l||"")}}}).observe(n,{childList:!0}),n.classList.add("only-icon")}async function sb(e,t){const n=[],s=await Ws(),i=s.keyToTriggerManual;for(const o of t){const r=po(e,{key:`_ce_s_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const b=l;(i===mn.alt&&b.altKey||i===mn.ctrl&&b.ctrlKey||i===mn.shift&&b.shiftKey||i===mn.meta&&b.metaKey)&&(u={names:[Ba.manual],position:s.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await zt(f),y=await Ms(),_=await Do(h,o,y,u);if(console.log("[search url]",_),!_)throw new Error("无法获取有效的搜索链接!");Cm(_,{active:!o.openInBackground})}catch(u){console.error(u),se({title:"搜索失败",text:u.toString(),icon:"error"})}}});n.push(r)}return n}async function Na(e,t){if(console.log("[playDirOnAnxia]",e,t),!t)try{se({title:"正在查找可播放的文件...",text:"请稍等...",icon:"info"}),fe.showLoading(),t=await Aw(e),console.log("[playDirOnAnxia] file",t)}catch(s){console.error(s),se({title:"播放失败",text:s.toString(),icon:"error"});return}t||se({title:"播放失败",text:"没有在该目录下找到可播放的文件![file_null]",icon:"error"});const n=Ma(t.pickCode);window.open(n,"_blank","noopener noreferrer")}async function ib(e,t){const n=[],s=await Ws(),i=s.keyToTriggerManual;for(const o of t){const r=po(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const b=l;(i===mn.alt&&b.altKey||i===mn.ctrl&&b.ctrlKey||i===mn.shift&&b.shiftKey||i===mn.meta&&b.metaKey)&&(u={names:[Ba.manual],position:s.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await zt(f),y=await Ms(),_=await Do(h,o,y,u);if(h.isDir&&_.includes("v.anxia.com")){Na(h.id);return}if(console.log("[play url]",_),!_)throw new Error("无法获取有效的播放链接!");window.open(_,"_blank","noopener noreferrer")}catch(u){console.error(u),se({title:"播放失败",text:u.toString(),icon:"error"})}}});n.push(r)}return n}var Vt=(e=>(e[e.full=0]="full",e[e.pure=1]="pure",e[e.fullUnique=2]="fullUnique",e[e.pureUnique=3]="pureUnique",e))(Vt||{});async function To(e,t){if(t===0)return e;if(t===2)return Array.from(new Set(e));const n=[];for(const s of e){const i=s.replace(/\.[^.]+$/,"");t===1?n.push(i):t===3&&(n.includes(i)||n.push(i))}return n}var Wt=(e=>(e[e.unixPath=0]="unixPath",e[e.winPath=1]="winPath",e[e.unixParentPath=2]="unixParentPath",e[e.winParentPath=3]="winParentPath",e))(Wt||{});async function Lo(e,t,n){const s=n===1||n===3;let o=n===2||n===3?t.replace(/\/[^/]+$/,""):t;return o.startsWith("/")||(o="/"+o),s&&(o=o.replace(/\//g,"\\")),o}async function ob(e){return async(t,n)=>{const s=await vt(),i=await Pi(),o=e?"li[file_id].selected":"li[file_id]",r=i[0].querySelectorAll(o);if(!r.length){se({title:"文件移动到同名目录",text:e?"当前目录没有选中文件":"当前目录没有文件",icon:"warning"});return}let a=e?`当前已选中${r.length}个文件,是否继续?`:`当前目录共有${r.length}个文件,是否继续?`;a+=`<br><div style="text-align:left">
      <b>处理逻辑:</b>
      <p>0.「同名目录」取自纯文件名(不带后缀名)。</p>
      <p>1.如果同名目录已存在,会直接使用已存在的目录。</p>
      <p>2.同名目录相同的文件,会被移动到同一个目录里面。</p>
      <p class="text-primary">示例: <span>movie.mp4</span> 的同名目录为 <span>movie</span></p>
      </div>`;const{value:l}=await fe.fire({title:"文件移动到同名目录",html:a,icon:"warning",showCancelButton:!0,confirmButtonText:"继续",cancelButtonText:"取消"});if(!!l){fe.fire({title:"文件移动到同名目录",html:"正在处理...",didOpen:()=>{fe.showLoading()}});for(let u=0;u<r.length;u++){const f=r[u],h=await zt($(f));if(!h.isFile)continue;const y=h.name,_=y.replace(/\.[^\.]+$/,""),b=`${u+1} / ${r.length} - `+Math.round(u/r.length*100)+"%";fe.update({html:`${b} 正在为文件「${y}」创建目录「${_}」`});const E=await tb(_,s,!0);fe.update({html:`创建目录「${_}」成功。id=${E}`}),fe.update({html:`${b} 正在移动文件「${y}」到目录「${_}」`}),await Ew(E,[h.id]),await mt(500)}fe.hideLoading(),fe.update({html:"处理完成。刷新列表后查看最新的文件数据。",icon:"success"})}}}function rb(e,t){const n=[];for(let s=t?1:0;s<e.length;s++)n.push(e[s].file_name);return n}async function ad(e,t){const n=await Qw(e),s=[];for(let i=0;i<e.length;i++){const o=n.get(e[i].parentId);if(!o)throw new Error(`无法获取文件 "${e[i].name}" 的上级目录路径!`);const r=rb(o,!0),a=Ao([...r,e[i].name],Vn.unix);s.push(await Lo(e[i],a,t))}return s}async function ld(e){try{const n=+(await kt(e.id)).folder_count+1;se({text:`正在获取文件列表数据... 目录数量: ${n}。请保持当前页面在当前浏览器窗口处于激活状态,不要做其他网盘操作。`,timer:0}),fe.showLoading();const s=await Xu(Hn({cid:e.id,limit:1150}),3e3);console.log("[tree]",s);const i=`115-dir_list_data-${e.id}-${od(e.name)}.json`;vi(JSON.stringify(s),i),se({text:`获取文件列表数据成功,已保存为 ${i}`,timer:0,icon:"success",showConfirmButton:!0})}catch(t){console.error(t),se({text:`获取文件列表数据失败: ${t}`,timer:0,icon:"error",showCloseButton:!0})}finally{fe.hideLoading()}}async function Oo(e){let t="";if(e.id==="0")t="/";else{const i=await Io(e);t=await Lo(e,i,e.isDir?0:2)}const n=await Ms(),s=await Fm(n,t);console.log("url: ",s),window.open(s,"_blank","noopener noreferrer"),se({title:"在CloudDrive2中查看",text:`已打开CloudDrive2链接: ${s}`,icon:"success"})}function cd(e){const t=e.target;e.key==="a"&&(e.ctrlKey||e.metaKey)&&t.select()}function ud(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement}function ab(e){e.addEventListener("keydown",t=>{const n=t.target;ud(n)&&cd(t)})}function dd(e,t=.2,n=.5){e.style.transition=`opacity ${n}s`,e.style.opacity=t.toString(),setTimeout(()=>{e.remove()},500)}const Ti=fe.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:e=>{e.addEventListener("mouseenter",fe.stopTimer),e.addEventListener("mouseleave",fe.resumeTimer)},customClass:"swal-toast"});async function lb(e,t){e.addEventListener("keydown",n=>{const s=n.target;if(!ud(s))return;let i=!1;(t==="enter"&&n.key==="Enter"||t==="ctrl+enter"&&n.key==="Enter"&&n.ctrlKey||t==="meta+enter"&&n.key==="Enter"&&n.metaKey)&&(i=!0),i&&fe.clickConfirm()})}var Ba=(e=>(e.search="search",e.encode="encode",e.base64="base64",e.base64safe="base64safe",e.upper="upper",e.lower="lower",e.number="number",e.manual="manual",e))(Ba||{});const cb=[{label:"文件属性变量",items:[{key:"{dir_id}",label:"文件夹ID"},{key:"{file_id}",label:"文件ID"},{key:"{pick_code}",label:"提取码"},{key:"{pure_name}",label:"不含后缀的文件名"},{key:"{full_name}",label:"完整名称"},{key:"{file_suffix}",label:"文件后缀名"},{key:"{file_hash}",label:"文件hash"},{key:"{file_size}",label:"文件大小"},{key:"{file_path}",label:"文件路径"},{key:"{file_dir}",label:"文件目录路径"}]},{label:"高级变量",items:[{key:"{clouddrive_stream_url}",label:"CloudDrive链接(用于播放,目录链接是m3u)"},{key:"{clouddrive_down_url}",label:"CloudDrive文件链接"},{key:"{clouddrive_playlist_url}",label:"CloudDrive播放列表链接"},{key:"{user_agent}",label:"浏览器UA"}]},{label:"变量函数处理",memo:"支持多个函数,函数之间使用英文冒号分隔,如:{变量名:encode:base64}。调用顺序从左到右。",items:[{key:"{变量名:search}",label:"搜索链接"},{key:"{变量名:encode}",label:"url编码"},{key:"{变量名:base64}",label:"base64编码"},{key:"{变量名:base64safe}",label:"base64安全编码"},{key:"{变量名:upper}",label:"转大写"},{key:"{变量名:lower}",label:"转小写"},{key:"{变量名:number}",label:"转数字"},{key:"{变量名:manual}",label:"手动输入"}]}];function ub(e,t,n){const{names:s,position:i}=t;let o=[];return i==="first"?o=[...s,...e]:o=[...e,...s],n?Array.from(new Set(o)):o}async function Do(e,t,n,s){var u;let i=t.url;const o={dir_id:"id",file_id:"id",pick_code:"pickCode",full_name:"name",file_suffix:"suffix",file_hash:"hash",file_size:"sizeBytes"},r=e.isFile,a=/{(\w+)(:\w+(:\w+)?)?}/g,l=i.match(a);if(l){const f=["file_path","file_dir","clouddrive_stream_url","clouddrive_down_url","clouddrive_playlist_url"];for(const h of l){const y=h.replace(/[{}]/g,"").split(":")[0],_=h.replace(/[{}]/g,"").replace(/^[^:]+:/,"");let b=((u=e[o[y]])==null?void 0:u.toString())||"",E="";switch(f.includes(y)&&(E=await Io(e)),y){case"pure_name":r?b=e.name.replace(/\.[^.]+$/,""):b=e.name;break;case"file_path":b=E;break;case"file_dir":b=E.replace(/\/[^/]+$/,"");break;case"clouddrive_stream_url":r?b=await Rs(n,E,go.download):b=await ta(n,E);break;case"clouddrive_down_url":b=await Rs(n,E,go.download);break;case"clouddrive_playlist_url":let T="";r?T=E.replace(/\/[^/]+$/,""):T=E,b=await ta(n,T);break;case"user_agent":b=navigator.userAgent;break}if(b=b.toString(),_){let T=_.split(":");s&&(T=ub(T,s,!1)),console.log(`[buildCustomUrl] functions: ${_}, after merge: ${T.join(":")}`);for(const M of T)switch(M){case"search":b=Da({search_value:b});break;case"encode":b=encodeURIComponent(b);break;case"base64":b=gc(b);break;case"base64safe":b=gc(b,!0);break;case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"number":b=b.replace(/\D/g,"");break;case"manual":let{isConfirmed:I,value:P}=await fe.fire({title:"手动输入",text:"按下「Ctrl + 回车」或「Command + 回车」确认",input:"textarea",inputValue:b,showCancelButton:!0,inputValidator:V=>V?null:"输入不能为空!",didOpen:V=>{ab(V),lb(V,"meta+enter")}});if(!I)throw new Error("已取消手动输入。");if(P=(P==null?void 0:P.trim())||"",P==="")throw new Error("输入不能为空!");b=P;break}}i=i.replace(h,b)}}return t.mutation?await db(i,e,t,n):i}async function db(e,t,n,s){return await new Function("payload",n.mutation)({url:e,file:t,customUrl:n,cloudDriveConfig:s})}var Sn=(e=>(e.search="search",e.play="play",e))(Sn||{});const fb=st.menuCustomUrlsForSearch,pb=st.menuCustomUrlsForPlay,fd={search:fb,play:pb};async function Vs(e){return await Ze.get(fd[e],[])}async function pd(e,t){await Ze.set(fd[e],t)}function gt(e){return{enabled:!0,key:"",label:"",icon:"",memo:"",extraMemo:"",url:"",openInBackground:!1,...e}}var mn=(e=>(e.none="none",e.alt="alt",e.ctrl="ctrl",e.shift="shift",e.meta="meta",e))(mn||{});const hd=st.menu;function hb(e){return{enabled:!0,openInNewTab:!0,search:!0,play:!0,getDownloadUrl:!0,copyNames:!0,exportList:!1,viewInCloudDrive:!0,...e}}function mb(e){return{enabled:!0,copyNames:!0,viewInCloudDrive:!0,...e}}function gb(e){return{enabled:!0,moveToSelfNameDir:!0,copyNames:!0,play:!0,...e}}function yb(e){return{enabled:!0,rename:!0,delete:!0,play:!0,copyNames:!0,move:!0,copy:!0,copyTo:!0,viewProp:!0,showSubFolderSize:!0,exportList:!1,viewInCloudDrive:!0,...e}}function wb(e){return{enabled:!0,hideSelectionMenuLabel:!1,enableInSearch:!0,manageOfficialMenus:!1,keyToTriggerManual:"none",injectManualFuncPosition:"first",m3u8TempDir:".ce-m3u8-temp",[Be.listItemHover]:hb(e==null?void 0:e[Be.listItemHover]),[Be.listItemContext]:mb(e==null?void 0:e[Be.listItemContext]),[Be.selection]:gb(e==null?void 0:e[Be.selection]),[Be.dirContext]:yb(e==null?void 0:e[Be.dirContext]),...e}}async function Ws(){const e=wb(),t=await Ze.get(hd,e);return _c(e,t)}async function bb(e){await Ze.set(hd,e)}const tc=class{constructor(t){be(this,"menuType",Be.listItemHover);be(this,"injectDecider");be(this,"keyAttributeName","id");be(this,"key","");be(this,"label","");be(this,"icon","");be(this,"showIcon",!0);be(this,"title","");be(this,"onClick",async(t,n)=>{});be(this,"onMouseOver");be(this,"onMouseOut");be(this,"subItems",[]);be(this,"isDivider",!1);be(this,"menuItemTemplates",{[Be.dirContext]:{body:`<li id="{key}" class="ce-menu dir-context-menu">
        <a href="javascript:;">{icon}<span>{label}</span></a>
      </li>`,bodyForMulti:`<li id="{key}" class="ce-menu ce-menu-parent dir-context-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<li class="ce-menu-divider"></li>'},[Be.dirContextSub]:{body:`<span id="{key}" class="ce-menu dir-context-menu-sub sub-item">
        {icon}<span>{label}</span>
      </span>`,divider:'<span class="ce-menu-divider"></span>'},[Be.listItemContext]:{body:`<li id="{key}" class="ce-menu list-item-context-menu">
        <a href="javascript:;">{icon}<span>{label}</span></a>
      </li>`,bodyForMulti:`<li id="{key}" class="ce-menu ce-menu-parent list-item-context-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<li class="ce-menu-divider"></li>'},[Be.listItemContextSub]:{body:'<span id="{key}" class="ce-menu list-item-context-menu-sub sub-item">{label}</span>',divider:'<span class="ce-menu-divider"></span>'},[Be.listItemHover]:{body:`<a href="javascript:;" id="{key}" class="ce-menu list-item-hover-menu" style="">
        {icon}<span>{label}</span>
      </a>`,bodyForMulti:`<span class="ce-menu ce-menu-parent list-item-hover-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<a class="ce-menu-divider"></a>'},[Be.listItemHoverSub]:{body:`<a href="javascript:;" id="{key}" class="ce-menu list-item-hover-menu-sub" style="">
        {icon}<span>{label}</span>
      </a>`,divider:'<a class="ce-menu-divider"></a>'},[Be.selection]:{body:'<li id="{key}" class="ce-menu selection-menu">{icon}<span>{label}</span></li>',bodyForMulti:`<li class="ce-menu ce-menu-parent selection-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </li>`,divider:'<li class="ce-menu-divider"></li>'},[Be.selectionSub]:{body:`<a href="javascript:;" id="{key}" class="ce-menu selection-menu-sub" style="">
        {icon}<span>{label}</span>
      </a>`,divider:'<a class="ce-menu-divider"></a>'}});t.menuType&&(this.menuType=t.menuType),t.injectDecider&&(this.injectDecider=t.injectDecider),t.isDivider&&(this.isDivider=!0),t.key&&(this.key=t.key),t.label&&(this.label=t.label),t.icon&&(this.icon=t.icon),t.showIcon!==void 0&&(this.showIcon=t.showIcon),t.title&&(this.title=t.title),t.onClick&&(this.onClick=t.onClick),t.onMouseOver&&(this.onMouseOver=t.onMouseOver),t.onMouseOut&&(this.onMouseOut=t.onMouseOut),t.subItems&&(this.subItems=t.subItems),t.key&&(this.key=t.key),t.label&&(this.label=t.label),t.onClick&&(this.onClick=t.onClick)}async decideInject(t){return this.injectDecider?await this.injectDecider(this,t):!0}async render(){if(!this.menuType)throw new Error("未指定菜单类型");const t=this.menuItemTemplates[this.menuType];if(!t)throw new Error(`未找到菜单模板:${this.menuType}`);if(this.isDivider){if(!t.divider)throw new Error("未定义模版的divider内容!");const r=document.createElement("div");return r.innerHTML=t.divider,r.firstElementChild}let n=t.body;if(this.subItems.length>0){if(!t.bodyForMulti)throw new Error("未找到 bodyFormMulti 模版");n=t.bodyForMulti}const s=document.createElement("div");let i="";this.icon&&this.showIcon&&(this.icon.match(/^(http|https|data:image)/)?i=`<img class="ce-menu-icon" src="${this.icon}" />`:this.icon.match(/^data-text:/)?i=`<i class="ce-menu-icon">${this.icon.replace(/^data-text:/,"")}</i>`:i=`<i class="ce-menu-icon ${this.icon}"></i>`),s.innerHTML=n.replace(/{key}/g,this.key).replace(/{label}/g,this.label).replace(/{icon}/g,i);const o=s.firstElementChild;if(o.setAttribute("title",this.title||""),this.onClick&&o.addEventListener("click",async r=>{this.onClick(this,r)}),this.onMouseOver&&o.addEventListener("mouseover",async r=>{this.onMouseOver&&this.onMouseOver(this,r)}),this.onMouseOut&&o.addEventListener("mouseout",async r=>{this.onMouseOut&&this.onMouseOut(this,r)}),this.subItems.length>0){const r=o.querySelector(".sub-items"),a=[];for(const l of this.subItems){const u=await l.render();a.push(u)}r==null||r.append(...a)}return o}async closeMenu(){unsafeWindow.Core.FileMenu.HideRight(),document.dispatchEvent(new CustomEvent(tc.EVENT_CLOSE_MENU,{detail:{menu:this}}))}async decorateContainer(t){}};let Qt=tc;be(Qt,"EVENT_CLOSE_MENU","__closeMenu");async function Mo(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,s=$(n).closest(".ce-menu-parent"),i=s.find(".ce-menu-dropdown");s.addClass("ce-menu-dropdown-opened"),i.addClass("ce-menu-dropdown-active")}async function Ro(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,s=$(n).closest(".ce-menu-parent"),i=s.find(".ce-menu-dropdown");s.removeClass("ce-menu-dropdown-opened"),i.removeClass("ce-menu-dropdown-active")}class St extends Qt{constructor(n){super(n);be(this,"menuType",Be.dirContext);this.onMouseOver=Mo,this.onMouseOut=Ro}}class _b extends Qt{constructor(){super(...arguments);be(this,"menuType",Be.dirContextSub)}}class No extends Qt{constructor(n){super(n);be(this,"menuType",Be.listItemContext);this.onMouseOver=Mo,this.onMouseOut=Ro}}class Bo extends Qt{constructor(n){super(n);be(this,"menuType",Be.listItemHover);this.onMouseOver=Mo,this.onMouseOut=Ro}}class Ks extends Qt{constructor(){super(...arguments);be(this,"menuType",Be.listItemHoverSub)}}class Fa extends Qt{constructor(n){super(n);be(this,"menuType",Be.selection);this.onMouseOver=Mo,this.onMouseOut=Ro}}class Fo extends Qt{constructor(){super(...arguments);be(this,"menuType",Be.selectionSub)}}class Uo extends Qt{constructor(){super(...arguments);be(this,"isDivider",!0)}}class vb extends Uo{}class md extends Uo{}class Ua extends Uo{}class gd extends Uo{}class jo{constructor(t){be(this,"items");be(this,"siblingSelector");be(this,"position");be(this,"useObserver",!0);be(this,"observeTarget",document.body);be(this,"disposeObserverAfterInjection",!0);be(this,"menuType");be(this,"_observer");be(this,"injectDecider");t.menuType&&(this.menuType=t.menuType),t.injectDecider&&(this.injectDecider=t.injectDecider),this.items=t.items,this.siblingSelector=t.siblingSelector,this.position=t.position,this.useObserver=t.useObserver,this.observeTarget=t.observeTarget,this.disposeObserverAfterInjection=t.disposeObserverAfterInjection}async createObserver(){return new MutationObserver(async([n])=>{n.type==="childList"&&await this.handleChildListMutation(n)})}async observe(){if(this._observer=await this.createObserver(),!this._observer)return;const t=await this.getObserveTarget();!t||this.startObserver(t)}async startObserver(t){!this._observer||this._observer.observe(t,{childList:!0})}async disposeObserver(){this.disposeObserverAfterInjection&&this._observer&&this._observer.disconnect()}async getObserveTarget(){return typeof this.observeTarget=="string"?(await us(this.observeTarget,800,6048e5))[0]:this.observeTarget}async isMutationMatch(t){const n=t.addedNodes[0];if(n&&n.nodeType!==Node.ELEMENT_NODE)return!1;switch(this.menuType,Be.dirContext,this.menuType){case Be.listItemHover:return!0;case Be.listItemContext:return n&&n.classList.contains("context-menu")&&!!n.querySelector('[val="report"]');case Be.selection:return!0;case Be.dirContext:return n&&n.classList.contains("context-menu")&&!!n.querySelector('[val="upload"]');default:return!1}}async handleChildListMutation(t){if(!await this.isMutationMatch(t))return;const n=await this.getContainers(t);await this.perform(n)}async perform(t){for(const n of t)await this.injectToContainer(n)}async getSibling(t){return t.querySelector(this.siblingSelector)}async getContainers(t){let n=[];const s=t.addedNodes[0];switch(this.menuType){case Be.listItemHover:document.querySelectorAll("#js_data_list .list-contents > ul:not([ce-done]) > li .file-opr").forEach(i=>{n.push(i)});break;case Be.listItemContext:n=[s];break;case Be.selection:document.querySelectorAll("#js_top_panel_box #js_operate_box").forEach(i=>{n.push(i)});break;case Be.dirContext:n=[s];break}return n}async shouldInjectMenuItem(t,n){return await n.decideInject(t)?await this.decideInject(n,t):!1}async decideInject(t,n){return this.injectDecider?await this.injectDecider(t,n):!0}async injectToContainer(t){const n=await this.getSibling(t);if(!n)return;let s=this.items.slice();this.position===ps.after&&(s=s.reverse());for(let i=0;i<s.length;i++){const o=s[i];if(!await this.shouldInjectMenuItem(t,o))continue;const r=await o.render();this.position===ps.before?n.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("afterend",r),await o.decorateContainer(t)}}async isFileContainer(t){return!!t.getAttribute("file_id")}async isDirContainer(t){return!!t.getAttribute("cate_id")}async inject(){if(!!this.menuType)if(this.useObserver)await this.observe();else{const t=await this.getObserveTarget();if(!t)return;await this.injectToContainer(t)}}}class xb extends jo{constructor(){super(...arguments);be(this,"menuType",Be.dirContext);be(this,"useObserver",!0);be(this,"observeTarget",document.body);be(this,"disposeObserverAfterInjection",!0)}}class Cb extends jo{constructor(){super(...arguments);be(this,"menuType",Be.listItemContext)}}class $b extends jo{constructor(n){super(n);be(this,"menuType",Be.listItemHover);be(this,"useObserver",!0);be(this,"observeTarget","#js_data_list");be(this,"disposeObserverAfterInjection",!1);this.handleLoadAll()}async inject(){const n=document.querySelector("#js_data_list");if(n){const s=n.querySelectorAll(".list-contents > ul:not([ce-done]) > li .file-opr");s.length&&await this.perform(Array.from(s))}super.inject()}async handleLoadAll(){if(window.top===window.self)return;const n=document.querySelector("#js_pagination_box");if(!n){console.warn("[ListItemHoverMenuInjector.handleLoadAll] 未找到「#js_pagination_box」元素");return}function s(i){const o=document.querySelector("#js_data_list .list-contents > ul > li");!o||o.querySelector(".ce-menu")||i(!0)}n.addEventListener("click",async i=>{i.preventDefault(),i.stopPropagation();const o=i.target;let r=!1;if((o.getAttribute("menu")==="load_all_file"||o.closest('[menu="load_all_file"]'))&&(r=!0),!r)return;console.log("[ListItemHoverMenuInjector.handleLoadAll] 点击了「加载全部」按钮"),await jn(s,500,3e5);const a=document.querySelector("#js_data_list .list-contents > ul");a==null||a.removeAttribute("ce-done");const l=document.querySelector("#js_data_list");if(l){const u=".list-contents > ul:not([ce-done]) > li .file-opr";if(!document.querySelector(u)){const h=await Ws();await rd(h)}const f=l.querySelectorAll(u);f.length&&await this.perform(Array.from(f))}})}async perform(n){await super.perform(n);const s=document.querySelector("#js_data_list .list-contents > ul");s==null||s.setAttribute("ce-done","")}}class Eb extends jo{constructor(){super(...arguments);be(this,"menuType",Be.selection);be(this,"useObserver",!0);be(this,"observeTarget","#js_top_panel_box #js_operate_box");be(this,"disposeObserverAfterInjection",!1)}}async function yd(e,t){return!!$(t).closest("li").attr("cate_id")}async function kb(e,t){const n=$(t).closest("li");if(n.attr("cate_id")||n.attr("iv")==="1")return!0;const s=n.attr("ico");return s?Tm(s)||Om(s)||Lm(s):!1}function ja(e,t){const n=Object.create(null),s=e.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function An(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=at(s)?Ib(s):An(s);if(i)for(const o in i)t[o]=i[o]}return t}else{if(at(e))return e;if(Qe(e))return e}}const Sb=/;(?![^(]*\))/g,Ab=/:([^]+)/,Pb=/\/\*.*?\*\//gs;function Ib(e){const t={};return e.replace(Pb,"").split(Sb).forEach(n=>{if(n){const s=n.split(Ab);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ye(e){let t="";if(at(e))t=e;else if(Te(e))for(let n=0;n<e.length;n++){const s=Ye(e[n]);s&&(t+=s+" ")}else if(Qe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Tb(e){if(!e)return null;let{class:t,style:n}=e;return t&&!at(t)&&(e.class=Ye(t)),n&&(e.style=An(n)),e}const Lb=ja("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function wd(e){return!!e||e===""}function Ob(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Li(e[s],t[s]);return n}function Li(e,t){if(e===t)return!0;let n=_d(e),s=_d(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Oi(e),s=Oi(t),n||s)return e===t;if(n=Te(e),s=Te(t),n||s)return n&&s?Ob(e,t):!1;if(n=Qe(e),s=Qe(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Li(e[r],t[r]))return!1}}return String(e)===String(t)}function Ha(e,t){return e.findIndex(n=>Li(n,t))}const me=e=>at(e)?e:e==null?"":Te(e)||Qe(e)&&(e.toString===vd||!Re(e.toString))?JSON.stringify(e,bd,2):String(e),bd=(e,t)=>t&&t.__v_isRef?bd(e,t.value):Ys(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i])=>(n[`${s} =>`]=i,n),{})}:Js(t)?{[`Set(${t.size})`]:[...t.values()]}:Qe(t)&&!Te(t)&&!xd(t)?String(t):t,et={},Gs=[],nn=()=>{},Db=()=>!1,Mb=/^on[^a-z]/,Ho=e=>Mb.test(e),qa=e=>e.startsWith("onUpdate:"),At=Object.assign,za=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Rb=Object.prototype.hasOwnProperty,Ve=(e,t)=>Rb.call(e,t),Te=Array.isArray,Ys=e=>Di(e)==="[object Map]",Js=e=>Di(e)==="[object Set]",_d=e=>Di(e)==="[object Date]",Re=e=>typeof e=="function",at=e=>typeof e=="string",Oi=e=>typeof e=="symbol",Qe=e=>e!==null&&typeof e=="object",Va=e=>Qe(e)&&Re(e.then)&&Re(e.catch),vd=Object.prototype.toString,Di=e=>vd.call(e),Nb=e=>Di(e).slice(8,-1),xd=e=>Di(e)==="[object Object]",Wa=e=>at(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qo=ja(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Bb=/-(\w)/g,gn=zo(e=>e.replace(Bb,(t,n)=>n?n.toUpperCase():"")),Fb=/\B([A-Z])/g,gs=zo(e=>e.replace(Fb,"-$1").toLowerCase()),Vo=zo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ka=zo(e=>e?`on${Vo(e)}`:""),Mi=(e,t)=>!Object.is(e,t),Wo=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ko=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Go=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ub=e=>{const t=at(e)?Number(e):NaN;return isNaN(t)?e:t};let Cd;const jb=()=>Cd||(Cd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let sn;class Hb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=sn,!t&&sn&&(this.index=(sn.scopes||(sn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=sn;try{return sn=this,t()}finally{sn=n}}}on(){sn=this}off(){sn=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function qb(e,t=sn){t&&t.active&&t.effects.push(e)}function zb(){return sn}const Ga=e=>{const t=new Set(e);return t.w=0,t.n=0,t},$d=e=>(e.w&Kn)>0,Ed=e=>(e.n&Kn)>0,Vb=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Kn},Wb=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const i=t[s];$d(i)&&!Ed(i)?i.delete(e):t[n++]=i,i.w&=~Kn,i.n&=~Kn}t.length=n}},Yo=new WeakMap;let Ri=0,Kn=1;const Ya=30;let on;const ys=Symbol(""),Ja=Symbol("");class Qa{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,qb(this,s)}run(){if(!this.active)return this.fn();let t=on,n=Gn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=on,on=this,Gn=!0,Kn=1<<++Ri,Ri<=Ya?Vb(this):kd(this),this.fn()}finally{Ri<=Ya&&Wb(this),Kn=1<<--Ri,on=this.parent,Gn=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){on===this?this.deferStop=!0:this.active&&(kd(this),this.onStop&&this.onStop(),this.active=!1)}}function kd(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Gn=!0;const Sd=[];function Qs(){Sd.push(Gn),Gn=!1}function Xs(){const e=Sd.pop();Gn=e===void 0?!0:e}function Ut(e,t,n){if(Gn&&on){let s=Yo.get(e);s||Yo.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=Ga()),Ad(i)}}function Ad(e,t){let n=!1;Ri<=Ya?Ed(e)||(e.n|=Kn,n=!$d(e)):n=!e.has(on),n&&(e.add(on),on.deps.push(e))}function Pn(e,t,n,s,i,o){const r=Yo.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&Te(e)){const l=Number(s);r.forEach((u,f)=>{(f==="length"||f>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":Te(e)?Wa(n)&&a.push(r.get("length")):(a.push(r.get(ys)),Ys(e)&&a.push(r.get(Ja)));break;case"delete":Te(e)||(a.push(r.get(ys)),Ys(e)&&a.push(r.get(Ja)));break;case"set":Ys(e)&&a.push(r.get(ys));break}if(a.length===1)a[0]&&Xa(a[0]);else{const l=[];for(const u of a)u&&l.push(...u);Xa(Ga(l))}}function Xa(e,t){const n=Te(e)?e:[...e];for(const s of n)s.computed&&Pd(s);for(const s of n)s.computed||Pd(s)}function Pd(e,t){(e!==on||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function Kb(e,t){var n;return(n=Yo.get(e))===null||n===void 0?void 0:n.get(t)}const Gb=ja("__proto__,__v_isRef,__isVue"),Id=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Oi)),Yb=Za(),Jb=Za(!1,!0),Qb=Za(!0),Td=Xb();function Xb(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Ke(this);for(let o=0,r=this.length;o<r;o++)Ut(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(Ke)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Qs();const s=Ke(this)[t].apply(this,n);return Xs(),s}}),e}function Zb(e){const t=Ke(this);return Ut(t,"has",e),t.hasOwnProperty(e)}function Za(e=!1,t=!1){return function(s,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?m_:Ud:t?Fd:Bd).get(s))return s;const r=Te(s);if(!e){if(r&&Ve(Td,i))return Reflect.get(Td,i,o);if(i==="hasOwnProperty")return Zb}const a=Reflect.get(s,i,o);return(Oi(i)?Id.has(i):Gb(i))||(e||Ut(s,"get",i),t)?a:wt(a)?r&&Wa(i)?a:a.value:Qe(a)?e?jd(a):nr(a):a}}const e_=Ld(),t_=Ld(!0);function Ld(e=!1){return function(n,s,i,o){let r=n[s];if(ei(r)&&wt(r)&&!wt(i))return!1;if(!e&&(!sr(i)&&!ei(i)&&(r=Ke(r),i=Ke(i)),!Te(n)&&wt(r)&&!wt(i)))return r.value=i,!0;const a=Te(n)&&Wa(s)?Number(s)<n.length:Ve(n,s),l=Reflect.set(n,s,i,o);return n===Ke(o)&&(a?Mi(i,r)&&Pn(n,"set",s,i):Pn(n,"add",s,i)),l}}function n_(e,t){const n=Ve(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&Pn(e,"delete",t,void 0),s}function s_(e,t){const n=Reflect.has(e,t);return(!Oi(t)||!Id.has(t))&&Ut(e,"has",t),n}function i_(e){return Ut(e,"iterate",Te(e)?"length":ys),Reflect.ownKeys(e)}const Od={get:Yb,set:e_,deleteProperty:n_,has:s_,ownKeys:i_},o_={get:Qb,set(e,t){return!0},deleteProperty(e,t){return!0}},r_=At({},Od,{get:Jb,set:t_}),el=e=>e,Jo=e=>Reflect.getPrototypeOf(e);function Qo(e,t,n=!1,s=!1){e=e.__v_raw;const i=Ke(e),o=Ke(t);n||(t!==o&&Ut(i,"get",t),Ut(i,"get",o));const{has:r}=Jo(i),a=s?el:n?sl:Ni;if(r.call(i,t))return a(e.get(t));if(r.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function Xo(e,t=!1){const n=this.__v_raw,s=Ke(n),i=Ke(e);return t||(e!==i&&Ut(s,"has",e),Ut(s,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Zo(e,t=!1){return e=e.__v_raw,!t&&Ut(Ke(e),"iterate",ys),Reflect.get(e,"size",e)}function Dd(e){e=Ke(e);const t=Ke(this);return Jo(t).has.call(t,e)||(t.add(e),Pn(t,"add",e,e)),this}function Md(e,t){t=Ke(t);const n=Ke(this),{has:s,get:i}=Jo(n);let o=s.call(n,e);o||(e=Ke(e),o=s.call(n,e));const r=i.call(n,e);return n.set(e,t),o?Mi(t,r)&&Pn(n,"set",e,t):Pn(n,"add",e,t),this}function Rd(e){const t=Ke(this),{has:n,get:s}=Jo(t);let i=n.call(t,e);i||(e=Ke(e),i=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return i&&Pn(t,"delete",e,void 0),o}function Nd(){const e=Ke(this),t=e.size!==0,n=e.clear();return t&&Pn(e,"clear",void 0,void 0),n}function er(e,t){return function(s,i){const o=this,r=o.__v_raw,a=Ke(r),l=t?el:e?sl:Ni;return!e&&Ut(a,"iterate",ys),r.forEach((u,f)=>s.call(i,l(u),l(f),o))}}function tr(e,t,n){return function(...s){const i=this.__v_raw,o=Ke(i),r=Ys(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,u=i[e](...s),f=n?el:t?sl:Ni;return!t&&Ut(o,"iterate",l?Ja:ys),{next(){const{value:h,done:y}=u.next();return y?{value:h,done:y}:{value:a?[f(h[0]),f(h[1])]:f(h),done:y}},[Symbol.iterator](){return this}}}}function Yn(e){return function(...t){return e==="delete"?!1:this}}function a_(){const e={get(o){return Qo(this,o)},get size(){return Zo(this)},has:Xo,add:Dd,set:Md,delete:Rd,clear:Nd,forEach:er(!1,!1)},t={get(o){return Qo(this,o,!1,!0)},get size(){return Zo(this)},has:Xo,add:Dd,set:Md,delete:Rd,clear:Nd,forEach:er(!1,!0)},n={get(o){return Qo(this,o,!0)},get size(){return Zo(this,!0)},has(o){return Xo.call(this,o,!0)},add:Yn("add"),set:Yn("set"),delete:Yn("delete"),clear:Yn("clear"),forEach:er(!0,!1)},s={get(o){return Qo(this,o,!0,!0)},get size(){return Zo(this,!0)},has(o){return Xo.call(this,o,!0)},add:Yn("add"),set:Yn("set"),delete:Yn("delete"),clear:Yn("clear"),forEach:er(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=tr(o,!1,!1),n[o]=tr(o,!0,!1),t[o]=tr(o,!1,!0),s[o]=tr(o,!0,!0)}),[e,n,t,s]}const[l_,c_,u_,d_]=a_();function tl(e,t){const n=t?e?d_:u_:e?c_:l_;return(s,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(Ve(n,i)&&i in s?n:s,i,o)}const f_={get:tl(!1,!1)},p_={get:tl(!1,!0)},h_={get:tl(!0,!1)},Bd=new WeakMap,Fd=new WeakMap,Ud=new WeakMap,m_=new WeakMap;function g_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function y_(e){return e.__v_skip||!Object.isExtensible(e)?0:g_(Nb(e))}function nr(e){return ei(e)?e:nl(e,!1,Od,f_,Bd)}function w_(e){return nl(e,!1,r_,p_,Fd)}function jd(e){return nl(e,!0,o_,h_,Ud)}function nl(e,t,n,s,i){if(!Qe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=y_(e);if(r===0)return e;const a=new Proxy(e,r===2?s:n);return i.set(e,a),a}function Zs(e){return ei(e)?Zs(e.__v_raw):!!(e&&e.__v_isReactive)}function ei(e){return!!(e&&e.__v_isReadonly)}function sr(e){return!!(e&&e.__v_isShallow)}function Hd(e){return Zs(e)||ei(e)}function Ke(e){const t=e&&e.__v_raw;return t?Ke(t):e}function qd(e){return Ko(e,"__v_skip",!0),e}const Ni=e=>Qe(e)?nr(e):e,sl=e=>Qe(e)?jd(e):e;function zd(e){Gn&&on&&(e=Ke(e),Ad(e.dep||(e.dep=Ga())))}function Vd(e,t){e=Ke(e);const n=e.dep;n&&Xa(n)}function wt(e){return!!(e&&e.__v_isRef===!0)}function ue(e){return b_(e,!1)}function b_(e,t){return wt(e)?e:new __(e,t)}class __{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ke(t),this._value=n?t:Ni(t)}get value(){return zd(this),this._value}set value(t){const n=this.__v_isShallow||sr(t)||ei(t);t=n?t:Ke(t),Mi(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Ni(t),Vd(this))}}function de(e){return wt(e)?e.value:e}const v_={get:(e,t,n)=>de(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return wt(i)&&!wt(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function Wd(e){return Zs(e)?e:new Proxy(e,v_)}function x_(e){const t=Te(e)?new Array(e.length):{};for(const n in e)t[n]=$_(e,n);return t}class C_{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Kb(Ke(this._object),this._key)}}function $_(e,t,n){const s=e[t];return wt(s)?s:new C_(e,t,n)}var Kd;class E_{constructor(t,n,s,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Kd]=!1,this._dirty=!0,this.effect=new Qa(t,()=>{this._dirty||(this._dirty=!0,Vd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const t=Ke(this);return zd(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Kd="__v_isReadonly";function k_(e,t,n=!1){let s,i;const o=Re(e);return o?(s=e,i=nn):(s=e.get,i=e.set),new E_(s,i,o||!i,n)}function e5(e,...t){}function Jn(e,t,n,s){let i;try{i=s?e(...s):e()}catch(o){Bi(o,t,n)}return i}function rn(e,t,n,s){if(Re(e)){const o=Jn(e,t,n,s);return o&&Va(o)&&o.catch(r=>{Bi(r,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(rn(e[o],t,n,s));return i}function Bi(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.proxy,a=n;for(;o;){const u=o.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){Jn(l,null,10,[e,r,a]);return}}S_(e,n,i,s)}function S_(e,t,n,s=!0){console.error(e)}let Fi=!1,il=!1;const xt=[];let yn=0;const ti=[];let In=null,ws=0;const Gd=Promise.resolve();let ol=null;function ni(e){const t=ol||Gd;return e?t.then(this?e.bind(this):e):t}function A_(e){let t=yn+1,n=xt.length;for(;t<n;){const s=t+n>>>1;Ui(xt[s])<e?t=s+1:n=s}return t}function rl(e){(!xt.length||!xt.includes(e,Fi&&e.allowRecurse?yn+1:yn))&&(e.id==null?xt.push(e):xt.splice(A_(e.id),0,e),Yd())}function Yd(){!Fi&&!il&&(il=!0,ol=Gd.then(Zd))}function P_(e){const t=xt.indexOf(e);t>yn&&xt.splice(t,1)}function Jd(e){Te(e)?ti.push(...e):(!In||!In.includes(e,e.allowRecurse?ws+1:ws))&&ti.push(e),Yd()}function Qd(e,t=Fi?yn+1:0){for(;t<xt.length;t++){const n=xt[t];n&&n.pre&&(xt.splice(t,1),t--,n())}}function Xd(e){if(ti.length){const t=[...new Set(ti)];if(ti.length=0,In){In.push(...t);return}for(In=t,In.sort((n,s)=>Ui(n)-Ui(s)),ws=0;ws<In.length;ws++)In[ws]();In=null,ws=0}}const Ui=e=>e.id==null?1/0:e.id,I_=(e,t)=>{const n=Ui(e)-Ui(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Zd(e){il=!1,Fi=!0,xt.sort(I_);const t=nn;try{for(yn=0;yn<xt.length;yn++){const n=xt[yn];n&&n.active!==!1&&Jn(n,null,14)}}finally{yn=0,xt.length=0,Xd(),Fi=!1,ol=null,(xt.length||ti.length)&&Zd()}}function T_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||et;let i=n;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in s){const f=`${r==="modelValue"?"model":r}Modifiers`,{number:h,trim:y}=s[f]||et;y&&(i=n.map(_=>at(_)?_.trim():_)),h&&(i=n.map(Go))}let a,l=s[a=Ka(t)]||s[a=Ka(gn(t))];!l&&o&&(l=s[a=Ka(gs(t))]),l&&rn(l,e,6,i);const u=s[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,rn(u,e,6,i)}}function ef(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!Re(e)){const l=u=>{const f=ef(u,t,!0);f&&(a=!0,At(r,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Qe(e)&&s.set(e,null),null):(Te(o)?o.forEach(l=>r[l]=null):At(r,o),Qe(e)&&s.set(e,r),r)}function ir(e,t){return!e||!Ho(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ve(e,t[0].toLowerCase()+t.slice(1))||Ve(e,gs(t))||Ve(e,t))}let bt=null,or=null;function rr(e){const t=bt;return bt=e,or=e&&e.type.__scopeId||null,t}function L_(e){or=e}function O_(){or=null}const D_=e=>Je;function Je(e,t=bt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&Af(-1);const o=rr(t);let r;try{r=e(...i)}finally{rr(o),s._d&&Af(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function t5(){}function al(e){const{type:t,vnode:n,proxy:s,withProxy:i,props:o,propsOptions:[r],slots:a,attrs:l,emit:u,render:f,renderCache:h,data:y,setupState:_,ctx:b,inheritAttrs:E}=e;let T,M;const I=rr(e);try{if(n.shapeFlag&4){const V=i||s;T=ln(f.call(V,V,h,o,_,y,b)),M=l}else{const V=t;T=ln(V.length>1?V(o,{attrs:l,slots:a,emit:u}):V(o,null)),M=t.props?l:R_(l)}}catch(V){Wi.length=0,Bi(V,e,1),T=Ce(wn)}let P=T;if(M&&E!==!1){const V=Object.keys(M),{shapeFlag:oe}=P;V.length&&oe&7&&(r&&V.some(qa)&&(M=N_(M,r)),P=oi(P,M))}return n.dirs&&(P=oi(P),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&(P.transition=n.transition),T=P,rr(I),T}function M_(e){let t;for(let n=0;n<e.length;n++){const s=e[n];if(Ki(s)){if(s.type!==wn||s.children==="v-if"){if(t)return;t=s}}else return}return t}const R_=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ho(n))&&((t||(t={}))[n]=e[n]);return t},N_=(e,t)=>{const n={};for(const s in e)(!qa(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function B_(e,t,n){const{props:s,children:i,component:o}=e,{props:r,children:a,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?tf(s,r,u):!!r;if(l&8){const f=t.dynamicProps;for(let h=0;h<f.length;h++){const y=f[h];if(r[y]!==s[y]&&!ir(u,y))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?tf(s,r,u):!0:!!r;return!1}function tf(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(t[o]!==e[o]&&!ir(n,o))return!0}return!1}function ll({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const F_=e=>e.__isSuspense,nf={name:"Suspense",__isSuspense:!0,process(e,t,n,s,i,o,r,a,l,u){e==null?U_(t,n,s,i,o,r,a,l,u):j_(e,t,n,s,i,r,a,l,u)},hydrate:H_,create:cl,normalize:q_};function ji(e,t){const n=e.props&&e.props[t];Re(n)&&n()}function U_(e,t,n,s,i,o,r,a,l){const{p:u,o:{createElement:f}}=l,h=f("div"),y=e.suspense=cl(e,i,s,t,h,n,o,r,a,l);u(null,y.pendingBranch=e.ssContent,h,null,s,y,o,r),y.deps>0?(ji(e,"onPending"),ji(e,"onFallback"),u(null,e.ssFallback,t,n,s,null,o,r),si(y,e.ssFallback)):y.resolve()}function j_(e,t,n,s,i,o,r,a,{p:l,um:u,o:{createElement:f}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const y=t.ssContent,_=t.ssFallback,{activeBranch:b,pendingBranch:E,isInFallback:T,isHydrating:M}=h;if(E)h.pendingBranch=y,Qn(y,E)?(l(E,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0?h.resolve():T&&(l(b,_,n,s,i,null,o,r,a),si(h,_))):(h.pendingId++,M?(h.isHydrating=!1,h.activeBranch=E):u(E,i,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),T?(l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0?h.resolve():(l(b,_,n,s,i,null,o,r,a),si(h,_))):b&&Qn(y,b)?(l(b,y,n,s,i,h,o,r,a),h.resolve(!0)):(l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0&&h.resolve()));else if(b&&Qn(y,b))l(b,y,n,s,i,h,o,r,a),si(h,y);else if(ji(t,"onPending"),h.pendingBranch=y,h.pendingId++,l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0)h.resolve();else{const{timeout:I,pendingId:P}=h;I>0?setTimeout(()=>{h.pendingId===P&&h.fallback(_)},I):I===0&&h.fallback(_)}}function cl(e,t,n,s,i,o,r,a,l,u,f=!1){const{p:h,m:y,um:_,n:b,o:{parentNode:E,remove:T}}=u,M=e.props?Ub(e.props.timeout):void 0,I={vnode:e,parent:t,parentComponent:n,isSVG:r,container:s,hiddenContainer:i,anchor:o,deps:0,pendingId:0,timeout:typeof M=="number"?M:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:f,isUnmounted:!1,effects:[],resolve(P=!1){const{vnode:V,activeBranch:oe,pendingBranch:j,pendingId:X,effects:le,parentComponent:ge,container:Le}=I;if(I.isHydrating)I.isHydrating=!1;else if(!P){const ie=oe&&j.transition&&j.transition.mode==="out-in";ie&&(oe.transition.afterLeave=()=>{X===I.pendingId&&y(j,Le,G,0)});let{anchor:G}=I;oe&&(G=b(oe),_(oe,ge,I,!0)),ie||y(j,Le,G,0)}si(I,j),I.pendingBranch=null,I.isInFallback=!1;let _e=I.parent,L=!1;for(;_e;){if(_e.pendingBranch){_e.effects.push(...le),L=!0;break}_e=_e.parent}L||Jd(le),I.effects=[],ji(V,"onResolve")},fallback(P){if(!I.pendingBranch)return;const{vnode:V,activeBranch:oe,parentComponent:j,container:X,isSVG:le}=I;ji(V,"onFallback");const ge=b(oe),Le=()=>{!I.isInFallback||(h(null,P,X,ge,j,null,le,a,l),si(I,P))},_e=P.transition&&P.transition.mode==="out-in";_e&&(oe.transition.afterLeave=Le),I.isInFallback=!0,_(oe,j,null,!0),_e||Le()},move(P,V,oe){I.activeBranch&&y(I.activeBranch,P,V,oe),I.container=P},next(){return I.activeBranch&&b(I.activeBranch)},registerDep(P,V){const oe=!!I.pendingBranch;oe&&I.deps++;const j=P.vnode.el;P.asyncDep.catch(X=>{Bi(X,P,0)}).then(X=>{if(P.isUnmounted||I.isUnmounted||I.pendingId!==P.suspenseId)return;P.asyncResolved=!0;const{vnode:le}=P;bl(P,X,!1),j&&(le.el=j);const ge=!j&&P.subTree.el;V(P,le,E(j||P.subTree.el),j?null:b(P.subTree),I,r,l),ge&&T(ge),ll(P,le.el),oe&&--I.deps===0&&I.resolve()})},unmount(P,V){I.isUnmounted=!0,I.activeBranch&&_(I.activeBranch,n,P,V),I.pendingBranch&&_(I.pendingBranch,n,P,V)}};return I}function H_(e,t,n,s,i,o,r,a,l){const u=t.suspense=cl(t,s,n,e.parentNode,document.createElement("div"),null,i,o,r,a,!0),f=l(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(),f}function q_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=sf(s?n.default:n),e.ssFallback=s?sf(n.fallback):Ce(wn)}function sf(e){let t;if(Re(e)){const n=ii&&e._c;n&&(e._d=!1,N()),e=e(),n&&(e._d=!0,t=Xt,Sf())}return Te(e)&&(e=M_(e)),e=ln(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function z_(e,t){t&&t.pendingBranch?Te(e)?t.effects.push(...e):t.effects.push(e):Jd(e)}function si(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e,i=n.el=t.el;s&&s.subTree===n&&(s.vnode.el=i,ll(s,i))}function Hi(e,t){if(lt){let n=lt.provides;const s=lt.parent&&lt.parent.provides;s===n&&(n=lt.provides=Object.create(s)),n[e]=t}}function qi(e,t,n=!1){const s=lt||bt;if(s){const i=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Re(t)?t.call(s.proxy):t}}const ar={};function dt(e,t,n){return of(e,t,n)}function of(e,t,{immediate:n,deep:s,flush:i,onTrack:o,onTrigger:r}=et){const a=zb()===(lt==null?void 0:lt.scope)?lt:null;let l,u=!1,f=!1;if(wt(e)?(l=()=>e.value,u=sr(e)):Zs(e)?(l=()=>e,s=!0):Te(e)?(f=!0,u=e.some(P=>Zs(P)||sr(P)),l=()=>e.map(P=>{if(wt(P))return P.value;if(Zs(P))return bs(P);if(Re(P))return Jn(P,a,2)})):Re(e)?t?l=()=>Jn(e,a,2):l=()=>{if(!(a&&a.isUnmounted))return h&&h(),rn(e,a,3,[y])}:l=nn,t&&s){const P=l;l=()=>bs(P())}let h,y=P=>{h=M.onStop=()=>{Jn(P,a,4)}},_;if(Gi)if(y=nn,t?n&&rn(t,a,3,[l(),f?[]:void 0,y]):l(),i==="sync"){const P=Ov();_=P.__watcherHandles||(P.__watcherHandles=[])}else return nn;let b=f?new Array(e.length).fill(ar):ar;const E=()=>{if(!!M.active)if(t){const P=M.run();(s||u||(f?P.some((V,oe)=>Mi(V,b[oe])):Mi(P,b)))&&(h&&h(),rn(t,a,3,[P,b===ar?void 0:f&&b[0]===ar?[]:b,y]),b=P)}else M.run()};E.allowRecurse=!!t;let T;i==="sync"?T=E:i==="post"?T=()=>jt(E,a&&a.suspense):(E.pre=!0,a&&(E.id=a.uid),T=()=>rl(E));const M=new Qa(l,T);t?n?E():b=M.run():i==="post"?jt(M.run.bind(M),a&&a.suspense):M.run();const I=()=>{M.stop(),a&&a.scope&&za(a.scope.effects,M)};return _&&_.push(I),I}function V_(e,t,n){const s=this.proxy,i=at(e)?e.includes(".")?rf(s,e):()=>s[e]:e.bind(s,s);let o;Re(t)?o=t:(o=t.handler,n=t);const r=lt;Zn(this);const a=of(i,o.bind(s),n);return r?Zn(r):es(),a}function rf(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function bs(e,t){if(!Qe(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),wt(e))bs(e.value,t);else if(Te(e))for(let n=0;n<e.length;n++)bs(e[n],t);else if(Js(e)||Ys(e))e.forEach(n=>{bs(n,t)});else if(xd(e))for(const n in e)bs(e[n],t);return e}function Ne(e){return Re(e)?{setup:e,name:e.name}:e}const zi=e=>!!e.type.__asyncLoader,af=e=>e.type.__isKeepAlive;function W_(e,t){lf(e,"a",t)}function K_(e,t){lf(e,"da",t)}function lf(e,t,n=lt){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(lr(t,s,n),n){let i=n.parent;for(;i&&i.parent;)af(i.parent.vnode)&&G_(s,t,n,i),i=i.parent}}function G_(e,t,n,s){const i=lr(t,e,s,!0);_s(()=>{za(s[t],i)},n)}function lr(e,t,n=lt,s=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;Qs(),Zn(n);const a=rn(t,n,e,r);return es(),Xs(),a});return s?i.unshift(o):i.push(o),o}}const Tn=e=>(t,n=lt)=>(!Gi||e==="sp")&&lr(e,(...s)=>t(...s),n),Pt=Tn("bm"),It=Tn("m"),Y_=Tn("bu"),J_=Tn("u"),cf=Tn("bum"),_s=Tn("um"),Q_=Tn("sp"),X_=Tn("rtg"),Z_=Tn("rtc");function ev(e,t=lt){lr("ec",e,t)}function z(e,t){const n=bt;if(n===null)return e;const s=hr(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,a,l,u=et]=t[o];r&&(Re(r)&&(r={mounted:r,updated:r}),r.deep&&bs(a),i.push({dir:r,instance:s,value:a,oldValue:void 0,arg:l,modifiers:u}))}return e}function vs(e,t,n,s){const i=e.dirs,o=t&&t.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(Qs(),rn(l,n,8,[e.el,a,e,t]),Xs())}}const uf="components";function xs(e,t){return nv(uf,e,!0,t)||e}const tv=Symbol();function nv(e,t,n=!0,s=!1){const i=bt||lt;if(i){const o=i.type;if(e===uf){const a=Pv(o,!1);if(a&&(a===t||a===gn(t)||a===Vo(gn(t))))return o}const r=df(i[e]||o[e],t)||df(i.appContext[e],t);return!r&&s?o:r}}function df(e,t){return e&&(e[t]||e[gn(t)]||e[Vo(gn(t))])}function nt(e,t,n,s){let i;const o=n&&n[s];if(Te(e)||at(e)){i=new Array(e.length);for(let r=0,a=e.length;r<a;r++)i[r]=t(e[r],r,void 0,o&&o[r])}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o&&o[r])}else if(Qe(e))if(e[Symbol.iterator])i=Array.from(e,(r,a)=>t(r,a,void 0,o&&o[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const u=r[a];i[a]=t(e[u],u,a,o&&o[a])}}else i=[];return n&&(n[s]=i),i}function an(e,t,n={},s,i){if(bt.isCE||bt.parent&&zi(bt.parent)&&bt.parent.isCE)return t!=="default"&&(n.name=t),Ce("slot",n,s&&s());let o=e[t];o&&o._c&&(o._d=!1),N();const r=o&&ff(o(n)),a=Zt(Fe,{key:n.key||r&&r.key||`_${t}`},r||(s?s():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function ff(e){return e.some(t=>Ki(t)?!(t.type===wn||t.type===Fe&&!ff(t.children)):!0)?e:null}const ul=e=>e?Df(e)?hr(e)||e.proxy:ul(e.parent):null,Vi=At(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ul(e.parent),$root:e=>ul(e.root),$emit:e=>e.emit,$options:e=>pl(e),$forceUpdate:e=>e.f||(e.f=()=>rl(e.update)),$nextTick:e=>e.n||(e.n=ni.bind(e.proxy)),$watch:e=>V_.bind(e)}),dl=(e,t)=>e!==et&&!e.__isScriptSetup&&Ve(e,t),sv={get({_:e},t){const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const _=r[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(dl(s,t))return r[t]=1,s[t];if(i!==et&&Ve(i,t))return r[t]=2,i[t];if((u=e.propsOptions[0])&&Ve(u,t))return r[t]=3,o[t];if(n!==et&&Ve(n,t))return r[t]=4,n[t];fl&&(r[t]=0)}}const f=Vi[t];let h,y;if(f)return t==="$attrs"&&Ut(e,"get",t),f(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==et&&Ve(n,t))return r[t]=4,n[t];if(y=l.config.globalProperties,Ve(y,t))return y[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:o}=e;return dl(i,t)?(i[t]=n,!0):s!==et&&Ve(s,t)?(s[t]=n,!0):Ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:o}},r){let a;return!!n[r]||e!==et&&Ve(e,r)||dl(t,r)||(a=o[0])&&Ve(a,r)||Ve(s,r)||Ve(Vi,r)||Ve(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ve(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let fl=!0;function iv(e){const t=pl(e),n=e.proxy,s=e.ctx;fl=!1,t.beforeCreate&&pf(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:u,created:f,beforeMount:h,mounted:y,beforeUpdate:_,updated:b,activated:E,deactivated:T,beforeDestroy:M,beforeUnmount:I,destroyed:P,unmounted:V,render:oe,renderTracked:j,renderTriggered:X,errorCaptured:le,serverPrefetch:ge,expose:Le,inheritAttrs:_e,components:L,directives:ie,filters:G}=t;if(u&&ov(u,s,null,e.appContext.config.unwrapInjectedRef),r)for(const Z in r){const B=r[Z];Re(B)&&(s[Z]=B.bind(n))}if(i){const Z=i.call(n,n);Qe(Z)&&(e.data=nr(Z))}if(fl=!0,o)for(const Z in o){const B=o[Z],ye=Re(B)?B.bind(n,n):Re(B.get)?B.get.bind(n,n):nn,Ee=!Re(B)&&Re(B.set)?B.set.bind(n):nn,Oe=cn({get:ye,set:Ee});Object.defineProperty(s,Z,{enumerable:!0,configurable:!0,get:()=>Oe.value,set:ce=>Oe.value=ce})}if(a)for(const Z in a)hf(a[Z],s,n,Z);if(l){const Z=Re(l)?l.call(n):l;Reflect.ownKeys(Z).forEach(B=>{Hi(B,Z[B])})}f&&pf(f,e,"c");function D(Z,B){Te(B)?B.forEach(ye=>Z(ye.bind(n))):B&&Z(B.bind(n))}if(D(Pt,h),D(It,y),D(Y_,_),D(J_,b),D(W_,E),D(K_,T),D(ev,le),D(Z_,j),D(X_,X),D(cf,I),D(_s,V),D(Q_,ge),Te(Le))if(Le.length){const Z=e.exposed||(e.exposed={});Le.forEach(B=>{Object.defineProperty(Z,B,{get:()=>n[B],set:ye=>n[B]=ye})})}else e.exposed||(e.exposed={});oe&&e.render===nn&&(e.render=oe),_e!=null&&(e.inheritAttrs=_e),L&&(e.components=L),ie&&(e.directives=ie)}function ov(e,t,n=nn,s=!1){Te(e)&&(e=hl(e));for(const i in e){const o=e[i];let r;Qe(o)?"default"in o?r=qi(o.from||i,o.default,!0):r=qi(o.from||i):r=qi(o),wt(r)&&s?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):t[i]=r}}function pf(e,t,n){rn(Te(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function hf(e,t,n,s){const i=s.includes(".")?rf(n,s):()=>n[s];if(at(e)){const o=t[e];Re(o)&&dt(i,o)}else if(Re(e))dt(i,e.bind(n));else if(Qe(e))if(Te(e))e.forEach(o=>hf(o,t,n,s));else{const o=Re(e.handler)?e.handler.bind(n):t[e.handler];Re(o)&&dt(i,o,e)}}function pl(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let l;return a?l=a:!i.length&&!n&&!s?l=t:(l={},i.length&&i.forEach(u=>cr(l,u,r,!0)),cr(l,t,r)),Qe(t)&&o.set(t,l),l}function cr(e,t,n,s=!1){const{mixins:i,extends:o}=t;o&&cr(e,o,n,!0),i&&i.forEach(r=>cr(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const a=rv[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const rv={data:mf,props:Cs,emits:Cs,methods:Cs,computed:Cs,beforeCreate:Tt,created:Tt,beforeMount:Tt,mounted:Tt,beforeUpdate:Tt,updated:Tt,beforeDestroy:Tt,beforeUnmount:Tt,destroyed:Tt,unmounted:Tt,activated:Tt,deactivated:Tt,errorCaptured:Tt,serverPrefetch:Tt,components:Cs,directives:Cs,watch:lv,provide:mf,inject:av};function mf(e,t){return t?e?function(){return At(Re(e)?e.call(this,this):e,Re(t)?t.call(this,this):t)}:t:e}function av(e,t){return Cs(hl(e),hl(t))}function hl(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Tt(e,t){return e?[...new Set([].concat(e,t))]:t}function Cs(e,t){return e?At(At(Object.create(null),e),t):t}function lv(e,t){if(!e)return t;if(!t)return e;const n=At(Object.create(null),e);for(const s in t)n[s]=Tt(e[s],t[s]);return n}function cv(e,t,n,s=!1){const i={},o={};Ko(o,fr,1),e.propsDefaults=Object.create(null),gf(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:w_(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function uv(e,t,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,a=Ke(i),[l]=e.propsOptions;let u=!1;if((s||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let h=0;h<f.length;h++){let y=f[h];if(ir(e.emitsOptions,y))continue;const _=t[y];if(l)if(Ve(o,y))_!==o[y]&&(o[y]=_,u=!0);else{const b=gn(y);i[b]=ml(l,a,b,_,e,!1)}else _!==o[y]&&(o[y]=_,u=!0)}}}else{gf(e,t,i,o)&&(u=!0);let f;for(const h in a)(!t||!Ve(t,h)&&((f=gs(h))===h||!Ve(t,f)))&&(l?n&&(n[h]!==void 0||n[f]!==void 0)&&(i[h]=ml(l,a,h,void 0,e,!0)):delete i[h]);if(o!==a)for(const h in o)(!t||!Ve(t,h)&&!0)&&(delete o[h],u=!0)}u&&Pn(e,"set","$attrs")}function gf(e,t,n,s){const[i,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(qo(l))continue;const u=t[l];let f;i&&Ve(i,f=gn(l))?!o||!o.includes(f)?n[f]=u:(a||(a={}))[f]=u:ir(e.emitsOptions,l)||(!(l in s)||u!==s[l])&&(s[l]=u,r=!0)}if(o){const l=Ke(n),u=a||et;for(let f=0;f<o.length;f++){const h=o[f];n[h]=ml(i,l,h,u[h],e,!Ve(u,h))}}return r}function ml(e,t,n,s,i,o){const r=e[n];if(r!=null){const a=Ve(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&Re(l)){const{propsDefaults:u}=i;n in u?s=u[n]:(Zn(i),s=u[n]=l.call(null,t),es())}else s=l}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===gs(n))&&(s=!0))}return s}function yf(e,t,n=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const o=e.props,r={},a=[];let l=!1;if(!Re(e)){const f=h=>{l=!0;const[y,_]=yf(h,t,!0);At(r,y),_&&a.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!l)return Qe(e)&&s.set(e,Gs),Gs;if(Te(o))for(let f=0;f<o.length;f++){const h=gn(o[f]);wf(h)&&(r[h]=et)}else if(o)for(const f in o){const h=gn(f);if(wf(h)){const y=o[f],_=r[h]=Te(y)||Re(y)?{type:y}:Object.assign({},y);if(_){const b=vf(Boolean,_.type),E=vf(String,_.type);_[0]=b>-1,_[1]=E<0||b<E,(b>-1||Ve(_,"default"))&&a.push(h)}}}const u=[r,a];return Qe(e)&&s.set(e,u),u}function wf(e){return e[0]!=="$"}function bf(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function _f(e,t){return bf(e)===bf(t)}function vf(e,t){return Te(t)?t.findIndex(n=>_f(n,e)):Re(t)&&_f(t,e)?0:-1}const xf=e=>e[0]==="_"||e==="$stable",gl=e=>Te(e)?e.map(ln):[ln(e)],dv=(e,t,n)=>{if(t._n)return t;const s=Je((...i)=>gl(t(...i)),n);return s._c=!1,s},Cf=(e,t,n)=>{const s=e._ctx;for(const i in e){if(xf(i))continue;const o=e[i];if(Re(o))t[i]=dv(i,o,s);else if(o!=null){const r=gl(o);t[i]=()=>r}}},$f=(e,t)=>{const n=gl(t);e.slots.default=()=>n},fv=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ke(t),Ko(t,"_",n)):Cf(t,e.slots={})}else e.slots={},t&&$f(e,t);Ko(e.slots,fr,1)},pv=(e,t,n)=>{const{vnode:s,slots:i}=e;let o=!0,r=et;if(s.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:(At(i,t),!n&&a===1&&delete i._):(o=!t.$stable,Cf(t,i)),r=t}else t&&($f(e,t),r={default:1});if(o)for(const a in i)!xf(a)&&!(a in r)&&delete i[a]};function Ef(){return{app:null,config:{isNativeTag:Db,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let hv=0;function mv(e,t){return function(s,i=null){Re(s)||(s=Object.assign({},s)),i!=null&&!Qe(i)&&(i=null);const o=Ef(),r=new Set;let a=!1;const l=o.app={_uid:hv++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:Dv,get config(){return o.config},set config(u){},use(u,...f){return r.has(u)||(u&&Re(u.install)?(r.add(u),u.install(l,...f)):Re(u)&&(r.add(u),u(l,...f))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,f){return f?(o.components[u]=f,l):o.components[u]},directive(u,f){return f?(o.directives[u]=f,l):o.directives[u]},mount(u,f,h){if(!a){const y=Ce(s,i);return y.appContext=o,f&&t?t(y,u):e(y,u,h),a=!0,l._container=u,u.__vue_app__=l,hr(y.component)||y.component.proxy}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,f){return o.provides[u]=f,l}};return l}}function yl(e,t,n,s,i=!1){if(Te(e)){e.forEach((y,_)=>yl(y,t&&(Te(t)?t[_]:t),n,s,i));return}if(zi(s)&&!i)return;const o=s.shapeFlag&4?hr(s.component)||s.component.proxy:s.el,r=i?null:o,{i:a,r:l}=e,u=t&&t.r,f=a.refs===et?a.refs={}:a.refs,h=a.setupState;if(u!=null&&u!==l&&(at(u)?(f[u]=null,Ve(h,u)&&(h[u]=null)):wt(u)&&(u.value=null)),Re(l))Jn(l,a,12,[r,f]);else{const y=at(l),_=wt(l);if(y||_){const b=()=>{if(e.f){const E=y?Ve(h,l)?h[l]:f[l]:l.value;i?Te(E)&&za(E,o):Te(E)?E.includes(o)||E.push(o):y?(f[l]=[o],Ve(h,l)&&(h[l]=f[l])):(l.value=[o],e.k&&(f[e.k]=l.value))}else y?(f[l]=r,Ve(h,l)&&(h[l]=r)):_&&(l.value=r,e.k&&(f[e.k]=r))};r?(b.id=-1,jt(b,n)):b()}}}const jt=z_;function gv(e){return yv(e)}function yv(e,t){const n=jb();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:u,setElementText:f,parentNode:h,nextSibling:y,setScopeId:_=nn,insertStaticContent:b}=e,E=(C,A,F,ee=null,R=null,re=null,he=!1,ae=null,te=!!A.dynamicChildren)=>{if(C===A)return;C&&!Qn(C,A)&&(ee=ft(C),ce(C,R,re,!0),C=null),A.patchFlag===-2&&(te=!1,A.dynamicChildren=null);const{type:Y,ref:$e,shapeFlag:we}=A;switch(Y){case ur:T(C,A,F,ee);break;case wn:M(C,A,F,ee);break;case dr:C==null&&I(A,F,ee,he);break;case Fe:L(C,A,F,ee,R,re,he,ae,te);break;default:we&1?oe(C,A,F,ee,R,re,he,ae,te):we&6?ie(C,A,F,ee,R,re,he,ae,te):(we&64||we&128)&&Y.process(C,A,F,ee,R,re,he,ae,te,ot)}$e!=null&&R&&yl($e,C&&C.ref,re,A||C,!A)},T=(C,A,F,ee)=>{if(C==null)s(A.el=a(A.children),F,ee);else{const R=A.el=C.el;A.children!==C.children&&u(R,A.children)}},M=(C,A,F,ee)=>{C==null?s(A.el=l(A.children||""),F,ee):A.el=C.el},I=(C,A,F,ee)=>{[C.el,C.anchor]=b(C.children,A,F,ee,C.el,C.anchor)},P=({el:C,anchor:A},F,ee)=>{let R;for(;C&&C!==A;)R=y(C),s(C,F,ee),C=R;s(A,F,ee)},V=({el:C,anchor:A})=>{let F;for(;C&&C!==A;)F=y(C),i(C),C=F;i(A)},oe=(C,A,F,ee,R,re,he,ae,te)=>{he=he||A.type==="svg",C==null?j(A,F,ee,R,re,he,ae,te):ge(C,A,R,re,he,ae,te)},j=(C,A,F,ee,R,re,he,ae)=>{let te,Y;const{type:$e,props:we,shapeFlag:J,transition:Ae,dirs:m}=C;if(te=C.el=r(C.type,re,we&&we.is,we),J&8?f(te,C.children):J&16&&le(C.children,te,null,ee,R,re&&$e!=="foreignObject",he,ae),m&&vs(C,null,ee,"created"),X(te,C,C.scopeId,he,ee),we){for(const x in we)x!=="value"&&!qo(x)&&o(te,x,null,we[x],re,C.children,ee,R,ke);"value"in we&&o(te,"value",null,we.value),(Y=we.onVnodeBeforeMount)&&bn(Y,ee,C)}m&&vs(C,null,ee,"beforeMount");const w=(!R||R&&!R.pendingBranch)&&Ae&&!Ae.persisted;w&&Ae.beforeEnter(te),s(te,A,F),((Y=we&&we.onVnodeMounted)||w||m)&&jt(()=>{Y&&bn(Y,ee,C),w&&Ae.enter(te),m&&vs(C,null,ee,"mounted")},R)},X=(C,A,F,ee,R)=>{if(F&&_(C,F),ee)for(let re=0;re<ee.length;re++)_(C,ee[re]);if(R){let re=R.subTree;if(A===re){const he=R.vnode;X(C,he,he.scopeId,he.slotScopeIds,R.parent)}}},le=(C,A,F,ee,R,re,he,ae,te=0)=>{for(let Y=te;Y<C.length;Y++){const $e=C[Y]=ae?Xn(C[Y]):ln(C[Y]);E(null,$e,A,F,ee,R,re,he,ae)}},ge=(C,A,F,ee,R,re,he)=>{const ae=A.el=C.el;let{patchFlag:te,dynamicChildren:Y,dirs:$e}=A;te|=C.patchFlag&16;const we=C.props||et,J=A.props||et;let Ae;F&&$s(F,!1),(Ae=J.onVnodeBeforeUpdate)&&bn(Ae,F,A,C),$e&&vs(A,C,F,"beforeUpdate"),F&&$s(F,!0);const m=R&&A.type!=="foreignObject";if(Y?Le(C.dynamicChildren,Y,ae,F,ee,m,re):he||B(C,A,ae,null,F,ee,m,re,!1),te>0){if(te&16)_e(ae,A,we,J,F,ee,R);else if(te&2&&we.class!==J.class&&o(ae,"class",null,J.class,R),te&4&&o(ae,"style",we.style,J.style,R),te&8){const w=A.dynamicProps;for(let x=0;x<w.length;x++){const k=w[x],O=we[k],S=J[k];(S!==O||k==="value")&&o(ae,k,O,S,R,C.children,F,ee,ke)}}te&1&&C.children!==A.children&&f(ae,A.children)}else!he&&Y==null&&_e(ae,A,we,J,F,ee,R);((Ae=J.onVnodeUpdated)||$e)&&jt(()=>{Ae&&bn(Ae,F,A,C),$e&&vs(A,C,F,"updated")},ee)},Le=(C,A,F,ee,R,re,he)=>{for(let ae=0;ae<A.length;ae++){const te=C[ae],Y=A[ae],$e=te.el&&(te.type===Fe||!Qn(te,Y)||te.shapeFlag&70)?h(te.el):F;E(te,Y,$e,null,ee,R,re,he,!0)}},_e=(C,A,F,ee,R,re,he)=>{if(F!==ee){if(F!==et)for(const ae in F)!qo(ae)&&!(ae in ee)&&o(C,ae,F[ae],null,he,A.children,R,re,ke);for(const ae in ee){if(qo(ae))continue;const te=ee[ae],Y=F[ae];te!==Y&&ae!=="value"&&o(C,ae,Y,te,he,A.children,R,re,ke)}"value"in ee&&o(C,"value",F.value,ee.value)}},L=(C,A,F,ee,R,re,he,ae,te)=>{const Y=A.el=C?C.el:a(""),$e=A.anchor=C?C.anchor:a("");let{patchFlag:we,dynamicChildren:J,slotScopeIds:Ae}=A;Ae&&(ae=ae?ae.concat(Ae):Ae),C==null?(s(Y,F,ee),s($e,F,ee),le(A.children,F,$e,R,re,he,ae,te)):we>0&&we&64&&J&&C.dynamicChildren?(Le(C.dynamicChildren,J,F,R,re,he,ae),(A.key!=null||R&&A===R.subTree)&&kf(C,A,!0)):B(C,A,F,$e,R,re,he,ae,te)},ie=(C,A,F,ee,R,re,he,ae,te)=>{A.slotScopeIds=ae,C==null?A.shapeFlag&512?R.ctx.activate(A,F,ee,he,te):G(A,F,ee,R,re,he,te):Se(C,A,te)},G=(C,A,F,ee,R,re,he)=>{const ae=C.component=Cv(C,ee,R);if(af(C)&&(ae.ctx.renderer=ot),Ev(ae),ae.asyncDep){if(R&&R.registerDep(ae,D),!C.el){const te=ae.subTree=Ce(wn);M(null,te,A,F)}return}D(ae,C,A,F,R,re,he)},Se=(C,A,F)=>{const ee=A.component=C.component;if(B_(C,A,F))if(ee.asyncDep&&!ee.asyncResolved){Z(ee,A,F);return}else ee.next=A,P_(ee.update),ee.update();else A.el=C.el,ee.vnode=A},D=(C,A,F,ee,R,re,he)=>{const ae=()=>{if(C.isMounted){let{next:$e,bu:we,u:J,parent:Ae,vnode:m}=C,w=$e,x;$s(C,!1),$e?($e.el=m.el,Z(C,$e,he)):$e=m,we&&Wo(we),(x=$e.props&&$e.props.onVnodeBeforeUpdate)&&bn(x,Ae,$e,m),$s(C,!0);const k=al(C),O=C.subTree;C.subTree=k,E(O,k,h(O.el),ft(O),C,R,re),$e.el=k.el,w===null&&ll(C,k.el),J&&jt(J,R),(x=$e.props&&$e.props.onVnodeUpdated)&&jt(()=>bn(x,Ae,$e,m),R)}else{let $e;const{el:we,props:J}=A,{bm:Ae,m,parent:w}=C,x=zi(A);if($s(C,!1),Ae&&Wo(Ae),!x&&($e=J&&J.onVnodeBeforeMount)&&bn($e,w,A),$s(C,!0),we&&ls){const k=()=>{C.subTree=al(C),ls(we,C.subTree,C,R,null)};x?A.type.__asyncLoader().then(()=>!C.isUnmounted&&k()):k()}else{const k=C.subTree=al(C);E(null,k,F,ee,C,R,re),A.el=k.el}if(m&&jt(m,R),!x&&($e=J&&J.onVnodeMounted)){const k=A;jt(()=>bn($e,w,k),R)}(A.shapeFlag&256||w&&zi(w.vnode)&&w.vnode.shapeFlag&256)&&C.a&&jt(C.a,R),C.isMounted=!0,A=F=ee=null}},te=C.effect=new Qa(ae,()=>rl(Y),C.scope),Y=C.update=()=>te.run();Y.id=C.uid,$s(C,!0),Y()},Z=(C,A,F)=>{A.component=C;const ee=C.vnode.props;C.vnode=A,C.next=null,uv(C,A.props,ee,F),pv(C,A.children,F),Qs(),Qd(),Xs()},B=(C,A,F,ee,R,re,he,ae,te=!1)=>{const Y=C&&C.children,$e=C?C.shapeFlag:0,we=A.children,{patchFlag:J,shapeFlag:Ae}=A;if(J>0){if(J&128){Ee(Y,we,F,ee,R,re,he,ae,te);return}else if(J&256){ye(Y,we,F,ee,R,re,he,ae,te);return}}Ae&8?($e&16&&ke(Y,R,re),we!==Y&&f(F,we)):$e&16?Ae&16?Ee(Y,we,F,ee,R,re,he,ae,te):ke(Y,R,re,!0):($e&8&&f(F,""),Ae&16&&le(we,F,ee,R,re,he,ae,te))},ye=(C,A,F,ee,R,re,he,ae,te)=>{C=C||Gs,A=A||Gs;const Y=C.length,$e=A.length,we=Math.min(Y,$e);let J;for(J=0;J<we;J++){const Ae=A[J]=te?Xn(A[J]):ln(A[J]);E(C[J],Ae,F,null,R,re,he,ae,te)}Y>$e?ke(C,R,re,!0,!1,we):le(A,F,ee,R,re,he,ae,te,we)},Ee=(C,A,F,ee,R,re,he,ae,te)=>{let Y=0;const $e=A.length;let we=C.length-1,J=$e-1;for(;Y<=we&&Y<=J;){const Ae=C[Y],m=A[Y]=te?Xn(A[Y]):ln(A[Y]);if(Qn(Ae,m))E(Ae,m,F,null,R,re,he,ae,te);else break;Y++}for(;Y<=we&&Y<=J;){const Ae=C[we],m=A[J]=te?Xn(A[J]):ln(A[J]);if(Qn(Ae,m))E(Ae,m,F,null,R,re,he,ae,te);else break;we--,J--}if(Y>we){if(Y<=J){const Ae=J+1,m=Ae<$e?A[Ae].el:ee;for(;Y<=J;)E(null,A[Y]=te?Xn(A[Y]):ln(A[Y]),F,m,R,re,he,ae,te),Y++}}else if(Y>J)for(;Y<=we;)ce(C[Y],R,re,!0),Y++;else{const Ae=Y,m=Y,w=new Map;for(Y=m;Y<=J;Y++){const xe=A[Y]=te?Xn(A[Y]):ln(A[Y]);xe.key!=null&&w.set(xe.key,Y)}let x,k=0;const O=J-m+1;let S=!1,W=0;const q=new Array(O);for(Y=0;Y<O;Y++)q[Y]=0;for(Y=Ae;Y<=we;Y++){const xe=C[Y];if(k>=O){ce(xe,R,re,!0);continue}let De;if(xe.key!=null)De=w.get(xe.key);else for(x=m;x<=J;x++)if(q[x-m]===0&&Qn(xe,A[x])){De=x;break}De===void 0?ce(xe,R,re,!0):(q[De-m]=Y+1,De>=W?W=De:S=!0,E(xe,A[De],F,null,R,re,he,ae,te),k++)}const ne=S?wv(q):Gs;for(x=ne.length-1,Y=O-1;Y>=0;Y--){const xe=m+Y,De=A[xe],Ie=xe+1<$e?A[xe+1].el:ee;q[Y]===0?E(null,De,F,Ie,R,re,he,ae,te):S&&(x<0||Y!==ne[x]?Oe(De,F,Ie,2):x--)}}},Oe=(C,A,F,ee,R=null)=>{const{el:re,type:he,transition:ae,children:te,shapeFlag:Y}=C;if(Y&6){Oe(C.component.subTree,A,F,ee);return}if(Y&128){C.suspense.move(A,F,ee);return}if(Y&64){he.move(C,A,F,ot);return}if(he===Fe){s(re,A,F);for(let we=0;we<te.length;we++)Oe(te[we],A,F,ee);s(C.anchor,A,F);return}if(he===dr){P(C,A,F);return}if(ee!==2&&Y&1&&ae)if(ee===0)ae.beforeEnter(re),s(re,A,F),jt(()=>ae.enter(re),R);else{const{leave:we,delayLeave:J,afterLeave:Ae}=ae,m=()=>s(re,A,F),w=()=>{we(re,()=>{m(),Ae&&Ae()})};J?J(re,m,w):w()}else s(re,A,F)},ce=(C,A,F,ee=!1,R=!1)=>{const{type:re,props:he,ref:ae,children:te,dynamicChildren:Y,shapeFlag:$e,patchFlag:we,dirs:J}=C;if(ae!=null&&yl(ae,null,F,C,!0),$e&256){A.ctx.deactivate(C);return}const Ae=$e&1&&J,m=!zi(C);let w;if(m&&(w=he&&he.onVnodeBeforeUnmount)&&bn(w,A,C),$e&6)tt(C.component,F,ee);else{if($e&128){C.suspense.unmount(F,ee);return}Ae&&vs(C,null,A,"beforeUnmount"),$e&64?C.type.remove(C,A,F,R,ot,ee):Y&&(re!==Fe||we>0&&we&64)?ke(Y,A,F,!1,!0):(re===Fe&&we&384||!R&&$e&16)&&ke(te,A,F),ee&&pe(C)}(m&&(w=he&&he.onVnodeUnmounted)||Ae)&&jt(()=>{w&&bn(w,A,C),Ae&&vs(C,null,A,"unmounted")},F)},pe=C=>{const{type:A,el:F,anchor:ee,transition:R}=C;if(A===Fe){je(F,ee);return}if(A===dr){V(C);return}const re=()=>{i(F),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(C.shapeFlag&1&&R&&!R.persisted){const{leave:he,delayLeave:ae}=R,te=()=>he(F,re);ae?ae(C.el,re,te):te()}else re()},je=(C,A)=>{let F;for(;C!==A;)F=y(C),i(C),C=F;i(A)},tt=(C,A,F)=>{const{bum:ee,scope:R,update:re,subTree:he,um:ae}=C;ee&&Wo(ee),R.stop(),re&&(re.active=!1,ce(he,C,A,F)),ae&&jt(ae,A),jt(()=>{C.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&C.asyncDep&&!C.asyncResolved&&C.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},ke=(C,A,F,ee=!1,R=!1,re=0)=>{for(let he=re;he<C.length;he++)ce(C[he],A,F,ee,R)},ft=C=>C.shapeFlag&6?ft(C.component.subTree):C.shapeFlag&128?C.suspense.next():y(C.anchor||C.el),it=(C,A,F)=>{C==null?A._vnode&&ce(A._vnode,null,null,!0):E(A._vnode||null,C,A,null,null,null,F),Qd(),Xd(),A._vnode=C},ot={p:E,um:ce,m:Oe,r:pe,mt:G,mc:le,pc:B,pbc:Le,n:ft,o:e};let yt,ls;return t&&([yt,ls]=t(ot)),{render:it,hydrate:yt,createApp:mv(it,yt)}}function $s({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function kf(e,t,n=!1){const s=e.children,i=t.children;if(Te(s)&&Te(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=Xn(i[o]),a.el=r.el),n||kf(r,a)),a.type===ur&&(a.el=r.el)}}function wv(e){const t=e.slice(),n=[0];let s,i,o,r,a;const l=e.length;for(s=0;s<l;s++){const u=e[s];if(u!==0){if(i=n[n.length-1],e[i]<u){t[s]=i,n.push(s);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,e[n[a]]<u?o=a+1:r=a;u<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}const bv=e=>e.__isTeleport,Fe=Symbol(void 0),ur=Symbol(void 0),wn=Symbol(void 0),dr=Symbol(void 0),Wi=[];let Xt=null;function N(e=!1){Wi.push(Xt=e?null:[])}function Sf(){Wi.pop(),Xt=Wi[Wi.length-1]||null}let ii=1;function Af(e){ii+=e}function Pf(e){return e.dynamicChildren=ii>0?Xt||Gs:null,Sf(),ii>0&&Xt&&Xt.push(e),e}function H(e,t,n,s,i,o){return Pf(c(e,t,n,s,i,o,!0))}function Zt(e,t,n,s,i){return Pf(Ce(e,t,n,s,i,!0))}function Ki(e){return e?e.__v_isVNode===!0:!1}function Qn(e,t){return e.type===t.type&&e.key===t.key}const fr="__vInternal",If=({key:e})=>e!=null?e:null,pr=({ref:e,ref_key:t,ref_for:n})=>e!=null?at(e)||wt(e)||Re(e)?{i:bt,r:e,k:t,f:!!n}:e:null;function c(e,t=null,n=null,s=0,i=null,o=e===Fe?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&If(t),ref:t&&pr(t),scopeId:or,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:bt};return a?(wl(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=at(n)?8:16),ii>0&&!r&&Xt&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Xt.push(l),l}const Ce=_v;function _v(e,t=null,n=null,s=0,i=null,o=!1){if((!e||e===tv)&&(e=wn),Ki(e)){const a=oi(e,t,!0);return n&&wl(a,n),ii>0&&!o&&Xt&&(a.shapeFlag&6?Xt[Xt.indexOf(e)]=a:Xt.push(a)),a.patchFlag|=-2,a}if(Iv(e)&&(e=e.__vccOpts),t){t=Tf(t);let{class:a,style:l}=t;a&&!at(a)&&(t.class=Ye(a)),Qe(l)&&(Hd(l)&&!Te(l)&&(l=At({},l)),t.style=An(l))}const r=at(e)?1:F_(e)?128:bv(e)?64:Qe(e)?4:Re(e)?2:0;return c(e,t,n,s,i,r,o,!0)}function Tf(e){return e?Hd(e)||fr in e?At({},e):e:null}function oi(e,t,n=!1){const{props:s,ref:i,patchFlag:o,children:r}=e,a=t?Of(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&If(a),ref:t&&t.ref?n&&i?Te(i)?i.concat(pr(t)):[i,pr(t)]:pr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&oi(e.ssContent),ssFallback:e.ssFallback&&oi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Q(e=" ",t=0){return Ce(ur,null,e,t)}function Lf(e,t){const n=Ce(dr,null,e);return n.staticCount=t,n}function Ue(e="",t=!1){return t?(N(),Zt(wn,null,e)):Ce(wn,null,e)}function ln(e){return e==null||typeof e=="boolean"?Ce(wn):Te(e)?Ce(Fe,null,e.slice()):typeof e=="object"?Xn(e):Ce(ur,null,String(e))}function Xn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:oi(e)}function wl(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Te(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),wl(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(fr in t)?t._ctx=bt:i===3&&bt&&(bt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Re(t)?(t={default:t,_ctx:bt},n=32):(t=String(t),s&64?(n=16,t=[Q(t)]):n=8);e.children=t,e.shapeFlag|=n}function Of(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=Ye([t.class,s.class]));else if(i==="style")t.style=An([t.style,s.style]);else if(Ho(i)){const o=t[i],r=s[i];r&&o!==r&&!(Te(o)&&o.includes(r))&&(t[i]=o?[].concat(o,r):r)}else i!==""&&(t[i]=s[i])}return t}function bn(e,t,n,s=null){rn(e,t,7,[n,s])}const vv=Ef();let xv=0;function Cv(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||vv,o={uid:xv++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Hb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yf(s,i),emitsOptions:ef(s,i),emit:null,emitted:null,propsDefaults:et,inheritAttrs:s.inheritAttrs,ctx:et,data:et,props:et,attrs:et,slots:et,refs:et,setupState:et,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=T_.bind(null,o),e.ce&&e.ce(o),o}let lt=null;const $v=()=>lt||bt,Zn=e=>{lt=e,e.scope.on()},es=()=>{lt&&lt.scope.off(),lt=null};function Df(e){return e.vnode.shapeFlag&4}let Gi=!1;function Ev(e,t=!1){Gi=t;const{props:n,children:s}=e.vnode,i=Df(e);cv(e,n,i,t),fv(e,s);const o=i?kv(e,t):void 0;return Gi=!1,o}function kv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=qd(new Proxy(e.ctx,sv));const{setup:s}=n;if(s){const i=e.setupContext=s.length>1?Av(e):null;Zn(e),Qs();const o=Jn(s,e,0,[e.props,i]);if(Xs(),es(),Va(o)){if(o.then(es,es),t)return o.then(r=>{bl(e,r,t)}).catch(r=>{Bi(r,e,0)});e.asyncDep=o}else bl(e,o,t)}else Rf(e,t)}function bl(e,t,n){Re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Qe(t)&&(e.setupState=Wd(t)),Rf(e,n)}let Mf;function Rf(e,t,n){const s=e.type;if(!e.render){if(!t&&Mf&&!s.render){const i=s.template||pl(e).template;if(i){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:l}=s,u=At(At({isCustomElement:o,delimiters:a},r),l);s.render=Mf(i,u)}}e.render=s.render||nn}Zn(e),Qs(),iv(e),Xs(),es()}function Sv(e){return new Proxy(e.attrs,{get(t,n){return Ut(e,"get","$attrs"),t[n]}})}function Av(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Sv(e))},slots:e.slots,emit:e.emit,expose:t}}function hr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Wd(qd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vi)return Vi[n](e)},has(t,n){return n in t||n in Vi}}))}function Pv(e,t=!0){return Re(e)?e.displayName||e.name:e.name||t&&e.__name}function Iv(e){return Re(e)&&"__vccOpts"in e}const cn=(e,t)=>k_(e,t,Gi);function en(e){const t=$v();let n=e();return es(),Va(n)&&(n=n.catch(s=>{throw Zn(t),s})),[n,()=>Zn(t)]}function Tv(e,t,n){const s=arguments.length;return s===2?Qe(t)&&!Te(t)?Ki(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Ki(n)&&(n=[n]),Ce(e,t,n))}const Lv=Symbol(""),Ov=()=>qi(Lv),Dv="3.2.47",Mv="http://www.w3.org/2000/svg",Es=typeof document<"u"?document:null,Nf=Es&&Es.createElement("template"),Rv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t?Es.createElementNS(Mv,e):Es.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Es.createTextNode(e),createComment:e=>Es.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Es.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,o){const r=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Nf.innerHTML=s?`<svg>${e}</svg>`:e;const a=Nf.content;if(s){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Nv(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Bv(e,t,n){const s=e.style,i=at(n);if(n&&!i){if(t&&!at(t))for(const o in t)n[o]==null&&_l(s,o,"");for(const o in n)_l(s,o,n[o])}else{const o=s.display;i?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=o)}}const Bf=/\s*!important$/;function _l(e,t,n){if(Te(n))n.forEach(s=>_l(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Fv(e,t);Bf.test(n)?e.setProperty(gs(s),n.replace(Bf,""),"important"):e[s]=n}}const Ff=["Webkit","Moz","ms"],vl={};function Fv(e,t){const n=vl[t];if(n)return n;let s=gn(t);if(s!=="filter"&&s in e)return vl[t]=s;s=Vo(s);for(let i=0;i<Ff.length;i++){const o=Ff[i]+s;if(o in e)return vl[t]=o}return t}const Uf="http://www.w3.org/1999/xlink";function Uv(e,t,n,s,i){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Uf,t.slice(6,t.length)):e.setAttributeNS(Uf,t,n);else{const o=Lb(t);n==null||o&&!wd(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function jv(e,t,n,s,i,o,r){if(t==="innerHTML"||t==="textContent"){s&&r(s,i,o),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n==null?"":n;(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=wd(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}function ts(e,t,n,s){e.addEventListener(t,n,s)}function Hv(e,t,n,s){e.removeEventListener(t,n,s)}function qv(e,t,n,s,i=null){const o=e._vei||(e._vei={}),r=o[t];if(s&&r)r.value=s;else{const[a,l]=zv(t);if(s){const u=o[t]=Kv(s,i);ts(e,a,u,l)}else r&&(Hv(e,a,r,l),o[t]=void 0)}}const jf=/(?:Once|Passive|Capture)$/;function zv(e){let t;if(jf.test(e)){t={};let s;for(;s=e.match(jf);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):gs(e.slice(2)),t]}let xl=0;const Vv=Promise.resolve(),Wv=()=>xl||(Vv.then(()=>xl=0),xl=Date.now());function Kv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;rn(Gv(s,n.value),t,5,[s])};return n.value=e,n.attached=Wv(),n}function Gv(e,t){if(Te(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const Hf=/^on[a-z]/,Yv=(e,t,n,s,i=!1,o,r,a,l)=>{t==="class"?Nv(e,s,i):t==="style"?Bv(e,n,s):Ho(t)?qa(t)||qv(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jv(e,t,s,i))?jv(e,t,s,o,r,a,l):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Uv(e,t,s,i))};function Jv(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&Hf.test(t)&&Re(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Hf.test(t)&&at(n)?!1:t in e}const ri=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Te(t)?n=>Wo(t,n):t};function Qv(e){e.target.composing=!0}function qf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const He={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e._assign=ri(i);const o=s||i.props&&i.props.type==="number";ts(e,t?"change":"input",r=>{if(r.target.composing)return;let a=e.value;n&&(a=a.trim()),o&&(a=Go(a)),e._assign(a)}),n&&ts(e,"change",()=>{e.value=e.value.trim()}),t||(ts(e,"compositionstart",Qv),ts(e,"compositionend",qf),ts(e,"change",qf))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:i}},o){if(e._assign=ri(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===t||(i||e.type==="number")&&Go(e.value)===t))return;const r=t==null?"":t;e.value!==r&&(e.value=r)}},ve={deep:!0,created(e,t,n){e._assign=ri(n),ts(e,"change",()=>{const s=e._modelValue,i=Yi(e),o=e.checked,r=e._assign;if(Te(s)){const a=Ha(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const u=[...s];u.splice(a,1),r(u)}}else if(Js(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(Wf(e,o))})},mounted:zf,beforeUpdate(e,t,n){e._assign=ri(n),zf(e,t,n)}};function zf(e,{value:t,oldValue:n},s){e._modelValue=t,Te(t)?e.checked=Ha(t,s.props.value)>-1:Js(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=Li(t,Wf(e,!0)))}const ai={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const i=Js(t);ts(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?Go(Yi(r)):Yi(r));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=ri(s)},mounted(e,{value:t}){Vf(e,t)},beforeUpdate(e,t,n){e._assign=ri(n)},updated(e,{value:t}){Vf(e,t)}};function Vf(e,t){const n=e.multiple;if(!(n&&!Te(t)&&!Js(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],r=Yi(o);if(n)Te(t)?o.selected=Ha(t,r)>-1:o.selected=t.has(r);else if(Li(Yi(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Yi(e){return"_value"in e?e._value:e.value}function Wf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Xv=["ctrl","shift","alt","meta"],Zv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Xv.some(n=>e[`${n}Key`]&&!t.includes(n))},e1=(e,t)=>(n,...s)=>{for(let i=0;i<t.length;i++){const o=Zv[t[i]];if(o&&o(n,t))return}return e(n,...s)},t1={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Kf=(e,t)=>n=>{if(!("key"in n))return;const s=gs(n.key);if(t.some(i=>i===s||t1[i]===s))return e(n)},Lt={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ji(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Ji(e,!0),s.enter(e)):s.leave(e,()=>{Ji(e,!1)}):Ji(e,t))},beforeUnmount(e,{value:t}){Ji(e,t)}};function Ji(e,t){e.style.display=t?e._vod:"none"}const n1=At({patchProp:Yv},Rv);let Gf;function s1(){return Gf||(Gf=gv(n1))}const _n=(...e)=>{const t=s1().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=i1(s);if(!i)return;const o=t._component;!Re(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function i1(e){return at(e)?document.querySelector(e):e}const o1={key:0,class:"ce-custom-url-help"},r1={class:"ce-custom-url-help-body"},a1=c("hr",null,null,-1),l1={key:0},c1={class:"pure-table pure-table-bordered"},u1=c("thead",null,[c("tr",null,[c("th",{width:"50%"},"变量"),c("th",{width:"50%"},"说明")])],-1),d1=["onClick"],f1=Ne({__name:"CustomUrlHelp",setup(e){const t=ue(cb),n=ue(!1);It(async()=>{window.addEventListener("message",i=>{const{event:o}=i.data;o==="customUrlHelp"&&(n.value=!0)},!1)});async function s(i){tn(i.key),se({text:"已复制到剪贴板",icon:"success",timer:1e3})}return(i,o)=>n.value?(N(),H("div",o1,[c("div",r1,[c("h1",null,[Q(" 自定义菜单变量说明 "),c("a",{href:"javascript:void(0)",onClick:o[0]||(o[0]=r=>n.value=!1)},"关闭")]),a1,(N(!0),H(Fe,null,nt(t.value,(r,a)=>(N(),H("div",{key:a},[c("h2",null,me(r.label),1),r.memo?(N(),H("p",l1,me(r.memo),1)):Ue("",!0),c("table",c1,[u1,c("tbody",null,[(N(!0),H(Fe,null,nt(r.items,(l,u)=>(N(),H("tr",{key:u},[c("td",null,[c("span",{class:"ce-variable",onClick:f=>s(l)},me(l.key),9,d1)]),c("td",null,me(l.label),1)]))),128))])])]))),128))])])):Ue("",!0)}}),s5="",i5="",Yf=st.enabledCustomUrlsForSearch,Jf=st.enabledCustomUrlsForPlay;async function p1(e){await Ze.set(Yf,e)}async function h1(e){await Ze.set(Jf,e)}async function m1(){const e=$l,t=e.filter(i=>i.enabled).map(i=>i.key),n=await Ze.get(Yf,t),s=[];return e.forEach(i=>{n.includes(i.key)&&s.push(i.key)}),s}async function g1(){const e=Cl,t=e.filter(i=>i.enabled).map(i=>i.key),n=await Ze.get(Jf,t),s=[];return e.forEach(i=>{n.includes(i.key)&&s.push(i.key)}),s}async function Qf(){const e=await m1();return $l.forEach(t=>{t.enabled=e.includes(t.key)}),$l}async function mr(){const e=await g1();return Cl.forEach(t=>{t.enabled=e.includes(t.key)}),Cl}const Xf="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABu0lEQVRYhe2WsVXDMBCG/xNNSrFBmAB3tBEZIJkAmCBog9gbGLNAwgQwQJ5MSecNYASVaayjcBIrEDvye06V/JVs/777fJJOBi666NxFoUapzQiunAJiAmC4uV2AuACJxKbq5yQAUhsJxhzMuj0SpxsQ2xuA1EbCuRyg28B4BQSpLhCi9SljvpeckUOQgqBrm90TBCkAS++NCOzmocmBlgpIbYZw/O3RJDYbxwe9s1UMUJ24qkIeAtBcAVfWyYgWTckBwGbjGIw6oXPTkOTtABB16WmvzId1RUl9QZMeABBtB4HlLLzxsNHVAWAnqY085um6/UIA/MYSNbo2ktqMvMui0RgOwB+7YcnHt5Yrn3Zjoh4AhHivA2IkZ6YRonomHj1/0uT9q/ZOOFulAD3Xbl6AxNKmKt+siwglz0Goy8/I7eu96gdAGwnHBgFr4E/Y2GYqqAqtu8Cmylbtll+ORvIbEThum7JggC2EzcYagm5Q9X1/gf0A/AJBqio7e18dBhH8PxCqf+fCkem46htg/fWWD+4eCKDtwhwN7p6w/lp+HvIHdcKuqg6u/elo8p4E4D8EB/eFiy46P/0C5gmePG6KKVsAAAAASUVORK5CYII=",y1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACAlJREFUaEPtmWuIXVcVx3/7vt9zJ5NOZ5JGkxQDEZroF7WxYGILGoWmLxXamtG0RUhoLSiW4hdFPxRFSytJLVpNRqTE2qq1WqiFGbWhNiCSIClU1EZj0ySTedz3uY+zZN19bjL3zn1NckcNeODAuTPn7L3/6/Ff/7W34Qq/zBW+fv4P4L/tweV4wAf4vVuf9V7O992wCuB6dw3QW3/3vPpZQODYsWM7t2zZ8nzP0Qb4wvHjx2/eunXri0C127C9AMRFJDfAdS17KGNMAsh3+rAbgKSIZJY94wp8YIxJAdl2Q3cCEBIRZwXWcslDGmPCQLl1gHYAzNTU1O3bt29/pr/ZNP8AEXvXRzRg9KFXhPY3g741PT39iR07djyrMy3+qt0MfVrfW7DU4LVHkX8cAX8QXBfExdxxGEwAfIMjq3ZeaAcgJSIL3W2ji3ehVoGnd0E0idQX6l3672oV3+rNsOMr4At4/7g8jxhjhoCmvGw34qiInOkKQK3uVuEHNyGRmAVSydu/GR8SjEIwDr4wUnHw3/1zC8JcnjeMMVcDZ3uF0DUi8s/OAMQutJSFgzuRWhmK8+DkkIpStoFQBOJpiK9GIkkQg/9j34CRTeDTWnhpnjDGrANO9QLwThF5szMAF6pleOJGyJ1BnBw4WSiVEVeTNwCuQDiEJNOQHoX4MAQimFAM3ycnPW8sP8mNMeuBk70AbBCRv3UEoOFTKcHXNuG8WSJ/tAiOgxEX/5oUiW0pqDgWWNBAMoUMj2CSV0EkAbUa/omfQiC87JAyxmwE/n75AJwCPLyOuRdKmFoVqdYsc0ZjpH/5ErUn7wF9x5kHKSPJGKRXwdAohNOIBPC/93Z877vTS/D+QmqAAPJkP7gWd76AiGA8atan9KtvgJNBfvUY7okjUJxDakWI+pHEECRHkdgI4o+CUyP8hefA31+CDxbADeOQL9TLilaWug0FkkdPWw8XFqCUofrtT9cBUVygpgJTKTc5AhpS4RRSFqJf/CFEV/VM8IECKHx4DMkXl6RK/NVZ8IcstZZykD1L9bE9yPw8bka9UUaCYdxkGpMahdgqYtcFYWgDfORbXUNqoABKH28B4LkhOj0PoZiVFRXH5kL2LPLX1yh//xHcbAa3qLrMhxsbwqRGSNy4GkwIYmvh1ic7ghgoAOe2MShZD9QlkJeH4V8rAC1iPisrlHIrRdBF52YoPHQn5PLUchncSgXxx0nfscqGkOuDPS9bhrpQvS86eaAAKnePQbFog3+RvAo+2wCgBcvTS7WqpV4nD5mzOI8/ROXPr1M7N0voHWWi74lAZBj8Mdj2eXj/HqurWgreQAFU93gAWrIg8HQDgOqfBjKt3lo/HCgXIDMDc6dwf3wXPpm1C/VHLID0RnhgGgIhr2tdIQ/U7hkDpyWEfOCfXAxgkbpTMPWQcmw4PXU95DKQX4CqCkM/KLWuvx4+9zMrR+pt9woBcO8bQ4rFeuw37Gz84DvYBYCG0us/gT9+F7LnYe4MZLJQrIIEIZSCh/8Aw2sguOIAxqFQuLg3obkQMPiemvOSuCGhG9K7Cs/fYjc1ijk4/xbMKACt2KZeoQlH4ctHITa08iHk7rsWk80gbgWMYFS8hQP49r+1CIAX+8UZmLoXVOwVsjD7NszOQEaFoA9CwxBKwt5nYHgdRJTFlARWKoQ0EX/xVeTlw5bnTQ3iUcz6a+GBF0H7AdX+KrtfeRDyp6BagfwczJ2F+TnIFMGNQGgEQgn47CSk19QrdZ2B2vQOg2EhlQPlEuTOIY/stDrGJ+CvYO5/AYbGrfuVdV66FQhCOQ+587BwDhYyUNA9qwSE0rD9Qdh4AwyNQThuv613d83W11QeHABNxlIesqctGL1CYUiOWeufOQInHrdtZ3EBFtTqs5DNQSUEgTQEEnDXJMRHIJq2rKOWv9BDL1WogwOgpbdRnCq60yEQCFpvTH3KVlGly/yMtXpmAXJlkBgEh2F0M3z065BQeR23i9eYv7CT0V5eDwiAmlt3Hjx2UW7XcKkW4JUJ63pVnzlNUg0ZTVQtVEMQTMGuJyA1DonVEIp6smFxr9y5N+gXwHoRaep6lnZnLRU2dxp+fy/4DJTm6/nBwhyoWq1ELEUGE3DbjzwZnbA8r17rYfWWQrYBaGp328Ht0RMvHtK18uC5bVYKaLLmz0M+A44mqoZHGq7bDZt31ZuZulINhm241a/+e+N+e+K1ItLU+Xftj5VSD38AnDKU5mxxcwMQ0pBJwi2TENNE1d9q9QbLNGzXXzvpsdA1wL969cRXiUjT3ktHAMrzCuB3X4KTv4VCHqpirZxYAzc9Cqmr7W+N9z4SteNclkZHgXO9ACREpO1O8JLBGzsUGvN/OgAnf2OF2Ye+CUPrIK5toyaqWn3xflD/Vm/JgSTQtN3fbqTAoUOHPrN79+7vdbOG/Z+qyKqtxsr3yj56aXOi9HgJidppzsnJyfsmJiYOth54tN2dBnR78e3eABpUqjRatmCUVTRBL1h9eYnaaU5jzJi3rdhzd1rHUIp4l4ic6A3CO8rSetBYa9P2+qWFS0vovBv4S7vjpm6j64HCJhE53htEk1EWvT6QxW8B3gDaHrj0mkEb0/H9+/ffvHfv3u/0BjK4Nw4cOHD/vn379GBRN5oqHUOrjykVpLZHaUD35/V5acPax0A9XtEYVGGl6lDPJ+a9507uvRixy5hbwTSESy/vLWPY+qu60MZ5cddFN+XHcmf5X3t/0Fb8j+O74gH8G0lHhV4uXv6RAAAAAElFTkSuQmCC",Zf="https://nplayer.com/assets/img/logo_main.png",Cl=[gt({enabled:!0,key:"p_builtin_iina",label:"IINA播放",icon:"https://iina.io/images/iina-icon-60.png",memo:"调用IINA播放视频(使用CloudDrive链接)",url:"iina://weblink?url={clouddrive_stream_url:encode}"}),gt({enabled:!0,key:"p_builtin_vlc",label:"VLC播放",icon:"https://images.videolan.org/images/favicon.ico",memo:"调用VLC播放视频(使用CloudDrive链接)",extraMemo:'<a href="https://github.com/stefansundin/vlc-protocol" target="_blank" rel="noreferer">安装VLC协议</a>',url:"vlc://{clouddrive_stream_url}"}),gt({enabled:!0,key:"p_builtin_mpv",label:"MPV播放",icon:"https://mpv.io/images/mpv-logo-128-0baae5aa.png",memo:"调用MPV播放视频(使用CloudDrive链接)",extraMemo:'<a href="https://github.com/akiirui/mpv-handler/blob/main/README.zh-Hans.md" target="_blank" rel="noreferer">安装MPV协议</a>',url:"mpv://{clouddrive_stream_url}"}),gt({enabled:!0,key:"p_builtin_potplayer",label:"PotPlayer播放",icon:"https://t1.daumcdn.net/potplayer/main/img/favicon.ico",memo:"调用PotPlayer播放视频(使用CloudDrive链接)",url:"potplayer://{clouddrive_stream_url}"}),gt({enabled:!0,key:"p_builtin_infuse",label:"Infuse播放",icon:y1,memo:"调用Infuse播放视频(使用CloudDrive链接)",url:"infuse://x-callback-url/play?url={clouddrive_stream_url:encode}"}),gt({enabled:!1,key:"p_builtin_nplayer_mac",label:"nPlayer-mac播放",icon:Zf,memo:"调用nPlayer(mac版)播放视频(使用CloudDrive链接)",url:"nplayer-mac://weblink?url={clouddrive_stream_url:encode}&new_window=1"}),gt({enabled:!1,key:"p_builtin_nplayer_win",label:"nPlayer-win播放",icon:Zf,memo:"调用nPlayer(非mac版)播放视频(使用CloudDrive链接)",url:"nplayer-{clouddrive_stream_url:encode}"}),gt({enabled:!0,key:"p_builtin_online",label:"在线播放",icon:"https://115.com/favicon.ico",memo:"115官方在线播放(转码)",url:"https://v.anxia.com/?pickcode={pick_code}&share_id=0"})],$l=[gt({enabled:!0,key:"s_builtin_115_pure_name",label:"115-不含后缀",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀)",url:"{pure_name:search}"}),gt({enabled:!1,key:"s_builtin_115_full_name",label:"115-完整名称",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(完整文件名)",url:"{full_name:search}"}),gt({enabled:!0,key:"s_builtin_115_sha",label:"115-sha1",icon:"https://115.com/favicon.ico",memo:"使用115搜索sha1相同的文件(仅适用于文件)",url:"{file_hash:search}"}),gt({enabled:!0,key:"s_builtin_google_pure_name",label:"Google-不含后缀",icon:"https://www.google.com/favicon.ico",memo:"使用Google搜索文件名(不含后缀)",url:"https://www.google.com/search?q={pure_name:encode}"}),gt({enabled:!1,key:"s_builtin_google_full_name",label:"Google-完整名称",icon:"https://www.google.com/favicon.ico",memo:"使用Google搜索文件名(完整文件名)",url:"https://www.google.com/search?q={full_name:encode}"}),gt({enabled:!0,key:"s_builtin_bing_pure_name",label:"Bing-不含后缀",icon:Xf,memo:"使用Bing搜索文件名(不含后缀)",url:"https://cn.bing.com/search?q={pure_name:encode}"}),gt({enabled:!1,key:"s_builtin_bing_full_name",label:"Bing-完整名称",icon:Xf,memo:"使用Bing搜索文件名(完整文件名)",url:"https://cn.bing.com/search?q={full_name:encode}"}),gt({enabled:!0,key:"s_builtin_115_pure_name_manual",label:"115-不含后缀-手动",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀),手动编辑后搜索",url:"{pure_name:manual:search}"})];var ct=(e=>(e.openConfig="openConfig",e.closeConfig="closeConfig",e.basicConfigChange="basicConfigChange",e.listConfigChange="listConfigChange",e.searchConfigChange="searchConfigChange",e.toolsConfigChange="toolsConfigChange",e.listRendered="listRendered",e.topDomChanged="topDomChange",e.officialMenuStyleChange="officialMenuStyleChange",e))(ct||{}),Ht=(e=>(e.basic="basic",e.clouddrive="clouddrive",e.list="list",e.search="search",e.menus="menus",e.searchMenus="searchMenus",e.playMenus="playMenus",e.offline="offline",e.tools="tools",e.anxia="anxia",e.about="about",e))(Ht||{});const un={basic:"基础设置",clouddrive:"CloudDrive",list:"列表增强",search:"搜索增强",menus:"菜单设置",searchMenus:"搜索菜单",playMenus:"播放菜单",offline:"离线管理",tools:"工具",anxia:"在线播放",about:"关于"},ep=st.list;function w1(e){return{sizeSorter:!0,sizeSorterDirAttrInterval:100,showSha1:!1,showFolderSizeButton:!0,showOpenDirContextMenu:!0,hoverShowDirContextMenu:!1,showCopyButtonOnPathBar:!1,showGotoButtonOnPathBar:!1,noUpdateDirAfterRename:!1,noReloadAfterMove:!1,fileSelectorDefaultView:"_",...e}}async function gr(){const e=w1(),t=await Ze.get(ep,e);return{...e,...t}}async function b1(e){await Ze.set(ep,e)}var tp=(e=>(e[e.asc=0]="asc",e[e.desc=1]="desc",e))(tp||{});async function _1(e,t,n=!1){const s=await gr(),i=await vt(!1),o=await qs(),r=await Wn(!1);console.log("[items]",r),se({html:"正在获取子文件夹大小...",icon:"info",position:"top-end",timer:0}),fe.showLoading();for(let a=0;a<r.length;a++){const l=r[a];if(!l.isDir)continue;const u=o.find(`li[cate_id="${l.id}"]`);if(!u.length)continue;const f=u.find(".file-size span:eq(0)");if(f.text()!==""&&!n)continue;const h=await kt(l.id);fe.update({html:`[${a+1} / ${r.length}] 正在获取子文件夹大小:${l.name}`}),f.text(h.size),u.addClass("ce-size-got"),a<r.length-1&&await mt(s.sizeSorterDirAttrInterval)}return fe.hideLoading(),e&&await v1(i),i}async function yr(e,t,n,s){const i=await qs();i.find('li[file_type="0"]:not(.ce-size-got)').length>0&&await _1(n);const r=i.find("ul"),a=r.children("li").toArray();a.sort(function(u,f){const h=$(u),y=$(f),_=Sc(h.find(".file-size span:eq(0)").text()),b=Sc(y.find(".file-size span:eq(0)").text());return t===0?_-b:b-_});const l=$("<ul></ul>");$.each(a,function(u,f){l.append(f)}),r.replaceWith(l),n?fe.update({title:"排序完成",html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success"}):se({html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success",timer:1500,position:"top-end"})}async function v1(e){fe.fire({toast:!0,title:"获取子文件夹大小",html:"获取子文件夹大小完成",icon:"success",showConfirmButton:!0,confirmButtonText:"大 > 小",confirmButtonColor:"#3085d6",showDenyButton:!0,denyButtonText:"小 > 大",denyButtonColor:"#d33",position:"top-end",showCloseButton:!0,closeButtonAriaLabel:"关闭",preConfirm:async()=>(console.log("preConfirm"),yr(e,1,!0),!1),preDeny:async()=>(console.log("preDeny"),yr(e,0,!0),!1)})}async function x1(){await El();const t=(await us("#js_data_list"))[0];C1(),new MutationObserver(async([s])=>{s.type==="childList"&&(window.postMessage({event:ct.listRendered}),await El())}).observe(t,{childList:!0})}async function C1(){if(window.top===window.self)return;const e=document.querySelector("#js_pagination_box");if(!e){console.warn("[list.handleLoadAll] 未找到「#js_pagination_box」元素");return}function t(n){!document.querySelector("#js_data_list .list-contents > ul > li")||n(!0)}e.addEventListener("click",async n=>{n.preventDefault(),n.stopPropagation();const s=n.target;let i=!1;if((s.getAttribute("menu")==="load_all_file"||s.closest('[menu="load_all_file"]'))&&(i=!0),!i)return;console.log("[list.handleLoadAll] 点击了「加载全部」按钮"),await jn(t,500,3e5);const o=document.querySelector("#js_data_list .list-contents > ul");o==null||o.removeAttribute("ce-done2");const r=document.querySelector("#js_data_list");if(r){const a=".list-contents > ul:not([ce-done2]) > li";r.querySelectorAll(a).length&&(o==null||o.setAttribute("ce-done2",""),await El())}})}async function El(){const e=await gr();S1(e),A1(e);const t=await td(!1);for(let n=0;n<t.length;n++){const s=t.eq(n),i=await zt(s);await $1(e,s,i)}}async function $1(e,t,n){await E1(e,t,n),await k1(e,t,n)}async function E1(e,t,n){if(!e.showSha1||!n.hash)return;t.addClass("ce-show-sha1");const s=t.find(".file-name"),i=document.createElement("span");i.classList.add("ce-file-sha1"),i.title="文件SHA1,点击复制",i.textContent=n.hash,i.addEventListener("click",async o=>{o.preventDefault(),o.stopPropagation(),tn(n.hash),se({title:"复制SHA1",text:"已复制文件SHA1",icon:"success",timer:1500})}),s.append(i)}async function k1(e,t,n){if(!e.showFolderSizeButton||!n.isDir)return;const s=t.find(".file-size"),i=document.createElement("span");i.classList.add("ce-btn-folder-size"),i.title="点击获取该文件夹大小",i.textContent="大小",i.addEventListener("click",async o=>{o.preventDefault(),o.stopPropagation();const r=await kt(n.id);s.find("span:eq(0)").text(r.size),t.addClass("ce-size-got"),se({title:"获取大小",text:"已获取文件夹大小",icon:"success",timer:1500})}),s.append(i)}async function S1(e){if(!e.sizeSorter)return;console.log("renderHeaderShowSubFolderSize");const t=document.querySelector(".header-size");if(!t||t.classList.contains("ce-injected"))return;const n=t,s=document.createElement("a");s.classList.add("btn-sort"),s.classList.add("ce-size-sort"),s.title="显示当前目录下已加载的子文件夹的大小,然后按大小排序",s.innerHTML=`
    <span>排序</span>
    <i icon_rel="file_size" class="icon-sort-asc"></i>
    <i icon_rel="file_size" class="icon-sort-desc"></i>
  `,s.addEventListener("click",async i=>{if(i.preventDefault(),i.stopPropagation(),!s.classList.contains("el-size-sort-ing"))try{s.classList.add("ce-size-sort-ing");let o=1;s.classList.contains("by-desc")?o=0:o=1;const r=await vt(!1);await yr(r,o,!1,!1),o===0?(s.classList.remove("by-desc"),s.classList.add("by-asc")):(s.classList.remove("by-asc"),s.classList.add("by-desc"))}catch(o){console.error(o)}finally{s.classList.remove("ce-size-sort-ing")}}),n.appendChild(s),n.classList.add("ce-injected")}async function A1(e){if(!e.showOpenDirContextMenu||await vt(!1)===""||await Oa())return;console.log("renderHeaderOpenDirContextMenu");const n=document.querySelector(".header-name");if(!n||n.classList.contains("ce-injected"))return;const s=n,i=document.createElement("a");i.classList.add("ce-open-dir-context-menu"),i.title="打开当前目录的功能菜单",i.innerHTML="<span>目录功能菜单</span>";let o;const r=async a=>{console.log(a.clientX,a.clientY),o&&clearTimeout(o),a.preventDefault(),a.stopPropagation();try{const l=Jt(),u=await vt(!1),f=i.getBoundingClientRect();l.Core.FileMenu.FileRight("1",u,!1,f.x,f.y+8,void 0,!1)}catch(l){console.error(l)}};i.addEventListener("click",r),e.hoverShowDirContextMenu&&(i.addEventListener("mouseenter",async a=>{o=setTimeout(async()=>{await r(a)},300)}),i.addEventListener("mouseleave",()=>{o&&clearTimeout(o)})),s.appendChild(i),s.classList.add("ce-injected")}async function np(e,t){const n=[];for(const s of t){const i=po(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(o,r)=>{r.stopPropagation(),r.preventDefault();try{const a=await kn();if(!a)return;const l=await zt(a),u=await Ms(),f=await Do(l,s,u);if(f.includes("v.anxia.com")){const y=(await Wn(!1)).find(_=>_.playDuration&&_.playDuration>0);Na(l.id,y);return}if(console.log("[play url]",f),!f)throw new Error("无法获取有效的播放链接!");window.open(f,"_blank","noopener noreferrer")}catch(a){console.error(a),se({title:"播放失败",text:a.toString(),icon:"error"})}}});n.push(i)}return n}async function P1(e){const t=[...(await mr()).filter(n=>n.enabled),...(await Vs(Sn.play)).filter(n=>n.enabled)];return e&&t.length===1?(await np(St,t))[0]:new St({key:"_play_with_x",label:"播放全部",icon:"icon-operate ifo-video-play",title:"",onClick:async(n,s)=>{},subItems:[...await np(_b,t)]})}async function I1(){return new St({key:"_rename_dir",label:"重命名文件夹",icon:"icon-operate ifo-rename",title:'重命名当前目录,支持"高级模式"',onClick:async(e,t)=>{await e.closeMenu();const n=await kn();!n||unsafeWindow.Core.Dir.Rename("1",n.attr("cate_id"),n.attr("title"))}})}async function T1(){return new St({key:"_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取当前目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();if(!n)return;const s=await zt(n);await ld(s)}})}async function L1(){return new St({key:"_dc_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault(),await e.closeMenu();const n=await vt(!1);if(!n||n==="0"){await Oo({id:"0",name:"根目录",isDir:!0});return}const s=await kn();if(!s)return;const i=await zt(s);await Oo(i)}})}async function O1(){return new St({key:"_move_dir",label:"移动文件夹",icon:"icon-operate ifo-move",title:"移动当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();!n||await La(n,"move",!0)}})}async function D1(){return new St({key:"_del_dir",label:"删除文件夹",icon:"icon-operate ifo-remove",title:"删除当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();if(!n)return;const s=await Pi();unsafeWindow.Core.FileAPI.DeleteFile([n],i=>{n.remove(),s.find("#js_top_header_file_path_box .top-file-path > .file-path").children(":last").prev()[0].click()},!0)}})}async function M1(){return new St({key:"_copy_dir",label:"复制文件夹",icon:"icon-operate ifo-copy",title:"复制当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();!n||await La(n,"set_copy",!0)}})}async function R1(){return new St({key:"_copy_dir_to",label:"复制文件夹到",icon:"icon-operate ifo-copyto",title:"复制当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();!n||await La(n,"copy_list",!0)}})}async function N1(){return new St({key:"view_dir_attribute",label:"查看属性",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu();const n=await kn();!n||Jt().Core.FileAPI.getAttribute(n,{showPlayLongChange:function(s,i,o){qw().CACHE.FileMain.List.ResetPlayLongText(s,i,o)}},function(){console.log("查看属性 ok")})}})}async function wr(e,t){return new St({key:`_d_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件名称",onClick:async(n,s)=>{let o=(await Wn(!1)).map(r=>r.name);o=await To(o,t),tn(o.join(`
`)),se({title:"复制名称",text:`已复制选中文件名。数量:${o.length},复制类型:${e}`,icon:"success"})}})}async function sp(e,t){return new St({key:`_d_copy_paths_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件路径",onClick:async(n,s)=>{await n.closeMenu();const i=await Wn(!1);let o=[];se({text:"正在获取文件路径...",timer:0}),fe.showLoading();try{o=await ad(i,t),fe.close()}catch(r){console.error(r),se({text:`获取文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{fe.hideLoading()}tn(o.join(`
`)),se({title:"复制路径",text:`已复制文件的路径。数量:${o.length},复制类型:${e}`,icon:"success"})}})}async function B1(){return new St({key:"show_sub_folder_size",label:"子文件夹大小",title:"显示当前目录下已加载的所有子文件夹的大小,并进行排序",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu(),await yr("",tp.desc,!0)}})}async function ip(e,t){return new No({key:`_l_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制名称",onClick:async(n,s)=>{await n.closeMenu();const i=await id();if(!i||!i.n){se({text:"无法获取名称",timer:1200});return}let o=[i.n];o=await To(o,t),tn(o.join(`
`)),se({title:"复制名称",text:"已复制选中文件名",icon:"success"})}})}async function br(e,t){return new No({key:`_l_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制路径",onClick:async(n,s)=>{await n.closeMenu();const i=await id();if(!i||!i.n){se({text:"无法获取路径",timer:1200});return}const o=await Ai(i),r=await Io(o),a=await Lo(o,r,t);tn(a),se({title:"复制路径",text:"已复制文件路径",icon:"success"})}})}async function F1(){return new No({key:"_lc_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{await e.closeMenu();const n=await sd();if(!n||!n.length){se({text:"无法获取文件信息",timer:1200});return}const s=await zt(n);await Oo(s)}})}let U1=[];async function j1(){const e=[...(await mr()).filter(t=>t.enabled),...(await Vs(Sn.play)).filter(t=>t.enabled)];return new Bo({key:"_play_with_x_d",label:"播放",injectDecider:kb,title:"115在线播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const s=$(n.target).closest("li"),i=await zt(s),o=Ma(i.pickCode);i.isDir&&o.includes("v.anxia.com")?Na(i.id):window.open(o,"_blank","noopener noreferrer")},subItems:[...await ib(Ks,e)]})}async function H1(){const e=[...(await Qf()).filter(t=>t.enabled),...U1.filter(t=>t.enabled),...(await Vs(Sn.search)).filter(t=>t.enabled)];return new Bo({key:"_search_with_name_d",label:"搜索",icon:"",title:"使用名称搜索",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const s=$(n.target).closest("li"),i=await Si(s),o=Da({search_value:i.n,cid:await vt()});window.open(o,"_blank","noopener noreferrer")},subItems:[...await sb(Ks,e)]})}async function q1(){return new Ks({injectDecider:yd,key:"_lh_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取该目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),s=await zt(n);if(!s.isDir){se({text:"该功能仅对目录有效",icon:"warning",timer:2e3});return}await ld(s)}})}async function z1(){return new Ks({key:"_lh_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),s=await zt(n);await Oo(s)}})}async function V1(e){const t=[await op("完整名称",Vt.full),await op("不含后缀",Vt.pure),new Ua({}),await _r("路径(Unix)",Wt.unixPath),await _r("路径(Windows)",Wt.winPath),await _r("上级路径(Unix)",Wt.unixParentPath),await _r("上级路径(Windows)",Wt.winParentPath)];return e.exportList&&t.push(new Ua({}),await q1()),e.viewInCloudDrive&&t.push(new Ua({}),await z1()),new Bo({key:"_lh_copy_name_path",label:"名称路径",title:"复制文件名称路径",onClick:async(n,s)=>{},subItems:t})}async function op(e,t){return new Ks({key:`_lh_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,s)=>{s.stopPropagation(),s.preventDefault();const i=$(s.target).closest("li");let r=[(await Si(i)).n];r=await To(r,t),tn(r.join(`
`)),se({title:"复制名称",text:`已复制选中文件名,复制类型:${e}`,icon:"success",timer:1e3})}})}async function _r(e,t){return new Ks({key:`_lh_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,s)=>{s.stopPropagation(),s.preventDefault();const i=$(s.target).closest("li"),o=await zt(i),r=await Io(o),a=await Lo(o,r,t);tn(a),se({title:"复制路径",text:`已复制选中路径,复制类型:${e}`,icon:"success",timer:1e3})}})}async function W1(){return new Bo({injectDecider:yd,key:"_open_in_new_tab",label:"新标签页",icon:"",title:"在新标签页打开",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),s=await zt(n);if(!s||!s.id){se({text:"无法获取目录ID",timer:1200});return}const i=Ii(s.id);window.open(i,"_blank","noopener noreferrer")}})}async function K1(){return new Fa({key:"_s_smart_mkdir",label:"同名目录",icon:"icon-operate ifo-move",title:"将选中的文件移动到同名目录",onClick:await ob(!0)})}async function G1(){return new Fa({key:"_s_copy_names_paths",label:"名称路径",icon:"icon-operate ifo-copy",showIcon:!1,title:"复制选中文件的名称路径",onClick:async(e,t)=>{},subItems:[await vr("完整名称",Vt.full),await vr("不含后缀",Vt.pure),await vr("完整文件名,去重",Vt.fullUnique),await vr("不含后缀,去重",Vt.pureUnique),new gd({}),await rp("路径(Unix)",Wt.unixPath),await rp("路径(Windows)",Wt.winPath)]})}async function vr(e,t){return new Fo({key:`_s_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,s)=>{let o=(await Wn(!0)).map(r=>r.name);o=await To(o,t),tn(o.join(`
`)),se({title:"复制名称",text:`已复制选中文件名。数量:${o.length},复制类型:${e}`,icon:"success",timer:1e3})}})}async function rp(e,t){return new Fo({key:`_s_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,s)=>{const i=await Wn(!0);let o=[];se({text:"正在获取已选文件路径...",timer:0}),fe.showLoading();try{o=await ad(i,t),fe.close()}catch(r){console.error(r),se({text:`获取已选文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{fe.hideLoading()}tn(o.join(`
`)),se({title:"复制路径",text:`已复制选中文件的路径。数量:${o.length},复制类型:${e}`,icon:"success",timer:1e3})}})}async function ap(){const e=await Wn(!0);if(!e.length)return;const t=Date.now().toString(),n=unsafeWindow.open(Ma("xxx"),t);await mt(1e3);let s=10;for(;s>0;)n==null||n.postMessage({event:"play",body:{id:t,files:e}},"https://v.anxia.com"),await mt(1e3),s--}async function Y1(){const e=[...(await mr()).filter(t=>t.enabled),...(await Vs(Sn.play)).filter(t=>t.enabled)];return new Fa({key:"_s_play_with_x_d",label:"播放",title:"播放选中的文件",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),await ap()},subItems:[...await Q1(Fo,e),new gd({}),new Fo({label:"关于选中播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),se({title:"关于选中播放",html:`
              <p>点击主按钮(即「播放」)或「在线播放」会在线播放选中的视频。</p><br>
              <p>如果是点击调用本地播放器播放:<p>
              <p>原理: 生成m3u8文件,上传m3u8文件到115,调用播放该m3u8的CloudDrive2直链。<p>
              <p>设定: m3u8默认放在网盘根目录下的「.ce-m3u8-temp」目录下,不会自动清理。<p>
              <p>作为使用者需做的: 在CloudDrive2里设置「.ce-m3u8-temp」目录缓存时间为1秒。</p>
              <p class="text-info" style="font-size:12px;">这个目录会在首次播放时自动创建,如果想提前设置目录缓存时间,可以自己创建。另外,可以在「设置 - 菜单设置 - 全局设置」中修改「M3U8临时目录」以设置目录位置。</p>
              <br><p class="text-danger">导致播放失败的可能: CloudDrive2目录缓存工作异常,导致请求不到m3u8文件。</p>
            `,showConfirmButton:!0,width:600,timer:18e5})},icon:"data-text:❓"})]})}async function J1(e){if(e=e.trim(),!e)throw new Error("m3u8临时目录路径为空!");const t=await eb(e);if(t.id)return console.log("[ensureM3u8TempDir] result:",t),t.id;throw new Error("创建m3u8临时目录失败!")}async function Q1(e,t){const n=[];for(const s of t){const i=po(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(o,r)=>{if(r.stopPropagation(),r.preventDefault(),o.key==="_ce_p_p_builtin_online"){await ap();return}const a=await Ws();try{let l=await Wn(!0);if(l=l.filter(T=>T.isDir||T.isVideo||T.isImage),l.length===0){se({title:"播放失败",text:"没有可以播放的目录或媒体文件!",icon:"error",timer:2e3});return}const u=await J1(a.m3u8TempDir),f=await Zw(l,u);console.log("[selection.buildPlayMenuItems generatePlaylistOn115]",f);const h=f.data,y=await Ms(),_={id:h.file_id,name:h.file_name,parentId:h.cid,sizeBytes:h.file_size,pickCode:h.pick_code,isDir:!1,isFile:!0},b=Ao([a.m3u8TempDir,_.name],Vn.unix);se({title:"检查m3u8文件",text:"正在检查m3u8文件是否已准备就绪...",icon:"info",timer:0}),fe.showLoading(),await Mw(y,b,1e3,6e4),se({icon:"success",text:"m3u8文件已准备就绪,即将开始播放..."});const E=await Do(_,s,y);window.open(E,"_blank","noopener noreferrer")}catch(l){console.error(l),se({title:"播放失败",text:l.toString(),icon:"error",timer:6e4,showConfirmButton:!0})}finally{fe.hideLoading()}}});n.push(i)}return n}const X1={label:"选中项菜单",key:"selection",hiddenStyles:[{selector:"div.list-operate.lo-right li[menu={key}]",css:"width: 0 !important; opacity: 0 !important; padding: 0 !important; margin: 0 !important;"}],items:[{label:"下载",key:"download"},{label:"移动",key:"move"},{label:"标签",key:"edit_file_label"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"星标",key:"star"},{label:"删除",key:"delete"},{label:"分享",key:"public_share"},{label:"设置共享",key:"setShare"},{label:"取消共享",key:"cancelShare"},{label:"复制",key:"set_copy"},{label:"复制到...",key:"copy_list"},{label:"加密隐藏",key:"hide_file"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"设为快捷入口",key:"set_category"},{label:"取消快捷入口",key:"unset_category"},{label:"显示时长",key:"show_play_long"},{label:"修改封面",key:"cover"},{label:"一键排重",key:"same"},{label:"导出目录树",key:"export_dir"},{label:"显示属性",key:"attribute"},{label:"转存至相册",key:"trans_to_album"}]},Z1={label:"列表项右键菜单",key:"context",hiddenStyles:[{selector:"div.context-menu.menu-upward li[val={key}] a",css:"display: none !important;"}],items:[{label:"打开文件",key:"view"},{label:"打开文件夹",key:"open_dir"},{label:"下载文件",key:"download"},{label:"下载文件夹",key:"download_dir"},{label:"打包下载",key:"bale_download"},{label:"刷新",key:"refresh"},{label:"复制",key:"set_copy"},{label:"复制到...",key:"copy_list"},{label:"加密隐藏",key:"hide_file"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"显示时长",key:"show_play_long"},{label:"取消时长",key:"hide_play_long"},{label:"添加到我听",key:"listen"},{label:"美化",key:"magic"},{label:"修改封面",key:"cover"},{label:"删除封面",key:"del_cover"},{label:"一键排重",key:"same"},{label:"移动",key:"move"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"显示属性",key:"attribute"},{label:"删除",key:"delete"},{label:"播放器播放",key:"player"},{label:"转存到相册",key:"trans_to_album"},{label:"举报",key:"report"}]},e0={label:"列表项悬浮菜单",key:"hover",hiddenStyles:[{selector:"div.file-opr[rel=menu] a[menu={key}]",css:"width: 0 !important; opacity: 0 !important; padding: 0 !important; margin: 0 !important;"},{selector:"div.context-menu li[menu={key}] a",css:"display: none !important;"}],items:[{label:"星标",key:"star"},{label:"下载文件",key:"download_one"},{label:"下载文件夹",key:"download_dir_one"},{label:"移动",key:"move"},{label:"标签",key:"edit_file_label"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"删除",key:"delete"},{label:"分享",key:"public_share"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"设置共享",key:"setShare"},{label:"取消共享",key:"cancelShare"},{label:"复制",key:"set_copy"},{label:"显示时长",key:"show_play_long"},{label:"修改封面",key:"cover"},{label:"一键排重",key:"same"},{label:"导出目录树",key:"export_dir"},{label:"显示属性",key:"attribute"},{label:"转存至相册",key:"trans_to_album"},{label:"设为快捷入口",key:"set_category"},{label:"取消快捷入口",key:"unset_category"}]},lp=st.hiddenOfficialMenuKeys;async function cp(){return await Ze.get(lp,[])}async function t0(e,t=!1){var n;await Ze.set(lp,e),t&&(unsafeWindow.postMessage({event:ct.officialMenuStyleChange},"*"),(n=unsafeWindow.frames.wangpan)==null||n.postMessage({event:ct.officialMenuStyleChange},"*"))}async function n0(e){const t=[];return e.forEach(n=>{n.items.forEach(s=>{s.hidden&&t.push(`${n.key}_${s.key}`)})}),t}async function up(){const e=[X1,Z1,e0],t=await cp();return e.forEach(n=>{n.items.forEach(s=>{const i=`${n.key}_${s.key}`;t.includes(i)?s.hidden=!0:s.hidden=!1})}),e}async function s0(){const e=await up(),t=[];return e.forEach(n=>{n.hiddenStyles.forEach(s=>{const i=[];n.items.forEach(o=>{!o.hidden||i.push(s.selector.replace("{key}",o.key))}),i.length&&t.push(i.join(`,
`)+" { "+s.css+" }")})}),t.join(`
`)}async function dp(){const e="cloud115EnhancerOfficialMenuStyle",t=await s0();let n=document.getElementById(e);if(n){n.innerHTML=t;return}n=document.createElement("style"),n.id=e,n.innerHTML=t,document.body.appendChild(n)}async function i0(){const{host:e,search:t}=location;if(!e.includes("115.com"))return;console.log("[Cloud115 Enhancer - menu] running..."),o0(),document.addEventListener(Qt.EVENT_CLOSE_MENU,s=>{$("#"+s.detail.menu.key).closest(".context-menu").hide()});const n=await Ws();!n.enabled||(r0(n),await rd(n),window.top===window.self&&a0(n),c0(n),(t.includes("ct=file")||t.includes("mode=search"))&&(l0(n),u0(n),nb(n)))}async function o0(){console.log("[Cloud115 Enhancer - menu] injectUI");const e="ceCustomUrlHelp",t=document.createElement("div");t.id=e,document.body.appendChild(t),_n(f1).mount(`#${e}`)}async function r0(e){!e.manageOfficialMenus||(dp(),window.addEventListener("message",async t=>{t.data.event===ct.officialMenuStyleChange&&(console.log("[Cloud115 Enhancer - menu] officialMenuStyleChange",location.href),await mt(1e3),console.log(await cp()),dp())}))}const kl=async(e,t)=>{};async function a0(e){const{[Be.dirContext]:t}=e;if(!t.enabled)return;const n=[];t.rename&&n.push(await I1()),t.delete&&n.push(await D1()),t.play&&n.push(await P1(!0)),t.copyNames&&n.push(new St({key:"_dir_copy_names",label:"名称路径",icon:"icon-operate ifo-copy",onClick:kl,subItems:[await wr("完整名称",Vt.full),await wr("不含后缀",Vt.pure),await wr("完整名称,去重",Vt.fullUnique),await wr("不含后缀,去重",Vt.pureUnique),new vb({}),await sp("路径(Unix)",Wt.unixPath),await sp("路径(Windows)",Wt.winPath)]}));const s=[];t.move&&s.push(await O1()),t.viewProp&&s.push(await N1()),t.showSubFolderSize&&s.push(await B1()),t.copy&&s.push(await M1()),t.copyTo&&s.push(await R1()),t.exportList&&s.push(await T1()),t.viewInCloudDrive&&s.push(await L1()),s.length===1?n.push(s[0]):s.length>1&&n.push(new St({key:"_dir_more",label:"更多",icon:"icon-operate ifo-open",onClick:kl,subItems:s})),await new xb({items:n,siblingSelector:'[val="upload"]',position:ps.before}).inject(),$(".ce-menu-parent .ce-menu-trigger").on("mouseover",function(){$(this).find(".ce-menu-dropdown").show()}).on("mouseout",function(){$(this).find(".ce-menu-dropdown").hide()})}async function l0(e){const{[Be.listItemHover]:t}=e;if(!t.enabled)return;const n=[];t.openInNewTab&&n.push(await W1()),t.search&&n.push(await H1()),t.play&&n.push(await j1()),t.copyNames&&n.push(await V1(t)),new $b({items:n,position:ps.after,siblingSelector:'[menu="move"], [menu="delete"]'}).inject()}async function c0(e){const{[Be.listItemContext]:t}=e;if(!t.enabled)return;const n=[],s=[];t.copyNames&&s.push(await ip("完整名称",Vt.full),await ip("不含后缀",Vt.pure),new md({}),await br("路径(Unix)",Wt.unixPath),await br("路径(Windows)",Wt.winPath),await br("上级路径(Unix)",Wt.unixParentPath),await br("上级路径(Windows)",Wt.winParentPath)),t.viewInCloudDrive&&s.push(new md({}),await F1()),s.length&&n.push(new No({key:"_list_item_copy_name_path",label:"名称路径",icon:"icon-operate ifo-copy",onClick:kl,subItems:s})),new Cb({items:n,position:ps.after,siblingSelector:'[val="refresh"]',useObserver:!0,observeTarget:document.body,disposeObserverAfterInjection:!1}).inject()}async function u0(e){const{[Be.selection]:t}=e;if(!t.enabled)return;const n=[];location.search.includes("ac=search")||t.moveToSelfNameDir&&n.push(await K1()),t.copyNames&&n.push(await G1()),t.play&&n.push(await Y1()),new Eb({items:n,position:ps.before,siblingSelector:"ul li"}).inject()}const fp=st.offline;var xr=(e=>(e.name="name",e.nameRegex="nameRegex",e.infoHash="infoHash",e.url="url",e))(xr||{});const d0={name:"名称",nameRegex:"名称正则",infoHash:"哈希",url:"链接"};function f0(e){return{onlyMagnetEd2k:!1,enableOptimization:!0,reqInterval:500,maxPage:0,showInfoHash:!0,enableListManagement:!0,fixGotoPage:!1,enableSearcher:!0,searchMaxPage:5,searchKeywordType:"name",searchStatus:Nt.any,searchStopOnFound:!1,searchReqInterval:10,noGotoTaskPage:!0,...e}}async function ns(){const e=f0(),t=await Ze.get(fp,e);return{...e,...t}}async function pp(e){await Ze.set(fp,e),window.postMessage({event:li.configChanged,body:JSON.parse(JSON.stringify(e))},"*")}async function p0(e){const t=await us("#js-warp"),s=t[0].querySelectorAll("li[complete]");s.length>0&&s.forEach(async o=>{await hp(o,e)}),y0(e),new MutationObserver(async([o])=>{if(o.type==="childList"){o.addedNodes.forEach(async a=>{await hp(a,e)});const r=document.querySelector(".ce-checkbox-all input");r.checked=!1,await Cr([])}}).observe(t[0],{childList:!0})}async function h0(e){const t=e;return{complete:t.getAttribute("complete"),cate_id:t.getAttribute("cate_id"),delete_id:t.getAttribute("delete_id"),status:t.getAttribute("status"),suffix:t.getAttribute("suffix"),name:t.getAttribute("name"),hash:t.getAttribute("hash")}}async function hp(e,t){const n=e,s=await h0(e);w0(n,t,s),m0(n,t,s),g0(n,t,s)}async function m0(e,t,n){if(!t.showInfoHash||e.querySelector(".info-hash"))return;const s=e.querySelector(".file-name"),i=document.createElement("div");i.classList.add("info-hash"),i.textContent=n.hash,i.title=`点击复制${n.hash}`,s.after(i),i.addEventListener("click",()=>{bi(n.hash,"text"),se({text:"已复制",icon:"success",timer:800})});const o=e.querySelector(".desc-tips");o&&o.style.display!=="none"&&e.classList.add("ce-task-trouble")}async function g0(e,t,n){const s=e.querySelector(".file-operate");if(s.querySelector(".ce-buttons"))return;const i=document.createElement("span");i.className="ce-buttons";const o=document.createElement("a");o.className="pure-button button-mini button-info",o.href=Ii(n.cate_id),o.target="_blank",o.textContent="打开",o.title="在新标签页打开目录",i.append(o),s.prepend(i)}async function y0(e){if(!e.enableListManagement)return;const t=await us("#js-main .header-name");if(t.length===0){console.warn("[renderCheckboxAll] 找不到`#js-main .header-name`");return}const n=t[0];let s=n.querySelector(".ce-checkbox-all");s||(s=document.createElement("div"),s.classList.add("ce-checkbox"),s.classList.add("ce-checkbox-all"),s.innerHTML=`
      <input type="checkbox"/>
    `,n.prepend(s)),s.addEventListener("click",()=>{const i=s.querySelector("input").checked;document.querySelectorAll("#js-warp li").forEach(r=>{const a=r.querySelector("input");a.checked=i,r.classList.toggle("ce-selected",i)}),Sl().then(r=>{Cr(r)})})}async function w0(e,t,n){if(!t.enableListManagement||e.querySelector(".ce-checkbox"))return;const s=e.querySelector(".file-name-wrap"),i=document.createElement("div");i.classList.add("ce-checkbox"),i.innerHTML=`
    <input type="checkbox" data-id="${n.hash}" />
  `,s.prepend(i),e.classList.add("ce-show-checkbox"),i.addEventListener("click",async o=>{o.shiftKey?await _0(o,e):await b0(o,e)})}async function b0(e,t){t.classList.toggle("ce-selected");const n=document.querySelector(".ce-checkbox-all input"),s=await gp(!1);let i=0;for(const r of s)r.classList.contains("ce-selected")&&i++;const o=i===s.length;n.checked=o,n.indeterminate=!o&&i>0,Sl().then(r=>{Cr(r)})}async function _0(e,t){const n=await gp(!1),s=n.indexOf(t);let i=-1;for(let f=0;f<s;f++)if(n[f].classList.contains("ce-selected")){i=f;break}if(i===-1){for(let f=n.length-1;f>s;f--)if(n[f].classList.contains("ce-selected")){i=f;break}}i=i===-1?s:i;const o=Math.min(i,s),r=Math.max(i,s);let a=0;for(let f=0;f<n.length;f++){const h=n[f],y=h.querySelector(".ce-checkbox input"),_=f>=o&&f<=r;y.checked=_,_&&a++,h.classList.toggle("ce-selected",_)}const l=o===0&&r===n.length-1,u=document.querySelector(".ce-checkbox-all input");u.checked=l,u.indeterminate=!l&&a>0,Sl().then(f=>{Cr(f)})}async function mp(e){var n;const t={info_hash:e.getAttribute("hash"),status:Number(e.getAttribute("status")),name:e.getAttribute("name"),file_id:e.getAttribute("cate_id"),delete_file_id:e.getAttribute("delete_id"),url:((n=e.querySelector(".file-operate a[cp_href]"))==null?void 0:n.getAttribute("cp_href"))||""};return t.name||(t.name=e.querySelector(".file-name").textContent.trim()),t}async function gp(e){const t=document.querySelectorAll("#js-warp li"),n=[];return t.forEach(async s=>{const i=s;(!e||i.classList.contains("ce-selected"))&&n.push(i)}),n}async function Sl(){const e=document.querySelectorAll("#js-warp li"),t=[];return e.forEach(async n=>{const s=n;if(s.classList.contains("ce-selected")){const i=await mp(s);t.push(i)}}),t}var li=(e=>(e.selection="ce-offline-selection",e.configChanged="ce-offline-config-changed",e.searchPageChanged="ce-offline-search-page-changed",e))(li||{});async function Cr(e){window.postMessage({event:"ce-offline-selection",body:e},"*")}async function Al(e){document.querySelectorAll("#js-warp li").forEach(async n=>{const s=n,i=s.getAttribute("hash");e.includes(i)&&dd(s)})}async function v0(e,t,n,s){var _;const i=[],o=n.maxPage||5;let r="",a=null,l="",u="",f="";n.name!==void 0&&(r=n.caseSensitive?n.name:n.name.toLowerCase()),n.nameRegex!==void 0&&(a=new RegExp(n.nameRegex)),n.infoHash!==void 0&&(l=n.caseSensitive?n.infoHash:n.infoHash.toLowerCase()),n.url!==void 0&&(u=n.caseSensitive?n.url:n.url.toLowerCase()),n.status!==void 0&&n.status!==Nt.any&&n.status.toString()!==""&&(f=n.status.toString());let h=n.stopOnFound||!1;(l||u)&&(h=!0);let y=-1;for(let b=1;b<=o&&!(y>-1&&b>y);b++){window.postMessage({event:"ce-offline-search-page-changed",body:b},"*");const E=await Gu(b,e,t);y===-1&&(y=E.page_count);const T=E.tasks;for(const M of T){const I=n.caseSensitive?M.name:M.name.toLowerCase(),P=n.caseSensitive?M.info_hash:M.info_hash.toLowerCase(),V=n.caseSensitive?M.url:(_=M.url)==null?void 0:_.toLowerCase(),oe=r&&n.fuzzyName?I.includes(r):!1,j=a?a.test(I):!1,X=l&&P===l,le=u&&V===u;if((f?f===M.status.toString():!0)&&(oe||j||X||le)&&(i.push(M),h))break}if(h&&i.length)break;b<o&&await mt(s.searchReqInterval||50)}return i}async function x0(){if(!(await ns()).fixGotoPage)return;const t=await Cn("#js-page");if(!t){console.warn("[fixGotoPage] 找不到`#js-page`");return}const n=async r=>{if(r.key!=="Enter")return;const a=r.target,l=parseInt(a.value);if(isNaN(l)){a.select();return}parent.window.Core.OFFL5Plug.ChangePage(l)},s=async(r=!1)=>{const a=t.querySelector('input[rel="page_jump"]');if(!a)return;const l=document.createElement("input");l.setAttribute("rel","page_jump"),l.type="text",l.style.backgroundColor="#fefcea",l.title="这是 115不大助手 替换的输入框,如果想恢复原有的输入框,请在「离线设置」中关闭「修复输入页码跳转」选项",l.addEventListener("keydown",n),a.insertAdjacentElement("beforebegin",l),a.remove(),r&&l.focus()},i=Rt(async r=>{s(!0)},50),o=new MutationObserver(async([r])=>{r.type==="childList"&&i(r)});s(!1),o.observe(t,{childList:!0})}const C0={class:"ce-config ce-offline-config"},$0={class:"pure-form pure-form-aligned offline-exporter-config-form"},E0={class:"pure-control-group"},k0=c("label",{for:"noGotoTaskPage"},"添加任务后不跳转",-1),S0=c("div",{class:"pure-form-message text-success"}," 官方的添加离线任务在添加任务后可能会跳转到任务列表页,开启此选项可以避免跳转。 ",-1),A0={class:"pure-control-group"},P0=c("label",{for:"enableListManagement"},"启用批量管理",-1),I0=c("div",{class:"pure-form-message text-success"}," 可以选中多个任务进行操作,支持shift多选。 ",-1),T0={class:"pure-control-group"},L0=c("label",{for:"showInfoHash"},"显示链接哈希",-1),O0=c("div",{class:"pure-form-message text-success"}," 显示离线任务的哈希文本,点击可以复制。 ",-1),D0={class:"pure-control-group"},M0=c("label",{for:"fixGotoPage"},"修复输入页码跳转",-1),R0=c("div",{class:"pure-form-message text-success"}," 如果官方的输入页码跳转功能异常,可开启此选项。 ",-1),N0=c("div",{class:"ce-tips"},"以下是导出链接相关选项",-1),B0={class:"pure-control-group"},F0=c("label",{for:"onlyMagnetEd2k"},"只取磁力和ED2K链接",-1),U0=c("div",{class:"pure-form-message text-success"}," 导出链接时,只取磁力和ED2K链接,其他比如http链接会被略过。 ",-1),j0={class:"pure-control-group"},H0=c("label",{for:"enableOptimization"},"启用导出优化",-1),q0=c("div",{class:"pure-form-message text-success"}," 据观察,离线记录列表是将未完成的记录放在最前面的。如果只需导出未完成链接, 当获取到一个已完成的记录时,便可以停止继续获取后面的记录,节省时间。 ",-1),z0={class:"pure-control-group"},V0=c("label",{for:"reqInterval"},"导出请求数据间隔",-1),W0=c("div",{class:"pure-form-message text-success"}," 导出时请求分页的间隔,单位为毫秒,默认500。 ",-1),K0={class:"pure-control-group"},G0=c("label",{for:"maxPage"},"最多导出页数",-1),Y0=c("div",{class:"pure-form-message text-success"}," 0表示不限制,否则表示最多导出的页数。 ",-1),J0=c("div",{class:"ce-tips"},[Q("以下是搜索离线任务相关选项。"),c("small",{class:"text-info"},"提示: 除了关键词,其他搜索条件都会持久保存。")],-1),Q0={class:"pure-control-group"},X0=c("label",{for:"reqInterval"},"搜索请求数据间隔",-1),Z0=c("div",{class:"pure-form-message text-success"}," 搜索时请求分页的间隔,单位为毫秒,默认10。 ",-1),yp=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>ns()),t=await t,n(),t));return Pt(async()=>{}),dt(s,Rt(async i=>{await pp(i),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,o)=>(N(),H("div",C0,[c("form",$0,[c("fieldset",null,[c("div",E0,[k0,z(c("input",{id:"noGotoTaskPage",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.noGotoTaskPage=r)},null,512),[[ve,s.value.noGotoTaskPage]]),S0]),c("div",A0,[P0,z(c("input",{id:"enableListManagement",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>s.value.enableListManagement=r)},null,512),[[ve,s.value.enableListManagement]]),I0]),c("div",T0,[L0,z(c("input",{id:"showInfoHash",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>s.value.showInfoHash=r)},null,512),[[ve,s.value.showInfoHash]]),O0]),c("div",D0,[M0,z(c("input",{id:"fixGotoPage",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=r=>s.value.fixGotoPage=r)},null,512),[[ve,s.value.fixGotoPage]]),R0]),N0,c("div",B0,[F0,z(c("input",{id:"onlyMagnetEd2k",type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>s.value.onlyMagnetEd2k=r)},null,512),[[ve,s.value.onlyMagnetEd2k]]),U0]),c("div",j0,[H0,z(c("input",{id:"enableOptimization",type:"checkbox","onUpdate:modelValue":o[5]||(o[5]=r=>s.value.enableOptimization=r)},null,512),[[ve,s.value.enableOptimization]]),q0]),c("div",z0,[V0,z(c("input",{id:"reqInterval",type:"number","onUpdate:modelValue":o[6]||(o[6]=r=>s.value.reqInterval=r),min:50},null,512),[[He,s.value.reqInterval]]),W0]),c("div",K0,[G0,z(c("input",{id:"maxPage",type:"number","onUpdate:modelValue":o[7]||(o[7]=r=>s.value.maxPage=r),min:0},null,512),[[He,s.value.maxPage]]),Y0]),J0,c("div",Q0,[X0,z(c("input",{id:"reqInterval",type:"number","onUpdate:modelValue":o[8]||(o[8]=r=>s.value.searchReqInterval=r),min:10},null,512),[[He,s.value.searchReqInterval]]),Z0])])])]))}}),o5="",ex={class:"ce-offline-exporter"},tx={key:0},nx=c("button",{type:"button",class:"pure-button button-mini"},"设置",-1),sx=Ne({__name:"OflineExporter",setup(e){const t=`\r
`;let n,s;const i=ue([]);let o={};It(async()=>{o=await ns(),n=await Ju(),console.log("[profile]",n),s=await Yu(),console.log("[space]",s),r(),await p0(o)});async function r(){window.addEventListener("message",E=>{const{event:T,body:M}=E.data;switch(T){case li.selection:i.value=M;break;case li.configChanged:o=M;break}},!1)}async function a(E=!1,T=""){const{isConfirmed:M,value:I}=await fe.fire({title:"根据链接删除离线任务",html:`
      <div>每行一个链接,支持磁力链接和ED2K链接</div>
      <div>
        <label class="swal2-checkbox" style="display: flex;">
          <input type="checkbox" id="swalDeleteFile">
          <span class="swal2-label">同时删除文件</span>
        </label>
      </div>
      <div>
        <textarea id="swalUrls" aria-label="每行一个链接" class="swal2-textarea" placeholder="每行一个链接" style="width:80%;"></textarea>
      </div>
    `,focusConfirm:!1,didOpen:()=>{const oe=document.getElementById("swalDeleteFile");oe.checked=E;const j=document.getElementById("swalUrls");j.value=T,j.focus()},preConfirm:()=>{const oe=document.getElementById("swalDeleteFile"),j=document.getElementById("swalUrls");return{deleteFile:oe?oe.checked:!1,urls:j?j.value:""}},width:620,inputPlaceholder:"每行一个",inputAttributes:{"aria-label":"每行一个"},showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!M)return;if(I===void 0){alert("请输入链接!");return}const P=[],V=I.urls.trim().split(`
`);for(let oe=0;oe<V.length;oe++){const j=V[oe].trim();if(xc(j)||Cc(j)){const X=Ec(j);X&&P.push(X.toLowerCase())}}fe.showLoading(),fe.update({html:"正在删除..."}),await Pa(P,s,I.deleteFile,n.user_id),se({icon:"success",title:"删除成功!请刷新页面查看最新的列表。",timer:3e4,position:"top-end"}),await Al(P)}async function l(){const E=i.value.map(P=>P.info_hash);if(!E.length)return;const{isConfirmed:T,value:M}=await fe.fire({title:"批量删除",icon:"warning",html:`确定要删除选中的 ${E.length} 个离线记录吗?`,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!T)return;const I=!!M;fe.showLoading(),fe.update({html:"正在删除..."}),await Pa(E,s,I,n.user_id),se({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Al(E),i.value=[]}async function u(E){const T=[E];o.onlyMagnetEd2k&&T.push(Bt.magnetEd2k),console.log("[filters]",T),await b(s.sign,n.user_id,T)}function f(E,T){if(!T.length||T.length===1&&T[0]==="all")return E;const M={[Nt.failed]:Bt.failed,[Nt.illegal]:Bt.failed,[Nt.ing]:Bt.failed,[Nt.success]:Bt.success};return E=E.filter(I=>{if(!I.url&&!I.info_hash)return!1;const P=M[I.status];return T.includes(Bt.all)||P&&T.includes(P)?!(T.includes(Bt.magnetEd2k)&&(!Pm(I.info_hash)||I.url&&!xc(I.url)&&!Cc(I.url))):!1}),E}async function h(E,T,M){let I=[],P=1,V=0;for(;;){fe.update({html:`正在导出... 进度:第 ${P} 页`+(V?` / ${V}`:""),allowOutsideClick:!1});const oe=await Gu(P,E,T);if(!oe.tasks||!oe.tasks.length)break;if(V===0&&o.maxPage>0?V=Math.min(oe.page_count,o.maxPage):V=oe.page_count,I=[...I,...f(oe.tasks,M)],o.enableOptimization&&M.includes(Bt.failed)&&y(oe.tasks)){console.warn("由于开启了导出优化,且检测到已获取的记录中至少有一个「已完成」的记录,将不再获取剩下的记录");break}if(P>=V)break;P++,await mt(o.reqInterval)}return I}function y(E){for(const T of E)if(T.status===Nt.success)return!0;return!1}async function _(){const E=[Bt.all];o.onlyMagnetEd2k&&E.push(Bt.magnetEd2k),console.log("[filters]",E);const T=i.value;if(!T.length)return;const M=[];T.forEach(I=>{!I.url&&I.info_hash&&(I.url=$c(I.info_hash)),M.push(I.url)}),M.length&&(bi(M.join(t),"text"),console.log("[links]",M),await fe.fire({title:"导出成功",icon:"success",html:`成功导出 ${M.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),vi(M.join(t),`115离线链接_数量${M.length}_${_i()}.txt`),!1)}))}async function b(E,T,M){fe.fire({title:"导出离线链接",html:"正在导出...",didOpen:()=>{fe.showLoading()}});const I=await h(E,T,M);if(fe.hideLoading(),!I.length){await fe.fire({title:"导出失败",icon:"error",html:"查询不到符合条件的离线记录!"});return}const P=[];if(I.forEach(V=>{!V.url&&V.info_hash&&(V.url=$c(V.info_hash)),P.push(V.url)}),!P.length){await fe.fire({title:"导出失败",icon:"error",html:"未完成的离线记录中没有磁力或HTTP链接!"});return}bi(P.join(t),"text"),console.log("[links]",P),await fe.fire({title:"导出成功",icon:"success",html:`成功导出 ${P.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),vi(P.join(t),`115离线链接_数量${P.length}_${_i()}.txt`),!1)})}return(E,T)=>{const M=xs("VDropdown");return N(),H("span",ex,[i.value.length?(N(),H("span",tx,[c("button",{type:"button",class:"pure-button button-small button-error",onClick:l},[Q("删除("),c("span",null,me(i.value.length),1),Q(")")]),Q("      ")])):Ue("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[0]||(T[0]=I=>a(!1,"")),title:"填写链接以删除对应的离线任务"},"根据链接删除"),Q("   "),i.value.length?(N(),H("button",{key:1,type:"button",class:"pure-button button-mini button-warning",onClick:_,title:"导出选中任务的链接"},[Q("导出已选"),c("span",null,"("+me(i.value.length)+")",1)])):Ue("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[1]||(T[1]=I=>u(de(Bt).failed)),title:"导出未完成链接"},"导出未完成"),c("button",{type:"button",class:"pure-button button-mini button-success",onClick:T[2]||(T[2]=I=>u(de(Bt).success)),title:"导出已完成链接"},"导出已完成"),c("button",{type:"button",class:"pure-button button-mini button-warning",onClick:T[3]||(T[3]=I=>u(de(Bt).all)),title:"导出全部链接"},"导出全部"),Q("   "),Ce(M,{distance:5,"arrow-padding":10},{popper:Je(()=>[(N(),Zt(nf,null,{default:Je(()=>[Ce(yp)]),_:1}))]),default:Je(()=>[nx]),_:1})])}}}),r5="",ix=["cate_id","delete_id","status","hash"],ox={class:"file-name-wrap"},rx={class:"file-name"},ax={task_popup:"goto",href:"javascript:;",class:"name"},lx={rel:"name"},cx={class:"desc-tips",rel:"file_down_violations"},ux={class:"txt-red",rel:"file_down_tips"},dx=["filename"],fx={class:"file-size"},px={class:"file-process"},hx=c("i",{class:"icon-file-status ifst-failure"},null,-1),mx=c("span",{rel:"progress"},"下载失败",-1),gx=c("i",{class:"icon-file-status ifst-success"},null,-1),yx=c("span",{rel:"progress"},"下载成功",-1),wx=c("i",{class:"icon-file-status ifst-downing"},null,-1),bx={rel:"progress"},_x=c("i",{class:"icon-file-status ifst-violation"},null,-1),vx=c("span",{rel:"progress"},"违规",-1),xx=c("i",{class:"icon-file-status ifst-failure"},null,-1),Cx=c("span",{rel:"progress"},"[未知]",-1),$x={class:"file-operate",rel:"opt"},Ex=c("a",{href:"javascript:;",task_popup:"goto"},[c("i",{class:"icon-operate ifo-opendir"}),c("s",null,"跳转到目录")],-1),kx=["cp_href"],Sx=[c("i",{class:"icon-operate ifo-copy"},null,-1),c("s",null,"复制",-1)],Ax=c("a",{href:"javascript:;",class:"btn-delete-offline"},[c("i",{class:"icon-operate ifo-remove"}),c("s",null,"删除")],-1),Px=Ne({__name:"OfflineItem",props:{item:null,space:null,profile:null},setup(e){const t=e,n=cn(()=>t.item.percentDone?parseInt(t.item.percentDone.toString()):0),s=cn(()=>{const{name:r,del_path:a}=t.item;let l=r.replace(/^.*\./,"");return a&&/\/$/.test(a)&&(l="folder"),/^[a-z\d]+$/i.test(l)||(l="unknown"),l}),i=cn(()=>{const{err:r}=t.item;return r?Zg[r]:""}),o=cn(()=>t.item.can_appeal===1);return(r,a)=>(N(),H("li",{complete:"",cate_id:e.item.file_id,delete_id:e.item.delete_file_id,status:e.item.status,hash:e.item.info_hash},[c("div",ox,[c("i",{class:Ye(["file-type",`tp-${de(s)}`])},null,2),c("div",rx,[c("em",null,[c("a",ax,[c("span",lx,me(e.item.name),1)])])]),z(c("div",cx,[c("span",ux,me(de(i)),1),z(c("a",{href:"javascript:;",class:"btn-link",filename:e.item.name,rel:"violations_down_btn"},"去申诉",8,dx),[[Lt,de(o)]])],512),[[Lt,de(i)]])]),c("div",fx,[c("span",null,me(de(ho)(e.item.size)),1)]),c("div",px,[e.item.status===de(Nt).failed?(N(),H(Fe,{key:0},[hx,mx],64)):e.item.status===de(Nt).success?(N(),H(Fe,{key:1},[gx,yx],64)):e.item.status===de(Nt).ing?(N(),H(Fe,{key:2},[wx,c("span",bx,me(de(n))+"%",1)],64)):e.item.status===de(Nt).illegal?(N(),H(Fe,{key:3},[_x,vx],64)):(N(),H(Fe,{key:4},[xx,Cx],64))]),c("div",$x,[Ex,c("a",{href:"javascript:;",cp_href:e.item.url,task_popup:"copy"},Sx,8,kx),Ax])],8,ix))}}),Ix={class:"ce-offline-list"},Tx=Ne({__name:"OfflineList",props:{items:null,space:null,profile:null},setup(e){return(t,n)=>(N(),H("div",Ix,[c("ul",null,[(N(!0),H(Fe,null,nt(e.items,(s,i)=>(N(),Zt(Px,{Key:i,item:s,space:e.space,profile:e.profile},null,8,["Key","item","space","profile"]))),256))])]))}}),Lx={inline:"",class:"pure-form search-form",size:"small"},Ox={class:"form-item",label:"关键词"},Dx=["value"],Mx={class:"form-item"},Rx=["onKeyup"],Nx={class:"form-item",label:"状态"},Bx=["value"],Fx=["value"],Ux={class:"form-item",label:"页数"},jx=c("small",null,"页",-1),Hx={class:"form-item"},qx={key:0,title:"根据「名称/名称正则」查找时,是否在找到一个结果时停止继续查找"},zx={key:0,class:"search-tips"},Vx={class:"tips-body"},Wx={key:0},Kx=Ne({__name:"OfflineSearcher",setup(e){let t,n;const s=ue(),i=ue({KeywordType:xr.name,keyword:"",status:Nt.any,maxPage:5,stopOnFound:!1});let o={...i.value};const r=ue(null),a=ue(!1),l=ue([]),u=ue(null),f=ue({content:"",subContent:"",visible:!1});It(async()=>{t=await Ju(),n=await Yu(),s.value=await ns(),i.value.KeywordType=s.value.searchKeywordType,i.value.status=s.value.searchStatus,i.value.maxPage=s.value.searchMaxPage,i.value.stopOnFound=s.value.searchStopOnFound,o={...i.value},document.body.addEventListener("click",j=>{V(j)}),h()}),dt(i,Rt(async j=>{console.log("[searchParams changed]",wc(j)),_()},200),{deep:!0});async function h(){window.addEventListener("message",j=>{const{event:X,body:le}=j.data;switch(X){case li.searchPageChanged:y(le);break;case li.configChanged:s.value={...le};break}},!1)}async function y(j){console.log("[handleSearchPageChanged]",j),await oe({subContent:`正在搜索第 ${j} 页...`,visible:!0})}async function _(){const j=await ns();let X=0;o.KeywordType!==i.value.KeywordType&&(j.searchKeywordType=i.value.KeywordType,X++),o.status!==i.value.status&&(j.searchStatus=i.value.status,X++),o.maxPage!==i.value.maxPage&&(j.searchMaxPage=i.value.maxPage,X++),o.stopOnFound!==i.value.stopOnFound&&(j.searchStopOnFound=i.value.stopOnFound,X++),X&&(await pp(j),console.log("[handleSearchParamsChange]",j),s.value={...j}),o={...i.value}}async function b(j){var X;(X=r.value)==null||X.select()}async function E(j){var X;i.value.keyword="",(X=r.value)==null||X.focus()}async function T(){l.value=[],i.value.keyword="",o={...i.value},await oe({visible:!1}),await I(!1);try{parent.window.Core.OFFL5Plug.ChangePage(1)}catch(j){console.error(j)}}async function M(){var X;l.value=[];let{keyword:j}=i.value;if(j=j.trim(),j===""){await ni(),(X=r.value)==null||X.select(),Ti.fire({icon:"warning",title:"关键词不能为空!"});return}a.value=!0,await oe({content:"正在搜索...",subContent:"",visible:!0});try{const le={status:i.value.status,maxPage:i.value.maxPage,fuzzyName:!0,caseSensitive:!1,stopOnFound:i.value.stopOnFound};le[i.value.KeywordType]=i.value.keyword,le.infoHash&&(le.infoHash=Ec(le.infoHash)),console.log("[search filter]",le);const ge=await v0(n.sign,t.user_id,le,s.value);l.value=ge,console.log("[search result]",ge),ge.length>0?await oe({visible:!1}):await oe({content:"没有符合条件的离线任务",subContent:"",visible:!0}),await I(!0)}catch(le){console.warn("[search error]",le),Ti.fire({icon:"error",title:le.toString()}),await oe({content:"搜索失败!",subContent:le.toString(),visible:!0})}finally{a.value=!1}}async function I(j=!0){var ge,Le;!l.value.length&&j&&Ti.fire({icon:"warning",html:"没有符合条件的离线任务"}),await ni();const X=(ge=u.value)==null?void 0:ge.querySelector("ul");if(!X)return;const le=document.querySelector("ul#js-warp");le&&(le.innerHTML=X.innerHTML),await P(),(Le=r.value)==null||Le.focus()}async function P(){const j=l.value.length,X=document.querySelector("#js-page");if(!X)return;const le=X.querySelector(".left-bvf span");le.textContent=`共搜索到 ${j} 个结果`;const ge=X.querySelector(".pagination .con");ge.style.display="none"}async function V(j){let X=j.target;if(X.classList.contains("ifo-remove")&&(X=X.closest("a")),!X.classList.contains("btn-delete-offline"))return;const le=X.closest("li"),ge=await mp(le),Le=[ge.info_hash];let _e={title:"删除离线记录",icon:"warning",html:`确定要删除「${ge.name}」吗?`,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"};ge.delete_file_id&&(_e={..._e,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件"});const{isConfirmed:L,value:ie}=await fe.fire(_e);if(!L)return;const G=!!ie;fe.showLoading(),fe.update({html:"正在删除..."}),await Pa(Le,n,G,t.user_id),se({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Al(Le)}async function oe(j){f.value={...f.value,...j}}return(j,X)=>(N(),H("div",{class:Ye(["ce-offline-searcher",{loading:a.value}])},[c("form",Lx,[c("fieldset",null,[c("div",Ox,[z(c("select",{"onUpdate:modelValue":X[0]||(X[0]=le=>i.value.KeywordType=le),size:"small",onChange:b},[(N(!0),H(Fe,null,nt(de(d0),(le,ge)=>(N(),H("option",{key:ge,value:ge},me(le),9,Dx))),128))],544),[[ai,i.value.KeywordType]])]),c("div",Mx,[c("div",{class:Ye(["clearable-wrap",{"is-empty":i.value.keyword===""}])},[z(c("input",{ref_key:"refKeyword",ref:r,"onUpdate:modelValue":X[1]||(X[1]=le=>i.value.keyword=le),placeholder:"请输入关键词",clearable:"",onKeyup:Kf(M,["enter"])},null,40,Rx),[[He,i.value.keyword]]),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall btn-clear",onClick:E},"×")],2)]),c("div",Nx,[z(c("select",{"onUpdate:modelValue":X[2]||(X[2]=le=>i.value.status=le),placeholder:"请选择",clearable:"",style:{width:"90px"}},[c("option",{value:de(Nt).any},"-状态-",8,Bx),(N(!0),H(Fe,null,nt(de(Um),(le,ge)=>(N(),H("option",{key:ge,value:ge},me(le),9,Fx))),128))],512),[[ai,i.value.status]])]),c("div",Ux,[z(c("input",{type:"number","onUpdate:modelValue":X[3]||(X[3]=le=>i.value.maxPage=le),min:1,max:1e5,title:"最多查找页数"},null,512),[[He,i.value.maxPage]]),jx]),c("div",Hx,[[de(xr).name,de(xr).nameRegex].includes(i.value.KeywordType)?(N(),H("label",qx,[z(c("input",{type:"checkbox","onUpdate:modelValue":X[4]||(X[4]=le=>i.value.stopOnFound=le),class:"stop-on-found"},null,512),[[ve,i.value.stopOnFound]]),Q(" 找到即停 ")])):Ue("",!0),c("button",{type:"button",class:"pure-button pure-button-primary button-small",onClick:M},"查找"),Q("    "),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall",onClick:T,title:"清空关键词;重置列表到非查找状态"},"重置")])])]),c("div",{ref_key:"refList",ref:u,class:"list"},[Ce(Tx,{items:l.value,space:de(n),profile:de(t)},null,8,["items","space","profile"])],512),f.value.visible?(N(),H("div",zx,[c("div",Vx,[c("h2",null,me(f.value.content),1),f.value.subContent?(N(),H("p",Wx,me(f.value.subContent),1)):Ue("",!0)])])):Ue("",!0)],2))}}),c5="";function Ln(e){return e.split("-")[0]}function ci(e){return e.split("-")[1]}function Qi(e){return["top","bottom"].includes(Ln(e))?"x":"y"}function Pl(e){return e==="y"?"height":"width"}function wp(e){let{reference:t,floating:n,placement:s}=e;const i=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2;let r;switch(Ln(s)){case"top":r={x:i,y:t.y-n.height};break;case"bottom":r={x:i,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:o};break;case"left":r={x:t.x-n.width,y:o};break;default:r={x:t.x,y:t.y}}const a=Qi(s),l=Pl(a);switch(ci(s)){case"start":r[a]=r[a]-(t[l]/2-n[l]/2);break;case"end":r[a]=r[a]+(t[l]/2-n[l]/2);break}return r}const Gx=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n;let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:u}=wp({...a,placement:s}),f=s,h={};for(let y=0;y<o.length;y++){const{name:_,fn:b}=o[y],{x:E,y:T,data:M,reset:I}=await b({x:l,y:u,initialPlacement:s,placement:f,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:e,floating:t}});if(l=E!=null?E:l,u=T!=null?T:u,h={...h,[_]:M!=null?M:{}},I){typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(a=I.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:l,y:u}=wp({...a,placement:f})),y=-1;continue}}return{x:l,y:u,placement:f,strategy:i,middlewareData:h}};function Yx(e){return{top:0,right:0,bottom:0,left:0,...e}}function bp(e){return typeof e!="number"?Yx(e):{top:e,right:e,bottom:e,left:e}}function Il(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function $r(e,t){t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:r,strategy:a}=e,{boundary:l="clippingParents",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:y=0}=t,_=bp(y),E=r[h?f==="floating"?"reference":"floating":f],T=await i.getClippingClientRect({element:await i.isElement(E)?E:E.contextElement||await i.getDocumentElement({element:r.floating}),boundary:l,rootBoundary:u}),M=Il(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...o.floating,x:n,y:s}:o.reference,offsetParent:await i.getOffsetParent({element:r.floating}),strategy:a}));return{top:T.top-M.top+_.top,bottom:M.bottom-T.bottom+_.bottom,left:T.left-M.left+_.left,right:M.right-T.right+_.right}}const Jx=Math.min,ks=Math.max;function Tl(e,t,n){return ks(e,Jx(t,n))}const Qx=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:s=0}=e!=null?e:{},{x:i,y:o,placement:r,rects:a,platform:l}=t;if(n==null)return{};const u=bp(s),f={x:i,y:o},h=Ln(r),y=Qi(h),_=Pl(y),b=await l.getDimensions({element:n}),E=y==="y"?"top":"left",T=y==="y"?"bottom":"right",M=a.reference[_]+a.reference[y]-f[y]-a.floating[_],I=f[y]-a.reference[y],P=await l.getOffsetParent({element:n}),V=P?y==="y"?P.clientHeight||0:P.clientWidth||0:0,oe=M/2-I/2,j=u[E],X=V-b[_]-u[T],le=V/2-b[_]/2+oe,ge=Tl(j,le,X);return{data:{[y]:ge,centerOffset:le-ge}}}}),Xx={left:"right",right:"left",bottom:"top",top:"bottom"};function Er(e){return e.replace(/left|right|bottom|top/g,t=>Xx[t])}function _p(e,t){const n=ci(e)==="start",s=Qi(e),i=Pl(s);let o=s==="x"?n?"right":"left":n?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Er(o)),{main:o,cross:Er(o)}}const Zx={start:"end",end:"start"};function Ll(e){return e.replace(/start|end/g,t=>Zx[t])}const eC=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function tC(e,t,n){return(e?[...n.filter(i=>ci(i)===e),...n.filter(i=>ci(i)!==e)]:n.filter(i=>Ln(i)===i)).filter(i=>e?ci(i)===e||(t?Ll(i)!==i:!1):!0)}const nC=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,s,i,o,r,a;const{x:l,y:u,rects:f,middlewareData:h,placement:y}=t,{alignment:_=null,allowedPlacements:b=eC,autoAlignment:E=!0,...T}=e;if((n=h.autoPlacement)!=null&&n.skip)return{};const M=tC(_,E,b),I=await $r(t,T),P=(s=(i=h.autoPlacement)==null?void 0:i.index)!=null?s:0,V=M[P],{main:oe,cross:j}=_p(V,f);if(y!==V)return{x:l,y:u,reset:{placement:M[0]}};const X=[I[Ln(V)],I[oe],I[j]],le=[...(o=(r=h.autoPlacement)==null?void 0:r.overflows)!=null?o:[],{placement:V,overflows:X}],ge=M[P+1];if(ge)return{data:{index:P+1,overflows:le},reset:{placement:ge}};const Le=le.slice().sort((L,ie)=>L.overflows[0]-ie.overflows[0]),_e=(a=Le.find(L=>{let{overflows:ie}=L;return ie.every(G=>G<=0)}))==null?void 0:a.placement;return{data:{skip:!0},reset:{placement:_e!=null?_e:Le[0].placement}}}}};function sC(e){const t=Er(e);return[Ll(e),t,Ll(t)]}const iC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:o,rects:r,initialPlacement:a}=t;if((n=o.flip)!=null&&n.skip)return{};const{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:y=!0,..._}=e,b=Ln(i),T=f||(b===a||!y?[Er(a)]:sC(a)),M=[a,...T],I=await $r(t,_),P=[];let V=((s=o.flip)==null?void 0:s.overflows)||[];if(l&&P.push(I[b]),u){const{main:le,cross:ge}=_p(i,r);P.push(I[le],I[ge])}if(V=[...V,{placement:i,overflows:P}],!P.every(le=>le<=0)){var oe,j;const le=((oe=(j=o.flip)==null?void 0:j.index)!=null?oe:0)+1,ge=M[le];if(ge)return{data:{index:le,overflows:V},reset:{placement:ge}};let Le="bottom";switch(h){case"bestFit":{var X;const _e=(X=V.slice().sort((L,ie)=>L.overflows.filter(G=>G>0).reduce((G,Se)=>G+Se,0)-ie.overflows.filter(G=>G>0).reduce((G,Se)=>G+Se,0))[0])==null?void 0:X.placement;_e&&(Le=_e);break}case"initialPlacement":Le=a;break}return{data:{skip:!0},reset:{placement:Le}}}return{}}}};function oC(e){let{placement:t,rects:n,value:s}=e;const i=Ln(t),o=["left","top"].includes(i)?-1:1,r=typeof s=="function"?s({...n,placement:t}):s,{mainAxis:a,crossAxis:l}=typeof r=="number"?{mainAxis:r,crossAxis:0}:{mainAxis:0,crossAxis:0,...r};return Qi(i)==="x"?{x:l,y:a*o}:{x:a*o,y:l}}const rC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:s,placement:i,rects:o}=t,r=oC({placement:i,rects:o,value:e});return{x:n+r.x,y:s+r.y,data:r}}}};function aC(e){return e==="x"?"y":"x"}const lC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i}=t,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:T=>{let{x:M,y:I}=T;return{x:M,y:I}}},...l}=e,u={x:n,y:s},f=await $r(t,l),h=Qi(Ln(i)),y=aC(h);let _=u[h],b=u[y];if(o){const T=h==="y"?"top":"left",M=h==="y"?"bottom":"right",I=_+f[T],P=_-f[M];_=Tl(I,_,P)}if(r){const T=y==="y"?"top":"left",M=y==="y"?"bottom":"right",I=b+f[T],P=b-f[M];b=Tl(I,b,P)}const E=a.fn({...t,[h]:_,[y]:b});return{...E,data:{x:E.x-n,y:E.y-s}}}}},cC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n;const{placement:s,rects:i,middlewareData:o}=t,{apply:r,...a}=e;if((n=o.size)!=null&&n.skip)return{};const l=await $r(t,a),u=Ln(s),f=ci(s)==="end";let h,y;u==="top"||u==="bottom"?(h=u,y=f?"left":"right"):(y=u,h=f?"top":"bottom");const _=ks(l.left,0),b=ks(l.right,0),E=ks(l.top,0),T=ks(l.bottom,0),M={height:i.floating.height-(["left","right"].includes(s)?2*(E!==0||T!==0?E+T:ks(l.top,l.bottom)):l[h]),width:i.floating.width-(["top","bottom"].includes(s)?2*(_!==0||b!==0?_+b:ks(l.left,l.right)):l[y])};return r==null||r({...M,...i}),{data:{skip:!0},reset:{rects:!0}}}}};function Ol(e){return(e==null?void 0:e.toString())==="[object Window]"}function ss(e){if(e==null)return window;if(!Ol(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function kr(e){return ss(e).getComputedStyle(e)}function On(e){return Ol(e)?"":e?(e.nodeName||"").toLowerCase():""}function Dn(e){return e instanceof ss(e).HTMLElement}function Sr(e){return e instanceof ss(e).Element}function uC(e){return e instanceof ss(e).Node}function vp(e){const t=ss(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ar(e){const{overflow:t,overflowX:n,overflowY:s}=kr(e);return/auto|scroll|overlay|hidden/.test(t+s+n)}function dC(e){return["table","td","th"].includes(On(e))}function xp(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=kr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}const Cp=Math.min,Xi=Math.max,Pr=Math.round;function ui(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let s=1,i=1;return t&&Dn(e)&&(s=e.offsetWidth>0&&Pr(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Pr(n.height)/e.offsetHeight||1),{width:n.width/s,height:n.height/i,top:n.top/i,right:n.right/s,bottom:n.bottom/i,left:n.left/s,x:n.left/s,y:n.top/i}}function is(e){return((uC(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ir(e){return Ol(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function $p(e){return ui(is(e)).left+Ir(e).scrollLeft}function fC(e){const t=ui(e);return Pr(t.width)!==e.offsetWidth||Pr(t.height)!==e.offsetHeight}function pC(e,t,n){const s=Dn(t),i=is(t),o=ui(e,s&&fC(t));let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(s||!s&&n!=="fixed")if((On(t)!=="body"||Ar(i))&&(r=Ir(t)),Dn(t)){const l=ui(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else i&&(a.x=$p(i));return{x:o.left+r.scrollLeft-a.x,y:o.top+r.scrollTop-a.y,width:o.width,height:o.height}}function Tr(e){return On(e)==="html"?e:e.assignedSlot||e.parentNode||(vp(e)?e.host:null)||is(e)}function Ep(e){return!Dn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function hC(e){let t=Tr(e);for(;Dn(t)&&!["html","body"].includes(On(t));){if(xp(t))return t;t=t.parentNode}return null}function Dl(e){const t=ss(e);let n=Ep(e);for(;n&&dC(n)&&getComputedStyle(n).position==="static";)n=Ep(n);return n&&(On(n)==="html"||On(n)==="body"&&getComputedStyle(n).position==="static"&&!xp(n))?t:n||hC(e)||t}function kp(e){return{width:e.offsetWidth,height:e.offsetHeight}}function mC(e){let{rect:t,offsetParent:n,strategy:s}=e;const i=Dn(n),o=is(n);if(n===o)return t;let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((i||!i&&s!=="fixed")&&((On(n)!=="body"||Ar(o))&&(r=Ir(n)),Dn(n))){const l=ui(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}return{...t,x:t.x-r.scrollLeft+a.x,y:t.y-r.scrollTop+a.y}}function gC(e){const t=ss(e),n=is(e),s=t.visualViewport;let i=n.clientWidth,o=n.clientHeight,r=0,a=0;return s&&(i=s.width,o=s.height,Math.abs(t.innerWidth/s.scale-s.width)<.01&&(r=s.offsetLeft,a=s.offsetTop)),{width:i,height:o,x:r,y:a}}function yC(e){var t;const n=is(e),s=Ir(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=Xi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-s.scrollLeft+$p(e);const l=-s.scrollTop;return kr(i||n).direction==="rtl"&&(a+=Xi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Sp(e){return["html","body","#document"].includes(On(e))?e.ownerDocument.body:Dn(e)&&Ar(e)?e:Sp(Tr(e))}function Lr(e,t){var n;t===void 0&&(t=[]);const s=Sp(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=ss(s),r=i?[o].concat(o.visualViewport||[],Ar(s)?s:[]):s,a=t.concat(r);return i?a:a.concat(Lr(Tr(r)))}function wC(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vp(n)){let s=t;do{if(s&&e===s)return!0;s=s.parentNode||s.host}while(s)}return!1}function bC(e){const t=ui(e),n=t.top+e.clientTop,s=t.left+e.clientLeft;return{top:n,left:s,x:s,y:n,right:s+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function Ap(e,t){return t==="viewport"?Il(gC(e)):Sr(t)?bC(t):Il(yC(is(e)))}function _C(e){const t=Lr(Tr(e)),s=["absolute","fixed"].includes(kr(e).position)&&Dn(e)?Dl(e):e;return Sr(s)?t.filter(i=>Sr(i)&&wC(i,s)&&On(i)!=="body"):[]}function vC(e){let{element:t,boundary:n,rootBoundary:s}=e;const o=[...n==="clippingParents"?_C(t):[].concat(n),s],r=o[0],a=o.reduce((l,u)=>{const f=Ap(t,u);return l.top=Xi(f.top,l.top),l.right=Cp(f.right,l.right),l.bottom=Cp(f.bottom,l.bottom),l.left=Xi(f.left,l.left),l},Ap(t,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}const xC={getElementRects:e=>{let{reference:t,floating:n,strategy:s}=e;return{reference:pC(t,Dl(n),s),floating:{...kp(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>mC(e),getOffsetParent:e=>{let{element:t}=e;return Dl(t)},isElement:e=>Sr(e),getDocumentElement:e=>{let{element:t}=e;return is(t)},getClippingClientRect:e=>vC(e),getDimensions:e=>{let{element:t}=e;return kp(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},CC=(e,t,n)=>Gx(e,t,{platform:xC,...n});var $C=Object.defineProperty,EC=Object.defineProperties,kC=Object.getOwnPropertyDescriptors,Pp=Object.getOwnPropertySymbols,SC=Object.prototype.hasOwnProperty,AC=Object.prototype.propertyIsEnumerable,Ip=(e,t,n)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mn=(e,t)=>{for(var n in t||(t={}))SC.call(t,n)&&Ip(e,n,t[n]);if(Pp)for(var n of Pp(t))AC.call(t,n)&&Ip(e,n,t[n]);return e},Zi=(e,t)=>EC(e,kC(t));function Tp(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?Tp(e[n],t[n]):e[n]=t[n])}const Rn={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function di(e,t){let n=Rn.themes[e]||{},s;do s=n[t],typeof s>"u"?n.$extend?n=Rn.themes[n.$extend]||{}:(n=null,s=Rn[t]):n=null;while(n);return s}function PC(e){const t=[e];let n=Rn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Rn.themes[n.$extend]||{}):n=null;while(n);return t.map(s=>`v-popper--theme-${s}`)}function Lp(e){const t=[e];let n=Rn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Rn.themes[n.$extend]||{}):n=null;while(n);return t}let Ss=!1;if(typeof window<"u"){Ss=!1;try{const e=Object.defineProperty({},"passive",{get(){Ss=!0}});window.addEventListener("test",null,e)}catch{}}let Op=!1;typeof window<"u"&&typeof navigator<"u"&&(Op=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Dp=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Mp={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Rp={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function Np(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Ml(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const dn=[];let As=null;const Bp={};function Fp(e){let t=Bp[e];return t||(t=Bp[e]=[]),t}let Rl=function(){};typeof window<"u"&&(Rl=window.Element);function We(e){return function(t){return di(t.theme,e)}}const Nl="__floating-vue__popper";var Up=()=>Ne({name:"VPopper",provide(){return{[Nl]:{parentPopper:this}}},inject:{[Nl]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:We("disabled")},positioningDisabled:{type:Boolean,default:We("positioningDisabled")},placement:{type:String,default:We("placement"),validator:e=>Dp.includes(e)},delay:{type:[String,Number,Object],default:We("delay")},distance:{type:[Number,String],default:We("distance")},skidding:{type:[Number,String],default:We("skidding")},triggers:{type:Array,default:We("triggers")},showTriggers:{type:[Array,Function],default:We("showTriggers")},hideTriggers:{type:[Array,Function],default:We("hideTriggers")},popperTriggers:{type:Array,default:We("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:We("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:We("popperHideTriggers")},container:{type:[String,Object,Rl,Boolean],default:We("container")},boundary:{type:[String,Rl],default:We("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:We("strategy")},autoHide:{type:[Boolean,Function],default:We("autoHide")},handleResize:{type:Boolean,default:We("handleResize")},instantMove:{type:Boolean,default:We("instantMove")},eagerMount:{type:Boolean,default:We("eagerMount")},popperClass:{type:[String,Array,Object],default:We("popperClass")},computeTransformOrigin:{type:Boolean,default:We("computeTransformOrigin")},autoMinSize:{type:Boolean,default:We("autoMinSize")},autoSize:{type:[Boolean,String],default:We("autoSize")},autoMaxSize:{type:Boolean,default:We("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:We("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:We("preventOverflow")},overflowPadding:{type:[Number,String],default:We("overflowPadding")},arrowPadding:{type:[Number,String],default:We("arrowPadding")},arrowOverflow:{type:Boolean,default:We("arrowOverflow")},flip:{type:Boolean,default:We("flip")},shift:{type:Boolean,default:We("shift")},shiftCrossAxis:{type:Boolean,default:We("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:We("noAutoFocus")}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:Zi(Mn({},this.classes),{popperClass:this.popperClass}),result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[Nl])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:Mn(Mn({shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())}},["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{})),["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})),created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var s,i;((s=this.parentPopper)==null?void 0:s.lockedChild)&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,t;!this.$_isDisposed||(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(t=(e=this.referenceNode)==null?void 0:e.call(this))!=null?t:this.$el,this.$_targetNodes=this.targetNodes().filter(n=>n.nodeType===n.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){var e;if(this.$_isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(rC({mainAxis:this.distance,crossAxis:this.skidding}));const n=this.placement.startsWith("auto");if(n?t.middleware.push(nC({alignment:(e=this.placement.split("-")[1])!=null?e:""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(lC({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!n&&this.flip&&t.middleware.push(iC({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(Qx({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:o,middlewareData:r})=>{let a;const{centerOffset:l}=r.arrow;return i.startsWith("top")||i.startsWith("bottom")?a=Math.abs(l)>o.reference.width/2:a=Math.abs(l)>o.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:o,placement:r,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,f;return r.startsWith("top")||r.startsWith("bottom")?u=o.reference.width:f=o.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=f!=null?`${f}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(cC({boundary:this.boundary,padding:this.overflowPadding,apply:({width:i,height:o})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=o!=null?`${o}px`:null}})));const s=await CC(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:s.x,y:s.y,placement:s.placement,strategy:s.strategy,arrow:Mn(Mn({},s.middlewareData.arrow),s.middlewareData.arrowOverflow)})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),As&&this.instantMove&&As.instantMove&&As!==this.parentPopper){As.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e=null,t=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(As=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Ml(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Lr(this.$_referenceNode),...Lr(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),s=n.parentNode.getBoundingClientRect(),i=t.x+t.width/2-(s.left+n.offsetLeft),o=t.y+t.height/2-(s.top+n.offsetTop);this.result.transformOrigin=`${i}px ${o}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<dn.length;n++)t=dn[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}dn.push(this),document.body.classList.add("v-popper--some-open");for(const t of Lp(this.theme))Fp(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Ml(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Np(dn,this),dn.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Lp(this.theme)){const s=Fp(n);Np(s,this),s.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}As===this&&(As=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=di(this.theme,"disposeTimeout");t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Ml(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,Mp,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Mp,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Rp,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Rp,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(s=>s.addEventListener(t,n,Ss?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,s,i){let o=n;s!=null&&(o=typeof s=="function"?s(o):s),o.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,i)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:s,eventType:i,handler:o}=n;!e||e===i?s.forEach(r=>r.removeEventListener(i,o)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const s=n.getAttribute(e);s&&(n.removeAttribute(e),n.setAttribute(t,s))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const s=e[n];s==null?t.removeAttribute(n):t.setAttribute(n,s)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(eo>=e.left&&eo<=e.right&&to>=e.top&&to<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=eo-os,s=to-rs,o=t.left+t.width/2-os+(t.top+t.height/2)-rs+t.width+t.height,r=os+n*o,a=rs+s*o;return Or(os,rs,r,a,t.left,t.top,t.left,t.bottom)||Or(os,rs,r,a,t.left,t.top,t.right,t.top)||Or(os,rs,r,a,t.right,t.top,t.right,t.bottom)||Or(os,rs,r,a,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(Op?(document.addEventListener("touchstart",jp,Ss?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",TC,Ss?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",jp,!0),window.addEventListener("click",IC,!0)),window.addEventListener("resize",DC));function jp(e){for(let t=0;t<dn.length;t++){const n=dn[t];try{const s=n.popperNode();n.$_mouseDownContains=s.contains(e.target)}catch{}}}function IC(e){Hp(e)}function TC(e){Hp(e,!0)}function Hp(e,t=!1){const n={};for(let s=dn.length-1;s>=0;s--){const i=dn[s];try{const o=i.$_containsGlobalTarget=LC(i,e);i.$_pendingHide=!1,requestAnimationFrame(()=>{if(i.$_pendingHide=!1,!n[i.randomId]&&qp(i,o,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&o){let a=i.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let r=i.parentPopper;for(;r&&qp(r,r.$_containsGlobalTarget,e);){r.$_handleGlobalClose(e,t);r=r.parentPopper}}})}catch{}}}function LC(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function qp(e,t,n){return n.closeAllPopover||n.closePopover&&t||OC(e,n)&&!t}function OC(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function DC(e){for(let t=0;t<dn.length;t++)dn[t].$_computePosition(e)}let os=0,rs=0,eo=0,to=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{os=eo,rs=to,eo=e.clientX,to=e.clientY},Ss?{passive:!0}:void 0);function Or(e,t,n,s,i,o,r,a){const l=((r-i)*(t-o)-(a-o)*(e-i))/((a-o)*(n-e)-(r-i)*(s-t)),u=((n-e)*(t-o)-(s-t)*(e-i))/((a-o)*(n-e)-(r-i)*(s-t));return l>=0&&l<=1&&u>=0&&u<=1}var Dr=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n};const MC={extends:Up()};function RC(e,t,n,s,i,o){return N(),H("div",{ref:"reference",class:Ye(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[an(e.$slots,"default",Tb(Tf(e.slotData)))],2)}var NC=Dr(MC,[["render",RC]]);function BC(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Mr;function Bl(){Bl.init||(Bl.init=!0,Mr=BC()!==-1)}var Rr={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Bl(),ni(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Mr&&this.$el.appendChild(e),e.data="about:blank",Mr||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Mr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const FC=D_();L_("data-v-b329ee4c");const UC={class:"resize-observer",tabindex:"-1"};O_();const jC=FC((e,t,n,s,i,o)=>(N(),Zt("div",UC)));Rr.render=jC,Rr.__scopeId="data-v-b329ee4c",Rr.__file="src/components/ResizeObserver.vue";var zp=(e="theme")=>({computed:{themeClass(){return PC(this[e])}}});const HC=Ne({name:"VPopperContent",components:{ResizeObserver:Rr},mixins:[zp()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),qC=["id","aria-hidden","tabindex","data-popper-placement"],zC={ref:"inner",class:"v-popper__inner"},VC=[c("div",{class:"v-popper__arrow-outer"},null,-1),c("div",{class:"v-popper__arrow-inner"},null,-1)];function WC(e,t,n,s,i,o){const r=xs("ResizeObserver");return N(),H("div",{id:e.popperId,ref:"popover",class:Ye(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:An(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Kf(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[c("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),c("div",{class:"v-popper__wrapper",style:An(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[c("div",zC,[e.mounted?(N(),H(Fe,{key:0},[c("div",null,[an(e.$slots,"default")]),e.handleResize?(N(),Zt(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):Ue("",!0)],64)):Ue("",!0)],512),c("div",{ref:"arrow",class:"v-popper__arrow-container",style:An(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},VC,4)],4)],46,qC)}var Vp=Dr(HC,[["render",WC]]),Wp={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};const KC=Ne({name:"VPopperWrapper",components:{Popper:NC,PopperContent:Vp},mixins:[Wp,zp("finalTheme")],props:{theme:{type:String,default:null}},computed:{finalTheme(){var e;return(e=this.theme)!=null?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function GC(e,t,n,s,i,o){const r=xs("PopperContent"),a=xs("Popper");return N(),Zt(a,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:Ye([e.themeClass])},{default:Je(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:y,show:_,hide:b,handleResize:E,onResize:T,classes:M,result:I})=>[an(e.$slots,"default",{shown:u,show:_,hide:b}),Ce(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:u,mounted:f,"skip-transition":h,"auto-hide":y,"handle-resize":E,classes:M,result:I,onHide:b,onResize:T},{default:Je(()=>[an(e.$slots,"popper",{shown:u,hide:b})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}var Fl=Dr(KC,[["render",GC]]);const YC=Ne(Zi(Mn({},Fl),{name:"VDropdown",vPopperTheme:"dropdown"})),JC=Ne(Zi(Mn({},Fl),{name:"VMenu",vPopperTheme:"menu"})),QC=Ne(Zi(Mn({},Fl),{name:"VTooltip",vPopperTheme:"tooltip"})),XC=Ne({name:"VTooltipDirective",components:{Popper:Up(),PopperContent:Vp},mixins:[Wp],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>di(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>di(e.theme,"loadingContent")}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(s=>this.onResult(t,s)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),ZC=["innerHTML"],e$=["textContent"];function t$(e,t,n,s,i,o){const r=xs("PopperContent"),a=xs("Popper");return N(),Zt(a,Of({ref:"popper"},e.$attrs,{theme:e.theme,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:Je(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:y,hide:_,handleResize:b,onResize:E,classes:T,result:M})=>[Ce(r,{ref:"popperContent",class:Ye({"v-popper--tooltip-loading":e.loading}),"popper-id":l,theme:e.theme,shown:u,mounted:f,"skip-transition":h,"auto-hide":y,"handle-resize":b,classes:T,result:M,onHide:_,onResize:E},{default:Je(()=>[e.html?(N(),H("div",{key:0,innerHTML:e.finalContent},null,8,ZC)):(N(),H("div",{key:1,textContent:me(e.finalContent)},null,8,e$))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","popper-node","onApplyShow","onApplyHide"])}var n$=Dr(XC,[["render",t$]]);const Kp="v-popper--has-tooltip";function s$(e,t){let n=e.placement;if(!n&&t)for(const s of Dp)t[s]&&(n=s);return n||(n=di(e.theme||"tooltip","placement")),n}function Gp(e,t,n){let s;const i=typeof t;return i==="string"?s={content:t}:t&&i==="object"?s=t:s={content:!1},s.placement=s$(s,n),s.targetNodes=()=>[e],s.referenceNode=()=>e,s}let Ul,no,i$=0;function o$(){if(Ul)return;no=ue([]),Ul=_n({name:"VTooltipDirectiveApp",setup(){return{directives:no}},render(){return this.directives.map(t=>Tv(n$,Zi(Mn({},t.options),{shown:t.shown||t.options.shown,key:t.id})))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Ul.mount(e)}function r$(e,t,n){o$();const s=ue(Gp(e,t,n)),i=ue(!1),o={id:i$++,options:s,shown:i};return no.value.push(o),e.classList&&e.classList.add(Kp),e.$_popper={options:s,item:o,show(){i.value=!0},hide(){i.value=!1}}}function Yp(e){if(e.$_popper){const t=no.value.indexOf(e.$_popper.item);t!==-1&&no.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Kp)}function Jp(e,{value:t,modifiers:n}){const s=Gp(e,t,n);if(!s.content||di(s.theme||"tooltip","disabled"))Yp(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=s):i=r$(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var a$={beforeMount:Jp,updated:Jp,beforeUnmount(e){Yp(e)}};function Qp(e){e.addEventListener("click",Zp),e.addEventListener("touchstart",eh,Ss?{passive:!0}:!1)}function Xp(e){e.removeEventListener("click",Zp),e.removeEventListener("touchstart",eh),e.removeEventListener("touchend",th),e.removeEventListener("touchcancel",nh)}function Zp(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function eh(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",th),t.addEventListener("touchcancel",nh)}}function th(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],s=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-s.screenY)<20&&Math.abs(n.screenX-s.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function nh(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}var l$={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&Qp(e)},updated(e,{value:t,oldValue:n,modifiers:s}){e.$_closePopoverModifiers=s,t!==n&&(typeof t>"u"||t?Qp(e):Xp(e))},beforeUnmount(e){Xp(e)}};function c$(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Tp(Rn,t),e.directive("tooltip",a$),e.directive("close-popper",l$),e.component("VTooltip",QC),e.component("VDropdown",YC),e.component("VMenu",JC))}const Nr={version:"2.0.0-beta.20",install:c$,options:Rn},p5="";async function u$(){const e=await ns(),{host:t,search:n}=location;t==="115.com"&&d$(e),!(t!=="115.com"||!n.includes("offline=1&tab=offline"))&&(await f$(),await p$(),x0())}async function d$(e){const t=Jt();if(!e.noGotoTaskPage||window!==window.top||t.Core.OFFL5Plug)return;async function n(s){t.Core&&s(!0)}try{await jn(n,250,3e4),t.Core.OFFL5Plug||t.$.getScript("https://cdnres.115.com/site/static/plug/offline_wl/offline5.0.js",()=>{t.Core.OFFL5Plug.AddClient({})})}catch(s){throw new Error(`[disableGotoTaskPage] wait Core failed:${s.message}`)}}async function f$(){console.log("[Cloud115 Enhancer] Injecting offline exporter...");const e="cloud115OfflineExporter",t=await ns();document.body.classList.add("cloud115-page-offline"),t.enableListManagement&&document.body.classList.add("ce-list-m"),$("body").append(`<div id="${e}"/>`);const n=_n(sx);n.use(Nr),n.mount(`#${e}`)}async function p$(){console.log("[Cloud115 Enhancer] Injecting offline searcher...");const e="cloud115OfflineSearcher",t=await ns();document.body.classList.add("cloud115-page-offline"),t.enableSearcher&&document.body.classList.add("ce-list-s"),$("body").append(`<div id="${e}"/>`);const n=_n(Kx);n.use(Nr),n.mount(`#${e}`)}var Ot=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.OPEN_CLEANER=1]="OPEN_CLEANER",e[e.CLOSE_CLEANER=2]="CLOSE_CLEANER",e[e.CLEANER_OPENED=3]="CLEANER_OPENED",e[e.INVOKE_FILTER=4]="INVOKE_FILTER",e[e.OPEN_EMPTY_CLEANER=5]="OPEN_EMPTY_CLEANER",e[e.CLOSE_EMPTY_CLEANER=6]="CLOSE_EMPTY_CLEANER",e[e.EMPTY_CLEANER_OPENED=7]="EMPTY_CLEANER_OPENED",e))(Ot||{});const h$={class:"cloud115-eh-cleaner-trigger"},m$=[c("span",null,"清理文件",-1)],g$=Ne({__name:"Trigger",setup(e){ue(!1);const t=ue(!0);async function n(a){switch(a.data.type){case Ot.INVOKE_FILTER:await Yw(a.data.payload);break;case Ot.CLEANER_OPENED:await r(a.data.payload);break}}It(async()=>{console.log("[CleanerTrigger onMounted]"),window.addEventListener("message",n)}),_s(()=>{console.log("[CleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function s(){await o(),ds({type:Ot.OPEN_CLEANER},window.parent)}let i=0;async function o(){const a=kc("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{se({icon:"error",text:"打开清理工具失败!"})},1e3))}async function r(a){console.log("成功打开Cleaner"),clearTimeout(i)}return(a,l)=>z((N(),H("span",h$,[an(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:s,title:"打开清理文件工具"},m$)])],512)),[[Lt,t.value]])}}),m5="";var qe=(e=>(e[e.suffix=0]="suffix",e[e.keyword=1]="keyword",e))(qe||{}),_t=(e=>(e[e.append=0]="append",e[e.cover=1]="cover",e[e.clear=2]="clear",e[e.reset=3]="reset",e[e.assign=4]="assign",e))(_t||{}),ht=(e=>(e.none="",e.prepare="查询文件...",e.prepared="查询文件完成",e.prepareFailed="查询失败",e.deleting="删除文件中...",e.success="清理完成",e.failed="清理失败",e))(ht||{});$t.all,rt.all,$t.video,rt.video,$t.audio,rt.audio,$t.image,rt.image,$t.doc,rt.doc,$t.app,rt.app,$t.archive,rt.archive;const y$=new Map([[rt.all,$t.all],[rt.video,$t.video],[rt.audio,$t.audio],[rt.image,$t.image],[rt.doc,$t.doc],[rt.app,$t.app],[rt.archive,$t.archive]]),Br="#",sh="#",w$=[{type:qe.suffix,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:5,values:["txt","url","html","htm","mht"]},{type:qe.suffix,queryOnly:!0,label:"🔍115筛选",memo:"仅用于查询",size:102400,values:["#视频","#音频","#图片","#文档","#应用","#压缩包"]}],b$=["#論壇文宣","#宣傳文本","最新地址","最新网址","论坛地址","永久地址","地址发布","扫码 安装","扫码 下载","免費 掃碼","澳门 赌场","皇冠 赌场","免费18禁手游","免费黄游手游","在线影城","秀场 小视频","裸秀 主播 免费看","第一会所 宣传","SIS 影视联盟",'"最 新 位 址 獲 取"','"社 區 最 新 情 報"','"聚 合 全 網 H 直 播"'],_$=["#論壇文宣","美女 裸聊","秀场 视频","澳门 赌场","皇冠 赌场","影视 联盟","2048 社区","1024 社区","会所 宣传","扫码 安装","社区 关注","免費 掃碼","找回家","防屏蔽","封殺00","秀场 小视频","裸秀 主播 免费看",'"Free Adult Movie"',"奔驰宝马","最新网址","最新免費","免费试用","美女荷官","凤凰娛樂","观看指南","女神在线","更多无水印","免费在线","国产精品","免費原版","獨家資源","成人光碟","最新AV","FDZone","发布器","QR-1024","在這等你","激情祼聊","看妹不用等","真人祼聊","zz.jpg","X8B9.COM.gif","第一会所 宣传","SIS 影视联盟","淘精網","激情咖啡","手機影城","免费手机看片","U視娛樂","加微信","我愛看片手機版","平台正式上線"],v$=[{type:qe.keyword,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:100,values:b$},{type:qe.keyword,queryOnly:!1,label:"⚠️大杀器⚠️",memo:"请谨慎使用!",size:100,values:_$},{type:qe.keyword,queryOnly:!0,label:"只查询示例",memo:"这是一个示例",size:10240,values:["奔驰宝马","美女荷官",'"最 新 位 址 獲 取"']}];function Ps(e){return{id:Date.now().toString(),type:e,queryOnly:!1,label:"",values:"",memo:"",size:0,sort:0,createdAt:0,updatedAt:0}}function ih(e,t){e=e.trim();const n=t===qe.keyword&&x$(e),s=t===qe.suffix&&C$(e);let i=e;return n&&(i=$$(e)),s&&(i=E$(e).toString()),{type:t,value:e,forDir:n,isFilter:s,pattern:i,num:-1,fileIds:[],size:-1,status:ht.none}}function oh(e){return[ht.prepare,ht.deleting].includes(e.status)}function x$(e){return new RegExp(`^${Br}[\\S]{2,}`).test(e)}function C$(e){return new RegExp(`^${sh}[\\S]{2,}`).test(e)}function $$(e){const t=new RegExp(`^${Br}`);return e.replace(t,"")}function E$(e){const t=new RegExp(`^${sh}`);let n=e.replace(t,"");const s=y$.get(n);if(!s)throw new Error(`"${e}"不是有效的筛选!`);return s}async function Is(e,t){let n;typeof e=="string"?n=e.split(/[\r\n]+/):n=e;const s=new Set;for(let o=0;o<n.length;o++){const r=n[o].trim();r.length>1&&s.add(r)}const i=[];return s.forEach(o=>{i.push(ih(o,t))}),i}function rh(e){return/(^'.+'$)|(^".+"$)/.test(e)}function jl(e){return rh(e)?e.replace(/^['"]|['"]$/g,""):e}function k$(e,t){if(e===""||t==="")return!1;if(e=e.toLowerCase(),rh(t))return e.includes(jl(t).toLowerCase());const n=t.split(/\s+/);for(let s=0;s<n.length;s++)if(!e.includes(n[s].toLowerCase()))return!1;return!0}async function ah(e,t,n){const s=ih(e.value,e.type);s.num=0,s.size=0,s.fileIds=[];const i=new Set;let o=0;n.maxSize&&(o=n.maxSize*1024*1024);for(let r=0;r<t.length;r++){const a=!!t[r].fid,l=a?t[r].fid:t[r].cid;if(!l||e.type===qe.keyword&&(a&&e.forDir||!a&&!e.forDir))continue;const u=parseFloat(t[r].s);o&&a&&u>o||e.type===qe.keyword&&!k$(t[r].n,e.pattern)||i.has(l)||(i.add(l),s.size+=u)}return s.fileIds=Array.from(i),s.num=s.fileIds.length,s}const S$={class:"group-manager"},A$={key:0,class:"label-readonly",title:"当前分组只可用于查询"},P$=["title"],I$=c("small",null,"分组:",-1),T$={class:"pure-form pure-form-stacked group-form"},L$=c("label",{for:"groupLabel"},"标题",-1),O$=c("label",{for:"groupMemo"},"备注",-1),D$={for:"groupValues"},M$={key:0,class:"text-info"},R$={key:1,class:"text-info"},N$=["onClick"],B$=c("small",{class:"text-primary"},"(点击添加)",-1),F$=c("label",{for:"groupMemo"},[Q(" 文件大小 "),c("span",{class:"text-info"},[Q("只清理小于该大小的文件,单位"),c("b",null,"MB")])],-1),U$={class:"groups-list"},j$={key:0,class:"text-danger"},H$=c("span",{class:"text-info"},"或",-1),q$=c("br",null,null,-1),z$=c("br",null,null,-1),V$={class:"pure-table pure-table-bordered"},W$=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"70"},"只查询"),c("th",{width:"150"},"名称"),c("th",{width:"150"},"备注"),c("th",{width:"70"},[Q("大小"),c("small",null,"MB")]),c("th",{width:"220"},"操作")])],-1),K$={align:"center"},G$=["onClick"],Y$=c("button",{type:"button",class:"pure-button button-xsmall text-danger"},"删除",-1),J$={class:"group-confirm-delete"},Q$=["onClick"],X$=["onClick"],lh=Ne({__name:"GroupManager",props:{type:null,storageKey:null,config:null},emits:["change"],setup(e,{emit:t}){const n=e,s=ue(Ps(n.type)),i=ue([]),o=ue(!1),r=ue(Ps(n.type)),a=ue(null),l=ue(!1),u=ue(null),f=[rt.video,rt.audio,rt.image,rt.doc,rt.app,rt.archive];dt(i,async _e=>{console.log("[groups change]",_e),fs(n.storageKey,_e,!1),_e.length||(o.value=!1,l.value=!1)},{deep:!0});let h=!1;It(async()=>{if(console.log("[GroupManager onMounted]"),!h){h=!0,i.value=fo(n.storageKey,[]),console.log("[groups]",i.value);const{suffixGroup:_e,keywordGroup:L}=n.config;if(i.value.length){const ie=i.value.find(G=>G.id===(n.type===qe.suffix?_e:L));console.log("[group last choosen]",ie),s.value=ie||i.value[0],t("change",s.value)}else n.type===qe.suffix&&!_e&&(await j(),fs(st.cleanerConfig,{suffixGroup:s.value.id},!0)),n.type===qe.keyword&&!L&&(await j(),fs(st.cleanerConfig,{keywordGroup:s.value.id},!0))}}),_s(async()=>{console.log("[GroupManager onUnmounted]")});async function y(_e){const L=`#${_e}`;r.value.values.includes(L)||(r.value.values+=(`
`+L).trim()+`
`)}async function _(){o.value=!0,l.value=!1}async function b(){o.value=!1}async function E(){a.value.show()}async function T(){a.value.hide()}async function M(){l.value=!1}async function I(){l.value=!0,o.value=!1}async function P(){u.value.show()}async function V(){u.value.hide()}async function oe(){r.value.createdAt&&(r.value=Ps(n.type)),r.value.size=5,n.type===qe.keyword&&(r.value.size=100),await E()}async function j(){let _e=[];n.type===qe.suffix?_e=w$:_e=v$;for(let L=0;L<_e.length;L++){const ie={...Ps(_e[L].type),..._e[L]};r.value=ie,r.value.type=ie.type,r.value.queryOnly=ie.queryOnly,r.value.size=ie.size,r.value.label=ie.label,r.value.memo=ie.memo,r.value.createdAt=0,r.value.updatedAt=0,Array.isArray(ie.values)?r.value.values=ie.values.join(`
`):r.value.values=ie.values,await ge(),await V()}i.value.length&&await Le(i.value[0])}async function X(_e,L=!1){if(!L){const{isConfirmed:G}=await fe.fire({html:`确定删除"${s.value.label}"?`,icon:"question"});if(!G)return}let ie=-1;for(let G=0;G<i.value.length;G++)if(i.value[G].id===s.value.id){ie=G;break}i.value.splice(ie,1),i.value.length?s.value=i.value[0]:s.value=Ps(n.type),t("change",s.value),await se({icon:"success",title:"删除成功!",timer:1500})}async function le(_e){r.value=_e,await E()}async function ge(){let _e=[];try{_e=await Is(r.value.values,r.value.type)}catch(D){await fe.fire({icon:"error",text:D.message});return}if(r.value.label=r.value.label.trim(),r.value.memo=r.value.memo.trim(),r.value.label===""){await se({icon:"warning",text:"请输入标题!"});return}let L=-1;for(let D=0;D<i.value.length;D++)if(i.value[D].id===r.value.id&&r.value.id){L=D;break}const ie=_i();r.value.updatedAt=ie,r.value.createdAt||(r.value.createdAt=ie);let G=[];for(let D=0;D<_e.length;D++)G.push(_e[D].value);r.value.values=G.join(`
`).trim(),console.log("[saveGroup]",r.value,L),L===-1?(i.value.push(r.value),se({icon:"success",text:"添加成功"})):(i.value[L]=r.value,se({icon:"success",text:"更新成功"}));const Se=!s.value.createdAt;Se&&(s.value=r.value),(r.value.id===s.value.id||Se)&&t("change",r.value),await T()}async function Le(_e){s.value=_e;const{id:L}=s.value;n.type===qe.suffix&&(n.config.suffixGroup=L,fs(st.cleanerConfig,{suffixGroup:L},!0)),n.type===qe.keyword&&(n.config.keywordGroup=L,fs(st.cleanerConfig,{keywordGroup:L},!0)),t("change",_e)}return(_e,L)=>{const ie=xs("VDropdown");return N(),H("div",S$,[s.value.queryOnly?(N(),H("span",A$," 只查询 ")):Ue("",!0),s.value.createdAt?(N(),H("a",{key:1,class:"group-label",href:"javascript:void(0)",title:`当前使用的分组: ${s.value.label}`,onClick:L[0]||(L[0]=G=>le(s.value))},[c("span",null,[I$,Q(" "+me(s.value.label),1)])],8,P$)):Ue("",!0),Ce(ie,{ref_key:"form",ref:a,onHide:b,onShow:_,distance:5,"arrow-padding":100},{popper:Je(()=>[c("form",T$,[c("fieldset",null,[c("div",null,[L$,z(c("input",{type:"text","onUpdate:modelValue":L[1]||(L[1]=G=>r.value.label=G),id:"groupLabel",class:"pure-input-1-2",placeholder:"分组标题"},null,512),[[He,r.value.label]]),Q("    "),r.value.queryOnly?(N(),H("button",{key:0,type:"button",class:"pure-button button-small button-warning",onClick:L[2]||(L[2]=G=>r.value.queryOnly=!1)},"已设置为仅用于查询 | 点击取消设置")):Ue("",!0),r.value.queryOnly?Ue("",!0):(N(),H("button",{key:1,type:"button",class:"pure-button button-small pure-button-primary",onClick:L[3]||(L[3]=G=>r.value.queryOnly=!0)},"设置为仅用于查询"))]),c("div",null,[O$,z(c("input",{type:"text","onUpdate:modelValue":L[4]||(L[4]=G=>r.value.memo=G),id:"groupMemo",placeholder:"分组备注"},null,512),[[He,r.value.memo]])]),c("div",null,[c("label",D$,[Q(" 特征列表 "),n.type===de(qe).keyword?(N(),H("span",M$,[Q(" 默认只匹配文件名。前面带"),c("b",null,me(de(Br)),1),Q("则只匹配目录名。 ")])):Ue("",!0),n.type===de(qe).suffix?(N(),H("span",R$,[Q(" 支持115自带筛选: "),(N(),H(Fe,null,nt(f,(G,Se)=>c("span",{class:"filter-label text-success",key:Se,onClick:D=>y(G)}," #"+me(G),9,N$)),64)),B$])):Ue("",!0)]),z(c("textarea",{id:"groupValues","onUpdate:modelValue":L[5]||(L[5]=G=>r.value.values=G),rows:"5",placeholder:"每行一个"},null,512),[[He,r.value.values]])]),c("div",null,[F$,z(c("input",{type:"number","onUpdate:modelValue":L[6]||(L[6]=G=>r.value.size=G),class:"pure-input-1-2",placeholder:"文件大小小于该数值才清理"},null,512),[[He,r.value.size]])]),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:ge},me(r.value.createdAt?"更新":"添加"),1),Q("      "),c("button",{type:"button",class:"pure-button",onClick:T},"取消")])])]),default:Je(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:oe},"新增分组")]),_:1},512),Ce(ie,{ref_key:"list",ref:u,onHide:M,onShow:I,distance:5},{popper:Je(()=>[c("div",U$,[i.value.length?Ue("",!0):(N(),H("h3",j$,[Q(" 还没有添加任何分组。你可以: "),c("button",{type:"button",class:"pure-button button-small",onClick:oe},"添加"),Q("   "),H$,Q("   "),c("button",{type:"button",class:"pure-button button-small",onClick:j},"使用脚本内置"),q$,z$])),c("table",V$,[W$,c("tbody",null,[(N(!0),H(Fe,null,nt(i.value,(G,Se)=>(N(),H("tr",{key:Se},[c("td",null,me(Se+1),1),c("td",K$,me(G.queryOnly?"是":"否"),1),c("td",null,me(G.label),1),c("td",null,me(G.memo),1),c("td",null,me(G.size),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall text-primary",onClick:D=>Le(G)},"载入",8,G$),Q("   "),Ce(ie,null,{popper:Je(()=>[c("div",J$,[c("button",{type:"button",class:"pure-button button-error",onClick:D=>X(G,!0)},"确定",8,Q$)])]),default:Je(()=>[Y$]),_:2},1024),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:D=>le(G)},"编辑",8,X$)])]))),128))])])])]),default:Je(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:P},"分组列表")]),_:1},512)])}}}),g5="",Z$={class:"cloud115-eh-cleaner"},eE=[c("span",null,"清理文件",-1)],tE={key:0,class:"cloud115-eh-cleaner-help"},nE=[Lf('<div><h2>免责声明</h2><div><p>该工具仅作为学习测试用途,使用该工具造成的任何结果由使用人承担。</p></div><hr><h2>说明</h2><ul style="color:#f40;"><li class="text-primary">始于清理,但不止于清理!</li><li>* 仅对当前查看的目录及其子目录生效。</li><li>* 通过『新增分组 / 分组列表』管理你的清理特征。</li><li>* 建议整理自己的特征,也欢迎在交流中分享你的特征。</li><li>* 『只查询』按钮,只会进行查询。</li><li>* 『一键清理』是先查询,再进行删除!</li><li>* 由于搜索接口限制,如果某个关键词结果数量超过1万,可能会清理不完全,可以多执行几次清理。</li><li>* <b>清理期间,请保持当前页面处于激活状态!</b></li><li>* <b>请谨慎操作!请谨慎操作!请谨慎操作!</b></li></ul><hr><h3>按 后缀名 清理</h3><div><p>1. 点击『分组列表』,选择一个分组;</p><p>2. 确认一下后缀名和文件大小限制等的设定;</p><p>3. 点击『一键清理』按钮,耐心等待。</p></div><hr><h3>按 关键词 清理</h3><div> 基本同上,略。 <br><br><p>P.S. 关键词按『全包含』进行匹配,不区分大小写。</p><p>关键词`免费在线`,匹配文件名&quot;blabla-免费在线.mp4&quot;,<b class="text-danger">不匹配</b>文件名`blabla-免费的xxx在线.mp4`。</p><p>关键词`免费 在线`,匹配文件名&quot;blabla-免费在线.mp4&quot;,<b class="text-success">也匹配</b>文件名`blabla-免费的xxx在线.mp4`。</p><p class="text-danger">如需要 `免费 在线` 作为一个整体去匹配,可以使用`英文单/双引号`包裹,如`&quot;免费 在线&quot;`</p></div></div>',1)],sE={class:"header actions-bar"},iE=c("span",{class:"title"},"文件清理工具",-1),oE={type:"button",class:"pure-button button-success"},rE=c("i",{class:"file-type tp-folder",style:{}},null,-1),aE=["disabled"],lE=["disabled"],cE=c("small",null,"毫秒",-1),uE=["disabled"],dE=c("br",null,null,-1),fE={class:"by-box by-suffix"},pE={class:"by-header"},hE=c("span",{class:"title"},[Q("按"),c("b",null,"后缀名"),Q("清理")],-1),mE={class:"pure-button-group",role:"group"},gE=["disabled"],yE={class:"pure-table pure-table-bordered"},wE=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"100"},"后缀名"),c("th",{width:"95"},"文件数量"),c("th",{width:"80"},"合计大小"),c("th",{width:"150"},"操作"),c("th",{width:"200"},"状态")])],-1),bE=["onClick"],_E=["onClick"],vE=["onClick"],xE=c("br",null,null,-1),CE={class:"by-box by-keyword"},$E={class:"by-header"},EE=c("span",{class:"title"},[Q("按"),c("b",null,"关键词"),Q("清理")],-1),kE={class:"pure-button-group",role:"group"},SE=["disabled"],AE={class:"pure-table pure-table-bordered"},PE=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"100"},"关键词"),c("th",{width:"95"},"文件/目录数量"),c("th",{width:"80"},"合计大小"),c("th",{width:"150"},"操作"),c("th",{width:"200"},"状态")])],-1),IE=["href"],TE={class:"file-type tp-folder"},LE=["onClick"],OE=["onClick"],DE=c("br",null,null,-1),ME={class:"footer actions-bar"},RE=c("span",{class:"title"},"文件清理工具",-1),NE={type:"button",class:"pure-button button-success"},BE=c("i",{class:"file-type tp-folder",style:{}},null,-1),FE=Ne({__name:"Cleaner",setup(e){const t=ue(!1),n=ue(!0),s=ue(Ps(qe.suffix)),i=ue(Ps(qe.keyword)),o=ue({maxSize:5,matchName:!1}),r=ue({maxSize:100,matchName:!0}),a=ue([]),l=ue([]),u=ue(!1),f=ue({initialized:!1,pageSize:1150,reqInterval:800,deleteSize:1150,...fo(st.cleanerConfig,{})}),h=ue(!0),y=ue(""),_=ue([]);async function b(D){D.data.type===Ot.OPEN_CLEANER&&(await E(D.data.payload),ds({type:Ot.CLEANER_OPENED},D.source))}It(async()=>{console.log("[Cleaner onMounted]"),f.value.initialized||(f.value.initialized=!0,fs(st.cleanerConfig,f.value,!1)),window.addEventListener("message",b)}),_s(()=>{console.log("[Cleaner onUnmounted]"),window.removeEventListener("message",b)});async function E(D){t.value=!0;const Z=await vt();if(Z==="0"||Z===""){await T(),await fe.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}y.value&&y.value!==Z&&(console.warn("目录变化,重置"),await V(_t.reset),await oe(_t.reset)),_.value=await nd(),y.value=Z}async function T(){t.value=!1}async function M(){fs(st.cleanerConfig,f.value,!1),se({icon:"success",text:"保存成功",timer:1800}),h.value=!0}async function I(D){const Z={};D.isFilter?Z.type=D.pattern:Z.suffix=D.pattern;let B=unsafeWindow.frames[0];for(let ye=0;ye<unsafeWindow.frames.length;ye++)if(unsafeWindow.frames[ye].name==="wangpan"){B=unsafeWindow.frames[ye];break}ds({type:Ot.INVOKE_FILTER,payload:Z},B),await T(),se({icon:"info",text:`已调用115筛选: ${D.value}`,timer:2500})}async function P(D,Z){const{value:B}=await fe.fire({input:"textarea",title:D,html:"每行一个,最短两个字符。"+(Z===qe.keyword?`<br>默认只匹配文件名,不匹配目录名。<br>使用 "<b>${Br}目录名关键词</b>" 格式指定只匹配目录名的关键词。`:""),width:620,inputPlaceholder:"每行一个,最短两个字符",inputAttributes:{"aria-label":"每行一个,最短两个字符"},showCancelButton:!0});return B!==void 0?B.trim():""}async function V(D,Z){let B="",ye=[];switch(D){case _t.assign:B=Z.trim(),B.trim()===""?a.value=[]:(ye=await Is(B,qe.suffix),a.value=ye);break;case _t.append:B=await P("添加后缀",qe.suffix),ye=await Is(B,qe.suffix);const Ee=[];a.value.forEach(Oe=>Ee.push(Oe.value.toLowerCase())),ye.forEach(Oe=>{Ee.includes(Oe.value.toLowerCase())||a.value.push(Oe)});break;case _t.cover:B=await P("覆盖后缀",qe.suffix),B.trim()!==""&&(ye=await Is(B,qe.suffix),a.value=ye);break;case _t.clear:a.value=[];break;case _t.reset:a.value.forEach(Oe=>{Oe.num=-1,Oe.fileIds=[],Oe.status=ht.none,Oe.size=-1});break}}async function oe(D,Z){let B="",ye=[];switch(D){case _t.assign:B=Z.trim(),B.trim()===""?l.value=[]:(ye=await Is(B,qe.keyword),l.value=ye);break;case _t.append:B=await P("添加关键词",qe.keyword),ye=await Is(B,qe.keyword);const Ee=[];l.value.forEach(Oe=>Ee.push(Oe.value.toLowerCase())),ye.forEach(Oe=>{Ee.includes(Oe.value.toLowerCase())||l.value.push(Oe)});break;case _t.cover:B=await P("覆盖关键词",qe.keyword),B.trim()!==""&&(ye=await Is(B,qe.keyword),l.value=ye);break;case _t.clear:l.value=[];break;case _t.reset:l.value.forEach(Oe=>{Oe.num=-1,Oe.fileIds=[],Oe.status=ht.none,Oe.size=-1});break}}async function j(D){if(console.log("[cleanBySuffix]",D),await V(_t.reset),!a.value.length){await fe.fire({icon:"warning",text:"请先设置后缀!"});return}if(!D){const{isConfirmed:Z}=await fe.fire({icon:"warning",html:'请在清理前确认"后缀和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Z)return}u.value=!0;try{for(let Z=0;Z<a.value.length;Z++){const B=a.value[Z];await X(B,D,!1,!0),await mt(f.value.reqInterval)}}catch(Z){console.error(Z)}u.value=!1}async function X(D,Z,B,ye){if(console.log("[cleanBySuffixSingle]",D,Z),!Z&&!ye){const{isConfirmed:Ee}=await fe.fire({icon:"warning",html:`确认执行条件 "后缀: <b class="text-primary">${D.pattern}</b>, 小于: <b>${o.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Ee)return}try{if(!B){u.value=!0,D.fileIds=[],D.size=-1,D.num=-1,D.status=ht.prepare;const Ee=await Le(D);D.status=ht.prepared;const{fileIds:Oe,size:ce}=await ah(D,Ee,o.value);D.fileIds=Oe,D.size=ce,D.num=Oe.length,u.value=!1}if(!Z)if(D.num>0){D.status=ht.deleting,u.value=!0;const Ee=await Zu(y.value,D.fileIds,f.value.deleteSize,1e3);u.value=!1,Ee>0?D.status=ht.success+` / 数量 <= ${Ee}`:D.status=ht.failed}else D.status=ht.success+" / 无"}catch(Ee){console.error(Ee),u.value=!1,await fe.fire({title:"cleanBySuffixSingle - 发生错误",html:Ee.toString()})}}async function le(D){if(console.log("[cleanByKeyword]",D),await oe(_t.reset),!l.value.length){await fe.fire({icon:"warning",text:"请先设置关键词!"});return}if(!D){const{isConfirmed:Z}=await fe.fire({icon:"warning",html:'请在清理前确认"关键词和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Z)return}u.value=!0;try{for(let Z=0;Z<l.value.length;Z++){const B=l.value[Z];await ge(B,D,!1,!0),await mt(f.value.reqInterval)}}catch(Z){console.error(Z)}u.value=!1}async function ge(D,Z,B,ye){if(console.log("[cleanByKeywordSingle]",D,Z),!Z&&!ye){const{isConfirmed:Ee}=await fe.fire({icon:"warning",html:`确认执行条件 "关键词: <b class="text-primary">${D.pattern}</b>, 小于: <b class="text-primary">${r.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Ee)return}try{if(!B){u.value=!0,D.fileIds=[],D.size=-1,D.num=-1,D.status=ht.prepare;const Ee=await _e(D);D.status=ht.prepared;const{fileIds:Oe,size:ce,num:pe}=await ah(D,Ee,r.value);D.fileIds=Oe,D.size=ce,D.num=pe,u.value=!1}if(!Z)if(D.num>0){D.status=ht.deleting,u.value=!0;const Ee=await Zu(y.value,D.fileIds,f.value.deleteSize,1e3);u.value=!1,Ee>0?D.status=ht.success+` / 数量 <= ${Ee}`:D.status=ht.failed,D.num>9e3&&(console.warn("[cleanByKeywordSingle] 补充处理..."),await ge(D,Z,!1,!0))}else D.status=ht.success+" / 无"}catch(Ee){console.error(Ee),u.value=!1;let Oe=!0;const ce={title:"cleanByKeywordSingle - 发生错误",html:Ee.toString()};Ee instanceof ba&&(D.status=ht.prepareFailed+` / ${Ee.message}`,Ee instanceof bu&&(ce.timer=2e3,Oe=!1)),Oe?await fe.fire(ce):fe.fire(ce)}}async function Le(D){const Z=await vt(),B=Hn({cid:Z,limit:f.value.pageSize});D.isFilter?B.type=D.pattern:B.suffix=D.value;const ye=await Hs(B,f.value.reqInterval);return console.log("[files]",ye),ye}async function _e(D){const Z=await vt(),B=jm({search_value:jl(D.pattern),cid:Z,limit:f.value.pageSize}),ye=await $w(B,f.value.reqInterval,!0);return console.log("[files]",ye),ye}function L(D){return Da({search_value:jl(D.pattern),cid:y.value},_.value[_.value.length-1])}async function ie(D){console.log("[onSuffixGroupChange]",D),s.value=D,o.value.maxSize=D.size,await V(_t.assign,D.values)}async function G(D){console.log("[onKeywordGroupChange]",D),i.value=D,r.value.maxSize=D.size,await oe(_t.assign,D.values)}async function Se(){document.querySelector(".cloud115-eh-cleaner-drawer").scrollTo(0,0)}return(D,Z)=>z((N(),H("span",Z$,[an(D.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:E},eE)]),t.value?(N(),H("div",tE,nE)):Ue("",!0),z(c("div",{class:Ye(["cloud115-eh-cleaner-drawer",{loading:u.value}])},[c("div",sE,[iE,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",oE,[c("b",null,[rE,Q(" "+me(_.value.join(" / ")),1)])])]),c("div",null,[Q(" 请求分页: "),z(c("input",{type:"number","onUpdate:modelValue":Z[0]||(Z[0]=B=>f.value.pageSize=B),min:30,max:1150,disabled:h.value},null,8,aE),[[He,f.value.pageSize]]),Q(" 请求间隔: "),z(c("input",{type:"number","onUpdate:modelValue":Z[1]||(Z[1]=B=>f.value.reqInterval=B),min:200,max:1e6,disabled:h.value},null,8,lE),[[He,f.value.reqInterval]]),cE,Q(" 每次删除: "),z(c("input",{type:"number","onUpdate:modelValue":Z[2]||(Z[2]=B=>f.value.deleteSize=B),min:1,max:1150,disabled:h.value},null,8,uE),[[He,f.value.deleteSize]]),c("span",{class:"config-toggle",onClick:Z[3]||(Z[3]=B=>h.value=!h.value)},"设置参数"),h.value?Ue("",!0):(N(),H("button",{key:0,type:"button",class:"pure-button pure-button-primary button-small",onClick:M}," 保存配置 "))]),dE,c("div",fE,[c("div",pE,[hE,Q("      "),c("div",mE,[c("button",{type:"button",class:"pure-button",onClick:Z[4]||(Z[4]=B=>j(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:Z[5]||(Z[5]=B=>j(!1)),disabled:s.value.queryOnly}," 一键清理 ",8,gE)]),Q(" 小于 "),z(c("input",{type:"number","onUpdate:modelValue":Z[6]||(Z[6]=B=>o.value.maxSize=B),class:"filter-size"},null,512),[[He,o.value.maxSize]]),Q(" MB (0表示不限制) "),Ce(lh,{type:de(qe).suffix,"storage-key":"suffixGroups",onChange:ie,config:f.value},null,8,["type","config"])]),c("table",yE,[wE,c("tbody",null,[(N(!0),H(Fe,null,nt(a.value,(B,ye)=>(N(),H("tr",{key:ye,class:Ye({active:de(oh)(B),"is-filter":B.isFilter})},[c("td",null,me(ye+1),1),c("td",null,[c("a",{href:"javascript:void(0)",class:"pattern",onClick:Ee=>I(B),title:"筛选"},me(B.value),9,bE)]),c("td",null,me(B.num>=0?B.num:""),1),c("td",null,me(B.size>0?de(ho)(B.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Ee=>X(B,!0,!1,!0)},"查询",8,_E),Q("   "),B.num>0&&!s.value.queryOnly?(N(),H("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Ee=>X(B,!1,!0,!1)},"清理",8,vE)):Ue("",!0)]),c("td",null,me(B.status),1)],2))),128))])])]),xE,c("div",CE,[c("div",$E,[EE,Q("      "),c("div",kE,[c("button",{type:"button",class:"pure-button",onClick:Z[7]||(Z[7]=B=>le(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:Z[8]||(Z[8]=B=>le(!1)),disabled:i.value.queryOnly}," 一键清理 ",8,SE)]),Q(" 小于 "),z(c("input",{type:"number","onUpdate:modelValue":Z[9]||(Z[9]=B=>r.value.maxSize=B),class:"filter-size"},null,512),[[He,r.value.maxSize]]),Q(" MB (0表示不限制) "),Ce(lh,{type:de(qe).keyword,"storage-key":"keywordGroups",onChange:G,config:f.value},null,8,["type","config"])]),c("table",AE,[PE,c("tbody",null,[(N(!0),H(Fe,null,nt(l.value,(B,ye)=>(N(),H("tr",{key:ye,class:Ye({active:de(oh)(B),"is-dir":B.forDir})},[c("td",null,me(ye+1),1),c("td",null,[c("a",{href:L(B),target:"_blank",class:"pattern",title:"搜索"},[z(c("i",TE,null,512),[[Lt,B.forDir]]),Q(" "+me(B.pattern),1)],8,IE)]),c("td",null,me(B.num>=0?B.num:""),1),c("td",null,me(B.size>0?de(ho)(B.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Ee=>ge(B,!0,!1,!0)},"查询",8,LE),Q("   "),B.num>0&&!i.value.queryOnly?(N(),H("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Ee=>ge(B,!1,!0,!1)}," 清理 ",8,OE)):Ue("",!0)]),c("td",null,me(B.status),1)],2))),128))])])]),DE,c("div",ME,[RE,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",NE,[c("b",null,[BE,Q(" "+me(_.value.join(" / ")),1)])]),Q("     "),c("button",{type:"button",class:"pure-button button-small",onClick:Se}," 回到顶部 ")])],2),[[Lt,t.value]])],512)),[[Lt,n.value]])}}),b5="",UE={class:"ce-empty-cleaner-trigger"},jE=[c("span",null,"空文件夹",-1)],HE=Ne({__name:"Trigger",setup(e){ue(!1);const t=ue(!0);async function n(a){switch(a.data.type){case Ot.EMPTY_CLEANER_OPENED:await r(a.data.payload);break}}It(async()=>{console.log("[EmptyCleanerTrigger onMounted]"),window.addEventListener("message",n)}),_s(()=>{console.log("[EmptyCleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function s(){await o(),ds({type:Ot.OPEN_EMPTY_CLEANER},window.parent)}let i=0;async function o(){const a=kc("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{se({icon:"error",text:"打开清理空文件夹工具失败!"})},1e3))}async function r(a){console.log("成功打开EmptyCleaner"),clearTimeout(i)}return(a,l)=>z((N(),H("span",UE,[an(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:s,title:"打开清理空文件夹工具"},jE)])],512)),[[Lt,t.value]])}}),v5="",qE=/^(?:\| )+\|-/;async function*zE(e){const t=["/"],n=e.trim().split(`
`);let s=0;for(const i of n){const o=qE.exec(i);if(o===null)continue;const a=o[0].length,l=a/2-1,u=i.slice(a);l>=t.length?t.push(u):t[l]=u,s+=1;const f=t.slice(0,l+1).join("/");yield{index:s,name:u,path:vc(f,!0)}}}function ch(e={}){return{name:"",path:"",id:"",url:"",checked:!1,deleted:!1,disabled:!1,repeated:!1,ensured:!1,...e}}function Hl(){return{suffixes:new Set,nameCounter:{},nameToPaths:{},repeatedPaths:new Set,maybeDirs:{}}}class VE{constructor(t,n=!1){be(this,"logs",[]);be(this,"_dirId","");be(this,"_dirPath","");be(this,"_dirAttr",null);be(this,"_treeText","");be(this,"_keepTree",!1);be(this,"_treeFile",null);be(this,"_tailData",Hl());be(this,"_emptyItems",new Map);be(this,"logSubscribers",[]);be(this,"emptyItemSubscribers",[]);be(this,"treeFileSubscribers",[]);t&&this.setDirId(t),this._keepTree=n}addLogSubscriber(t){this.logSubscribers.push(t)}addEmptyItemSubscriber(t){this.emptyItemSubscribers.push(t)}addTreeFileSubscriber(t){this.treeFileSubscribers.push(t)}async setDirId(t){this._dirId=t,this._dirAttr=await kt(t);const n=[...this._dirAttr.paths.slice(1).map(s=>s.file_name),this._dirAttr.file_name];this._dirPath=n.join("/")}async setKeepTree(t){this._keepTree=t}getTreeFile(){return this._treeFile}async isReady(){return!!this._dirPath}async run(){var s;if(!await this.isReady()){this.log(`运行异常!未获取到目录路径,目录ID=${this._dirId}`);return}if(((s=this._dirAttr)==null?void 0:s.folder_count)===0){this.log(`目录(id=${this._dirId}) "${this._dirPath}" 没有子目录,无需清理`);return}const t=Date.now();await this.exportTree(),await this.parseTree(),await this.queryFiles(),await this.handleMaybeDirs(),await this.detectEmpty(),await this.checkRealEmpty();const n=((Date.now()-t)/1e3).toFixed(2);this.log(`清理空目录检测阶段完成,合计耗时 ${n} 秒`),console.log("emptyItems:",this._emptyItems)}async exportTree(){const t=Date.now();this.log(`========导出目录树(目录ID=${this._dirId}, 路径=${this._dirPath})========`);const n=await Pw(this._dirId);console.log("exportTree",n),this.log("已发起导出处理,等待导出完成...");const s=await Iw(n.data.export_id);console.log("exportTree",s),this.log(`导出目录树成功,PickCode为${s.data.pick_code}`);const i=await Sw(s.data.pick_code);console.log("downloadItem",i),this.log("正在读取目录树文件内容...");let o=!0;try{this._treeText=await this._readFile(i),this.log("目录树文件内容读取完成")}catch(a){this.log(`读取目录树文件内容失败,${a.toString()}`),o=!1}if(this._keepTree)this.onTreeFileGenerated(i),this.log(`目录树文件保留,不会被删除。文件: ${i.file_name}`);else{const a=await Aa(this._dirId,[i.file_id]);console.log("deleteResult",a),this.log("目录树文件已删除")}const r=((Date.now()-t)/1e3).toFixed(2);o?this.log(`导出目录树完成,耗时 ${r} 秒`):this.log(`导出目录树失败,耗时 ${r} 秒`),this.log("=".repeat(60))}async _readFile(t){return new Promise((n,s)=>{Xr({method:"GET",url:t.url.url,responseType:"blob",onload:async i=>{[200,206].includes(i.status)||s(new Error(`读取目录树文件内容失败,${i.status} ${i.statusText}`));const o=await i.response.text();n(o)},onerror:i=>{s(i)}})})}async parseTree(){const t=Date.now();this.log("解析目录树...");const n=Hl(),s=[],i=this._dirPath.split("/").slice(0,-1).join("/");console.log("[parseTree] parentPath:",i);for await(const r of zE(this._treeText)){const a=i+r.path;s.includes(a)&&n.repeatedPaths.add(a),s.push(a)}for(let r=0;r<s.length;r++){if(s[r+1]&&s[r+1].startsWith(s[r]+"/"))continue;let a=s[r].split("/").pop();if(!a)a=s[r];else{const l=Uw(a,/^\w+$/);if(l)n.suffixes.add(l.toLowerCase());else{const u=s[r].replace(/\/[^\/]+$/,"");n.maybeDirs[u]||(n.maybeDirs[u]=new Set),n.maybeDirs[u].add(a)}}n.nameToPaths[a]||(n.nameToPaths[a]=[]),n.nameToPaths[a].push(s[r]),n.nameCounter[a]||(n.nameCounter[a]=0),n.nameCounter[a]+=1}console.log("[parseTree] result:",n);const o=((Date.now()-t)/1e3).toFixed(2);this.log(`解析目录树完成,耗时 ${o} 秒`),this.log("=".repeat(60)),this._tailData=n}async queryFiles(){const t=Date.now(),n=this._tailData,s=n.suffixes.size;this.log(`根据后缀(数量: ${s})获取文件列表...`);let i=0;for(const r of n.suffixes){const a=Hn({suffix:r,limit:1150,cid:this._dirId});try{const l=Date.now();this.log(`[${i+1} / ${s}] 正在获取后缀"${r}"的文件列表...`);const u=await Hs(a),f=((Date.now()-l)/1e3).toFixed(2);this.log(`[${i+1} / ${s}] 获取后缀"${r}"的文件列表成功,文件数量:${u.length}。耗时 ${f} 秒`);for(const h of u)h.c===sa.violation?console.warn(`违规: id=${h.fid}, pc=${h.pc}, cid=${h.cid}, name=${h.n}`):h.c===sa.auditing&&console.warn(`审核中: id=${h.fid}, pc=${h.pc}, cid=${h.cid}, name=${h.n}`),n.nameCounter[h.n]&&n.nameCounter[h.n]--}catch(l){console.error(`[queryFiles] getFiles error! suffix: ${r}, error:`,l),this.log(`[${i+1} / ${s}] 获取后缀"${r}"的文件列表失败!错误: ${l.toString()}`)}i++}const o=((Date.now()-t)/1e3).toFixed(2);this.log(`根据后缀获取文件列表完成。耗时 ${o} 秒`),this.log("=".repeat(60))}async handleMaybeDirs(){const t=Date.now(),n=this._tailData;this.log("========根据上级路径排除无后缀文件========");const s=Object.keys(n.maybeDirs).length;let i=0;for(const[r,a]of Object.entries(n.maybeDirs)){const l=await zs(r),u=Hn({limit:1150,cid:l});try{const f=Date.now();this.log(`[${i+1} / ${s}] 正在获取上级路径 "${r}" 的文件列表...`);const h=await Hs(u),y=((Date.now()-f)/1e3).toFixed(2);this.log(`[${i+1} / ${s}] 获取上级路径 "${r}" 的文件列表成功,文件数量:${h.length}。耗时 ${y} 秒`);for(const _ of h)a.has(_.n)&&_.fid&&(this.log(`[${i+1} / ${s}] 上级路径 "${r}" 下的 "${_.n}" 是一个文件`),n.nameCounter[_.n]&&n.nameCounter[_.n]--)}catch(f){console.error(`[handleMaybeDirs] getFiles error! cid: ${l}, error:`,f),this.log(`[${i+1} / ${s}] 获取上级路径(cid=${l}) "${r}" 的文件列表失败!错误: ${f.toString()}`)}i++}const o=((Date.now()-t)/1e3).toFixed(2);this.log(`根据上级路径排除无后缀文件完成。耗时 ${o} 秒`),this.log("=".repeat(60))}async detectEmpty(){const t=Date.now(),n=this._tailData;this.log("========开始检测路径========");let s=0,i=Object.keys(n.nameCounter).length;for(const[r,a]of Object.entries(n.nameCounter)){if(!a){s++;continue}const l=n.nameToPaths[r];this.log(`[${s+1} / ${i}] 名称 "${r}" 有 ${a} 个路径需要检测`);for(let u=0;u<l.length;u++){const f=l[u];if(this._emptyItems.has(f)){console.log(`[detectEmpty] path "${f}" already exists in _emptyItems`);continue}if(n.repeatedPaths.has(f)){this.log(`名称 "${r}" 路径 "${f}" 存在重复,将对其所在的目录进行检测`),await this.checkDirContainsRepeated(f);continue}this.log(`[${s+1} / ${i}] 正在检测名称 "${r}" 第 ${u+1}/${a} 个路径: ${f}`);try{const h=await zs(f,!1);if(h){this.log(`检测到该末端路径 "${f}" 是一个空目录(ID: ${h})`);const y=ch({id:h,name:r,path:f,url:Ii(h),ensured:!1});await this.addEmptyItem(y)}}catch(h){h instanceof _a?this.log(`路径 "${f}" 不是一个目录`):(console.error(`[detectEmpty] getDirIdByPath failed! path: ${f}, error:`,h),this.log(`获取路径 "${f}" 的ID失败!错误: ${h.toString()}`))}}s++}const o=((Date.now()-t)/1e3).toFixed(2);this.log(`检测路径完成,耗时 ${o} 秒`),this.log("=".repeat(60))}async checkDirContainsRepeated(t){const n=Ia(t,"..",Vn.unix),s=t.split("/").pop();console.log("[checkDirContainsRepeated] parentPath:",n);let i="";try{if(i=await zs(n,!1),!i){this.log(`❌ 根据路径"${n}"获取目录ID失败: 目录不存在!`);return}}catch(r){console.error(`[checkDirContainsRepeated] getDirIdByPath error! path: ${n}, error:`,r),this.log(`获取路径 "${n}" 的ID失败!错误: ${r.toString()}`);return}const o=Hn({limit:1150,cid:i});try{const r=Date.now();this.log(`正在获取目录(id=${i})的文件列表...`);const a=await Hs(o),l=((Date.now()-r)/1e3).toFixed(2);this.log(`获取目录(id=${i})的文件列表成功,文件数量:${a.length}。耗时 ${l} 秒`);for(const u of a)if(!(u.fid||u.n!==s))try{const f=await kt(u.cid);if(f.file_name)if(f.folder_count===0&&f.count===0){this.log(`目录(id=${i})的子目录(id=${u.cid})为空`);const h=ch({id:u.cid,name:f.file_name,path:f.paths.map(y=>y.file_name).slice(1).join("/"),url:Ii(u.cid),repeated:!0,ensured:!0,attr:f});await this.addEmptyItem(h)}else this.log(`目录(id=${i})的子目录(id=${u.cid})不为空`);else this.log(`❌ 获取目录(id=${u.cid})属性失败!`)}catch(f){console.error(`[checkDirContainsRepeated] getAttr error! cid: ${u.cid}, error:`,f),this.log(`获取目录(id=${u.cid})属性失败!异常: ${f.toString()}`)}}catch(r){console.error(`[checkDirContainsRepeated] getFiles error! cid: ${i}, error:`,r),this.log(`获取目录(id=${i})的文件列表失败!错误: ${r.toString()}`)}}async checkRealEmpty(){const t=Date.now();this.log("========确认是否真的为空目录========");for(const s of this._emptyItems.values())if(!s.ensured)try{const i=await kt(s.id);s.ensured=!0,s.attr=i,i.count===0&&i.folder_count===0?this.log(`目录(id=${s.id}) "${s.path}" 确认为空`):(s.disabled=!0,s.memo="目录不为空,请手动检查和处理",this.log(`目录(id=${s.id}) "${s.path}" 确认不为空,请手动检查和处理`))}catch(i){console.error(`[checkRealEmpty] getAttr error! cid: ${s.id}, error:`,i),this.log(`获取目录(id=${s.id}) "${s.path}" 属性失败!异常: ${i.toString()}`),s.disabled=!0,s.memo="确认是否为空目录失败,请手动检查和处理"}const n=((Date.now()-t)/1e3).toFixed(2);this.log(`确认是否真的为空目录完成,耗时 ${n} 秒`),this.log("=".repeat(60))}async onTreeFileGenerated(t){this._treeFile=t;for(const n of this.treeFileSubscribers)n(t)}async addEmptyItem(t){if(this._emptyItems.has(t.id)){console.log(`[addEmptyItem] path(id=${t.id}) "${t.path}" already exists in _emptyItems`);return}this._emptyItems.set(t.id,t);for(const n of this.emptyItemSubscribers)n(t)}async getEmptyItems(){return Array.from(this._emptyItems.values())}async log(t){t=`[${new Date().toLocaleString()}] ${t}`,this.logs.push(t);for(const n of this.logSubscribers)n(t)}async reset(){this.logs=[],this._emptyItems=new Map,this._tailData=Hl(),this._treeFile=null}}const x5="",WE=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},KE={},GE={class:"ce-empty-cleaner-help"},YE=[Lf('<div data-v-414bf5e0><h2 data-v-414bf5e0>免责声明</h2><div data-v-414bf5e0><p data-v-414bf5e0>该工具仅作为学习测试用途,使用该工具造成的任何结果由使用人承担。</p></div><hr data-v-414bf5e0><h2 data-v-414bf5e0>说明</h2><ul style="color:#00f;" data-v-414bf5e0><li class="text-danger text-bold" data-v-414bf5e0> * <span style="font-size:120%;" data-v-414bf5e0>不要</span>直接清理一个巨大的文件夹!比如包含超过5万个文件夹。 太大的文件夹可能会导出目录树失败,且可能导致账号被系统风控。 </li><li data-v-414bf5e0>* 对于巨大的文件夹,可以分开清理下级文件夹。</li><li data-v-414bf5e0>* 只有违规文件的文件夹也会被检测到并列出,需要手动处理。</li><li data-v-414bf5e0>* 请谨慎操作!请谨慎操作!请谨慎操作!</li></ul><hr data-v-414bf5e0><h2 data-v-414bf5e0>流程</h2><ul style="color:#f40;" data-v-414bf5e0><li data-v-414bf5e0>1.确认当前显示的目录是否为需要进行清理的目录。</li><li data-v-414bf5e0>2.点击「检测空文件夹」按钮。</li><li data-v-414bf5e0>3.保持当前页面处于激活状态,留意日志区域的输出,耐心等待。</li><li data-v-414bf5e0>4.当看到「空文件夹检测已完成」的提示时,说明检测完成。</li><li data-v-414bf5e0>5.如果有空文件夹,会在空文件夹列表显示。</li><li data-v-414bf5e0>6.每个空文件夹都可以单独进行打开、获取详情、删除等操作。</li><li data-v-414bf5e0>7.批量删除: 勾选需要删除的空文件夹,点击「删除选中」进行删除。</li></ul><hr data-v-414bf5e0><h3 data-v-414bf5e0>原理和优劣</h3><div class="text-primary" data-v-414bf5e0> 本工具原理是导出目录树,然后根据后缀名查询文件,接着排除目录树中的文件,最后再判断目录树中剩余的项是否为空文件夹。 </div><ul data-v-414bf5e0><li class="text-bold text-success" data-v-414bf5e0>优点:</li><li class="text-success" data-v-414bf5e0>在子文件夹数量较多时,比逐层逐个查询文件列表要快得多。</li><li class="text-warning text-bold" data-v-414bf5e0>缺点:</li><li class="text-warning" data-v-414bf5e0>* 后缀名数量较多时,查询文件数据耗时较长。</li><li class="text-warning" data-v-414bf5e0>* 排除真实文件后,如剩余需判断项较多,耗时较长。</li><li class="text-warning" data-v-414bf5e0>* 不能判断大小为0且有空子文件夹的文件夹。</li></ul></div>',1)];function JE(e,t){return N(),H("div",GE,YE)}const QE=WE(KE,[["render",JE],["__scopeId","data-v-414bf5e0"]]),XE={class:"ce-empty-cleaner"},ZE=[c("span",null,"清理空文件夹",-1)],ek={key:0},tk={class:"header actions-bar"},nk=c("span",{class:"title"},"空文件夹清理工具",-1),sk={class:"ce-path ce-label ce-label-primary-plain"},ik=["href"],ok=c("i",{class:"file-type tp-folder",style:{}},null,-1),rk={class:"top-actions"},ak={class:"pure-form pure-form-aligned"},lk={class:"pure-control-group"},ck={key:0},uk=c("span",null,"文件夹数量:",-1),dk={class:"text-primary"},fk={key:1},pk=c("span",null,"文件数量:",-1),hk={class:"text-primary"},mk=c("span",{title:"不会删除目录树文件"},"保留目录树文件",-1),gk={key:0},yk=["href"],wk={key:0},bk={key:0},_k={class:"text-primary"},vk={class:"ec-items"},xk={class:"pure-table pure-table-bordered"},Ck=c("th",{width:"25"},"#",-1),$k={width:"30"},Ek=["disabled"],kk=c("th",{width:"140"},"ID",-1),Sk=c("th",null,"路径",-1),Ak=c("th",{width:"150"},"操作",-1),Pk=["onUpdate:modelValue","onChange","disabled"],Ik={key:0},Tk={class:"ce-label ce-label-danger"},Lk={key:0},Ok=[c("span",{class:"label-danger"},"已删除",-1)],Dk={key:1},Mk=["onClick","disabled"],Rk=["onClick"],Nk=["href"],Bk={key:0},Fk=c("br",null,null,-1),Uk={class:"footer actions-bar"},jk=c("span",{class:"title"},"空文件夹清理工具",-1),Hk={class:"ce-path ce-label ce-label-primary-plain"},qk=["href"],zk=c("i",{class:"file-type tp-folder",style:{}},null,-1),Vk=Ne({__name:"EmptyCleaner",setup(e){const t=ue(!1),n=ue(!0),s=ue(!1),i=ue(""),o=ue([]),r=ue(null),a=ue([]),l=ue(!1),u=ue(null),f=ue([]),h=ue([]),y=ue(null),_=ue(null),b=cn(()=>_.value?Gw(_.value.pick_code):""),E=cn(()=>i.value?Ii(i.value):"");let T;const M=ue({keepTree:!1});async function I(ce){ce.data.type===Ot.OPEN_EMPTY_CLEANER&&(await P(ce.data.payload),ds({type:Ot.EMPTY_CLEANER_OPENED},ce.source))}It(async()=>{console.log("[EmptyCleaner onMounted]"),window.addEventListener("message",I),T=new VE(i.value),T.addLogSubscriber(Se),T.addEmptyItemSubscriber(D),T.addTreeFileSubscriber(G)}),_s(()=>{console.log("[EmptyCleaner onUnmounted]"),window.removeEventListener("message",I)});async function P(ce){t.value=!0;const pe=await vt();if(pe==="0"||pe===""){await Ee(),await fe.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}i.value&&i.value!==pe&&console.warn("目录变化,重置"),r.value=await kt(pe),o.value=[...r.value.paths.slice(1).map(je=>je.file_name),r.value.file_name],i.value=pe}async function V(){l.value=!1,f.value=[],h.value=[],a.value=[],_.value=null}async function oe(){try{s.value=!0,await V(),await T.reset(),await T.setKeepTree(M.value.keepTree),await T.setDirId(i.value),await T.run(),fe.fire({title:"空文件夹检测已完成"})}catch(ce){console.error(ce),fe.fire({title:"空文件夹检测失败",text:ce.toString()})}finally{s.value=!1}}async function j(ce){const pe=h.value.join(`
`);if(ce==="copy")await Oc(pe)?se({text:"已复制清理空文件夹日志",timer:1200}):se({text:"复制清理空文件夹日志失败",timer:1200});else if(ce==="download"){let je=`清理空文件夹日志-${i.value}.txt`;vi(pe,je)}}async function X(ce,pe,je="path"){const tt=pe==="all"?a.value:f.value;let ke="";je==="path"?ke=tt.map(it=>it.path).join(`
`):je==="full"&&(ke=JSON.stringify(tt,null,2));const ft=je==="path"?"路径":"数据";if(ce==="copy")await Oc(ke)?se({text:`已复制${ft}到剪贴板`,timer:1200}):se({text:`复制${ft}失败`,timer:1200});else if(ce==="download"){let it=`空文件夹${ft}-${i.value}-数量${tt.length}`;vi(ke,`${it}.${je==="path"?"txt":"json"}`)}}async function le(ce){const pe=ce==="all"?a.value:f.value;for(const je of pe)window.open(je.url),await mt(100)}async function ge(){unsafeWindow.parent.Core.FileSelectDG.Open(async(ce,pe)=>{console.log("[Core.FileSelectDG.Open]",ce,pe);const je=ce[ce.length-1];await V(),i.value=je.cid,r.value=await kt(je.cid),o.value=[...r.value.paths.slice(1).map(tt=>tt.file_name),r.value.file_name]},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"选择该目录",select_txt:"清理空文件夹"})}async function Le(ce,pe){if(ce.deleted){se({text:"该目录已删除,不能再次删除!",timer:2e3,showConfirmButton:!0});return}s.value=!0,await L([ce.id])&&(ce.deleted=!0),s.value=!1}async function _e(){if(!f.value.length)return;const ce=f.value.filter(pe=>!pe.deleted).map(pe=>pe.id);if(!ce.length){se({text:"没有可删除的目录!",timer:2e3,showConfirmButton:!0});return}if(s.value=!0,await L(ce))for(const pe of f.value)pe.deleted=!0;s.value=!1}async function L(ce){try{const pe=await Aa(i.value,ce);if(pe.state)return!0;se({text:`删除失败: ${pe.errno} - ${pe.error}`,timer:1200})}catch(pe){console.error(pe),se({text:`删除失败!${pe.toString()}`,timer:1200})}return!1}async function ie(ce){s.value=!0;try{const pe=await kt(ce.id),je=ke=>new Date(Number(ke)*1e3).toLocaleString(),{isConfirmed:tt}=await fe.fire({title:"目录属性",html:`<div class="ce-ec-detail">
        <p><span>类型:</span> 文件夹</p>
        <p><span>大小:</span> ${pe.size}</p>
        <p><span>创建时间:</span> ${je(pe.ptime)}</p>
        <p><span>修改时间:</span> ${je(pe.utime)}</p>
        <p><span>位置:</span> ${ce.path}</p>
      </div>
      `,showDenyButton:!0,denyButtonText:"关闭",showConfirmButton:!0,confirmButtonText:"查看目录"});tt&&window.open(ce.url)}catch(pe){se({text:`获取目录属性失败!${pe.toString()}`,timer:1e4,showConfirmButton:!0})}finally{s.value=!1}}async function G(ce){_.value=ce}async function Se(ce){h.value.push(ce),await ni(),y.value.scrollTop=y.value.scrollHeight}async function D(ce){a.value.push(ce)}async function Z(){console.log("[onAllCheckedChange]",l.value);for(const ce of a.value)ce.disabled||(ce.checked=l.value);await ye()}async function B(ce,pe){console.log("[onCheckChange]",ce,pe),l.value=a.value.every(je=>je.checked),u.value.indeterminate=!l.value&&a.value.some(je=>je.checked),await ye()}async function ye(){f.value=a.value.filter(ce=>ce.checked)}async function Ee(){t.value=!1}async function Oe(){document.querySelector(".ce-empty-cleaner-drawer").scrollTo(0,0)}return(ce,pe)=>{var je,tt;return z((N(),H("span",XE,[an(ce.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:P},ZE)]),t.value?(N(),H("div",ek,[Ce(QE)])):Ue("",!0),z(c("div",{class:Ye(["ce-empty-cleaner-drawer",{loading:s.value}])},[c("div",tk,[nk,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:Ee},"关闭")]),c("div",sk,[c("a",{target:"_blank",href:de(E),title:"打开目录"},[ok,Q(" "+me(o.value.join(" / ")),1)],8,ik)])]),c("div",null,[c("div",rk,[c("div",null,[c("button",{type:"button",class:"pure-button pure-button-primary",onClick:oe},"检测空文件夹"),Q("     "),c("button",{type:"button",class:"pure-button button-success",onClick:ge},"切换目录")]),c("div",null,[c("form",ak,[c("fieldset",null,[c("div",lk,[r.value?(N(),H("label",ck,[uk,Q("  "),c("b",dk,me((je=r.value)==null?void 0:je.folder_count),1)])):Ue("",!0),r.value?(N(),H("label",fk,[pk,Q("  "),c("b",hk,me((tt=r.value)==null?void 0:tt.count),1)])):Ue("",!0),c("label",null,[z(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":pe[0]||(pe[0]=ke=>M.value.keepTree=ke)},null,512),[[ve,M.value.keepTree]]),Q("  "),mk,_.value?(N(),H("span",gk,[Q("    "),c("a",{href:de(b),class:"text-primary",target:"_blank"},"查看目录树文件",8,yk)])):Ue("",!0)])])])])])]),c("h3",null,[Q(" 日志 "),h.value.length?(N(),H("span",wk,[Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[1]||(pe[1]=ke=>j("copy"))},"复制日志"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[2]||(pe[2]=ke=>j("download"))},"保存日志")])):Ue("",!0)]),c("div",{ref_key:"refLogs",ref:y,class:"ec-logs"},[(N(!0),H(Fe,null,nt(h.value,(ke,ft)=>(N(),H("div",{key:ft},me(ke),1))),128))],512),c("h3",null,[Q(" 空文件夹 "),a.value.length?(N(),H("span",bk,[c("span",_k," ( "+me(a.value.length)+" )",1),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[3]||(pe[3]=ke=>X("copy","all","path"))},"复制路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[4]||(pe[4]=ke=>X("copy","all","full"))},"复制数据"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[5]||(pe[5]=ke=>X("download","all","path"))},"保存路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[6]||(pe[6]=ke=>X("download","all","full"))},"保存数据")])):Ue("",!0)]),c("div",vk,[c("table",xk,[c("thead",null,[c("tr",null,[Ck,c("th",$k,[z(c("input",{ref_key:"refAllChecked",ref:u,type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":pe[7]||(pe[7]=ke=>l.value=ke),onChange:Z,disabled:!a.value.length},null,40,Ek),[[ve,l.value]])]),kk,Sk,Ak])]),c("tbody",null,[(N(!0),H(Fe,null,nt(a.value,(ke,ft)=>(N(),H("tr",{key:ft,class:Ye({"tr-deleted":ke.deleted})},[c("td",null,me(ft+1),1),c("td",null,[z(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":it=>ke.checked=it,onChange:it=>B(ke,ft),disabled:ke.disabled},null,40,Pk),[[ve,ke.checked]])]),c("td",null,me(ke.id),1),c("td",null,[c("div",null,me(ke.path),1),ke.memo?(N(),H("div",Ik,[c("span",Tk,me(ke.memo),1)])):Ue("",!0)]),c("td",null,[ke.deleted?(N(),H("div",Lk,Ok)):(N(),H("div",Dk,[c("button",{type:"button",class:"pure-button button-xsmall button-error",onClick:it=>Le(ke),disabled:ke.disabled},"删除",8,Mk),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:it=>ie(ke)},"详情",8,Rk),Q("   "),c("a",{class:"pure-button button-xsmall",href:ke.url,target:"_blank"},"打开",8,Nk)]))])],2))),128))])]),f.value.length?(N(),H("div",Bk,[Fk,c("button",{type:"button",class:"pure-button button-error",onClick:_e},"删除选中 ("+me(f.value.length)+")",1),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[8]||(pe[8]=ke=>X("copy","checked","path"))},"复制已选路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[9]||(pe[9]=ke=>X("copy","checked","full"))},"复制已选数据"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[10]||(pe[10]=ke=>X("download","checked","path"))},"保存已选路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:pe[11]||(pe[11]=ke=>X("download","checked","full"))},"保存已选数据"),Q("     "),c("button",{type:"button",class:"pure-button button-success button-xsmall",onClick:pe[12]||(pe[12]=ke=>le("checked"))},"打开已选")])):Ue("",!0)])]),c("div",Uk,[jk,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:Ee},"关闭")]),Q("     "),c("button",{type:"button",class:"pure-button button-small",onClick:Oe}," 回到顶部 "),c("div",Hk,[c("a",{target:"_blank",href:de(E),title:"打开目录"},[zk,Q(" "+me(o.value.join(" / ")),1)],8,qk)])])],2),[[Lt,t.value]])],512)),[[Lt,n.value]])}}}),k5="",S5="";async function Wk(){const{host:e,search:t}=location;e==="115.com"&&(console.log("[Cleaner] running..."),t.includes("ct=file")?(await Kk(),await Gk()):(await Yk(),await Jk()))}async function Fr(){return typeof window.$<"u"}async function Kk(){await Fr()||console.log("[Cleaner injectTrigger] JQuery not found");const e="cloud115Cleaner",t=await Cn("#js_path_add_dir"),n=document.createElement("span");n.id=e,t.insertAdjacentElement("afterend",n),_n(g$).mount(`#${e}`)}async function Gk(){await Fr()||console.log("[Cleaner injectEmptyTrigger] JQuery not found");const e="cloud115EmptyCleaner",t=await Cn("#js_path_add_dir"),n=document.createElement("span");n.id=e,t.insertAdjacentElement("afterend",n),_n(HE).mount(`#${e}`)}async function Yk(){await Fr()||console.log("[Cleaner injectUI] JQuery not found");const e="cloud115Cleaner",t=document.createElement("div");t.id=e,document.body.appendChild(t);const n=_n(FE);n.use(Nr),n.mount(`#${e}`),uo("清理文件",async()=>{ds({type:Ot.OPEN_CLEANER},window.parent)})}async function Jk(){await Fr()||console.log("[Cleaner injectEmptyUI] JQuery not found");const e="cloud115EmptyCleaner",t=document.createElement("div");t.id=e,document.body.appendChild(t);const n=_n(Vk);n.use(Nr),n.mount(`#${e}`),uo("清理空目录",async()=>{ds({type:Ot.OPEN_EMPTY_CLEANER},window.parent)})}const uh=st.basic,ql={name:"115不大助手",version:"0.6.24",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};function Qk(e){return{qps:4,showOfflineEntry:!1,offlineEntryLabel:"云下载",showAddOffline:!1,addOfflineLabel:"添加",transferDefaultOffline:!1,showFavEntry:!1,favEntryLabel:"星标",hideWatermark:!0,fakeAccountEnabled:!1,fakeAccountId:"",fakeAccountName:"",fakeAccountAvatar:"",fakeAccountVip:"",...e}}async function Ur(){const e=Qk(),t=await Ze.get(uh,e);return{...e,...t}}async function Xk(e){await Ze.set(uh,e)}async function Zk(e){if(!e.showOfflineEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showOfflineEntry");const n=await Un("a#js_filter_btn"),s="https://115.com/?ct=index&ac=offline_new_tpl&offline=1&tab=offline",i="background:#fffcea;",o=`点击跳转到「云下载」页面。该按钮由 ${ql.name} 注入`,r=e.offlineEntryLabel?`<span>${e.offlineEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${o}" tab_btn="wangpan" mode-tab="offline" style="${i}">
    <i class="icon-operate ifo-linktask"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{Jt().oofUtil.urlMaintain.changeMode("wangpan",{tab:"offline"})}catch(l){console.log('[Cloud115 Enhancer] showOfflineEntry failed with "top.oofUtil.urlMaintain.changeMode".',l),location.href=s}})}async function e2(e){if(!e.showAddOffline)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showAddOffline");const n=await Un("a#js_filter_btn"),s="background:#fffcea;",i=`点击打开到「添加云下载」对话框。该按钮由 ${ql.name} 注入`,o=e.addOfflineLabel?`<span>${e.addOfflineLabel}</span>`:"",r=$(`<a href="javascript:;" class="button btn-line" menu="offline_task" style="${s}" title="${i}">
    <i class="icon-operate ifo-linktask"></i>${o}
  </a>`);n.after(r)}async function t2(e){if(!e.showFavEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showFavEntry");const n=await Un("a#js_filter_btn"),s="https://115.com/?tab=label&show_label=1&label_id=-1&mode=wangpan",i="background:#fffcea;",o=`点击跳转到「星标」页面。该按钮由 ${ql.name} 注入`,r=e.favEntryLabel?`<span>${e.favEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${o}" tab_btn="wangpan" mode-tab="{tab:'label',label_id:-1,show_label:1}" style="${i}">
    <i class="icon-operate ifo-fav"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{Jt().oofUtil.urlMaintain.changeMode("wangpan",{tab:"label",label_id:-1,show_label:1})}catch(l){console.log('[Cloud115 Enhancer] showFavEntry failed with "top.oofUtil.urlMaintain.changeMode".',l),location.href=s}})}async function n2(e){if(!e.transferDefaultOffline)return;const{search:t}=location;if(window.top!==window||!t.includes("mode=wangpan"))return;console.log("[Cloud115 Enhancer] makeTransferDefaultOffline");const n=await Un('#js_sub_nav_scroller a[mode-tab="upload"]');n.attr("mode-tab","offline").attr("href","https://115.com/?tab=offline&mode=wangpan"),n.find("i").removeClass("icon-ns-transfer").removeClass("icon-nv-file inf-transmit").addClass("icon-operate ifo-linktask").css({filter:"invert(0.6)",marginRight:12,zoom:1.2})}async function s2(e){if(!!e.hideWatermark){console.log("[Cloud115 Enhancer] hideWatermark");try{const t=await Cn('div[class^="fp-"]');t.classList.add("hidden-watermark"),t.style.display="none"}catch(t){console.error("[Cloud115 Enhancer] hideWatermark",t.message)}}}async function i2(e){window.top===window.self&&(await mt(1e3),zl(e),window.addEventListener("message",async t=>{const n=t.data.event,s=t.data.body;n===ct.basicConfigChange&&(console.log("[Cloud115 Enhancer] basicConfigChange"),zl(s))}))}let so=null;async function o2(){so&&clearTimeout(so),so=setTimeout(async()=>{const e=await Ur();zl(e)},5e3)}async function zl(e){so&&clearTimeout(so);const t=async(n,s)=>{const i=await Un('[rel="user_id"]',100);i.data("origin")||i.data("origin",i.text()),s?i.text(i.data("origin")):i.text(n.fakeAccountId);const o=await Un('[rel="user_name"]',100);o.data("origin")||o.data("origin",$(o[0]).text()),s?o.text(o.data("origin")):o.text(n.fakeAccountName);const r=await Un('img[rel="user_face"], .user-avatar img',100);r.data("origin")||r.data("origin",r.attr("src")),s?r.attr("src",r.data("origin")):(r.attr("rel","noreferrer"),r.attr("src",n.fakeAccountAvatar));const a=await Un(".sign-vip-card",100);a.data("origin")||a.data("origin",$(a[0]).text()),s?a.text(a.data("origin")):a.text(n.fakeAccountVip)};try{e.fakeAccountEnabled?await t(e,!1):await t(e,!0)}catch(n){console.error(n)}finally{e.fakeAccountEnabled&&o2()}}async function r2(){const e=await Ur(),{host:t,search:n}=location;!/115\.com$/.test(t)||(s2(e),Zk(e),e2(e),t2(e),n2(e),i2(e))}const dh=Symbol("addTab"),fh=Symbol("updateTab"),ph=Symbol("deleteTab"),hh=Symbol("tabsProvider");function jr(e,t){const n=qi(e,t);if(typeof n>"u")throw new Error(`Could not resolve ${e.description}`);return n}const a2=["data-tab-id","aria-hidden"],fn=Ne({__name:"Tab",props:{panelClass:{type:[String,Object,Array],default:"tabs-component-panel"},id:{type:String,default:null},name:{type:String,required:!0},prefix:{type:String,default:""},suffix:{type:String,default:""},isDisabled:{type:Boolean,default:!1},navItemClass:{type:[String,Object,Array],required:!1,default:null},navItemLinkClass:{type:[String,Object,Array],required:!1,default:null}},setup(e,{expose:t}){const n=e,s=ue(!1),i=jr(hh),o=jr(dh),r=jr(fh),a=jr(ph),l=n.prefix+n.name+n.suffix,u=n.id?n.id:n.name.toLowerCase().replace(/ /g,"-"),f=u+"-pane",h=cn(()=>"#"+(n.isDisabled?"":u));return dt(()=>i.activeTabHash,()=>{s.value=h.value===i.activeTabHash}),dt(()=>Object.assign({},n),()=>{r(u,{name:n.name,header:n.prefix+n.name+n.suffix,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:u,paneId:f,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),Pt(()=>{o({name:n.name,header:l,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:u,paneId:f,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),cf(()=>{a(u)}),t({header:l,computedId:u,paneId:f,hash:h,isActive:s}),(y,_)=>z((N(),H("section",{ref:"tab",id:f,"data-tab-id":de(u),"aria-hidden":!s.value,class:Ye(e.panelClass),role:"tabpanel",tabindex:"-1"},[an(y.$slots,"default")],10,a2)),[[Lt,s.value]])}});class l2{get(t){const n=localStorage.getItem(t);if(n===null)return null;const s=JSON.parse(n);return s?new Date(s.expires)<new Date?(localStorage.removeItem(t),null):s.value:null}set(t,n,s){const i=new Date().getTime(),o=new Date(i+s*6e4);localStorage.setItem(t,JSON.stringify({value:n,expires:o}))}}const mh=new l2,c2=["aria-controls","aria-selected","href","onClick","innerHTML"],u2=Ne({__name:"Tabs",props:{cacheLifetime:{type:Number,default:5},options:{type:Object,required:!1,default:()=>({useUrlFragment:!0,defaultTabHash:null})},wrapperClass:{type:[String,Object,Array],default:"tabs-component"},panelsWrapperClass:{type:[String,Object,Array],default:"tabs-component-panels"},navClass:{type:[String,Object,Array],default:"tabs-component-tabs"},navItemClass:{type:[String,Object,Array],default:"tabs-component-tab"},navItemDisabledClass:{type:[String,Object,Array],default:"is-disabled"},navItemActiveClass:{type:[String,Object,Array],default:"is-active"},navItemInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkClass:{type:[String,Object,Array],default:"tabs-component-tab-a"},navItemLinkActiveClass:{type:[String,Object,Array],default:"is-active"},navItemLinkInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkDisabledClass:{type:[String,Object,Array],default:"is-disabled"}},emits:["changed","clicked"],setup(e,{expose:t,emit:n}){const s=e,i=nr({activeTabHash:"",lastActiveTabHash:"",tabs:[]});Hi(hh,i),Hi(dh,a=>{i.tabs.push(a)}),Hi(fh,(a,l)=>{const u=i.tabs.findIndex(f=>f.computedId===a);l.isActive=i.tabs[u].isActive,i.tabs[u]=l}),Hi(ph,a=>{const l=i.tabs.findIndex(u=>u.computedId===a);i.tabs.splice(l,1)});const o=(a,l)=>{l&&!s.options.useUrlFragment&&l.preventDefault();const u=r(a);if(!u)return;if(l&&u.isDisabled){l.preventDefault();return}if(i.lastActiveTabHash===u.hash){n("clicked",{tab:u});return}if(i.tabs.forEach(h=>{h.isActive=h.hash===u.hash}),n("changed",{tab:u}),i.lastActiveTabHash=i.activeTabHash=u.hash,s.cacheLifetime<=0)return;const f=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`;mh.set(f,u.hash,s.cacheLifetime)},r=a=>i.tabs.find(l=>l.hash===a);return It(()=>{if(i.tabs.length){if(window.addEventListener("hashchange",()=>o(window.location.hash)),r(window.location.hash)){o(window.location.hash);return}if(s.cacheLifetime>0){const a=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`,l=mh.get(a);if(l!==null&&r(l)){o(l);return}if(s.options.defaultTabHash&&r("#"+s.options.defaultTabHash)){o("#"+s.options.defaultTabHash);return}}o(i.tabs[0].hash)}}),t({...x_(i),selectTab:o,findTab:r}),(a,l)=>(N(),H("div",{class:Ye(e.wrapperClass)},[c("ul",{role:"tablist",class:Ye(e.navClass)},[(N(!0),H(Fe,null,nt(i.tabs,(u,f)=>{var h,y;return N(),H("li",{key:f,class:Ye([(h=u.navItemClass)!=null?h:e.navItemClass,u.isDisabled?e.navItemDisabledClass:"",u.isActive?e.navItemActiveClass:u.isDisabled?"":e.navItemInactiveClass]),role:"presentation"},[c("a",{role:"tab",class:Ye([(y=u.navItemLinkClass)!=null?y:e.navItemLinkClass,u.isDisabled?e.navItemLinkDisabledClass:"",u.isActive?e.navItemLinkActiveClass:u.isDisabled?"":e.navItemLinkInactiveClass]),"aria-controls":u.paneId,"aria-selected":u.isActive,href:u.hash,onClick:_=>o(u.hash,_),innerHTML:u.header,tabindex:"0"},null,10,c2)],2)}),128))],2),c("div",{class:Ye(e.panelsWrapperClass)},[an(a.$slots,"default")],2)],2))}}),d2={class:"ce-config ce-basic-config"},f2={class:"pure-form pure-form-aligned"},p2=c("legend",null,"API",-1),h2={class:"pure-control-group"},m2=c("label",{for:"basic_qps"},"全局QPS",-1),g2=c("div",{class:"pure-form-message text-success"}," 控制脚本请求115 API的频率,越大频率越高,建议设置5以下。 ",-1),y2=c("legend",null,"UI优化",-1),w2={class:"pure-control-group"},b2=c("label",{for:"basic_showOfflineEntry"},"显示云下载入口按钮",-1),_2={class:"pure-form-message text-success"},v2={class:"pure-control-group"},x2=c("label",{for:"basic_showAddOffline"},"显示添加云下载按钮",-1),C2={class:"pure-form-message text-success"},$2={class:"pure-control-group"},E2=c("label",{for:"basic_transferDefaultOffline"},"近期传输默认云下载",-1),k2=c("div",{class:"pure-form-message text-success"}," 点击左边栏的「传输」默认进入「云下载」页面。 ",-1),S2={class:"pure-control-group"},A2=c("label",{for:"basic_showFavEntry"},"显示星标入口按钮",-1),P2={class:"pure-form-message text-success"},I2=c("legend",null,"配置管理",-1),T2=c("br",null,null,-1),L2=c("br",null,null,-1),O2=c("div",{class:"text-success"},[c("b",null,"导入说明:"),Q(" 如有导入部分配置的需求,可以自行编辑json配置文件,只保留需要的配置key(仅限第一级),但必须保留`_`开头的key。 ")],-1),D2=c("br",null,null,-1),M2=c("legend",null,"隐私保护",-1),R2={class:"pure-control-group"},N2=c("label",{for:"basic_hideWatermark"},"隐藏水印",-1),B2=c("div",{class:"pure-form-message text-success"}," 网页水印是肉眼看不到的,但通过一些处理可以看到,水印内容是你的账号标识。 如果你需要截图并发给别人,可以考虑开启隐藏。 ",-1),F2={class:"pure-control-group"},U2=c("label",{for:"basic_fakeAccountEnabled"},"隐藏身份",-1),j2=c("div",{class:"pure-form-message text-success"}," 修改右上角显示的账号信息,不会真的修改。编辑后即可生效,无需刷新页面。 ",-1),H2={class:"pure-control-group"},q2=c("label",null,"账号ID",-1),z2={class:"pure-control-group"},V2=c("label",null,"用户名",-1),W2={class:"pure-control-group"},K2=c("label",null,"头像",-1),G2={class:"avatar-preview"},Y2=["src"],J2={class:"pure-control-group"},Q2=c("label",null,"VIP等级",-1),X2=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>Ur()),t=await t,n(),t));Pt(async()=>{}),dt(s,Rt(async a=>{await Xk(a),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.basicConfigChange,body:wc(a)})},500),{deep:!0});async function i(a,l,u="warning"){const{isConfirmed:f}=await fe.fire({title:a,text:l,icon:u,showCancelButton:!0,confirmButtonText:"确认"});return f}async function o(){if(!!await i("导出配置","是否确认导出当前配置?"))try{await Rm(),se({icon:"success",title:"导出成功"})}catch(a){fe.fire(a.toString())}}async function r(){if(!!await i("导入配置","导入后将覆盖当前配置,是否继续?"))try{const a=await Nm();console.log(a),Ti.fire({icon:"success",title:"导入成功,刷新页面后生效。将在5秒后自动刷新页面...",timer:5e3}),setTimeout(()=>{window.location.reload()},5e3)}catch(a){fe.fire({title:"导入失败",html:a.toString()+'<br/><p class="text-danger">必须有字段 "_schema": "pan115_enhancer_configs" 。</p>'})}}return(a,l)=>(N(),H("div",d2,[c("form",f2,[c("fieldset",null,[p2,c("div",h2,[m2,z(c("input",{id:"basic_qps",type:"number",min:"1",max:"9",step:"1","onUpdate:modelValue":l[0]||(l[0]=u=>s.value.qps=u)},null,512),[[He,s.value.qps]]),g2]),y2,c("div",w2,[b2,z(c("input",{id:"basic_showOfflineEntry",type:"checkbox","onUpdate:modelValue":l[1]||(l[1]=u=>s.value.showOfflineEntry=u)},null,512),[[ve,s.value.showOfflineEntry]]),c("div",_2,[Q(" 在「网盘」页面顶部工具栏显示「云下载」入口按钮。按钮文本为 "),z(c("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>s.value.offlineEntryLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[He,s.value.offlineEntryLabel]])])]),c("div",v2,[x2,z(c("input",{id:"basic_showAddOffline",type:"checkbox","onUpdate:modelValue":l[3]||(l[3]=u=>s.value.showAddOffline=u)},null,512),[[ve,s.value.showAddOffline]]),c("div",C2,[Q(" 在「网盘」页面顶部工具栏显示「添加云下载」按钮。按钮文本为 "),z(c("input",{"onUpdate:modelValue":l[4]||(l[4]=u=>s.value.addOfflineLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[He,s.value.addOfflineLabel]])])]),c("div",$2,[E2,z(c("input",{id:"basic_transferDefaultOffline",type:"checkbox","onUpdate:modelValue":l[5]||(l[5]=u=>s.value.transferDefaultOffline=u)},null,512),[[ve,s.value.transferDefaultOffline]]),k2]),c("div",S2,[A2,z(c("input",{id:"basic_showFavEntry",type:"checkbox","onUpdate:modelValue":l[6]||(l[6]=u=>s.value.showFavEntry=u)},null,512),[[ve,s.value.showFavEntry]]),c("div",P2,[Q(" 在「网盘」页面顶部工具栏显示「星标」入口按钮。按钮文本为 "),z(c("input",{"onUpdate:modelValue":l[7]||(l[7]=u=>s.value.favEntryLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[He,s.value.favEntryLabel]])])]),I2,c("div",{class:"pure-control-group"},[c("button",{type:"button",class:"pure-button pure-button-primary",onClick:o},"导出配置"),Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:r},"导入配置"),T2,L2,O2,D2]),M2,c("div",R2,[N2,z(c("input",{id:"basic_hideWatermark",type:"checkbox","onUpdate:modelValue":l[8]||(l[8]=u=>s.value.hideWatermark=u)},null,512),[[ve,s.value.hideWatermark]]),B2]),c("div",F2,[U2,z(c("input",{id:"basic_fakeAccountEnabled",type:"checkbox","onUpdate:modelValue":l[9]||(l[9]=u=>s.value.fakeAccountEnabled=u)},null,512),[[ve,s.value.fakeAccountEnabled]]),j2]),c("div",H2,[q2,z(c("input",{"onUpdate:modelValue":l[10]||(l[10]=u=>s.value.fakeAccountId=u),placeholder:"自定义账号ID",class:"pure-input-2-3"},null,512),[[He,s.value.fakeAccountId]])]),c("div",z2,[V2,z(c("input",{"onUpdate:modelValue":l[11]||(l[11]=u=>s.value.fakeAccountName=u),placeholder:"自定义用户名",class:"pure-input-2-3"},null,512),[[He,s.value.fakeAccountName]])]),c("div",W2,[K2,z(c("input",{"onUpdate:modelValue":l[12]||(l[12]=u=>s.value.fakeAccountAvatar=u),placeholder:"支持网络图片地址或base64编码",class:"pure-input-2-3"},null,512),[[He,s.value.fakeAccountAvatar]]),c("span",G2,[s.value.fakeAccountAvatar?(N(),H("img",{key:0,src:s.value.fakeAccountAvatar,alt:"头像预览",width:"20",height:"20"},null,8,Y2)):Ue("",!0)])]),c("div",J2,[Q2,z(c("input",{"onUpdate:modelValue":l[13]||(l[13]=u=>s.value.fakeAccountVip=u),placeholder:"自定义VIP等级",class:"pure-input-2-3"},null,512),[[He,s.value.fakeAccountVip]])])])])]))}}),A5="",Z2={class:"pure-form pure-form-aligned"},eS=["disabled"],tS={class:"pure-control-group"},nS=c("label",null,[c("span",{class:"text-danger"},"*"),Q(" 地址")],-1),sS={class:"pure-control-group"},iS=c("label",null,[c("span",{class:"text-danger"},"*"),Q(" 资源根路径")],-1),oS={class:"pure-control-group"},rS=c("label",null,"备注",-1),aS={class:"pure-control-group"},lS=c("label",null,"平台",-1),cS=["value"],uS=c("small",{class:"text-info"},"如果是macOS版,而且有包含日韩文的文件或目录,建议选上,可以避免播放链接无效的问题。",-1),dS=Ne({__name:"ConfigItem",props:{config:null,deletable:{type:Boolean}},emits:["change","delete","activate"],setup(e,{emit:t}){const n=e;Pt(async()=>{});async function s(){n.config.active=!0,t("activate",n.config)}async function i(){t("delete")}return dt(n.config,Rt(async o=>{t("change",o)},500),{deep:!0}),(o,r)=>(N(),H("div",{class:Ye(["ce-clouddrive-config-item",{active:e.config.active}])},[c("form",Z2,[c("fieldset",null,[c("legend",null,[c("button",{type:"button",class:Ye(["pure-button button-small",[e.config.active?"button-success":"pure-button-primary"]]),onClick:s,disabled:e.config.active},me(e.config.active?"当前使用该配置":"使用该配置"),11,eS),e.deletable?(N(),H("button",{key:0,type:"button",class:"pure-button button-error button-small",onClick:i}," 删除 ")):Ue("",!0)]),c("div",tS,[nS,z(c("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>e.config.url=a),placeholder:"CloudDrive服务地址,如「http://localhost:19798」",class:"pure-input-2-3"},null,512),[[He,e.config.url]])]),c("div",sS,[iS,z(c("input",{"onUpdate:modelValue":r[1]||(r[1]=a=>e.config.root=a),placeholder:"即当前115账号在CloudDrive中的资源名称,如「115」",class:"pure-input-2-3"},null,512),[[He,e.config.root]])]),c("div",oS,[rS,z(c("input",{"onUpdate:modelValue":r[2]||(r[2]=a=>e.config.memo=a),placeholder:"备注信息",class:"pure-input-2-3"},null,512),[[He,e.config.memo]])]),c("div",aS,[lS,z(c("select",{"onUpdate:modelValue":r[3]||(r[3]=a=>e.config.platform=a)},[(N(!0),H(Fe,null,nt(de(Rc),a=>(N(),H("option",{key:a,value:a},me(a),9,cS))),128))],512),[[ai,e.config.platform]]),Q("   "),uS])])])],2))}}),P5="",fS={class:"ce-config ce-clouddrive-config"},pS=c("div",{class:"ce-tips cd-tips"},[c("p",null,[c("a",{href:"https://www.clouddrive2.com/?ref=cloud115-enhancer",rel:"noreferer",target:"_blank",class:"text-bold text-primary"},"CloudDrive"),Q(" 是一个强大的多云盘管理工具,为用户提供包含云盘本地挂载的一站式的多云盘解决方案。 ")]),c("p",null,"本脚本主要是借助CloudDrive实现原码视频播放的功能(具体可以在「播放菜单」面板中查看)。")],-1),hS={class:"ce-list"},mS=c("div",{class:"ce-tips"},[c("p",{class:"text-primary"}," 暂时发现IINA是支持`file://`协议的,这时候播放器可以读取到同目录的字幕文件。 配置地址示例: file:///Users/you/115,根路径不用填。 ")],-1),gS=c("div",{class:"ce-tips"}," 编辑配置后,请记得点击「保存全部配置」。 ",-1),yS={class:"ce-actions"},wS=["disabled"],bS=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>Nc()),t=await t,n(),t));Pt(async()=>{});async function i(){await Bc(s.value),se({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}async function o(){s.value.push(ea())}async function r(l,u){const{isConfirmed:f}=await fe.fire({icon:"warning",html:`确定要删除第 ${u+1} 个配置「${l.url}」吗?`});!f||(s.value.splice(u,1),await i(),se({icon:"success",title:`「${l.url}」已删除!`}))}async function a(l,u){l.forEach((f,h)=>{f.active=h===u}),await Bc(l),se({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}return(l,u)=>(N(),H("div",fS,[pS,c("div",hS,[(N(!0),H(Fe,null,nt(s.value,(f,h)=>(N(),Zt(dS,{key:h,config:f,index:h,deletable:s.value.length>1,onDelete:y=>r(f,h),onActivate:y=>a(s.value,h)},null,8,["config","index","deletable","onDelete","onActivate"]))),128))]),mS,gS,c("div",yS,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:i,disabled:!s.value.length}," 保存全部配置 ",8,wS),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:o}," 添加配置 ")])]))}}),I5="",_S={class:"ce-config ce-list-config"},vS={class:"pure-form pure-form-aligned"},xS={class:"pure-control-group"},CS=c("label",{for:"showOpenDirContextMenu"},'显示"目录功能菜单"按钮',-1),$S=c("div",{class:"pure-form-message text-success"},[c("div",null,"在官方的「文件名」列头部增加「目录功能菜单」按钮,点击即可打开当前目录的右键菜单。")],-1),ES={class:"pure-control-group"},kS=c("label",{for:"sizeSorter"},"大小排序",-1),SS=c("div",{class:"pure-form-message text-success"},[c("div",null,"在官方的「大小」列头部增加「排序」按钮,可以获取文件夹的大小,然后进行排序。"),c("div",null,"请注意该功能只会对当前加载的文件进行排序,如果有多页文件并需要对全部文件进行排序,请先点击「加载全部」后再使用该排序功能。")],-1),AS={class:"pure-control-group"},PS=c("label",{for:"sizeSorterDirAttrInterval"},"大小排序-获取目录大小间隔",-1),IS=c("div",{class:"pure-form-message text-success"}," 「大小排序」功能需要获取文件夹大小,这个设置是获取文件夹大小的间隔时间,单位是豪秒。 ",-1),TS={class:"pure-control-group"},LS=c("label",{for:"showSha1"},"显示文件SHA1",-1),OS=c("div",{class:"pure-form-message text-success"}," 在文件名下方显示文件SHA1,点击可以复制。 ",-1),DS={class:"pure-control-group"},MS=c("label",{for:"showFolderSizeButton"},"显示文件夹获取大小按钮",-1),RS=c("div",{class:"pure-form-message text-success"}," 点击按钮可以获取单个文件夹的大小。 ",-1),NS={class:"pure-control-group"},BS=c("label",{for:"showCopyButtonOnPathBar"},"在路径栏显示复制按钮",-1),FS=c("div",{class:"pure-form-message text-success"}," 点击后,复制当前路径到剪贴板。 ",-1),US={class:"pure-control-group"},jS=c("label",{for:"showGotoButtonOnPathBar"},[Q(" 在路径栏显示前往按钮 "),c("small",{class:"ce-label"},"DEV")],-1),HS=c("div",{class:"pure-form-message text-success"}," 点击后,路径栏变为可输入状态,输入路径后按回车即可前往该路径。 ",-1),qS={class:"pure-control-group"},zS=c("label",{for:"noUpdateDirAfterRename"}," 重命名后不刷新文件列表 ",-1),VS=c("div",{class:"pure-form-message text-success"}," 仅支持单个文件或目录的重命名。在使用当前目录增强菜单项「重命名文件夹」时会忽略该选项。 ",-1),WS={class:"pure-control-group"},KS=c("label",{for:"noUpdateDirAfterMove"}," 移动后不刷新文件列表 ",-1),GS=c("div",{class:"pure-form-message text-success text-linethrough"},[c("b",null,"启用后如果进行了移动操作,列表的全选会受影响,如已选数量不准确。"),c("br"),c("b",{class:"text-danger"},"该功能主要目的是持续高效地在进行移动操作,如果在移动后还需要其他操作,请记得手动刷新列表!")],-1),YS={class:"pure-control-group"},JS=c("label",{for:"fileSelectorDefaultView"},"文件选择器默认视图",-1),QS=[c("option",{value:"view"},"大图标",-1),c("option",{value:"list"},"列表",-1),c("option",{value:"_"},"系统默认",-1)],XS=c("div",{class:"pure-form-message text-success"},[c("div",null,"设置打开页面后初次使用的视图。"),c("div",{class:"text-warning"},"如果在刷新页面前在选择器切换到了其他视图,该选项将不会生效,但刷新页面后会恢复。")],-1),ZS=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>gr()),t=await t,n(),t));return Pt(async()=>{}),dt(s,Rt(async i=>{await b1(i),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),H("div",_S,[c("form",vS,[c("fieldset",null,[c("div",xS,[CS,z(c("input",{id:"showOpenDirContextMenu",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.showOpenDirContextMenu=r)},null,512),[[ve,s.value.showOpenDirContextMenu]]),Q("    "),c("small",{onClick:o[1]||(o[1]=r=>s.value.hoverShowDirContextMenu=!s.value.hoverShowDirContextMenu),class:Ye(["ce-label",{"ce-label-success":s.value.hoverShowDirContextMenu}]),title:"鼠标悬浮在按钮代替点击操作"},me(s.value.hoverShowDirContextMenu?"✓ 鼠标悬浮触发(已启用)":"× 鼠标悬浮触发(未启用)"),3),$S]),c("div",ES,[kS,z(c("input",{id:"sizeSorter",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>s.value.sizeSorter=r)},null,512),[[ve,s.value.sizeSorter]]),SS]),c("div",AS,[PS,z(c("input",{id:"sizeSorterDirAttrInterval",type:"number","onUpdate:modelValue":o[3]||(o[3]=r=>s.value.sizeSorterDirAttrInterval=r),min:"50",max:"999999"},null,512),[[He,s.value.sizeSorterDirAttrInterval]]),Q(" 毫秒 "),IS]),c("div",TS,[LS,z(c("input",{id:"showSha1",type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>s.value.showSha1=r)},null,512),[[ve,s.value.showSha1]]),OS]),c("div",DS,[MS,z(c("input",{id:"showFolderSizeButton",type:"checkbox","onUpdate:modelValue":o[5]||(o[5]=r=>s.value.showFolderSizeButton=r)},null,512),[[ve,s.value.showFolderSizeButton]]),RS]),c("div",NS,[BS,z(c("input",{id:"showCopyButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[6]||(o[6]=r=>s.value.showCopyButtonOnPathBar=r)},null,512),[[ve,s.value.showCopyButtonOnPathBar]]),FS]),c("div",US,[jS,z(c("input",{id:"showGotoButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[7]||(o[7]=r=>s.value.showGotoButtonOnPathBar=r)},null,512),[[ve,s.value.showGotoButtonOnPathBar]]),HS]),c("div",qS,[zS,z(c("input",{id:"noUpdateDirAfterRename",type:"checkbox","onUpdate:modelValue":o[8]||(o[8]=r=>s.value.noUpdateDirAfterRename=r)},null,512),[[ve,s.value.noUpdateDirAfterRename]]),VS]),c("div",WS,[KS,z(c("input",{id:"noUpdateDirAfterMove",type:"checkbox","onUpdate:modelValue":o[9]||(o[9]=r=>s.value.noReloadAfterMove=r)},null,512),[[ve,s.value.noReloadAfterMove]]),GS])]),c("fieldset",null,[c("div",YS,[JS,z(c("select",{id:"fileSelectorDefaultView","onUpdate:modelValue":o[10]||(o[10]=r=>s.value.fileSelectorDefaultView=r)},QS,512),[[ai,s.value.fileSelectorDefaultView]]),XS])])])]))}}),D5="",gh=st.search;function eA(e){return{showSelectTargetButtonOnPathBar:!0,...e}}async function yh(){const e=eA(),t=await Ze.get(gh,e);return{...e,...t}}async function tA(e){await Ze.set(gh,e)}const nA={class:"ce-config ce-search-config"},sA={class:"pure-form pure-form-aligned"},iA={class:"pure-control-group"},oA=c("label",{for:"showSelectTargetButtonOnPathBar"},"显示选择目标目录按钮",-1),rA=c("div",{class:"pure-form-message text-success"}," 在路径栏显示选择目标目录按钮。即可以在搜索结果页直接选择其他目录进行搜索,而不必返回列表页进入目录后再搜索。 ",-1),aA=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>yh()),t=await t,n(),t));return Pt(async()=>{}),dt(s,Rt(async i=>{await tA(i),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.searchConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),H("div",nA,[c("form",sA,[c("fieldset",null,[c("div",iA,[oA,z(c("input",{id:"showSelectTargetButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.showSelectTargetButtonOnPathBar=r)},null,512),[[ve,s.value.showSelectTargetButtonOnPathBar]]),rA])])])]))}}),M5="";async function lA(e){const t=`https://qrcodeapi.115.com/api/1.0/${e}/1.0/token/`;return(await fetch(t)).json()}const cA={[0]:"等待扫码",[1]:"已扫码",[2]:"登录成功",[-1]:"已失效",[-2]:"已取消"};let Vl=new AbortController;async function uA(){Vl.abort()}async function dA(e){const t=new URLSearchParams;t.append("uid",e.uid),t.append("time",e.time.toString()),t.append("sign",e.sign);const n="https://qrcodeapi.115.com/get/status/?"+t.toString();return Vl=new AbortController,(await fetch(n,{signal:Vl.signal})).json()}function fA(e){return{domain:"",hostOnly:!1,httpOnly:!0,name:"",path:"",sameSite:"",secure:!1,session:!1,storeId:"0",value:"",id:0,...e}}async function pA(e){return`UID=${e.UID}; CID=${e.CID}; SEID=${e.SEID}`}async function hA(e,t=[]){const n=[],s=Object.keys(e);let i=["115.com",...t];i=[...new Set(i)];const o={hostOnly:!1,httpOnly:!0,path:"/",sameSite:"unspecified",secure:!1,session:!1,storeId:"0"};let r=1;for(let a=0;a<s.length;a++){const l=s[a],u=[];for(const f of i)u.push(fA({...o,name:l,value:e[l],domain:f,id:r++}));n.push(...u)}return n}async function mA(e,t){const n=new FormData;n.append("app",t),n.append("account",e);const s=`https://passportapi.115.com/app/1.0/${t}/1.0/login/qrcode/`;return(await fetch(s,{method:"POST",body:n})).json()}async function gA(e,t){const n=`https://qrcodeapi.115.com/api/1.0/web/1.0/qrcode?uid=${t}`;return(await fetch(n)).blob()}var Wl=(e=>(e.web="web",e.android="android",e._115android="115android",e.ios="ios",e._115ipad="115ipad",e.tv="tv",e.alipaymini="alipaymini",e.wechatmini="wechatmini",e.qandroid="qandroid",e._115ios="115ios",e.harmony="harmony",e.ipad="ipad",e.qios="qios",e.qipad="qipad",e.linux="linux",e.mac="mac",e.windows="windows",e))(Wl||{});const yA={web:"网页版",android:"115生活(Android端)",["115android"]:"115(Android端)",ios:"115生活(iOS端)",["115ipad"]:"115(iPad端)",tv:"115网盘(Android电视端)",alipaymini:"115生活(支付宝小程序)",wechatmini:"115生活(微信小程序)",qandroid:"115管理(Android端)",["115ios"]:"115(iOS端)",harmony:"115(Harmony端) - 不能上传下载"};async function wA(e,t){return new Promise((n,s)=>{const i=new FileReader;i.onloadend=()=>{if(typeof i.result=="string"){if(t instanceof HTMLImageElement)t.src=i.result;else{const o=document.createElement("img");o.src=i.result,t.appendChild(o)}n()}else console.error("[renderQrcode]","reader.result is not string!"),s("reader.result is not string!")},i.onerror=o=>{console.error("[renderQrcode]",o),s(o)},i.readAsDataURL(e)})}async function bA(e){document.addEventListener("qrcodeStatusChange",t=>{const n=t.detail;e(n)})}async function _A(e){const t=new CustomEvent("qrcodeStatusChange",{detail:e});document.dispatchEvent(t)}async function vA(e,t,n=6e4){return new Promise(async(s,i)=>{console.log("[qrcodeLogin]",e,t,n);const o=await lA(e),r=await gA(e,o.data.uid);await wA(r,t);let a=!0,l=setTimeout(()=>{a=!1,i("[qrcode login] timeout!")},n),u="";for(;a;)try{const h=(await dA(o.data)).data.status;if(_A(h),h===0)console.log(`[qrcode login] status=${h} - waiting.`);else if(h===1)console.log(`[qrcode login] status=${h} - scanned.`);else if(h===2){console.log(`[qrcode login] status=${h} - signed.`);break}else if(h===-1){clearTimeout(l),u=`[qrcode login] status=${h} - expired.`;break}else if(h===-2){clearTimeout(l),u=`[qrcode login] status=${h} - canceled.`;break}}catch(f){console.error("[qrcode login]",f),u=f;break}clearTimeout(l),u?i(u):s(mA(o.data.uid,e))})}const wh=st.tools;function xA(e){return{scanApp:Wl.alipaymini,...e}}async function CA(){const e=xA(),t=await Ze.get(wh,e);return{...e,...t}}async function $A(e){await Ze.set(wh,e)}const EA={class:"ce-tools-item"},kA={class:"pure-form pure-form-aligned"},SA=c("legend",null,"扫码获取Cookie",-1),AA={class:"pure-control-group"},PA=["disabled"],IA=["value"],TA=["disabled"],LA={key:0,class:"text-warning text-bold"},OA={key:1},DA=c("div",{class:"text-danger"},"扫码登录后,所选设备之前的登录将会失效,所以请尽量选不常用的。",-1),MA=c("div",{class:"text-primary"},"请注意,扫码得到的Cookie会跟随发起扫码的设备,如果发起扫码的设备退出登录,扫码得到的Cookie也会随之失效。",-1),RA=c("div",{class:"text-success"},"如要避免上述问题,可以考虑使用手机验证码登录小程序并获取其Cookie。",-1),NA={class:"pure-control-group"},BA=Ne({__name:"GetCookie",props:{app:null},emits:["app-change"],setup(e,{emit:t}){const s=ue(e.app),i=ue(!1),o=ue(!1),r=ue(!1),a=ue(),l=6e4,u=ue(),f=cn(()=>u.value?cA[u.value]:""),h=cn(()=>{const I=[Wl.harmony],P={};for(const[V,oe]of Object.entries(yA))I.includes(V)||(P[V]=oe);return P});dt(s,I=>{t("app-change",I),_()}),Pt(async()=>{}),It(async()=>{await bA(E)});async function y(){await _();try{const I=document.querySelector("#ceGetCookieQrcode"),P=await vA(s.value,I,l);a.value=P.data}catch(I){if(console.error(I),I.name==="AbortError")return;fe.fire({icon:"error",title:"扫码失败",text:I.toString()})}finally{i.value=!1,o.value=!1,u.value=void 0}}async function _(){a.value=void 0,o.value=!1,r.value=!1,i.value=!1,u.value=void 0,await M()}async function b(){o.value=!0}async function E(I){console.log("[handleStatusChange]",I),u.value=I}async function T(I){var oe;const P=(oe=a.value)==null?void 0:oe.cookie;if(!P)return;let V="";if(I==="text")V=await pA(P);else if(I==="json"){const j=await hA(P);V=JSON.stringify(j,null,2)}Bm(V),Ti.fire({icon:"success",title:"已复制到剪贴板",timer:1500})}async function M(){await uA()}return(I,P)=>(N(),H("div",EA,[c("form",kA,[c("fieldset",null,[SA,c("div",AA,[z(c("select",{"onUpdate:modelValue":P[0]||(P[0]=V=>s.value=V),disabled:i.value},[(N(!0),H(Fe,null,nt(de(h),(V,oe)=>(N(),H("option",{value:oe,key:oe},me(V),9,IA))),128))],8,PA),[[ai,s.value]]),Q("    "),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:y,disabled:i.value}," 开始 ",8,TA),Q("    "),de(f)?(N(),H("span",LA,me(de(f)),1)):Ue("",!0),a.value?(N(),H("span",OA,[Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:P[1]||(P[1]=V=>T("text"))}," 复制文本格式Cookie "),Q("    "),c("button",{type:"button",class:"pure-button button-success",onClick:P[2]||(P[2]=V=>T("json"))}," 复制JSON格式Cookie ")])):Ue("",!0)]),DA,MA,RA,z(c("div",NA,[c("img",{id:"ceGetCookieQrcode",alt:"qrcode",onLoad:b},null,32)],512),[[Lt,o.value]])])])]))}}),FA={class:"ce-tools-item"},UA={class:"pure-form pure-form-aligned"},jA=c("legend",null,"文件清理",-1),HA={class:"pure-control-group"},qA=c("div",{class:"ce-tips"},"根据后缀、大小和名称等条件进行文件清理。请在「网盘」页中点击以下按钮。",-1),zA=c("br",null,null,-1),VA={class:"pure-control-group"},WA=c("div",{class:"ce-tips"},"尽快找到空文件夹进行清理。请在「网盘」页中点击以下按钮。",-1),KA=Ne({__name:"Cleaner",setup(e){async function t(s,i){s&&(await n(),await mt(1e3)),window.postMessage({event:ct.closeConfig}),postMessage({type:i==="Cleaner"?Ot.OPEN_CLEANER:Ot.OPEN_EMPTY_CLEANER})}async function n(){return new Promise(async(s,i)=>{unsafeWindow.parent.Core.FileSelectDG.Open((o,r)=>{console.log("[Core.FileSelectDG.Open]",o,r);const a=o[o.length-1],l=unsafeWindow.parent.wangpan;try{l.Main.GotoDir(1,a.cid,0,""),s()}catch(u){fe.fire({icon:"error",title:"打开文件夹失败",text:`请在文件列表页面中打开!不要在离线任务之类的页面打开。异常: ${u.toString()}`})}},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"打开清理工具",select_txt:"清理"})})}return(s,i)=>(N(),H("div",FA,[c("form",UA,[c("fieldset",null,[jA,c("div",HA,[qA,c("button",{type:"button",class:"pure-button button-success",onClick:i[0]||(i[0]=o=>t(!1,"Cleaner"))}," 清理当前文件夹 "),Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:i[1]||(i[1]=o=>t(!0,"Cleaner"))}," 清理指定文件夹 ")]),zA,c("div",VA,[WA,c("button",{type:"button",class:"pure-button button-warning",onClick:i[2]||(i[2]=o=>t(!1,"EmptyCleaner"))}," 清理当前文件夹下的空文件夹 "),Q("      "),c("button",{type:"button",class:"pure-button button-warning",onClick:i[3]||(i[3]=o=>t(!0,"EmptyCleaner"))}," 清理指定文件夹下的空文件夹 ")])])])]))}}),GA={class:"ce-config ce-tools-config"},YA={class:"item"},JA=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>CA()),t=await t,n(),t));Pt(async()=>{}),dt(s,Rt(async o=>{await $A(o),window.postMessage({event:ct.toolsConfigChange,body:JSON.parse(JSON.stringify(o))})},100),{deep:!0});async function i(o){s.value.scanApp=o}return(o,r)=>(N(),H("div",GA,[c("div",YA,[Ce(BA,{app:s.value.scanApp,onAppChange:i},null,8,["app"]),Ce(KA)])]))}}),R5="",QA={class:"menu-config-block menu-basic-config"},XA={class:"pure-form pure-form-stacked"},ZA=c("legend",null,"全局设置",-1),eP={class:"pure-control-group"},tP=c("label",{for:"basic_enabled"},"启用",-1),nP={class:"pure-control-group"},sP=c("label",{for:"basic_hideSelectionMenuLabel"},"隐藏顶部菜单文本",-1),iP={class:"pure-control-group"},oP=c("label",{for:"basic_enableInSearch"},"在搜索结果页中启用",-1),rP={class:"pure-control-group"},aP=c("label",{for:"basic_manageOfficialMenus"},"控制官方菜单",-1),lP={class:"pure-control-group"},cP=c("label",{for:"basic_forceManualBeforeOpenOnKey"},"强制使用手动输入模式的辅助键",-1),uP=["value"],dP={class:"pure-control-group"},fP=c("label",{for:"basic_m3u8TempDirName"},"M3U8临时目录",-1),pP=Ne({__name:"BasicConfig",props:{config:null},setup(e,{emit:t}){const n=e;async function s(i){const r={keyToTriggerManual:"在按下该按键时点击菜单项,会触发手动输入模式,此时会打开一个输入框,修改文本后,点击「确定」或按下Ctrl+Enter,即可继续完成菜单项的操作。",m3u8TempDir:"「M3U8临时目录」用于临时存放生成的m3u8文件。在选中多个视频文件后,在顶部菜单栏会有一个「播放」菜单项,点击后会生成对应的m3u8文件,然后调用播放器播放这个m3u8以实现播放多个视频的效果。"}[i];r&&fe.fire({html:r})}return(i,o)=>(N(),H("div",QA,[c("form",XA,[c("fieldset",null,[ZA,c("div",eP,[tP,z(c("input",{id:"basic_enabled",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>n.config.enabled=r)},null,512),[[ve,n.config.enabled]])]),c("div",nP,[sP,z(c("input",{id:"basic_hideSelectionMenuLabel",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>n.config.hideSelectionMenuLabel=r)},null,512),[[ve,n.config.hideSelectionMenuLabel]])]),c("div",iP,[oP,z(c("input",{id:"basic_enableInSearch",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>n.config.enableInSearch=r)},null,512),[[ve,n.config.enableInSearch]])]),c("div",rP,[aP,z(c("input",{id:"basic_manageOfficialMenus",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=r=>n.config.manageOfficialMenus=r)},null,512),[[ve,n.config.manageOfficialMenus]])]),c("div",lP,[cP,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:o[4]||(o[4]=r=>s("keyToTriggerManual"))},"说明"),z(c("select",{id:"basic_forceManualBeforeOpenOnKey","onUpdate:modelValue":o[5]||(o[5]=r=>n.config.keyToTriggerManual=r)},[(N(!0),H(Fe,null,nt(de(mn),(r,a)=>(N(),H("option",{key:a,value:a},me(r),9,uP))),128))],512),[[ai,n.config.keyToTriggerManual]])]),c("div",dP,[fP,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:o[6]||(o[6]=r=>s("m3u8TempDir"))},"说明"),z(c("input",{id:"basic_m3u8TempDirName","onUpdate:modelValue":o[7]||(o[7]=r=>n.config.m3u8TempDir=r)},null,512),[[He,n.config.m3u8TempDir]])])])])]))}}),N5="",hP={class:"menu-config-block"},mP={class:"pure-form pure-form-stacked"},gP=c("label",{for:"listItemHover_enabled"},"启用",-1),yP=c("label",{for:"listItemHover_openInNewTab"},"新标签页打开",-1),wP=c("label",{for:"listItemHover_search",class:"text-primary"},"搜索",-1),bP=c("label",{for:"listItemHover_play",class:"text-primary"},"播放",-1),_P=c("label",{for:"listItemHover_copyFileName"},"名称路径",-1),vP=c("label",{for:"listItemHover_exportList"},"导出列表数据",-1),xP=c("label",{for:"listItemHover_viewInCloudDrive"},"在CloudDrive中查看",-1),CP=Ne({__name:"ListItemHoverConfig",props:{config:null},setup(e){return(t,n)=>(N(),H("div",hP,[c("form",mP,[c("fieldset",null,[c("legend",null,me(de(xi).listItemHover),1),c("div",null,[gP,z(c("input",{id:"listItemHover_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[ve,e.config.enabled]])]),c("div",null,[yP,z(c("input",{id:"listItemHover_openInNewTab",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.openInNewTab=s)},null,512),[[ve,e.config.openInNewTab]])]),c("div",null,[wP,z(c("input",{id:"listItemHover_search",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.search=s)},null,512),[[ve,e.config.search]])]),c("div",null,[bP,z(c("input",{id:"listItemHover_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=s=>e.config.play=s)},null,512),[[ve,e.config.play]])]),c("div",null,[_P,z(c("input",{id:"listItemHover_copyFileName",type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=s=>e.config.copyNames=s)},null,512),[[ve,e.config.copyNames]])]),c("div",null,[vP,z(c("input",{id:"listItemHover_exportList",type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=s=>e.config.exportList=s)},null,512),[[ve,e.config.exportList]])]),c("div",null,[xP,z(c("input",{id:"listItemHover_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":n[6]||(n[6]=s=>e.config.viewInCloudDrive=s)},null,512),[[ve,e.config.viewInCloudDrive]])])])])]))}}),$P={class:"menu-config-block"},EP={class:"pure-form pure-form-stacked"},kP=c("label",{for:"listItemContext_enabled"},"启用",-1),SP=c("label",{for:"listItemContext_copyFileName"},"名称路径",-1),AP=c("label",{for:"listItemContext_viewInCloudDrive"},"在CloudDrive中查看",-1),PP=Ne({__name:"ListItemContextConfig",props:{config:null},setup(e){return(t,n)=>(N(),H("div",$P,[c("form",EP,[c("fieldset",null,[c("legend",null,me(de(xi).listItemContext),1),c("div",null,[kP,z(c("input",{id:"listItemContext_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[ve,e.config.enabled]])]),c("div",null,[SP,z(c("input",{id:"listItemContext_copyFileName",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.copyNames=s)},null,512),[[ve,e.config.copyNames]])]),c("div",null,[AP,z(c("input",{id:"listItemContext_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.viewInCloudDrive=s)},null,512),[[ve,e.config.viewInCloudDrive]])])])])]))}}),IP={class:"menu-config-block"},TP={class:"pure-form pure-form-stacked"},LP=c("label",{for:"selection_enabled"},"启用",-1),OP=c("label",{for:"selection_moveToSelfNameDir"},"移动到同名目录",-1),DP=c("label",{for:"selection_copyFileName"},"名称路径",-1),MP=c("label",{for:"selection_play"},"播放",-1),RP=Ne({__name:"SelectionConfig",props:{config:null},setup(e){return(t,n)=>(N(),H("div",IP,[c("form",TP,[c("fieldset",null,[c("legend",null,me(de(xi).selection),1),c("div",null,[LP,z(c("input",{id:"selection_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[ve,e.config.enabled]])]),c("div",null,[OP,z(c("input",{id:"selection_moveToSelfNameDir",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.moveToSelfNameDir=s)},null,512),[[ve,e.config.moveToSelfNameDir]])]),c("div",null,[DP,z(c("input",{id:"selection_copyFileName",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.copyNames=s)},null,512),[[ve,e.config.copyNames]])]),c("div",null,[MP,z(c("input",{id:"selection_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=s=>e.config.play=s)},null,512),[[ve,e.config.play]])])])])]))}}),NP={class:"menu-config-block"},BP={class:"pure-form pure-form-stacked"},FP=c("label",{for:"dirContext_enabled"},"启用",-1),UP=c("label",{for:"dirContext_rename"},"重命名",-1),jP=c("label",{for:"dirContext_delete"},"删除",-1),HP=c("label",{for:"dirContext_play"},"播放全部",-1),qP=c("label",{for:"dirContext_copyFileName"},"名称路径",-1),zP=c("label",{for:"dirContext_move"},"移动",-1),VP=c("label",{for:"dirContext_copy"},"复制",-1),WP=c("label",{for:"dirContext_copyTo"},"复制到",-1),KP=c("label",{for:"dirContext_viewProperties"},"查看属性",-1),GP=c("label",{for:"dirContext_showSubFolderSize"},"子文件夹大小",-1),YP=c("label",{for:"dirContext_exportList"},"导出列表数据",-1),JP=c("label",{for:"dirContext_viewInCloudDrive"},"在CloudDrive中查看",-1),QP=Ne({__name:"DirContextConfig",props:{config:null},setup(e){async function t(){const n="当前目录右键菜单的打开方式: <br>1.右键单击文件列表表头;<br>2.右键单击文件列表空白处。";fe.fire({html:n,customClass:"ce-swal-text-left"})}return(n,s)=>(N(),H("div",NP,[c("form",BP,[c("fieldset",null,[c("legend",null,[Q(me(de(xi).dirContext)+" ",1),c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:t},"说明")]),c("div",null,[FP,z(c("input",{id:"dirContext_enabled",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=i=>e.config.enabled=i)},null,512),[[ve,e.config.enabled]])]),c("div",null,[UP,z(c("input",{id:"dirContext_rename",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=i=>e.config.rename=i)},null,512),[[ve,e.config.rename]])]),c("div",null,[jP,z(c("input",{id:"dirContext_delete",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=i=>e.config.delete=i)},null,512),[[ve,e.config.delete]])]),c("div",null,[HP,z(c("input",{id:"dirContext_play",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=i=>e.config.play=i)},null,512),[[ve,e.config.play]])]),c("div",null,[qP,z(c("input",{id:"dirContext_copyFileName",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=i=>e.config.copyNames=i)},null,512),[[ve,e.config.copyNames]])]),c("div",null,[zP,z(c("input",{id:"dirContext_move",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=i=>e.config.move=i)},null,512),[[ve,e.config.move]])]),c("div",null,[VP,z(c("input",{id:"dirContext_copy",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=i=>e.config.copy=i)},null,512),[[ve,e.config.copy]])]),c("div",null,[WP,z(c("input",{id:"dirContext_copyTo",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=i=>e.config.copyTo=i)},null,512),[[ve,e.config.copyTo]])]),c("div",null,[KP,z(c("input",{id:"dirContext_viewProperties",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=i=>e.config.viewProp=i)},null,512),[[ve,e.config.viewProp]])]),c("div",null,[GP,z(c("input",{id:"dirContext_showSubFolderSize",type:"checkbox","onUpdate:modelValue":s[9]||(s[9]=i=>e.config.showSubFolderSize=i)},null,512),[[ve,e.config.showSubFolderSize]])]),c("div",null,[YP,z(c("input",{id:"dirContext_exportList",type:"checkbox","onUpdate:modelValue":s[10]||(s[10]=i=>e.config.exportList=i)},null,512),[[ve,e.config.exportList]])]),c("div",null,[JP,z(c("input",{id:"dirContext_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":s[11]||(s[11]=i=>e.config.viewInCloudDrive=i)},null,512),[[ve,e.config.viewInCloudDrive]])])])])]))}}),XP={class:"official-menu-config"},ZP=c("div",{class:"ce-tips"},[c("p",null,"开启「菜单设置 - 全局设置 - 控制官方菜单」后才会生效。"),c("p",{class:"text-primary"},"该功能仅支持隐藏菜单。点击「隐藏」后刷新页面生效,如需取消请点击「取消隐藏」。")],-1),eI={class:"pure-form pure-form-stacked"},tI=["onClick"],nI=["onClick"],sI=Ne({__name:"OfficialMenuConfig",setup(e){const t=ue([]),n=ue(!1);Pt(async()=>{t.value=await up(),console.log("official menu groups",t.value,location.href)}),It(()=>{document.body.addEventListener("click",()=>{n.value||(n.value=!0)})}),dt(t,Rt(async o=>{if(!n.value)return;const r=await n0(o);await t0(r,!0),se({icon:"success",title:"官方菜单设置已保存,已生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(o){o.hidden=!o.hidden}async function i(o){const{isConfirmed:r}=await fe.fire({icon:"warning",html:`确认要重置分组「${o.label}」的隐藏状态吗?`,confirmButtonText:"确认",showDenyButton:!0,denyButtonText:"关闭"});!r||o.items.forEach(a=>{a.hidden=!1})}return(o,r)=>(N(),H("div",XP,[ZP,(N(!0),H(Fe,null,nt(t.value,(a,l)=>(N(),H("div",{key:l,class:"menu-config-block"},[c("form",eI,[c("fieldset",null,[c("legend",null,[Q(me(a.label)+" ",1),c("span",{class:"ce-label ce-label-warning",title:"取消该分组下全部的隐藏设置",onClick:u=>i(a)}," 重置 ",8,tI)]),(N(!0),H(Fe,null,nt(a.items,(u,f)=>(N(),H("div",{key:f,class:Ye({hidden:u.hidden})},[c("label",null,[Q(me(u.label)+" ",1),c("small",null,me(u.key),1)]),c("span",{class:"ce-toggle",onClick:h=>s(u)},me(u.hidden?"取消隐藏":"隐藏"),9,nI)],2))),128))])])]))),128))]))}}),B5="",iI={key:0,class:"ce-menu-config"},oI=c("div",{class:"ce-tips"},[c("p",null,"「搜索」功能菜单支持自定义,可在「搜索菜单」设置面板中添加和管理。"),c("p",null,"「播放」功能菜单支持自定义,可在「播放菜单」设置面板中添加和管理。")],-1),rI=c("hr",{class:"ce-hr"},null,-1),aI=c("h1",null,"官方菜单设置",-1),lI=Ne({__name:"MenuConfig",async setup(e){let t,n;const s=ue(([t,n]=en(()=>Ws()),t=await t,n(),t));return ue(!1),Pt(async()=>{}),dt(s,Rt(async i=>{await bb(i),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,o)=>s.value.enabled!==void 0?(N(),H("div",iI,[oI,Ce(pP,{config:s.value},null,8,["config"]),Ce(CP,{config:s.value.listItemHover},null,8,["config"]),Ce(PP,{config:s.value.listItemContext},null,8,["config"]),Ce(RP,{config:s.value.selection},null,8,["config"]),Ce(QP,{config:s.value.dirContext},null,8,["config"]),rI,c("div",null,[aI,c("div",null,[Ce(sI)])])])):Ue("",!0)}}),F5="",cI={class:"ce-custom-url"},uI={class:"pure-form pure-form-aligned"},dI={class:"ce-custom-url-index"},fI={class:"pure-control-group"},pI=c("label",null,"启用",-1),hI={class:"pure-control-group"},mI=c("label",null,"唯一标识",-1),gI={class:"pure-control-group"},yI=c("label",null,"显示名称",-1),wI={class:"pure-control-group"},bI=c("label",null,"图标",-1),_I={class:"pure-control-group"},vI={class:"pure-control-group"},xI=c("label",null,"后台打开",-1),CI={class:"pure-control-group"},$I=c("label",null,"备注",-1),EI={key:0,class:"pure-control-group"},kI=c("label",null,"Mutation",-1),bh=Ne({__name:"CustomUrl",props:{item:null,index:null},emits:["delete"],setup(e,{emit:t}){const n=ue(!0);function s(){t("delete")}async function i(){n.value=!n.value,n.value&&se({title:"已开启高级模式",text:"请谨慎修改,不正确的代码可能会导致脚本崩溃。",icon:"info",timer:2e3})}async function o(){window.postMessage({event:"customUrlHelp"},"*")}async function r(){const a=`
  <div style="text-align:left;">
    <p>自定义代码,用于生成最终的链接。</p><br>
    <p>代码会被包含在一个async匿名函数中执行,最终应该返回一个链接字符串。</p>
    <p>传入的参数名为「payload」,其结构如下:</p>
    <p>- url: 之前自动处理得到的链接</p>
    <p>- file:当前文件信息</p>
    <p>- customUrl:当前自定义规则信息</p>
    <p>- cloudDriveConfig:CloudDrive设置信息</p><br>
    <p>示例:</p>
    <pre style="text-align:left;font-size:12px;">
    const {
      url,
      file,
      customUrl,
      cloudDriveConfig
    } = payload
    const sth = await fetch(\`https://api.sth.com/foo?bar=\${file.pc}\`)
    return \`https://example.com/do?key=\${sth}\`
    </pre>
  </div>
  `;await fe.fire({title:"Mutation 说明",html:a,width:480,position:"top-start",backdrop:!1})}return(a,l)=>(N(),H("div",cI,[c("form",uI,[c("fieldset",null,[c("legend",null,[c("span",dI,"# "+me(e.index+1),1),c("button",{type:"button",class:"pure-button button-error button-small",onClick:s}," 删除 ")]),c("div",fI,[pI,z(c("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.item.enabled=u),type:"checkbox",id:"customUrl_enabled"},null,512),[[ve,e.item.enabled]])]),c("div",hI,[mI,z(c("input",{"onUpdate:modelValue":l[1]||(l[1]=u=>e.item.key=u),id:"customUrl_key",class:"pure-input-2-3",placeholder:"英文、数字或下划线"},null,512),[[He,e.item.key]])]),c("div",gI,[yI,z(c("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>e.item.label=u),id:"customUrl_label",class:"pure-input-2-3",placeholder:"菜单文本,尽量简洁"},null,512),[[He,e.item.label]])]),c("div",wI,[bI,z(c("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>e.item.icon=u),id:"customUrl_icon",class:"pure-input-2-3",placeholder:"图标class、图片链接或图片data:image"},null,512),[[He,e.item.icon]])]),c("div",_I,[c("label",{onDblclick:i}," 链接 ",32),z(c("textarea",{"onUpdate:modelValue":l[4]||(l[4]=u=>e.item.url=u),id:"customUrl_url",class:"pure-input-2-3",placeholder:"链接地址,支持变量,变量列表请点击右侧「查看变量」"},null,512),[[He,e.item.url]]),Q("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:o},"查看变量")]),c("div",vI,[xI,z(c("input",{"onUpdate:modelValue":l[5]||(l[5]=u=>e.item.openInBackground=u),id:"customUrl_openInBackground",type:"checkbox"},null,512),[[ve,e.item.openInBackground]])]),c("div",CI,[$I,z(c("input",{"onUpdate:modelValue":l[6]||(l[6]=u=>e.item.memo=u),id:"customUrl_memo",class:"pure-input-2-3"},null,512),[[He,e.item.memo]])]),n.value?(N(),H("div",EI,[kI,z(c("textarea",{"onUpdate:modelValue":l[7]||(l[7]=u=>e.item.mutation=u),id:"customUrl_mutation",class:"pure-input-2-3",placeholder:"自定义代码生成最终链接,具体请看右侧「查看说明」"},null,512),[[He,e.item.mutation]]),Q("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:r},"查看说明")])):Ue("",!0)])])]))}}),U5="",SI={class:"ce-config ce-search-urls ce-custom-urls"},AI={class:"ce-menu-urls-builtin"},PI={class:"pure-form pure-form-aligned"},II=["for"],TI=["id","onUpdate:modelValue"],LI={class:"text-info item-memo"},OI=["onClick"],DI={class:"ce-custom-urls-list"},MI={class:"ce-custom-urls-actions"},RI=["disabled"],NI=Ne({__name:"SearchUrls",async setup(e){let t,n;const s=ue(([t,n]=en(()=>Qf()),t=await t,n(),t)),i=ue(([t,n]=en(()=>Vs(Sn.search)),t=await t,n(),t));Pt(async()=>{}),dt(s,Rt(async f=>{const h=[];f.forEach(y=>{y.enabled&&h.push(y.key)}),await p1(h),se({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function o(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){se({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await pd(Sn.search,i.value),se({icon:"success",title:"保存成功!"})}async function r(f,h){const y=/^\w+$/;return f.key=f.key.trim(),y.test(f.key)?(f.label=f.label.trim(),f.label===""?(se({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(se({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(se({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(gt())}async function l(f,h){const{isConfirmed:y}=await fe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!y||(i.value.splice(h,1),await o(),se({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),y=`ce-url-item-denifition-${f.key}`,{isConfirmed:_}=await fe.fire({title:`「${f.label}」的定义`,html:`<h3>${f.memo}</h3>
      <pre id="${y}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(y).textContent=h}});!_||(navigator.clipboard.writeText(h),se({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(N(),H("div",SI,[c("h1",null,[Q("预置搜索菜单 "),z(c("small",null,"( "+me(s.value.length)+" )",513),[[Lt,s.value.length]])]),c("div",AI,[c("form",PI,[c("fieldset",null,[(N(!0),H(Fe,null,nt(s.value,(y,_)=>(N(),H("div",{key:_,class:"pure-control-group"},[c("label",{for:`builtin_${y.key}`},me(y.label),9,II),z(c("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":b=>y.enabled=b},null,8,TI),[[ve,y.enabled]]),Q("      "),c("span",LI,me(y.memo),1),Q("      "),c("button",{type:"button",class:"pure-button button-small",onClick:b=>u(y)},"查看定义",8,OI)]))),128))])])]),c("h1",null,[Q("自定义搜索菜单 "),z(c("small",null,"( "+me(i.value.length)+" )",513),[[Lt,i.value.length]])]),c("div",DI,[(N(!0),H(Fe,null,nt(i.value,(y,_)=>(N(),Zt(bh,{key:_,item:y,index:_,onDelete:b=>l(y,_)},null,8,["item","index","onDelete"]))),128))]),c("div",MI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:o,disabled:!i.value.length}," 保存自定义搜索菜单 ",8,RI),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义搜索菜单 ")])]))}}),j5="",BI={class:"ce-config ce-play-urls ce-custom-urls"},FI=c("div",{class:"ce-tips"},[c("p",null,[Q("支持常见的视频、音频和图片格式,也支持目录播放。预置播放菜单使用的链接变量是 "),c("b",null,"{clouddrive_stream_url}"),Q(" , 会根据文件或目录自动使用相应的链接。")]),c("p",null,"播放功能依赖CloudDrive,请先在「CloudDrive」设置面板中进行配置。")],-1),UI={class:"ce-menu-urls-builtin"},jI={class:"pure-form pure-form-aligned"},HI=["for"],qI=["id","onUpdate:modelValue"],zI={class:"text-info item-memo"},VI=["onClick"],WI=["innerHTML"],KI={class:"ce-custom-urls-list"},GI=c("div",{class:"ce-tips"}," 编辑后,请记得点击「保存自定义播放菜单」。 ",-1),YI={class:"ce-custom-urls-actions"},JI=["disabled"],QI=Ne({__name:"PlayUrls",async setup(e){let t,n;const s=ue(([t,n]=en(()=>mr()),t=await t,n(),t)),i=ue(([t,n]=en(()=>Vs(Sn.play)),t=await t,n(),t));Pt(async()=>{}),dt(s,Rt(async f=>{const h=[];f.forEach(y=>{y.enabled&&h.push(y.key)}),await h1(h),se({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function o(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){se({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await pd(Sn.play,i.value),se({icon:"success",title:"保存成功!"})}async function r(f,h){const y=/^\w+$/;return f.key=f.key.trim(),y.test(f.key)?(f.label=f.label.trim(),f.label===""?(se({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(se({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(se({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(gt())}async function l(f,h){const{isConfirmed:y}=await fe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!y||(i.value.splice(h,1),await o(),se({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),y=`ce-url-item-denifition-${f.key}`,{isConfirmed:_}=await fe.fire({title:`「${f.label}」的定义`,html:`<h3>${f.memo}</h3>
      <pre id="${y}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(y).innerText=h}});!_||(navigator.clipboard.writeText(h),se({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(N(),H("div",BI,[c("h1",null,[Q("预置播放菜单 "),z(c("small",null,"( "+me(s.value.length)+" )",513),[[Lt,s.value.length]])]),FI,c("div",UI,[c("form",jI,[c("fieldset",null,[(N(!0),H(Fe,null,nt(s.value,(y,_)=>(N(),H("div",{key:_,class:"pure-control-group"},[c("label",{for:`builtin_${y.key}`},me(y.label),9,HI),z(c("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":b=>y.enabled=b},null,8,qI),[[ve,y.enabled]]),Q("      "),c("span",zI,me(y.memo),1),Q("      "),c("button",{type:"button",class:"pure-button button-small",onClick:b=>u(y)},"查看定义",8,VI),y.extraMemo?(N(),H("span",{key:0,innerHTML:y.extraMemo,class:"extra-memo"},null,8,WI)):Ue("",!0)]))),128))])])]),c("h1",null,[Q("自定义播放菜单 "),z(c("small",null,"( "+me(i.value.length)+" )",513),[[Lt,i.value.length]])]),c("div",KI,[(N(!0),H(Fe,null,nt(i.value,(y,_)=>(N(),Zt(bh,{key:_,item:y,index:_,onDelete:b=>l(y,_)},null,8,["item","index","onDelete"]))),128))]),GI,c("div",YI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:o,disabled:!i.value.length}," 保存自定义播放菜单 ",8,JI),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义播放菜单 ")])]))}}),H5="",_h=st.anxia;function XI(e){return{defaultWebFull:!1,defaultOpenPlayList:!1,...e}}async function vh(){const e=XI(),t=await Ze.get(_h,e);return{...e,...t}}async function ZI(e){await Ze.set(_h,e)}const eT={class:"ce-config ce-anxia-config"},tT={class:"pure-form pure-form-aligned"},nT={class:"pure-control-group"},sT=c("label",{for:"defaultWebFull"},"自动网页全屏",-1),iT=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动使播放器网页全屏。")],-1),oT={class:"pure-control-group"},rT=c("label",{for:"defaultOpenPlayList"},"自动展开播放列表",-1),aT=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动展开播放列表。")],-1),lT=Ne({__name:"Config",async setup(e){let t,n;const s=ue(([t,n]=en(()=>vh()),t=await t,n(),t));return Pt(async()=>{}),dt(s,Rt(async i=>{await ZI(i),se({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),H("div",eT,[c("form",tT,[c("fieldset",null,[c("div",nT,[sT,z(c("input",{id:"defaultWebFull",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.defaultWebFull=r)},null,512),[[ve,s.value.defaultWebFull]]),iT]),c("div",oT,[rT,z(c("input",{id:"defaultOpenPlayList",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>s.value.defaultOpenPlayList=r)},null,512),[[ve,s.value.defaultOpenPlayList]]),aT])])])]))}}),q5="",xh=function(){return document.ontouchstart!==null?"click":"touchstart"},Hr="__vue_click_away__",Ch=function(e,t,n){$h(e);let s=n.context,i=t.value,o=!1;setTimeout(function(){o=!0},0),e[Hr]=function(r){if((!e||!e.contains(r.target))&&i&&o&&typeof i=="function")return i.call(s,r)},document.addEventListener(xh(),e[Hr],!1)},$h=function(e){document.removeEventListener(xh(),e[Hr],!1),delete e[Hr]},cT={mounted:Ch,updated:function(e,t,n){t.value!==t.oldValue&&Ch(e,t,n)},unmounted:$h},uT=Ne({__name:"Drawer",props:{isOpen:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:"600px"},speed:{type:Number,required:!1,default:100},backgroundColor:{type:String,required:!1,default:"#fafafa"}},emits:["close"],setup(e,{emit:t}){const n=e,s=ue(!1),i=ue(!1),o=a=>{const l=document.querySelector("body");l.style.overflow=a?"hidden":""},r=a=>{!a.target.classList.contains("ce-drawer__overlay")||i.value||t("close")};return It(()=>{s.value=n.isOpen}),dt(()=>n.isOpen,a=>{i.value=!0,a?(o(!0),s.value=!0):(o(!1),setTimeout(()=>s.value=!1,n.speed)),setTimeout(()=>i.value=!1,n.speed)}),(a,l)=>(N(),H("div",null,[c("div",{class:Ye(["ce-drawer",{"is-open":e.isOpen,"is-visible":s.value}])},[c("div",{class:"ce-drawer__overlay",style:An({transitionDuration:`${e.speed}ms`})},null,4),z((N(),H("div",{class:"ce-drawer__content",style:An({maxWidth:e.maxWidth,transitionDuration:`${e.speed}ms`,backgroundColor:e.backgroundColor})},[an(a.$slots,"default")],4)),[[de(cT),r]])],2)]))}}),V5="",dT={class:"ce-about"},fT=c("p",null,"115不大助手(以下简称「脚本」),是一个仅用于学习编程的小脚本。",-1),pT=c("br",null,null,-1),hT=c("p",null,"脚本不会收集您的任何个人信息。",-1),mT=c("p",null,"脚本仅借助了官方已有的功能,无任何破解行为。",-1),gT=c("p",null,"脚本代码本身已包含全部依赖,无任何远程引用。",-1),yT=c("br",null,null,-1),wT=c("br",null,null,-1),bT=c("br",null,null,-1),_T=c("hr",{class:"ce-hr"},null,-1),vT=["href"],xT=Ne({__name:"About",setup(e){const t={name:"115不大助手",version:"0.6.24",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};return(n,s)=>(N(),H("div",dT,[fT,pT,hT,mT,gT,yT,wT,bT,_T,c("div",null,[c("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[Q(me(de(t).name)+" ",1),c("small",null,"v"+me(de(t).version),1)],8,vT),Q("  "),c("small",null,"by "+me(de(t).author.name),1)])]))}}),CT={class:"ce-config-main"},$T={class:"ce-config-main-header"},ET=c("h1",null,"设置",-1),kT={class:"ce-intro"},ST=["href"],AT={class:"ce-config-main-body"},PT=Ne({__name:"Config",setup(e){const t={name:"115不大助手",version:"0.6.24",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"},n=ue(!1),s=ue(!1),i=ue();It(async()=>{window.addEventListener("message",u=>{const{event:f,body:h}=u.data;f===ct.openConfig&&(n.value||(n.value=!0),o(h)),f===ct.closeConfig&&r()},!1)});async function o(u){var f;s.value=!0,console.log("[openDrawer]",u),u&&(await ni(),(f=i.value)==null||f.selectTab(`#${u}`))}async function r(){s.value=!1}async function a(...u){console.log("[tabClicked]",u)}async function l(...u){console.log("[tabChanged]",u)}return(u,f)=>(N(),Zt(nf,null,{default:Je(()=>[c("div",CT,[Ce(uT,{"is-open":s.value,onClose:r,"max-width":"1030px",speed:500},{default:Je(()=>[c("div",$T,[ET,c("span",kT,[c("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[Q(me(de(t).name)+" ",1),c("small",null,"v"+me(de(t).version),1)],8,ST),Q("  "),c("small",null,"by "+me(de(t).author.name),1)]),c("div",{class:"ce-config-main-close",onClick:r},"关闭")]),c("div",AT,[Ce(de(u2),{ref_key:"refTabs",ref:i,options:{useUrlFragment:!1},onClicked:a,onChanged:l},{default:Je(()=>[Ce(de(fn),{id:de(Ht).basic,name:de(un).basic},{default:Je(()=>[Ce(X2)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).clouddrive,name:de(un).clouddrive},{default:Je(()=>[Ce(bS)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).list,name:de(un).list},{default:Je(()=>[Ce(ZS)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).search,name:de(un).search},{default:Je(()=>[Ce(aA)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).menus,name:de(un).menus},{default:Je(()=>[Ce(lI)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).searchMenus,name:de(un).searchMenus},{default:Je(()=>[Ce(NI)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).playMenus,name:de(un).playMenus},{default:Je(()=>[Ce(QI)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).offline,name:de(un).offline},{default:Je(()=>[Ce(yp)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).tools,name:de(un).tools},{default:Je(()=>[Ce(JA)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).anxia,name:de(un).anxia},{default:Je(()=>[Ce(lT)]),_:1},8,["id","name"]),Ce(de(fn),{id:de(Ht).about,name:de(un).about},{default:Je(()=>[Ce(xT)]),_:1},8,["id","name"])]),_:1},512)])]),_:1},8,["is-open"])])]),_:1}))}}),W5="",K5="";async function IT(){const{host:e}=location;!e.includes("115.com")||window.top===window.self&&(console.log("[Cloud115 Enhancer - main] running..."),TT(),OT(),LT())}async function TT(){console.log("[Cloud115 Enhancer - main] injectUI");const e="cloud115ConfigMain",t=document.createElement("div");t.id=e,document.body.appendChild(t),_n(PT).mount(`#${e}`),uo("设置",async()=>{window.postMessage({event:ct.openConfig})}),uo("扫码获取Cookie",async()=>{window.postMessage({event:ct.openConfig,body:Ht.tools})}),MT()}async function LT(){if(window!==window.parent)return;new MutationObserver(async([t])=>{t.type==="childList"&&window.postMessage({event:ct.topDomChanged})}).observe(document.body,{childList:!0})}async function OT(){const e=document.querySelector(".bottom-side .navigation-ceiling ul");if(!e){NT();return}const t=document.createElement("li"),n=document.createElement("a");n.href="javascript:;",n.style.textAlign="center",n.style.backgroundColor="#fefcea",n.style.padding="4px 10px 4px",n.addEventListener("click",async s=>{await qr()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function DT(){return!!document.querySelector("#js-login-box")}async function MT(){console.log("[handleLoginPage]"),await DT()&&(document.body.classList.add("ce-login-page"),RT())}async function RT(){console.log("[injectOpenConfigButtonOnLoginPage");const e=document.querySelector(".right-side a");if(!e){console.warn("[injectOpenConfigButtonOnLoginPage] '.right-side a' not found");return}const t=document.createElement("a");t.href="javascript:;",t.className="ce-entry",t.addEventListener("click",async s=>{await qr()}),t.title="打开「115不大助手」设置",t.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',e.insertAdjacentElement("beforebegin",t);const n=document.createElement("a");n.href="javascript:;",n.className="ce-entry",n.addEventListener("click",async s=>{await qr(Ht.tools)}),n.title="打开扫码获取Cookie",n.innerHTML='<i class="isn-scan"></i><span>扫码获取Cookie</span>',e.insertAdjacentElement("beforebegin",n)}async function NT(){const e=document.querySelector(".sub-footer ul");if(!e)return;const t=document.createElement("li"),n=document.createElement("a");n.href="javascript:;",n.addEventListener("click",async s=>{await qr()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function qr(e){window.postMessage({event:ct.openConfig,body:e})}const G5="";function Nn(e){return Array.isArray?Array.isArray(e):Sh(e)==="[object Array]"}const BT=1/0;function FT(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-BT?"-0":t}function UT(e){return e==null?"":FT(e)}function vn(e){return typeof e=="string"}function Eh(e){return typeof e=="number"}function jT(e){return e===!0||e===!1||HT(e)&&Sh(e)=="[object Boolean]"}function kh(e){return typeof e=="object"}function HT(e){return kh(e)&&e!==null}function Kt(e){return e!=null}function Kl(e){return!e.trim().length}function Sh(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y5="Extended search is not available",qT="Incorrect 'index' type",zT=e=>`Invalid value for key ${e}`,VT=e=>`Pattern length exceeds max of ${e}.`,WT=e=>`Missing ${e} property in key`,KT=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ah=Object.prototype.hasOwnProperty;class GT{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(s=>{let i=Ph(s);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(s=>{s.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ph(e){let t=null,n=null,s=null,i=1,o=null;if(vn(e)||Nn(e))s=e,t=Ih(e),n=Gl(e);else{if(!Ah.call(e,"name"))throw new Error(WT("name"));const r=e.name;if(s=r,Ah.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(KT(r));t=Ih(r),n=Gl(r),o=e.getFn}return{path:t,id:n,weight:i,src:s,getFn:o}}function Ih(e){return Nn(e)?e:e.split(".")}function Gl(e){return Nn(e)?e.join("."):e}function YT(e,t){let n=[],s=!1;const i=(o,r,a)=>{if(!!Kt(o))if(!r[a])n.push(o);else{let l=r[a];const u=o[l];if(!Kt(u))return;if(a===r.length-1&&(vn(u)||Eh(u)||jT(u)))n.push(UT(u));else if(Nn(u)){s=!0;for(let f=0,h=u.length;f<h;f+=1)i(u[f],r,a+1)}else r.length&&i(u,r,a+1)}};return i(e,vn(t)?t.split("."):t,0),s?n:n[0]}var Me={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:YT,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const JT=/[^ ]+/g;function QT(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(i){const o=i.match(JT).length;if(n.has(o))return n.get(o);const r=1/Math.pow(o,.5*e),a=parseFloat(Math.round(r*s)/s);return n.set(o,a),a},clear(){n.clear()}}}class Yl{constructor({getFn:t=Me.getFn,fieldNormWeight:n=Me.fieldNormWeight}={}){this.norm=QT(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,vn(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();vn(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Kt(t)||Kl(t))return;let s={v:t,i:n,n:this.norm.get(t)};this.records.push(s)}_addObject(t,n){let s={i:n,$:{}};this.keys.forEach((i,o)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!Kt(r)){if(Nn(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:u,value:f}=l.pop();if(!!Kt(f))if(vn(f)&&!Kl(f)){let h={v:f,i:u,n:this.norm.get(f)};a.push(h)}else Nn(f)&&f.forEach((h,y)=>{l.push({nestedArrIndex:y,value:h})})}s.$[o]=a}else if(vn(r)&&!Kl(r)){let a={v:r,n:this.norm.get(r)};s.$[o]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Th(e,t,{getFn:n=Me.getFn,fieldNormWeight:s=Me.fieldNormWeight}={}){const i=new Yl({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(Ph)),i.setSources(t),i.create(),i}function XT(e,{getFn:t=Me.getFn,fieldNormWeight:n=Me.fieldNormWeight}={}){const{keys:s,records:i}=e,o=new Yl({getFn:t,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(i),o}function zr(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=Me.distance,ignoreLocation:o=Me.ignoreLocation}={}){const r=t/e.length;if(o)return r;const a=Math.abs(s-n);return i?r+a/i:a?1:r}function ZT(e=[],t=Me.minMatchCharLength){let n=[],s=-1,i=-1,o=0;for(let r=e.length;o<r;o+=1){let a=e[o];a&&s===-1?s=o:!a&&s!==-1&&(i=o-1,i-s+1>=t&&n.push([s,i]),s=-1)}return e[o-1]&&o-s>=t&&n.push([s,o-1]),n}const Ts=32;function eL(e,t,n,{location:s=Me.location,distance:i=Me.distance,threshold:o=Me.threshold,findAllMatches:r=Me.findAllMatches,minMatchCharLength:a=Me.minMatchCharLength,includeMatches:l=Me.includeMatches,ignoreLocation:u=Me.ignoreLocation}={}){if(t.length>Ts)throw new Error(VT(Ts));const f=t.length,h=e.length,y=Math.max(0,Math.min(s,h));let _=o,b=y;const E=a>1||l,T=E?Array(h):[];let M;for(;(M=e.indexOf(t,b))>-1;){let X=zr(t,{currentLocation:M,expectedLocation:y,distance:i,ignoreLocation:u});if(_=Math.min(X,_),b=M+f,E){let le=0;for(;le<f;)T[M+le]=1,le+=1}}b=-1;let I=[],P=1,V=f+h;const oe=1<<f-1;for(let X=0;X<f;X+=1){let le=0,ge=V;for(;le<ge;)zr(t,{errors:X,currentLocation:y+ge,expectedLocation:y,distance:i,ignoreLocation:u})<=_?le=ge:V=ge,ge=Math.floor((V-le)/2+le);V=ge;let Le=Math.max(1,y-ge+1),_e=r?h:Math.min(y+ge,h)+f,L=Array(_e+2);L[_e+1]=(1<<X)-1;for(let G=_e;G>=Le;G-=1){let Se=G-1,D=n[e.charAt(Se)];if(E&&(T[Se]=+!!D),L[G]=(L[G+1]<<1|1)&D,X&&(L[G]|=(I[G+1]|I[G])<<1|1|I[G+1]),L[G]&oe&&(P=zr(t,{errors:X,currentLocation:Se,expectedLocation:y,distance:i,ignoreLocation:u}),P<=_)){if(_=P,b=Se,b<=y)break;Le=Math.max(1,2*y-b)}}if(zr(t,{errors:X+1,currentLocation:y,expectedLocation:y,distance:i,ignoreLocation:u})>_)break;I=L}const j={isMatch:b>=0,score:Math.max(.001,P)};if(E){const X=ZT(T,a);X.length?l&&(j.indices=X):j.isMatch=!1}return j}function tL(e){let t={};for(let n=0,s=e.length;n<s;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<s-n-1}return t}class Lh{constructor(t,{location:n=Me.location,threshold:s=Me.threshold,distance:i=Me.distance,includeMatches:o=Me.includeMatches,findAllMatches:r=Me.findAllMatches,minMatchCharLength:a=Me.minMatchCharLength,isCaseSensitive:l=Me.isCaseSensitive,ignoreLocation:u=Me.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(y,_)=>{this.chunks.push({pattern:y,alphabet:tL(y),startIndex:_})},h=this.pattern.length;if(h>Ts){let y=0;const _=h%Ts,b=h-_;for(;y<b;)f(this.pattern.substr(y,Ts),y),y+=Ts;if(_){const E=h-Ts;f(this.pattern.substr(E),E)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:s}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let b={isMatch:!0,score:0};return s&&(b.indices=[[0,t.length-1]]),b}const{location:i,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:u}=this.options;let f=[],h=0,y=!1;this.chunks.forEach(({pattern:b,alphabet:E,startIndex:T})=>{const{isMatch:M,score:I,indices:P}=eL(t,b,E,{location:i+T,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:s,ignoreLocation:u});M&&(y=!0),h+=I,M&&P&&(f=[...f,...P])});let _={isMatch:y,score:y?h/this.chunks.length:1};return y&&s&&(_.indices=f),_}}class as{constructor(t){this.pattern=t}static isMultiMatch(t){return Oh(t,this.multiRegex)}static isSingleMatch(t){return Oh(t,this.singleRegex)}search(){}}function Oh(e,t){const n=e.match(t);return n?n[1]:null}class nL extends as{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class sL extends as{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class iL extends as{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class oL extends as{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class rL extends as{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class aL extends as{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Dh extends as{constructor(t,{location:n=Me.location,threshold:s=Me.threshold,distance:i=Me.distance,includeMatches:o=Me.includeMatches,findAllMatches:r=Me.findAllMatches,minMatchCharLength:a=Me.minMatchCharLength,isCaseSensitive:l=Me.isCaseSensitive,ignoreLocation:u=Me.ignoreLocation}={}){super(t),this._bitapSearch=new Lh(t,{location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Mh extends as{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,s;const i=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,n))>-1;)n=s+o,i.push([s,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const Jl=[nL,Mh,iL,oL,aL,rL,sL,Dh],Rh=Jl.length,lL=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,cL="|";function uL(e,t={}){return e.split(cL).map(n=>{let s=n.trim().split(lL).filter(o=>o&&!!o.trim()),i=[];for(let o=0,r=s.length;o<r;o+=1){const a=s[o];let l=!1,u=-1;for(;!l&&++u<Rh;){const f=Jl[u];let h=f.isMultiMatch(a);h&&(i.push(new f(h,t)),l=!0)}if(!l)for(u=-1;++u<Rh;){const f=Jl[u];let h=f.isSingleMatch(a);if(h){i.push(new f(h,t));break}}}return i})}const dL=new Set([Dh.type,Mh.type]);class fL{constructor(t,{isCaseSensitive:n=Me.isCaseSensitive,includeMatches:s=Me.includeMatches,minMatchCharLength:i=Me.minMatchCharLength,ignoreLocation:o=Me.ignoreLocation,findAllMatches:r=Me.findAllMatches,location:a=Me.location,threshold:l=Me.threshold,distance:u=Me.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:i,findAllMatches:r,ignoreLocation:o,location:a,threshold:l,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=uL(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let o=0,r=[],a=0;for(let l=0,u=n.length;l<u;l+=1){const f=n[l];r.length=0,o=0;for(let h=0,y=f.length;h<y;h+=1){const _=f[h],{isMatch:b,indices:E,score:T}=_.search(t);if(b){if(o+=1,a+=T,s){const M=_.constructor.type;dL.has(M)?r=[...r,...E]:r.push(E)}}else{a=0,o=0,r.length=0;break}}if(o){let h={isMatch:!0,score:a/o};return s&&(h.indices=r),h}}return{isMatch:!1,score:1}}}const Ql=[];function pL(...e){Ql.push(...e)}function Xl(e,t){for(let n=0,s=Ql.length;n<s;n+=1){let i=Ql[n];if(i.condition(e,t))return new i(e,t)}return new Lh(e,t)}const Vr={AND:"$and",OR:"$or"},Zl={PATH:"$path",PATTERN:"$val"},ec=e=>!!(e[Vr.AND]||e[Vr.OR]),hL=e=>!!e[Zl.PATH],mL=e=>!Nn(e)&&kh(e)&&!ec(e),Nh=e=>({[Vr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Bh(e,t,{auto:n=!0}={}){const s=i=>{let o=Object.keys(i);const r=hL(i);if(!r&&o.length>1&&!ec(i))return s(Nh(i));if(mL(i)){const l=r?i[Zl.PATH]:o[0],u=r?i[Zl.PATTERN]:i[l];if(!vn(u))throw new Error(zT(l));const f={keyId:Gl(l),pattern:u};return n&&(f.searcher=Xl(u,t)),f}let a={children:[],operator:o[0]};return o.forEach(l=>{const u=i[l];Nn(u)&&u.forEach(f=>{a.children.push(s(f))})}),a};return ec(e)||(e=Nh(e)),s(e)}function gL(e,{ignoreFieldNorm:t=Me.ignoreFieldNorm}){e.forEach(n=>{let s=1;n.matches.forEach(({key:i,norm:o,score:r})=>{const a=i?i.weight:null;s*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:o))}),n.score=s})}function yL(e,t){const n=e.matches;t.matches=[],Kt(n)&&n.forEach(s=>{if(!Kt(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let r={indices:i,value:o};s.key&&(r.key=s.key.src),s.idx>-1&&(r.refIndex=s.idx),t.matches.push(r)})}function wL(e,t){t.score=e.score}function bL(e,t,{includeMatches:n=Me.includeMatches,includeScore:s=Me.includeScore}={}){const i=[];return n&&i.push(yL),s&&i.push(wL),e.map(o=>{const{idx:r}=o,a={item:t[r],refIndex:r};return i.length&&i.forEach(l=>{l(o,a)}),a})}class fi{constructor(t,n={},s){this.options={...Me,...n},this.options.useExtendedSearch,this._keyStore=new GT(this.options.keys),this.setCollection(t,s)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Yl))throw new Error(qT);this._myIndex=n||Th(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!Kt(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,i-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:r,ignoreFieldNorm:a}=this.options;let l=vn(t)?vn(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return gL(l,{ignoreFieldNorm:a}),o&&l.sort(r),Eh(n)&&n>-1&&(l=l.slice(0,n)),bL(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const n=Xl(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:r,n:a})=>{if(!Kt(o))return;const{isMatch:l,score:u,indices:f}=n.searchIn(o);l&&i.push({item:o,idx:r,matches:[{score:u,value:o,norm:a,indices:f}]})}),i}_searchLogical(t){const n=Bh(t,this.options),s=(a,l,u)=>{if(!a.children){const{keyId:h,searcher:y}=a,_=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:y});return _&&_.length?[{idx:u,item:l,matches:_}]:[]}const f=[];for(let h=0,y=a.children.length;h<y;h+=1){const _=a.children[h],b=s(_,l,u);if(b.length)f.push(...b);else if(a.operator===Vr.AND)return[]}return f},i=this._myIndex.records,o={},r=[];return i.forEach(({$:a,i:l})=>{if(Kt(a)){let u=s(n,a,l);u.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),u.forEach(({matches:f})=>{o[l].matches.push(...f)}))}}),r}_searchObjectList(t){const n=Xl(t,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:r,i:a})=>{if(!Kt(r))return;let l=[];s.forEach((u,f)=>{l.push(...this._findMatches({key:u,value:r[f],searcher:n}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:t,value:n,searcher:s}){if(!Kt(n))return[];let i=[];if(Nn(n))n.forEach(({v:o,i:r,n:a})=>{if(!Kt(o))return;const{isMatch:l,score:u,indices:f}=s.searchIn(o);l&&i.push({score:u,key:t,value:o,idx:r,norm:a,indices:f})});else{const{v:o,n:r}=n,{isMatch:a,score:l,indices:u}=s.searchIn(o);a&&i.push({score:l,key:t,value:o,norm:r,indices:u})}return i}}fi.version="7.0.0",fi.createIndex=Th,fi.parseIndex=XT,fi.config=Me,fi.parseQuery=Bh,pL(fL);const _L={class:"ce-goto-input-wrap"},vL=["disabled"],xL=["disabled"],CL={class:"ce-goto-sug"},$L=["onMousedown","sid"],EL={class:"ce-goto-sug-index"},kL={class:"ce-goto-sug-prefix"},SL=c("span",{class:"ce-goto-sep"},"/",-1),AL={class:"ce-goto-sug-name"},PL=Ne({__name:"GotoPath",setup(e){const t=ue(!1),n=ue(!1),s=ue(null),i=ue(null),o=ue(""),r=ue([]),a=ue(!1),l=cn(()=>o.value.trim().length>0);let u="";It(async()=>{var L;t.value=!0,(L=i.value)==null||L.focus(),window.addEventListener("message",async ie=>{if(ie.data.event===ct.listRendered){const Se=await vt(!1);Se!==u&&(r.value=[],await X(!1)),u=Se}})});async function f(L){if(console.log("[handleKeydown]",L.key),cd(L),L.key==="Enter"){V.value>-1?ge():await Le(o.value);return}if(L.key==="Escape"){await _e();return}["ArrowUp","ArrowDown"].includes(L.key)?oe(L):h(L)}const h=Rt(async L=>{y()},200);async function y(){try{r.value=[],await X(!1);const L={keyword:"",parentId:await vt(!1),parentPath:await Ta(),isSubOfCurrent:!0};console.log("[getSug] searchData:",L);const ie=await I(L,!1);if(console.log("[searchData] items:",ie),!ie.length){se({icon:"warning",text:"没有匹配的建议",timer:1500,position:"top-right"});return}const G=await _(ie,L);console.log("[searchData] sugs:",G),r.value=G,V.value=-1,await X(G.length>0)}catch(L){console.warn(L),await X(!1),se({icon:"error",text:L.toString(),timer:2e3,position:"top-right"})}}async function _(L,ie){const G=[];for(let B=0;B<L.length;B++){const ye=L[B];G.push({id:ye.id,prefix:ie.parentPath==="/"?"":ie.parentPath,name:ye.name,active:!1})}const Se=o.value.trim();if(!Se)return G;const D=/^(\.\/)?[^\/]+/.test(Se),Z=Ia(Se,"../");if(console.log("[toSug] isSubOfCurrent:",D,"kwParentPath:",Z),D||Z===ie.parentPath){const B=new fi(G,{keys:["name"],threshold:.6,includeScore:!0});let ye=Se;if(Z===ie.parentPath){const ce=Se.split(/[\\/]/).filter(Boolean);ye=ce[ce.length-1]}const Ee=B.search(ye);console.log("[toSug] fuse res:",Ee);let Oe=!1;return Ee.forEach(ce=>{ce.score===void 0?(console.warn("[toSug] r.score is undefined:",ce),Oe=!0,ce.score=0):ce.score!==void 0&&isNaN(ce.score)&&(console.warn("[toSug] r.score is NaN:",ce),Oe=!0,ce.score=0)}),Oe&&Ee.sort((ce,pe)=>ce.score-pe.score),Ee.map(ce=>ce.item)}return G}const b=new Map,E=new Map;async function T(L){return b.get(L)||!1}async function M(L,ie){b.set(L,ie)}async function I(L,ie){const G=E.get(L.parentPath);if(G)return console.log(`[getSubDirs] path "${L.parentPath}" is cached`),G.items;if(await T(L.parentPath))return console.warn(`[getSubDirs] path "${L.parentPath}" is loading`),[];await M(L.parentPath,!0);try{const Se=Hn({cid:L.parentId,limit:1150,show_dir:na.true}),D=await Qu(Se);if(!D.count)return[];const Z=[];for(let B=0;B<D.data.length;B++){const ye=await Ai(D.data[B]);if(ye.isDir)Z.push(ye);else if(ie)break}return E.set(L.parentPath,{count:Z.length,dirPath:L.parentPath,dirId:L.parentId,items:Z}),Z}catch(Se){console.warn(Se)}finally{await M(L.parentPath,!1)}return[]}async function P(L,ie){console.log("[handleSugClick]",L,ie);const G=Ao([L.prefix,L.name]);console.log("[handleSugClick] path:",G),await Le(G)}const V=ue(-1);async function oe(L){var D;console.log("[navigateSug]",L.key),L.preventDefault(),L.stopPropagation();let ie=V.value;if(L.key==="ArrowUp")ie--;else if(L.key==="ArrowDown")ie++;else if(L.key==="Enter"){const Z=r.value[V.value];Z&&await P(Z,L);return}else return;ie<0?ie=0:ie>=r.value.length&&(ie=r.value.length-1),V.value=ie,r.value.forEach((Z,B)=>{Z.active=B===ie});const G=r.value[ie];if(!G)return;const Se=(D=s.value)==null?void 0:D.querySelector(`[sid="${G.id}"]`);Se==null||Se.scrollIntoView()}async function j(){var L;o.value="",(L=i.value)==null||L.focus(),await y()}async function X(L){var ie;a.value=L,L&&((ie=i.value)==null||ie.focus())}async function le(L){if(Bw(L))return"0";const ie=await Ta();return L=Po(L,Vn.unix),L=Ia(ie,L,Vn.unix),await zs(L)}async function ge(){const L=r.value[V.value];if(!L)return;const ie=Ao([L.prefix,L.name],Vn.unix);console.log("[gotoByCurrentSug] path:",ie),await Le(ie)}async function Le(L){var ie;if(!n.value){L=L.trim(),se({text:"正在获取路径信息...",timer:0,position:"top-right"}),fe.showLoading(),n.value=!0;try{const G=await le(L);unsafeWindow.Main.GotoDir(1,G,0,""),se({icon:"success",text:"获取路径信息成功,现在打开...",timer:1e3,position:"top-right"}),(ie=i.value)==null||ie.focus(),r.value=[],V.value=-1}catch(G){fe.fire({icon:"error",title:"跳转失败",text:G.message})}finally{fe.hideLoading(),n.value=!1}}}async function _e(){if(V.value>-1)r.value.forEach(L=>L.active=!1),V.value=-1,await X(!1);else{const L=document.querySelector("#ceGotoPathApp");L==null||L.style.setProperty("display","none");const ie=document.querySelector(".ce-goto-path-active");ie==null||ie.classList.remove("ce-goto-path-active"),t.value=!1}}return(L,ie)=>(N(),H("div",{ref_key:"refMain",ref:s,class:Ye(["ce-goto-main",{"ce-goto-sug-shown":a.value}])},[c("div",_L,[z(c("input",{ref_key:"refInput",ref:i,"onUpdate:modelValue":ie[0]||(ie[0]=G=>o.value=G),class:"ce-goto-input",placeholder:"回车确认跳转 | Esc关闭 | 可搜索当前目录的子目录显示下拉列表,上下方向键选择",onKeydown:f},null,544),[[He,o.value]]),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"clear",onClick:j,title:"清空输入框",disabled:!de(l)},"清空",8,vL),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"toggle",onClick:ie[1]||(ie[1]=G=>X(!1)),title:"收起建议列表",disabled:!a.value},"收起",8,xL)]),c("div",CL,[(N(!0),H(Fe,null,nt(r.value,(G,Se)=>(N(),H("div",{key:Se,class:Ye(["ce-goto-sug-item",{active:G.active}]),onMousedown:e1(D=>P(G,D),["left","stop","prevent"]),sid:G.id},[c("span",EL,me(Se+1),1),c("span",kL,me(G.prefix),1),SL,c("span",AL,me(G.name),1)],42,$L))),128))])],2))}}),eR="";async function IL(){const e=await gr(),{host:t,search:n}=location;!/115\.com$/.test(t)||(console.log("[List] running...",e),(n.includes("ct=file")||n.includes("mode=search"))&&x1(),LL(e),TL(e),setTimeout(async()=>{await ML(),RL(e),NL(e)},2e3))}async function TL(e){const{fileSelectorDefaultView:t}=e;t&&(console.log("[setSelectorView]",t),unsafeWindow.localStorage.setItem("FS_view",t))}async function LL(e){const{host:t,search:n}=location;if(!n.includes("ct=file"))return;const s=await Cn("#js_top_header_file_path_box");e.showGotoButtonOnPathBar&&DL(e,s),e.showCopyButtonOnPathBar&&OL(e,s)}async function OL(e,t){const n="ceCopyPath";let s=t.querySelector(`#${n}`);const i=async()=>{const r=await Ta();tn(r),se({icon:"success",text:"路径已复制",timer:1e3,position:"top-right"})};s||(s=await(async()=>{const r=document.createElement("button");return r.className="pure-button button-mini ce-path-btn",r.id=n,r.title="复制路径",r.innerHTML="<span>复制</span>",r.addEventListener("click",i),r})(),t.prepend(s))}async function DL(e,t){const n=t.querySelector(".top-file-path"),s="ceGotoPath";let i=t.querySelector(`#${s}`);const o=_n(PL),r="ceGotoPathApp",a=async()=>{await l()},l=async()=>{if(t.classList.toggle("ce-goto-path-active"),t.classList.contains("ce-goto-path-active"))await u();else{const y=t.querySelector(`#${r}`);y&&(y.style.display="none")}},u=async()=>{let y=t.querySelector(`#${r}`);y||(y=await h(),n.after(y)),y.querySelector(".ce-goto-main")?setTimeout(()=>{const b=document.querySelector(".ce-goto-input");b==null||b.focus()},200):o.mount(y),y.style.display="block"},f=async()=>{const y=document.createElement("button");return y.className="pure-button button-mini ce-path-btn text-primary",y.id=s,y.title=`
      【这是一个实验功能】
      跳转到指定路径。使用:
      - 空白、单个斜杠: 根目录
      - 相对路径1: 开头不带斜杠,当前目录下的子路径
      - 相对路径2: 开头带有../,当前目录的上级目录,可以多级
      - 绝对路径: 开头带有斜杠,从根目录开始的路径

      斜杠风格不限,支持模糊搜索当前目录的子目录。
      回车键跳转,Esc键关闭输入框。`,y.innerHTML="<span>跳转</span>",y.addEventListener("click",a),y},h=async()=>{const y=document.createElement("div");return y.id=r,y.style.width="50%",y};i||(i=await f(),t.prepend(i))}async function ML(){if(window!==window.top)return;async function e(t){var s,i;const n=Jt();n&&((i=(s=n.Core)==null?void 0:s.FileConfig)==null?void 0:i.DataAPI)&&t(!0)}try{return await jn(e,250,3e4)}catch(t){throw new Error(`awaitDataAPI failed:${t.toString()}`)}}async function RL(e){if(!e.noUpdateDirAfterRename||window!==window.top)return;let t=!0,n="",s=!1;const i=Jt(),o=Core.FileReNameDG.Show,r=i.Core.Dir.Rename,a=i.Core.FileConfig.DataAPI.UpdateDir;i.Core.FileReNameDG.Show=async(...l)=>{n=l[0],s=!0,o(...l)},i.Core.Dir.Rename=async(...l)=>{n=l[1],s=!1,r(...l)},i.Core.FileConfig.DataAPI.UpdateDir=async l=>{if(t){const u=await Pi();let f=`li[file_id="${n}"]`;s||(f=`li[cate_id="${n}"]`);const h=u.find(f);if(h.length){if(h.hasClass("ce-temp-cur-dir")){console.warn("[list handleNoUpdateDirAfterRename] $file is ce-temp-cur-dir"),se({icon:"warning",text:"重命名的是当前目录,忽略「重命名后不刷新列表」选项"}),a(l);return}if(se({icon:"info",text:"启用了「重命名后不刷新列表」选项,不会刷新文件列表"}),h.find(".file-modified span").text("刚刚"),!s){const y=await kt(n),{file_name:_}=y;h.attr("cate_name",_),h.attr("title",_);const b=h.find(".file-name a.name");b.length?(b.attr("title",_).text(_),b.text(_)):console.warn("[list handleNoUpdateDirAfterRename] $name not found")}}else console.warn("[list handleNoUpdateDirAfterRename] $file not found")}else a(l)},window.addEventListener("message",async l=>{var f;if(l.data.event===ct.topDomChanged){const h=document.querySelector("div.dialog-box.window-current > div.dialog-header > h3");if(h&&((f=h.textContent)==null?void 0:f.includes("重命名"))){const y=document.querySelector("div.dialog-box.window-current .file-rename");if(!y){console.warn("[list handleNoUpdateDirAfterRename] .file-rename not found");return}const _=document.createElement("div"),b=`
          <div style="padding: 0px 20px;">
            <label style="font-size: 18px; color: #1890ff;">
              <input id="cbNoUpdateDir" type="checkbox" style="width: 22px; height: 22px; vertical-align: sub;"> 重命名后不刷新列表
            </label>
            <p style="font-size: 12px; color: #ff4949;">在使用当前目录增强菜单项「重命名文件夹」时会忽略该选项。</p>
          </div>`;_.innerHTML=b,y.insertAdjacentElement("afterend",_);const E=document.querySelector("#cbNoUpdateDir");E&&(E.checked=t,E.addEventListener("change",()=>{t=E.checked}))}}})}async function NL(e){if(!e.noReloadAfterMove||window!==window.top)return;let t=!0,n=[];const s=Jt(),i=s.Core.FileMenu.DoEvent,o=s.Core.FileConfig.DataAPI.Reload;s.Core.FileConfig.DataAPI.Reload=async(...r)=>{if(t){se({icon:"info",text:"启用了「移动后不刷新文本列表」选项,不会刷新文件列表"});for(let a=0;a<n.length;a++)dd(n[a][0])}else o(...r)},s.Core.FileMenu.DoEvent=async(...r)=>{n=r[0],i(...r)},window.addEventListener("message",async r=>{var l;if(r.data.event===ct.topDomChanged){const u=document.querySelector("div.dialog-box.window-current > div.dialog-header > h3");if(u&&((l=u.textContent)==null?void 0:l.includes("打开要移动"))){const f=document.querySelector("div.dialog-box.window-current .select-footer");if(!f){console.warn("[list handleNoUpdateDirAfterMove] .select-footer not found");return}let h=document.querySelector("#cbNoReload");if(!h){const y=document.createElement("div"),_=`
            <div style="padding: 6px 30px 0px;">
              <label style="font-size: 18px; color: #1890ff;">
                <input id="cbNoReload" type="checkbox" style="width: 22px; height: 22px; vertical-align: sub;"> 移动后不刷新列表
              </label>
              <p style="font-size: 14px; color: #ff4949;">启用该功能并且执行过移动操作后,会影响列表的全选功能,此时如需全选,请先手动刷新列表!</p>
            </div>`;y.innerHTML=_,f.insertAdjacentElement("afterend",y),h=document.querySelector("#cbNoReload"),h&&(h.checked=t,h.addEventListener("change",()=>{t=h.checked}))}}}})}const tR="";async function BL(){const e=await yh();!await Oa()||(console.log("[Search] running...",e),jL(),FL(e))}async function FL(e){const t=await Cn(".top-file-path");e.showSelectTargetButtonOnPathBar&&UL(e,t)}async function UL(e,t){console.log("[showSelectTargetButtonOnPathBar]");const n="ce-btn-select";let s=t.querySelector(`.${n}`);const i=async()=>{unsafeWindow.parent.Core.FileSelectDG.Open((r,a)=>{console.log("[Core.FileSelectDG.Open]",r,a);const l=r[r.length-1],u=document.createElement("a");u.href="javascript:;",u.className="dir-tab",u.textContent=l.cname,u.style.display="none",u.setAttribute("search_btn_file",l.cid),t.querySelector(".file-path").append(u),u.click()},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"在该目录下搜索",select_txt:"搜索"})};s||(s=await(async()=>{const r=document.createElement("a");return r.className=`dir-tab ${n}`,r.href="javascript:;",r.title="选择目录",r.textContent="选择目录",r.addEventListener("click",i),r})(),t.append(s))}async function jL(e){document.body.classList.add("ce-search-page"),parent.document.body.classList.add("ce-search-page")}const nR="";async function HL(){console.log("[Tools] running...")}const sR="";async function qL(){const{host:e,search:t}=location;if(!e.includes("anxia.com"))return;console.log("[anxia] run");const n=await vh();VL(n),WL(n),zL()}async function zL(e){const t=async s=>{const i=document.createElement("li");i.setAttribute("pickcode",s.pickCode),i.setAttribute("style","padding:0px;");const o=document.createElement("a");return o.href="/?hls=1&pickcode="+s.pickCode,o.setAttribute("style","height:auto;text-decoration:none;padding:5px 0 5px 5px;"),o.setAttribute("title",s.name),o.innerHTML='<span style="word-break:break-all">'+s.name+"</span>",i.appendChild(o),i};let n="";window.addEventListener("message",async s=>{if(s.data.event==="play"){const i=await Cn("ul#js-video_list"),o=s.data.body.id;if(n&&n===o)if(i.childElementCount){console.log(`[playSelected] same id: ${o} 但是播放列表已经渲染过了,忽略`);return}else console.warn(`[playSelected] same id: ${o} 但是播放列表为空,将会进行渲染`);n=o;const r=s.data.body.files;console.log(`[playSelected] id: ${o}, files: `,r);const a=await Promise.all(r.map(t));i==null||i.append(...a);const l=document.querySelector(".video-playlist .vpl-container");l&&(l.style.display="block");const u=i==null?void 0:i.querySelector("a");u==null||u.click();const f=document.querySelector("#js-video_container");f&&f.classList.remove("video-container-nolist")}})}async function VL(e){if(!e.defaultWebFull)return;const t=await Cn('[rel="web_fullscreen"]');t.querySelector('[rel="tooltips"]').innerText==="网页全屏"&&t.click()}async function WL(e){if(!e.defaultOpenPlayList)return;const t=await Cn("a#js_pl_control_expand");t.querySelector('[rel="tooltips"]').innerText==="展开播放列表"&&t.click()}function KL(e,t,n,s){return e<t||e>n?s:e}location.host==="115.com"&&(window.COMMONHEADERUSERINFO=window.COMMONHEADERUSERINFO||{}),(async()=>{console.log("Cloud115 Enhancer launched!");const e=await Ur(),t=Vu({rateLimit:{...zu,duration:1,points:KL(e.qps,1,9,4)}}),n=Wu(t);await xw(n),i0(),u$(),Wk(),r2(),IL(),BL(),HL(),qL(),IT()})()})();