mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 15:09:12 +00:00
add: ClashRuleProvider
This commit is contained in:
828
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Config-C3BpNVeC.js
vendored
Normal file
828
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Config-C3BpNVeC.js
vendored
Normal file
@@ -0,0 +1,828 @@
|
||||
import { importShared } from './__federation_fn_import-JrT3xvdd.js';
|
||||
import { _ as _export_sfc } from './_plugin-vue_export-helper-pcqpp-6-.js';
|
||||
|
||||
const {createTextVNode:_createTextVNode,resolveComponent:_resolveComponent,withCtx:_withCtx,createVNode:_createVNode,toDisplayString:_toDisplayString,openBlock:_openBlock,createBlock:_createBlock,createCommentVNode:_createCommentVNode,createElementVNode:_createElementVNode,mergeProps:_mergeProps,withModifiers:_withModifiers,createElementBlock:_createElementBlock} = await importShared('vue');
|
||||
|
||||
|
||||
const _hoisted_1 = { class: "plugin-config" };
|
||||
const _hoisted_2 = { class: "d-flex align-center" };
|
||||
const _hoisted_3 = { class: "font-weight-medium" };
|
||||
const _hoisted_4 = { class: "text-body-2" };
|
||||
|
||||
const {ref,reactive,onMounted,computed} = await importShared('vue');
|
||||
|
||||
|
||||
// Props
|
||||
|
||||
const _sfc_main = {
|
||||
__name: 'Config',
|
||||
props: {
|
||||
initialConfig: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
api: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
emits: ['save', 'close'],
|
||||
setup(__props, { emit: __emit }) {
|
||||
|
||||
const props = __props;
|
||||
|
||||
// 状态变量
|
||||
const form = ref(null);
|
||||
const isFormValid = ref(true);
|
||||
const error = ref(null);
|
||||
const saving = ref(false);
|
||||
const testing = ref(false);
|
||||
const showClashSecret = ref(false);
|
||||
const selectedCronOption = ref('6hours');
|
||||
|
||||
// Test result state
|
||||
const testResult = reactive({
|
||||
show: false,
|
||||
success: false,
|
||||
title: '',
|
||||
message: ''
|
||||
});
|
||||
|
||||
// Cron 选项
|
||||
const cronOptions = [
|
||||
{text: '每5分钟', value: '5min', cron: '*/5 * * * *'},
|
||||
{text: '每15分钟', value: '15min', cron: '*/15 * * * *'},
|
||||
{text: '每30分钟', value: '30min', cron: '*/30 * * * *'},
|
||||
{text: '每小时', value: '1hour', cron: '0 * * * *'},
|
||||
{text: '每2小时', value: '2hours', cron: '0 */2 * * *'},
|
||||
{text: '每6小时', value: '6hours', cron: '0 */6 * * *'},
|
||||
{text: '每12小时', value: '12hours', cron: '0 */12 * * *'},
|
||||
{text: '每天', value: '1day', cron: '0 0 * * *'},
|
||||
{text: '自定义', value: 'custom', cron: ''},
|
||||
];
|
||||
|
||||
// 默认配置
|
||||
const defaultConfig = {
|
||||
enabled: false,
|
||||
sub_links: [],
|
||||
filter_keywords: ["公益性", "高延迟", "域名", "官网", "重启", "过期时间", "系统代理"],
|
||||
clash_dashboard_url: '',
|
||||
clash_dashboard_secret: '',
|
||||
movie_pilot_url: '',
|
||||
cron_string: '0 */6 * * *',
|
||||
timeout: 10,
|
||||
retry_times: 3,
|
||||
proxy: false,
|
||||
notify: false,
|
||||
auto_update_subscriptions: true,
|
||||
ruleset_prefix: '📂<-',
|
||||
};
|
||||
|
||||
// 响应式配置对象
|
||||
const config = reactive({...defaultConfig});
|
||||
|
||||
// 自定义事件
|
||||
const emit = __emit;
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
if (props.initialConfig) {
|
||||
Object.keys(props.initialConfig).forEach(key => {
|
||||
if (key in config) {
|
||||
config[key] = props.initialConfig[key];
|
||||
}
|
||||
});
|
||||
|
||||
// 设置对应的cron选项
|
||||
const cronOption = cronOptions.find(option => option.cron === config.cron_string);
|
||||
if (cronOption) {
|
||||
selectedCronOption.value = cronOption.value;
|
||||
} else {
|
||||
selectedCronOption.value = 'custom';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 验证函数
|
||||
function isValidUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function validateSubLinks(links) {
|
||||
if (!links || links.length === 0) {
|
||||
return '至少需要一个订阅链接'
|
||||
}
|
||||
|
||||
for (const link of links) {
|
||||
if (!isValidUrl(link)) {
|
||||
return `无效的订阅链接: ${link}`
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function validateCronExpression(cronStr) {
|
||||
if (!cronStr) return '请输入Cron表达式'
|
||||
|
||||
// 简单的cron表达式验证
|
||||
const parts = cronStr.trim().split(/\s+/);
|
||||
if (parts.length !== 5) {
|
||||
return 'Cron表达式应包含5个部分 (分 时 日 月 周)'
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// 更新cron字符串
|
||||
function updateCronString(optionValue) {
|
||||
const option = cronOptions.find(opt => opt.value === optionValue);
|
||||
if (option && option.cron) {
|
||||
config.cron_string = option.cron;
|
||||
}
|
||||
}
|
||||
|
||||
// 测试连接
|
||||
async function testConnection() {
|
||||
testing.value = true;
|
||||
error.value = null;
|
||||
testResult.show = false;
|
||||
|
||||
try {
|
||||
// 验证必需的参数
|
||||
if (!config.clash_dashboard_url) {
|
||||
throw new Error('请先配置 Clash 面板 URL')
|
||||
}
|
||||
if (!config.clash_dashboard_secret) {
|
||||
throw new Error('请先配置 Clash 面板密钥')
|
||||
}
|
||||
if (!config.sub_links || config.sub_links.length === 0) {
|
||||
throw new Error('请先配置至少一个订阅链接')
|
||||
}
|
||||
if (!config.movie_pilot_url || config.movie_pilot_url.length === 0) {
|
||||
throw new Error('请先MoviePilot链接')
|
||||
}
|
||||
// 准备API请求参数
|
||||
const testParams = {
|
||||
clash_dashboard_url: config.clash_dashboard_url,
|
||||
clash_dashboard_secret: config.clash_dashboard_secret,
|
||||
sub_link: config.sub_links[0] // 使用第一个订阅链接进行测试
|
||||
};
|
||||
|
||||
// 调用API进行连接测试
|
||||
const result = await props.api.post('/plugin/ClashRuleProvider/connectivity', testParams);
|
||||
|
||||
// 根据返回结果显示相应消息
|
||||
if (result.success) {
|
||||
testResult.success = true;
|
||||
testResult.title = '连接测试成功!';
|
||||
testResult.message = 'Clash面板和订阅链接连接正常,配置验证通过';
|
||||
testResult.show = true;
|
||||
|
||||
// Auto hide after 5 seconds
|
||||
setTimeout(() => {
|
||||
testResult.show = false;
|
||||
}, 5000);
|
||||
} else {
|
||||
throw new Error(result.message || '连接测试失败,请检查配置')
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.error('连接测试失败:', err);
|
||||
testResult.success = false;
|
||||
testResult.title = '连接测试失败';
|
||||
testResult.message = err.message;
|
||||
testResult.show = true;
|
||||
} finally {
|
||||
testing.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 保存配置
|
||||
async function saveConfig() {
|
||||
if (!isFormValid.value) {
|
||||
error.value = '请修正表单中的错误';
|
||||
return
|
||||
}
|
||||
|
||||
saving.value = true;
|
||||
error.value = null;
|
||||
|
||||
try {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
emit('save', {...config});
|
||||
} catch (err) {
|
||||
console.error('保存配置失败:', err);
|
||||
error.value = err.message || '保存配置失败';
|
||||
} finally {
|
||||
saving.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function extractDomain(url) {
|
||||
try {
|
||||
const domain = new URL(url).hostname;
|
||||
return domain.startsWith('www.') ? domain.substring(4) : domain
|
||||
} catch {
|
||||
return url // 如果解析失败,返回原始URL
|
||||
}
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
function resetForm() {
|
||||
Object.keys(defaultConfig).forEach(key => {
|
||||
config[key] = defaultConfig[key];
|
||||
});
|
||||
selectedCronOption.value = '6hours';
|
||||
|
||||
if (form.value) {
|
||||
form.value.resetValidation();
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭组件
|
||||
function notifyClose() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
// 通知主应用切换到Page页面
|
||||
function notifySwitch() {
|
||||
emit('switch');
|
||||
}
|
||||
|
||||
return (_ctx, _cache) => {
|
||||
const _component_v_card_title = _resolveComponent("v-card-title");
|
||||
const _component_v_icon = _resolveComponent("v-icon");
|
||||
const _component_v_btn = _resolveComponent("v-btn");
|
||||
const _component_v_card_item = _resolveComponent("v-card-item");
|
||||
const _component_v_alert = _resolveComponent("v-alert");
|
||||
const _component_v_switch = _resolveComponent("v-switch");
|
||||
const _component_v_col = _resolveComponent("v-col");
|
||||
const _component_v_row = _resolveComponent("v-row");
|
||||
const _component_v_chip = _resolveComponent("v-chip");
|
||||
const _component_v_combobox = _resolveComponent("v-combobox");
|
||||
const _component_v_text_field = _resolveComponent("v-text-field");
|
||||
const _component_v_select = _resolveComponent("v-select");
|
||||
const _component_v_expansion_panel_title = _resolveComponent("v-expansion-panel-title");
|
||||
const _component_v_expansion_panel_text = _resolveComponent("v-expansion-panel-text");
|
||||
const _component_v_expansion_panel = _resolveComponent("v-expansion-panel");
|
||||
const _component_v_expansion_panels = _resolveComponent("v-expansion-panels");
|
||||
const _component_v_form = _resolveComponent("v-form");
|
||||
const _component_v_card_text = _resolveComponent("v-card-text");
|
||||
const _component_v_spacer = _resolveComponent("v-spacer");
|
||||
const _component_v_card_actions = _resolveComponent("v-card-actions");
|
||||
const _component_v_card = _resolveComponent("v-card");
|
||||
|
||||
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
||||
_createVNode(_component_v_card, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_card_item, null, {
|
||||
append: _withCtx(() => [
|
||||
_createVNode(_component_v_btn, {
|
||||
icon: "",
|
||||
color: "primary",
|
||||
variant: "text",
|
||||
onClick: notifyClose
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { left: "" }, {
|
||||
default: _withCtx(() => _cache[18] || (_cache[18] = [
|
||||
_createTextVNode("mdi-close")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_card_title, null, {
|
||||
default: _withCtx(() => _cache[17] || (_cache[17] = [
|
||||
_createTextVNode("Clash Rule Provider 插件配置")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_card_text, { class: "overflow-y-auto" }, {
|
||||
default: _withCtx(() => [
|
||||
(error.value)
|
||||
? (_openBlock(), _createBlock(_component_v_alert, {
|
||||
key: 0,
|
||||
type: "error",
|
||||
class: "mb-4"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createTextVNode(_toDisplayString(error.value), 1)
|
||||
]),
|
||||
_: 1
|
||||
}))
|
||||
: _createCommentVNode("", true),
|
||||
_createVNode(_component_v_form, {
|
||||
ref_key: "form",
|
||||
ref: form,
|
||||
modelValue: isFormValid.value,
|
||||
"onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((isFormValid).value = $event)),
|
||||
onSubmit: _withModifiers(saveConfig, ["prevent"])
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_cache[28] || (_cache[28] = _createElementVNode("div", { class: "text-subtitle-1 font-weight-bold mt-4 mb-2" }, "基本设置", -1)),
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, {
|
||||
cols: "12",
|
||||
md: "4"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_switch, {
|
||||
modelValue: config.enabled,
|
||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((config.enabled) = $event)),
|
||||
label: "启用插件",
|
||||
color: "primary",
|
||||
inset: "",
|
||||
hint: "启用后插件将开始监控和同步",
|
||||
"persistent-hint": ""
|
||||
}, null, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, {
|
||||
cols: "12",
|
||||
md: "4"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_switch, {
|
||||
modelValue: config.proxy,
|
||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((config.proxy) = $event)),
|
||||
label: "启用代理",
|
||||
color: "primary",
|
||||
inset: "",
|
||||
hint: "是否使用系统代理进行网络请求",
|
||||
"persistent-hint": ""
|
||||
}, null, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, {
|
||||
cols: "12",
|
||||
md: "4"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_switch, {
|
||||
modelValue: config.notify,
|
||||
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((config.notify) = $event)),
|
||||
label: "启用通知",
|
||||
color: "primary",
|
||||
inset: "",
|
||||
hint: "执行完成后发送通知消息",
|
||||
"persistent-hint": ""
|
||||
}, null, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[29] || (_cache[29] = _createElementVNode("div", { class: "text-subtitle-1 font-weight-bold mt-4 mb-2" }, "订阅配置", -1)),
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_combobox, {
|
||||
modelValue: config.sub_links,
|
||||
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((config.sub_links) = $event)),
|
||||
label: "订阅链接",
|
||||
variant: "outlined",
|
||||
multiple: "",
|
||||
chips: "",
|
||||
"closable-chips": "",
|
||||
hint: "添加一个Clash订阅链接",
|
||||
"persistent-hint": "",
|
||||
rules: [validateSubLinks]
|
||||
}, {
|
||||
chip: _withCtx(({ props, item }) => [
|
||||
_createVNode(_component_v_chip, _mergeProps(props, {
|
||||
closable: "",
|
||||
size: "small"
|
||||
}), {
|
||||
default: _withCtx(() => [
|
||||
_createTextVNode(_toDisplayString(extractDomain(item.value)), 1)
|
||||
]),
|
||||
_: 2
|
||||
}, 1040)
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_combobox, {
|
||||
modelValue: config.filter_keywords,
|
||||
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((config.filter_keywords) = $event)),
|
||||
label: "节点过滤关键词",
|
||||
variant: "outlined",
|
||||
multiple: "",
|
||||
chips: "",
|
||||
"closable-chips": "",
|
||||
hint: "添加用于过滤节点的关键词",
|
||||
"persistent-hint": ""
|
||||
}, {
|
||||
chip: _withCtx(({ props, item }) => [
|
||||
_createVNode(_component_v_chip, _mergeProps(props, {
|
||||
closable: "",
|
||||
size: "small",
|
||||
color: "info"
|
||||
}), {
|
||||
default: _withCtx(() => [
|
||||
_createTextVNode(_toDisplayString(item.value), 1)
|
||||
]),
|
||||
_: 2
|
||||
}, 1040)
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[30] || (_cache[30] = _createElementVNode("div", { class: "text-subtitle-1 font-weight-bold mt-4 mb-2" }, "Clash 面板设置", -1)),
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.clash_dashboard_url,
|
||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((config.clash_dashboard_url) = $event)),
|
||||
label: "Clash 面板 URL",
|
||||
variant: "outlined",
|
||||
placeholder: "http://localhost:9090",
|
||||
hint: "Clash 控制面板的访问地址",
|
||||
"persistent-hint": "",
|
||||
rules: [v => !v || isValidUrl(v) || '请输入有效的URL地址']
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "primary" }, {
|
||||
default: _withCtx(() => _cache[19] || (_cache[19] = [
|
||||
_createTextVNode("mdi-web")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.clash_dashboard_secret,
|
||||
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((config.clash_dashboard_secret) = $event)),
|
||||
label: "Clash 面板密钥",
|
||||
variant: "outlined",
|
||||
placeholder: "your-clash-secret",
|
||||
hint: "用于访问Clash API的密钥",
|
||||
"persistent-hint": "",
|
||||
"append-inner-icon": showClashSecret.value ? 'mdi-eye-off' : 'mdi-eye',
|
||||
type: showClashSecret.value ? 'text' : 'password',
|
||||
"onClick:appendInner": _cache[7] || (_cache[7] = $event => (showClashSecret.value = !showClashSecret.value))
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "warning" }, {
|
||||
default: _withCtx(() => _cache[20] || (_cache[20] = [
|
||||
_createTextVNode("mdi-key")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "append-inner-icon", "type"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[31] || (_cache[31] = _createElementVNode("div", { class: "text-subtitle-1 font-weight-bold mt-4 mb-2" }, "MoviePilot 设置", -1)),
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.movie_pilot_url,
|
||||
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((config.movie_pilot_url) = $event)),
|
||||
label: "MoviePilot URL",
|
||||
variant: "outlined",
|
||||
placeholder: "http://localhost:3001",
|
||||
hint: "MoviePilot 服务的访问地址",
|
||||
"persistent-hint": "",
|
||||
rules: [v => !!v || 'MoviePilot URL不能为空', v => isValidUrl(v) || '请输入有效的URL地址']
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "success" }, {
|
||||
default: _withCtx(() => _cache[21] || (_cache[21] = [
|
||||
_createTextVNode("mdi-movie")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[32] || (_cache[32] = _createElementVNode("div", { class: "text-subtitle-1 font-weight-bold mt-4 mb-2" }, "执行设置", -1)),
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_select, {
|
||||
modelValue: selectedCronOption.value,
|
||||
"onUpdate:modelValue": [
|
||||
_cache[9] || (_cache[9] = $event => ((selectedCronOption).value = $event)),
|
||||
updateCronString
|
||||
],
|
||||
label: "执行周期",
|
||||
items: cronOptions,
|
||||
variant: "outlined",
|
||||
"item-title": "text",
|
||||
"item-value": "value",
|
||||
hint: "选择插件执行的时间间隔",
|
||||
"persistent-hint": ""
|
||||
}, null, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
(selectedCronOption.value === 'custom')
|
||||
? (_openBlock(), _createBlock(_component_v_col, {
|
||||
key: 0,
|
||||
cols: "12"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.cron_string,
|
||||
"onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((config.cron_string) = $event)),
|
||||
label: "自定义 Cron 表达式",
|
||||
variant: "outlined",
|
||||
placeholder: "0 */6 * * *",
|
||||
hint: "使用标准Cron表达式格式 (分 时 日 月 周)",
|
||||
"persistent-hint": "",
|
||||
rules: [validateCronExpression]
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "info" }, {
|
||||
default: _withCtx(() => _cache[22] || (_cache[22] = [
|
||||
_createTextVNode("mdi-clock-outline")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
}))
|
||||
: _createCommentVNode("", true),
|
||||
_createVNode(_component_v_col, {
|
||||
cols: "12",
|
||||
md: "6"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.timeout,
|
||||
"onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((config.timeout) = $event)),
|
||||
modelModifiers: { number: true },
|
||||
label: "超时时间 (秒)",
|
||||
variant: "outlined",
|
||||
type: "number",
|
||||
min: "1",
|
||||
max: "300",
|
||||
hint: "请求的超时时间",
|
||||
"persistent-hint": "",
|
||||
rules: [v => v > 0 || '超时时间必须大于0']
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "warning" }, {
|
||||
default: _withCtx(() => _cache[23] || (_cache[23] = [
|
||||
_createTextVNode("mdi-timer")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, {
|
||||
cols: "12",
|
||||
md: "6"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.retry_times,
|
||||
"onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((config.retry_times) = $event)),
|
||||
modelModifiers: { number: true },
|
||||
label: "重试次数",
|
||||
variant: "outlined",
|
||||
type: "number",
|
||||
min: "0",
|
||||
max: "10",
|
||||
hint: "失败时的重试次数",
|
||||
"persistent-hint": "",
|
||||
rules: [v => v >= 0 || '重试次数不能为负数']
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "info" }, {
|
||||
default: _withCtx(() => _cache[24] || (_cache[24] = [
|
||||
_createTextVNode("mdi-refresh")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue", "rules"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_expansion_panels, {
|
||||
variant: "accordion",
|
||||
class: "mt-4"
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_expansion_panel, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_expansion_panel_title, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { class: "mr-2" }, {
|
||||
default: _withCtx(() => _cache[25] || (_cache[25] = [
|
||||
_createTextVNode("mdi-cog")
|
||||
])),
|
||||
_: 1
|
||||
}),
|
||||
_cache[26] || (_cache[26] = _createTextVNode(" 高级选项 "))
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_expansion_panel_text, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_row, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_switch, {
|
||||
modelValue: config.auto_update_subscriptions,
|
||||
"onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((config.auto_update_subscriptions) = $event)),
|
||||
label: "自动更新订阅",
|
||||
color: "primary",
|
||||
inset: "",
|
||||
hint: "定期自动更新Clash订阅配置"
|
||||
}, null, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_col, { cols: "12" }, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_text_field, {
|
||||
modelValue: config.ruleset_prefix,
|
||||
"onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((config.ruleset_prefix) = $event)),
|
||||
label: "规则集前缀",
|
||||
variant: "outlined",
|
||||
placeholder: "📂<-",
|
||||
hint: "为生成的规则集添加前缀",
|
||||
"persistent-hint": ""
|
||||
}, {
|
||||
"prepend-inner": _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { color: "info" }, {
|
||||
default: _withCtx(() => _cache[27] || (_cache[27] = [
|
||||
_createTextVNode("mdi-prefix")
|
||||
])),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["modelValue"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_card_actions, null, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_btn, {
|
||||
color: "primary",
|
||||
onClick: notifySwitch
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createVNode(_component_v_icon, { left: "" }, {
|
||||
default: _withCtx(() => _cache[33] || (_cache[33] = [
|
||||
_createTextVNode("mdi-view-dashboard-edit")
|
||||
])),
|
||||
_: 1
|
||||
}),
|
||||
_cache[34] || (_cache[34] = _createTextVNode(" 规则 "))
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_btn, {
|
||||
color: "secondary",
|
||||
onClick: resetForm
|
||||
}, {
|
||||
default: _withCtx(() => _cache[35] || (_cache[35] = [
|
||||
_createTextVNode("重置")
|
||||
])),
|
||||
_: 1
|
||||
}),
|
||||
_createVNode(_component_v_btn, {
|
||||
color: "info",
|
||||
onClick: testConnection,
|
||||
loading: testing.value
|
||||
}, {
|
||||
default: _withCtx(() => _cache[36] || (_cache[36] = [
|
||||
_createTextVNode("测试连接")
|
||||
])),
|
||||
_: 1
|
||||
}, 8, ["loading"]),
|
||||
_createVNode(_component_v_spacer),
|
||||
_createVNode(_component_v_btn, {
|
||||
color: "primary",
|
||||
disabled: !isFormValid.value,
|
||||
onClick: saveConfig,
|
||||
loading: saving.value
|
||||
}, {
|
||||
default: _withCtx(() => _cache[37] || (_cache[37] = [
|
||||
_createTextVNode(" 保存配置 ")
|
||||
])),
|
||||
_: 1
|
||||
}, 8, ["disabled", "loading"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
(testResult.show)
|
||||
? (_openBlock(), _createBlock(_component_v_alert, {
|
||||
key: 0,
|
||||
type: testResult.success ? 'success' : 'error',
|
||||
variant: "tonal",
|
||||
closable: "",
|
||||
class: "ma-4 mt-0",
|
||||
"onClick:close": _cache[16] || (_cache[16] = $event => (testResult.show = false))
|
||||
}, {
|
||||
default: _withCtx(() => [
|
||||
_createElementVNode("div", _hoisted_2, [
|
||||
_createVNode(_component_v_icon, { class: "mr-2" }, {
|
||||
default: _withCtx(() => [
|
||||
_createTextVNode(_toDisplayString(testResult.success ? 'mdi-check-circle' : 'mdi-alert-circle'), 1)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_createElementVNode("div", null, [
|
||||
_createElementVNode("div", _hoisted_3, _toDisplayString(testResult.title), 1),
|
||||
_createElementVNode("div", _hoisted_4, _toDisplayString(testResult.message), 1)
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["type"]))
|
||||
: _createCommentVNode("", true)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]))
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
const ConfigComponent = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-0e64dae0"]]);
|
||||
|
||||
export { ConfigComponent as default };
|
||||
5
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Config-DXzIavcD.css
vendored
Normal file
5
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Config-DXzIavcD.css
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
.plugin-config[data-v-0e64dae0] {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
40514
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Dashboard-BkyO-3pr.js
vendored
Normal file
40514
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Dashboard-BkyO-3pr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
48
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Page-Bl7XNZ7k.css
vendored
Normal file
48
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Page-Bl7XNZ7k.css
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
.plugin-page[data-v-d5e502a5] {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 使卡片等宽并适应移动端 */
|
||||
.d-flex.flex-wrap[data-v-d5e502a5] {
|
||||
gap: 16px;
|
||||
}
|
||||
.url-display[data-v-d5e502a5] {
|
||||
word-break: break-all;
|
||||
padding: 8px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* 移动端堆叠布局 */
|
||||
@media (max-width: 768px) {
|
||||
.d-flex.flex-wrap[data-v-d5e502a5] {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add visual distinction between sections */
|
||||
.ruleset-section[data-v-d5e502a5] {
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
padding: 16px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.top-section[data-v-d5e502a5] {
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
padding: 16px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
/* Optional: Add different border colors to further distinguish */
|
||||
.ruleset-section[data-v-d5e502a5] {
|
||||
border-left: 4px solid #2196F3; /* Blue accent */
|
||||
}
|
||||
.top-section[data-v-d5e502a5] {
|
||||
border-left: 4px solid #4CAF50; /* Green accent */
|
||||
}
|
||||
.drag-handle[data-v-d5e502a5] {
|
||||
cursor: move;
|
||||
}
|
||||
1118
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Page-DlQgf7u6.js
vendored
Normal file
1118
plugins.v2/clashruleprovider/dist/assets/__federation_expose_Page-DlQgf7u6.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
418
plugins.v2/clashruleprovider/dist/assets/__federation_fn_import-JrT3xvdd.js
vendored
Normal file
418
plugins.v2/clashruleprovider/dist/assets/__federation_fn_import-JrT3xvdd.js
vendored
Normal file
@@ -0,0 +1,418 @@
|
||||
const buildIdentifier = "[0-9A-Za-z-]+";
|
||||
const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
|
||||
const numericIdentifier = "0|[1-9]\\d*";
|
||||
const numericIdentifierLoose = "[0-9]+";
|
||||
const nonNumericIdentifier = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
|
||||
const preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;
|
||||
const preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`;
|
||||
const preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;
|
||||
const preRelease = `(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`;
|
||||
const xRangeIdentifier = `${numericIdentifier}|x|X|\\*`;
|
||||
const xRangePlain = `[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;
|
||||
const hyphenRange = `^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`;
|
||||
const mainVersionLoose = `(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`;
|
||||
const loosePlain = `[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`;
|
||||
const gtlt = "((?:<|>)?=?)";
|
||||
const comparatorTrim = `(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`;
|
||||
const loneTilde = "(?:~>?)";
|
||||
const tildeTrim = `(\\s*)${loneTilde}\\s+`;
|
||||
const loneCaret = "(?:\\^)";
|
||||
const caretTrim = `(\\s*)${loneCaret}\\s+`;
|
||||
const star = "(<|>)?=?\\s*\\*";
|
||||
const caret = `^${loneCaret}${xRangePlain}$`;
|
||||
const mainVersion = `(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`;
|
||||
const fullPlain = `v?${mainVersion}${preRelease}?${build}?`;
|
||||
const tilde = `^${loneTilde}${xRangePlain}$`;
|
||||
const xRange = `^${gtlt}\\s*${xRangePlain}$`;
|
||||
const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
|
||||
const gte0 = "^\\s*>=\\s*0.0.0\\s*$";
|
||||
function parseRegex(source) {
|
||||
return new RegExp(source);
|
||||
}
|
||||
function isXVersion(version) {
|
||||
return !version || version.toLowerCase() === "x" || version === "*";
|
||||
}
|
||||
function pipe(...fns) {
|
||||
return (x) => {
|
||||
return fns.reduce((v, f) => f(v), x);
|
||||
};
|
||||
}
|
||||
function extractComparator(comparatorString) {
|
||||
return comparatorString.match(parseRegex(comparator));
|
||||
}
|
||||
function combineVersion(major, minor, patch, preRelease2) {
|
||||
const mainVersion2 = `${major}.${minor}.${patch}`;
|
||||
if (preRelease2) {
|
||||
return `${mainVersion2}-${preRelease2}`;
|
||||
}
|
||||
return mainVersion2;
|
||||
}
|
||||
function parseHyphen(range) {
|
||||
return range.replace(
|
||||
parseRegex(hyphenRange),
|
||||
(_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease) => {
|
||||
if (isXVersion(fromMajor)) {
|
||||
from = "";
|
||||
} else if (isXVersion(fromMinor)) {
|
||||
from = `>=${fromMajor}.0.0`;
|
||||
} else if (isXVersion(fromPatch)) {
|
||||
from = `>=${fromMajor}.${fromMinor}.0`;
|
||||
} else {
|
||||
from = `>=${from}`;
|
||||
}
|
||||
if (isXVersion(toMajor)) {
|
||||
to = "";
|
||||
} else if (isXVersion(toMinor)) {
|
||||
to = `<${+toMajor + 1}.0.0-0`;
|
||||
} else if (isXVersion(toPatch)) {
|
||||
to = `<${toMajor}.${+toMinor + 1}.0-0`;
|
||||
} else if (toPreRelease) {
|
||||
to = `<=${toMajor}.${toMinor}.${toPatch}-${toPreRelease}`;
|
||||
} else {
|
||||
to = `<=${to}`;
|
||||
}
|
||||
return `${from} ${to}`.trim();
|
||||
}
|
||||
);
|
||||
}
|
||||
function parseComparatorTrim(range) {
|
||||
return range.replace(parseRegex(comparatorTrim), "$1$2$3");
|
||||
}
|
||||
function parseTildeTrim(range) {
|
||||
return range.replace(parseRegex(tildeTrim), "$1~");
|
||||
}
|
||||
function parseCaretTrim(range) {
|
||||
return range.replace(parseRegex(caretTrim), "$1^");
|
||||
}
|
||||
function parseCarets(range) {
|
||||
return range.trim().split(/\s+/).map((rangeVersion) => {
|
||||
return rangeVersion.replace(
|
||||
parseRegex(caret),
|
||||
(_, major, minor, patch, preRelease2) => {
|
||||
if (isXVersion(major)) {
|
||||
return "";
|
||||
} else if (isXVersion(minor)) {
|
||||
return `>=${major}.0.0 <${+major + 1}.0.0-0`;
|
||||
} else if (isXVersion(patch)) {
|
||||
if (major === "0") {
|
||||
return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
|
||||
} else {
|
||||
return `>=${major}.${minor}.0 <${+major + 1}.0.0-0`;
|
||||
}
|
||||
} else if (preRelease2) {
|
||||
if (major === "0") {
|
||||
if (minor === "0") {
|
||||
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${minor}.${+patch + 1}-0`;
|
||||
} else {
|
||||
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
|
||||
}
|
||||
} else {
|
||||
return `>=${major}.${minor}.${patch}-${preRelease2} <${+major + 1}.0.0-0`;
|
||||
}
|
||||
} else {
|
||||
if (major === "0") {
|
||||
if (minor === "0") {
|
||||
return `>=${major}.${minor}.${patch} <${major}.${minor}.${+patch + 1}-0`;
|
||||
} else {
|
||||
return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
|
||||
}
|
||||
}
|
||||
return `>=${major}.${minor}.${patch} <${+major + 1}.0.0-0`;
|
||||
}
|
||||
}
|
||||
);
|
||||
}).join(" ");
|
||||
}
|
||||
function parseTildes(range) {
|
||||
return range.trim().split(/\s+/).map((rangeVersion) => {
|
||||
return rangeVersion.replace(
|
||||
parseRegex(tilde),
|
||||
(_, major, minor, patch, preRelease2) => {
|
||||
if (isXVersion(major)) {
|
||||
return "";
|
||||
} else if (isXVersion(minor)) {
|
||||
return `>=${major}.0.0 <${+major + 1}.0.0-0`;
|
||||
} else if (isXVersion(patch)) {
|
||||
return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
|
||||
} else if (preRelease2) {
|
||||
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
|
||||
}
|
||||
return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
|
||||
}
|
||||
);
|
||||
}).join(" ");
|
||||
}
|
||||
function parseXRanges(range) {
|
||||
return range.split(/\s+/).map((rangeVersion) => {
|
||||
return rangeVersion.trim().replace(
|
||||
parseRegex(xRange),
|
||||
(ret, gtlt2, major, minor, patch, preRelease2) => {
|
||||
const isXMajor = isXVersion(major);
|
||||
const isXMinor = isXMajor || isXVersion(minor);
|
||||
const isXPatch = isXMinor || isXVersion(patch);
|
||||
if (gtlt2 === "=" && isXPatch) {
|
||||
gtlt2 = "";
|
||||
}
|
||||
preRelease2 = "";
|
||||
if (isXMajor) {
|
||||
if (gtlt2 === ">" || gtlt2 === "<") {
|
||||
return "<0.0.0-0";
|
||||
} else {
|
||||
return "*";
|
||||
}
|
||||
} else if (gtlt2 && isXPatch) {
|
||||
if (isXMinor) {
|
||||
minor = 0;
|
||||
}
|
||||
patch = 0;
|
||||
if (gtlt2 === ">") {
|
||||
gtlt2 = ">=";
|
||||
if (isXMinor) {
|
||||
major = +major + 1;
|
||||
minor = 0;
|
||||
patch = 0;
|
||||
} else {
|
||||
minor = +minor + 1;
|
||||
patch = 0;
|
||||
}
|
||||
} else if (gtlt2 === "<=") {
|
||||
gtlt2 = "<";
|
||||
if (isXMinor) {
|
||||
major = +major + 1;
|
||||
} else {
|
||||
minor = +minor + 1;
|
||||
}
|
||||
}
|
||||
if (gtlt2 === "<") {
|
||||
preRelease2 = "-0";
|
||||
}
|
||||
return `${gtlt2 + major}.${minor}.${patch}${preRelease2}`;
|
||||
} else if (isXMinor) {
|
||||
return `>=${major}.0.0${preRelease2} <${+major + 1}.0.0-0`;
|
||||
} else if (isXPatch) {
|
||||
return `>=${major}.${minor}.0${preRelease2} <${major}.${+minor + 1}.0-0`;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
);
|
||||
}).join(" ");
|
||||
}
|
||||
function parseStar(range) {
|
||||
return range.trim().replace(parseRegex(star), "");
|
||||
}
|
||||
function parseGTE0(comparatorString) {
|
||||
return comparatorString.trim().replace(parseRegex(gte0), "");
|
||||
}
|
||||
function compareAtom(rangeAtom, versionAtom) {
|
||||
rangeAtom = +rangeAtom || rangeAtom;
|
||||
versionAtom = +versionAtom || versionAtom;
|
||||
if (rangeAtom > versionAtom) {
|
||||
return 1;
|
||||
}
|
||||
if (rangeAtom === versionAtom) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
function comparePreRelease(rangeAtom, versionAtom) {
|
||||
const { preRelease: rangePreRelease } = rangeAtom;
|
||||
const { preRelease: versionPreRelease } = versionAtom;
|
||||
if (rangePreRelease === void 0 && !!versionPreRelease) {
|
||||
return 1;
|
||||
}
|
||||
if (!!rangePreRelease && versionPreRelease === void 0) {
|
||||
return -1;
|
||||
}
|
||||
if (rangePreRelease === void 0 && versionPreRelease === void 0) {
|
||||
return 0;
|
||||
}
|
||||
for (let i = 0, n = rangePreRelease.length; i <= n; i++) {
|
||||
const rangeElement = rangePreRelease[i];
|
||||
const versionElement = versionPreRelease[i];
|
||||
if (rangeElement === versionElement) {
|
||||
continue;
|
||||
}
|
||||
if (rangeElement === void 0 && versionElement === void 0) {
|
||||
return 0;
|
||||
}
|
||||
if (!rangeElement) {
|
||||
return 1;
|
||||
}
|
||||
if (!versionElement) {
|
||||
return -1;
|
||||
}
|
||||
return compareAtom(rangeElement, versionElement);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function compareVersion(rangeAtom, versionAtom) {
|
||||
return compareAtom(rangeAtom.major, versionAtom.major) || compareAtom(rangeAtom.minor, versionAtom.minor) || compareAtom(rangeAtom.patch, versionAtom.patch) || comparePreRelease(rangeAtom, versionAtom);
|
||||
}
|
||||
function eq(rangeAtom, versionAtom) {
|
||||
return rangeAtom.version === versionAtom.version;
|
||||
}
|
||||
function compare(rangeAtom, versionAtom) {
|
||||
switch (rangeAtom.operator) {
|
||||
case "":
|
||||
case "=":
|
||||
return eq(rangeAtom, versionAtom);
|
||||
case ">":
|
||||
return compareVersion(rangeAtom, versionAtom) < 0;
|
||||
case ">=":
|
||||
return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) < 0;
|
||||
case "<":
|
||||
return compareVersion(rangeAtom, versionAtom) > 0;
|
||||
case "<=":
|
||||
return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) > 0;
|
||||
case void 0: {
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function parseComparatorString(range) {
|
||||
return pipe(
|
||||
parseCarets,
|
||||
parseTildes,
|
||||
parseXRanges,
|
||||
parseStar
|
||||
)(range);
|
||||
}
|
||||
function parseRange(range) {
|
||||
return pipe(
|
||||
parseHyphen,
|
||||
parseComparatorTrim,
|
||||
parseTildeTrim,
|
||||
parseCaretTrim
|
||||
)(range.trim()).split(/\s+/).join(" ");
|
||||
}
|
||||
function satisfy(version, range) {
|
||||
if (!version) {
|
||||
return false;
|
||||
}
|
||||
const parsedRange = parseRange(range);
|
||||
const parsedComparator = parsedRange.split(" ").map((rangeVersion) => parseComparatorString(rangeVersion)).join(" ");
|
||||
const comparators = parsedComparator.split(/\s+/).map((comparator2) => parseGTE0(comparator2));
|
||||
const extractedVersion = extractComparator(version);
|
||||
if (!extractedVersion) {
|
||||
return false;
|
||||
}
|
||||
const [
|
||||
,
|
||||
versionOperator,
|
||||
,
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionPreRelease
|
||||
] = extractedVersion;
|
||||
const versionAtom = {
|
||||
version: combineVersion(
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionPreRelease
|
||||
),
|
||||
major: versionMajor,
|
||||
minor: versionMinor,
|
||||
patch: versionPatch,
|
||||
preRelease: versionPreRelease == null ? void 0 : versionPreRelease.split(".")
|
||||
};
|
||||
for (const comparator2 of comparators) {
|
||||
const extractedComparator = extractComparator(comparator2);
|
||||
if (!extractedComparator) {
|
||||
return false;
|
||||
}
|
||||
const [
|
||||
,
|
||||
rangeOperator,
|
||||
,
|
||||
rangeMajor,
|
||||
rangeMinor,
|
||||
rangePatch,
|
||||
rangePreRelease
|
||||
] = extractedComparator;
|
||||
const rangeAtom = {
|
||||
operator: rangeOperator,
|
||||
version: combineVersion(
|
||||
rangeMajor,
|
||||
rangeMinor,
|
||||
rangePatch,
|
||||
rangePreRelease
|
||||
),
|
||||
major: rangeMajor,
|
||||
minor: rangeMinor,
|
||||
patch: rangePatch,
|
||||
preRelease: rangePreRelease == null ? void 0 : rangePreRelease.split(".")
|
||||
};
|
||||
if (!compare(rangeAtom, versionAtom)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
const moduleMap = {};
|
||||
const moduleCache = Object.create(null);
|
||||
async function importShared(name, shareScope = 'default') {
|
||||
return moduleCache[name]
|
||||
? new Promise((r) => r(moduleCache[name]))
|
||||
: (await getSharedFromRuntime(name, shareScope)) || getSharedFromLocal(name)
|
||||
}
|
||||
async function getSharedFromRuntime(name, shareScope) {
|
||||
let module = null;
|
||||
if (globalThis?.__federation_shared__?.[shareScope]?.[name]) {
|
||||
const versionObj = globalThis.__federation_shared__[shareScope][name];
|
||||
const requiredVersion = moduleMap[name]?.requiredVersion;
|
||||
const hasRequiredVersion = !!requiredVersion;
|
||||
if (hasRequiredVersion) {
|
||||
const versionKey = Object.keys(versionObj).find((version) =>
|
||||
satisfy(version, requiredVersion)
|
||||
);
|
||||
if (versionKey) {
|
||||
const versionValue = versionObj[versionKey];
|
||||
module = await (await versionValue.get())();
|
||||
} else {
|
||||
console.log(
|
||||
`provider support ${name}(${versionKey}) is not satisfied requiredVersion(\${moduleMap[name].requiredVersion})`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const versionKey = Object.keys(versionObj)[0];
|
||||
const versionValue = versionObj[versionKey];
|
||||
module = await (await versionValue.get())();
|
||||
}
|
||||
}
|
||||
if (module) {
|
||||
return flattenModule(module, name)
|
||||
}
|
||||
}
|
||||
async function getSharedFromLocal(name) {
|
||||
if (moduleMap[name]?.import) {
|
||||
let module = await (await moduleMap[name].get())();
|
||||
return flattenModule(module, name)
|
||||
} else {
|
||||
console.error(
|
||||
`consumer config import=false,so cant use callback shared module`
|
||||
);
|
||||
}
|
||||
}
|
||||
function flattenModule(module, name) {
|
||||
// use a shared module which export default a function will getting error 'TypeError: xxx is not a function'
|
||||
if (typeof module.default === 'function') {
|
||||
Object.keys(module).forEach((key) => {
|
||||
if (key !== 'default') {
|
||||
module.default[key] = module[key];
|
||||
}
|
||||
});
|
||||
moduleCache[name] = module.default;
|
||||
return module.default
|
||||
}
|
||||
if (module.default) module = Object.assign({}, module.default, module);
|
||||
moduleCache[name] = module;
|
||||
return module
|
||||
}
|
||||
|
||||
export { importShared, getSharedFromLocal as importSharedLocal, getSharedFromRuntime as importSharedRuntime };
|
||||
17409
plugins.v2/clashruleprovider/dist/assets/__federation_shared_vuetify/styles-I7amCcZu.css
vendored
Normal file
17409
plugins.v2/clashruleprovider/dist/assets/__federation_shared_vuetify/styles-I7amCcZu.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
plugins.v2/clashruleprovider/dist/assets/_plugin-vue_export-helper-pcqpp-6-.js
vendored
Normal file
9
plugins.v2/clashruleprovider/dist/assets/_plugin-vue_export-helper-pcqpp-6-.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
export { _export_sfc as _ };
|
||||
3498
plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js
vendored
Normal file
3498
plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
458
plugins.v2/clashruleprovider/dist/assets/index-B8APBpoy.css
vendored
Normal file
458
plugins.v2/clashruleprovider/dist/assets/index-B8APBpoy.css
vendored
Normal file
@@ -0,0 +1,458 @@
|
||||
|
||||
/* 为了使测试应用更美观 */
|
||||
.app-container[data-v-422baab7] {
|
||||
block-size: 100vh;
|
||||
inline-size: 100vw;
|
||||
}
|
||||
.component-preview[data-v-422baab7] {
|
||||
overflow: hidden;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports selector(:focus-visible) {
|
||||
}@supports not selector(:focus-visible) {
|
||||
}@keyframes progress-circular-dash {
|
||||
0% {
|
||||
stroke-dasharray: 1, 200;
|
||||
stroke-dashoffset: 0px;
|
||||
}
|
||||
50% {
|
||||
stroke-dasharray: 100, 200;
|
||||
stroke-dashoffset: -15px;
|
||||
}
|
||||
100% {
|
||||
stroke-dasharray: 100, 200;
|
||||
stroke-dashoffset: -124px;
|
||||
}
|
||||
}
|
||||
@keyframes progress-circular-rotate {
|
||||
100% {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
}@media (forced-colors: active) {
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
}
|
||||
|
||||
@keyframes indeterminate-ltr {
|
||||
0% {
|
||||
left: -90%;
|
||||
right: 100%;
|
||||
}
|
||||
60% {
|
||||
left: -90%;
|
||||
right: 100%;
|
||||
}
|
||||
100% {
|
||||
left: 100%;
|
||||
right: -35%;
|
||||
}
|
||||
}
|
||||
@keyframes indeterminate-rtl {
|
||||
0% {
|
||||
left: 100%;
|
||||
right: -90%;
|
||||
}
|
||||
60% {
|
||||
left: 100%;
|
||||
right: -90%;
|
||||
}
|
||||
100% {
|
||||
left: -35%;
|
||||
right: 100%;
|
||||
}
|
||||
}
|
||||
@keyframes indeterminate-short-ltr {
|
||||
0% {
|
||||
left: -200%;
|
||||
right: 100%;
|
||||
}
|
||||
60% {
|
||||
left: 107%;
|
||||
right: -8%;
|
||||
}
|
||||
100% {
|
||||
left: 107%;
|
||||
right: -8%;
|
||||
}
|
||||
}
|
||||
@keyframes indeterminate-short-rtl {
|
||||
0% {
|
||||
left: 100%;
|
||||
right: -200%;
|
||||
}
|
||||
60% {
|
||||
left: -8%;
|
||||
right: 107%;
|
||||
}
|
||||
100% {
|
||||
left: -8%;
|
||||
right: 107%;
|
||||
}
|
||||
}
|
||||
@keyframes stream {
|
||||
to {
|
||||
transform: translateX(var(--v-progress-linear-stream-to));
|
||||
}
|
||||
}
|
||||
@keyframes progress-linear-stripes {
|
||||
0% {
|
||||
background-position-x: var(--v-progress-linear-height);
|
||||
}
|
||||
}@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports selector(:focus-visible) {
|
||||
}/* region BLOCK */
|
||||
|
||||
/* endregion */
|
||||
/* region ELEMENTS */
|
||||
|
||||
/* endregion *//* region INPUT */
|
||||
|
||||
/* endregion */
|
||||
/* region MODIFIERS */
|
||||
|
||||
/* endregion */
|
||||
/* region ELEMENTS */
|
||||
|
||||
/* endregion */
|
||||
/* region AFFIXES */
|
||||
@media (hover: hover) {
|
||||
}
|
||||
@media (hover: none) {
|
||||
}
|
||||
|
||||
/* endregion */
|
||||
/* region LABEL */
|
||||
|
||||
/* endregion */
|
||||
/* region OUTLINE */
|
||||
@media (hover: hover) {
|
||||
}
|
||||
|
||||
/* endregion */
|
||||
/* region LOADER */
|
||||
|
||||
/* endregion */
|
||||
/* region OVERLAY */
|
||||
@media (hover: hover) {
|
||||
}
|
||||
@media (hover: hover) {
|
||||
}
|
||||
@media (hover: hover) {
|
||||
}
|
||||
|
||||
/* endregion */
|
||||
/* region MODIFIERS */
|
||||
|
||||
/* endregion */.bottom-sheet-transition-enter-from {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
.bottom-sheet-transition-leave-to {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
@media (min-width: 600px) {
|
||||
}@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}@media (forced-colors: active) {
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
}@media (forced-colors: active) {
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
}@media (min-width: 960px) {
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
}
|
||||
@media (min-width: 1920px) {
|
||||
}
|
||||
@media (min-width: 2560px) {
|
||||
}
|
||||
|
||||
.offset-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
|
||||
.offset-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
|
||||
.offset-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
|
||||
.offset-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
|
||||
.offset-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
|
||||
.offset-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
|
||||
.offset-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
|
||||
.offset-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
|
||||
.offset-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
|
||||
.offset-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
|
||||
.offset-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.offset-sm-0 {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.offset-sm-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
.offset-sm-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
.offset-sm-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
.offset-sm-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
.offset-sm-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
.offset-sm-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
.offset-sm-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
.offset-sm-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
.offset-sm-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
.offset-sm-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
.offset-sm-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 960px) {
|
||||
.offset-md-0 {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.offset-md-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
.offset-md-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
.offset-md-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
.offset-md-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
.offset-md-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
.offset-md-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
.offset-md-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
.offset-md-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
.offset-md-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
.offset-md-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
.offset-md-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.offset-lg-0 {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.offset-lg-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
.offset-lg-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
.offset-lg-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
.offset-lg-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
.offset-lg-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
.offset-lg-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
.offset-lg-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
.offset-lg-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
.offset-lg-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
.offset-lg-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
.offset-lg-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1920px) {
|
||||
.offset-xl-0 {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.offset-xl-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
.offset-xl-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
.offset-xl-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
.offset-xl-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
.offset-xl-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
.offset-xl-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
.offset-xl-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
.offset-xl-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
.offset-xl-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
.offset-xl-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
.offset-xl-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 2560px) {
|
||||
.offset-xxl-0 {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.offset-xxl-1 {
|
||||
margin-inline-start: 8.3333333333%;
|
||||
}
|
||||
.offset-xxl-2 {
|
||||
margin-inline-start: 16.6666666667%;
|
||||
}
|
||||
.offset-xxl-3 {
|
||||
margin-inline-start: 25%;
|
||||
}
|
||||
.offset-xxl-4 {
|
||||
margin-inline-start: 33.3333333333%;
|
||||
}
|
||||
.offset-xxl-5 {
|
||||
margin-inline-start: 41.6666666667%;
|
||||
}
|
||||
.offset-xxl-6 {
|
||||
margin-inline-start: 50%;
|
||||
}
|
||||
.offset-xxl-7 {
|
||||
margin-inline-start: 58.3333333333%;
|
||||
}
|
||||
.offset-xxl-8 {
|
||||
margin-inline-start: 66.6666666667%;
|
||||
}
|
||||
.offset-xxl-9 {
|
||||
margin-inline-start: 75%;
|
||||
}
|
||||
.offset-xxl-10 {
|
||||
margin-inline-start: 83.3333333333%;
|
||||
}
|
||||
.offset-xxl-11 {
|
||||
margin-inline-start: 91.6666666667%;
|
||||
}
|
||||
}.date-picker-header-transition-enter-active,
|
||||
.date-picker-header-reverse-transition-enter-active {
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.date-picker-header-transition-leave-active,
|
||||
.date-picker-header-reverse-transition-leave-active {
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.date-picker-header-transition-enter-from {
|
||||
transform: translate(0, 100%);
|
||||
}
|
||||
.date-picker-header-transition-leave-to {
|
||||
opacity: 0;
|
||||
transform: translate(0, -100%);
|
||||
}
|
||||
|
||||
.date-picker-header-reverse-transition-enter-from {
|
||||
transform: translate(0, -100%);
|
||||
}
|
||||
.date-picker-header-reverse-transition-leave-to {
|
||||
opacity: 0;
|
||||
transform: translate(0, 100%);
|
||||
}@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}@keyframes loading {
|
||||
100% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}@supports not selector(:focus-visible) {
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
}@media (forced-colors: active) {
|
||||
}@media (max-width: 1279.98px) {
|
||||
}/** Modifiers **/
|
||||
24938
plugins.v2/clashruleprovider/dist/assets/index-Bff29tuV.js
vendored
Normal file
24938
plugins.v2/clashruleprovider/dist/assets/index-Bff29tuV.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
87
plugins.v2/clashruleprovider/dist/assets/remoteEntry.js
vendored
Normal file
87
plugins.v2/clashruleprovider/dist/assets/remoteEntry.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
const currentImports = {};
|
||||
const exportSet = new Set(['Module', '__esModule', 'default', '_export_sfc']);
|
||||
let moduleMap = {
|
||||
"./Page":()=>{
|
||||
dynamicLoadingCss(["__federation_expose_Page-Bl7XNZ7k.css"], false, './Page');
|
||||
return __federation_import('./__federation_expose_Page-DlQgf7u6.js').then(module =>Object.keys(module).every(item => exportSet.has(item)) ? () => module.default : () => module)},
|
||||
"./Config":()=>{
|
||||
dynamicLoadingCss(["__federation_expose_Config-DXzIavcD.css"], false, './Config');
|
||||
return __federation_import('./__federation_expose_Config-C3BpNVeC.js').then(module =>Object.keys(module).every(item => exportSet.has(item)) ? () => module.default : () => module)},
|
||||
"./Dashboard":()=>{
|
||||
dynamicLoadingCss([], false, './Dashboard');
|
||||
return __federation_import('./__federation_expose_Dashboard-BkyO-3pr.js').then(module =>Object.keys(module).every(item => exportSet.has(item)) ? () => module.default : () => module)},};
|
||||
const seen = {};
|
||||
const dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) => {
|
||||
const metaUrl = import.meta.url;
|
||||
if (typeof metaUrl === 'undefined') {
|
||||
console.warn('The remote style takes effect only when the build.target option in the vite.config.ts file is higher than that of "es2020".');
|
||||
return;
|
||||
}
|
||||
|
||||
const curUrl = metaUrl.substring(0, metaUrl.lastIndexOf('remoteEntry.js'));
|
||||
const base = '/';
|
||||
'assets';
|
||||
|
||||
cssFilePaths.forEach(cssPath => {
|
||||
let href = '';
|
||||
const baseUrl = base || curUrl;
|
||||
if (baseUrl) {
|
||||
const trimmer = {
|
||||
trailing: (path) => (path.endsWith('/') ? path.slice(0, -1) : path),
|
||||
leading: (path) => (path.startsWith('/') ? path.slice(1) : path)
|
||||
};
|
||||
const isAbsoluteUrl = (url) => url.startsWith('http') || url.startsWith('//');
|
||||
|
||||
const cleanBaseUrl = trimmer.trailing(baseUrl);
|
||||
const cleanCssPath = trimmer.leading(cssPath);
|
||||
const cleanCurUrl = trimmer.trailing(curUrl);
|
||||
|
||||
if (isAbsoluteUrl(baseUrl)) {
|
||||
href = [cleanBaseUrl, cleanCssPath].filter(Boolean).join('/');
|
||||
} else {
|
||||
if (cleanCurUrl.includes(cleanBaseUrl)) {
|
||||
href = [cleanCurUrl, cleanCssPath].filter(Boolean).join('/');
|
||||
} else {
|
||||
href = [cleanCurUrl + cleanBaseUrl, cleanCssPath].filter(Boolean).join('/');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
href = cssPath;
|
||||
}
|
||||
|
||||
if (dontAppendStylesToHead) {
|
||||
const key = 'css__ClashRuleProvider__' + exposeItemName;
|
||||
window[key] = window[key] || [];
|
||||
window[key].push(href);
|
||||
return;
|
||||
}
|
||||
|
||||
if (href in seen) return;
|
||||
seen[href] = true;
|
||||
|
||||
const element = document.createElement('link');
|
||||
element.rel = 'stylesheet';
|
||||
element.href = href;
|
||||
document.head.appendChild(element);
|
||||
});
|
||||
};
|
||||
async function __federation_import(name) {
|
||||
currentImports[name] ??= import(name);
|
||||
return currentImports[name]
|
||||
} const get =(module) => {
|
||||
if(!moduleMap[module]) throw new Error('Can not find remote module ' + module)
|
||||
return moduleMap[module]();
|
||||
};
|
||||
const init =(shareScope) => {
|
||||
globalThis.__federation_shared__= globalThis.__federation_shared__|| {};
|
||||
Object.entries(shareScope).forEach(([key, value]) => {
|
||||
for (const [versionKey, versionValue] of Object.entries(value)) {
|
||||
const scope = versionValue.scope || 'default';
|
||||
globalThis.__federation_shared__[scope] = globalThis.__federation_shared__[scope] || {};
|
||||
const shared= globalThis.__federation_shared__[scope];
|
||||
(shared[key] = shared[key]||{})[versionKey] = versionValue;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export { dynamicLoadingCss, get, init };
|
||||
8546
plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js
vendored
Normal file
8546
plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
34
plugins.v2/clashruleprovider/dist/index.html
vendored
Normal file
34
plugins.v2/clashruleprovider/dist/index.html
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>MoviePilot插件组件示例</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-Bff29tuV.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/__federation_fn_import-JrT3xvdd.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-pcqpp-6-.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_Page-DlQgf7u6.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_Config-C3BpNVeC.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/runtime-core.esm-bundler-BQhfUSSX.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_Dashboard-BkyO-3pr.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/date--mM7W7--.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/__federation_expose_Page-Bl7XNZ7k.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/__federation_expose_Config-DXzIavcD.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B8APBpoy.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user