// ==UserScript==
// @name 115+
// @namespace https://github.com/lvzhenbo/115-plus
// @version 1.1.2
// @author lvzhenbo
// @description 为115网盘添加一些功能
// @license MIT
// @icon https://115.com/favicon.ico
// @supportURL https://github.com/lvzhenbo/115-plus/issues
// @match https://115.com/*
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @require data:application/javascript,%3Bwindow.Vue%3DVue%3B
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.prod.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/BigInteger.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/crypto-js.min.js
// @connect proapi.115.com
// @connect v.anxia.com
// @grant GM_addStyle
// @grant GM_cookie
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// ==/UserScript==
(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const r=document.createElement("style");r.textContent=e,document.head.append(r)})(' @charset "UTF-8";.main[data-v-e1033040]{border-right:1px solid #edeeef;height:100%}.xgplayer.not-allow-autoplay .xgplayer-controls,.xgplayer.xgplayer-nostart .xgplayer-controls,.xgplayer.xgplayer-inactive .controls-autohide{pointer-events:none;visibility:hidden;cursor:default;opacity:0}.xgplayer.not-allow-autoplay .xgplayer-controls-initshow,.xgplayer.xgplayer-nostart .xgplayer-controls-initshow{pointer-events:auto;visibility:visible;opacity:1}.xgplayer .xgplayer-controls{display:block;position:absolute;visibility:visible;height:48px;left:0;right:0;bottom:0;opacity:1;z-index:10;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));transition:opacity .5s ease,visibility .5s ease}.xgplayer .xgplayer-controls.show{display:block;opacity:1;visibility:visible;pointer-events:auto}.xgplayer .xg-inner-controls{position:absolute;height:40px;bottom:0;justify-content:space-between;display:flex}.xgplayer .xg-left-grid,.xgplayer .xg-right-grid{position:relative;display:flex;flex-wrap:wrap;flex-shrink:1;height:100%;z-index:1}.xgplayer .xg-right-grid{flex-direction:row-reverse}.xgplayer .xg-right-grid>:first-child{margin-right:0}.xgplayer .xg-right-grid xg-icon{margin-left:0}.xgplayer .xg-left-grid>:first-child{margin-left:0}.xgplayer .xg-left-grid xg-icon{margin-right:0}.xgplayer .xg-center-grid{display:block;position:absolute;left:0;right:0;outline:none;top:-20px;padding:5px 0;text-align:center}.xgplayer .flex-controls .xg-inner-controls{justify-content:space-around;display:flex;bottom:8px}.xgplayer .flex-controls .xg-center-grid{display:flex;flex:1;position:relative;top:0;height:100%;justify-content:space-between;align-items:center;left:0;right:0;padding:0 16px}.xgplayer.xgplayer-mobile .xg-center-grid{z-index:2}.xgplayer.xgplayer-mobile .flex-controls .xg-center-grid{padding:0 8px}.xgplayer .bottom-controls .xg-center-grid{top:20px;padding:0}.xgplayer .bottom-controls .xg-left-grid,.xgplayer .bottom-controls .xg-right-grid{bottom:10px}.xgplayer .mini-controls{background-image:none}.xgplayer .mini-controls .xg-inner-controls{bottom:0;left:0;right:0}.xgplayer .mini-controls .xg-center-grid{bottom:-28px;top:auto;padding:0}.xgplayer .mini-controls .xg-left-grid,.xgplayer .mini-controls .xg-right-grid{display:none}.xgplayer .controls-follow{bottom:70px;transition:bottom .3s ease}.xgplayer.flex-controls .controls-follow{bottom:45px}.xgplayer.xgplayer-inactive .controls-follow,.xgplayer.no-controls .controls-follow,.xgplayer.mini-controls .controls-follow{bottom:10px}.xgplayer-fullscreen-parent{position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999}.xgplayer-fullscreen-parent .xgplayer.xgplayer-is-cssfullscreen,.xgplayer-fullscreen-parent .xgplayer.xgplayer-is-fullscreen{z-index:10;position:absolute}.xgplayer-rotate-parent{position:fixed;top:0;left:100%;bottom:0;right:0;width:100vh;height:100vw;z-index:9999;transform-origin:top left;transform:rotate(90deg)}.xgplayer-rotate-parent .xgplayer.xgplayer-rotate-fullscreen{position:absolute;top:0;left:0;z-index:10;margin:0;padding:0;width:100%;height:100%;transform:rotate(0)}.xgplayer-rotate-parent .xgplayer-mobile video{z-index:-1}.xgplayer{position:relative;width:100%;height:100%;overflow:hidden;font-family:PingFang SC,Helvetica Neue,Helvetica,STHeiTi,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;background:#000;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.xgplayer *{margin:0;padding:0;border:0;vertical-align:baseline;white-space:normal;word-wrap:normal;overflow-wrap:normal}.xgplayer ul,.xgplayer li{list-style:none}.xgplayer .xgplayer-none{display:none}.xgplayer.xgplayer-is-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:9999}.xgplayer.xgplayer-is-cssfullscreen{position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999}.xgplayer.xgplayer-rotate-fullscreen{position:fixed;top:0;left:100%;bottom:0;right:0;width:100vh;height:100vw;transform-origin:top left;transform:rotate(90deg);z-index:9999}.xgplayer.xgplayer-rotate-fullscreen.xgplayer-mobile video{z-index:-1}.xgplayer xg-video-container.xg-video-container{position:absolute;top:0;bottom:48px;display:block;width:100%}.xgplayer video{position:absolute;top:0;left:0;width:100%;height:100%;outline:none}.xgplayer[data-xgfill=contain] video{-o-object-fit:contain;object-fit:contain}.xgplayer[data-xgfill=cover] video{-o-object-fit:cover;object-fit:cover}.xgplayer[data-xgfill=fill] video{-o-object-fit:fill;object-fit:fill}.xgplayer .xg-pos{left:10px;right:10px}.xgplayer .xg-margin{margin-left:16px;margin-right:16px}.xgplayer .xg-bottom{bottom:0}.xgplayer .btn-text{position:relative;top:50%;height:24px;font-size:13px;text-align:center}.xgplayer .btn-text span{display:inline-block;min-width:52px;height:24px;line-height:24px;background:#00000061;border-radius:12px}.xgplayer xg-icon{position:relative;box-sizing:border-box;height:40px;margin-left:16px;margin-right:16px;cursor:pointer;color:#fffc;fill:#fff}.xgplayer xg-icon.xg-icon-disable{cursor:not-allowed}.xgplayer xg-icon .xg-tips{top:-30px;left:50%;transform:translate(-50%)}.xgplayer xg-icon:active .xg-tips,.xgplayer xg-icon:hover .xg-tips{display:block}.xgplayer xg-icon:active .xg-tips.hide,.xgplayer xg-icon:hover .xg-tips.hide{display:none}.xgplayer xg-icon .xgplayer-icon{position:relative;top:50%;transform:translateY(-50%);cursor:pointer}.xgplayer xg-icon .xg-icon-disable{cursor:not-allowed}.xgplayer xg-icon .xg-img{width:100%}.xgplayer xg-icon svg,.xgplayer xg-icon img{height:100%;display:block}.xgplayer xg-bar{display:block}.xgplayer.xgplayer-inactive xg-bar,.xgplayer.xgplayer-mini xg-bar{display:none}.xgplayer.xgplayer-inactive .xg-top-bar{display:flex}.xgplayer.xgplayer-inactive .xg-top-bar.top-bar-autohide{display:none}.xgplayer .xg-top-bar{position:absolute;z-index:10;top:0;padding:0 16px;display:flex;height:50px}.xgplayer .xg-top-bar xg-icon{position:relative;top:10px;left:0;width:34px;margin-top:0}.xgplayer .xg-top-bar xg-icon:first-child{margin-left:0}.xgplayer .xg-left-bar,.xgplayer .xg-right-bar{position:absolute;z-index:9;top:50px;bottom:50px;width:50px}.xgplayer .xg-left-bar{left:0}.xgplayer .xg-right-bar{right:0}.xgplayer .xg-tips{display:none;position:absolute;padding:4px 6px;background:#0000008a;border-radius:4px;font-size:12px;color:#fff;text-align:center;white-space:nowrap;opacity:.85}.xgplayer .xg-margin{left:0;right:0}.xgplayer-mobile{-webkit-tap-highlight-color:rgba(0,0,0,0)}.xgplayer-mobile *{text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.xgplayer-mobile.xgplayer-rotate-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-rotate-fullscreen .xg-pos{left:6%;right:6%}.xgplayer-mobile xg-icon:hover .xg-tips{display:none}.xg-list-slide-scroll::-webkit-scrollbar-track{background-color:transparent;display:none}.xg-list-slide-scroll:hover::-webkit-scrollbar-track{display:block}.xg-list-slide-scroll::-webkit-scrollbar{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#0000;height:4px;width:4px}.xg-list-slide-scroll::-webkit-scrollbar-corner{background:transparent;display:none}.xg-list-slide-scroll::-webkit-scrollbar-thumb{background:#ffffff80;border-radius:3px;display:none;width:4px}.xg-list-slide-scroll:hover::-webkit-scrollbar-thumb{display:block}@media only screen and (max-width: 480px){.xgplayer-mobile xg-icon{margin-right:10px;margin-left:10px}.xgplayer-mobile .xg-top-bar{left:10px;right:10px}}@media screen and (orientation: portrait){.xgplayer-mobile.xgplayer-is-fullscreen .xgplayer-controls,.xgplayer-mobile.xgplayer-is-cssfullscreen .xgplayer-controls{bottom:34px;bottom:constant(safe-area-inset-bottom);bottom:env(safe-area-inset-bottom)}.xgplayer-mobile.xgplayer-is-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-is-cssfullscreen .xg-top-bar{top:34px;top:constant(safe-area-inset-top);top:env(safe-area-inset-top)}}@media only screen and (orientation: landscape){.xgplayer-mobile.xgplayer-is-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-is-fullscreen .xg-pos{left:6%;right:6%}.xgplayer-mobile.xgplayer-rotate-fullscreen{left:0;width:100vw;height:100vh;transform:rotate(0)}}.xgplayer .xgplayer-screen-container{display:block;width:100%}.xgplayer .xg-options-icon{display:none;cursor:pointer}.xgplayer .xg-options-icon.show{display:block}@keyframes xg_right_options_active{0%{transform:translate(50%)}to{transform:translate(-50%)}}@keyframes xg_right_options_hide{0%{transform:translate(-50%)}to{transform:translate(50%)}}@keyframes xg_left_options_active{0%{transform:translate(-50%)}to{transform:translate(50%)}}@keyframes xg_left_options_hide{0%{transform:translate(50%)}to{transform:translate(-50%)}}.xgplayer .xg-options-list{display:none;position:absolute;z-index:5;width:78px;right:50%;bottom:100%;background:#0000008a;border-radius:1px;transform:translate(50%);cursor:pointer;overflow:auto;height:0;opacity:.85;font-size:14px;color:#fffc}.xgplayer .xg-options-list li{height:20px;line-height:20px;position:relative;padding:4px 0;text-align:center;color:#fffc}.xgplayer .xg-options-list li:hover,.xgplayer .xg-options-list li.selected{color:red;opacity:1}.xgplayer .xg-options-list li:nth-child(1){position:relative;margin-top:12px}.xgplayer .xg-options-list li:last-child{position:relative;margin-bottom:12px}.xgplayer .xg-options-list:hover{opacity:1}.xgplayer .xg-options-list.active{display:block;height:auto}.xgplayer .xg-options-list.xg-side-list{width:20%;height:100%;bottom:0;background:#000000e6;display:flex;flex-direction:column;box-sizing:border-box}.xgplayer .xg-options-list.xg-side-list li{flex:1;width:100%;padding:0;position:relative}.xgplayer .xg-options-list.xg-side-list li span{display:block;position:relative;top:50%;transform:translateY(-50%);pointer-events:none}.xgplayer .xg-options-list.xg-side-list li:nth-child(1){margin-top:20px}.xgplayer .xg-options-list.xg-side-list li:last-child{margin-bottom:20px}.xgplayer .xg-options-list.xg-right-side{right:-10.5%}.xgplayer .xg-options-list.xg-right-side.active{height:100%;animation:xg_right_options_active .2s ease-out forwards}.xgplayer .xg-options-list.xg-right-side.hide{height:100%;animation:xg_right_options_hide .2s ease-in forwards}.xgplayer .xg-options-list.xg-left-side{left:-10.5%;transform:translate(-50%)}.xgplayer .xg-options-list.xg-left-side.active{height:100%;animation:xg_left_options_active .2s ease-out forwards}.xgplayer .xg-options-list.xg-left-side.hide{height:100%;animation:xg_left_options_hide .2s ease-in forwards}@media only screen and (max-width: 480px){.xgplayer-mobile .xg-options-icon.portrait{display:none}.xgplayer-mobile .xg-options-list li:hover{color:#fffc}.xgplayer-mobile .xg-options-list li.selected{color:red}}.xgplayer-replay{display:none}.xgplayer .xgplayer-replay{display:none;position:absolute;left:50%;top:50%;width:100px;height:100px;justify-content:center;align-items:center;flex-direction:column;z-index:5;transform:translate(-50%,-50%);cursor:pointer}.xgplayer .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-size:14px;color:#fff;line-height:34px;text-align:center}.xgplayer.xgplayer-mobile .xgplayer-replay-svg{width:50px;height:50px}.xgplayer.xgplayer-mobile .xgplayer-replay-txt{line-height:24px;font-size:12px}.xgplayer .xgplayer-poster{display:block;opacity:1;visibility:visible;position:absolute;left:0;top:0;width:100%;height:100%;background-position:center center;background-size:100% auto;background-repeat:no-repeat;transition:opacity .3s ease,visibility .3s ease;pointer-events:none}.xgplayer .xgplayer-poster.hide,.xgplayer.xgplayer-playing .xgplayer-poster{opacity:0;visibility:hidden}.xgplayer.xgplayer-playing .xg-not-hidden,.xgplayer.xgplayer-is-enter .xgplayer-poster.xg-showplay,.xgplayer.xgplayer-playing .xgplayer-poster.xg-showplay,.xgplayer.xgplayer-nostart .xgplayer-poster,.xgplayer.xgplayer-ended .xgplayer-poster,.xgplayer.not-allow-autoplay .xgplayer-poster{opacity:1;visibility:visible}.xgplayer.xgplayer-nostart .xgplayer-poster.hide,.xgplayer.xgplayer-ended .xgplayer-poster.hide,.xgplayer.not-allow-autoplay .xgplayer-poster.hide{opacity:0;visibility:hidden}@keyframes playPause{0%{transform:scale(1);opacity:1}99%{transform:scale(1.3);opacity:0}to{transform:scale(1);opacity:0}}.xgplayer xg-start-inner{display:block;width:100%;height:100%;overflow:hidden;border-radius:50%;background:#00000061}.xgplayer .xgplayer-start{width:70px;height:70px;position:absolute;left:50%;top:50%;z-index:5;transform:translate(-50%,-50%);cursor:pointer}.xgplayer .xgplayer-start svg{width:100%;height:100%}.xgplayer .xgplayer-start.hide,.xgplayer .xgplayer-start.focus-hide{display:none;pointer-events:none}.xgplayer .xgplayer-start:hover{opacity:.85}.xgplayer .xgplayer-start .xg-icon-play{display:block}.xgplayer .xgplayer-start .xg-icon-pause,.xgplayer .xgplayer-start[data-state=pause] .xg-icon-play{display:none}.xgplayer .xgplayer-start[data-state=pause] .xg-icon-pause,.xgplayer .xgplayer-start.interact{display:block}.xgplayer .xgplayer-start.interact xg-start-inner{animation:playPause .4s .1s ease-out forwards}.xgplayer .xgplayer-start.show{display:block}.xgplayer.xgplayer-mobile xg-start-inner{background:initial;border-radius:0}.xgplayer.xgplayer-mobile .xgplayer-start{height:50px;width:50px}.xgplayer.xgplayer-mobile .xgplayer-start:hover{opacity:1}.xgplayer.xgplayer-inactive .xgplayer-start.auto-hide,.xgplayer.xgplayer-is-enter .xgplayer-start.auto-hide,.xgplayer.xgplayer-isloading.xgplayer-playing .xgplayer-start,.xgplayer.xgplayer-is-enter .xgplayer-start,.xgplayer.xgplayer-is-error .xgplayer-start,.xgplayer.xgplayer-is-enter .xgplayer-start.show,.xgplayer.xgplayer-is-error .xgplayer-start.show{display:none}.xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:#000c;z-index:5;pointer-events:none}.xgplayer-enter .show{display:block}.xgplayer-enter .xgplayer-enter-spinner{display:block;position:absolute;z-index:1;left:50%;top:50%;height:100px;width:100px;transform:translate(-50%,-50%)}.xgplayer-enter .xgplayer-enter-spinner div{width:6%;height:13%;background-color:#ffffffb3;position:absolute;left:45%;top:45%;opacity:0;border-radius:30px;animation:fade 1s linear infinite}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar1{transform:rotate(0) translateY(-140%);animation-delay:-0s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar2{transform:rotate(30deg) translateY(-140%);animation-delay:-.9163s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar3{transform:rotate(60deg) translateY(-140%);animation-delay:-.833s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar4{transform:rotate(90deg) translateY(-140%);animation-delay:-.7497s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar5{transform:rotate(120deg) translateY(-140%);animation-delay:-.6664s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar6{transform:rotate(150deg) translateY(-140%);animation-delay:-.5831s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar7{transform:rotate(180deg) translateY(-140%);animation-delay:-.4998s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar8{transform:rotate(210deg) translateY(-140%);animation-delay:-.4165s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar9{transform:rotate(240deg) translateY(-140%);animation-delay:-.3332s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar10{transform:rotate(270deg) translateY(-140%);animation-delay:-.2499s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar11{transform:rotate(300deg) translateY(-140%);animation-delay:-.1666s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar12{transform:rotate(330deg) translateY(-142%);animation-delay:-.0833s}@keyframes fade{0%{opacity:1}to{opacity:.25}}.xgplayer.xgplayer-is-enter .xgplayer-enter{display:block;opacity:1;transition:opacity .3s}.xgplayer.xgplayer-nostart .xgplayer-enter{display:none}.xgplayer.xgplayer-mobile .xgplayer-enter .xgplayer-enter-spinner{width:70px;height:70px}.xg-mini-layer{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:11;background:linear-gradient(180deg,#393939e6,#39393900 50.27%)}.xg-mini-layer .mask{pointer-events:none;position:absolute;top:0;left:0;height:100%;width:100%;background-color:#0006}.xg-mini-layer xg-mini-header{display:flex;top:0;left:0;right:40px;box-sizing:border-box;padding:10px 3px 0 8px;justify-content:space-between;color:#fff;font-size:14px;position:absolute;z-index:22}.xg-mini-layer xg-mini-header .xgplayer-pip-disableBtn{pointer-events:all}.xg-mini-layer xg-mini-header #disabledMini{display:none;position:relative}.xg-mini-layer xg-mini-header #disabledMini+label{cursor:pointer;position:relative;display:flex;align-items:center}.xg-mini-layer xg-mini-header #disabledMini+label:before{content:"";color:#ff142b;background-color:transparent;border-radius:2px;border:solid 1px #cdcdcd;width:16px;height:16px;display:inline-block;text-align:center;vertical-align:middle;line-height:16px;margin-right:7px}.xg-mini-layer xg-mini-header #disabledMini:checked+label{color:#ff142b}.xg-mini-layer xg-mini-header #disabledMini:checked+label:before{border-color:#ff142b}.xg-mini-layer xg-mini-header #disabledMini:checked+label:after{content:"";position:absolute;width:4px;height:8px;border-color:#ff142b;border-style:solid;border-width:0px 2px 2px 0px;transform:rotate(45deg);left:6px;top:5px}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn xg-tips{position:absolute;padding:4px 6px;white-space:nowrap;bottom:-30px;right:15px;border-radius:4px;background-color:#0000008a;display:none}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover #disabledMini+label:before{border-color:#ff142b}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover #disabledMini+label{color:#ff142b}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover xg-tips{display:block}.xg-mini-layer .mini-cancel-btn{cursor:pointer;display:block;color:#fff;width:40px;height:38px;position:absolute;right:0;top:0;text-align:center;line-height:38px}.xg-mini-layer .play-icon{cursor:pointer;height:48px;width:48px;position:absolute;background:#0000008a;border-radius:24px;top:50%;left:50%;margin:-24px 0 0 -24px}.xg-mini-layer .play-icon svg,.xg-mini-layer .play-icon img{width:50px;height:50px;fill:#faf7f7}.xg-mini-layer .xg-icon-play{display:none}.xg-mini-layer .xg-icon-pause,.xg-mini-layer[data-state=pause] .xg-icon-play{display:block}.xg-mini-layer[data-state=pause] .xg-icon-pause{display:none}.xgplayer-miniicon{position:relative;outline:none;display:block}.xgplayer-miniicon .name{text-align:center;font-size:13px;line-height:20px;height:20px;color:#fffc;line-height:40px}.xgplayer-miniicon .name span{font-size:13px;width:60px;height:20px;line-height:20px;background:#00000061;border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-mini{position:fixed;width:320px;height:180px;z-index:91;box-shadow:0 4px 7px 2px #0003}.xgplayer-mini:hover{cursor:move}.xgplayer-mini:hover .xg-mini-layer{display:block}.xgplayer-mini.xgplayer-ended .xg-mini-layer{display:none}.xgplayer-mobile .xg-mini-layer .play-icon{background:none;border-radius:initial}.xgplayer.xgplayer-inactive{cursor:none}.xgplayer xg-thumbnail{display:block}.xgplayer xg-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;top:0;left:0;height:100%;width:100%}.xgplayer xg-trigger .time-preview{display:none;position:absolute;width:200px;margin:0 auto;padding:0 20px 30px;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;text-shadow:0 0 1px rgba(0,0,0,.54);font-size:18px;text-align:center;pointer-events:none}.xgplayer xg-trigger .time-preview span{line-height:24px}.xgplayer xg-trigger .time-preview .xg-cur{color:red}.xgplayer xg-trigger .time-preview .xg-separator{font-size:14px}.xgplayer xg-trigger .time-preview .xg-seek-show{transform:translate(-10px)}.xgplayer xg-trigger .time-preview .xg-seek-show.xg-back .xg-seek-pre{transform:rotate(180deg) translate(-5px)}.xgplayer xg-trigger .time-preview .xg-seek-show.hide-seek-icon .xg-seek-icon{display:none}.xgplayer xg-trigger .time-preview .xg-bar{width:96px;height:2px;margin:8px auto 0;border-radius:10px;box-sizing:content-box;background:#ffffff4d}.xgplayer xg-trigger .time-preview .xg-bar .xg-curbar{width:0;height:100%;background-color:red}.xgplayer xg-trigger .time-preview .xg-bar.hide{display:none}.xgplayer xg-trigger .mobile-thumbnail{position:relative;left:50%;transform:translate(-50%)}.xgplayer xg-trigger .xg-top-note{position:absolute;height:32px;width:135px;top:26px;left:50%;margin-left:-78px;background:#0000004d;border-radius:100px;color:#fff}.xgplayer xg-trigger .xg-top-note span{display:block;line-height:32px;height:32px;font-size:13px;text-align:center}.xgplayer xg-trigger .xg-top-note i{color:red;margin:0 5px}.xgplayer xg-trigger .xg-playbackrate{display:none}.xgplayer xg-trigger[data-xg-action=seeking] .time-preview{display:block}.xgplayer xg-trigger[data-xg-action=playbackrate] .xg-playbackrate{display:block}.xgplayer .gradient{display:none;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none;background-image:linear-gradient(#0009,#0000005c 20%,#0000 36%,#0000 70%,#0000003d 77%,#0000005c 83%,#0009)}.xgplayer .gradient.top{background-image:linear-gradient(#0009,#0000005c 20%,#0000 36%,#0000 70%)}.xgplayer .gradient.bottom{background-image:linear-gradient(#0000 70%,#0000003d 77%,#0000005c 83%,#0009)}.xgplayer .gradient.none,.xgplayer-mobile .xgplayer-controls{background-image:initial}.xgplayer-mobile.xgplayer-playing .gradient{display:block}.xgplayer-mobile.xgplayer-inactive .gradient{background-image:initial}.xgplayer-mobile .xgmask{position:absolute;height:100%;z-index:10;top:0;left:0;width:100%;pointer-events:none;background-color:#0000}@media (prefers-color-scheme: dark){.xgplayer-mobile xg-trigger .time-preview{color:#fff}.xgplayer-mobile xg-trigger .time-preview span.xg-cur{color:red}.xgplayer-mobile xg-trigger .time-preview .xg-bar{background-color:#ffffff4d}.xgplayer-mobile xg-trigger .time-preview .xg-bar.xg-curbar{background-color:red}}@keyframes loadingRotate{0%{transform:rotate(0)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}75%{transform:rotate(270deg)}to{transform:rotate(360deg)}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}xg-loading-inner{display:block;height:100%;width:100%;transform-origin:center;animation:loadingRotate 1s .1s linear infinite}.xgplayer-loading{display:none;width:70px;height:70px;overflow:hidden;position:absolute;z-index:10;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none}.xgplayer-loading svg,.xgplayer-loading img{width:100%;height:100%}.xgplayer-mobile .xgplayer-loading{width:50px;height:50px}.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-nostart .xgplayer-loading,.xgplayer-pause .xgplayer-loading,.xgplayer-is-enter .xgplayer-loading,.xgplayer-is-ended .xgplayer-loading,.xgplayer-is-error .xgplayer-loading{display:none}.xgplayer .xgplayer-progress{display:flex;align-items:center;position:relative;min-width:10px;height:20px;left:0;right:0;top:0;outline:none;flex:1;cursor:pointer}.xgplayer .xgplayer-progress-outer{position:relative;width:100%;height:2px;border-radius:3px;cursor:pointer}.xgplayer .progress-list{display:flex;height:100%;width:100%;border-radius:inherit}.xgplayer .xgplayer-progress-inner{position:relative;flex:1;height:100%;background:#ffffff4d;transition:height .2s ease-in,opacity .2s ease-out;border-radius:inherit;margin-right:2px;pointer-events:none}.xgplayer .xgplayer-progress-inner:last-child,.xgplayer .xgplayer-progress-inner:only-child{margin-right:0}.xgplayer .inner-focus-point{background:#fff;position:relative}.xgplayer .inner-focus-point:before,.xgplayer .inner-focus-point:after{position:absolute;content:" ";display:block;width:2px;height:300%;top:50%;z-index:1;transform:translateY(-50%);border-radius:3px;background:#fff}.xgplayer .inner-focus-point:before{left:0}.xgplayer .inner-focus-point:after{right:0}.xgplayer .xgplayer-progress-cache,.xgplayer .xgplayer-progress-played{display:block;height:100%;width:0;position:absolute;top:0;left:0;border-radius:inherit}.xgplayer .xgplayer-progress-played{background:linear-gradient(-90deg,#fa1f41,#e31106)}.xgplayer .xgplayer-progress-cache{background:#ffffff80}.xgplayer .xgplayer-progress-btn{display:block;background:#ff5e5e4e;border:.5px solid rgba(255,94,94,.056545);box-shadow:0 0 1px #ff000062;width:20px;height:20px;border-radius:30px;left:0;top:50%;position:absolute;z-index:1;transform:translate(-50%,-50%);box-sizing:border-box;pointer-events:none}.xgplayer .xgplayer-progress-btn:before{content:" ";display:block;position:relative;width:12px;height:12px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:30px;background:#fff}.xgplayer .xgplayer-progress-btn.active{border:4px solid rgba(255,94,94,.064057)}.xgplayer .xgplayer-progress-btn.active:before{box-shadow:0 0 3px #f85959b0}.xgplayer .xgplayer-progress-dot{display:inline-block;position:absolute;height:100%;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;left:25%;top:-40px;height:auto;line-height:30px;width:auto;transform:scale(.8) translate(-50%);background:#0000004d;border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer .xgplayer-progress-dot:hover .xgplayer-progress-tip{display:block}.xgplayer .flex-controls .xgplayer-progress{transform:translateY(0)}.xgplayer.xgplayer-pc .xgplayer-progress-btn{transform:translate(-50%,-50%) scale(0)}.xgplayer.xgplayer-pc .xgplayer-progress-outer{height:3px}.xgplayer.xgplayer-pc .xgplayer-progress-inner{margin-right:4px}.xgplayer.xgplayer-pc .xgplayer-progress-inner:last-child,.xgplayer.xgplayer-pc .xgplayer-progress-inner:only-child{margin-right:0}.xgplayer.xgplayer-pc .inner-focus-point:before,.xgplayer.xgplayer-pc .inner-focus-point:after{width:3px}.xgplayer.xgplayer-pc .inner-focus-highlight{background:#fffc}.xgplayer.xgplayer-pc .xgplayer-progress.active .xgplayer-progress-outer{height:6px;margin-bottom:3px;transition:height .3s ease,margin-bottom .3s ease}.xgplayer.xgplayer-pc .xgplayer-progress.active .xgplayer-progress-btn{transform:translate(-50%,-50%) scale(1)}.xgplayer.xgplayer-pc .xgplayer-progress.active .inner-focus-point:before,.xgplayer.xgplayer-pc .xgplayer-progress.active .inner-focus-point:after{width:6px}.xgplayer .xgplayer-progress-bottom .xgplayer-progress-outer{top:9px}.xgplayer .xgplayer-progress-bottom .xgplayer-progress-btn:before{height:6px;width:6px}.xgplayer.xgplayer-mobile .xgplayer-progress-bottom .xgplayer-progress-outer{height:4px}@media (prefers-color-scheme: dark){.xgplayer .xgplayer-progress .xgplayer-progress-inner{background-color:#ffffff4d}.xgplayer .xgplayer-progress .inner-focus-highlight{background:#fffc}.xgplayer .xgplayer-progress .xgplayer-progress-btn{background:#ff5e5e4e;border:.5px solid rgba(255,94,94,.056545);box-shadow:0 0 1px #ff000062}.xgplayer .xgplayer-progress .xgplayer-progress-btn:before{background-color:#fff}.xgplayer .xgplayer-progress .xgplayer-progress-played{background-color:linear-gradient(-90deg,#FA1F41 0%,#E31106 100%)}.xgplayer .xgplayer-progress .xgplayer-progress-cache{background-color:#ffffff80}}.xg-mini-progress{display:none;position:absolute;height:2px;left:0;right:0;bottom:0;pointer-events:none}.xg-mini-progress xg-mini-progress-played,.xg-mini-progress xg-mini-progress-cache{height:100%;width:0;position:absolute;top:0;left:0;border-radius:inherit}.xg-mini-progress xg-mini-progress-played{background:linear-gradient(-90deg,#fa1f41,#e31106)}.xg-mini-progress xg-mini-progress-cache{background:#ffffff80}.xg-mini-progress-show,.xgplayer-inactive .xg-mini-progress,.xgplayer-mini .xg-mini-progress{display:block}.xgplayer .xgplayer-play .xg-icon-play{display:none}.xgplayer .xgplayer-play .xg-icon-pause,.xgplayer .xgplayer-play[data-state=pause] .xg-icon-play{display:block}.xgplayer .xgplayer-play[data-state=pause] .xg-icon-pause,.xgplayer .xgplayer-fullscreen .xg-exit-fullscreen{display:none}.xgplayer .xgplayer-fullscreen .xg-get-fullscreen,.xgplayer .xgplayer-fullscreen[data-state=full] .xg-exit-fullscreen{display:block}.xgplayer .xgplayer-fullscreen[data-state=full] .xg-get-fullscreen{display:none}.xgplayer .xg-top-bar .xgplayer-back{position:relative;left:0;top:16px;width:34px;height:40px;display:none}.xgplayer .xg-top-bar .xgplayer-back.show{display:block}.xgplayer .xgplayer-time{pointer-events:none;min-width:40px;font-size:14px;font-family:PingFangSC-Semibold;color:#fff;text-align:center;display:inline-block;line-height:40px}.xgplayer .xgplayer-time span{display:inline-block;line-height:40px;height:40px}.xgplayer .xgplayer-time span .time-min-width{text-align:center;min-width:2ch}.xgplayer .xgplayer-time span .time-min-width:first-child{text-align:right}.xgplayer .xgplayer-time span .time-min-width:last-child{text-align:left}.xgplayer .xgplayer-time .time-duration{color:#ffffff80}.xgplayer .xgplayer-time .time-live-tag{display:none}.xgplayer .xgplayer-time.xg-time-left{margin-left:0}.xgplayer .xgplayer-time.xg-time-right{margin-right:0}.xgplayer.xgplayer-mobile .xgplayer-time{min-width:30px;font-size:12px}.xgplayer.xgplayer-mobile .xgplayer-time.xg-time-left{margin-right:8px}.xgplayer.xgplayer-mobile .xgplayer-time.xg-time-right{margin-left:8px}.xgplayer .xgplayer-volume.slide-show .xgplayer-slider{display:block}.xgplayer .xgplayer-slider{display:none;position:absolute;width:28px;height:92px;background:#0000008a;border-radius:1px;bottom:40px;outline:none}.xgplayer .xgplayer-slider:after{content:" ";display:block;height:15px;width:28px;position:absolute;bottom:-15px;left:0;z-index:20;cursor:initial}.xgplayer .xgplayer-value-label{position:absolute;left:0;right:0;bottom:100%;padding:5px 0 0;font-size:12px;background-color:#0000008a;color:#fff;text-align:center}.xgplayer .xgplayer-bar,.xgplayer .xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:#ffffff4d;border-radius:100px;width:4px;height:76px;outline:none;cursor:pointer}.xgplayer .xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer .xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px #00000042;position:absolute;border-radius:50%;left:-2px;top:-4px}.xgplayer .xgplayer-volume[data-state=normal] .xg-volume{display:block}.xgplayer .xgplayer-volume[data-state=normal] .xg-volume-small,.xgplayer .xgplayer-volume[data-state=normal] .xg-volume-mute,.xgplayer .xgplayer-volume[data-state=small] .xg-volume{display:none}.xgplayer .xgplayer-volume[data-state=small] .xg-volume-small{display:block}.xgplayer .xgplayer-volume[data-state=small] .xg-volume-mute,.xgplayer .xgplayer-volume[data-state=mute] .xg-volume,.xgplayer .xgplayer-volume[data-state=mute] .xg-volume-small{display:none}.xgplayer .xgplayer-volume[data-state=mute] .xg-volume-mute{display:block}.xgplayer.xgplayer-mobile .xgplayer-volume .xgplayer-slider,.xgplayer .xgplayer-pip .xg-exit-pip{display:none}.xgplayer .xgplayer-pip .xg-get-pip,.xgplayer .xgplayer-pip[data-state=pip] .xg-exit-pip{display:block}.xgplayer .xgplayer-pip[data-state=pip] .xg-get-pip{display:none}.xgplayer .xgplayer-playnext{position:relative;display:none;cursor:pointer}.xgplayer .xgplayer-playnext .xgplayer-tips .xgplayer-tip-playnext{display:block}.xgplayer .xgplayer-playnext:hover{opacity:.85}.xgplayer .xgplayer-playnext:hover .xgplayer-tips{display:block}.lang-is-en .xgplayer-playnext .xgplayer-tips{margin-left:-25px}.lang-is-jp .xgplayer-playnext .xgplayer-tips{margin-left:-38px}.xgplayer .xgplayer-download{position:relative;display:block;cursor:pointer}.lang-is-en .xgplayer-download .xgplayer-tips{margin-left:-32px}.lang-is-jp .xgplayer-download .xgplayer-tips{margin-left:-40px}.xgplayer .xgplayer-shot{display:none}.xgplayer-definition{display:none;cursor:pointer}.xgplayer .xgplayer-playbackrate{display:none;cursor:default}.xgplayer .xgplayer-cssfullscreen .xg-get-cssfull{display:block}.xgplayer .xgplayer-cssfullscreen .xg-exit-cssfull,.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-get-cssfull{display:none}.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-exit-cssfull{display:block}.xgplayer-error{background:#000;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:6;color:#fff;text-align:center;line-height:100%;justify-content:center;align-items:center}.xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-error .xgplayer-error-text{line-height:18px;margin:auto 6px 20px;display:block}.xgplayer-is-error .xgplayer-error{display:flex}.xgplayer .xgplayer-prompt{display:block;pointer-events:none;position:absolute;z-index:1;padding:6px 12px 5px;opacity:0;left:10px;background:#00000080;border-radius:50px;font-size:12px;line-height:17px;text-align:center;color:#fff}.xgplayer .xgplayer-prompt.show{display:block;opacity:1;z-index:10;pointer-events:initial}.xgplayer .xgplayer-prompt.arrow{transform:translate(-50%)}.xgplayer .xgplayer-prompt.arrow:after{content:"";display:block;position:absolute;left:50%;bottom:0;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid rgba(0,0,0,.5);transform:translate(-50%,100%)}.xgplayer .xgplayer-prompt .highlight{display:inline-block;margin-left:6px;color:red;cursor:pointer}.xgplayer.xgplayer-is-error .xgplayer-prompt.show{display:none;opacity:1}.xgplayer .xgplayer-spot{position:absolute;top:0;left:0;height:100%;background:#fff;border-radius:12px}.xgplayer .xgplayer-spot.mini{min-width:6px;transform:translate(-50%)}.xgplayer .xgplayer-spot.active .xgplayer-spot-pop{display:block;opacity:1;pointer-events:initial}.xgplayer .xgplayer-spot-pop{display:block;opacity:0;pointer-events:none;position:absolute;left:50%;bottom:5px;padding-bottom:5px;transform:translate(-50%)}.xgplayer-mobile .xgplayer-spot{height:3px;min-width:3px;top:50%;opacity:1;transform:translateY(-50%)}.xgplayer-mobile .xgplayer-spot.mini{min-width:3px;transform:translate(-50%,-50%)}.xgplayer .xgplayer-progress.active .xgplayer-spot{opacity:1;transition:opacity .3s;visibility:visible}.xgplayer .xg-spot-info{position:absolute;left:0;bottom:100%;display:none}.xgplayer .xg-spot-info.short-line .xg-spot-line{height:6px}.xgplayer .xg-spot-info.short-line .xg-spot-content{bottom:-4px}.xgplayer .xg-spot-info.no-thumbnail .xg-spot-thumbnail{display:none}.xgplayer .xg-spot-info.no-thumbnail .xgplayer-progress-point{display:block}.xgplayer .xg-spot-info.no-timepoint .xgplayer-progress-point,.xgplayer .xg-spot-info.hide{display:none}.xgplayer .xgplayer-progress.active .xg-spot-info{display:block}.xgplayer .xgplayer-progress.active .xg-spot-info.hide{display:none}.xgplayer .xg-spot-line{position:relative;bottom:-7px;margin-left:50%;display:block;width:1px;height:41px;background-color:#fff;pointer-events:none}.xgplayer .xgplayer-progress-point{display:none;position:relative;bottom:-4px;left:50%;transform:translate(-50%);background:#0000008a;font-size:11px;color:#fff;padding:4px 6px;border-radius:4px;text-align:center;opacity:.85;white-space:nowrap}.xgplayer .xg-spot-content{position:relative;bottom:-7px;color:#fff;border-radius:2px 2px 0 0}.xgplayer .xg-spot-ext-text{position:relative;bottom:-7px}.xgplayer .xg-spot-thumbnail{position:relative;background-color:#111010;pointer-events:none;border-radius:2px 2px 0 0}.xgplayer .xg-spot-time{position:absolute;bottom:2px;font-size:12px;line-height:16.8px;left:50%;transform:translate(-50%);pointer-events:none}.xgplayer .progress-thumbnail{margin:0 auto;display:block}.xgplayer .xg-spot-text{display:none;padding:5px 8px;background:#000c;border-radius:0 0 2px 2px;pointer-events:none;box-sizing:border-box}.xgplayer .spot-inner-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:20px;font-size:12px;max-height:40px}.xgplayer .xg-spot-content.show-text .xg-spot-text{display:block}.xgplayer .product .xg-spot-text{background:#3370ff}.xgplayer .product .xg-spot-line{border-left:10px solid transparent;border-right:10px solid transparent;border-top:7px solid #3370FF;width:0;height:15px;left:-10px;background:none}.xgplayer .xgvideo-preview{position:absolute;width:100%;height:100%;top:0;left:0;opacity:0;visibility:hidden;transition:visibility .3s,opacity .3s;background-color:#000}.xgplayer .xgvideo-preview .xgvideo-thumbnail{position:relative;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:0}.xgplayer .xgvideo-preview.show{opacity:1;visibility:visible}.xgplayer-dynamic-bg,.xgplayer-dynamic-bg canvas,.xgplayer-dynamic-bg xgmask,.xgplayer-dynamic-bg xgfilter{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}.xgplayer-dynamic-bg canvas{transform:translateZ(0)}.xgplayer-dynamic-bg xgmask{background:#000000b3}[data-v-6f012690] .n-base-icon,[data-v-ca066951] .n-base-icon{font-size:18px}[data-v-ca066951] .n-button__content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px} ');
(function (vue, naiveUi, CryptoJS, bigInt, Player, HlsJsPlugin) {
'use strict';
const _hoisted_1$2 = {
class: "main"
};
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
__name: "Sidebar",
setup(__props) {
const menuThemeOverrides = {
itemColorActive: "#EEF0FF",
itemColorActiveHover: "#EEF0FF",
itemTextColorActive: "#2777F8",
itemTextColorActiveHover: "#2777F8"
};
const menuOptions = [{
label: () => vue.createVNode("a", {
"href": "//115.com/?cid=0&offset=0&mode=wangpan"
}, [vue.createTextVNode("全部文件")]),
key: "all"
}, {
label: () => vue.createVNode("a", {
"href": "//115.com/?tab=upload&mode=wangpan"
}, [vue.createTextVNode("最近上传")]),
key: "upload"
}, {
label: () => vue.createVNode("a", {
"href": "//115.com/?tab=offline&mode=wangpan"
}, [vue.createTextVNode("云下载")]),
key: "offline"
}];
const menuValue = vue.ref("all");
const url = new URL(window.location.href);
if (url.searchParams.has("cid")) {
menuValue.value = "all";
} else if (url.searchParams.has("tab")) {
const tab = url.searchParams.get("tab");
if (tab === "upload") {
menuValue.value = "upload";
} else if (tab === "offline") {
menuValue.value = "offline";
}
}
return (_ctx, _cache) => {
const _component_NMenu = naiveUi.NMenu;
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [vue.createVNode(_component_NMenu, {
value: vue.unref(menuValue),
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => vue.isRef(menuValue) ? menuValue.value = $event : null),
options: menuOptions,
"theme-overrides": menuThemeOverrides
}, null, 8, ["value"])]);
};
}
});
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const Sidebar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e1033040"]]);
function tryOnScopeDispose(fn) {
if (vue.getCurrentScope()) {
vue.onScopeDispose(fn);
return true;
}
return false;
}
function toValue(r) {
return typeof r === "function" ? r() : vue.unref(r);
}
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
const toString = Object.prototype.toString;
const isObject = (val) => toString.call(val) === "[object Object]";
const noop = () => {
};
function unrefElement(elRef) {
var _a;
const plain = toValue(elRef);
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
}
const defaultWindow = isClient ? window : void 0;
function useEventListener(...args) {
let target;
let events2;
let listeners;
let options;
if (typeof args[0] === "string" || Array.isArray(args[0])) {
[events2, listeners, options] = args;
target = defaultWindow;
} else {
[target, events2, listeners, options] = args;
}
if (!target)
return noop;
if (!Array.isArray(events2))
events2 = [events2];
if (!Array.isArray(listeners))
listeners = [listeners];
const cleanups = [];
const cleanup = () => {
cleanups.forEach((fn) => fn());
cleanups.length = 0;
};
const register = (el, event, listener, options2) => {
el.addEventListener(event, listener, options2);
return () => el.removeEventListener(event, listener, options2);
};
const stopWatch = vue.watch(
() => [unrefElement(target), toValue(options)],
([el, options2]) => {
cleanup();
if (!el)
return;
const optionsClone = isObject(options2) ? { ...options2 } : options2;
cleanups.push(
...events2.flatMap((event) => {
return listeners.map((listener) => register(el, event, listener, optionsClone));
})
);
},
{ immediate: true, flush: "post" }
);
const stop = () => {
stopWatch();
cleanup();
};
tryOnScopeDispose(stop);
return stop;
}
const DefaultMagicKeysAliasMap = {
ctrl: "control",
command: "meta",
cmd: "meta",
option: "alt",
up: "arrowup",
down: "arrowdown",
left: "arrowleft",
right: "arrowright"
};
function useMagicKeys(options = {}) {
const {
reactive: useReactive = false,
target = defaultWindow,
aliasMap = DefaultMagicKeysAliasMap,
passive = true,
onEventFired = noop
} = options;
const current = vue.reactive(/* @__PURE__ */ new Set());
const obj = {
toJSON() {
return {};
},
current
};
const refs = useReactive ? vue.reactive(obj) : obj;
const metaDeps = /* @__PURE__ */ new Set();
const usedKeys = /* @__PURE__ */ new Set();
function setRefs(key, value) {
if (key in refs) {
if (useReactive)
refs[key] = value;
else
refs[key].value = value;
}
}
function reset() {
current.clear();
for (const key of usedKeys)
setRefs(key, false);
}
function updateRefs(e, value) {
var _a, _b;
const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();
const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();
const values = [code, key].filter(Boolean);
if (key) {
if (value)
current.add(key);
else
current.delete(key);
}
for (const key2 of values) {
usedKeys.add(key2);
setRefs(key2, value);
}
if (key === "meta" && !value) {
metaDeps.forEach((key2) => {
current.delete(key2);
setRefs(key2, false);
});
metaDeps.clear();
} else if (typeof e.getModifierState === "function" && e.getModifierState("Meta") && value) {
[...current, ...values].forEach((key2) => metaDeps.add(key2));
}
}
useEventListener(target, "keydown", (e) => {
updateRefs(e, true);
return onEventFired(e);
}, { passive });
useEventListener(target, "keyup", (e) => {
updateRefs(e, false);
return onEventFired(e);
}, { passive });
useEventListener("blur", reset, { passive: true });
useEventListener("focus", reset, { passive: true });
const proxy = new Proxy(
refs,
{
get(target2, prop, rec) {
if (typeof prop !== "string")
return Reflect.get(target2, prop, rec);
prop = prop.toLowerCase();
if (prop in aliasMap)
prop = aliasMap[prop];
if (!(prop in refs)) {
if (/[+_-]/.test(prop)) {
const keys2 = prop.split(/[+_-]/g).map((i) => i.trim());
refs[prop] = vue.computed(() => keys2.every((key) => toValue(proxy[key])));
} else {
refs[prop] = vue.ref(false);
}
}
const r = Reflect.get(target2, prop, rec);
return useReactive ? toValue(r) : r;
}
}
);
return proxy;
}
var _GM_cookie = /* @__PURE__ */ (() => typeof GM_cookie != "undefined" ? GM_cookie : void 0)();
var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : void 0)();
var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : void 0)();
var _GM_xmlhttpRequest = /* @__PURE__ */ (() => typeof GM_xmlhttpRequest != "undefined" ? GM_xmlhttpRequest : void 0)();
const gKts = [
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
];
const gKeyS = [41, 35, 33, 94];
const gKeyL = [120, 6, 173, 76, 51, 134, 93, 24, 76, 1, 63, 70];
const md5 = CryptoJS.MD5;
const getDownLoadUrl = (file) => {
const time = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
const { data, key } = m115Encode(
JSON.stringify({
pickcode: file.code
}),
time
);
const download = {
name: "",
url: ""
};
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "POST",
url: `http://proapi.115.com/app/chrome/downurl?t=${time}`,
data: `data=${encodeURIComponent(data)}`,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
onload: (response) => {
const json = JSON.parse(response.responseText);
if (!json.state) {
reject(json.msg);
} else {
const data2 = Object.values(JSON.parse(m115Decode(json.data, key)))[0];
download.name = data2.file_name;
download.url = data2.url.url;
resolve(download);
}
},
onerror: (error) => {
reject(error);
}
});
});
};
const m115Encode = (code, time) => {
const key = stringToBytes(md5(`!@###@#${time}DFDR@#@#`).toString());
const bytes = stringToBytes(code);
const tmp1 = m115SymEncode(bytes, bytes.length, key);
const tmp2 = key.slice(0, 16).concat(tmp1);
return {
data: m115AsymEncode(tmp2, tmp2.length),
key
};
};
const m115Decode = function(src, key) {
const bytes = stringToBytes(window.atob(src));
const tmp = m115AsymDecode(bytes, bytes.length);
return bytesToString(m115SymDecode(tmp.slice(16), tmp.length - 16, key, tmp.slice(0, 16)));
};
const stringToBytes = (str) => {
const arr = [];
const strLength = str.length;
for (let i = 0; i < strLength; i++) {
arr.push(str.charCodeAt(i));
}
return arr;
};
const m115SymEncode = (src, srclen, key1) => {
let ret;
const k1 = m115Getkey(4, key1);
const k2 = m115Getkey(12, null);
ret = xor115Enc(src, srclen, k1, 4);
ret.reverse();
ret = xor115Enc(ret, srclen, k2, 12);
return ret;
};
const m115SymDecode = (src, srclen, key1, key2) => {
const k1 = m115Getkey(4, key1);
const k2 = m115Getkey(12, key2);
let ret = xor115Enc(src, srclen, k2, 12);
ret.reverse();
ret = xor115Enc(ret, srclen, k1, 4);
return ret;
};
const m115Getkey = (length, key) => {
if (key != null) {
const results = [];
for (let i = 0; i < length; i++) {
results.push(key[i] + gKts[length * i] & 255 ^ gKts[length * (length - 1 - i)]);
}
return results;
}
if (length === 12) {
return gKeyL.slice(0);
}
return gKeyS.slice(0);
};
const xor115Enc = (src, srclen, key, keylen) => {
const mod4 = srclen % 4;
const ret = [];
if (mod4 !== 0) {
for (let i = 0, j = 0; 0 <= mod4 ? j < mod4 : j > mod4; i = 0 <= mod4 ? ++j : --j) {
ret.push(src[i] ^ key[i % keylen]);
}
}
for (let i = mod4, k = mod4; mod4 <= srclen ? k < srclen : k > srclen; i = mod4 <= srclen ? ++k : --k) {
ret.push(src[i] ^ key[(i - mod4) % keylen]);
}
return ret;
};
const m115AsymEncode = (src, srclen) => {
const m = 128 - 11;
let ret = "";
const ref2 = Math.floor((srclen + m - 1) / m);
for (let i = 0, j = 0; 0 <= ref2 ? j < ref2 : j > ref2; i = 0 <= ref2 ? ++j : --j) {
ret += RSA().encrypt(bytesToString(src.slice(i * m, Math.min((i + 1) * m, srclen))));
}
return window.btoa(RSA().hex2a(ret));
};
const m115AsymDecode = function(src, srclen) {
const m = 128;
let ret = "";
const ref2 = Math.floor((srclen + m - 1) / m);
for (let i = 0, j = 0; 0 <= ref2 ? j < ref2 : j > ref2; i = 0 <= ref2 ? ++j : --j) {
ret += RSA().decrypt(bytesToString(src.slice(i * m, Math.min((i + 1) * m, srclen))));
}
return stringToBytes(ret);
};
const bytesToString = (b) => {
let ret = "";
for (let j = 0; j < b.length; j++) {
ret += String.fromCharCode(b[j]);
}
return ret;
};
const RSA = () => {
const n = bigInt(
"8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683",
16
);
const e = bigInt("10001", 16);
const pkcs1pad2 = (s, n2) => {
if (n2 < s.length + 11) {
return null;
}
const ba = [];
let i = s.length - 1;
while (i >= 0 && n2 > 0) {
ba[--n2] = s.charCodeAt(i--);
}
ba[--n2] = 0;
while (n2 > 2) {
ba[--n2] = 255;
}
ba[--n2] = 2;
ba[--n2] = 0;
const c = a2hex(ba);
return bigInt(c, 16);
};
const pkcs1unpad2 = (a) => {
let b = a.toString(16);
if (b.length % 2 !== 0) {
b = "0" + b;
}
const c = hex2a(b);
let i = 1;
while (c.charCodeAt(i) !== 0) {
i++;
}
return c.slice(i + 1);
};
const a2hex = (byteArray) => {
let hexString = "";
for (let i = 0; i < byteArray.length; i++) {
let nextHexByte = byteArray[i].toString(16);
if (nextHexByte.length < 2) {
nextHexByte = "0" + nextHexByte;
}
hexString += nextHexByte;
}
return hexString;
};
const hex2a = (hex) => {
let str = "";
for (let i = 0; i < hex.length; i += 2) {
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
}
return str;
};
const encrypt = (text) => {
const m = pkcs1pad2(text, 128);
if (m === null) {
return null;
}
let h = m.modPow(e, n).toString(16);
while (h.length < 128 * 2) {
h = "0" + h;
}
return h;
};
const decrypt = (text) => {
const ba = [];
let i = 0;
while (i < text.length) {
ba[i] = text.charCodeAt(i);
i += 1;
}
const c = bigInt(a2hex(ba), 16).modPow(e, n);
const d = pkcs1unpad2(c);
return d;
};
return {
encrypt,
decrypt,
hex2a
};
};
const settings = _GM_getValue("settings", null);
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
__name: "DownloadContent",
setup(__props) {
const message = naiveUi.useMessage();
const showModal = vue.ref(false);
const showVideo = vue.ref(false);
const buttonThemeOverrides = {
textColorTextHover: "#2777F8",
textColorTextPressed: "#2777F8",
textColorTextFocus: "#2777F8"
};
const menuThemeOverrides = {
itemColorActive: "#EEF0FF",
itemColorActiveHover: "#EEF0FF",
itemTextColorActive: "#2777F8",
itemTextColorActiveHover: "#2777F8"
};
const downloads = vue.ref([]);
const keys = useMagicKeys();
const ctrlAltD = keys["Ctrl+Alt+D"];
const ctrlAltO = keys["Ctrl+Alt+O"];
const videoRef = vue.ref(null);
const videoList = vue.ref([]);
const player = vue.ref(null);
const saveTimer = vue.ref(null);
const layoutMaxHeight = vue.ref("800px");
const menuOptions = vue.ref([]);
const menuValue = vue.ref("");
vue.watch(ctrlAltD, (v) => {
if (v) {
handleDownload();
}
});
vue.watch(ctrlAltO, (v) => {
if (v) {
openFile();
}
});
const getSelectFile = () => {
const files = [];
downloads.value = [];
const lists = document.querySelectorAll(".list-contents > ul > li");
lists.forEach((item) => {
const checkbox = item.querySelector('input[type="checkbox"]');
if (checkbox && checkbox.checked) {
files.push({
name: item.getAttribute("title"),
isDir: item.getAttribute("file_type") === "0" ? true : false,
code: item.getAttribute("pick_code"),
cateId: item.getAttribute("cate_id") || "",
fileMode: item.getAttribute("file_mode") || ""
});
}
});
if (files.length === 0) {
message.destroyAll();
message.warning("请选择文件");
return false;
}
return files;
};
const handleDownload = async () => {
try {
const files = getSelectFile();
if (!files) return;
const loading = message.loading("获取下载链接中...");
for (const file of files) {
if (file.isDir) {
loading.destroy();
message.error("暂不支持下载文件夹,请勿选择文件夹");
return;
}
const download = await getDownLoadUrl(file);
downloads.value.push(download);
}
if (downloads.value.length === 0) {
loading.destroy();
message.error("获取下载链接失败");
return;
} else {
loading.destroy();
showModal.value = true;
}
} catch (error) {
console.error(error);
message.error(`获取信息失败,错误信息:${error}`);
}
};
const openFile = () => {
const files = getSelectFile();
if (!files) return;
message.warning("浏览器可能会拦截弹出窗口,请允许弹出窗口权限");
files.forEach((file) => {
if (file.isDir) {
window.open(`https://115.com/?cid=${file.cateId}&offset=0&tab=&mode=wangpan`);
} else if (file.fileMode === "9") {
window.open(`https://v.anxia.com/?pickcode=${file.code}&share_id=0`);
}
});
};
const handleClose = () => {
showModal.value = false;
};
const handlePlay = async () => {
try {
const files = getSelectFile();
if (!files) return;
videoList.value = [];
for (const file of files) {
if (file.isDir) {
message.error("暂不支持播放文件夹,请勿选择文件夹");
return;
}
if (file.fileMode === "9") {
videoList.value.push({
name: file.name,
code: file.code
});
}
}
if (videoList.value.length === 0) {
message.error("未选择视频文件");
return;
}
menuOptions.value = videoList.value.map((item) => {
return {
label: item.name,
key: item.code
};
});
menuValue.value = videoList.value[0].code;
videoList.value[0].url = await getVideoUrl(videoList.value[0].code);
videoList.value[0].time = await getVideoHistory(videoList.value[0].code) || 0;
showVideo.value = true;
vue.nextTick(() => {
if (videoRef.value) {
if (document.createElement("video").canPlayType("application/vnd.apple.mpegurl")) {
player.value = new Player({
el: videoRef.value,
url: videoList.value[0].url,
autoplay: settings ? settings.video.autoplay : true,
fluid: true,
volume: settings ? settings.video.volume : 1,
defaultPlaybackRate: settings ? settings.video.defaultPlaybackRate : 1,
playbackRate: {
list: [5, 4, 3, 2, 1.5, 1.25, 1, 0.75, 0.5]
},
rotate: true,
pip: true,
dynamicBg: {
disable: false
}
});
} else if (HlsJsPlugin.isSupported()) {
player.value = new Player({
el: videoRef.value,
isLive: false,
url: videoList.value[0].url,
plugins: [HlsJsPlugin],
autoplay: settings ? settings.video.autoplay : true,
fluid: true,
volume: settings ? settings.video.volume : 1,
defaultPlaybackRate: settings ? settings.video.defaultPlaybackRate : 1,
playbackRate: {
list: [5, 4, 3, 2, 1.5, 1.25, 1, 0.75, 0.5]
},
rotate: true,
pip: true,
dynamicBg: {
disable: false
}
});
}
if (player.value) {
if (!settings || settings.video.history) {
player.value.currentTime = videoList.value[0].time;
saveTimer.value = setInterval(() => {
if (player.value.paused) {
return;
}
const time = player.value.currentTime;
if (time && Math.floor(time) !== videoList.value[0].time) {
videoList.value[0].time = Math.floor(time);
setVideoHistory(files[0].code, Math.floor(time));
}
}, 5e3);
}
player.value.on(Player.Events.VIDEO_RESIZE, () => {
var _a;
layoutMaxHeight.value = ((_a = videoRef.value) == null ? void 0 : _a.clientHeight) + "px";
});
}
}
});
} catch (error) {
console.error(error);
message.error(`视频播放失败,错误信息:${error}`);
}
};
const getVideoUrl = (code) => {
return new Promise((resolve, reject) => {
getCookie().then((cookie) => {
var _a, _b, _c;
_GM_xmlhttpRequest({
method: "GET",
url: `https://v.anxia.com/webapi/files/video?pickcode=${code}&share_id=0&local=1`,
headers: {
Cookie: `CID=${(_a = cookie.find((item) => item.name === "CID")) == null ? void 0 : _a.value};SEID=${(_b = cookie.find((item) => item.name === "SEID")) == null ? void 0 : _b.value};UID=${(_c = cookie.find((item) => item.name === "UID")) == null ? void 0 : _c.value}`
},
onload: (response) => {
const json = JSON.parse(response.responseText);
if (json.state) {
if (json.video_url) {
resolve(json.video_url.replace("http://", "https://"));
} else {
reject("视频地址获取失败");
}
} else {
reject(json.error);
}
},
onerror: (error) => {
reject(error);
}
});
}).catch((error) => {
reject(error);
});
});
};
const getVideoHistory = (code) => {
return new Promise((resolve, reject) => {
getCookie().then((cookie) => {
var _a, _b, _c;
_GM_xmlhttpRequest({
method: "GET",
url: `https://v.anxia.com/webapi/files/history?pick_code=${code}&fetch=one&category=1&share_id=0`,
headers: {
Cookie: `CID=${(_a = cookie.find((item) => item.name === "CID")) == null ? void 0 : _a.value};SEID=${(_b = cookie.find((item) => item.name === "SEID")) == null ? void 0 : _b.value};UID=${(_c = cookie.find((item) => item.name === "UID")) == null ? void 0 : _c.value}`
},
onload: (response) => {
const json = JSON.parse(response.responseText);
if (json.state) {
resolve(json.data.time ? json.data.time : 0);
} else {
if (json.error) {
reject(json.error);
} else {
resolve(0);
}
}
},
onerror: (error) => {
reject(error);
}
});
}).catch((error) => {
reject(error);
});
});
};
const handleVideoClose = () => {
if (saveTimer.value) {
clearInterval(saveTimer.value);
saveTimer.value = null;
}
if (player.value) {
player.value.destroy();
player.value = null;
}
showVideo.value = false;
};
const setVideoHistory = (code, time) => {
getCookie().then((cookie) => {
var _a, _b, _c;
_GM_xmlhttpRequest({
method: "POST",
url: "https://v.anxia.com/webapi/files/history",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Cookie: `CID=${(_a = cookie.find((item) => item.name === "CID")) == null ? void 0 : _a.value};SEID=${(_b = cookie.find((item) => item.name === "SEID")) == null ? void 0 : _b.value};UID=${(_c = cookie.find((item) => item.name === "UID")) == null ? void 0 : _c.value}`
},
data: `op=update&pick_code=${code}&time=${time}&definition=0&category=1&share_id=0`
});
});
};
const handleMenuUpdate = async (value) => {
try {
if (player.value) {
const videoIndex = videoList.value.findIndex((item) => item.code === value);
if (!videoList.value[videoIndex].url) {
videoList.value[videoIndex].url = await getVideoUrl(value);
videoList.value[videoIndex].time = await getVideoHistory(value) || 0;
}
if (saveTimer.value) {
clearInterval(saveTimer.value);
saveTimer.value = null;
}
player.value.switchURL(videoList.value[videoIndex].url);
if (!settings || settings.video.autoplay) {
player.value.play();
}
if (!settings || settings.video.history) {
player.value.currentTime = videoList.value[videoIndex].time;
saveTimer.value = setInterval(() => {
if (player.value.paused) {
return;
}
const time = player.value.currentTime;
if (time && Math.floor(time) !== videoList.value[videoIndex].time) {
videoList.value[videoIndex].time = Math.floor(time);
setVideoHistory(value, Math.floor(time));
}
}, 5e3);
}
}
} catch (error) {
console.error(error);
message.error(`视频播放失败,错误信息:${error}`);
}
};
const getCookie = () => {
return new Promise((resolve, reject) => {
_GM_cookie.list({
domain: "115.com"
}, (cookie, error) => {
if (error) {
reject(error);
} else {
resolve(cookie);
}
});
});
};
return (_ctx, _cache) => {
const _component_NButton = naiveUi.NButton;
const _component_NListItem = naiveUi.NListItem;
const _component_NList = naiveUi.NList;
const _component_NCard = naiveUi.NCard;
const _component_NModal = naiveUi.NModal;
const _component_NMenu = naiveUi.NMenu;
const _component_NLayoutSider = naiveUi.NLayoutSider;
const _component_NLayout = naiveUi.NLayout;
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [(vue.unref(settings) ? vue.unref(settings).download.enable : true) ? (vue.openBlock(), vue.createBlock(_component_NButton, {
key: 0,
text: "",
"theme-overrides": buttonThemeOverrides,
onClick: handleDownload
}, {
default: vue.withCtx(() => [vue.createTextVNode(" 下载 ")]),
_: 1
})) : vue.createCommentVNode("", true), (vue.unref(settings) ? vue.unref(settings).openNewTab.enable : true) ? (vue.openBlock(), vue.createBlock(_component_NButton, {
key: 1,
text: "",
"theme-overrides": buttonThemeOverrides,
style: {
"margin-left": "1rem"
},
onClick: openFile
}, {
default: vue.withCtx(() => [vue.createTextVNode(" 批量新标签打开 ")]),
_: 1
})) : vue.createCommentVNode("", true), (vue.unref(settings) ? vue.unref(settings).video.enable : true) ? (vue.openBlock(), vue.createBlock(_component_NButton, {
key: 2,
text: "",
"theme-overrides": buttonThemeOverrides,
style: {
"margin-left": "1rem"
},
onClick: handlePlay
}, {
default: vue.withCtx(() => [vue.createTextVNode(" 播放 ")]),
_: 1
})) : vue.createCommentVNode("", true), vue.createVNode(_component_NModal, {
show: showModal.value,
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => showModal.value = $event)
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NCard, {
style: {
"width": "40%"
},
title: "文件下载",
bordered: false,
role: "dialog",
closable: "",
onClose: handleClose
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NList, {
hoverable: ""
}, {
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(downloads.value, (item, index) => {
return vue.openBlock(), vue.createBlock(_component_NListItem, {
key: index
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NButton, {
text: "",
tag: "a",
href: item.url,
target: "_blank",
"theme-overrides": buttonThemeOverrides
}, {
default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(item.name), 1)]),
_: 2
}, 1032, ["href"])]),
_: 2
}, 1024);
}), 128))]),
_: 1
})]),
_: 1
})]),
_: 1
}, 8, ["show"]), vue.createVNode(_component_NModal, {
show: showVideo.value,
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => showVideo.value = $event),
onAfterLeave: handleVideoClose
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NCard, {
style: {
"width": "60%"
},
title: "视频播放",
bordered: false,
role: "dialog",
closable: "",
onClose: handleVideoClose
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NLayout, {
"has-sider": "",
"content-style": {
"max-height": layoutMaxHeight.value
}
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NLayoutSider, {
"native-scrollbar": false,
bordered: ""
}, {
default: vue.withCtx(() => [vue.createVNode(_component_NMenu, {
value: menuValue.value,
"onUpdate:value": [_cache[1] || (_cache[1] = ($event) => menuValue.value = $event), handleMenuUpdate],
options: menuOptions.value,
"theme-overrides": menuThemeOverrides
}, null, 8, ["value", "options"])]),
_: 1
}), vue.createVNode(_component_NLayout, {
"native-scrollbar": false
}, {
default: vue.withCtx(() => [vue.createElementVNode("div", {
ref_key: "videoRef",
ref: videoRef,
class: "video-js"
}, null, 512)]),
_: 1
})]),
_: 1
}, 8, ["content-style"])]),
_: 1
})]),
_: 1
}, 8, ["show"])], 64);
};
}
});
const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6f012690"]]);
const _sfc_main$1 = {};
const _hoisted_1$1 = { style: { "height": "100%", "display": "flex", "align-items": "center", "margin-left": "1rem" } };
function _sfc_render(_ctx, _cache) {
const _component_DownloadContent = __unplugin_components_0;
const _component_NMessageProvider = naiveUi.NMessageProvider;
const _component_NModalProvider = naiveUi.NModalProvider;
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
vue.createVNode(_component_NModalProvider, null, {
default: vue.withCtx(() => [
vue.createVNode(_component_NMessageProvider, null, {
default: vue.withCtx(() => [
vue.createVNode(_component_DownloadContent)
]),
_: 1
})
]),
_: 1
})
]);
}
const Download = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
const _withScopeId = (n) => (vue.pushScopeId("data-v-ca066951"), n = n(), vue.popScopeId(), n);
const _hoisted_1 = { style: { "display": "flex", "justify-content": "center", "margin-top": "8px" } };
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("svg", {
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink",
viewBox: "0 0 1024 1024"
}, [
/* @__PURE__ */ vue.createElementVNode("path", {
d: "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 0 0 9.3-35.2l-.9-2.6a443.74 443.74 0 0 0-79.7-137.9l-1.8-2.1a32.12 32.12 0 0 0-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 0 0-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 0 0-25.8 25.7l-15.8 85.4a351.86 351.86 0 0 0-99 57.4l-81.9-29.1a32 32 0 0 0-35.1 9.5l-1.8 2.1a446.02 446.02 0 0 0-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1c0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 0 0-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0 0 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0 0 25.8 25.7l2.7.5a449.4 449.4 0 0 0 159 0l2.7-.5a32.05 32.05 0 0 0 25.8-25.7l15.7-85a350 350 0 0 0 99.7-57.6l81.3 28.9a32 32 0 0 0 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1l74.7 63.9a370.03 370.03 0 0 1-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3l-17.9 97a377.5 377.5 0 0 1-85 0l-17.9-97.2l-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9l-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5l-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5c0-15.3 1.2-30.6 3.7-45.5l6.5-40l-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2l31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3l17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97l38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8l92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 0 1 512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 0 1 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 0 1 624 502c0 29.9-11.7 58-32.8 79.2z",
fill: "currentColor"
})
], -1));
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, " 115+ 设置 ", -1));
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("svg", {
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink",
viewBox: "0 0 1024 1024"
}, [
/* @__PURE__ */ vue.createElementVNode("path", {
d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z",
fill: "currentColor"
}),
/* @__PURE__ */ vue.createElementVNode("path", {
d: "M464 336a48 48 0 1 0 96 0a48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z",
fill: "currentColor"
})
], -1));
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", null, "删除离线下载项时可默认选择删除源文件", -1));
const _hoisted_6 = { style: { "display": "flex", "justify-content": "end" } };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "Setting",
setup(__props) {
const buttonThemeOverrides = {
textColorTextHover: "#2777F8",
textColorTextPressed: "#2777F8",
textColorTextFocus: "#2777F8"
};
const showModal = vue.ref(false);
const settingsRef = vue.ref(
settings ?? {
sidebar: {
enable: true
},
deleteSource: {
enable: true
},
download: {
enable: true
},
openNewTab: {
enable: true
},
oldButton: {
enable: true
},
video: {
enable: true,
volume: 1,
defaultPlaybackRate: 1,
autoplay: true,
history: true
}
}
);
const handleOpen = () => {
showModal.value = true;
};
const handleClose = () => {
showModal.value = false;
};
const handleSave = () => {
_GM_setValue("settings", settingsRef.value);
showModal.value = false;
history.go(0);
};
return (_ctx, _cache) => {
const _component_NIcon = naiveUi.NIcon;
const _component_NButton = naiveUi.NButton;
const _component_NSwitch = naiveUi.NSwitch;
const _component_NFormItem = naiveUi.NFormItem;
const _component_NPopover = naiveUi.NPopover;
const _component_NForm = naiveUi.NForm;
const _component_NTabPane = naiveUi.NTabPane;
const _component_NSlider = naiveUi.NSlider;
const _component_NRadio = naiveUi.NRadio;
const _component_NSpace = naiveUi.NSpace;
const _component_NRadioGroup = naiveUi.NRadioGroup;
const _component_NTabs = naiveUi.NTabs;
const _component_NCard = naiveUi.NCard;
const _component_NModal = naiveUi.NModal;
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createVNode(_component_NButton, {
text: "",
style: { "font-size": "12px" },
"theme-overrides": buttonThemeOverrides,
onClick: handleOpen
}, {
default: vue.withCtx(() => [
vue.createElementVNode("div", null, [
vue.createVNode(_component_NIcon, { size: "24" }, {
default: vue.withCtx(() => [
_hoisted_2
]),
_: 1
})
]),
_hoisted_3
]),
_: 1
}),
vue.createVNode(_component_NModal, {
show: vue.unref(showModal),
"onUpdate:show": _cache[10] || (_cache[10] = ($event) => vue.isRef(showModal) ? showModal.value = $event : null)
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NCard, {
style: { "width": "40%" },
title: "115+ 设置",
bordered: false,
role: "dialog",
closable: "",
onClose: handleClose
}, {
action: vue.withCtx(() => [
vue.createElementVNode("div", _hoisted_6, [
vue.createVNode(_component_NButton, {
type: "primary",
onClick: handleSave
}, {
default: vue.withCtx(() => [
vue.createTextVNode("保存")
]),
_: 1
})
])
]),
default: vue.withCtx(() => [
vue.createVNode(_component_NTabs, {
type: "segment",
animated: ""
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NTabPane, {
name: "functionSwitch",
tab: "功能开关"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NForm, {
ref: "formRef",
"label-placement": "left",
"label-width": "auto",
"show-feedback": false
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NFormItem, {
label: "精简侧边栏",
path: "sidebar.enable"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).sidebar.enable,
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => vue.unref(settingsRef).sidebar.enable = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "默认删除源文件",
path: "deleteSource.enable"
}, {
label: vue.withCtx(() => [
vue.createTextVNode(" 默认删除源文件 "),
vue.createVNode(_component_NPopover, { trigger: "hover" }, {
trigger: vue.withCtx(() => [
vue.createVNode(_component_NIcon, { size: "14" }, {
default: vue.withCtx(() => [
_hoisted_4
]),
_: 1
})
]),
default: vue.withCtx(() => [
_hoisted_5
]),
_: 1
})
]),
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).deleteSource.enable,
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => vue.unref(settingsRef).deleteSource.enable = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "下载文件",
path: "download.enable"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).download.enable,
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => vue.unref(settingsRef).download.enable = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "批量新标签打开",
path: "openNewTab.enable"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).openNewTab.enable,
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => vue.unref(settingsRef).openNewTab.enable = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "还原离线下载按钮",
path: "oldButton.enable"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).oldButton.enable,
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => vue.unref(settingsRef).oldButton.enable = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "视频播放",
path: "video.enable"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).video.enable,
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => vue.unref(settingsRef).video.enable = $event)
}, null, 8, ["value"])
]),
_: 1
})
]),
_: 1
}, 512)
]),
_: 1
}),
vue.createVNode(_component_NTabPane, {
name: "playSetting",
tab: "播放设置"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NForm, {
ref: "formRef",
"label-placement": "left",
"label-width": "auto",
"show-feedback": false
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NFormItem, {
label: "默认音量",
path: "video.volume"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSlider, {
value: vue.unref(settingsRef).video.volume,
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => vue.unref(settingsRef).video.volume = $event),
step: 0.01,
max: 1,
"format-tooltip": (v) => `${(v * 100).toFixed(0)}%`
}, null, 8, ["value", "format-tooltip"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "默认速度",
path: "video.defaultPlaybackRate"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NRadioGroup, {
value: vue.unref(settingsRef).video.defaultPlaybackRate,
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => vue.unref(settingsRef).video.defaultPlaybackRate = $event),
name: "radiogroup"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSpace, null, {
default: vue.withCtx(() => [
vue.createVNode(_component_NRadio, { value: 0.5 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 0.5x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 0.75 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 0.75x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 1 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 1x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 1.25 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 1.25x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 1.5 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 1.5x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 2 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 2x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 3 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 3x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 4 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 4x ")
]),
_: 1
}),
vue.createVNode(_component_NRadio, { value: 5 }, {
default: vue.withCtx(() => [
vue.createTextVNode(" 5x ")
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "自动播放",
path: "video.autoplay"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).video.autoplay,
"onUpdate:value": _cache[8] || (_cache[8] = ($event) => vue.unref(settingsRef).video.autoplay = $event)
}, null, 8, ["value"])
]),
_: 1
}),
vue.createVNode(_component_NFormItem, {
label: "同步播放进度",
path: "video.history"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_NSwitch, {
value: vue.unref(settingsRef).video.history,
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => vue.unref(settingsRef).video.history = $event)
}, null, 8, ["value"])
]),
_: 1
})
]),
_: 1
}, 512)
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}, 8, ["show"])
]);
};
}
});
const Setting = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ca066951"]]);
vue.createApp(Setting).mount(
(() => {
const navigation_ceiling = document.querySelector(".navigation-ceiling");
const setting = document.createElement("div");
if (navigation_ceiling) {
navigation_ceiling.appendChild(setting);
}
return setting;
})()
);
if (!settings || settings.sidebar.enable) {
vue.createApp(Sidebar).mount(
(() => {
const wrap_hflow = document.getElementsByClassName("wrap-hflow")[0];
const site_left_bar = document.getElementById("site_left_bar");
const sidebar = document.createElement("div");
sidebar.addEventListener("mousedown", (e) => {
e.stopPropagation();
});
if (site_left_bar && wrap_hflow) {
wrap_hflow.insertBefore(sidebar, site_left_bar);
wrap_hflow.removeChild(site_left_bar);
}
return sidebar;
})()
);
}
if (!settings || settings.download.enable || settings.openNewTab.enable || settings.video.enable) {
vue.createApp(Download).mount(
(() => {
const js_top_header_file_path_box = document.getElementById("js_top_header_file_path_box");
const download = document.createElement("div");
download.addEventListener("mousedown", (e) => {
e.stopPropagation();
});
if (js_top_header_file_path_box) {
js_top_header_file_path_box.appendChild(download);
}
return download;
})()
);
}
if (!settings || settings.deleteSource.enable) {
const observer = new MutationObserver((mutationsList) => {
mutationsList.some((mutation) => {
if (mutation.type === "childList" && mutation.addedNodes.length > 0 && mutation.addedNodes[0].className === "dialog-box dialog-mini window-current") {
const checkBox = document.querySelector("#js_del_task_source");
if (checkBox) {
checkBox.checked = true;
}
return true;
}
return false;
});
});
observer.observe(document.querySelector("body"), { childList: true });
}
if (!settings || settings.oldButton.enable) {
const leftTvf = document.querySelector(".left-tvf");
const replaceNodeWithDiv = (parentNode, index) => {
const node = parentNode.childNodes[index];
if (node.nodeType === 8 && node.nodeValue.includes("href")) {
const div = document.createElement("div");
div.innerHTML = node.nodeValue;
parentNode.replaceChild(div, node);
}
};
if (leftTvf) {
replaceNodeWithDiv(leftTvf, 9);
replaceNodeWithDiv(leftTvf, 11);
}
}
})(Vue, naive, CryptoJS, bigInt, Player, HlsJsPlugin);