Files
OpenGFW/web/dist/assets/RulesView-SxOStRNP.js
T

37 lines
20 KiB
JavaScript
Raw Normal View History

2026-07-27 08:09:11 +08:00
import{c as E,B as ge,d as M,x as be,o as c,h as C,C as F,g as B,a as q,j as $,F as N,r as ie,D as ke,E as xe,G as Q,p as u,w as o,H as L,u as e,I as we,J as de,P as W,m as V,K as ce,L as Ve,n as Ce,e as X,f as Y,M as T,N as j,l as n,b as g,t as r,s as I,O as qe,Q as $e,k as b,_ as Se,R as P,y as Ie,z as K}from"./index-D3ZCYstt.js";import{_ as ze}from"./PageHeader.vue_vue_type_script_setup_true_lang-CDyKzgiP.js";import{_ as O}from"./Badge.vue_vue_type_script_setup_true_lang--8bF8KCa.js";import{_ as te,T as Ae}from"./Modal.vue_vue_type_script_setup_true_lang-gNNtNPLv.js";import{V as Be,u as Me,P as Re,_ as se}from"./Select.vue_vue_type_script_setup_true_lang-C15l-n0X.js";import{u as Ee,c as Te}from"./Collection-D-pf6tmY.js";import{i as Pe,m as Ue,c as He,_ as ue,a as je,b as ne}from"./TabsTrigger.vue_vue_type_script_setup_true_lang-DTNukDpV.js";/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Oe=E("ArrowDownIcon",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fe=E("ArrowUpIcon",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ne=E("FileCode2Icon",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Le=E("PencilIcon",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const De=E("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Je=E("RotateCcwIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-vue-next v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ke=E("SaveIcon",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function Ge(){var l,t;const k=(t=(l=ge())==null?void 0:l.vnode)==null?void 0:t.scopeId;return k?{[k]:""}:{}}var Qe=M({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(k){const l=k,{primitiveElement:t,currentElement:i}=Ee(),m=B(()=>l.checked??l.value);return be(m,(f,p)=>{if(!i.value)return;const _=i.value,w=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(w,"value").set;if(v&&f!==p){const A=new Event("input",{bubbles:!0}),S=new Event("change",{bubbles:!0});v.call(_,f),_.dispatchEvent(A),_.dispatchEvent(S)}}),(f,p)=>(c(),C(Be,F({ref_key:"primitiveElement",ref:t},{...l,...f.$attrs},{as:"input"}),null,16))}}),oe=Qe,We=M({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(k){const l=k,t=B(()=>typeof l.value=="object"&&Array.isArray(l.value)&&l.value.length===0&&l.required),i=B(()=>typeof l.value=="string"||typeof l.value=="number"||typeof l.value=="boolean"||l.value===null||l.value===void 0?[{name:l.name,value:l.value}]:typeof l.value=="object"&&Array.isArray(l.value)?l.value.flatMap((m,f)=>typeof m=="object"?Object.entries(m).map(([p,_])=>({name:`${l.name}[${f}][${p}]`,value:_})):{name:`${l.name}[${f}]`,value:m}):l.value!==null&&typeof l.value=="object"&&!Array.isArray(l.value)?Object.entries(l.value).map(([m,f])=>({name:`${l.name}[${m}]`,value:f})):[]);return(m,f)=>(c(),q(N,null,[$(" We render single input if it's required "),t.value?(c(),C(oe,F({key:m.name},{...l,...m.$attrs},{name:m.name,value:m.value}),null,16,["name","value"])):(c(!0),q(N,{key:1},ie(i.value,p=>(c(),C(oe,F({key:p.name},{ref_for:!0},{...l,...m.$attrs},{name:p.name,value:p.value}),null,16,["name","value"]))),128))],2112))}}),Xe=We;const[Ye,Ze]=Te("SwitchRoot");var ea=M({inheritAttrs:!1,__name:"SwitchRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(k,{emit:l}){const t=k,i=l,{disabled:m}=ke(t),f=xe(t,"modelValue",i,{defaultValue:t.defaultValue??t.falseValue,passive:t.modelValue===void 0}),p=B(()=>f.value===t.trueValue);function _(){m.value||(f.value=p.value?t.falseValue:t.trueValue)}const{forwardRef:w,currentElement:h}=Q(),v=Me(h),A=Ge(),S=B(()=>{var x;return t.id&&h.value?(x=document.querySelector(`[for="${t.id}"]`))==null?void 0:x.innerText:void 0});return Ze({checked:p,toggleCheck:_,disabled:m}),(x,D)=>(c(),q(N,null,[u(e(W),F({id:x.id,ref:e(w),role:"switch",type:x.as==="button"?"button":void 0,value:x.value,"aria-label":x.$attrs["aria-label"]||S.value,"aria-checked":p.value,"aria-required":x.required,"data-state":p.value?"checked":"unchecked","data-disabled":e(m)?"":void 0,"as-child":x.asChild,as:x.as,disabled:e(m)},{...e(A),...x.$attrs},{onClick:_,onKeydown:we(de(_,["prevent"]),["enter"])}),{default:o(()=>[L(x.$slots,"default",{modelValue:e(f),checked:p.value})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),e(v)&&x.name?(c(),C(e(Xe),F({key:0