import{q as ut,bn as el,d as ae,v as cn,F as yp,J as Oa,a as J,bf as Kg,L as yc,cB as x$,ci as P$,ds as $$,p as yo,ca as T$,cb as R$,bi as vs,s as ev,dt as I$,x as Q$,V as A$,bU as N$,A as M$,C as yf,T as Gi,r as B,G as L$,H as U$,I as D$,at as je,aG as ia,aW as kO,M as q$,R as Mr,c3 as Lr,c2 as Ur,cg as E$,ay as Be,az as Ze,a2 as fe,$ as u,f as d,av as Ls,g as X,_ as _e,as as B$,b as te,o as L,aq as ze,h as C,w as p,Y as Xe,a5 as Ce,au as Ot,a7 as xO,t as Q,e as U,ak as Ln,c as W,ah as yn,aA as js,ac as Pt,aH as Ss,aI as _s,z as Ne,B as Te,aa as Ee,ab as Ws,aB as qe,a9 as Kt,an as Mo,i as vt,j as ht,aF as Nn,ax as ft,W as wt,du as Sf,b4 as en,D as Zt,aD as zt,aO as Ut,k as ce,aC as tn,aJ as PO,a4 as et,b3 as Jc,aK as Lo,dv as Z$,dw as z$,dx as H$,dy as X$,dz as j$,dA as V$,dB as F$,dC as W$,dD as Y$,dE as G$,dF as J$,dG as K$,b1 as e2,aY as fi,by as Zn,dr as tt,aX as $O,b8 as t2,b7 as n2,aE as oo,aw as TO,dH as Ca,dI as Dr,a3 as rl,dJ as Tu}from"./index-DGnN4tUo.js";import{_ as s2,e as Sc,a as i2}from"./server-name-edit-drawer.vue_vue_type_script_setup_true_lang-DMFAA2Ng.js";import{_ as ya}from"./Skeleton-vl1d4hpc.js";import{_ as re}from"./Space-CL0I_Xfq.js";import{u as RO,a as IO}from"./form-BL4ki12n.js";import{_ as nt}from"./Spin-DKKyX_Jk.js";import{_ as Re}from"./Form-BqQC0MxL.js";import{_ as ve}from"./FormItem-C_vPvRD-.js";import{P as QO,D as Sa,_ as nn,m as o2}from"./vuedraggable.umd-myWl5Me7.js";import{_ as Ht,a as Xt}from"./CollapseItem-BFsXIuX0.js";import{_ as Wt}from"./DynamicTags-DqemHs2o.js";import{_ as un}from"./text-BCUS5oYv.js";import{N as ws,a as a2,b as Sp}from"./DataTable-srFNopw0.js";import{_ as _p,a as wp,b as AO}from"./Upload-DgsSmmaD.js";import{_ as kp,a as NO}from"./RadioGroup-CrfPAuhp.js";import{_ as jt}from"./skeleton-loading-bvzoT9DQ.js";import{N as Qi,a as l2}from"./headers-BSt10_UG.js";import{_ as Kc}from"./Table-Be88neig.js";import{_ as ao}from"./Alert-BZ_DHA4i.js";import{_ as r2}from"./DatePicker-CdUKGL7B.js";import"./use-houdini-DoGjazoX.js";import"./get-slot-Bk_rJcZu.js";import"./context-IddTiA87.js";import"./Forward-CG86rsx9.js";import"./utils-7uY2dC5n.js";const c2=ut("input-group-label",`
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 box-sizing: border-box;
 padding: 0 12px;
 display: inline-block;
 border-radius: var(--n-border-radius);
 background-color: var(--n-group-label-color);
 color: var(--n-group-label-text-color);
 font-size: var(--n-font-size);
 line-height: var(--n-height);
 height: var(--n-height);
 flex-shrink: 0;
 white-space: nowrap;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
`,[el("border",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
 border: var(--n-group-label-border);
 transition: border-color .3s var(--n-bezier);
 `)]),d2=Object.assign(Object.assign({},Oa.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),Ai=ae({name:"InputGroupLabel",props:d2,setup(i){const{mergedBorderedRef:e,mergedClsPrefixRef:t,inlineThemeDisabled:n}=yp(i),s=Oa("Input","-input-group-label",c2,x$,i,t),o=J(()=>{const{size:l}=i,{common:{cubicBezierEaseInOut:c},self:{groupLabelColor:f,borderRadius:h,groupLabelTextColor:g,lineHeight:v,groupLabelBorder:O,[Kg("fontSize",l)]:y,[Kg("height",l)]:S}}=s.value;return{"--n-bezier":c,"--n-group-label-color":f,"--n-group-label-border":O,"--n-border-radius":h,"--n-group-label-text-color":g,"--n-font-size":y,"--n-line-height":v,"--n-height":S}}),a=n?yc("input-group-label",J(()=>i.size[0]),o,i):void 0;return{mergedClsPrefix:t,mergedBordered:e,cssVars:n?void 0:o,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){var i,e,t;const{mergedClsPrefix:n}=this;return(i=this.onRender)===null||i===void 0||i.call(this),cn("div",{class:[`${n}-input-group-label`,this.themeClass],style:this.cssVars},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),this.mergedBordered?cn("div",{class:`${n}-input-group-label__border`}):null)}});function u2(i){const e="rgba(0, 0, 0, .85)",t="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:n,primaryColor:s,baseColor:o,cardColor:a,modalColor:l,popoverColor:c,borderRadius:f,fontSize:h,opacityDisabled:g}=i;return Object.assign(Object.assign({},$$),{fontSize:h,markFontSize:h,railColor:n,railColorHover:n,fillColor:s,fillColorHover:s,opacityDisabled:g,handleColor:"#FFF",dotColor:a,dotColorModal:l,dotColorPopover:c,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:e,indicatorBoxShadow:t,indicatorTextColor:o,indicatorBorderRadius:f,dotBorder:`2px solid ${n}`,dotBorderActive:`2px solid ${s}`,dotBoxShadow:""})}const f2={common:P$,self:u2},p2=yo([ut("slider",`
 display: block;
 padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
 position: relative;
 z-index: 0;
 width: 100%;
 cursor: pointer;
 user-select: none;
 -webkit-user-select: none;
 `,[vs("reverse",[ut("slider-handles",[ut("slider-handle-wrapper",`
 transform: translate(50%, -50%);
 `)]),ut("slider-dots",[ut("slider-dot",`
 transform: translateX(50%, -50%);
 `)]),vs("vertical",[ut("slider-handles",[ut("slider-handle-wrapper",`
 transform: translate(-50%, -50%);
 `)]),ut("slider-marks",[ut("slider-mark",`
 transform: translateY(calc(-50% + var(--n-dot-height) / 2));
 `)]),ut("slider-dots",[ut("slider-dot",`
 transform: translateX(-50%) translateY(0);
 `)])])]),vs("vertical",`
 box-sizing: content-box;
 padding: 0 calc((var(--n-handle-size) - var(--n-rail-height)) / 2);
 width: var(--n-rail-width-vertical);
 height: 100%;
 `,[ut("slider-handles",`
 top: calc(var(--n-handle-size) / 2);
 right: 0;
 bottom: calc(var(--n-handle-size) / 2);
 left: 0;
 `,[ut("slider-handle-wrapper",`
 top: unset;
 left: 50%;
 transform: translate(-50%, 50%);
 `)]),ut("slider-rail",`
 height: 100%;
 `,[el("fill",`
 top: unset;
 right: 0;
 bottom: unset;
 left: 0;
 `)]),vs("with-mark",`
 width: var(--n-rail-width-vertical);
 margin: 0 32px 0 8px;
 `),ut("slider-marks",`
 top: calc(var(--n-handle-size) / 2);
 right: unset;
 bottom: calc(var(--n-handle-size) / 2);
 left: 22px;
 font-size: var(--n-mark-font-size);
 `,[ut("slider-mark",`
 transform: translateY(50%);
 white-space: nowrap;
 `)]),ut("slider-dots",`
 top: calc(var(--n-handle-size) / 2);
 right: unset;
 bottom: calc(var(--n-handle-size) / 2);
 left: 50%;
 `,[ut("slider-dot",`
 transform: translateX(-50%) translateY(50%);
 `)])]),vs("disabled",`
 cursor: not-allowed;
 opacity: var(--n-opacity-disabled);
 `,[ut("slider-handle",`
 cursor: not-allowed;
 `)]),vs("with-mark",`
 width: 100%;
 margin: 8px 0 32px 0;
 `),yo("&:hover",[ut("slider-rail",{backgroundColor:"var(--n-rail-color-hover)"},[el("fill",{backgroundColor:"var(--n-fill-color-hover)"})]),ut("slider-handle",{boxShadow:"var(--n-handle-box-shadow-hover)"})]),vs("active",[ut("slider-rail",{backgroundColor:"var(--n-rail-color-hover)"},[el("fill",{backgroundColor:"var(--n-fill-color-hover)"})]),ut("slider-handle",{boxShadow:"var(--n-handle-box-shadow-hover)"})]),ut("slider-marks",`
 position: absolute;
 top: 18px;
 left: calc(var(--n-handle-size) / 2);
 right: calc(var(--n-handle-size) / 2);
 `,[ut("slider-mark",`
 position: absolute;
 transform: translateX(-50%);
 white-space: nowrap;
 `)]),ut("slider-rail",`
 width: 100%;
 position: relative;
 height: var(--n-rail-height);
 background-color: var(--n-rail-color);
 transition: background-color .3s var(--n-bezier);
 border-radius: calc(var(--n-rail-height) / 2);
 `,[el("fill",`
 position: absolute;
 top: 0;
 bottom: 0;
 border-radius: calc(var(--n-rail-height) / 2);
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-fill-color);
 `)]),ut("slider-handles",`
 position: absolute;
 top: 0;
 right: calc(var(--n-handle-size) / 2);
 bottom: 0;
 left: calc(var(--n-handle-size) / 2);
 `,[ut("slider-handle-wrapper",`
 outline: none;
 position: absolute;
 top: 50%;
 transform: translate(-50%, -50%);
 cursor: pointer;
 display: flex;
 `,[ut("slider-handle",`
 height: var(--n-handle-size);
 width: var(--n-handle-size);
 border-radius: 50%;
 overflow: hidden;
 transition: box-shadow .2s var(--n-bezier), background-color .3s var(--n-bezier);
 background-color: var(--n-handle-color);
 box-shadow: var(--n-handle-box-shadow);
 `,[yo("&:hover",`
 box-shadow: var(--n-handle-box-shadow-hover);
 `)]),yo("&:focus",[ut("slider-handle",`
 box-shadow: var(--n-handle-box-shadow-focus);
 `,[yo("&:hover",`
 box-shadow: var(--n-handle-box-shadow-active);
 `)])])])]),ut("slider-dots",`
 position: absolute;
 top: 50%;
 left: calc(var(--n-handle-size) / 2);
 right: calc(var(--n-handle-size) / 2);
 `,[vs("transition-disabled",[ut("slider-dot","transition: none;")]),ut("slider-dot",`
 transition:
 border-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 position: absolute;
 transform: translate(-50%, -50%);
 height: var(--n-dot-height);
 width: var(--n-dot-width);
 border-radius: var(--n-dot-border-radius);
 overflow: hidden;
 box-sizing: border-box;
 border: var(--n-dot-border);
 background-color: var(--n-dot-color);
 `,[vs("active","border: var(--n-dot-border-active);")])])]),ut("slider-handle-indicator",`
 font-size: var(--n-font-size);
 padding: 6px 10px;
 border-radius: var(--n-indicator-border-radius);
 color: var(--n-indicator-text-color);
 background-color: var(--n-indicator-color);
 box-shadow: var(--n-indicator-box-shadow);
 `,[ev()]),ut("slider-handle-indicator",`
 font-size: var(--n-font-size);
 padding: 6px 10px;
 border-radius: var(--n-indicator-border-radius);
 color: var(--n-indicator-text-color);
 background-color: var(--n-indicator-color);
 box-shadow: var(--n-indicator-box-shadow);
 `,[vs("top",`
 margin-bottom: 12px;
 `),vs("right",`
 margin-left: 12px;
 `),vs("bottom",`
 margin-top: 12px;
 `),vs("left",`
 margin-right: 12px;
 `),ev()]),T$(ut("slider",[ut("slider-dot","background-color: var(--n-dot-color-modal);")])),R$(ut("slider",[ut("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function tv(i){return window.TouchEvent&&i instanceof window.TouchEvent}function nv(){const i=new Map,e=t=>n=>{i.set(t,n)};return I$(()=>{i.clear()}),[i,e]}const h2=0,m2=Object.assign(Object.assign({},Oa.props),{to:yf.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),g2=ae({name:"Slider",props:m2,slots:Object,setup(i){const{mergedClsPrefixRef:e,namespaceRef:t,inlineThemeDisabled:n}=yp(i),s=Oa("Slider","-slider",p2,f2,i,e),o=B(null),[a,l]=nv(),[c,f]=nv(),h=B(new Set),g=L$(i),{mergedDisabledRef:v}=g,O=J(()=>{const{step:be}=i;if(Number(be)<=0||be==="mark")return 0;const ke=be.toString();let Ae=0;return ke.includes(".")&&(Ae=ke.length-ke.indexOf(".")-1),Ae}),y=B(i.defaultValue),S=U$(i,"value"),w=D$(S,y),_=J(()=>{const{value:be}=w;return(i.range?be:[be]).map(we)}),$=J(()=>_.value.length>2),A=J(()=>i.placement===void 0?i.vertical?"right":"top":i.placement),R=J(()=>{const{marks:be}=i;return be?Object.keys(be).map(Number.parseFloat):null}),k=B(-1),x=B(-1),T=B(-1),M=B(!1),N=B(!1),I=J(()=>{const{vertical:be,reverse:ke}=i;return be?ke?"top":"bottom":ke?"right":"left"}),q=J(()=>{if($.value)return;const be=_.value,ke=pe(i.range?Math.min(...be):i.min),Ae=pe(i.range?Math.max(...be):be[0]),{value:ct}=I;return i.vertical?{[ct]:`${ke}%`,height:`${Ae-ke}%`}:{[ct]:`${ke}%`,width:`${Ae-ke}%`}}),z=J(()=>{const be=[],{marks:ke}=i;if(ke){const Ae=_.value.slice();Ae.sort((on,Gt)=>on-Gt);const{value:ct}=I,{value:St}=$,{range:It}=i,$n=St?()=>!1:on=>It?on>=Ae[0]&&on<=Ae[Ae.length-1]:on<=Ae[0];for(const on of Object.keys(ke)){const Gt=Number(on);be.push({active:$n(Gt),key:Gt,label:ke[on],style:{[ct]:`${pe(Gt)}%`}})}}return be});function H(be,ke){const Ae=pe(be),{value:ct}=I;return{[ct]:`${Ae}%`,zIndex:ke===k.value?1:0}}function F(be){return i.showTooltip||T.value===be||k.value===be&&M.value}function V(be){return M.value?!(k.value===be&&x.value===be):!0}function j(be){var ke;~be&&(k.value=be,(ke=a.get(be))===null||ke===void 0||ke.focus())}function se(){c.forEach((be,ke)=>{F(ke)&&be.syncPosition()})}function G(be){const{"onUpdate:value":ke,onUpdateValue:Ae}=i,{nTriggerFormInput:ct,nTriggerFormChange:St}=g;Ae&&Mr(Ae,be),ke&&Mr(ke,be),y.value=be,ct(),St()}function K(be){const{range:ke}=i;if(ke){if(Array.isArray(be)){const{value:Ae}=_;be.join()!==Ae.join()&&G(be)}}else Array.isArray(be)||_.value[0]!==be&&G(be)}function de(be,ke){if(i.range){const Ae=_.value.slice();Ae.splice(ke,1,be),K(Ae)}else K(be)}function Oe(be,ke,Ae){const ct=Ae!==void 0;Ae||(Ae=be-ke>0?1:-1);const St=R.value||[],{step:It}=i;if(It==="mark"){const Gt=Me(be,St.concat(ke),ct?Ae:void 0);return Gt?Gt.value:ke}if(It<=0)return ke;const{value:$n}=O;let on;if(ct){const Gt=Number((ke/It).toFixed($n)),Xn=Math.floor(Gt),Gs=Gt>Xn?Xn:Xn-1,co=Gt<Xn?Xn:Xn+1;on=Me(ke,[Number((Gs*It).toFixed($n)),Number((co*It).toFixed($n)),...St],Ae)}else{const Gt=xe(be);on=Me(be,[...St,Gt])}return on?we(on.value):ke}function we(be){return Math.min(i.max,Math.max(i.min,be))}function pe(be){const{max:ke,min:Ae}=i;return(be-Ae)/(ke-Ae)*100}function Se(be){const{max:ke,min:Ae}=i;return Ae+(ke-Ae)*be}function xe(be){const{step:ke,min:Ae}=i;if(Number(ke)<=0||ke==="mark")return be;const ct=Math.round((be-Ae)/ke)*ke+Ae;return Number(ct.toFixed(O.value))}function Me(be,ke=R.value,Ae){if(!(ke!=null&&ke.length))return null;let ct=null,St=-1;for(;++St<ke.length;){const It=ke[St]-be,$n=Math.abs(It);(Ae===void 0||It*Ae>0)&&(ct===null||$n<ct.distance)&&(ct={index:St,distance:$n,value:ke[St]})}return ct}function Pe(be){const ke=o.value;if(!ke)return;const Ae=tv(be)?be.touches[0]:be,ct=ke.getBoundingClientRect();let St;return i.vertical?St=(ct.bottom-Ae.clientY)/ct.height:St=(Ae.clientX-ct.left)/ct.width,i.reverse&&(St=1-St),Se(St)}function st(be){if(v.value||!i.keyboard)return;const{vertical:ke,reverse:Ae}=i;switch(be.key){case"ArrowUp":be.preventDefault(),Ye(ke&&Ae?-1:1);break;case"ArrowRight":be.preventDefault(),Ye(!ke&&Ae?-1:1);break;case"ArrowDown":be.preventDefault(),Ye(ke&&Ae?1:-1);break;case"ArrowLeft":be.preventDefault(),Ye(!ke&&Ae?1:-1);break}}function Ye(be){const ke=k.value;if(ke===-1)return;const{step:Ae}=i,ct=_.value[ke],St=Number(Ae)<=0||Ae==="mark"?ct:ct+Ae*be;de(Oe(St,ct,be>0?1:-1),ke)}function it(be){var ke,Ae;if(v.value||!tv(be)&&be.button!==h2)return;const ct=Pe(be);if(ct===void 0)return;const St=_.value.slice(),It=i.range?(Ae=(ke=Me(ct,St))===null||ke===void 0?void 0:ke.index)!==null&&Ae!==void 0?Ae:-1:0;It!==-1&&(be.preventDefault(),j(It),Dt(),de(Oe(ct,_.value[It]),It))}function Dt(){M.value||(M.value=!0,i.onDragstart&&Mr(i.onDragstart),Lr("touchend",document,lt),Lr("mouseup",document,lt),Lr("touchmove",document,Un),Lr("mousemove",document,Un))}function sn(){M.value&&(M.value=!1,i.onDragend&&Mr(i.onDragend),Ur("touchend",document,lt),Ur("mouseup",document,lt),Ur("touchmove",document,Un),Ur("mousemove",document,Un))}function Un(be){const{value:ke}=k;if(!M.value||ke===-1){sn();return}const Ae=Pe(be);Ae!==void 0&&de(Oe(Ae,_.value[ke]),ke)}function lt(){sn()}function He(be){k.value=be,v.value||(T.value=be)}function Mi(be){k.value===be&&(k.value=-1,sn()),T.value===be&&(T.value=-1)}function Fe(be){T.value=be}function xn(be){T.value===be&&(T.value=-1)}je(k,(be,ke)=>void ia(()=>x.value=ke)),je(w,()=>{if(i.marks){if(N.value)return;N.value=!0,ia(()=>{N.value=!1})}ia(se)}),kO(()=>{sn()});const Yt=J(()=>{const{self:{markFontSize:be,railColor:ke,railColorHover:Ae,fillColor:ct,fillColorHover:St,handleColor:It,opacityDisabled:$n,dotColor:on,dotColorModal:Gt,handleBoxShadow:Xn,handleBoxShadowHover:Gs,handleBoxShadowActive:co,handleBoxShadowFocus:Ta,dotBorder:Ra,dotBoxShadow:Ia,railHeight:dd,railWidthVertical:ud,handleSize:fd,dotHeight:Hl,dotWidth:Xl,dotBorderRadius:pd,fontSize:hd,dotBorderActive:md,dotColorPopover:gd},common:{cubicBezierEaseInOut:jl}}=s.value;return{"--n-bezier":jl,"--n-dot-border":Ra,"--n-dot-border-active":md,"--n-dot-border-radius":pd,"--n-dot-box-shadow":Ia,"--n-dot-color":on,"--n-dot-color-modal":Gt,"--n-dot-color-popover":gd,"--n-dot-height":Hl,"--n-dot-width":Xl,"--n-fill-color":ct,"--n-fill-color-hover":St,"--n-font-size":hd,"--n-handle-box-shadow":Xn,"--n-handle-box-shadow-active":co,"--n-handle-box-shadow-focus":Ta,"--n-handle-box-shadow-hover":Gs,"--n-handle-color":It,"--n-handle-size":fd,"--n-opacity-disabled":$n,"--n-rail-color":ke,"--n-rail-color-hover":Ae,"--n-rail-height":dd,"--n-rail-width-vertical":ud,"--n-mark-font-size":be}}),gn=n?yc("slider",void 0,Yt,i):void 0,Pn=J(()=>{const{self:{fontSize:be,indicatorColor:ke,indicatorBoxShadow:Ae,indicatorTextColor:ct,indicatorBorderRadius:St}}=s.value;return{"--n-font-size":be,"--n-indicator-border-radius":St,"--n-indicator-box-shadow":Ae,"--n-indicator-color":ke,"--n-indicator-text-color":ct}}),Hn=n?yc("slider-indicator",void 0,Pn,i):void 0;return{mergedClsPrefix:e,namespace:t,uncontrolledValue:y,mergedValue:w,mergedDisabled:v,mergedPlacement:A,isMounted:q$(),adjustedTo:yf(i),dotTransitionDisabled:N,markInfos:z,isShowTooltip:F,shouldKeepTooltipTransition:V,handleRailRef:o,setHandleRefs:l,setFollowerRefs:f,fillStyle:q,getHandleStyle:H,activeIndex:k,arrifiedValues:_,followerEnabledIndexSet:h,handleRailMouseDown:it,handleHandleFocus:He,handleHandleBlur:Mi,handleHandleMouseEnter:Fe,handleHandleMouseLeave:xn,handleRailKeyDown:st,indicatorCssVars:n?void 0:Pn,indicatorThemeClass:Hn==null?void 0:Hn.themeClass,indicatorOnRender:Hn==null?void 0:Hn.onRender,cssVars:n?void 0:Yt,themeClass:gn==null?void 0:gn.themeClass,onRender:gn==null?void 0:gn.onRender}},render(){var i;const{mergedClsPrefix:e,themeClass:t,formatTooltip:n}=this;return(i=this.onRender)===null||i===void 0||i.call(this),cn("div",{class:[`${e}-slider`,t,{[`${e}-slider--disabled`]:this.mergedDisabled,[`${e}-slider--active`]:this.activeIndex!==-1,[`${e}-slider--with-mark`]:this.marks,[`${e}-slider--vertical`]:this.vertical,[`${e}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},cn("div",{class:`${e}-slider-rail`},cn("div",{class:`${e}-slider-rail__fill`,style:this.fillStyle}),this.marks?cn("div",{class:[`${e}-slider-dots`,this.dotTransitionDisabled&&`${e}-slider-dots--transition-disabled`]},this.markInfos.map(s=>cn("div",{key:s.key,class:[`${e}-slider-dot`,{[`${e}-slider-dot--active`]:s.active}],style:s.style}))):null,cn("div",{ref:"handleRailRef",class:`${e}-slider-handles`},this.arrifiedValues.map((s,o)=>{const a=this.isShowTooltip(o);return cn(Q$,null,{default:()=>[cn(A$,null,{default:()=>cn("div",{ref:this.setHandleRefs(o),class:`${e}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":s,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(s,o),onFocus:()=>{this.handleHandleFocus(o)},onBlur:()=>{this.handleHandleBlur(o)},onMouseenter:()=>{this.handleHandleMouseEnter(o)},onMouseleave:()=>{this.handleHandleMouseLeave(o)}},N$(this.$slots.thumb,()=>[cn("div",{class:`${e}-slider-handle`})]))}),this.tooltip&&cn(M$,{ref:this.setFollowerRefs(o),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(o),teleportDisabled:this.adjustedTo===yf.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>cn(Gi,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(o),onEnter:()=>{this.followerEnabledIndexSet.add(o)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(o)}},{default:()=>{var l;return a?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),cn("div",{class:[`${e}-slider-handle-indicator`,this.indicatorThemeClass,`${e}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof n=="function"?n(s):s)):null}})})]})})),this.marks?cn("div",{class:`${e}-slider-marks`},this.markInfos.map(s=>cn("div",{key:s.key,class:`${e}-slider-mark`,style:s.style},typeof s.label=="function"?s.label():s.label))):null))}}),v2=ut("p",`
 box-sizing: border-box;
 transition: color .3s var(--n-bezier);
 margin: var(--n-margin);
 font-size: var(--n-font-size);
 line-height: var(--n-line-height);
 color: var(--n-text-color);
`,[yo("&:first-child","margin-top: 0;"),yo("&:last-child","margin-bottom: 0;")]),b2=Object.assign(Object.assign({},Oa.props),{depth:[String,Number]}),MO=ae({name:"P",props:b2,setup(i){const{mergedClsPrefixRef:e,inlineThemeDisabled:t}=yp(i),n=Oa("Typography","-p",v2,E$,i,e),s=J(()=>{const{depth:a}=i,l=a||"1",{common:{cubicBezierEaseInOut:c},self:{pFontSize:f,pLineHeight:h,pMargin:g,pTextColor:v,[`pTextColor${l}Depth`]:O}}=n.value;return{"--n-bezier":c,"--n-font-size":f,"--n-line-height":h,"--n-margin":g,"--n-text-color":a===void 0?v:O}}),o=t?yc("p",J(()=>`${i.depth||""}`),s,i):void 0;return{mergedClsPrefix:e,cssVars:t?void 0:s,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var i;return(i=this.onRender)===null||i===void 0||i.call(this),cn("p",{class:[`${this.mergedClsPrefix}-p`,this.themeClass],style:this.cssVars},this.$slots)}});function Ki(){return{serverNames:[],serverOther:null,groups:[],server:{clusterId:0,id:0,name:""},httpConfig:{isOn:!1,addresses:[{protocol:"http",host:"",portRange:"80",minPort:0,maxPort:0}]},httpsConfig:{isOn:!1,sslPolicy:{id:0,isOn:!0,certRefs:[],certs:[],clientAuthType:0,clientCARefs:[],clientCACerts:[],minVersion:"TLS 1.1",cipherSuitesIsOn:!1,cipherSuites:[],hsts:{isOn:!1,maxAge:31536e3,includeSubDomains:!1,preload:!1,domains:[],days:365},http2Enabled:!0,http3Enabled:!1,ocspIsOn:!1},supportsHTTP3:!1,addresses:[{protocol:"https",host:"",portRange:"443",minPort:0,maxPort:0}]},redirectToHTTPSConfig:{isPrior:!1,isOn:!1,status:0,host:"",port:443,onlyDomains:[],exceptDomains:[]},webId:0,serverId:0,serverType:"",userPlan:{id:0},userPlans:[]}}function xp(){return{uamConfig:{addToWhiteList:!1,conds:{isOn:!0,connector:"and",groups:[]},exceptURLPatterns:[],isOn:!1,isPrior:!1,keyLife:0,minQPSPerIP:0,onlyURLPatterns:[]},ccConfig:{action:"",enableFingerprint:!1,enableGET302:!1,exceptURLPatterns:[],ignoreCommonAgents:!1,ignoreCommonFiles:!1,isOn:!1,isPrior:!1,level:"",minQPSPerIP:0,onlyURLPatterns:[],thresholds:[],useDefaultThresholds:!1,withRequestPath:!1},defenseConfig:{isOn:!1,records:[]},ccWebId:0,defenseWebId:0}}function O2(){return{optimizationConfig:{isPrior:!1,html:{onlyURLPatterns:[],exceptURLPatterns:[],isOn:!1,keepComments:!1,keepConditionalComments:!1,keepDefaultAttrVals:!1,keepDocumentTags:!1,keepEndTags:!1,keepQuotes:!1,keepWhitespace:!1},javascript:{onlyURLPatterns:[],exceptURLPatterns:[],isOn:!1,precision:0,version:0,keepVarNames:!1},css:{onlyURLPatterns:[],exceptURLPatterns:[],isOn:!1,precision:0,keepCSS2:!1}},featureIsOn:!1,webId:0}}const C2={key:1,class:"space-y-4 text-sm"},y2={class:"text-gray-600 text-sm lg:w-30 md:w-30 w-22 dark:text-white"},S2={class:"flex items-center"},_2={key:1},w2={key:2},k2=ae({name:"InfoSummary",__name:"info-summary",props:Be({serverData:{}},{visible:{default:!0},visibleModifiers:{}}),emits:Be(["serverRefresh"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=t,s=Ze(i,"visible");function o(A){Sc.emit("update-content",A)}const a=i,c=fe({name:"",cname:"",isOn:!1,userPlan:{id:0},groups:[]}),f=B(!0),h=B(!1),g=B(!1),v=B("");function O(){const A=new Date,R=A.getFullYear(),k=String(A.getMonth()+1).padStart(2,"0"),x=String(A.getDate()).padStart(2,"0"),T=String(A.getHours()).padStart(2,"0"),M=String(A.getMinutes()).padStart(2,"0"),N=String(A.getSeconds()).padStart(2,"0");v.value=`${R}-${k}-${x} ${T}:${M}:${N}`}const y=()=>{o(c)},S=()=>{n("serverRefresh",c.serverNames,!0)};je(()=>a.serverData,A=>{A&&(O(),Object.assign(c,A),f.value=!1,s.value=!1)},{immediate:!0});const w=J(()=>[{key:"isOn",title:u("page.webSet.listItems.status"),value:c.isOn?u("common.on"):u("common.off"),coler:c.isOn?"bg-green-500":"bg-red-500",text:c.isOn?"text-green-500":"text-red-500"},{key:"type",title:u("page.webSite.table.type"),value:()=>d(Ls,{size:"small",bordered:!1},{default:()=>[c.serverType==="httpProxy"?u("page.webSite.httpProxy"):u("page.webSite.pages")]}),render:!0},{key:"name",title:u("page.webSet.listItems.siteName"),value:()=>d("span",{onClick:()=>g.value=!0,class:"flex gap-1 cursor-pointer"},[c.name,X(" "),d(_e,{localIcon:"material-symbols--edit-square-outline"},null)]),render:!0},{key:"cname",title:u("page.webSet.listItems.cname"),value:()=>d("span",{onClick:()=>B$(c.cname),class:"flex gap-1 cursor-pointer"},[c.cname,X(" "),d(_e,{localIcon:"fad--copy"},null)]),render:!0},{key:"planName",title:u("page.webSet.listItems.planName"),value:c.userPlan.name||u("page.webSet.listItems.noPlan")},{key:"planDayTo",title:u("page.webSet.listItems.planExpire"),value:c.userPlan.dayTo||"-"},{key:"updateDayTo",title:u("page.webSet.listItems.updateDate"),value:v.value}]);return e({closeRefresh:()=>{h.value=!1},openRefresh:()=>{h.value=!0}}),(A,R)=>{const k=ya,x=xO,T=Ls,M=re,N=ze;return L(),te(Ce,null,[d(N,{title:C(u)("page.webSet.info")},{default:p(()=>{var I;return[f.value?(L(),te(Ce,{key:0},[d(k,{text:"",repeat:6}),d(k,{text:"",style:{width:"60%"}})],64)):(L(),te("div",C2,[(L(!0),te(Ce,null,Ot(w.value,q=>(L(),te("div",{key:q.key,class:"flex items-center"},[U("span",y2,Q(q.title),1),U("div",S2,[q.key=="isOn"?(L(),te("span",{key:0,class:Ln(`w-2 h-2 rounded-full ${q.coler}  mr-1`)},null,2)):Xe("",!0),q.render?(L(),te("span",_2,[(L(),W(yn(q.value)))])):(L(),te("span",{key:2,class:Ln(`flex gap-1 text-sm  ${q.key=="isOn"?q.text+" font-bold":""}`)},[X(Q(q.value)+" ",1),q.key=="isOn"?(L(),te("span",{key:0,onClick:S},[d(_e,{"local-icon":"material-symbols--refresh-rounded",class:Ln(["text-gray","cursor-pointer",{"animate-spin":h.value}])},null,8,["class"])])):Xe("",!0)],2))])]))),128))])),((I=c.groups)==null?void 0:I.length)!==0?(L(),te("div",w2,[d(x,{"title-placement":"left"},{default:p(()=>[X(Q(C(u)("page.webSite.table.groups")),1)]),_:1}),d(M,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(c.groups,q=>(L(),W(T,{key:q.id,size:"small",bordered:!1},{default:p(()=>[X(Q(q.name),1)]),_:2},1024))),128))]),_:1})])):Xe("",!0)]}),_:1},8,["title"]),d(s2,{visible:g.value,"onUpdate:visible":R[0]||(R[0]=I=>g.value=I),"edit-data":c,"onUpdate:editData":R[1]||(R[1]=I=>c=I),onUpdateEdit:y},null,8,["visible","edit-data"])],64)}}}),x2={class:"w-full"},P2={style:{display:"block","margin-top":"4px",color:"#888"},class:"text-xs"},$2={class:"w-full"},T2={style:{display:"block","margin-top":"4px",color:"#888"},class:"text-xs"},R2=ae({name:"EditDomainDrawer",__name:"edit-domain-drawer",props:Be({drawerData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["update"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=t,s=i,o=J(()=>({add:u("common.add"),edit:u("common.edit")})),a=fe({type:"add",data:{name:"",type:"",subNames:[]}}),l=B(""),c=B(!1),f=B("single"),h=y=>{const S=y.data.subNames;S&&(S==null?void 0:S.length)>0&&(l.value=S.join(`
`),f.value="multiple")},g=Ze(i,"visible"),v=async()=>{c.value=!0;const y="/servers/addServerNamePopup",S=f.value;let w={mode:S};S==="multiple"?w.serverNames=l.value:w.serverName=a.data.name;const{data:_,error:$}=await Ee(w,y);if(!$){n("update",_.serverName);return}O()},O=()=>{c.value=!1};return e({cloesLoading:O}),je(()=>s.drawerData,y=>{f.value="single",Object.assign(a,js(y)),h(y)},{deep:!0}),(y,S)=>{const w=_e,_=Ne,$=_s,A=Ne,R=Ss,k=Te,x=re,T=ze,M=Pt;return L(),W(M,{show:g.value,"onUpdate:show":S[5]||(S[5]=N=>g.value=N)},{default:p(()=>[d(T,{style:{width:"600px"},title:o.value[a.type],bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p(()=>[U("span",{onClick:S[0]||(S[0]=()=>g.value=!1)},[d(w,{"local-icon":"material-symbols-light--close-rounded",class:"text-2xl cursor-pointer transform transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(x,null,{default:p(()=>[d(k,{disabled:!((l.value||"").trim()||(a.data.name||"").trim()),loading:c.value,type:"info",onClick:v},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1},8,["disabled","loading"]),d(k,{onClick:S[4]||(S[4]=()=>g.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(R,{value:f.value,"onUpdate:value":S[3]||(S[3]=N=>f.value=N),type:"line",animated:""},{default:p(()=>[d($,{name:"single",tab:C(u)("page.webSet.single")},{default:p(()=>[U("div",x2,[d(_,{value:a.data.name,"onUpdate:value":S[1]||(S[1]=N=>a.data.name=N),placeholder:C(u)("page.webSet.singleInput")},null,8,["value","placeholder"]),U("span",P2,Q(C(u)("page.webSet.singleTip")),1)])]),_:1},8,["tab"]),d($,{name:"multiple",tab:C(u)("page.webSet.multiple")},{default:p(()=>[U("div",$2,[d(A,{value:l.value,"onUpdate:value":S[2]||(S[2]=N=>l.value=N),type:"textarea",placeholder:C(u)("page.webSet.multipleInput")},null,8,["value","placeholder"]),U("span",T2,Q(C(u)("page.webSet.multipleTip")),1)])]),_:1},8,["tab"])]),_:1},8,["value"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),I2={class:"mr-2 text-xs"},Q2={class:"flex"},A2=["onClick"],N2=["onClick"],M2=ae({name:"DomainConfig",__name:"domain-config",props:{domainData:{}},emits:["serverRefresh"],setup(i,{emit:e}){const t=e,n=Ws(),s=J(()=>n.query.serverId),o=qe("loading"),a=qe("baseConfig"),l=B(),c=B(!1),f=B(null),h=i,g=fe([]),v=()=>({type:"add",data:{name:"",type:"",subNames:[]}}),O=fe(v()),y=($,A)=>{c.value=!0;const R={type:"edit",data:{...$},index:A};Object.assign(O,R)},S=()=>{O.index=0,Object.assign(O,v()),c.value=!0},w=async($,A)=>{var N,I;f.value=A;const R=[...g];R.splice(A,1);const k="/servers/server/settings/serverNames",x={csrfToken:await Kt(),serverId:s.value,serverNames:JSON.stringify(R)},{data:T,error:M}=await Ee(x,k);M||((N=a==null?void 0:a.serverOther)!=null&&N.serverNames&&(a.serverOther.serverNames=R,Sc.emit("update-content",a.serverOther)),(I=window.$message)==null||I.success(u("common.deleteSuccess"))),g.splice(0,g.length,...R),f.value=null},_=async $=>{var M;const A=[...g];O.type==="edit"?A[O.index??0]=$:A.push($);const R="/servers/server/settings/serverNames",k={csrfToken:await Kt(),serverId:s.value,serverNames:JSON.stringify(A)},{data:x,error:T}=await Ee(k,R);T||((M=a==null?void 0:a.serverOther)!=null&&M.serverNames?(a.serverOther.serverNames=A,Sc.emit("update-content",a.serverOther)):t("serverRefresh",A),g.splice(0,g.length,...A)),l.value.cloesLoading(),c.value=!1};return je(()=>h.domainData,$=>{g.splice(0,g.length,...$)},{immediate:!0}),($,A)=>{const R=ya,k=_e,x=re,T=Te,M=ze;return L(),W(M,{size:"small",title:C(u)("page.webSet.domain")},{default:p(()=>[C(o)?(L(),te(Ce,{key:0},[d(R,{text:"",repeat:2}),d(R,{text:"",style:{width:"60%"}})],64)):(L(),te(Ce,{key:1},[d(x,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(g,(N,I)=>(L(),te("div",{key:I,class:"flex items-center justify-center px-3 py-2 rounded-md bg-gray-200 dark:bg-slate-800 hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors duration-300"},[U("span",I2,Q(`${N.name===""?N.subNames&&N.subNames[0]+C(u)("page.webSet.moreDomain",{count:N.subNames.length}):N.name}`),1),U("div",Q2,[U("span",{onClick:q=>y(N,I),class:"cursor-pointer mr-1"},[d(k,{"local-icon":"material-symbols--edit-outline"})],8,A2),U("span",{onClick:q=>w(N,I),class:"cursor-pointer"},[I!==f.value?(L(),W(k,{key:0,"local-icon":"material-symbols--delete-outline-rounded"})):(L(),W(k,{key:1,"local-icon":"svg-spinners--3-dots-scale"}))],8,N2)])]))),128))]),_:1}),d(x,{class:"mt-4"},{default:p(()=>[d(T,{onClick:S,strong:"",secondary:"",type:"info"},{icon:p(()=>[d(k,{"local-icon":"material-symbols-light--add-2"})]),default:p(()=>[X(" "+Q(C(u)("page.webSet.add")),1)]),_:1})]),_:1}),d(R2,{ref_key:"editChild",ref:l,visible:c.value,"onUpdate:visible":A[0]||(A[0]=N=>c.value=N),"drawer-data":O,onUpdate:_},null,8,["visible","drawer-data"])],64))]),_:1},8,["title"])}}}),L2=ae({name:"CreateGroups",__name:"create-groups",props:{visible:{default:!0},visibleModifiers:{}},emits:Be(["updateGroup"],["update:visible"]),setup(i,{emit:e}){const t=e,n=fe({name:""}),s=qe("modelType"),o=qe("serverId",B("")),a=Ze(i,"visible"),l=B(!1),{formRef:c,validate:f}=RO(),h=J(()=>{const{defaultRequiredRule:v}=IO();return{name:[v]}}),g=async()=>{const v="/servers/groups/createPopup";await f(),l.value=!0;const{data:O,error:y}=await Ee(n,v);if(!y){const S=await Kt(),w=O.group;s!=null&&s.data&&(s==null?void 0:s.data).push(w.id);const _=new URLSearchParams;_.append("csrfToken",S),_.append("serverId",o.value),s==null||s.data.forEach(R=>{_.append("groupIds",R.toString())});const{data:$,error:A}=await Mo({url:"/servers/server/settings/groups",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:_.toString()});A||t("updateGroup",w)}l.value=!1,a.value=!1};return(v,O)=>{const y=Ne,S=ve,w=Re,_=nt,$=Te,A=re;return L(),te(Ce,null,[d(_,{show:l.value,"onUpdate:show":O[1]||(O[1]=R=>l.value=R)},{default:p(()=>[d(w,{ref_key:"formRef",ref:c,model:n,rules:h.value,class:"px-1"},{default:p(()=>[d(S,{path:"name",label:v.$t("page.webSite.groupsText.name")},{default:p(()=>[d(y,{disabled:l.value,value:n.name,"onUpdate:value":O[0]||(O[0]=R=>n.name=R),placeholder:v.$t("page.webSite.groupsText.placeholder")},null,8,["disabled","value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["show"]),d(A,null,{default:p(()=>[d($,{disabled:l.value,onClick:g,type:"info"},{default:p(()=>[X(Q(v.$t("common.confirm")),1)]),_:1},8,["disabled"]),d($,{onClick:O[2]||(O[2]=()=>a.value=!1)},{default:p(()=>[X(Q(v.$t("common.cancel")),1)]),_:1})]),_:1})],64)}}}),U2={class:"space-y-4"},D2=["onClick"],q2=ae({name:"ChooseGroups",__name:"choose-groups",props:{visible:{default:!0},visibleModifiers:{}},emits:Be(["updateGroup"],["update:visible"]),setup(i,{emit:e}){const t=e,n=qe("modelType"),s=qe("serverId",B("")),o=Ze(i,"visible"),a=B(null),l=B(!0),c=B([]),f=async()=>{const O="/servers/groups/selectPopup",y={selectedGroupIds:n==null?void 0:n.data.join(",")},{data:S,error:w}=await ht(O,y);w||(c.value=S.groups||[]),l.value=!1};function h(O){a.value=O}const g=async O=>{const y="/servers/server/settings/groups",S=a.value||0,w=await Kt();n!=null&&n.data&&(n==null?void 0:n.data).push(S);const _=new URLSearchParams;_.append("csrfToken",w),_.append("serverId",s.value),n==null||n.data.forEach(R=>{_.append("groupIds",R.toString())});const{data:$,error:A}=await Mo({url:y,method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:_.toString()});A||t("updateGroup",O),o.value=!1,l.value=!1},v=async()=>{l.value=!0;const O="/servers/groups/selectPopup",y=c.value.find(S=>S.id===a.value);await Ee({groupId:a.value},O),g(y)};return vt(()=>{f()}),(O,y)=>{const S=re,w=nt,_=Te;return L(),te("div",U2,[d(w,{show:l.value,class:"min-h-[30px]"},{default:p(()=>[d(S,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(c.value,($,A)=>(L(),te("div",{key:$.id||A,onClick:R=>h($.id),class:Ln(["bg-gray-200 text-gray-800 px-3 py-1 rounded-md text-sm hover:bg-gray-300 cursor-pointer","dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",a.value===$.id?"border-2 border-blue-500":"border border-transparent"])},[U("span",null,Q($.name),1)],10,D2))),128))]),_:1})]),_:1},8,["show"]),d(S,null,{default:p(()=>[d(_,{type:"info",onClick:v,disabled:l.value?!0:a.value===null},{default:p(()=>[X(Q(O.$t("common.confirm")),1)]),_:1},8,["disabled"]),d(_,{onClick:y[0]||(y[0]=()=>o.value=!1)},{default:p(()=>[X(Q(O.$t("common.cancel")),1)]),_:1})]),_:1})])}}}),E2=ae({name:"EditGroupsDrawer",__name:"edit-groups-drawer",props:{visible:{default:!1},visibleModifiers:{}},emits:Be(["pushGruup"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=t,s=fe({type:"choose",data:[]}),o=Ze(i,"visible"),a={choose:d(q2,null,null),create:d(L2,null,null)},l=c=>{n("pushGruup",c)};return Nn("modelType",s),e({modelType:s}),(c,f)=>{const h=_e,g=ze,v=Pt;return L(),W(v,{show:o.value,"onUpdate:show":f[2]||(f[2]=O=>o.value=O)},{default:p(()=>[d(g,{style:{width:"600px"},title:c.$t("page.webSet.group"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:f[0]||(f[0]=()=>o.value=!1)},[d(h,{"local-icon":"material-symbols-light--close-rounded",class:"text-2xl cursor-pointer transform transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[(L(),W(yn(a[s.type]),{visible:o.value,"onUpdate:visible":f[1]||(f[1]=O=>o.value=O),onUpdateGroup:l},null,40,["visible"]))]),_:1},8,["title"])]),_:1},8,["show"])}}}),B2={class:"space-y-2"},Z2=["onClick"],z2=ae({name:"PlanConfig",__name:"plan-config",emits:["serverRefresh"],setup(i,{emit:e}){const t=e,n=qe("baseConfig",Ki()),s=qe("loading"),o=qe("serverId",B("")),a=B(!1),l=fe(Ki()),c=B(null),f=B(!1),h=B(),g=B(),v=J(()=>l.userPlans?[{name:u("page.webSite.null"),id:0,dayTo:"",label:u("page.webSite.null")},...l.userPlans.map(k=>({...k,label:`${k.name} (${k.dayTo})`}))]:[]),O=k=>k.id===0?u("page.webSite.null"):`${k.name} (${k.dayTo})`,y=async(k,x)=>{var I;const T="/servers/server/settings/plan";if(!k){(I=window.$message)==null||I.warning(u("page.webSet.planLimit"));const q=n==null?void 0:n.userPlan.id;q?l.userPlan.id=q:l.userPlan.id=0,a.value=!1;return}const M={csrfToken:await Kt(),serverId:o==null?void 0:o.value,isChanged:"1",userPlanId:x.toString()},{error:N}=await Ee(M,T);N||(n.userPlan=l.userPlan,t("serverRefresh",n.serverNames,!0)),a.value=!1},S=async k=>{var N;const x="/servers/server/settings/plan/data";if(a.value=!0,k===0){y(!0,k);return}const{data:T,error:M}=await Ee({serverId:(o==null?void 0:o.value)||0,userPlanId:k.toString()},x);if(!M){h.value=T||null;const I=(N=h.value)==null?void 0:N.servers.isValid;I!==null&&y(I,k);return}a.value=!1},w=()=>{const k=[],x=l.groups||[];x.length!==0&&x.forEach(T=>{k.push(T.id)}),g.value.modelType.data=k},_=()=>{w(),g.value.modelType.type="create",f.value=!0},$=()=>{w(),g.value.modelType.type="choose",f.value=!0},A=async k=>{var z;c.value=k;const x="/servers/server/settings/groups",T=[],M=[...l.groups||[]];M.splice(k,1),M.length!==0&&M.forEach(H=>{T.push(H.id)});const N=await Kt(),I=new URLSearchParams;I.append("csrfToken",N),I.append("serverId",o.value),T.forEach(H=>{I.append("groupIds",H.toString())});const{error:q}=await Mo({url:x,method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:I.toString()});q||(t("serverRefresh",l.serverNames,!0),c.value=null,(z=l.groups)==null||z.splice(k,1),n.groups=l.groups)},R=k=>{var x;(x=l.groups)==null||x.push(k),n.groups=l.groups,t("serverRefresh",l.serverNames,!0)};return je([()=>n.userPlan,()=>n.groups],([k,x],[T,M])=>{(k!==T||x!==M)&&Object.assign(l,js(n))}),(k,x)=>{const T=ya,M=ft,N=ve,I=_e,q=re,z=xO,H=Te,F=nt,V=ze;return L(),W(V,{size:"small",title:`${C(u)("page.webSite.plan")+"/"+C(u)("page.webSite.table.groups")}`},{default:p(()=>[C(s)?(L(),te(Ce,{key:0},[d(T,{text:"",repeat:1}),d(T,{text:"",style:{width:"45%"}})],64)):(L(),te(Ce,{key:1},[d(F,{show:a.value,"onUpdate:show":x[2]||(x[2]=j=>a.value=j)},{default:p(()=>[d(N,{label:C(u)("page.webSite.plan"),"label-placement":"left"},{default:p(()=>[d(M,{value:l.userPlan.id,"onUpdate:value":x[0]||(x[0]=j=>l.userPlan.id=j),options:v.value,"value-field":"id",filterable:"","render-label":O,style:{width:"400px"},onChange:x[1]||(x[1]=j=>S(j))},null,8,["value","options"])]),_:1},8,["label"]),d(N,{label:C(u)("page.webSite.table.groups"),"label-placement":"left"},{default:p(()=>{var j,se;return[U("div",B2,[((j=l.groups)==null?void 0:j.length)!==0?(L(),W(q,{key:0},{default:p(()=>[(L(!0),te(Ce,null,Ot(l.groups,(G,K)=>(L(),te("span",{key:K,closable:"",class:"flex items-center justify-center rounded-md bg-gray-200 px-3 py-1 text-xs transition-colors duration-300 dark:bg-slate-800 hover:bg-gray-100 dark:hover:bg-slate-700"},[U("span",null,Q(G.name),1),U("span",{class:"ml-1 cursor-pointer",onClick:de=>A(K)},[K!==c.value?(L(),W(I,{key:0,"local-icon":"material-symbols--delete-outline-rounded"})):(L(),W(I,{key:1,"local-icon":"svg-spinners:3-dots-scale"}))],8,Z2)]))),128))]),_:1})):Xe("",!0),((se=l.groups)==null?void 0:se.length)!==0?(L(),W(z,{key:1})):Xe("",!0),d(q,null,{default:p(()=>[d(H,{class:"text-xs",dashed:"",size:"small",onClick:$},{default:p(()=>[X(Q(C(u)("page.webSet.choose")),1)]),_:1}),d(H,{class:"text-xs",dashed:"",size:"small",onClick:_},{default:p(()=>[X(Q(C(u)("page.webSet.create")),1)]),_:1})]),_:1})])]}),_:1},8,["label"])]),_:1},8,["show"]),d(E2,{ref_key:"childRef",ref:g,visible:f.value,"onUpdate:visible":x[3]||(x[3]=j=>f.value=j),onPushGruup:R},null,8,["visible"])],64))]),_:1},8,["title"])}}}),H2={class:"mb-2"},X2={class:"mb-1 flex items-center gap-3"},j2={style:{display:"block"},class:"text-xs text-gray-600 dark:text-gray-100"},V2={class:"text-[10px]"},F2={class:"text-[10px]"},W2={class:"text-[10px]"},Y2={class:"text-[10px]"},G2=ae({name:"HttpConfig",__name:"http-config",props:{httpConfig:{},redirectConfig:{}},setup(i){const e=qe("baseConfig",Ki()),t=qe("loading"),n=i,s=wt(),o=J(()=>s.isMobile),a=J(()=>o.value?"top":"left"),l=B(!1),c=B(!1),f=B(!1),h=fe({isOn:!1,addresses:[{protocol:"http",host:"",portRange:"80",minPort:0,maxPort:0}]}),g=fe({isPrior:!1,isOn:!1,status:0,host:"",port:0,onlyDomains:[],exceptDomains:[]}),v=J(()=>[{label:u("page.webSet.httpConfig.default"),status:0},{label:"301 Moved Permanently",status:301},{label:"308 Permanent Redirect",status:308},{label:"302 Found",status:302},{label:"303 See Other",status:303},{label:"307 Temporary Redirect",status:307}]),O=()=>{l.value=!l.value},y=()=>{c.value=!c.value},S=()=>{const R=f.value;f.value=!R},w={http:()=>O(),redirect:()=>y(),more:()=>S()},_=R=>{w[R]()},$=async(R,k,x)=>{var G;const T="/servers/server/settings/http";_(k);const{serverId:M,webId:N,serverType:I}=e,{host:q,port:z}=g,H={...g};H.isOn=x;const F=JSON.stringify(H),V={serverId:M,webId:N,serverType:I,host:q,port:z,redirectToHTTPSJSON:F};R&&(V.isOn="on");const j=new URLSearchParams;Object.entries(V).forEach(([K,de])=>{j.append(K,de.toString())}),j.append("domainsJSON",JSON.stringify(g.onlyDomains)),j.append("domainsJSON",JSON.stringify(g.exceptDomains)),j.append("addresses",JSON.stringify(h.addresses));const{error:se}=await Mo({url:T,method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:j.toString()});if(!se){switch(k){case"http":e.httpConfig.isOn=R;break;case"redirect":e.redirectToHTTPSConfig.isOn=x;break}(G=window.$message)==null||G.success(u("common.msgSync"))}_(k)},A=()=>{$(h.isOn,"http",g.isOn)};return je(()=>n.httpConfig,R=>{if(R){const k=Sf(h);JSON.stringify(R)!==JSON.stringify(k)&&Object.assign(h,R)}},{immediate:!0,deep:!0}),je(()=>n.redirectConfig,R=>{if(R){const k=Sf(g);JSON.stringify(R)!==JSON.stringify(k)&&Object.assign(g,R)}},{immediate:!0,deep:!0}),je(()=>g.port,R=>{R||(g.port=443)}),(R,k)=>{const x=ya,T=en,M=ve,N=un,I=_e,q=ft,z=Ne,H=Ut,F=Wt,V=Te,j=re,se=Re,G=Xt,K=Ht,de=nt,Oe=ze;return L(),W(Oe,{size:"small",title:C(u)("page.webSet.httpConfig.title")},{default:p(()=>[C(t)?(L(),te(Ce,{key:0},[d(x,{text:"",repeat:1}),d(x,{text:"",style:{width:"45%"}})],64)):(L(),te(Ce,{key:1},[d(M,{label:C(u)("page.webSet.httpConfig.enable"),"label-placement":"left"},{default:p(()=>[d(T,{"rubber-band":!1,value:h.isOn,loading:l.value,"onUpdate:value":k[0]||(k[0]=we=>$(!h.isOn,"http",g.isOn))},null,8,["value","loading"])]),_:1},8,["label"]),d(M,{label:"自定义端口","label-placement":"left"},{default:p(()=>[d(QO,{value:h.addresses,"onUpdate:value":k[1]||(k[1]=we=>h.addresses=we),proxy:"http",onRef:A},null,8,["value"])]),_:1}),d(Gi,{name:"collapse"},{default:p(()=>[Zt(U("div",H2,[U("div",X2,[U("span",null,Q(C(u)("page.webSet.httpConfig.redirectTo")),1),d(T,{"rubber-band":!1,value:g.isOn,loading:c.value,"onUpdate:value":k[2]||(k[2]=we=>$(h.isOn,"redirect",!g.isOn))},null,8,["value","loading"])]),U("span",j2,Q(C(u)("page.webSet.httpConfig.redirectToTip")),1)],512),[[zt,h.isOn]])]),_:1}),d(Gi,{name:"collapse"},{default:p(()=>[d(de,{show:f.value},{default:p(()=>[Zt(d(K,{"arrow-placement":"right"},{default:p(()=>[d(G,{name:"more"},{header:p(()=>[d(N,{class:"text-xs text-blue"},{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(I,{"local-icon":"meteor-icons--angle-right",class:"text-xs text-blue"})]),default:p(()=>[d(se,{ref:"formRef",style:{maxWidth:"480px"},"label-width":100,"label-align":"left"},{default:p(()=>[d(M,{label:C(u)("page.webSet.httpConfig.statusCode"),"label-placement":a.value},{default:p(()=>[d(q,{value:g.status,"onUpdate:value":k[3]||(k[3]=we=>g.status=we),options:v.value,"value-field":"status",style:{width:"auto",minWidth:"80px"}},null,8,["value","options"])]),_:1},8,["label","label-placement"]),d(M,{label:C(u)("page.webSet.httpConfig.url"),"label-placement":a.value},{feedback:p(()=>[U("span",V2,Q(C(u)("page.webSet.httpConfig.urlTip")),1)]),default:p(()=>[d(z,{value:g.host,"onUpdate:value":k[4]||(k[4]=we=>g.host=we),placeholder:C(u)("page.webSet.httpConfig.urlPlace")},null,8,["value","placeholder"])]),_:1},8,["label","label-placement"]),d(M,{label:C(u)("page.webSet.httpConfig.port"),"label-placement":a.value},{feedback:p(()=>[U("span",F2,Q(C(u)("page.webSet.httpConfig.portTip")),1)]),default:p(()=>[d(H,{value:g.port,"onUpdate:value":k[5]||(k[5]=we=>g.port=we),style:{maxWidth:"60px"},placeholder:"443","show-button":!1},null,8,["value"])]),_:1},8,["label","label-placement"]),d(M,{label:C(u)("page.webSet.httpConfig.onlyDomains"),"label-placement":a.value},{feedback:p(()=>[U("span",W2,Q(C(u)("page.webSet.httpConfig.onlyDomainsTip")),1)]),default:p(()=>[d(F,{value:g.onlyDomains,"onUpdate:value":k[6]||(k[6]=we=>g.onlyDomains=we)},null,8,["value"])]),_:1},8,["label","label-placement"]),d(M,{label:C(u)("page.webSet.httpConfig.exceptDomains"),"label-placement":a.value},{feedback:p(()=>[U("span",Y2,Q(C(u)("page.webSet.httpConfig.exceptDomainsTip")),1)]),default:p(()=>[d(F,{value:g.exceptDomains,"onUpdate:value":k[7]||(k[7]=we=>g.exceptDomains=we)},null,8,["value"])]),_:1},8,["label","label-placement"]),d(j,null,{default:p(()=>[d(V,{type:"info",size:"small",onClick:k[8]||(k[8]=we=>$(h.isOn,"more",g.isOn))},{default:p(()=>k[9]||(k[9]=[X(" 保存 ")])),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1},512),[[zt,g.isOn&&h.isOn]])]),_:1},8,["show"])]),_:1})],64))]),_:1},8,["title"])}}}),J2=ce(G2,[["__scopeId","data-v-96301710"]]),K2={class:"mb-2"},eT={style:{padding:"20px","text-align":"center",color:"#999"}},tT=ae({name:"ChooseCertsDrawer",__name:"choose-certs-drawer",props:{visible:{default:!1},visibleModifiers:{},configData:{},configDataModifiers:{}},emits:["update:visible","update:configData"],setup(i){const e=qe("baseConfig",Ki()),t=B("selectExisting"),n=Ze(i,"visible"),s=B(!0),o=Ze(i,"configData"),a=B([]),l=B([]);function c(I){l.value=I}const f=()=>{s.value=!0;const I=o.value.sslPolicy.certRefs||[],q=o.value.sslPolicy.certs||[];l.value.forEach(z=>{const H=a.value.find(F=>F.id===z);if(H){const F={isOn:H.isOn,certId:H.id};I.push(F),q.push(H)}}),s.value=!1,n.value=!1,v()},h=J(()=>[{type:"selection"},{key:"name",title:u("page.webSet.httpsConfig.certName")},{key:"dnsNames",title:u("page.webSet.httpsConfig.certDomain")},{key:"timeEndAt",title:u("page.webSet.httpsConfig.certExpire")}]),g=async I=>{s.value=!0;const q="/servers/certs/selectPopup",z=e.serverId,H="all",F={selectedCertIds:"",serverId:z};I&&(F.searchingType=H);const{data:V,error:j}=await ht(q,F);j||(a.value=V.certs||[]),s.value=!1},v=()=>{a.value=[],l.value=[],O.value=[],y.value=[],S.name=""};je(()=>n.value,I=>{I&&g(),t.value="selectExisting"},{immediate:!0,deep:!0});const O=B([]),y=B([]),S=fe({name:""}),w=fe({users:[],serverNames:[],userId:null,userEmail:""}),{formRef:_,validate:$}=RO(),A=J(()=>{const{defaultRequiredRule:I}=IO();return{name:[I]}});function R({fileList:I}){O.value=I}function k({fileList:I}){y.value=I}const x=async()=>{await $(),s.value=!0;const I=o.value.sslPolicy.certRefs||[],q=o.value.sslPolicy.certs||[],z={textMode:0,name:S.name,isCA:0,certFile:O.value[0].file,keyFile:y.value[0].file,description:""},{data:H,error:F}=await PO(z,"/servers/certs/uploadPopup");F||(I.push(H.certRef),q.push(H.cert)),n.value=!1,s.value=!1,v()},T=I=>{w.serverNames.splice(I,1)},M=async()=>{s.value=!0;const I="/servers/server/settings/https/requestCertPopup",q={serverId:e.serverId,excludeServerNames:""},{data:z,error:H}=await ht(I,q);H||Object.assign(w,z),s.value=!1},N=async()=>{var se;s.value=!0;const I=await Kt(),q=o.value.sslPolicy.certRefs||[],z=o.value.sslPolicy.certs||[],H=new URLSearchParams;w.serverNames.forEach(G=>{H.append("serverNames",G)}),H.append("csrfToken",I),w.users.length===0?H.append("userEmail",w.userEmail):H.append("userId",w.userId);const{data:F,error:V,response:j}=await Mo({url:"/servers/server/settings/https/requestCertPopup",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:H.toString()});V?(se=window.$dialog)==null||se.error({title:"Error",content:j.data.message,positiveText:"不知道",negativeText:"知道了"}):(q.push(F.certRef),z.push(F.cert)),n.value=!1,s.value=!1,v()};return je(()=>t.value,I=>{I==="applyFree"&&M()}),(I,q)=>{const z=_e,H=Ne,F=Te,V=tn,j=re,se=ws,G=_s,K=ve,de=wp,Oe=AO,we=_p,pe=Re,Se=Ls,xe=ft,Me=Ss,Pe=nt,st=ze,Ye=Pt;return L(),W(Ye,{show:n.value,"onUpdate:show":q[7]||(q[7]=it=>n.value=it)},{default:p(()=>[d(st,{style:{"max-width":"600px"},title:C(u)("page.webSet.httpsConfig.chooseCert"),bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p(()=>[U("span",{onClick:q[0]||(q[0]=()=>n.value=!1)},[d(z,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(Pe,{show:s.value},{default:p(()=>[d(Me,{value:t.value,"onUpdate:value":q[6]||(q[6]=it=>t.value=it),type:"line",animated:""},{default:p(()=>[d(G,{name:"selectExisting",tab:C(u)("page.webSet.httpsConfig.selectExisting")},{default:p(()=>[U("div",K2,[d(V,null,{default:p(()=>[d(H,{placeholder:C(u)("page.webSite.domainSearch")},null,8,["placeholder"]),d(F,{type:"primary",ghost:""},{default:p(()=>[X(Q(C(u)("page.webSite.search")),1)]),_:1})]),_:1})]),d(j,{class:"mb-2"},{default:p(()=>[d(F,{size:"small",onClick:q[1]||(q[1]=it=>g(!0))},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.allCerts")),1)]),_:1}),d(F,{size:"small",onClick:q[2]||(q[2]=it=>g())},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.matchedCerts")),1)]),_:1}),Zt(d(F,{disabled:l.value.length===0,type:"info",size:"small",onClick:f},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.useSelected",{count:l.value.length})),1)]),_:1},8,["disabled"]),[[zt,l.value.length!==0]])]),_:1}),d(se,{"scroll-x":500,"row-key":it=>it.id,columns:h.value,data:a.value,"checked-row-keys":l.value,pagination:{pageSize:10},"max-height":250,class:"sm:h-full","onUpdate:checkedRowKeys":c},{empty:p(()=>[U("div",eT,Q(C(u)("page.webSet.httpsConfig.noValidCert")),1)]),_:1},8,["row-key","columns","data","checked-row-keys"])]),_:1},8,["tab"]),d(G,{name:"uploadNew",tab:C(u)("page.webSet.httpsConfig.uploadNew")},{default:p(()=>[d(pe,{ref_key:"formRef",ref:_,model:S,rules:A.value,class:"px-1"},{default:p(()=>[d(K,{path:"name",label:C(u)("page.webSet.httpsConfig.certDescription")},{default:p(()=>[d(H,{value:S.name,"onUpdate:value":q[3]||(q[3]=it=>S.name=it)},null,8,["value"])]),_:1},8,["label"]),d(K,{label:C(u)("page.webSet.httpsConfig.chooseCertFile")},{default:p(()=>[d(we,{ref:"certUploader",abstract:"",accept:".crt,.pem,.cer","default-upload":!1,"file-list":O.value,max:1,onChange:R},{default:p(()=>[d(de,{abstract:""},{default:p(({handleClick:it})=>[Zt(d(F,{onClick:it},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseCert")),1)]),_:2},1032,["onClick"]),[[zt,O.value.length===0]])]),_:1}),d(Oe)]),_:1},8,["file-list"])]),_:1},8,["label"]),d(K,{label:C(u)("page.webSet.httpsConfig.chooseKeyFile")},{default:p(()=>[d(we,{ref:"keyUploader",abstract:"",accept:".key,.pem","default-upload":!1,"file-list":y.value,max:1,onChange:k},{default:p(()=>[d(de,{abstract:""},{default:p(({handleClick:it})=>[Zt(d(F,{onClick:it},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseKey")),1)]),_:2},1032,["onClick"]),[[zt,y.value.length===0]])]),_:1}),d(Oe)]),_:1},8,["file-list"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),d(F,{type:"info",disabled:O.value.length===0||y.value.length===0,onClick:x},{default:p(()=>[X(Q(C(u)("common.submit")),1)]),_:1},8,["disabled"])]),_:1},8,["tab"]),d(G,{name:"applyFree",tab:C(u)("page.webSet.httpsConfig.applyFreeCert")},{default:p(()=>[d(K,{label:C(u)("page.webSet.httpsConfig.certDomains")},{default:p(()=>[d(j,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(w.serverNames,(it,Dt)=>(L(),W(Se,{key:Dt,type:"info",size:"small",round:"",closable:"",onClose:sn=>T(Dt)},{default:p(()=>[X(Q(it),1)]),_:2},1032,["onClose"]))),128))]),_:1})]),_:1},8,["label"]),w.users.length!==0?(L(),W(K,{key:0,label:C(u)("page.webSet.httpsConfig.certUser")},{default:p(()=>[d(xe,{value:w.userId,"onUpdate:value":q[4]||(q[4]=it=>w.userId=it),options:w.users,"value-field":"id",filterable:"","label-field":"email",style:{width:"400px"}},null,8,["value","options"])]),_:1},8,["label"])):(L(),W(K,{key:1,label:C(u)("page.webSet.httpsConfig.createUserEmail")},{default:p(()=>[d(H,{value:w.userEmail,"onUpdate:value":q[5]||(q[5]=it=>w.userEmail=it),style:{width:"400px"}},null,8,["value"])]),_:1},8,["label"])),d(F,{type:"info",disabled:s.value,onClick:N},{default:p(()=>[X(Q(C(u)("common.submit")),1)]),_:1},8,["disabled"])]),_:1},8,["tab"])]),_:1},8,["value"])]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),nT=["onClick"],sT={class:"flex items-center gap-2"},iT={class:"flex flex-wrap items-start gap-2"},oT={class:"ml-2 flex gap-1 text-gray-500"},aT=["onClick"],lT={class:"drag-handle cursor-pointer text-sm"},rT=["onClick"],cT={class:"text-[10px]"},dT={class:"flex items-center gap-2"},uT={class:"text-xs space-y-2"},fT={class:"border rounded-md px-3 py-1"},pT={class:"ml-1"},hT={class:"ml-1"},mT={class:"text-[10px]"},gT=ae({name:"HttpsConfig",__name:"https-config",props:{httpsConfig:{}},emits:["serverRefresh"],setup(i,{emit:e}){const t=e,n=Ki(),s=qe("baseConfig",n),o=qe("loading"),a=B(!1),l=B(!1),c=i,f=B(!1),h=fe({isOn:!1,sslPolicy:n.httpsConfig.sslPolicy,supportsHTTP3:!1,addresses:[{protocol:"https",host:"",portRange:"443",minPort:0,maxPort:0}]}),g=[{label:"TLS 1.0",value:"TLS 1.0"},{label:"TLS 1.1",value:"TLS 1.1"},{label:"TLS 1.2",value:"TLS 1.2"},{label:"TLS 1.3",value:"TLS 1.3"}],v=async(N,I,q)=>{const{data:z,error:H}=await ht(N,{serverId:I});H?console.error(`Fetch failed: ${N}`,H):q(z)},O=async(N,I)=>{I?l.value=!0:a.value=!0;const q="/servers/server/settings/https",{serverId:z,serverType:H}=s,F=h.sslPolicy.id,V=JSON.stringify({...h.sslPolicy,hsts:{...h.sslPolicy.hsts,days:k.value},isOn:N}),j=h.sslPolicy.hsts.maxAge||31536e3,se={serverId:z,serverType:H,sslPolicyJSON:V,hstsMaxAge:j,addresses:JSON.stringify(h.addresses)};N&&(se.isOn="on");const{error:G}=await Ee(se,q);G||(F===0&&v("/servers/server/settings/https",z,K=>{h.sslPolicy.id=K.httpsConfig.sslPolicy.id}),t("serverRefresh",s.serverNames,!0),h.isOn=N,Object.assign(s.httpsConfig,h)),I?l.value=!1:a.value=!1},y=()=>{O(h.isOn)},S=J(()=>JSON.stringify(h.sslPolicy)===JSON.stringify(s.httpsConfig.sslPolicy)),w=N=>{var z,H;const I=((z=h==null?void 0:h.sslPolicy)==null?void 0:z.certRefs)??[],q=((H=h==null?void 0:h.sslPolicy)==null?void 0:H.certs)??[];h.sslPolicy={...h.sslPolicy,certRefs:I.filter(F=>F.certId!==N),certs:q.filter(F=>F.id!==N)}};je(()=>c.httpsConfig,N=>{const I=N!=null&&N.sslPolicy?N:n.httpsConfig;Object.assign(h,js(I))},{immediate:!0,deep:!0});const _=B(!1),$=B(["TLS_AES_128_GCM_SHA256","TLS_CHACHA20_POLY1305_SHA256","TLS_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256","TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA","TLS_RSA_WITH_3DES_EDE_CBC_SHA","TLS_RSA_WITH_RC4_128_SHA","TLS_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_RC4_128_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_RC4_128_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"]),A=J(()=>l.value||S.value),R=J(()=>$.value.filter(N=>!h.sslPolicy.cipherSuites.includes(N))),k=J(()=>Number((h.sslPolicy.hsts.maxAge/(60*60*24)).toFixed(1))),x=J(()=>[{label:u("page.webSet.httpsConfig.noCertRequired"),value:0},{label:u("page.webSet.httpsConfig.requestCert"),value:1},{label:u("page.webSet.httpsConfig.certNotValidated"),value:2},{label:u("page.webSet.httpsConfig.certRequiredValidate"),value:3},{label:u("page.webSet.httpsConfig.validateCert"),value:4}]),T=J(()=>{const N=h.sslPolicy.hsts;let I=N.maxAge.toString();return N.includeSubDomains&&(I+=";includeSubDomains"),N.preload&&(I+=";preload"),I}),M=B(!1);return(N,I)=>{const q=ya,z=en,H=ve,F=Te,V=_e,j=re,se=ft,G=Xt,K=Ut,de=Wt,Oe=Re,we=Ht,pe=nt,Se=ze;return L(),W(Se,{size:"small",title:"HTTPS"},{default:p(()=>[C(o)?(L(),te(Ce,{key:0},[d(q,{text:"",repeat:1}),d(q,{text:"",style:{width:"45%"}})],64)):(L(),te(Ce,{key:1},[d(H,{label:C(u)("page.webSet.httpsConfig.enable"),"label-placement":"left"},{default:p(()=>[d(z,{value:h.isOn,loading:a.value,"rubber-band":!1,"onUpdate:value":I[0]||(I[0]=xe=>O(!h.isOn))},null,8,["value","loading"])]),_:1},8,["label"]),d(H,{label:"自定义端口","label-placement":"left"},{default:p(()=>[d(QO,{value:h.addresses,"onUpdate:value":I[1]||(I[1]=xe=>h.addresses=xe),proxy:"http",onRef:y},null,8,["value"])]),_:1}),d(Gi,{name:"collapse"},{default:p(()=>[d(pe,{show:l.value},{default:p(()=>[h.isOn?(L(),W(we,{key:0,"arrow-placement":"right","default-expanded-names":"ssl",accordion:""},{default:p(()=>[d(G,{title:C(u)("page.webSet.httpsConfig.ssl"),name:"ssl"},{default:p(()=>[d(H,{label:C(u)("page.webSet.httpsConfig.enableHttp2"),"label-placement":"left"},{default:p(()=>[d(z,{value:h.sslPolicy.http2Enabled,"onUpdate:value":I[2]||(I[2]=xe=>h.sslPolicy.http2Enabled=xe),"rubber-band":!1},null,8,["value"])]),_:1},8,["label"]),d(H,{label:C(u)("page.webSet.httpsConfig.chooseCert"),"label-placement":"left"},{default:p(()=>{var xe,Me;return[((Me=(xe=h.sslPolicy)==null?void 0:xe.certs)==null?void 0:Me.length)===0?(L(),W(F,{key:0,dashed:"",onClick:I[3]||(I[3]=Pe=>f.value=!0)},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseCert")),1)]),_:1})):(L(),W(j,{key:1,size:"small",class:"items-center"},{default:p(()=>{var Pe;return[(L(!0),te(Ce,null,Ot((Pe=h.sslPolicy)==null?void 0:Pe.certs,st=>(L(),te("div",{key:st.id,class:"flex items-center gap-2 border border-gray-200 rounded-lg px-3 py-1 text-xs"},[U("span",null,Q(st.name),1),U("span",{class:"cursor-pointer",onClick:Ye=>w(st.id)},[d(V,{"local-icon":"material-symbols-light--close",class:"text-xl"})],8,nT)]))),128)),d(F,{size:"small",onClick:I[4]||(I[4]=st=>f.value=!0)},{default:p(()=>I[27]||(I[27]=[X("+")])),_:1})]}),_:1}))]}),_:1},8,["label"]),d(H,{style:{maxWidth:"200px"},label:C(u)("page.webSet.httpsConfig.minTlsVersion"),"label-placement":"left"},{default:p(()=>[d(se,{value:h.sslPolicy.minVersion,"onUpdate:value":I[5]||(I[5]=xe=>h.sslPolicy.minVersion=xe),options:g},null,8,["value"])]),_:1},8,["label"]),d(F,{loading:l.value,disabled:A.value,type:"info",size:"small",onClick:I[6]||(I[6]=xe=>O(!0,!0))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["loading","disabled"]),d(tT,{"config-data":h,"onUpdate:configData":I[7]||(I[7]=xe=>h=xe),visible:f.value,"onUpdate:visible":I[8]||(I[8]=xe=>f.value=xe)},null,8,["config-data","visible"])]),_:1},8,["title"]),d(G,{title:C(u)("page.webSet.httpsConfig.cipherSuites"),name:"cipher"},{default:p(()=>[d(j,{vertical:""},{default:p(()=>[U("div",sT,[U("div",null,Q(C(u)("page.webSet.httpsConfig.customCipherSuites")),1),d(z,{value:h.sslPolicy.cipherSuitesIsOn,"onUpdate:value":[I[9]||(I[9]=xe=>h.sslPolicy.cipherSuitesIsOn=xe),I[10]||(I[10]=()=>O(!0,!0))]},null,8,["value"])]),d(Gi,{name:"collapse"},{default:p(()=>[h.sslPolicy.cipherSuitesIsOn?(L(),W(j,{key:0,vertical:""},{default:p(()=>[U("div",iT,[U("div",null,Q(C(u)("page.webSet.httpsConfig.addedSuites"))+" ("+Q(h.sslPolicy.cipherSuites.length)+"): ",1),d(C(Sa),{modelValue:h.sslPolicy.cipherSuites,"onUpdate:modelValue":I[11]||(I[11]=xe=>h.sslPolicy.cipherSuites=xe),"item-key":"item","force-fallback":!0,handle:".drag-handle",animation:"200",class:"flex flex-wrap select-none gap-2"},{item:p(({element:xe,index:Me})=>[(L(),te("div",{key:Me,class:"drag-handle flex cursor-pointer items-center border border rounded-lg px-3 py-0.5 text-[10px] shadow-sm"},[U("span",null,Q(xe),1),U("div",oT,[U("span",{class:"cursor-pointer text-sm",onClick:Pe=>h.sslPolicy.cipherSuites.splice(Me,1)},[d(V,{"local-icon":"iconamoon--close-fill"})],8,aT),U("span",lT,[d(V,{"local-icon":"material-symbols--menu"})])])]))]),_:1},8,["modelValue"])]),d(j,null,{default:p(()=>[Zt(d(F,{size:"small",type:"error",dashed:"",onClick:I[12]||(I[12]=()=>h.sslPolicy.cipherSuites=[])},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.clearAllSuites")),1)]),_:1},512),[[zt,h.sslPolicy.cipherSuites.length>0]]),d(F,{size:"small",dashed:""},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.addRecommendedSuites")),1)]),_:1}),d(F,{size:"small",dashed:""},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.addCompatibleSuites")),1)]),_:1})]),_:1}),d(j,{class:"mt-2"},{default:p(()=>[U("div",{class:"flex cursor-pointer items-center",onClick:I[13]||(I[13]=xe=>_.value=!_.value)},[U("span",null,Q(C(u)("page.webSet.httpsConfig.allOptionalSuites"))+" ("+Q(R.value.length)+") ",1),d(V,{"local-icon":"meteor-icons--angle-right",class:Ln(["transition-transform duration-200",[_.value?"rotate-90":""]])},null,8,["class"])]),_.value?(L(),W(j,{key:0,size:"small",class:"mt-2"},{default:p(()=>[(L(!0),te(Ce,null,Ot(R.value,(xe,Me)=>(L(),te("div",{key:Me,class:"cursor-pointer border rounded-lg px-3 py-0.5",onClick:Pe=>h.sslPolicy.cipherSuites.push(xe)},[I[28]||(I[28]=X(" > ")),U("span",cT,Q(xe),1)],8,rT))),128))]),_:1})):Xe("",!0)]),_:1}),d(F,{loading:l.value,disabled:A.value,type:"info",size:"small",onClick:I[14]||(I[14]=xe=>O(!0,!0))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["loading","disabled"])]),_:1})):Xe("",!0)]),_:1})]),_:1})]),_:1},8,["title"]),d(G,{title:C(u)("page.webSet.httpsConfig.hstsSettings"),name:"hsts"},{default:p(()=>[d(j,{vertical:""},{default:p(()=>[U("div",dT,[U("div",null,Q(C(u)("page.webSet.httpsConfig.enableHsts")),1),d(z,{value:h.sslPolicy.hsts.isOn,"onUpdate:value":[I[15]||(I[15]=xe=>h.sslPolicy.hsts.isOn=xe),I[16]||(I[16]=()=>O(!0,!0))]},null,8,["value"])]),Zt(U("div",uT,[U("div",null,Q(C(u)("page.webSet.httpsConfig.hstsHeader")),1),U("div",null,[U("span",fT,"Strict-Transport-Security:max-age="+Q(T.value),1)]),U("div",null,[U("div",{class:"flex cursor-pointer items-center text-blue",onClick:I[17]||(I[17]=xe=>M.value=!M.value)},[U("span",null,Q(C(u)("page.webSet.httpsConfig.modify")),1),d(V,{"local-icon":"meteor-icons--angle-right",class:Ln(["transition-transform duration-200",[M.value?"rotate-90":""]])},null,8,["class"])]),d(Gi,{name:"collapse"},{default:p(()=>[Zt(d(Oe,null,{default:p(()=>[d(H,{label:C(u)("page.webSet.httpsConfig.maxAge"),"label-placement":"left"},{default:p(()=>[d(K,{value:h.sslPolicy.hsts.maxAge,"onUpdate:value":I[18]||(I[18]=xe=>h.sslPolicy.hsts.maxAge=xe),style:{maxWidth:"120px"},placeholder:"31536000","show-button":!1},null,8,["value"]),U("span",pT,Q(C(u)("page.webSet.httpsConfig.second")),1),U("span",hT,Q(k.value)+" "+Q(C(u)("page.webSet.httpsConfig.day")),1)]),_:1},8,["label"]),d(H,{label:C(u)("page.webSet.httpsConfig.includeSubdomains"),"label-placement":"left"},{default:p(()=>[d(z,{value:h.sslPolicy.hsts.includeSubDomains,"onUpdate:value":I[19]||(I[19]=xe=>h.sslPolicy.hsts.includeSubDomains=xe)},null,8,["value"])]),_:1},8,["label"]),d(H,{label:C(u)("page.webSet.httpsConfig.hstsPreload"),"label-placement":"left"},{default:p(()=>[d(z,{value:h.sslPolicy.hsts.preload,"onUpdate:value":I[20]||(I[20]=xe=>h.sslPolicy.hsts.preload=xe)},null,8,["value"])]),_:1},8,["label"]),d(H,{label:C(u)("page.webSet.httpsConfig.hstsEffectiveDomains"),"label-placement":"left"},{feedback:p(()=>[U("span",mT,Q(C(u)("page.webSet.httpsConfig.defaultAllDomains")),1)]),default:p(()=>[d(de,{value:h.sslPolicy.hsts.domains,"onUpdate:value":I[21]||(I[21]=xe=>h.sslPolicy.hsts.domains=xe)},null,8,["value"])]),_:1},8,["label"]),d(F,{loading:l.value,disabled:A.value,type:"info",size:"small",onClick:I[22]||(I[22]=xe=>O(!0,!0))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["loading","disabled"])]),_:1},512),[[zt,M.value]])]),_:1})])],512),[[zt,h.sslPolicy.hsts.isOn]])]),_:1})]),_:1},8,["title"]),d(G,{title:C(u)("page.webSet.httpsConfig.ocspSettings"),name:"ocsp"},{default:p(()=>[d(H,{label:"OCSP Stapling","label-placement":"left"},{default:p(()=>[d(z,{value:h.sslPolicy.ocspIsOn,"onUpdate:value":[I[23]||(I[23]=xe=>h.sslPolicy.ocspIsOn=xe),I[24]||(I[24]=()=>O(!0,!0))]},null,8,["value"])]),_:1})]),_:1},8,["title"]),d(G,{title:C(u)("page.webSet.httpsConfig.clientAuth"),name:"client-auth"},{default:p(()=>[d(j,{vertical:""},{default:p(()=>[d(se,{value:h.sslPolicy.clientAuthType,"onUpdate:value":I[25]||(I[25]=xe=>h.sslPolicy.clientAuthType=xe),style:{width:"280px"},options:x.value},null,8,["value","options"]),d(F,{loading:l.value,disabled:A.value,type:"info",size:"small",onClick:I[26]||(I[26]=xe=>O(!0,!0))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1},8,["title"])]),_:1})):Xe("",!0)]),_:1},8,["show"])]),_:1})],64))]),_:1})}}}),vT=ce(gT,[["__scopeId","data-v-a13d08ee"]]),bT={class:"mt-2 flex items-end justify-end"},OT=ae({name:"ChooseCerts",__name:"choose-certs",props:{visible:{default:!1},visibleModifiers:{}},emits:Be(["updateCerts"],["update:visible"]),setup(i,{emit:e}){const t=e,n=Ze(i,"visible"),s=B(""),o=fe({page:"",certInfos:[],certs:[]}),a=B(!1),l=B([]),c=M=>{const N=new Date(M.toString().length===10?M*1e3:M),I=N.getFullYear(),q=String(N.getMonth()+1).padStart(2,"0"),z=String(N.getDate()).padStart(2,"0");return`${I}-${q}-${z}`};function f(M){l.value=M}const h=J(()=>[{type:"selection"},{title:u("lbsettings.certificateDescription"),key:"name"},{title:u("lbsettings.domain"),key:"dnsNames"},{title:u("lbsettings.expirationDate"),key:"timeEndAt",render:M=>c(M.timeEndAt)}]),g=fe({page:1,pageSize:10,pageCount:1,pageSizes:[10,20,30,50]}),v=M=>{var z;if(M.length===0)return g.pageCount=1;const q=new DOMParser().parseFromString(M,"text/html").querySelectorAll("a");for(const H of Array.from(q))if((z=H.textContent)!=null&&z.includes("尾页")){const F=H.href.match(/page=(\d+)/);F&&(g.pageCount=Number(F[1]));break}},O=async(M,N,I)=>{a.value=!0;const q={page:M??1,pageSize:N??10,selectedCertIds:"",keyword:I,serverId:0},{data:z,error:H}=await ht("/servers/certs/selectPopup",q);if(!H){const{certInfos:F,certs:V}=z;Object.assign(o,{page:z.page,certInfos:F??[],certs:V??[]}),v(z.page)}a.value=!1},y=M=>{O(M)},S=M=>{O(g.page,M)},w=()=>{O(1,10,s.value)},_=()=>{const M=o.certs.filter(I=>l.value.includes(I.id)),N=M.map(I=>({isOn:I.isOn,certId:I.id}));t("updateCerts",M,N),n.value=!1},$=M=>{const N=M;N.style.height="0",N.style.opacity="0"},A=M=>{const N=M;N.style.transition="all 0.3s ease",N.style.height=`${N.scrollHeight}px`,N.style.opacity="1"},R=M=>{const N=M;N.style.height=""},k=M=>{const N=M;N.style.height=`${N.scrollHeight}px`,N.style.opacity="1"},x=M=>{const N=M;N.style.transition="all 0.2s ease",N.offsetHeight,N.style.height="0",N.style.opacity="0"},T=M=>{const N=M;N.style.height=""};return je(()=>n.value,M=>{M?O():l.value=[]}),(M,N)=>{const I=_e,q=Ne,z=Te,H=tn,F=re,V=ze,j=ws,se=a2,G=Pt;return L(),W(G,{show:n.value,"onUpdate:show":N[4]||(N[4]=K=>n.value=K)},{default:p(()=>[d(V,{style:{width:"480px"},title:C(u)("lbsettings.selectCertificate"),bordered:!1,size:"huge",role:"dialog",class:"overflow-x-auto"},{"header-extra":p(()=>[U("span",{onClick:N[0]||(N[0]=()=>n.value=!1)},[d(I,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(F,{vertical:""},{default:p(()=>[d(H,null,{default:p(()=>[d(q,{value:s.value,"onUpdate:value":N[1]||(N[1]=K=>s.value=K),placeholder:C(u)("lbsettings.certificateInfo")},null,8,["value","placeholder"]),d(z,{onClick:w},{default:p(()=>[X(Q(C(u)("lbsettings.search")),1)]),_:1})]),_:1}),d(Gi,{onBeforeEnter:$,onEnter:A,onAfterEnter:R,onBeforeLeave:k,onLeave:x,onAfterLeave:T},{default:p(()=>[Zt(d(V,{size:"small",class:"mb-4"},{default:p(()=>[d(F,null,{default:p(()=>[d(z,{class:"text-xs md:text-sm",dashed:"",size:"small",onClick:N[2]||(N[2]=()=>l.value=[])},{default:p(()=>[X(Q(C(u)("common.cancelSelected")),1)]),_:1}),d(z,{class:"text-xs md:text-sm",type:"error",dashed:"",size:"small",onClick:_},{default:p(()=>[X(Q(C(u)("lbsettings.chooseCertificate")),1)]),_:1})]),_:1})]),_:1},512),[[zt,l.value.length!==0]])]),_:1}),d(j,{"scroll-x":500,"checked-row-keys":l.value,"row-key":K=>K.id,loading:a.value,columns:h.value,data:o.certs,"max-height":150,"onUpdate:checkedRowKeys":f},null,8,["checked-row-keys","row-key","loading","columns","data"]),U("div",bT,[d(se,{page:g.page,"onUpdate:page":[N[3]||(N[3]=K=>g.page=K),y],"show-size-picker":!0,"page-sizes":g.pageSizes,"page-count":g.pageCount,"onUpdate:pageSize":S},null,8,["page","page-sizes","page-count"])])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),CT=ce(OT,[["__scopeId","data-v-03bc2362"]]),yT=ae({name:"UploadDrawer",__name:"upload-drawer",props:{visible:{default:!1},visibleModifiers:{}},emits:Be(["refreshPage"],["update:visible"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=e,s=B(!1),o=()=>({certConfig:{id:0,isOn:!1,name:"",description:"",certData:"",keyData:"",serverName:"",isCA:!1,isACME:!1,timeBeginAt:0,timeEndAt:0,dnsNames:[],commonNames:[],ocsp:void 0,ocspExpiresAt:0,ocspError:""}}),a=B(o()),l=B(!1),c=B([]),f=B([]),h=J(()=>[{label:u("page.certs.encryptedCertificate"),value:"0"},{label:u("page.certs.caCertificate"),value:"1"}]),g=w=>{switch(w){case"0":a.value.certConfig.isCA=!1;return;case"1":a.value.certConfig.isCA=!0;return;default:a.value.certConfig.isCA=!1}};function v({fileList:w}){c.value=w}function O({fileList:w}){f.value=w}const y=async()=>{var A,R,k,x,T,M;if(a.value.certConfig.name.trim()===""){(A=window.$message)==null||A.warning(u("page.certs.nameRequired"));return}const w={textMode:l.value?"1":"0",name:a.value.certConfig.name,description:""};if(a.value.certConfig.isOn&&(w.isOn=1),a.value.certConfig.isCA&&(w.isCA=1),l.value){if(a.value.certConfig.certData.trim()===""){(k=window.$message)==null||k.error(u("page.certs.pleaseEnterCertificate"));return}const N=a.value.certConfig.certData;w.certText=N}else{if(c.value.length===0){(R=window.$message)==null||R.error(u("page.certs.pleaseUploadCertificate"));return}w.certFile=c.value[0].file}if(!a.value.certConfig.isCA)if(l.value){if(a.value.certConfig.keyData.trim()===""){(T=window.$message)==null||T.error(u("page.certs.pleaseEnterPrivateKey"));return}w.keyText=a.value.certConfig.keyData}else{if(f.value.length===0){(x=window.$message)==null||x.error(u("page.certs.pleaseUploadPrivateKey"));return}w.keyFile=f.value[0].file}s.value=!0;const{data:_,error:$}=await PO(w,"/servers/certs/uploadPopup");$||((M=window.$message)==null||M.success(u("common.msgSync")),n("refreshPage",_)),t.value=!1,s.value=!1},S=()=>{l.value=!1,c.value=[],f.value=[],a.value=o()};return je(()=>t.value,w=>{w||S()}),(w,_)=>{const $=_e,A=Ne,R=ve,k=ft,x=Te,T=wp,M=AO,N=_p,I=un,q=et,z=Xt,H=Ht,F=Re,V=nt,j=re,se=ze,G=Pt;return L(),W(G,{show:t.value,"onUpdate:show":_[11]||(_[11]=K=>t.value=K)},{default:p(()=>[d(se,{style:{width:"460px"},title:C(u)("page.certs.uploadCertificate"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:_[0]||(_[0]=()=>t.value=!1)},[d($,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(V,{show:s.value},{default:p(()=>[d(F,{style:{"max-height":"280px","overflow-y":"auto"},size:"small",class:"mb-2 px-2"},{default:p(()=>[d(R,{label:C(u)("page.certs.columns.certificateDescription")},{feedback:p(()=>[U("span",null,Q(C(u)("page.certs.certificatePurpose")),1)]),default:p(()=>[d(A,{value:a.value.certConfig.name,"onUpdate:value":_[1]||(_[1]=K=>a.value.certConfig.name=K),disabled:s.value},null,8,["value","disabled"])]),_:1},8,["label"]),d(R,{label:C(u)("page.certs.certificateType")},{default:p(()=>[d(k,{value:a.value.certConfig.isCA?"1":"0",options:h.value,"default-value":"0",class:"max-w-[120px]",onChange:g},null,8,["value","options"])]),_:1},8,["label"]),l.value?(L(),te(Ce,{key:1},[d(R,{label:C(u)("page.webSet.httpsConfig.chooseCertFile")},{feedback:p(()=>[U("div",null,[U("span",{class:"cursor-pointer text-green",onClick:_[5]||(_[5]=()=>l.value=!l.value)}," ["+Q(C(u)("page.certs.uploadFile"))+" ] ",1),X(" ."+Q(C(u)("page.certs.fileContainsCertInfo")),1)])]),default:p(()=>[d(A,{value:a.value.certConfig.certData,"onUpdate:value":_[4]||(_[4]=K=>a.value.certConfig.certData=K),type:"textarea",placeholder:"-----BEGIN CERTIFICATE-----"},null,8,["value"])]),_:1},8,["label"]),a.value.certConfig.isCA?Xe("",!0):(L(),W(R,{key:0,label:C(u)("page.webSet.httpsConfig.chooseKeyFile")},{feedback:p(()=>[U("div",null,[U("span",{class:"cursor-pointer text-green",onClick:_[7]||(_[7]=()=>l.value=!l.value)}," ["+Q(C(u)("page.certs.uploadFile"))+"] ",1),X(" ."+Q(C(u)("page.certs.fileContainsPrivateKeyInfo")),1)])]),default:p(()=>[d(A,{value:a.value.certConfig.keyData,"onUpdate:value":_[6]||(_[6]=K=>a.value.certConfig.keyData=K),type:"textarea",placeholder:"-----BEGIN RSA PRIVATE KEY-----"},null,8,["value"])]),_:1},8,["label"]))],64)):(L(),te(Ce,{key:0},[d(R,{label:C(u)("page.webSet.httpsConfig.chooseCertFile")},{feedback:p(()=>[U("div",null,[U("span",{class:"cursor-pointer text-green",onClick:_[2]||(_[2]=()=>l.value=!l.value)}," ["+Q(C(u)("page.certs.inputContent"))+"] ",1),X(" ."+Q(C(u)("page.certs.fileContainsCertInfo")),1)])]),default:p(()=>[d(N,{ref:"certUploader",abstract:"",accept:".crt,.pem,.cer","default-upload":!1,"file-list":c.value,max:1,onChange:v},{default:p(()=>[d(T,{abstract:""},{default:p(({handleClick:K})=>[Zt(d(x,{onClick:K},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseCert")),1)]),_:2},1032,["onClick"]),[[zt,c.value.length===0]])]),_:1}),d(M)]),_:1},8,["file-list"])]),_:1},8,["label"]),a.value.certConfig.isCA?Xe("",!0):(L(),W(R,{key:0,label:C(u)("page.webSet.httpsConfig.chooseKeyFile")},{feedback:p(()=>[U("div",null,[U("span",{class:"cursor-pointer text-green",onClick:_[3]||(_[3]=()=>l.value=!l.value)}," ["+Q(C(u)("page.certs.inputContent"))+"] ",1),X(" ."+Q(C(u)("page.certs.fileContainsPrivateKeyInfo")),1)])]),default:p(()=>[d(N,{ref:"keyUploader",abstract:"",accept:".key,.pem","default-upload":!1,"file-list":f.value,max:1,onChange:O},{default:p(()=>[d(T,{abstract:""},{default:p(({handleClick:K})=>[Zt(d(x,{onClick:K},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseKey")),1)]),_:2},1032,["onClick"]),[[zt,f.value.length===0]])]),_:1}),d(M)]),_:1},8,["file-list"])]),_:1},8,["label"]))],64)),d(H,{"arrow-placement":"right",class:"mb-2"},{default:p(()=>[d(z,{name:"more"},{header:p(()=>[d(I,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d($,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(R,{label:C(u)("page.certs.detailedDescription")},{default:p(()=>[d(A,{value:a.value.certConfig.description,"onUpdate:value":_[8]||(_[8]=K=>a.value.certConfig.description=K),type:"textarea"},null,8,["value"])]),_:1},8,["label"]),d(q,{checked:a.value.certConfig.isOn,"onUpdate:checked":_[9]||(_[9]=K=>a.value.certConfig.isOn=K),label:C(u)("page.certs.enableCurrentCertificate")},null,8,["checked","label"])]),_:1})]),_:1})]),_:1})]),_:1},8,["show"]),d(j,null,{default:p(()=>[d(x,{type:"info",disabled:s.value,onClick:y},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(x,{onClick:_[10]||(_[10]=()=>t.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),ST=ce(yT,[["__scopeId","data-v-fa57cfed"]]),_T={key:0},wT=ae({name:"UploadManyDrawer",__name:"upload-many-drawer",props:{visible:{default:!1},visibleModifiers:{}},emits:Be(["updateCerts"],["update:visible"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=e,s=B(!1),o=B([]),a=()=>({certConfig:{id:0,isOn:!1,name:"",description:"",certData:"",keyData:"",serverName:"",isCA:!1,isACME:!1,timeBeginAt:0,timeEndAt:0,dnsNames:[],commonNames:[],ocsp:void 0,ocspExpiresAt:0,ocspError:""}}),l=B(a());function c({fileList:v}){o.value=v}const f=v=>Mo({url:"/servers/certs/uploadBatchPopup",method:"post",data:v}),h=async()=>{var S;if(o.value.length===0){(S=window.$message)==null||S.error("请上传证书！");return}s.value=!0;const v=await Kt(),O=new FormData;o.value.forEach(w=>{w.file&&O.append("certFiles",w.file)}),O.append("csrfToken",v);const y=await f(O);t.value=!1,s.value=!1,y.error||n("updateCerts",y.data)},g=()=>{o.value=[],l.value=a()};return je(()=>t.value,v=>{v||g()}),(v,O)=>{const y=_e,S=Te,w=wp,_=_p,$=ve,A=Re,R=nt,k=re,x=ze,T=Pt;return L(),W(T,{show:t.value,"onUpdate:show":O[2]||(O[2]=M=>t.value=M)},{default:p(()=>[d(x,{style:{width:"460px"},title:C(u)("page.certs.uploadCertificate"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:O[0]||(O[0]=()=>t.value=!1)},[d(y,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(R,{show:s.value},{default:p(()=>[d(A,{style:{"max-height":"280px","overflow-y":"auto"},size:"small",class:"mb-2 px-2"},{default:p(()=>[d($,{label:C(u)("page.webSet.httpsConfig.chooseCertFile")},{feedback:p(()=>[o.value.length>0?(L(),te("span",_T,"已经选择"+Q(o.value.length)+" 个文件。",1)):Xe("",!0)]),default:p(()=>[d(_,{ref:"certUploader",multiple:"",abstract:"",accept:".crt,.pem,.cer,.key","default-upload":!1,"file-list":o.value,onChange:c},{default:p(()=>[d(w,{abstract:""},{default:p(({handleClick:M})=>[d(S,{onClick:M},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.chooseCert")),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["file-list"])]),_:1},8,["label"])]),_:1})]),_:1},8,["show"]),d(k,null,{default:p(()=>[d(S,{type:"info",disabled:s.value,onClick:h},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(S,{onClick:O[1]||(O[1]=()=>t.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),kT=ce(wT,[["__scopeId","data-v-a2b33707"]]),xT=["onClick"],PT=ae({name:"HttpsSslAdd",__name:"https-ssl-add",props:{value:{default:()=>({id:0,isOn:!1,certRefs:[],certs:[],clientAuthType:0,clientCARefs:[],clientCACerts:[],minVersion:"TLS 1.1",cipherSuitesIsOn:!1,cipherSuites:[],hsts:{isOn:!1,maxAge:0,includeSubDomains:!1,preload:!1,domains:[],days:0},http2Enabled:!1,http3Enabled:!1,ocspIsOn:!1})},valueModifiers:{}},emits:["update:value"],setup(i){const e=wt(),t=J(()=>e.isMobile);J(()=>t.value?"top":"left");const n=B(!1),s=B(!1),o=B(!1),a=Ze(i,"value");function l(v){const O=new Date(v*1e3),y=O.getFullYear(),S=(O.getMonth()+1).toString().padStart(2,"0"),w=O.getDate().toString().padStart(2,"0");return`${y}-${S}-${w}`}const c=v=>{const O=a.value.certs[v].id,y=a.value.certRefs.findIndex(S=>S.certId===O);a.value.certs.splice(v,1),a.value.certRefs.splice(y,1)},f=(v,O)=>{a.value.certs=[...a.value.certs,...v],a.value.certRefs=[...a.value.certRefs,...O]},h=v=>{a.value.certs=[...a.value.certs,...v.certs],a.value.certRefs=[...a.value.certRefs,...v.certRefs]},g=v=>{a.value.certs.push({...v.cert}),a.value.certRefs.push({...v.certsRef})};return J(()=>[{label:"TLS 1.0",value:"TLS 1.0"},{label:"TLS 1.1",value:"TLS 1.1"},{label:"TLS 1.2",value:"TLS 1.2"},{label:"TLS 1.3",value:"TLS 1.3"}]),(v,O)=>{const y=_e,S=re,w=Te;return L(),te(Ce,null,[d(S,{vertical:""},{default:p(()=>[a.value.certs.length!==0?(L(),W(S,{key:0,size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(a.value.certs,(_,$)=>(L(),te("div",{key:$,class:"flex items-center justify-center gap-2 border rounded-xl px-3 py-1 text-xs"},[U("div",null,Q(_.name)+" / "+Q(_.dnsNames)+" / "+Q(v.$t("lbsettings.validUntil"))+" "+Q(l(_.timeEndAt)),1),U("div",{class:"cursor-pointer",onClick:A=>c($)},[d(y,{"local-icon":"mingcute--close-fill",class:"text-[18xp]"})],8,xT)]))),128))]),_:1})):Xe("",!0),a.value.certs.length===0?(L(),W(S,{key:1,size:"small"},{default:p(()=>[d(w,{size:"small",dashed:"",onClick:O[0]||(O[0]=()=>n.value=!0)},{default:p(()=>[X(Q(v.$t("lbsettings.selectCertificate")),1)]),_:1}),d(w,{size:"small",dashed:"",onClick:O[1]||(O[1]=()=>s.value=!0)},{default:p(()=>[X(Q(v.$t("lbsettings.uploadCertificate")),1)]),_:1}),d(w,{size:"small",dashed:"",onClick:O[2]||(O[2]=()=>o.value=!0)},{default:p(()=>[X(Q(v.$t("lbsettings.batchUpload")),1)]),_:1})]),_:1})):Xe("",!0)]),_:1}),d(CT,{visible:n.value,"onUpdate:visible":O[3]||(O[3]=_=>n.value=_),onUpdateCerts:f},null,8,["visible"]),d(ST,{visible:s.value,"onUpdate:visible":O[4]||(O[4]=_=>s.value=_),onRefreshPage:g},null,8,["visible"]),d(kT,{visible:o.value,"onUpdate:visible":O[5]||(O[5]=_=>o.value=_),onUpdateCerts:h},null,8,["visible"])],64)}}}),$T=ce(PT,[["__scopeId","data-v-f0efa890"]]),TT={class:"text-[10px]"},RT={class:"text-[10px]"},IT={class:"mt-2"},QT={class:""},AT={class:"text-[10px]"},NT={class:"text-[10px]"},MT={class:"text-[10px]"},LT={class:"text-[10px]"},UT=ae({name:"EditOrginDrawer",__name:"edit-origin-drawer",props:{visible:{default:!1},visibleModifiers:{},editType:{},editTypeModifiers:{}},emits:Be(["getOrigin"],["update:visible","update:editType"]),setup(i,{emit:e}){const t=e,n=qe("originData",{backupOrigins:[],primaryOrigins:[],reverseProxyRef:{isPrior:!1,isOn:!1,reverseProxyId:0}}),s=Ze(i,"visible"),o=Ze(i,"editType"),a=B(!1),l=J(()=>{var $,A;return{primary:(($=o.value)==null?void 0:$.type)==="add"?"添加主要源":"编辑主要源",backup:((A=o.value)==null?void 0:A.type)==="add"?"添加备用源":"编辑备用源"}}),c=()=>(a.value=!1,{reverseProxyId:0,originType:"primary",protocol:"http",addr:"",host:"",domainsJSON:[],weight:10,name:"",description:"",isOn:1,followPort:0}),f=fe(c()),h=B({id:0,isOn:!1,certRefs:[],certs:[],clientAuthType:0,clientCARefs:[],clientCACerts:[],minVersion:"TLS 1.1",cipherSuitesIsOn:!1,cipherSuites:[],hsts:{isOn:!1,maxAge:0,includeSubDomains:!1,preload:!1,domains:[],days:0},http2Enabled:!1,http3Enabled:!1,ocspIsOn:!1}),g=B(!1),v=$=>{f.followPort=$?0:1},O=$=>{f.isOn=$?0:1},y=[{label:"HTTP",value:"http"},{label:"HTTPS",value:"https"}],S=()=>{g.value=!g.value},w=async()=>{var M,N,I;if(f.addr.trim()==="")return(M=window.$message)==null?void 0:M.warning("请输入源站地址");S();const $={add:"/servers/server/settings/origins/addPopup",edit:"/servers/server/settings/origins/updatePopup"};f.originType=((N=o.value)==null?void 0:N.method)||"";const A={},R=JSON.stringify(f.domainsJSON),k=JSON.stringify((I=h.value.certs[0])!=null&&I.id?[h.value.certs[0].id]:[]);for(const q in f)f[q]!==0&&(A[q]=f[q]);A.domainsJSON=R,A.certIdsJSON=k;const{data:x,error:T}=await Ee({reverseProxyId:n.reverseProxyRef.reverseProxyId,...A},$[o.value.type||"add"]);T||t("getOrigin"),S(),s.value=!1},_=()=>{var $,A,R,k,x,T,M,N,I,q,z,H,F;f.domainsJSON=(($=o.value)==null?void 0:$.data.origin.domains)||[],f.followPort=(A=o.value)!=null&&A.data.origin.followPort?1:0,f.originId=(R=o.value)==null?void 0:R.data.origin.id,f.isOn=(k=o.value)!=null&&k.data.origin.isOn?1:0,f.weight=(x=o.value)==null?void 0:x.data.origin.weight,f.protocol=(T=o.value)==null?void 0:T.data.setting.addr.protocol,f.addr=((M=o.value)==null?void 0:M.data.setting.addr.host)+":"+((N=o.value)==null?void 0:N.data.setting.addr.portRange),f.host=(I=o.value)==null?void 0:I.data.setting.requestHost,f.name=(q=o.value)==null?void 0:q.data.setting.name,f.description=(z=o.value)==null?void 0:z.data.setting.description,(F=(H=o.value)==null?void 0:H.data.setting)!=null&&F.cert&&h.value.certs.push(o.value.data.setting.cert)};return je(()=>s.value,$=>{var R;const A=o.value.type||"add";if($&&A==="edit"){console.log((R=o.value)==null?void 0:R.data),_();return}Object.assign(f,c()),h.value.certs=[]}),($,A)=>{const R=_e,k=ft,x=ve,T=Ai,M=Ne,N=tn,I=Wt,q=en,z=Ut,H=Re,F=nt,V=Te,j=re,se=ze,G=Pt;return L(),W(G,{show:s.value,"onUpdate:show":A[13]||(A[13]=K=>s.value=K)},{default:p(()=>[d(se,{style:{width:"600px"},title:l.value[o.value.method],bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:A[0]||(A[0]=()=>s.value=!1)},[d(R,{"local-icon":"material-symbols-light--close-rounded",class:"text-2xl cursor-pointer transform transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(F,{show:g.value},{default:p(()=>[d(H,{ref:"formRef",class:"px-1 overflow-y-auto max-h-[220px]"},{default:p(()=>[d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.sourceProtocol")},{default:p(()=>[d(k,{value:f.protocol,"onUpdate:value":A[1]||(A[1]=K=>f.protocol=K),options:y,style:{"max-width":"120px"}},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.sourceAddress")},{feedback:p(()=>[U("span",TT,Q($.$t("page.webSet.httpsConfig.sourceServerAddress")),1)]),default:p(()=>[d(N,null,{default:p(()=>[d(T,null,{default:p(()=>[X(Q(f.protocol)+"://",1)]),_:1}),d(M,{value:f.addr,"onUpdate:value":A[2]||(A[2]=K=>f.addr=K),style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.originHostName")},{feedback:p(()=>[U("span",RT,Q($.$t("page.webSet.httpsConfig.originHostNameDescription")),1)]),default:p(()=>[d(M,{value:f.host,"onUpdate:value":A[3]||(A[3]=K=>f.host=K),style:{width:"100%"}},null,8,["value"])]),_:1},8,["label"]),U("div",IT,[U("div",{class:"flex items-center cursor-pointer text-[#0052d9] mb-4",onClick:A[4]||(A[4]=K=>a.value=!a.value)},[U("span",QT,Q($.$t("page.webSet.httpConfig.moreSetting")),1),d(R,{"local-icon":"meteor-icons--angle-right",class:Ln(["transition-transform duration-200",a.value?"rotate-90":""])},null,8,["class"])]),a.value?(L(),te(Ce,{key:0},[f.protocol==="https"?(L(),W(x,{key:0,label:"HTTPS 证书",feedback:"可以选择连接源站使用的证书；除非源站有特殊需求，否则不需要添加。"},{default:p(()=>[d($T,{value:h.value,"onUpdate:value":A[5]||(A[5]=K=>h.value=K)},null,8,["value"])]),_:1})):Xe("",!0),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.exclusiveDomainName"),class:"mb-2"},{feedback:p(()=>[U("span",AT,Q($.$t("page.webSet.httpsConfig.exclusiveDomainNameDescription")),1)]),default:p(()=>[d(I,{value:f.domainsJSON,"onUpdate:value":A[6]||(A[6]=K=>f.domainsJSON=K)},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.portFollow"),class:"mb-2"},{feedback:p(()=>[U("span",NT,Q($.$t("page.webSet.httpsConfig.portFollowDescription")),1)]),default:p(()=>[d(q,{value:f.followPort===1,"onUpdate:value":A[7]||(A[7]=K=>v(f.followPort===1))},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.weight"),class:"mb-2"},{feedback:p(()=>[U("span",MT,Q($.$t("page.webSet.httpsConfig.weightDescription")),1)]),default:p(()=>[d(z,{value:f.weight,"onUpdate:value":A[8]||(A[8]=K=>f.weight=K),style:{maxWidth:"120px"},placeholder:"10","show-button":!1},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.name"),class:"mb-2"},{feedback:p(()=>[U("span",LT,Q($.$t("page.webSet.httpsConfig.nameFeedback")),1)]),default:p(()=>[d(M,{value:f.name,"onUpdate:value":A[9]||(A[9]=K=>f.name=K)},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.remarks")},{default:p(()=>[d(M,{value:f.description,"onUpdate:value":A[10]||(A[10]=K=>f.description=K),type:"textarea"},null,8,["value"])]),_:1},8,["label"]),d(x,{path:"name",label:$.$t("page.webSet.httpsConfig.enableSourceStation")},{default:p(()=>[d(q,{value:f.isOn===1,onUpdateValue:A[11]||(A[11]=K=>O(f.isOn===1))},null,8,["value"])]),_:1},8,["label"])],64)):Xe("",!0)])]),_:1},512)]),_:1},8,["show"]),d(j,{class:"mt-3"},{default:p(()=>[d(V,{type:"info",onClick:w,disabled:g.value},{default:p(()=>[X(Q($.$t("common.save")),1)]),_:1},8,["disabled"]),d(V,{onClick:A[12]||(A[12]=()=>s.value=!1)},{default:p(()=>[X(Q($.$t("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),DT={class:"text-xs"},qT={key:0},ET={class:"text-xs"},BT={key:1},ZT={class:"text-xs"},zT=ae({name:"ChangeSchedulingDrawer",__name:"change-scheduling-drawer",props:Be({schedulingTypes:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["updateScheduling"],["update:visible"]),setup(i,{emit:e}){const t=e,n=i,s=qe("serverId"),o=Ze(i,"visible"),a=B(!1),l=qe("originData",{backupOrigins:[],primaryOrigins:[],reverseProxyRef:{isPrior:!1,isOn:!1,reverseProxyId:0}}),c=()=>({code:"random",options:{param:"Origin",type:"cookie",key:"${remoteAddr}"}}),f=fe(c()),h=()=>{a.value=!a.value},g=async()=>{h();const w={type:"server",serverId:s==null?void 0:s.value,reverseProxyId:l.reverseProxyRef.reverseProxyId},$=`/servers/server/settings/reverseProxy/updateSchedulingPopup?${new URLSearchParams(w).toString()}`,{data:A,error:R}=await ht($,w);if(!R){f.code=A.scheduling.code;const k=A.scheduling.options,x=c();k?(f.options.key=(k==null?void 0:k.key)||x.options.key,f.options.param=(k==null?void 0:k.param)||x.options.param,f.options.type=(k==null?void 0:k.type)||x.options.type):f.options=x.options}h()},v=J(()=>[{label:"Cookie",value:"cookie"},{label:"HTTP Header",value:"header"},{label:"Argument",value:"argument"}]),O=J(()=>n.schedulingTypes.find(w=>w.code===f.code)),y=w=>{const _={dataType:"server",serverId:(s==null?void 0:s.value)||0,reverseProxyId:l.reverseProxyRef.reverseProxyId,type:w};switch(w){case"hash":return _.hashKey=f.options.key,_;case"sticky":return _.stickyType=f.options.type,_.stickyParam=f.options.param,_;default:return _}},S=async()=>{h();const w="/servers/server/settings/reverseProxy/updateSchedulingPopup",_=y(f.code),{data:$,error:A}=await Ee(_,w);A||(t("updateScheduling"),o.value=!1),h()};return je(()=>o.value,w=>{w&&g()}),(w,_)=>{const $=_e,A=ft,R=ve,k=Ne,x=Re,T=nt,M=Te,N=re,I=ze,q=Pt;return L(),W(q,{show:o.value,"onUpdate:show":_[6]||(_[6]=z=>o.value=z)},{default:p(()=>[d(I,{style:{width:"600px"},title:w.$t("page.webSet.httpsConfig.modifySchedulingAlgorithm"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:_[0]||(_[0]=()=>o.value=!1)},[d($,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(N,null,{default:p(()=>[d(M,{type:"info",disabled:a.value,onClick:S},{default:p(()=>[X(Q(w.$t("common.save")),1)]),_:1},8,["disabled"]),d(M,{onClick:_[5]||(_[5]=z=>o.value=!1)},{default:p(()=>[X(Q(w.$t("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(T,{show:a.value},{default:p(()=>[d(x,null,{default:p(()=>[d(R,{label:w.$t("page.webSet.httpsConfig.selectSchedulingAlgorithm")},{feedback:p(()=>[U("span",DT,Q(O.value.description),1)]),default:p(()=>[d(A,{value:f.code,"onUpdate:value":_[1]||(_[1]=z=>f.code=z),options:n.schedulingTypes,"label-field":"name","value-field":"code"},null,8,["value","options"])]),_:1},8,["label"]),f.code==="hash"?(L(),te("div",qT,[d(R,{label:"key"},{feedback:p(()=>[U("span",ET,Q(w.$t("page.webSet.httpsConfig.hashStringWithVariables")),1)]),default:p(()=>[d(k,{value:f.options.key,"onUpdate:value":_[2]||(_[2]=z=>f.options.key=z)},null,8,["value"])]),_:1})])):Xe("",!0),f.code==="sticky"?(L(),te("div",BT,[d(R,{label:w.$t("page.webSet.httpsConfig.parameterType")},{default:p(()=>[d(A,{value:f.options.type,"onUpdate:value":_[3]||(_[3]=z=>f.options.type=z),options:v.value},null,8,["value","options"])]),_:1},8,["label"]),d(R,{label:w.$t("page.webSet.httpsConfig.parameterName")},{feedback:p(()=>[U("span",ZT,Q(w.$t("page.webSet.httpsConfig.parameterNameConstraint")),1)]),default:p(()=>[d(k,{value:f.options.param,"onUpdate:value":_[4]||(_[4]=z=>f.options.param=z)},null,8,["value"])]),_:1},8,["label"])])):Xe("",!0)]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),HT={class:"text-xs"},XT={class:"text-xs"},jT={class:"text-xs"},VT={class:"text-xs"},FT={class:"text-xs"};function sv(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const WT=ae({name:"ReverseProxy",__name:"reverse-proxy",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),s=()=>({reverseProxyConfig:{id:0,isOn:!1,primaryOrigins:[{id:0,isOn:!1,requestURI:"",requestHost:""}],stripPrefix:"",requestHostType:0,requestURI:"",requestHostExcludingPort:!1,retry50X:!1,retry40X:!1,addHeaders:[],autoFlush:!1,proxyProtocol:{isOn:!1,version:1},followRedirects:!1,requestHost:""},reverseProxyRef:{isPrior:!1,isOn:!1,reverseProxyId:0}}),o=fe(s()),a=Ki();qe("baseConfig",a);const l=qe("serverId"),c=B(!1),f=B(!1),h=B(!1),g=fe({code:"random",description:"",instance:{Candidates:void 0},name:"",networks:[]}),O=fe({type:"add",method:"primary",data:{origin:{},setting:{}}}),y=fe({backupOrigins:[],primaryOrigins:[],reverseProxyRef:{isPrior:!1,isOn:!1,reverseProxyId:0},reverseProxyConfig:{}}),S=B("originList"),w=async(se,G)=>{h.value=!0;const K={type:"server",serverId:l==null?void 0:l.value,reverseProxyId:y.reverseProxyRef.reverseProxyId,originId:se,originType:G},Oe=`/servers/server/settings/origins/delete?${new URLSearchParams(K).toString()}`,{data:we,error:pe}=await Ee(K,Oe);pe||x()},_=async(se,G)=>{const K={type:"server",serverId:l==null?void 0:l.value,reverseProxyId:y.reverseProxyRef.reverseProxyId,originId:G,isOn:se},Oe=`/servers/server/settings/origins/updateIsOn?${new URLSearchParams(K).toString()}`;h.value=!0;const{data:we,error:pe}=await Ee(K,Oe);pe||x()},$=(se,G,K)=>{const Oe={backup:A,primary:R}[G];Oe&&(O.type="edit",O.method=G,O.data.origin=K,Oe(se),c.value=!0)},A=se=>{const G=y.reverseProxyConfig.backupOrigins.find(K=>K.id===se);O.data.setting=G},R=se=>{const G=y.reverseProxyConfig.primaryOrigins.find(K=>K.id===se);O.data.setting=G},k=se=>J(()=>[{key:"addr",title:u("page.webSet.httpsConfig.addr")},{key:"weight",title:u("page.webSet.httpsConfig.weight"),align:"center"},{key:"isOn",title:u("page.webSet.httpsConfig.isOn"),align:"center",render:G=>{const K=G.isOn?"text-green-400":"text-red-400",de=G.isOn?u("common.on"):u("common.off");return d("span",{class:K},[de])}},{key:"actions",title:u("page.webSite.table.operate"),align:"center",render:G=>{let K,de;const Oe=G.isOn?0:1;return d(re,{justify:"center",class:"text-xs",size:"small"},{default:()=>[d(Te,{onClick:()=>$(G.id,se,G),size:"tiny",quaternary:!0},sv(K=u("common.modify"))?K:{default:()=>[K]}),d(Te,{onClick:()=>_(Oe,G.id),size:"tiny",quaternary:!0},{default:()=>[G.isOn?u("page.webSite.table.stop"):u("page.webSite.table.open")]}),d(Te,{onClick:()=>w(G.id,se),size:"tiny",quaternary:!0},sv(de=u("common.delete"))?de:{default:()=>[de]})]})}}]),x=async()=>{h.value=!0;const se="/servers/server/settings/reverseProxy",G={serverId:l==null?void 0:l.value},{data:K,error:de}=await ht(se,G);de||Object.assign(y,K),h.value=!1},T=async()=>{h.value=!0;const se="/servers/server/settings/reverseProxy/scheduling",G={serverId:l==null?void 0:l.value},{data:K,error:de}=await ht(se,G);de||Object.assign(g,K.scheduling),h.value=!1},M=async()=>{h.value=!0;const se="/servers/server/settings/reverseProxy/setting",G={serverId:l==null?void 0:l.value},{data:K,error:de}=await ht(se,G);de||(K.reverseProxyConfig.proxyProtocol||(K.reverseProxyConfig.proxyProtocol=s().reverseProxyConfig.proxyProtocol),Object.assign(o,K)),h.value=!1},N=se=>{const K={scheduling:T,setting:M}[se];K&&K()},I=se=>{O.method=se,O.type="add",c.value=!0},q=J(()=>[{code:"random",description:u("page.webSet.httpsConfig.schedulingTypes.random.description"),instance:{Candidates:null},name:u("page.webSet.httpsConfig.schedulingTypes.random.name"),networks:["http","tcp","udp","unix"]},{code:"roundRobin",description:u("page.webSet.httpsConfig.schedulingTypes.roundRobin.description"),instance:{Candidates:null},name:u("page.webSet.httpsConfig.schedulingTypes.roundRobin.name"),networks:["http","tcp","udp","unix"]},{code:"hash",description:u("page.webSet.httpsConfig.schedulingTypes.hash.description"),instance:{Candidates:null},name:u("page.webSet.httpsConfig.schedulingTypes.hash.name"),networks:["http"]},{code:"sticky",description:u("page.webSet.httpsConfig.schedulingTypes.sticky.description"),instance:{Candidates:null},name:u("page.webSet.httpsConfig.schedulingTypes.sticky.name"),networks:["http"]}]),z=J(()=>q.value.find(se=>se.code===g.code));je(()=>S.value,se=>{se!=="originList"&&N(se)});const H=J(()=>[{value:0,label:u("page.webSet.httpsConfig.settings.follow_cdn_domain"),description:u("page.webSet.httpsConfig.settings.follow_cdn_domain_d")},{value:1,label:u("page.webSet.httpsConfig.settings.follow_origin"),description:u("page.webSet.httpsConfig.settings.follow_origin_d")},{value:2,label:u("page.webSet.httpsConfig.settings.custom"),description:u("page.webSet.httpsConfig.settings.custom_d")}]),F=J(()=>H.value.find(se=>se.value===o.reverseProxyConfig.requestHostType)),V=[{value:"X-Real-IP",label:"X-Real-IP"},{value:"X-Forwarded-For",label:"X-Forwarded-For"},{value:"X-Forwarded-By",label:"X-Forwarded-By"},{value:"X-Forwarded-Host",label:"X-Forwarded-Host"},{value:"X-Forwarded-Proto",label:"X-Forwarded-Proto"}],j=async()=>{var Oe,we;h.value=!0;const se="/servers/server/settings/reverseProxy/setting",G={serverId:l==null?void 0:l.value,reverseProxyRefJSON:JSON.stringify(o.reverseProxyRef),reverseProxyJSON:JSON.stringify(o.reverseProxyConfig)},{data:K,error:de}=await Ee(G,se);de?((we=window.$message)==null||we.error("保存失败，服务器开小差了，正在同步信息！"),N("setting")):(Oe=window.$message)==null||Oe.success("保存成功！"),h.value=!1};return Nn("originData",y),vt(()=>{x()}),(se,G)=>{const K=Te,de=ws,Oe=ze,we=_s,pe=Ls,Se=ve,xe=Re,Me=en,Pe=NO,st=Ne,Ye=kp,it=et,Dt=Jc,sn=ft,Un=Ss,lt=nt;return L(),W(Oe,{size:"small",title:C(u)("page.webSet.httpsConfig.originServer")},{default:p(()=>[d(lt,{show:h.value},{default:p(()=>[d(Un,{type:"segment",animated:"",value:S.value,"onUpdate:value":G[16]||(G[16]=He=>S.value=He)},{default:p(()=>[d(we,{name:"originList",tab:C(u)("page.webSet.httpsConfig.primaryOriginServer"),"display-directive":"show:lazy"},{default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[d(Oe,{size:"small",bordered:!1,title:C(u)("page.webSet.httpsConfig.addPrimaryOrigin")},{default:p(()=>[d(K,{onClick:G[0]||(G[0]=()=>I("primary")),type:"tertiary",class:"mb-2"},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.addPrimaryOrigin")),1)]),_:1}),d(de,{"scroll-x":600,"row-key":He=>He.id,columns:C(k("primary")),data:y.primaryOrigins,class:"sm:h-full"},null,8,["row-key","columns","data"])]),_:1},8,["title"]),d(Oe,{size:"small",bordered:!1,title:C(u)("page.webSet.httpsConfig.backupOriginServer")},{default:p(()=>[d(K,{onClick:G[1]||(G[1]=()=>I("backup")),type:"tertiary",class:"mb-2"},{default:p(()=>[X(Q(C(u)("page.webSet.httpsConfig.addBackupOrigin")),1)]),_:1}),d(de,{"scroll-x":600,"row-key":He=>He.id,columns:C(k("backup")),data:y.backupOrigins,class:"sm:h-full"},null,8,["row-key","columns","data"])]),_:1},8,["title"])]),_:1})]),_:1},8,["tab"]),d(we,{name:"scheduling",tab:C(u)("page.webSet.httpsConfig.schedulingAlgorithm"),"display-directive":"show:lazy"},{default:p(()=>[d(xe,{class:"min-h-[120px]"},{default:p(()=>[d(Se,{label:C(u)("page.webSet.httpsConfig.currentAlgorithm"),"label-placement":"left"},{feedback:p(()=>[U("span",null,Q(z.value.description),1)]),default:p(()=>[d(C(re),null,{default:p(()=>[d(pe,{bordered:!1},{default:p(()=>[X(Q(z.value.name),1)]),_:1}),d(K,{quaternary:"",onClick:G[2]||(G[2]=()=>f.value=!0)},{default:p(()=>[X(Q(C(u)("common.modify")),1)]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})]),_:1},8,["tab"]),d(we,{name:"setting",tab:C(u)("page.webSet.httpsConfig.moreSettings"),"display-directive":"show:lazy"},{default:p(()=>[d(Se,{label:C(u)("page.webSet.httpsConfig.settings.enableSourceStation"),"label-placement":"left"},{default:p(()=>[d(Me,{value:o.reverseProxyRef.isOn,"onUpdate:value":[G[3]||(G[3]=He=>o.reverseProxyRef.isOn=He),j]},null,8,["value"])]),_:1},8,["label"]),o.reverseProxyRef.isOn?(L(),W(xe,{key:0,"label-width":200,"label-align":"left"},{default:p(()=>[d(Se,{label:C(u)("page.webSet.httpsConfig.settings.originHostName"),"label-placement":n.value},{feedback:p(()=>{var He;return[U("span",HT,Q((He=F.value)==null?void 0:He.description),1)]}),default:p(()=>[d(Ye,{value:o.reverseProxyConfig.requestHostType,"onUpdate:value":G[5]||(G[5]=He=>o.reverseProxyConfig.requestHostType=He),name:"radiogroup"},{default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[(L(!0),te(Ce,null,Ot(H.value,He=>(L(),W(Pe,{key:He.value,value:He.value},{default:p(()=>[X(Q(He.label),1)]),_:2},1032,["value"]))),128)),o.reverseProxyConfig.requestHostType===2?(L(),W(st,{key:0,value:o.reverseProxyConfig.requestHost,"onUpdate:value":G[4]||(G[4]=He=>o.reverseProxyConfig.requestHost=He)},null,8,["value"])):Xe("",!0)]),_:1})]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.removeOriginHostPort"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.requestHostExcludingPort,"onUpdate:checked":G[6]||(G[6]=He=>o.reverseProxyConfig.requestHostExcludingPort=He),label:C(u)("page.webSet.httpsConfig.settings.removeOriginHostPortDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.originFollow"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.followRedirects,"onUpdate:checked":G[7]||(G[7]=He=>o.reverseProxyConfig.followRedirects=He),label:C(u)("page.webSet.httpsConfig.settings.originFollowDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.autoAddHeaders"),"label-placement":n.value,class:"mb-4"},{feedback:p(()=>[U("span",XT,Q(C(u)("page.webSet.httpsConfig.settings.autoAddHeadersDescription")),1)]),default:p(()=>[d(Dt,{value:o.reverseProxyConfig.addHeaders,"onUpdate:value":G[8]||(G[8]=He=>o.reverseProxyConfig.addHeaders=He)},{default:p(()=>[d(C(re),null,{default:p(()=>[(L(),te(Ce,null,Ot(V,He=>d(it,{key:He.value,value:He.value,label:He.label},null,8,["value","label"])),64))]),_:1})]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.requestURI"),"label-placement":n.value,class:"mb-4"},{feedback:p(()=>[U("span",jT,Q(C(u)("page.webSet.httpsConfig.settings.requestURIDescription")),1)]),default:p(()=>[d(st,{value:o.reverseProxyConfig.requestURI,"onUpdate:value":G[9]||(G[9]=He=>o.reverseProxyConfig.requestURI=He),style:{"max-width":"280px"}},null,8,["value"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.stripPrefix"),"label-placement":n.value,class:"mb-4"},{feedback:p(()=>[U("span",VT,Q(C(u)("page.webSet.httpsConfig.settings.stripPrefixDescription")),1)]),default:p(()=>[d(st,{value:o.reverseProxyConfig.stripPrefix,"onUpdate:value":G[10]||(G[10]=He=>o.reverseProxyConfig.stripPrefix=He),style:{"max-width":"280px"}},null,8,["value"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.autoFlush"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.autoFlush,"onUpdate:checked":G[11]||(G[11]=He=>o.reverseProxyConfig.autoFlush=He),label:C(u)("page.webSet.httpsConfig.settings.autoFlushDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.autoRetry50X"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.retry50X,"onUpdate:checked":G[12]||(G[12]=He=>o.reverseProxyConfig.retry50X=He),label:C(u)("page.webSet.httpsConfig.settings.autoRetry50XDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.autoRetry40X"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.retry40X,"onUpdate:checked":G[13]||(G[13]=He=>o.reverseProxyConfig.retry40X=He),label:C(u)("page.webSet.httpsConfig.settings.autoRetry40XDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(Se,{label:C(u)("page.webSet.httpsConfig.settings.enableProxyProtocol"),"label-placement":n.value},{default:p(()=>[d(it,{checked:o.reverseProxyConfig.proxyProtocol.isOn,"onUpdate:checked":G[14]||(G[14]=He=>o.reverseProxyConfig.proxyProtocol.isOn=He),label:C(u)("page.webSet.httpsConfig.settings.enableProxyProtocolDescription")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),Zt(d(Se,{label:C(u)("page.webSet.httpsConfig.settings.proxyProtocolVersion"),"label-placement":n.value},{feedback:p(()=>[U("span",FT,[X(Q(C(u)("page.webSet.httpsConfig.settings.send")),1),G[20]||(G[20]=U("span",{class:"border rounded-md px-0.5 mx-1"},"PROXY TCP4 192.168.1.1 192.168.1.10 32567 443",-1)),X(Q(C(u)("page.webSet.httpsConfig.settings.header")),1)])]),default:p(()=>[d(sn,{value:o.reverseProxyConfig.proxyProtocol.version,"onUpdate:value":G[15]||(G[15]=He=>o.reverseProxyConfig.proxyProtocol.version=He),"label-field":"value",options:[{value:1},{value:2}],style:{"max-width":"80px"}},null,8,["value"])]),_:1},8,["label","label-placement"]),[[zt,o.reverseProxyConfig.proxyProtocol.isOn]]),d(K,{onClick:j,type:"info"},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})):Xe("",!0)]),_:1},8,["tab"])]),_:1},8,["value"])]),_:1},8,["show"]),d(UT,{visible:c.value,"onUpdate:visible":G[17]||(G[17]=He=>c.value=He),"edit-type":O,"onUpdate:editType":G[18]||(G[18]=He=>O=He),onGetOrigin:x},null,8,["visible","edit-type"]),d(zT,{visible:f.value,"onUpdate:visible":G[19]||(G[19]=He=>f.value=He),"scheduling-types":q.value,onUpdateScheduling:T},null,8,["visible","scheduling-types"])]),_:1},8,["title"])}}}),YT=ae({__name:"base-config",setup(i){const e=qe("serverId"),t=qe("leftMenuItems",B([])),n=B(),s=J(()=>({serverId:e==null?void 0:e.value})),o=fe(Ki()),a=B(!1),l=async(h,g)=>{const{data:v,error:O}=await ht(h,s.value);O?console.error(`Fetch failed: ${h}`,O):g(v)},c=async(h,g)=>{var $,A,R,k,x,T,M;if(($=n.value)==null||$.openRefresh(),h.length===0){o.serverOther={name:"",cname:"",isOn:!1,userPlan:{id:0},groups:[]},(A=n.value)==null||A.closeRefresh(),(R=window.$message)==null||R.error(u("page.webSet.domainNull"));return}const y={keyword:h[0].name||h[0].subNames[0]},_=(await Z$(y)).servers.find(N=>N.id===o.server.id);_?(o.serverOther=_,Sc.emit("update-content",_),g&&((k=window.$message)==null||k.success(u("common.msgSync"))),(x=n.value)==null||x.closeRefresh()):((T=window.$message)==null||T.error("error"),o.serverOther={name:"",cname:"",isOn:!1,userPlan:{id:0},groups:[]},(M=n.value)==null||M.closeRefresh())},f=async()=>{a.value=!0;try{await l("/servers/server/settings/serverNames",v=>{o.serverNames=(v==null?void 0:v.serverNames)||[],o.server=(v==null?void 0:v.server)||{},t.value=v.leftMenuItems,c((v==null?void 0:v.serverNames)||[])});const h=[];h.push(l("/servers/server/settings/groups",v=>{o.groups=v.groups}),l("/servers/server/settings/dns",v=>{o.dnsDomain=v.dnsDomain,o.dnsName=v.dnsName}),l("/servers/server/settings/http",v=>{const{redirectToHTTPSConfig:O,httpConfig:y,webId:S,serverId:w,serverType:_}=v;O&&(o.redirectToHTTPSConfig=O),Object.assign(o,{httpConfig:y,webId:S,serverId:w,serverType:_})}),l("/servers/server/settings/https",v=>{const O=v.httpsConfig.sslPolicy,y=Ki();for(const S in O)(O[S]==null||O[S]==="")&&(O[S]=y.httpsConfig.sslPolicy[S]);o.httpsConfig=v.httpsConfig})),t.value.some(v=>v.url===`/servers/server/settings/plan?serverId=${e==null?void 0:e.value}`)&&h.push(l("/servers/server/settings/plan",v=>{o.userPlan=v.userPlan,o.userPlans=v.userPlans})),await Promise.all(h)}catch(h){console.error("初始化失败：",h)}finally{console.log("success!")}};return Nn("loading",a),Nn("baseConfig",o),vt(()=>{f()}),(h,g)=>{const v=re;return L(),W(v,{vertical:""},{default:p(()=>[d(k2,{ref_key:"config",ref:n,visible:a.value,"onUpdate:visible":g[0]||(g[0]=O=>a.value=O),"server-data":o.serverOther,onServerRefresh:c},null,8,["visible","server-data"]),d(M2,{"domain-data":o.serverNames,onServerRefresh:c},null,8,["domain-data"]),d(z2,{onServerRefresh:c}),d(J2,{"http-config":o.httpConfig,"redirect-config":o.redirectToHTTPSConfig},null,8,["http-config","redirect-config"]),d(vT,{"https-config":o.httpsConfig,onServerRefresh:c},null,8,["https-config"]),d(WT)]),_:1})}}}),GT={key:2,class:"h-full overflow-y-auto"},JT={class:"text-xs"},KT={class:"text-xs"},eR={class:"text-xs"},tR={class:"text-xs"},nR=ae({name:"RequestLimit",__name:"request-limit",setup(i){const e=qe("serverId",B("0")),t=B(!0),n=B(!1),s=B([]),o=fe({featureIsOn:!1,requestLimitConfig:{isPrior:!1,isOn:!1,maxConns:0,maxConnsPerIP:0,outBandwidthPerConn:{count:-1,unit:"kb"},maxBodySize:{count:-1,unit:"kb"}},webId:0}),a=wt(),l=J(()=>a.isMobile),c=J(()=>l.value?"top":"left"),f=async()=>{const y="/servers/server/settings/requestLimit",{data:S,error:w}=await ht(y,{serverId:e.value});if(!w&&S){const{featureIsOn:_=!1,requestLimitConfig:$,webId:A=0}=S;Object.assign(o,{featureIsOn:_,requestLimitConfig:$||o.requestLimitConfig,webId:A})}},h=async()=>{var $;n.value=!0;const y=await Kt(),S="/servers/server/settings/requestLimit",w={webId:o.webId,csrfToken:y,requestLimitJSON:JSON.stringify(o.requestLimitConfig)},{error:_}=await Ee(w,S);_?f():($=window.$message)==null||$.success(u("common.msgSync")),n.value=!1},g=J(()=>[{label:"字节",value:"byte"},{label:"KiB",value:"kb"},{label:"MiB",value:"mb"},{label:"GiB",value:"gm"}]),v=y=>{y?s.value.push("more"):s.value=[],h()},O=()=>{h()};return vt(()=>{f().finally(()=>{t.value=!1})}),(y,S)=>{const w=nn,_=en,$=ve,A=Re,R=un,k=_e,x=Qi,T=Ut,M=ze,N=ft,I=tn,q=Te,z=re,H=Xt,F=Ht,V=nt;return t.value?(L(),W(jt,{key:0})):o.featureIsOn?(L(),te("div",GT,[d(z,{vertical:""},{default:p(()=>[d(V,{show:n.value},{default:p(()=>[d(M,{title:C(u)("page.webSet.requestLimit.title")},{default:p(()=>[d(A,null,{default:p(()=>[d($,{label:C(u)("page.webSet.requestLimit.enable"),"label-placement":c.value},{default:p(()=>[d(_,{value:o.requestLimitConfig.isOn,"onUpdate:value":[S[0]||(S[0]=j=>o.requestLimitConfig.isOn=j),v]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1}),d(F,{"expanded-names":s.value,"onUpdate:expandedNames":S[7]||(S[7]=j=>s.value=j),"arrow-placement":"right"},{default:p(()=>[d(H,{name:"more"},{header:p(()=>[d(R,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(k,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(M,{size:"small",bordered:!1},{default:p(()=>[d(x,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(k,{"local-icon":"carbon--plug-filled"}),d(R,null,{default:p(()=>[X(Q(C(u)("page.webSet.requestLimit.connectionLimit")),1)]),_:1})]),_:1}),d(A,{"label-width":120,"label-align":"left"},{default:p(()=>[d($,{label:C(u)("page.webSet.requestLimit.maxConcurrentConnections"),"label-placement":c.value},{feedback:p(()=>[U("span",JT,Q(C(u)("page.webSet.requestLimit.maxConcurrentConnections_desc")),1)]),default:p(()=>[d(T,{value:o.requestLimitConfig.maxConns,"onUpdate:value":S[1]||(S[1]=j=>o.requestLimitConfig.maxConns=j),"show-button":!1},null,8,["value"])]),_:1},8,["label","label-placement"]),d($,{label:C(u)("page.webSet.requestLimit.maxConnectionsPerIP"),"label-placement":c.value},{feedback:p(()=>[U("span",KT,Q(C(u)("page.webSet.requestLimit.maxConnectionsPerIP_desc")),1),Zt(U("span",{class:"text-xs text-red"},Q(C(u)("page.webSet.requestLimit.lowConnectionWarning")),513),[[zt,o.requestLimitConfig.maxConnsPerIP<3]])]),default:p(()=>[d(T,{value:o.requestLimitConfig.maxConnsPerIP,"onUpdate:value":S[2]||(S[2]=j=>o.requestLimitConfig.maxConnsPerIP=j),"show-button":!1},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(M,{size:"small",bordered:!1},{footer:p(()=>[d(z,null,{default:p(()=>[d(q,{type:"info",onClick:O},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),default:p(()=>[d(x,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(k,{"local-icon":"tabler--arrows-exchange"}),d(R,null,{default:p(()=>[X(Q(C(u)("page.webSet.requestLimit.bandwidthAndContentLimit")),1)]),_:1})]),_:1}),d(A,{"label-width":120,"label-align":"left"},{default:p(()=>[d($,{label:C(u)("page.webSet.requestLimit.bandwidthPerConnection"),"label-placement":c.value},{feedback:p(()=>[U("span",eR,Q(C(u)("page.webSet.requestLimit.bandwidthPerConnection_desc")),1)]),default:p(()=>[d(I,null,{default:p(()=>[d(T,{value:o.requestLimitConfig.outBandwidthPerConn.count,"onUpdate:value":S[3]||(S[3]=j=>o.requestLimitConfig.outBandwidthPerConn.count=j),"show-button":!1},null,8,["value"]),d(N,{value:o.requestLimitConfig.outBandwidthPerConn.unit,"onUpdate:value":S[4]||(S[4]=j=>o.requestLimitConfig.outBandwidthPerConn.unit=j),style:{width:"90px"},options:g.value,"default-value":"kb"},null,8,["value","options"])]),_:1})]),_:1},8,["label","label-placement"]),d($,{label:C(u)("page.webSet.requestLimit.maxBodySizePerRequest"),"label-placement":c.value},{feedback:p(()=>[U("span",tR,Q(C(u)("page.webSet.requestLimit.maxBodySizePerRequest_desc")),1)]),default:p(()=>[d(I,null,{default:p(()=>[d(T,{value:o.requestLimitConfig.maxBodySize.count,"onUpdate:value":S[5]||(S[5]=j=>o.requestLimitConfig.maxBodySize.count=j),"show-button":!1},null,8,["value"]),d(N,{value:o.requestLimitConfig.maxBodySize.unit,"onUpdate:value":S[6]||(S[6]=j=>o.requestLimitConfig.maxBodySize.unit=j),style:{width:"90px"},options:g.value,"default-value":"kb"},null,8,["value","options"])]),_:1})]),_:1},8,["label","label-placement"])]),_:1})]),_:1})]),_:1})]),_:1},8,["expanded-names"])]),_:1},8,["title"])]),_:1},8,["show"])]),_:1})])):(L(),W(w,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),sR=ce(nR,[["__scopeId","data-v-ed91e47d"]]);var Ru,iv;function iR(){if(iv)return Ru;iv=1;var i="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,i),this}return Ru=e,Ru}var Iu,ov;function oR(){if(ov)return Iu;ov=1;function i(e){return this.__data__.has(e)}return Iu=i,Iu}var Qu,av;function aR(){if(av)return Qu;av=1;var i=z$(),e=iR(),t=oR();function n(s){var o=-1,a=s==null?0:s.length;for(this.__data__=new i;++o<a;)this.add(s[o])}return n.prototype.add=n.prototype.push=e,n.prototype.has=t,Qu=n,Qu}var Au,lv;function lR(){if(lv)return Au;lv=1;function i(e,t){for(var n=-1,s=e==null?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1}return Au=i,Au}var Nu,rv;function rR(){if(rv)return Nu;rv=1;function i(e,t){return e.has(t)}return Nu=i,Nu}var Mu,cv;function LO(){if(cv)return Mu;cv=1;var i=aR(),e=lR(),t=rR(),n=1,s=2;function o(a,l,c,f,h,g){var v=c&n,O=a.length,y=l.length;if(O!=y&&!(v&&y>O))return!1;var S=g.get(a),w=g.get(l);if(S&&w)return S==l&&w==a;var _=-1,$=!0,A=c&s?new i:void 0;for(g.set(a,l),g.set(l,a);++_<O;){var R=a[_],k=l[_];if(f)var x=v?f(k,R,_,l,a,g):f(R,k,_,a,l,g);if(x!==void 0){if(x)continue;$=!1;break}if(A){if(!e(l,function(T,M){if(!t(A,M)&&(R===T||h(R,T,c,f,g)))return A.push(M)})){$=!1;break}}else if(!(R===k||h(R,k,c,f,g))){$=!1;break}}return g.delete(a),g.delete(l),$}return Mu=o,Mu}var Lu,dv;function cR(){if(dv)return Lu;dv=1;function i(e){var t=-1,n=Array(e.size);return e.forEach(function(s,o){n[++t]=[o,s]}),n}return Lu=i,Lu}var Uu,uv;function dR(){if(uv)return Uu;uv=1;function i(e){var t=-1,n=Array(e.size);return e.forEach(function(s){n[++t]=s}),n}return Uu=i,Uu}var Du,fv;function uR(){if(fv)return Du;fv=1;var i=H$(),e=X$(),t=j$(),n=LO(),s=cR(),o=dR(),a=1,l=2,c="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Map]",v="[object Number]",O="[object RegExp]",y="[object Set]",S="[object String]",w="[object Symbol]",_="[object ArrayBuffer]",$="[object DataView]",A=i?i.prototype:void 0,R=A?A.valueOf:void 0;function k(x,T,M,N,I,q,z){switch(M){case $:if(x.byteLength!=T.byteLength||x.byteOffset!=T.byteOffset)return!1;x=x.buffer,T=T.buffer;case _:return!(x.byteLength!=T.byteLength||!q(new e(x),new e(T)));case c:case f:case v:return t(+x,+T);case h:return x.name==T.name&&x.message==T.message;case O:case S:return x==T+"";case g:var H=s;case y:var F=N&a;if(H||(H=o),x.size!=T.size&&!F)return!1;var V=z.get(x);if(V)return V==T;N|=l,z.set(x,T);var j=n(H(x),H(T),N,I,q,z);return z.delete(x),j;case w:if(R)return R.call(x)==R.call(T)}return!1}return Du=k,Du}var qu,pv;function fR(){if(pv)return qu;pv=1;var i=V$(),e=1,t=Object.prototype,n=t.hasOwnProperty;function s(o,a,l,c,f,h){var g=l&e,v=i(o),O=v.length,y=i(a),S=y.length;if(O!=S&&!g)return!1;for(var w=O;w--;){var _=v[w];if(!(g?_ in a:n.call(a,_)))return!1}var $=h.get(o),A=h.get(a);if($&&A)return $==a&&A==o;var R=!0;h.set(o,a),h.set(a,o);for(var k=g;++w<O;){_=v[w];var x=o[_],T=a[_];if(c)var M=g?c(T,x,_,a,o,h):c(x,T,_,o,a,h);if(!(M===void 0?x===T||f(x,T,l,c,h):M)){R=!1;break}k||(k=_=="constructor")}if(R&&!k){var N=o.constructor,I=a.constructor;N!=I&&"constructor"in o&&"constructor"in a&&!(typeof N=="function"&&N instanceof N&&typeof I=="function"&&I instanceof I)&&(R=!1)}return h.delete(o),h.delete(a),R}return qu=s,qu}var Eu,hv;function pR(){if(hv)return Eu;hv=1;var i=F$(),e=LO(),t=uR(),n=fR(),s=W$(),o=Y$(),a=G$(),l=J$(),c=1,f="[object Arguments]",h="[object Array]",g="[object Object]",v=Object.prototype,O=v.hasOwnProperty;function y(S,w,_,$,A,R){var k=o(S),x=o(w),T=k?h:s(S),M=x?h:s(w);T=T==f?g:T,M=M==f?g:M;var N=T==g,I=M==g,q=T==M;if(q&&a(S)){if(!a(w))return!1;k=!0,N=!1}if(q&&!N)return R||(R=new i),k||l(S)?e(S,w,_,$,A,R):t(S,w,T,_,$,A,R);if(!(_&c)){var z=N&&O.call(S,"__wrapped__"),H=I&&O.call(w,"__wrapped__");if(z||H){var F=z?S.value():S,V=H?w.value():w;return R||(R=new i),A(F,V,_,$,R)}}return q?(R||(R=new i),n(S,w,_,$,A,R)):!1}return Eu=y,Eu}var Bu,mv;function hR(){if(mv)return Bu;mv=1;var i=pR(),e=K$();function t(n,s,o,a,l){return n===s?!0:n==null||s==null||!e(n)&&!e(s)?n!==n&&s!==s:i(n,s,o,a,t,l)}return Bu=t,Bu}var Zu,gv;function mR(){if(gv)return Zu;gv=1;var i=hR();function e(t,n){return i(t,n)}return Zu=e,Zu}var gR=mR();const vR=e2(gR),bR={style:{"max-width":"100%","overflow-x":"auto"}},OR={style:{"min-width":"500px"}},CR={key:0,class:"drag-handle"},yR={key:1},SR=["colspan"],_R=ae({name:"WafTable",__name:"waf-table",props:Be({columns:{},loading:{type:Boolean}},{data:{default:()=>[]},dataModifiers:{}}),emits:Be(["updateRedirects"],["update:data"]),setup(i,{emit:e}){const t=e,n=Ze(i,"data"),s=i,o=()=>{t("updateRedirects")};return(a,l)=>{const c=Kc,f=nt,h=MO;return L(),te(Ce,null,[U("div",bR,[U("div",OR,[d(f,{show:s.loading},{default:p(()=>[d(c,{bordered:!0,"single-line":!0},{default:p(()=>[U("thead",null,[U("tr",null,[(L(!0),te(Ce,null,Ot(s.columns,g=>(L(),te("th",{key:g.key,style:fi({textAlign:g.align||"left",width:g.width||"auto"})},Q(g.title),5))),128))])]),n.value!==null&&n.value.length>0?(L(),W(C(Sa),{key:0,modelValue:n.value,"onUpdate:modelValue":[l[0]||(l[0]=g=>n.value=g),o],tag:"tbody","item-key":"name",handle:".drag-handle"},{item:p(({element:g,index:v})=>[U("tr",null,[(L(!0),te(Ce,null,Ot(s.columns,O=>(L(),te("td",{key:O.key,style:fi({textAlign:O.align||"left",width:O.width||"auto"})},[O.key==="sort"?(L(),te("div",CR,[O.render?(L(),W(yn(O.render(g,v)),{key:0})):(L(),te(Ce,{key:1},[X(Q(g[O.key]),1)],64))])):(L(),te(Ce,{key:1},[O.render?(L(),W(yn(O.render(g,v)),{key:0})):(L(),te(Ce,{key:1},[X(Q(g[O.key]),1)],64))],64))],4))),128))])]),_:1},8,["modelValue"])):(L(),te("tbody",yR,[U("tr",null,[U("td",{colspan:s.columns.length,style:{"text-align":"center",padding:"20px",color:"#888"}},[U("span",null,Q(s.loading?"Loading...":a.$t("sec.wafConfig.noData")),1)],8,SR)])]))]),_:1})]),_:1},8,["show"])])]),d(h,{class:"ml-1 text-xs"},{default:p(()=>[X(Q(a.$t("page.webSet.redirectsConfig.sortTip")),1)]),_:1})],64)}}}),UO=ce(_R,[["__scopeId","data-v-f8bc561e"]]),wR={key:0},kR=["innerHTML"],xR={key:0},PR={key:1,style:{color:"red"}},$R={key:0},TR={key:1},RR={key:2},IR=ae({name:"CommonConfig",__name:"common-config",props:{value:{default:{id:0,isOn:!0,param:"",paramFilters:[],operator:"not match",value:"",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:null,description:""}},valueModifiers:{}},emits:["update:value"],setup(i){const e=qe("checkpoints"),t=Ze(i,"value"),n=B(""),s=J(()=>[{case:"yes",code:"match",dataType:"regexp",description:u("sec.params.common.options.match.description"),name:u("sec.params.common.options.match.name")},{case:"yes",code:"not match",dataType:"regexp",description:u("sec.params.common.options.not_match.description"),name:u("sec.params.common.options.not_match.name")},{case:"yes",code:"wildcard match",dataType:"wildcard",description:u("sec.params.common.options.wildcard_match.description"),name:u("sec.params.common.options.wildcard_match.name")},{case:"yes",code:"wildcard not match",dataType:"wildcard",description:u("sec.params.common.options.wildcard_not_match.description"),name:u("sec.params.common.options.wildcard_not_match.name")},{case:"no",code:"eq string",dataType:"string",description:u("sec.params.common.options.eq_string.description"),name:u("sec.params.common.options.eq_string.name")},{case:"no",code:"neq string",dataType:"string",description:u("sec.params.common.options.neq_string.description"),name:u("sec.params.common.options.neq_string.name")},{case:"no",code:"contains",dataType:"string",description:u("sec.params.common.options.contains.description"),name:u("sec.params.common.options.contains.name")},{case:"no",code:"not contains",dataType:"string",description:u("sec.params.common.options.not_contains.description"),name:u("sec.params.common.options.not_contains.name")},{case:"no",code:"contains any",dataType:"strings",description:u("sec.params.common.options.contains_any.description"),name:u("sec.params.common.options.contains_any.name")},{case:"no",code:"contains all",dataType:"strings",description:u("sec.params.common.options.contains_all.description"),name:u("sec.params.common.options.contains_all.name")},{case:"no",code:"prefix",dataType:"string",description:u("sec.params.common.options.prefix.description"),name:u("sec.params.common.options.prefix.name")},{case:"no",code:"suffix",dataType:"string",description:u("sec.params.common.options.suffix.description"),name:u("sec.params.common.options.suffix.name")},{case:"no",code:"contains any word",dataType:"strings",description:u("sec.params.common.options.contains_any_word.description"),name:u("sec.params.common.options.contains_any_word.name")},{case:"no",code:"contains all words",dataType:"strings",description:u("sec.params.common.options.contains_all_words.description"),name:u("sec.params.common.options.contains_all_words.name")},{case:"no",code:"not contains any word",dataType:"strings",description:u("sec.params.common.options.not_contains_any_word.description"),name:u("sec.params.common.options.not_contains_any_word.name")},{case:"none",code:"contains sql injection",dataType:"none",description:u("sec.params.common.options.contains_sql_injection.description"),name:u("sec.params.common.options.contains_sql_injection.name")},{case:"none",code:"contains sql injection strictly",dataType:"none",description:u("sec.params.common.options.contains_sql_injection_strictly.description"),name:u("sec.params.common.options.contains_sql_injection_strictly.name")},{case:"none",code:"contains xss",dataType:"none",description:u("sec.params.common.options.contains_xss.description"),name:u("sec.params.common.options.contains_xss.name")},{case:"none",code:"contains xss strictly",dataType:"none",description:u("sec.params.common.options.contains_xss_strictly.description"),name:u("sec.params.common.options.contains_xss_strictly.name")},{case:"no",code:"contains binary",dataType:"string",description:u("sec.params.common.options.contains_binary.description"),name:u("sec.params.common.options.contains_binary.name")},{case:"no",code:"not contains binary",dataType:"string",description:u("sec.params.common.options.not_contains_binary.description"),name:u("sec.params.common.options.not_contains_binary.name")},{case:"none",code:"gt",dataType:"number",description:u("sec.params.common.options.gt.description"),name:u("sec.params.common.options.gt.name")},{case:"none",code:"gte",dataType:"number",description:u("sec.params.common.options.gte.description"),name:u("sec.params.common.options.gte.name")},{case:"none",code:"lt",dataType:"number",description:u("sec.params.common.options.lt.description"),name:u("sec.params.common.options.lt.name")},{case:"none",code:"lte",dataType:"number",description:u("sec.params.common.options.lte.description"),name:u("sec.params.common.options.lte.name")},{case:"none",code:"eq",dataType:"number",description:u("sec.params.common.options.eq.description"),name:u("sec.params.common.options.eq.name")},{case:"none",code:"neq",dataType:"number",description:u("sec.params.common.options.neq.description"),name:u("sec.params.common.options.neq.name")},{case:"no",code:"has key",dataType:"string|number",description:u("sec.params.common.options.has_key.description"),name:u("sec.params.common.options.has_key.name")},{case:"none",code:"version gt",dataType:"version",description:u("sec.params.common.options.version_gt.description"),name:u("sec.params.common.options.version_gt.name")},{case:"none",code:"version lt",dataType:"version",description:u("sec.params.common.options.version_lt.description"),name:u("sec.params.common.options.version_lt.name")},{case:"none",code:"version range",dataType:"versionRange",description:u("sec.params.common.options.version_range.description"),name:u("sec.params.common.options.version_range.name")},{case:"none",code:"eq ip",dataType:"ip",description:u("sec.params.common.options.eq_ip.description"),name:u("sec.params.common.options.eq_ip.name")},{case:"none",code:"in ip list",dataType:"ips",description:u("sec.params.common.options.in_ip_list.description"),name:u("sec.params.common.options.in_ip_list.name")},{case:"none",code:"gt ip",dataType:"ip",description:u("sec.params.common.options.gt_ip.description"),name:u("sec.params.common.options.gt_ip.name")},{case:"none",code:"gte ip",dataType:"ip",description:u("sec.params.common.options.gte_ip.description"),name:u("sec.params.common.options.gte_ip.name")},{case:"none",code:"lt ip",dataType:"ip",description:u("sec.params.common.options.lt_ip.description"),name:u("sec.params.common.options.lt_ip.name")},{case:"none",code:"lte ip",dataType:"ip",description:u("sec.params.common.options.lte_ip.description"),name:u("sec.params.common.options.lte_ip.name")},{case:"none",code:"ip range",dataType:"ips",description:u("sec.params.common.options.ip_range.description"),name:u("sec.params.common.options.ip_range.name")},{case:"none",code:"not ip range",dataType:"ips",description:u("sec.params.common.options.not_ip_range.description"),name:u("sec.params.common.options.not_ip_range.name")},{case:"none",code:"ip mod 10",dataType:"number",description:u("sec.params.common.options.ip_mod_10.description"),name:u("sec.params.common.options.ip_mod_10.name")},{case:"none",code:"ip mod 100",dataType:"number",description:u("sec.params.common.options.ip_mod_100.description"),name:u("sec.params.common.options.ip_mod_100.name")},{case:"none",code:"ip mod",dataType:"number",description:u("sec.params.common.options.ip_mod.description"),name:u("sec.params.common.options.ip_mod.name")}]);function o(_){if(_.includes(".")){const[$,A]=_.split(".");return{before:$,after:A}}else return{before:_,after:null}}const a=_=>{const $=_.match(/\$\{(.+?)\}/);if($){const A=e==null?void 0:e.value.find(R=>R.prefix===o($[1]).before);return A==null?void 0:A.value}return"null"},l=J(()=>{const _=s.value.findIndex($=>$.code===t.value.operator);return _!==-1?s.value[_]:null}),c=J(()=>{const _=e==null?void 0:e.value.findIndex($=>$.value===a(t.value.param));return _&&_!==-1?e==null?void 0:e.value[_]:null}),f=J(()=>{var _,$,A,R,k,x,T,M,N,I,q,z,H,F,V,j,se,G,K,de;return((_=t.value)==null?void 0:_.operator)!=null&&(($=l.value)==null?void 0:$.dataType)==="regexp"?u("sec.params.common.formLabel.regexp"):((A=t.value)==null?void 0:A.operator)!=null&&((R=l.value)==null?void 0:R.dataType)==="wildcard"?u("sec.params.common.formLabel.wildcard"):((k=t.value)==null?void 0:k.operator)!=null&&((x=l.value)==null?void 0:x.dataType)==="number"?u("sec.params.common.formLabel.number"):((T=t.value)==null?void 0:T.operator)!=null&&((M=l.value)==null?void 0:M.dataType)==="string"?u("sec.params.common.formLabel.string"):((N=t.value)==null?void 0:N.operator)!=null&&((I=l.value)==null?void 0:I.dataType)==="strings"?u("sec.params.common.formLabel.strings"):((q=t.value)==null?void 0:q.operator)!=null&&((z=l.value)==null?void 0:z.dataType)==="string|number"?u("sec.params.common.formLabel.string_number"):((H=t.value)==null?void 0:H.operator)!=null&&((F=l.value)==null?void 0:F.dataType)==="version"?u("sec.params.common.formLabel.version"):((V=t.value)==null?void 0:V.operator)!=null&&((j=l.value)==null?void 0:j.dataType)==="versionRange"?u("sec.params.common.formLabel.versionRange"):((se=t.value)==null?void 0:se.operator)!=null&&((G=l.value)==null?void 0:G.dataType)==="ip"?u("sec.params.common.formLabel.ip"):((K=t.value)==null?void 0:K.operator)!=null&&((de=l.value)==null?void 0:de.dataType)==="ips"?u("sec.params.common.formLabel.ips"):u("sec.params.common.formLabel.def")}),h=J(()=>[{name:"MD5",code:"md5"},{name:"URLEncode",code:"urlEncode"},{name:"URLDecode",code:"urlDecode"},{name:"BASE64Encode",code:"base64Encode"},{name:"BASE64Decode",code:"base64Decode"},{name:u("sec.params.common.paramFilters.unicodeEncode"),code:"unicodeEncode"},{name:u("sec.params.common.paramFilters.unicodeDecode"),code:"unicodeDecode"},{name:u("sec.params.common.paramFilters.htmlEscape"),code:"htmlEscape"},{name:u("sec.params.common.paramFilters.length"),code:"length"},{name:u("sec.params.common.paramFilters.hex2dec"),code:"hex2dec"},{name:u("sec.params.common.paramFilters.dec2hex"),code:"dec2hex"},{name:u("sec.params.common.paramFilters.htmlUnescape"),code:"htmlUnescape"}]),g=_=>{t.value.paramFilters=h.value.filter($=>_.includes($.code))},v=J({get:()=>t.value.paramFilters.map(_=>_.code),set:_=>{t.value.paramFilters=h.value.filter($=>_.includes($.code))}}),O=J(()=>[{label:u("sec.params.common.paramFilters.minSize"),value:"${requestUpload.minSize}"},{label:u("sec.params.common.paramFilters.maxSize"),value:"${requestUpload.maxSize}"},{label:u("sec.params.common.paramFilters.ext"),value:"${requestUpload.ext}"},{label:u("sec.params.common.paramFilters.name"),value:"${requestUpload.name}"},{label:u("sec.params.common.paramFilters.field"),value:"${requestUpload.field}"}]),y=()=>{t.value.value&&(t.value.value=t.value.value.replace(/\r?\n/g,""))},S=J(()=>{try{return new RegExp(t.value.value),!0}catch{return!1}}),w=J(()=>{if(!S.value||!t.value.value)return!1;try{return new RegExp(t.value.value).test(n.value)}catch{return!1}});return(_,$)=>{const A=Ne,R=ft,k=ve,x=Ut,T=et,M=Re;return L(),W(M,{class:"space-y-sm"},{default:p(()=>{var N,I,q,z,H,F,V,j,se,G,K,de,Oe,we,pe,Se,xe,Me;return[c.value!==null&&((N=c.value)!=null&&N.hasParams)?(L(),W(k,{key:0,label:C(u)("sec.params.common.paramName")},{feedback:p(()=>[c.value.params===null?(L(),te("span",wR,Q(C(u)("sec.params.common.paramNameExample")),1)):Xe("",!0)]),default:p(()=>[c.value.params===null?(L(),W(A,{key:0,value:t.value.param,"onUpdate:value":$[0]||($[0]=Pe=>t.value.param=Pe),class:"w-full"},null,8,["value"])):Xe("",!0),c.value.params!==null?(L(),W(R,{key:1,value:t.value.param,"onUpdate:value":$[1]||($[1]=Pe=>t.value.param=Pe),options:O.value},null,8,["value","options"])):Xe("",!0)]),_:1},8,["label"])):Xe("",!0),d(k,{label:C(u)("sec.params.common.operator")},{feedback:p(()=>{var Pe;return[U("span",{innerHTML:(Pe=l.value)==null?void 0:Pe.description},null,8,kR)]}),default:p(()=>[d(R,{options:s.value,value:t.value.operator,"onUpdate:value":$[2]||($[2]=Pe=>t.value.operator=Pe),"value-field":"code","label-field":"name"},null,8,["options","value"])]),_:1},8,["label"]),t.value.operator==="contains binary"?(L(),W(k,{key:1,label:f.value,feedback:C(u)("sec.params.common.base64EncodeHint")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[3]||($[3]=Pe=>t.value.value=Pe),type:"textarea"},null,8,["value"])]),_:1},8,["label","feedback"])):t.value.operator==="not contains binary"?(L(),W(k,{key:2,label:f.value,feedback:C(u)("sec.params.common.base64EncodeHint")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[4]||($[4]=Pe=>t.value.value=Pe),type:"textarea"},null,8,["value"])]),_:1},8,["label","feedback"])):c.value!==null&&c.value.dataType==="bool"?(L(),W(k,{key:3,label:f.value},{default:p(()=>[d(R,{value:t.value.value,"onUpdate:value":$[5]||($[5]=Pe=>t.value.value=Pe),options:[{label:C(u)("sec.params.common.pleaseSelect"),value:""},{label:C(u)("sec.params.common.yes"),value:"1"},{label:C(u)("sec.params.common.no"),value:"0"}]},null,8,["value","options"])]),_:1},8,["label"])):((I=t.value)==null?void 0:I.operator)!==null&&((q=l.value)==null?void 0:q.dataType)==="wildcard"?(L(),W(k,{key:4,label:f.value,feedback:C(u)("sec.params.common.wildcardInput")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[6]||($[6]=Pe=>t.value.value=Pe),type:"textarea"},null,8,["value"])]),_:1},8,["label","feedback"])):((z=t.value)==null?void 0:z.operator)!==null&&((H=l.value)==null?void 0:H.dataType)==="number"?(L(),W(k,{key:5,label:f.value,feedback:C(u)("sec.params.common.numericCompare")},{default:p(()=>[d(x,{value:t.value.value,"onUpdate:value":$[7]||($[7]=Pe=>t.value.value=Pe),"show-button":!1},null,8,["value"])]),_:1},8,["label","feedback"])):((F=t.value)==null?void 0:F.operator)!==null&&((V=l.value)==null?void 0:V.dataType)==="string|number"?(L(),W(k,{key:6,label:f.value,feedback:C(u)("sec.params.common.stringOrNumberCompare")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[8]||($[8]=Pe=>t.value.value=Pe)},null,8,["value"])]),_:1},8,["label","feedback"])):((j=t.value)==null?void 0:j.operator)!==null&&((se=l.value)==null?void 0:se.dataType)==="version"?(L(),W(k,{key:7,label:f.value,feedback:C(u)("sec.params.common.versionCompare")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[9]||($[9]=Pe=>t.value.value=Pe)},null,8,["value"])]),_:1},8,["label","feedback"])):((G=t.value)==null?void 0:G.operator)!==null&&((K=l.value)==null?void 0:K.dataType)==="versionRange"?(L(),W(k,{key:8,label:f.value,feedback:C(u)("sec.params.common.versionRangeCompare")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[10]||($[10]=Pe=>t.value.value=Pe)},null,8,["value"])]),_:1},8,["label","feedback"])):((de=t.value)==null?void 0:de.operator)!==null&&((Oe=l.value)==null?void 0:Oe.dataType)==="ip"?(L(),W(k,{key:9,label:f.value,feedback:C(u)("sec.params.common.ipCompare")},{default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[11]||($[11]=Pe=>t.value.value=Pe)},null,8,["value"])]),_:1},8,["label","feedback"])):(L(),W(k,{key:10,label:f.value},{feedback:p(()=>{var Pe,st,Ye,it;return[((Pe=t.value)==null?void 0:Pe.operator)!==null&&((st=l.value)==null?void 0:st.dataType)==="regexp"?(L(),te("span",xR,Q(C(u)("sec.params.common.regexEscapeHint")),1)):Xe("",!0),((Ye=l.value)==null?void 0:Ye.dataType)==="regexp"&&/\n/.test(((it=t.value)==null?void 0:it.value)??"")?(L(),te("span",PR,[X(" ⚠️ "+Q(C(u)("sec.params.common.regexNewlineWarning"))+" ",1),U("span",{class:"text-green cursor-pointer",onClick:y},Q(C(u)("sec.params.common.convertHelp")),1)])):Xe("",!0)]}),default:p(()=>[d(A,{value:t.value.value,"onUpdate:value":$[12]||($[12]=Pe=>t.value.value=Pe),type:"textarea"},null,8,["value"])]),_:1},8,["label"])),t.value.operator!==null&&((we=l.value)==null?void 0:we.dataType)=="regexp"?(L(),W(k,{key:11,label:C(u)("sec.params.common.regexTest")},{feedback:p(()=>[n.value.length!==0?(L(),te("div",{key:0,class:Ln(["p-2 rounded",S.value?w.value?"bg-green-100 text-green-700":"bg-red-100 text-red-700":"bg-gray-100 text-gray-500"])},[S.value?w.value?(L(),te("span",TR,"✅ "+Q(C(u)("sec.params.common.matchSuccess")),1)):(L(),te("span",RR,"❌ "+Q(C(u)("sec.params.common.noMatch")),1)):(L(),te("span",$R,"❌ "+Q(C(u)("sec.params.common.regexSyntaxError")),1))],2)):Xe("",!0)]),default:p(()=>[d(A,{type:"textarea",value:n.value,"onUpdate:value":$[13]||($[13]=Pe=>n.value=Pe),placeholder:C(u)("sec.params.common.inputTestString")},null,8,["value","placeholder"])]),_:1},8,["label"])):Xe("",!0),(c.value==null||((pe=c.value)==null?void 0:pe.dataType)!=="bool")&&((Se=t.value)==null?void 0:Se.operator)!==null&&((xe=l.value)==null?void 0:xe.case)!="none"?(L(),W(k,{key:12,label:C(u)("sec.params.common.caseInsensitive")},{default:p(()=>[d(T,{checked:t.value.isCaseInsensitive,"onUpdate:checked":$[14]||($[14]=Pe=>t.value.isCaseInsensitive=Pe),label:C(u)("sec.params.common.ignoreCase")},null,8,["checked","label"])]),_:1},8,["label"])):Xe("",!0),c.value!==null&&!((Me=c.value)!=null&&Me.isComposed)?(L(),W(k,{key:13,label:C(u)("sec.params.common.encodingDecoding")},{default:p(()=>[d(R,{value:v.value,"onUpdate:value":[$[15]||($[15]=Pe=>v.value=Pe),g],filterable:"",multiple:"",tag:"",options:h.value,"label-field":"name","value-field":"code"},null,8,["value","options"])]),_:1},8,["label"])):Xe("",!0),d(k,{label:C(u)("sec.params.common.remarks")},{default:p(()=>[d(A,{value:t.value.description,"onUpdate:value":$[16]||($[16]=Pe=>t.value.description=Pe)},null,8,["value"])]),_:1},8,["label"])]}),_:1})}}}),Pp=ce(IR,[["__scopeId","data-v-c686d30c"]]),QR=ae({name:"CommonRules",__name:"common-rules",props:{data:{},paramType:{}},setup(i,{expose:e}){const t=B("${rawRemoteAddr}"),n={id:0,isOn:!0,param:"${rawRemoteAddr}",paramFilters:[],operator:"not match",value:"",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:null,description:""},s=i,o=B(n);function a(f){if(f.includes(".")){const[h,g]=f.split(".");return{before:h,after:g}}else return{before:f,after:null}}const l=qe("checkpoints"),c=f=>{const h=f.match(/\$\{(.+?)\}/);if(h){const g=l==null?void 0:l.value.find(v=>v.prefix===a(h[1]).before);return g==null?void 0:g.value}return"null"};return Zn(()=>{if(t.value=s.paramType,s.data){const f=c(s.data.param);t.value===f?o.value=tt(s.data):o.value=tt({...n,param:t.value})}}),e({model:o}),(f,h)=>(L(),W(Pp,{value:o.value,"onUpdate:value":h[0]||(h[0]=g=>o.value=g)},null,8,["value"]))}}),AR=ce(QR,[["__scopeId","data-v-f4c5820e"]]),NR=Object.freeze(Object.defineProperty({__proto__:null,default:AR},Symbol.toStringTag,{value:"Module"})),MR="${rawRemoteAddr}",LR=ae({name:"RawRemoteAddr",__name:"raw-remote-addr",props:{data:{}},setup(i,{expose:e}){const t={id:0,isOn:!0,param:"${rawRemoteAddr}",paramFilters:[],operator:"not match",value:"",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:null,description:""},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.param;MR===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>(L(),W(Pp,{value:s.value,"onUpdate:value":a[0]||(a[0]=l=>s.value=l)},null,8,["value"]))}}),UR=ce(LR,[["__scopeId","data-v-e45b12da"]]),DR=Object.freeze(Object.defineProperty({__proto__:null,default:UR},Symbol.toStringTag,{value:"Module"})),qR="${refererBlock}",ER=ae({name:"RefererBlock",__name:"referer-block",props:{data:{}},setup(i,{expose:e}){const t={id:0,isOn:!0,param:"${refererBlock}",paramFilters:[],operator:"eq",value:"0",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:{allowDomains:[],allowEmpty:!0,allowSameDomain:!0,checkOrigin:!0,denyDomains:[]},description:""},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.param;qR===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=et,c=ve,f=Wt,h=Re;return L(),W(h,null,{default:p(()=>[d(c,{label:o.$t("sec.params.rules.refererBlock.sourceDomainCanBeEmpty")},{default:p(()=>[d(l,{checked:s.value.checkpointOptions.allowEmpty,"onUpdate:checked":a[0]||(a[0]=g=>s.value.checkpointOptions.allowEmpty=g),label:o.$t("sec.params.rules.refererBlock.sourceDomainCanBeEmpty")},null,8,["checked","label"])]),_:1},8,["label"]),d(c,{label:o.$t("sec.params.rules.refererBlock.sourceDomainMustMatch")},{default:p(()=>[d(l,{checked:s.value.checkpointOptions.allowSameDomain,"onUpdate:checked":a[1]||(a[1]=g=>s.value.checkpointOptions.allowSameDomain=g),label:o.$t("sec.params.rules.refererBlock.sourceDomainMustMatch")},null,8,["checked","label"])]),_:1},8,["label"]),d(c,{label:o.$t("sec.params.rules.refererBlock.allowedSourceDomains")},{default:p(()=>[d(f,{value:s.value.checkpointOptions.allowDomains,"onUpdate:value":a[2]||(a[2]=g=>s.value.checkpointOptions.allowDomains=g)},null,8,["value"])]),_:1},8,["label"]),d(c,{label:o.$t("sec.params.rules.refererBlock.blockedSourceDomains")},{default:p(()=>[d(f,{value:s.value.checkpointOptions.denyDomains,"onUpdate:value":a[3]||(a[3]=g=>s.value.checkpointOptions.denyDomains=g)},null,8,["value"])]),_:1},8,["label"]),d(l,{checked:s.value.checkpointOptions.checkOrigin,"onUpdate:checked":a[4]||(a[4]=g=>s.value.checkpointOptions.checkOrigin=g),label:o.$t("sec.params.rules.refererBlock.checkOriginSimultaneously")},null,8,["checked","label"])]),_:1})}}}),BR=ce(ER,[["__scopeId","data-v-71f7117a"]]),ZR=Object.freeze(Object.defineProperty({__proto__:null,default:BR},Symbol.toStringTag,{value:"Module"})),zR="${remoteAddr}",HR=ae({name:"RemoteAddr",__name:"remote-addr",props:{data:{}},setup(i,{expose:e}){const t={id:0,isOn:!0,param:"${remoteAddr}",paramFilters:[],operator:"not match",value:"12",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:null,description:""},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.param;zR===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>(L(),W(Pp,{value:s.value,"onUpdate:value":a[0]||(a[0]=l=>s.value=l)},null,8,["value"]))}}),XR=ce(HR,[["__scopeId","data-v-1c4c67d5"]]),jR=Object.freeze(Object.defineProperty({__proto__:null,default:XR},Symbol.toStringTag,{value:"Module"})),VR="${requestGeneralHeaderLength}",FR=ae({name:"RequestGeneralHeaderLength",__name:"request-general-header-length",props:{data:{}},setup(i,{expose:e}){const t={id:0,isOn:!0,param:"${requestGeneralHeaderLength}",paramFilters:[],operator:"match",value:"",isCaseInsensitive:!0,isComposed:!0,checkpointOptions:{headers:["Cache-Control","Connection","Date","Pragma","Trailer","Transfer-Encoding","Upgrade","Via","Warning"],length:128},description:""},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.param;VR===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Wt,c=ve,f=Ut,h=Re;return L(),W(h,null,{default:p(()=>[d(c,{label:o.$t("sec.params.rules.requestGeneralHeaderLength.commonHeaderList")},{default:p(()=>[d(l,{value:s.value.checkpointOptions.headers,"onUpdate:value":a[0]||(a[0]=g=>s.value.checkpointOptions.headers=g)},null,8,["value"])]),_:1},8,["label"]),d(c,{label:o.$t("sec.params.rules.requestGeneralHeaderLength.headerValueTooLong")},{default:p(()=>[d(f,{value:s.value.checkpointOptions.length,"onUpdate:value":a[1]||(a[1]=g=>s.value.checkpointOptions.length=g),"show-button":!1},null,8,["value"])]),_:1},8,["label"])]),_:1})}}}),WR=ce(FR,[["__scopeId","data-v-f03c6396"]]),YR=Object.freeze(Object.defineProperty({__proto__:null,default:WR},Symbol.toStringTag,{value:"Module"})),GR={class:"flex gap-1 items-center justify-center"},JR="${cc2}",KR=ae({name:"WafCcConfig",__name:"waf-cc-config",props:{data:{}},setup(i,{expose:e}){const t={id:0,isOn:!0,param:"${cc2}",paramFilters:[],operator:"gt",value:"1000",isCaseInsensitive:!0,isComposed:!1,checkpointOptions:{enableFingerprint:!0,ignoreCommonFiles:!0,keys:["${remoteAddr}","${requestURI}"],period:60,threshold:1e3},description:""},n=i,s=B(t),o=B(null),a=J(()=>[{label:u("sec.params.rules.cc.remoteAddr.label"),value:"${remoteAddr}",remark:u("sec.params.rules.cc.remoteAddr.remark")},{label:u("sec.params.rules.cc.rawRemoteAddr.label"),value:"${rawRemoteAddr}",remark:u("sec.params.rules.cc.rawRemoteAddr.remark")},{label:u("sec.params.rules.cc.remoteUser.label"),value:"${remoteUser}",remark:u("sec.params.rules.cc.remoteUser.remark")},{label:u("sec.params.rules.cc.requestPath.label"),value:"${requestPath}",remark:u("sec.params.rules.cc.requestPath.remark")},{label:u("sec.params.rules.cc.requestURI.label"),value:"${requestURI}",remark:u("sec.params.rules.cc.requestURI.remark")},{label:u("sec.params.rules.cc.requestURL.label"),value:"${requestURL}",remark:u("sec.params.rules.cc.requestURL.remark")},{label:u("sec.params.rules.cc.requestMethod.label"),value:"${requestMethod}",remark:u("sec.params.rules.cc.requestMethod.remark")},{label:u("sec.params.rules.cc.scheme.label"),value:"${scheme}",remark:u("sec.params.rules.cc.scheme.remark")},{label:u("sec.params.rules.cc.requestPathExtension.label"),value:"${requestPathExtension}",remark:u("sec.params.rules.cc.requestPathExtension.remark")},{label:u("sec.params.rules.cc.requestPathLowerExtension.label"),value:"${requestPathLowerExtension}",remark:u("sec.params.rules.cc.requestPathLowerExtension.remark")},{label:u("sec.params.rules.cc.host.label"),value:"${host}",remark:u("sec.params.rules.cc.host.remark")},{label:u("sec.params.rules.cc.proto.label"),value:"${proto}",remark:u("sec.params.rules.cc.proto.remark")},{label:u("sec.params.rules.cc.referer.label"),value:"${referer}",remark:u("sec.params.rules.cc.referer.remark")},{label:u("sec.params.rules.cc.referer_host.label"),value:"${referer.host}",remark:u("sec.params.rules.cc.referer_host.remark")},{label:u("sec.params.rules.cc.status.label"),value:"${status}",remark:u("sec.params.rules.cc.status.remark")},{label:u("sec.params.rules.cc.response_contentType.label"),value:"${response.contentType}",remark:u("sec.params.rules.cc.response_contentType.remark")}]),l=g=>cn($O,{trigger:"hover"},{trigger:()=>cn("span",g.label),default:()=>g.remark}),c={"checkpointOptions.period":{trigger:["change"],required:!0,validator:(g,v)=>v==null?new Error(u("sec.params.rules.cc.periodCannotBeEmpty")):isNaN(v)?new Error(u("sec.params.rules.cc.periodMustBeNumber")):!0},"checkpointOptions.threshold":{trigger:["change"],required:!0,validator:(g,v)=>v==null?new Error(u("sec.params.rules.cc.thresholdCannotBeEmpty")):isNaN(v)?new Error(u("sec.params.rules.cc.thresholdMustBeNumber")):!0},"checkpointOptions.keys":{trigger:["change"],required:!0,validator:(g,v)=>!v||v.length===0?new Error(u("sec.params.rules.cc.atLeastOneParam")):!0}},f=()=>{var g;(g=window.$dialog)==null||g.info({title:u("sec.params.rules.cc.systemHelp"),content:()=>d("div",{class:"text-sm space-y-5 leading-relaxed"},[d("div",{class:"bg-yellow-50 border border-yellow-200 text-yellow-700 px-3 py-2 rounded"},[X("⚠️ "),u("sec.params.rules.cc.specialParamHint")]),d("section",null,[d("div",{class:"font-semibold text-gray-800 mb-1"},[u("sec.params.rules.cc.headerValue")]),d("div",{class:"bg-gray-50 rounded px-3 py-2"},[u("sec.params.rules.cc.singleHeaderValueExample"),d("code",{class:"text-blue-600"},["${header.User-Agent}"])])]),d("section",null,[d("div",{class:"font-semibold text-gray-800 mb-1"},[u("sec.params.rules.cc.cookieValue")]),d("div",{class:"bg-gray-50 rounded px-3 py-2"},[u("sec.params.rules.cc.singleCookieValueExample"),X(" "),d("code",{class:"text-blue-600"},["${cookie.sid}"])])]),d("section",null,[d("div",{class:"font-semibold text-gray-800 mb-1"},[u("sec.params.rules.cc.urlParamValue")]),d("div",{class:"bg-gray-50 rounded px-3 py-2"},[u("sec.params.rules.cc.singleUrlParamValueExample"),X(" "),d("code",{class:"text-blue-600"},["${arg.Param}"])])])])})};return Zn(()=>{if(n.data){const g=n.data.param;JR===g?s.value=tt(n.data):s.value=tt(t)}}),e({model:s,verifyModel:async()=>{var g;try{return await((g=o.value)==null?void 0:g.validate()),!0}catch{return!1}}}),(g,v)=>{const O=_e,y=ft,S=ve,w=Ut,_=Te,$=tn,A=et,R=Re;return L(),W(R,{ref_key:"formRef",ref:o,model:s.value,rules:c},{default:p(()=>[d(S,{path:"checkpointOptions.keys"},{label:p(()=>[U("div",GR,[U("div",null,Q(C(u)("sec.params.rules.cc.statObjectCombination")),1),U("div",{class:"cursor-pointer",onClick:f},[d(O,{"local-icon":"stash--question-solid",class:"text-[16px]"})])])]),default:p(()=>[d(y,{value:s.value.checkpointOptions.keys,"onUpdate:value":v[0]||(v[0]=k=>s.value.checkpointOptions.keys=k),filterable:"",multiple:"",tag:"",options:a.value,"render-label":l},null,8,["value","options"])]),_:1}),d(S,{label:C(u)("sec.params.rules.cc.periodicStatistics"),path:"checkpointOptions.period"},{default:p(()=>[d($,null,{default:p(()=>[d(w,{value:s.value.checkpointOptions.period,"onUpdate:value":v[1]||(v[1]=k=>s.value.checkpointOptions.period=k),"show-button":!1},null,8,["value"]),d(_,null,{default:p(()=>[X(Q(C(u)("sec.params.rules.cc.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(S,{label:C(u)("sec.params.rules.cc.threshold"),path:"checkpointOptions.threshold"},{default:p(()=>[d(w,{value:s.value.checkpointOptions.threshold,"onUpdate:value":v[2]||(v[2]=k=>s.value.checkpointOptions.threshold=k),"show-button":!1},null,8,["value"])]),_:1},8,["label"]),d(S,{label:C(u)("sec.params.rules.cc.checkRequestFingerprint")},{default:p(()=>[d(A,{checked:s.value.checkpointOptions.enableFingerprint,"onUpdate:checked":v[3]||(v[3]=k=>s.value.checkpointOptions.enableFingerprint=k),label:C(u)("sec.params.rules.cc.checkRequestFingerprintHint")},null,8,["checked","label"])]),_:1},8,["label"]),d(S,{label:C(u)("sec.params.rules.cc.ignoreCommonFiles")},{default:p(()=>[d(A,{checked:s.value.checkpointOptions.ignoreCommonFiles,"onUpdate:checked":v[4]||(v[4]=k=>s.value.checkpointOptions.ignoreCommonFiles=k),label:C(u)("sec.params.rules.cc.ignoreCommonFilesHint")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),eI=ce(KR,[["__scopeId","data-v-a1043ead"]]),tI=Object.freeze(Object.defineProperty({__proto__:null,default:eI},Symbol.toStringTag,{value:"Module"})),nI=ae({name:"AddRulesDrawer",__name:"add-rules-drawer",props:Be({data:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["updateRules"],["update:visible"]),setup(i,{emit:e}){var A;const t=e,n=B(),s=qe("checkpoints"),o=J(()=>{const R=[{type:"group",name:u("sec.wafConfig.special"),key:"general",whateverChildren:[]},{type:"group",name:u("sec.wafConfig.general"),key:"special",whateverChildren:[]}];function k(T){["requestGeneralHeaderLength","refererBlock","cc2"].includes(T.prefix)?R[0].whateverChildren.push(T):R[1].whateverChildren.push(T)}const x=(s==null?void 0:s.value)??[];for(let T=0;T<x.length;T+=1)k(x[T]);return R}),a={id:0,isOn:!0,param:"${requestGeneralHeaderLength}",paramFilters:[],operator:"match",value:"",isCaseInsensitive:!0,isComposed:!0,checkpointOptions:{headers:["Cache-Control","Connection","Date","Pragma","Trailer","Transfer-Encoding","Upgrade","Via","Warning"],length:128},description:""},l=i,c=B(a),f=B("${requestGeneralHeaderLength}"),h=Ze(i,"visible"),g=J(()=>{const R=s==null?void 0:s.value.findIndex(k=>k.value===f.value);if(R)return s==null?void 0:s.value[R].description}),v=Object.assign({"./rules/common-rules.vue":NR,"./rules/raw-remote-addr.vue":DR,"./rules/referer-block.vue":ZR,"./rules/remote-addr.vue":jR,"./rules/request-general-header-length.vue":YR,"./rules/waf-cc-config.vue":tI}),O={};for(const R in v){const k=((A=R.split("/").pop())==null?void 0:A.replace(".vue",""))||"";O[k]=v[R].default}const y=J(()=>{if(s){const R=s.value.find(k=>k.value===f.value);return O[R.commponent??"common-rules"]}return O["request-general-header-length"]});function S(R){if(R.includes(".")){const[k,x]=R.split(".");return{before:k,after:x}}else return{before:R,after:null}}const w=R=>{const k=R.match(/\$\{(.+?)\}/);if(k){const x=s==null?void 0:s.value.find(T=>T.prefix===S(k[1]).before);return x==null?void 0:x.value}return"null"},_=async()=>{var M,N,I;let R=!0;if((M=n.value)!=null&&M.verifyModel&&(R=await n.value.verifyModel()),!R)return;const{param:k,paramMap:x,...T}=(N=n.value)==null?void 0:N.model;t("updateRules",(I=n.value)==null?void 0:I.model),h.value=!1},$=J(()=>l.data.type==="edit"?u("sec.wafConfig.editWAFRule"):u("sec.wafConfig.createWAFRule"));return je(()=>h.value,R=>{R&&l.data.type==="edit"&&l.data.data?(c.value=tt(l.data.data),f.value=w(c.value.param)):(c.value=tt(a),f.value="${requestGeneralHeaderLength}")}),(R,k)=>{const x=_e,T=ft,M=ve,N=Re,I=Te,q=re,z=ze,H=Pt;return L(),W(H,{show:h.value,"onUpdate:show":k[3]||(k[3]=F=>h.value=F)},{default:p(()=>[d(z,{style:{width:"480px"},title:$.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:k[0]||(k[0]=()=>h.value=!1)},[d(x,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(q,{justify:"center"},{default:p(()=>[d(I,{class:"px-6",type:"info",onClick:_},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1}),d(I,{class:"button-default px-6",onClick:k[2]||(k[2]=()=>h.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(N,{style:{"max-height":"260px","overflow-y":"auto"},class:"p-1"},{default:p(()=>[d(M,{label:C(u)("sec.wafConfig.parameters"),feedback:g.value,class:"mb-2"},{default:p(()=>[d(T,{value:f.value,"onUpdate:value":k[1]||(k[1]=F=>f.value=F),"label-field":"name","value-field":"value","children-field":"whateverChildren",filterable:"",options:o.value},null,8,["value","options"])]),_:1},8,["label","feedback"]),(L(),W(yn(y.value),{ref_key:"childRef",ref:n,data:c.value,"param-type":f.value},null,8,["data","param-type"]))]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),sI=ce(nI,[["__scopeId","data-v-7e5c52a5"]]),iI={class:"flex items-center justify-center gap-0.5"},oI=["onClick"],aI=["onClick"],lI=ae({name:"RulesLists",__name:"rules-lists",props:{value:{default:()=>[]},valueModifiers:{}},emits:["update:value"],setup(i){const e=B(!1),t=Ze(i,"value"),n=B({index:0,type:"add"}),s=qe("checkpointName",()=>"null"),o=()=>{n.value.type="add",e.value=!0},a=(f,h)=>{n.value.type="edit",n.value.index=f,n.value.data={...h},e.value=!0},l=f=>{t.value.splice(f,1)},c=f=>{n.value.type==="edit"?t.value[n.value.index]={...f}:t.value.push({...f})};return(f,h)=>{const g=_e,v=re,O=Te;return L(),te(Ce,null,[d(v,{vertical:""},{default:p(()=>[d(v,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(t.value,(y,S)=>(L(),te("div",{key:S,class:"flex items-center justify-center gap-2 border rounded-xl px-3 py-1 text-xs"},[U("div",null,[U("span",null,Q(C(s)(y.param))+" "+Q(y.param),1)]),U("div",iI,[U("div",null,[U("span",{class:"cursor-pointer",onClick:w=>a(S,y)},[d(g,{"local-icon":"mdi--edit",class:"text-[14px]"})],8,oI)]),U("div",null,[U("span",{class:"cursor-pointer",onClick:w=>l(S)},[d(g,{"local-icon":"qlementine-icons--close-12",class:"text-[16px]"})],8,aI)])])]))),128))]),_:1}),d(O,{dashed:"",onClick:h[0]||(h[0]=()=>o())},{default:p(()=>h[2]||(h[2]=[X("+")])),_:1})]),_:1}),d(sI,{visible:e.value,"onUpdate:visible":h[1]||(h[1]=y=>e.value=y),data:n.value,onUpdateRules:c},null,8,["visible","data"])],64)}}}),rI=ce(lI,[["__scopeId","data-v-d58139ae"]]),cI=ae({name:"AllowAction",__name:"allow-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"allow",name:"允许通过",options:{scope:"group"}},n=i,s=B(t);Zn(()=>{if(n.data){const a=n.data.code;t.code===a?s.value=tt(n.data):s.value=tt(t)}});const o=J(()=>[{label:u("sec.params.actions.allow.group"),value:"group"},{label:u("sec.params.actions.allow.server"),value:"server"},{label:u("sec.params.actions.allow.server_set"),value:""}]);return e({model:s}),(a,l)=>{const c=ft,f=ve,h=Re;return L(),W(h,null,{default:p(()=>[d(f,{label:C(u)("sec.params.actions.allow.label")},{default:p(()=>[d(c,{value:s.value.options.scope,"onUpdate:value":l[0]||(l[0]=g=>s.value.options.scope=g),options:o.value},null,8,["value","options"])]),_:1},8,["label"])]),_:1})}}}),dI=ce(cI,[["__scopeId","data-v-76f87fbe"]]),uI=Object.freeze(Object.defineProperty({__proto__:null,default:dI},Symbol.toStringTag,{value:"Module"})),fI=ae({name:"BlockAction",__name:"block-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"block",name:"阻止",options:{timeout:30,scope:"service",timeoutMax:30}},n=i,s=B(t),o=J(()=>[{label:u("sec.params.actions.block.global"),value:"global"},{label:u("sec.params.actions.block.service"),value:"service"}]);return Zn(()=>{if(n.data){const a=n.data.code;t.code===a?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(a,l)=>{const c=ft,f=ve,h=Ut,g=Ai,v=tn,O=Re;return L(),W(O,null,{default:p(()=>[d(f,{label:C(u)("sec.params.actions.block.banScope")},{default:p(()=>[d(c,{value:s.value.options.scope,"onUpdate:value":l[0]||(l[0]=y=>s.value.options.scope=y),options:o.value},null,8,["value","options"])]),_:1},8,["label"]),d(f,{label:C(u)("sec.params.actions.block.banDuration")},{default:p(()=>[d(v,null,{default:p(()=>[d(h,{value:s.value.options.timeout,"onUpdate:value":l[1]||(l[1]=y=>s.value.options.timeout=y),"show-button":!1},null,8,["value"]),d(g,null,{default:p(()=>[X(Q(C(u)("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(f,{label:C(u)("sec.params.actions.block.maxBanDuration")},{feedback:p(()=>[U("span",null,Q(C(u)("sec.params.actions.block.optionalBanHint")),1)]),default:p(()=>[d(v,null,{default:p(()=>[d(h,{value:s.value.options.timeoutMax,"onUpdate:value":l[2]||(l[2]=y=>s.value.options.timeoutMax=y),"show-button":!1},null,8,["value"]),d(g,null,{default:p(()=>[X(Q(C(u)("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})}}}),pI=ce(fI,[["__scopeId","data-v-3e7dad1d"]]),hI=Object.freeze(Object.defineProperty({__proto__:null,default:pI},Symbol.toStringTag,{value:"Module"})),mI=ae({name:"CaptchaAction",__name:"captcha-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,category:"verify",code:"captcha",name:"Captcha人机识别",options:{failBlockTimeout:0,life:0,maxFails:0}},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Ut,c=Te,f=tn,h=ve,g=Re;return L(),W(g,null,{default:p(()=>[d(h,{label:o.$t("sec.params.actions.captcha.validTime")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.life,"onUpdate:value":a[0]||(a[0]=v=>s.value.options.life=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(h,{label:o.$t("sec.params.actions.captcha.maxFailCount")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.maxFails,"onUpdate:value":a[1]||(a[1]=v=>s.value.options.maxFails=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.captcha.times")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(h,{label:o.$t("sec.params.actions.captcha.failBlockTime")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.failBlockTimeout,"onUpdate:value":a[2]||(a[2]=v=>s.value.options.failBlockTimeout=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})}}}),gI=ce(mI,[["__scopeId","data-v-abab79c9"]]),vI=Object.freeze(Object.defineProperty({__proto__:null,default:gI},Symbol.toStringTag,{value:"Module"})),bI=ae({name:"Get302Action",__name:"get-302-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"get_302",name:"GET 302",options:{life:null}},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Ut,c=tn,f=ve,h=Re;return L(),W(h,null,{default:p(()=>[d(f,{label:o.$t("sec.params.actions.captcha.validTime")},{default:p(()=>[d(c,null,{default:p(()=>[d(l,{value:s.value.options.life,"onUpdate:value":a[0]||(a[0]=g=>s.value.options.life=g),"show-button":!1},null,8,["value"])]),_:1})]),_:1},8,["label"])]),_:1})}}}),OI=ce(bI,[["__scopeId","data-v-03ad51dc"]]),CI=Object.freeze(Object.defineProperty({__proto__:null,default:OI},Symbol.toStringTag,{value:"Module"})),yI=ae({name:"JsCookieAction",__name:"js-cookie-action",props:{data:{}},setup(i,{expose:e}){const t={category:"verify",code:"js_cookie",name:"JS Cookie验证",options:{failBlockTimeout:0,life:0,maxFails:0},id:0},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Ut,c=Te,f=tn,h=ve,g=Re;return L(),W(g,null,{default:p(()=>[d(h,{label:o.$t("sec.params.actions.captcha.validTime")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.life,"onUpdate:value":a[0]||(a[0]=v=>s.value.options.life=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(h,{label:o.$t("sec.params.actions.captcha.maxFailCount")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.maxFails,"onUpdate:value":a[1]||(a[1]=v=>s.value.options.maxFails=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.captcha.times")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d(h,{label:o.$t("sec.params.actions.captcha.failBlockTime")},{default:p(()=>[d(f,null,{default:p(()=>[d(l,{value:s.value.options.failBlockTimeout,"onUpdate:value":a[2]||(a[2]=v=>s.value.options.failBlockTimeout=v),"show-button":!1},null,8,["value"]),d(c,null,{default:p(()=>[X(Q(o.$t("sec.params.actions.block.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})}}}),SI=ce(yI,[["__scopeId","data-v-8dff08c2"]]),_I=Object.freeze(Object.defineProperty({__proto__:null,default:SI},Symbol.toStringTag,{value:"Module"})),wI=ae({name:"LogAction",__name:"log-action",props:{data:{}},setup(i,{expose:e}){const t={category:"allow",code:"log",name:"允许并记录日志",options:{},id:0},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>(L(),te("div"))}}),kI=ce(wI,[["__scopeId","data-v-f2f04319"]]),xI=Object.freeze(Object.defineProperty({__proto__:null,default:kI},Symbol.toStringTag,{value:"Module"})),PI=ae({name:"PageAction",__name:"page-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"page",name:"显示网页",options:{useDefault:!1,status:403,body:`<!DOCTYPE html>
<html lang="en">
<head>
	<title>403 Forbidden</title>
	<style>
		address { line-height: 1.8; }
	</style>
</head>
<body>
<h1>403 Forbidden</h1>
<address>Connection: \${remoteAddr} (Client) -&gt; \${serverAddr} (Server)</address>
<address>Request ID: \${requestId}</address>
</body>
</html>`}},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=et,c=ve,f=Ut,h=Ne,g=Re;return L(),W(g,null,{default:p(()=>[d(c,{label:o.$t("sec.params.actions.useDefaultPrompt"),class:"mb-3"},{feedback:p(()=>[U("span",null,Q(o.$t("sec.params.actions.useDefaultPromptHint")),1)]),default:p(()=>[d(l,{checked:s.value.options.useDefault,"onUpdate:checked":a[0]||(a[0]=v=>s.value.options.useDefault=v)},null,8,["checked"])]),_:1},8,["label"]),s.value.options.useDefault?Xe("",!0):(L(),te(Ce,{key:0},[d(c,{label:o.$t("sec.params.actions.statusCode")},{default:p(()=>[d(f,{value:s.value.options.status,"onUpdate:value":a[1]||(a[1]=v=>s.value.options.status=v),"show-button":!1},null,8,["value"])]),_:1},8,["label"]),d(c,{label:o.$t("sec.params.actions.pageContent")},{default:p(()=>[d(h,{value:s.value.options.body,"onUpdate:value":a[2]||(a[2]=v=>s.value.options.body=v),type:"textarea",style:{minHeight:"300px"}},null,8,["value"])]),_:1},8,["label"])],64))]),_:1})}}}),$I=ce(PI,[["__scopeId","data-v-4d87b320"]]),TI=Object.freeze(Object.defineProperty({__proto__:null,default:$I},Symbol.toStringTag,{value:"Module"})),RI=ae({name:"Post307Action",__name:"post-307-action",props:{data:{}},setup(i,{expose:e}){const t={id:1,code:"post_307",name:"POST 307",options:{life:null}},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Ut,c=tn,f=ve,h=Re;return L(),W(h,null,{default:p(()=>[d(f,{label:o.$t("sec.params.actions.captcha.validTime")},{default:p(()=>[d(c,null,{default:p(()=>[d(l,{value:s.value.options.life,"onUpdate:value":a[0]||(a[0]=g=>s.value.options.life=g),"show-button":!1},null,8,["value"])]),_:1})]),_:1},8,["label"])]),_:1})}}}),II=ce(RI,[["__scopeId","data-v-ae820801"]]),QI=Object.freeze(Object.defineProperty({__proto__:null,default:II},Symbol.toStringTag,{value:"Module"})),AI=ae({name:"RedirectAction",__name:"redirect-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"redirect",name:"跳转",options:{status:307,url:""}},n=i,s=B(t);Zn(()=>{if(n.data){const a=n.data.code;t.code===a?s.value=tt(n.data):s.value=tt(t)}});const o=J(()=>[{label:"301 Moved Permanently",value:301},{label:"308 Permanent Redirect",value:308},{label:"302 Found",value:302},{label:"303 See Other",value:303},{label:"307 Temporary Redirect",value:307}]);return e({model:s}),(a,l)=>{const c=ft,f=ve,h=Ne,g=Re;return L(),W(g,null,{default:p(()=>[d(f,{label:a.$t("sec.params.actions.statusCode")},{default:p(()=>[d(c,{value:s.value.options.status,"onUpdate:value":l[0]||(l[0]=v=>s.value.options.status=v),options:o.value},null,8,["value","options"])]),_:1},8,["label"]),d(f,{label:a.$t("sec.params.actions.redirectToURL")},{default:p(()=>[d(h,{value:s.value.options.url,"onUpdate:value":l[1]||(l[1]=v=>s.value.options.url=v)},null,8,["value"])]),_:1},8,["label"])]),_:1})}}}),NI=ce(AI,[["__scopeId","data-v-fb36cc51"]]),MI=Object.freeze(Object.defineProperty({__proto__:null,default:NI},Symbol.toStringTag,{value:"Module"})),LI=ae({name:"TagAction",__name:"tag-action",props:{data:{}},setup(i,{expose:e}){const t={id:0,code:"tag",name:"标签",options:{tags:[]}},n=i,s=B(t);return Zn(()=>{if(n.data){const o=n.data.code;t.code===o?s.value=tt(n.data):s.value=tt(t)}}),e({model:s}),(o,a)=>{const l=Wt,c=ve,f=Re;return L(),W(f,null,{default:p(()=>[d(c,{label:o.$t("sec.params.actions.tags")},{default:p(()=>[d(l,{value:s.value.options.tags,"onUpdate:value":a[0]||(a[0]=h=>s.value.options.tags=h)},null,8,["value"])]),_:1},8,["label"])]),_:1})}}}),UI=ce(LI,[["__scopeId","data-v-e25c1e39"]]),DI=Object.freeze(Object.defineProperty({__proto__:null,default:UI},Symbol.toStringTag,{value:"Module"})),qI=ae({name:"AddActionsDrawer",__name:"add-actions-drawer",props:Be({data:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["updateActions"],["update:visible"]),setup(i,{emit:e}){var S;const t=i,n=Ze(i,"visible"),s=e,o=qe("actions"),a=B(),l={id:0,code:"page",name:"显示网页",options:{useDefault:!1,status:403,body:`<!DOCTYPE html>
<html lang="en">
<head>
	<title>403 Forbidden</title>
	<style>
		address { line-height: 1.8; }
	</style>
</head>
<body>
<h1>403 Forbidden</h1>
<address>Connection: \${remoteAddr} (Client) -&gt; \${serverAddr} (Server)</address>
<address>Request ID: \${requestId}</address>
</body>
</html>`}},c=B(l),f=B("page"),h=Object.assign({"./actions/allow-action.vue":uI,"./actions/block-action.vue":hI,"./actions/captcha-action.vue":vI,"./actions/get-302-action.vue":CI,"./actions/js-cookie-action.vue":_I,"./actions/log-action.vue":xI,"./actions/page-action.vue":TI,"./actions/post-307-action.vue":QI,"./actions/redirect-action.vue":MI,"./actions/tag-action.vue":DI}),g={};for(const w in h){const _=((S=w.split("/").pop())==null?void 0:S.replace(".vue",""))||"";g[_]=h[w].default}const v=J(()=>{if(o){const w=o.value.find(_=>_.code===f.value);return g[w.commponent]}return g["page-action"]}),O=()=>{var w;s("updateActions",(w=a.value)==null?void 0:w.model),n.value=!1},y=J(()=>t.data.type==="edit"?u("sec.wafConfig.editAction"):u("sec.wafConfig.createAction"));return je(()=>n.value,w=>{w&&t.data.type==="edit"&&t.data.data?(c.value=tt(t.data.data),f.value=c.value.code):(c.value=tt(l),f.value="page")}),(w,_)=>{const $=_e,A=ft,R=ve,k=Re,x=Te,T=re,M=ze,N=Pt;return L(),W(N,{show:n.value,"onUpdate:show":_[3]||(_[3]=I=>n.value=I)},{default:p(()=>[d(M,{style:{width:"480px"},title:y.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:_[0]||(_[0]=()=>n.value=!1)},[d($,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(T,{justify:"center"},{default:p(()=>[d(x,{class:"px-6",type:"info",onClick:O},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1}),d(x,{class:"button-default px-6",onClick:_[2]||(_[2]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(k,{style:{"max-height":"280px","overflow-y":"auto"},class:"px-2"},{default:p(()=>[d(R,{label:C(u)("sec.wafConfig.actionType")},{default:p(()=>[d(A,{value:f.value,"onUpdate:value":_[1]||(_[1]=I=>f.value=I),options:C(o),"label-field":"name","value-field":"code","default-value":"page"},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:a,data:c.value},null,8,["data"]))]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),EI=ce(qI,[["__scopeId","data-v-d8b4c517"]]),BI={class:"ml-2 flex flex items-center justify-center gap-1 text-gray-500"},ZI=["onClick"],zI=["onClick"],HI={class:"drag-handle cursor-pointer text-sm"},XI=ae({name:"ActionsLists",__name:"actions-lists",props:{value:{default:()=>[]},valueModifiers:{}},emits:["update:value"],setup(i){const e=Ze(i,"value"),t=B({index:0,type:"add"}),n=B(!1),s=()=>{t.value.type="add",n.value=!0},o=(c,f)=>{t.value.type="edit",t.value.index=c,t.value.data={...f},n.value=!0},a=c=>{e.value.splice(c,1)},l=c=>{t.value.type==="edit"?e.value[t.value.index]={...c}:e.value.push({...c})};return(c,f)=>{const h=_e,g=re,v=Te;return L(),te(Ce,null,[d(g,{vertical:""},{default:p(()=>[d(g,null,{default:p(()=>[d(C(Sa),{modelValue:e.value,"onUpdate:modelValue":f[0]||(f[0]=O=>e.value=O),"item-key":"item","force-fallback":!0,handle:".drag-handle",animation:"200",class:"flex flex-wrap select-none gap-2"},{item:p(({element:O,index:y})=>[(L(),te("div",{key:y,class:"drag-handle flex cursor-pointer items-center border border rounded-xl px-3 py-0.5 text-[10px] shadow-sm"},[U("span",null,Q(O.code),1),U("div",BI,[U("span",{class:"cursor-pointer text-sm",onClick:S=>o(y,O)},[d(h,{"local-icon":"grommet-icons--edit",class:"text-[10px]"})],8,ZI),U("span",{class:"cursor-pointer text-sm",onClick:S=>a(y)},[d(h,{"local-icon":"material-symbols--close-rounded"})],8,zI),U("span",HI,[d(h,{"local-icon":"material-symbols--menu"})])])]))]),_:1},8,["modelValue"])]),_:1}),d(v,{dashed:"",onClick:s},{default:p(()=>f[2]||(f[2]=[X("+")])),_:1})]),_:1}),d(EI,{visible:n.value,"onUpdate:visible":f[1]||(f[1]=O=>n.value=O),data:t.value,onUpdateActions:l},null,8,["visible","data"])],64)}}}),jI=ce(XI,[["__scopeId","data-v-a3ccc25e"]]),VI=ae({name:"SetPopupDrawer",__name:"set-popup-drawer",props:Be({editSetMpdal:{},groupId:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["getData"],["update:visible"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=e,s=i,o=fe({id:0,isOn:!1,name:"",code:"",description:"",connector:"or",ruleRefs:[],rules:[],ignoreLocal:!1,ignoreSearchEngine:!1,actions:[]}),a=B(!1),l=async()=>{const v={setId:o.id,name:o.name,connector:o.connector,rulesJSON:JSON.stringify(o.rules),actionsJSON:JSON.stringify(o.actions)};o.ignoreLocal&&(v.ignoreLocal=1),o.ignoreSearchEngine&&(v.ignoreSearchEngine=1);const{error:O}=await Ee(v,"/servers/components/waf/updateSetPopup");O||n("getData"),a.value=!1,t.value=!1},c=async()=>{const{error:v}=await Ee({groupId:s.groupId,name:o.name,rulesJSON:JSON.stringify(o.rules),actionsJSON:JSON.stringify(o.actions),connector:o.connector},"/servers/components/waf/createSetPopup");v||n("getData"),a.value=!1,t.value=!1},f=()=>{var v,O,y;return!o.name||o.name.trim()===""?((v=window.$message)==null||v.error("名称不能为空"),!1):!Array.isArray(o.rules)||o.rules.length===0?((O=window.$message)==null||O.error("规则不能为空"),!1):!Array.isArray(o.actions)||o.actions.length===0?((y=window.$message)==null||y.error("动作不能为空"),!1):!0},h=()=>{f()&&(a.value=!0,s.editSetMpdal.type==="edit"?l():c())},g=J(()=>[{label:u("sec.wafConfig.and"),value:"and"},{label:u("sec.wafConfig.or"),value:"or"}]);return je(()=>t.value,v=>{const O=s.editSetMpdal.type;v&&O==="edit"?Object.assign(o,tt(s.editSetMpdal.data)):Object.assign(o,tt({id:0,isOn:!1,name:"",code:"",description:"",connector:"or",ruleRefs:[],rules:[],ignoreLocal:!1,ignoreSearchEngine:!1,actions:[]}))}),(v,O)=>{const y=_e,S=Ne,w=ve,_=ft,$=et,A=Re,R=nt,k=Te,x=re,T=ze,M=Pt;return L(),W(M,{show:t.value,"onUpdate:show":O[8]||(O[8]=N=>t.value=N)},{default:p(()=>[d(T,{style:{width:"460px"},title:C(u)("sec.wafConfig.addRule"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:O[0]||(O[0]=()=>t.value=!1)},[d(y,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(x,{justify:"center"},{default:p(()=>[d(k,{class:"px-6",type:"info",disabled:a.value,onClick:h},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(k,{class:"button-default px-6",onClick:O[7]||(O[7]=()=>t.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(R,{show:a.value},{default:p(()=>[d(A,{style:{"max-height":"260px","overflow-y":"auto"},class:"px-2"},{default:p(()=>[d(w,{label:C(u)("sec.wafConfig.ruleSetName"),"show-require-mark":""},{default:p(()=>[d(S,{value:o.name,"onUpdate:value":O[1]||(O[1]=N=>o.name=N),placeholder:C(u)("sec.wafConfig.ruleSetPurpose")},null,8,["value","placeholder"])]),_:1},8,["label"]),d(w,{label:C(u)("sec.wafConfig.rule"),"show-require-mark":""},{default:p(()=>[d(rI,{value:o.rules,"onUpdate:value":O[2]||(O[2]=N=>o.rules=N)},null,8,["value"])]),_:1},8,["label"]),Zt(d(w,{label:C(u)("sec.wafConfig.ruleRelationBetween")},{feedback:p(()=>[U("span",null,Q(C(u)("sec.wafConfig.allRulesRequired")),1)]),default:p(()=>[d(_,{value:o.connector,"onUpdate:value":O[3]||(O[3]=N=>o.connector=N),options:g.value,"default-value":"and"},null,8,["value","options"])]),_:1},8,["label"]),[[zt,o.rules.length>1]]),d(w,{label:C(u)("sec.wafConfig.executeAction"),"show-require-mark":""},{default:p(()=>[d(jI,{value:o.actions,"onUpdate:value":O[4]||(O[4]=N=>o.actions=N)},null,8,["value"])]),_:1},8,["label"]),d(w,{label:C(u)("sec.wafConfig.allowLanIP")},{default:p(()=>[d($,{checked:o.ignoreLocal,"onUpdate:checked":O[5]||(O[5]=N=>o.ignoreLocal=N),label:C(u)("sec.wafConfig.skipIfLanIP")},null,8,["checked","label"])]),_:1},8,["label"]),d(w,{label:C(u)("sec.wafConfig.allowSearchEngine")},{default:p(()=>[d($,{checked:o.ignoreSearchEngine,"onUpdate:checked":O[6]||(O[6]=N=>o.ignoreSearchEngine=N),label:C(u)("sec.wafConfig.skipIfSearchEngine")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),FI=ce(VI,[["__scopeId","data-v-0064ecf4"]]),WI={style:{width:"100px"}},YI={key:0},GI={key:1},JI={style:{width:"100px"}},KI={key:0},e8={key:1},t8={style:{width:"100px"}};function n8(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const s8=ae({name:"InfoContent",__name:"info-content",props:Be({id:{},type:{}},{visible:{default:!1},visibleModifiers:{},data:{default:()=>({canDelete:!1,code:"",countSets:0,description:"",id:0,isOn:!1,name:""})},dataModifiers:{}}),emits:["update:visible","update:data"],setup(i){const e=Ze(i,"visible"),t=B(!1),n=i,s=B(!1),o=B(!1),a=fe({type:"add",data:null}),l=B(!1),c=qe("serverId",B("0")),f=B(null),h=fe({firewallPolicyId:0,type:"",group:{id:0,isOn:!1,name:"",description:"",code:"",setRefs:null,sets:null,isTemplate:!1}}),g=Ze(i,"data"),v=async()=>{var z;l.value=!0;const I={groupId:g.value.id,name:g.value.name,description:g.value.description};g.value.isOn&&(I.isOn=1);const{error:q}=await Ee(I,"/servers/components/waf/updateGroupPopup");q?g.value=tt(f.value):((z=window.$message)==null||z.success(u("common.msgSync")),f.value=tt(g.value))},O=I=>{I?!vR(f.value,g.value)&&v():f.value=tt(g.value),s.value=!I,l.value=!1},y=async()=>{t.value=!0;const I="/servers/server/settings/waf/group",{data:q,error:z}=await ht(I,{serverId:c.value,firewallPolicyId:n.id,type:n.type,groupId:g.value.id});if(!z){const{firewallPolicyId:H,type:F,group:V}=q;Object.assign(h,{firewallPolicyId:H,type:F,group:V})}t.value=!1},S=async()=>{var z;t.value=!0;const I=new URLSearchParams;if(I.append("groupId",g.value.id.toString()),h.group.sets)for(let H=0;H<h.group.sets.length;H+=1)I.append("setIds",h.group.sets[H].id.toString());const{error:q}=await oo(I.toString(),"/servers/components/waf/sortSets");q||(z=window.$message)==null||z.success(u("common.msgSync")),t.value=!1},w=J(()=>[{code:"page",description:u("sec.actions.page.description"),name:u("sec.actions.page.name"),commponent:"page-action"},{code:"block",description:u("sec.actions.block.description"),name:u("sec.actions.block.name"),commponent:"block-action"},{code:"captcha",description:u("sec.actions.captcha.description"),name:u("sec.actions.captcha.name"),commponent:"captcha-action"},{code:"js_cookie",description:u("sec.actions.js_cookie.description"),name:u("sec.actions.js_cookie.name"),commponent:"js-cookie-action"},{code:"redirect",description:u("sec.actions.redirect.description"),name:u("sec.actions.redirect.name"),commponent:"redirect-action"},{code:"allow",description:u("sec.actions.allow.description"),name:u("sec.actions.allow.name"),commponent:"allow-action"},{code:"log",description:u("sec.actions.log.description"),name:u("sec.actions.log.name"),commponent:"log-action"},{code:"tag",description:u("sec.actions.tag.description"),name:u("sec.actions.tag.name"),commponent:"tag-action"},{code:"get_302",description:u("sec.actions.get_302.description"),name:u("sec.actions.get_302.name"),commponent:"get-302-action"},{code:"post_307",description:u("sec.actions.post_307.description"),name:u("sec.actions.post_307.name"),commponent:"post-307-action"}]),_=I=>w.value.find(q=>q.code===I);function $(I){if(I.includes(".")){const[q,z]=I.split(".");return{before:q,after:z}}else return{before:I,after:null}}const A=J(()=>[{dataType:"",description:u("sec.checkpoints.requestGeneralHeaderLength.description"),hasParams:!1,isComposed:!0,name:u("sec.checkpoints.requestGeneralHeaderLength.name"),options:null,params:null,prefix:"requestGeneralHeaderLength",value:"${requestGeneralHeaderLength}",commponent:"request-general-header-length"},{dataType:"",description:u("sec.checkpoints.remoteAddr.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.remoteAddr.name"),options:null,params:null,prefix:"remoteAddr",value:"${remoteAddr}",commponent:"remote-addr"},{dataType:"",description:u("sec.checkpoints.rawRemoteAddr.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.rawRemoteAddr.name"),options:null,params:null,prefix:"rawRemoteAddr",value:"${rawRemoteAddr}",commponent:"raw-remote-addr"},{dataType:"",description:u("sec.checkpoints.remotePort.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.remotePort.name"),options:null,params:null,prefix:"remotePort",value:"${remotePort}"},{dataType:"",description:u("sec.checkpoints.remoteUser.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.remoteUser.name"),options:null,params:null,prefix:"remoteUser",value:"${remoteUser}"},{dataType:"",description:u("sec.checkpoints.requestURI.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestURI.name"),options:null,params:null,prefix:"requestURI",value:"${requestURI}"},{dataType:"",description:u("sec.checkpoints.requestPath.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestPath.name"),options:null,params:null,prefix:"requestPath",value:"${requestPath}"},{dataType:"",description:u("sec.checkpoints.requestURL.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestURL.name"),options:null,params:null,prefix:"requestURL",value:"${requestURL}"},{dataType:"",description:u("sec.checkpoints.requestLength.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestLength.name"),options:null,params:null,prefix:"requestLength",value:"${requestLength}"},{dataType:"",description:u("sec.checkpoints.requestBody.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestBody.name"),options:null,params:null,prefix:"requestBody",value:"${requestBody}"},{dataType:"",description:u("sec.checkpoints.requestAll.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestAll.name"),options:null,params:null,prefix:"requestAll",value:"${requestAll}"},{dataType:"",description:u("sec.checkpoints.requestForm.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.requestForm.name"),options:null,params:null,prefix:"requestForm",value:"${requestForm}"},{dataType:"",description:u("sec.checkpoints.requestUpload.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.requestUpload.name"),options:null,params:[{name:"最小文件尺寸",value:"minSize"},{name:"最大文件尺寸",value:"maxSize"},{name:"扩展名(如.txt)",value:"ext"},{name:"原始文件名",value:"name"},{name:"表单字段名",value:"field"}],prefix:"requestUpload",value:"${requestUpload}"},{dataType:"",description:u("sec.checkpoints.requestJSON.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.requestJSON.name"),options:null,params:null,prefix:"requestJSON",value:"${requestJSON}"},{dataType:"",description:u("sec.checkpoints.requestMethod.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.requestMethod.name"),options:null,params:null,prefix:"requestMethod",value:"${requestMethod}"},{dataType:"",description:u("sec.checkpoints.scheme.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.scheme.name"),options:null,params:null,prefix:"scheme",value:"${scheme}"},{dataType:"",description:u("sec.checkpoints.proto.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.proto.name"),options:null,params:null,prefix:"proto",value:"${proto}"},{dataType:"",description:u("sec.checkpoints.host.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.host.name"),options:null,params:null,prefix:"host",value:"${host}"},{dataType:"",description:u("sec.checkpoints.cname.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.cname.name"),options:null,params:null,prefix:"cname",value:"${cname}"},{dataType:"bool",description:u("sec.checkpoints.isCNAME.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.isCNAME.name"),options:null,params:null,prefix:"isCNAME",value:"${isCNAME}"},{dataType:"",description:u("sec.checkpoints.refererOrigin.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.refererOrigin.name"),options:null,params:null,prefix:"refererOrigin",value:"${refererOrigin}"},{dataType:"",description:u("sec.checkpoints.referer.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.referer.name"),options:null,params:null,prefix:"referer",value:"${referer}"},{dataType:"",description:u("sec.checkpoints.userAgent.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.userAgent.name"),options:null,params:null,prefix:"userAgent",value:"${userAgent}"},{dataType:"",description:u("sec.checkpoints.contentType.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.contentType.name"),options:null,params:null,prefix:"contentType",value:"${contentType}"},{dataType:"",description:u("sec.checkpoints.cookies.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.cookies.name"),options:null,params:null,prefix:"cookies",value:"${cookies}"},{dataType:"",description:u("sec.checkpoints.cookie.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.cookie.name"),options:null,params:null,prefix:"cookie",value:"${cookie}"},{dataType:"",description:u("sec.checkpoints.args.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.args.name"),options:null,params:null,prefix:"args",value:"${args}"},{dataType:"",description:u("sec.checkpoints.arg.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.arg.name"),options:null,params:null,prefix:"arg",value:"${arg}"},{dataType:"",description:u("sec.checkpoints.headers.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.headers.name"),options:null,params:null,prefix:"headers",value:"${headers}"},{dataType:"",description:u("sec.checkpoints.headerNames.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.headerNames.name"),options:null,params:null,prefix:"headerNames",value:"${headerNames}"},{dataType:"",description:u("sec.checkpoints.header.description"),hasParams:!0,isComposed:!1,name:u("sec.checkpoints.header.name"),options:null,params:null,prefix:"header",value:"${header}"},{dataType:"",description:u("sec.checkpoints.headerMaxLength.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.headerMaxLength.name"),options:null,params:null,prefix:"headerMaxLength",value:"${headerMaxLength}"},{dataType:"",description:u("sec.checkpoints.geoCountryName.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.geoCountryName.name"),options:null,params:null,prefix:"geoCountryName",value:"${geoCountryName}"},{dataType:"",description:u("sec.checkpoints.geoProvinceName.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.geoProvinceName.name"),options:null,params:null,prefix:"geoProvinceName",value:"${geoProvinceName}"},{dataType:"",description:u("sec.checkpoints.geoCityName.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.geoCityName.name"),options:null,params:null,prefix:"geoCityName",value:"${geoCityName}"},{dataType:"",description:u("sec.checkpoints.ispName.description"),hasParams:!1,isComposed:!1,name:u("sec.checkpoints.ispName.name"),options:null,params:null,prefix:"ispName",value:"${ispName}"},{dataType:"",description:u("sec.checkpoints.cc2.description"),hasParams:!1,isComposed:!0,name:u("sec.checkpoints.cc2.name"),options:null,params:null,prefix:"cc2",value:"${cc2}",commponent:"waf-cc-config"},{dataType:"",description:u("sec.checkpoints.refererBlock.description"),hasParams:!1,isComposed:!0,name:u("sec.checkpoints.refererBlock.name"),options:null,params:null,prefix:"refererBlock",value:"${refererBlock}",commponent:"referer-block"}]),R=I=>{const q=I.match(/\$\{(.+?)\}/);if(q){const z=A.value.find(H=>H.prefix===$(q[1]).before);return z==null?void 0:z.name}return"null"},k=async I=>{var z;t.value=!0;const{error:q}=await Ee({setId:I.id,isOn:I.isOn?"0":"1"},"/servers/components/waf/updateSetOn");q||(I.isOn=!I.isOn,(z=window.$message)==null||z.success(u("common.msgSync"))),t.value=!1},x=()=>{a.type="add",a.data=null,o.value=!0},T=I=>{a.type="edit",a.data=I,o.value=!0},M=async I=>{var H,F,V;t.value=!0;const{error:q}=await Ee({setId:I.id,groupId:g.value.id},"/servers/components/waf/deleteSet"),z=(H=h.group.sets)==null?void 0:H.findIndex(j=>j.id===I.id);!q&&z&&((F=h.group.sets)==null||F.splice(z,1),(V=window.$message)==null||V.success(u("common.msgSync"))),t.value=!1},N=J(()=>[{title:u("page.webSet.redirectsConfig.columns.sort"),key:"sort",width:"20px",align:"center",render:I=>d("div",{class:"cursor-pointer"},[d(_e,{localIcon:"material-symbols--menu-rounded",class:"text-[20px]"},null)])},{title:u("sec.wafConfig.ruleSetName"),key:"name",render:I=>{const q=I.isOn;return d("div",null,[d("div",null,[I.name]),d("div",{class:`${q?"text-green":"text-red"}`},[q?u("common.on"):u("common.off")])])}},{title:u("sec.wafConfig.rule"),key:"param",align:"center",render:I=>{let q;const z=I.rules;return d(re,{size:"small"},n8(q=z.map((H,F)=>d("div",{key:F,class:"text-xs border rounded-xl px-2 py-1"},[R(H.param),H.param])))?q:{default:()=>[q]})}},{title:u("sec.wafConfig.ruleRelation"),key:"connector",align:"center"},{title:u("sec.wafConfig.action"),key:"actions",align:"center",width:"150px",render:I=>{const q=I.actions;return d(Ce,null,[q.map((z,H)=>{var F;return d("span",{key:H},[X(" "),(F=_(z.code))==null?void 0:F.name])})])}},{title:u("page.webSet.redirectsConfig.columns.ops"),align:"center",key:"operate",render:I=>d("div",{class:"flex items-center justify-center text-xs gap-1"},[d("div",{class:"cursor-pointer",onClick:()=>T(I)},[u("common.modify")]),d("div",{class:`${!I.isOn&&"text-red"} cursor-pointer`,onClick:()=>k(I)},[I.isOn?u("common.disable"):u("common.enabled")]),d("div",{class:"cursor-pointer",onClick:()=>M(I)},[u("common.delete")])])}]);return je(()=>e.value,I=>{I?y():Object.assign(h,{firewallPolicyId:0,type:"",group:{id:0,isOn:!1,name:"",description:"",code:"",setRefs:null,sets:null,isTemplate:!1}})}),Nn("actions",w),Nn("checkpoints",A),Nn("checkpointName",R),(I,q)=>{const z=l2,H=Ne,F=en,V=Kc,j=nt,se=ze,G=Te,K=n2,de=t2;return L(),te(Ce,null,[d(de,{show:e.value,"onUpdate:show":q[6]||(q[6]=Oe=>e.value=Oe),placement:"bottom",height:"95%","mask-closable":!0},{default:p(()=>[d(K,{title:C(u)("sec.wafConfig.ruleDetails"),closable:""},{default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[d(se,{bordered:!1},{default:p(()=>[d(j,{show:l.value},{default:p(()=>[d(z,null,{default:p(()=>[X(Q(C(u)("sec.wafConfig.group"))+" ",1),U("span",{class:"cursor-pointer text-xs text-[#36C677]",onClick:q[0]||(q[0]=Oe=>O(s.value))},Q(s.value?C(u)("sec.wafConfig.complete"):C(u)("sec.wafConfig.edit")),1)]),_:1}),d(V,{bordered:!0,"single-line":!1},{default:p(()=>[q[8]||(q[8]=U("thead",null,null,-1)),U("tbody",null,[U("tr",null,[U("td",WI,Q(C(u)("sec.wafConfig.name")),1),s.value?(L(),te("td",GI,[d(H,{value:g.value.name,"onUpdate:value":q[1]||(q[1]=Oe=>g.value.name=Oe),bordered:!1},null,8,["value"])])):(L(),te("td",YI,Q(g.value.name),1))]),U("tr",null,[U("td",JI,Q(C(u)("sec.wafConfig.description")),1),s.value?(L(),te("td",e8,[d(H,{value:g.value.description,"onUpdate:value":q[2]||(q[2]=Oe=>g.value.description=Oe),bordered:!1,placeholder:C(u)("sec.wafConfig.noDescription")},null,8,["value","placeholder"])])):(L(),te("td",KI,[U("span",{class:Ln({"text-gray-400":g.value.description.trim()===""})},Q(g.value.description.trim()===""?C(u)("sec.wafConfig.noDescription"):g.value.description),3)]))]),U("tr",null,[U("td",t8,Q(C(u)("sec.wafConfig.enabledStatus")),1),U("td",null,[d(F,{value:g.value.isOn,"onUpdate:value":q[3]||(q[3]=Oe=>g.value.isOn=Oe),disabled:!s.value},null,8,["value","disabled"])])])])]),_:1})]),_:1},8,["show"])]),_:1}),d(se,{title:C(u)("sec.wafConfig.ruleSet"),bordered:!1},{default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[d(C(re),null,{default:p(()=>[d(G,{type:"info",onClick:q[4]||(q[4]=()=>x())},{default:p(()=>[X(Q(C(u)("common.add")),1)]),_:1})]),_:1}),d(UO,{data:h.group.sets,"onUpdate:data":q[5]||(q[5]=Oe=>h.group.sets=Oe),loading:t.value,columns:N.value,onUpdateRedirects:S},null,8,["data","loading","columns"])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"]),d(FI,{visible:o.value,"onUpdate:visible":q[7]||(q[7]=Oe=>o.value=Oe),"edit-set-mpdal":a,"group-id":h.group.id,onGetData:y},null,8,["visible","edit-set-mpdal","group-id"])],64)}}}),i8=ce(s8,[["__scopeId","data-v-e123b6c9"]]),o8=ae({name:"AddGroupsDrawer",__name:"add-groups-drawer",props:Be({id:{},type:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["getData"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=Ze(i,"visible"),s=B(null),o=i,a=B(!1),l=t,c=fe({id:0,name:"",isOn:!1,canDelete:!1,code:"",countSets:0,description:""}),f={name:{required:!0,message:u("sec.wafConfig.pleaseEnterGroupName"),trigger:"blur"}},h=async()=>{var y;(y=s.value)==null||y.validate(),a.value=!0;const v={firewallPolicyId:o.id,type:o.type,name:c.name,description:c.description};c.isOn&&(v.isOn=1);const{error:O}=await Ee(v,"/servers/components/waf/createGroupPopup");O||l("getData")};return e({closeModal:()=>{n.value=!1,a.value=!1,Object.assign(c,{id:0,name:"",isOn:!1,canDelete:!1,code:"",countSets:0,description:""})}}),(v,O)=>{const y=_e,S=Ne,w=ve,_=un,$=et,A=Xt,R=Ht,k=Re,x=nt,T=Te,M=re,N=ze,I=Pt;return L(),W(I,{show:n.value,"onUpdate:show":O[5]||(O[5]=q=>n.value=q)},{default:p(()=>[d(N,{style:{width:"460px"},title:C(u)("sec.wafConfig.addGroup"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:O[0]||(O[0]=()=>n.value=!1)},[d(y,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(M,{justify:"center"},{default:p(()=>[d(T,{class:"px-6",type:"info",disabled:a.value,onClick:h},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(T,{class:"button-default px-6",onClick:O[4]||(O[4]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(x,{show:a.value},{default:p(()=>[d(k,{ref_key:"formRef",ref:s,model:c,rules:f,style:{"max-height":"280px",overflow:"auto"},class:"px-2"},{default:p(()=>[d(w,{label:C(u)("sec.wafConfig.groupName"),path:"name"},{default:p(()=>[d(S,{value:c.name,"onUpdate:value":O[1]||(O[1]=q=>c.name=q)},null,8,["value"])]),_:1},8,["label"]),d(R,{"arrow-placement":"right"},{default:p(()=>[d(A,{name:"more"},{header:p(()=>[d(_,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(y,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(w,{label:C(u)("sec.wafConfig.groupDescription")},{default:p(()=>[d(S,{value:c.description,"onUpdate:value":O[2]||(O[2]=q=>c.description=q),type:"textarea"},null,8,["value"])]),_:1},8,["label"]),d(w,{label:C(u)("sec.wafConfig.enableCurrentGroup")},{default:p(()=>[d($,{checked:c.isOn,"onUpdate:checked":O[3]||(O[3]=q=>c.isOn=q)},null,8,["checked"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),a8=ce(o8,[["__scopeId","data-v-4d8b6864"]]);function l8(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const r8=ae({name:"RulesConfig",__name:"rules-config",props:{id:{},type:{}},setup(i){const e=B(),t=B(!1),n=qe("serverId",B("0")),s=i,o=B(!0),a=B(!1),l=B({canDelete:!1,code:"",countSets:0,description:"",id:0,isOn:!1,name:""}),c=fe({firewallPolicyId:0,groups:[],featureIsOn:!1,webId:0}),f=async()=>{var A;const w=new URLSearchParams,_={firewallPolicyId:s.id.toString(),type:s.type};Object.entries(_).forEach(([R,k])=>{w.append(R,k)});for(let R=0;R<c.groups.length;R+=1)w.append("groupIds",c.groups[R].id.toString());const{error:$}=await oo(w.toString(),"/servers/components/waf/sortGroups");$||(A=window.$message)==null||A.success(u("common.msgSync")),o.value=!1},h=()=>{o.value=!0,f()},g=async w=>{var $;o.value=!0;const{error:_}=await Ee({groupId:w.id,isOn:w.isOn?"0":"1"},"/servers/components/waf/updateGroupOn");_||(w.isOn=!w.isOn,($=window.$message)==null||$.success(u("common.msgSync"))),o.value=!1},v=w=>{l.value=w,t.value=!0},O=async w=>{var A;o.value=!0;const{error:_}=await Ee({firewallPolicyId:s.id,groupId:w.id},"/servers/components/waf/deleteGroup"),$=c.groups.findIndex(R=>R.id===w.id);_||(c.groups.splice($,1),(A=window.$message)==null||A.success(u("common.msgSync"))),o.value=!1},y=J(()=>[{title:u("page.webSet.redirectsConfig.columns.sort"),key:"sort",width:"20px",align:"center",render:w=>d("div",{class:"cursor-pointer"},[d(_e,{localIcon:"material-symbols--menu-rounded",class:"text-[20px]"},null)])},{title:u("sec.wafConfig.ruleGroup"),key:"name",render:w=>{let _;return d("div",null,[d("div",{class:"cursor-pointer",onClick:()=>t.value=!0},[w.name]),d("div",{class:"text-xs text-gray "},[w.description]),d(re,null,{default:()=>[d(Ls,{type:`${w.isOn?"success":"error"}`,size:"small"},{default:()=>[w.isOn?u("common.enabled"):u("common.disable")]}),d(Ls,{size:"small"},l8(_=u("sec.wafConfig.custom"))?_:{default:()=>[_]})]})])}},{title:u("sec.wafConfig.ruleSet"),key:"countSets",align:"center"},{title:u("page.webSet.redirectsConfig.columns.ops"),align:"center",key:"operate",render:w=>d(re,{justify:"center",class:"text-xs"},{default:()=>[d("span",{class:"flex items-center cursor-pointer",onClick:()=>v(w)},[d(_e,{localIcon:"mdi-light--eye",class:"text-[15px]"},null),X(" "),u("common.info")]),d("span",{class:"flex items-center cursor-pointer",onClick:()=>g(w)},[d(_e,{localIcon:`${w.isOn?"prime--stop":"famicons--play"}`,class:"text-[15px]"},null),w.isOn?u("common.disable"):u("common.enabled")]),d("span",{class:"flex items-center cursor-pointer",onClick:()=>O(w)},[d(_e,{localIcon:"mdi-light--delete",class:"text-[15px]"},null),X(" "),u("common.delete")])]})}]),S=async()=>{var A;const w="/servers/server/settings/waf/groups",{data:_,error:$}=await ht(w,{serverId:n.value,type:s.type,firewallPolicyId:s.id});if(!$){const{featureIsOn:R=!1,groups:k,firewallPolicyId:x,webId:T=0}=_;Object.assign(c,{featureIsOn:R,groups:k??c.groups,firewallPolicyId:x,webId:T})}o.value=!1,(A=e.value)==null||A.closeModal()};return vt(()=>{S().finally(()=>{o.value=!1})}),(w,_)=>{const $=Te;return L(),te(Ce,null,[d(C(re),{vertical:"",class:"mt-4"},{default:p(()=>[d(C(re),null,{default:p(()=>[d($,{type:"info",onClick:_[0]||(_[0]=()=>a.value=!0)},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.addGroup")),1)]),_:1})]),_:1}),d(UO,{data:c.groups,"onUpdate:data":_[1]||(_[1]=A=>c.groups=A),loading:o.value,columns:y.value,onUpdateRedirects:h},null,8,["data","loading","columns"])]),_:1}),d(i8,{id:c.firewallPolicyId,visible:t.value,"onUpdate:visible":_[2]||(_[2]=A=>t.value=A),data:l.value,"onUpdate:data":_[3]||(_[3]=A=>l.value=A),type:s.type},null,8,["id","visible","data","type"]),d(a8,{id:c.firewallPolicyId,ref_key:"groupRef",ref:e,visible:a.value,"onUpdate:visible":_[4]||(_[4]=A=>a.value=A),type:s.type,onGetData:S},null,8,["id","visible","type"])],64)}}}),vv=ce(r8,[["__scopeId","data-v-2a717b24"]]),c8={key:2,class:"h-full overflow-y-auto p-2"},d8=ae({name:"NewWafConfig",__name:"new-waf-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=B(!0),s=B(!1),o=J(()=>t.isMobile),a=J(()=>o.value?"top":"left"),l=fe({firewallConfig:{isPrior:!1,isOn:!1,firewallPolicyId:0,ignoreGlobalRules:!1,defaultCaptchaType:"none"},featureIsOn:!1,webId:0,firewallPolicyId:0}),c=J(()=>[{label:u("sec.wafConfig.options.none"),value:"none"},{label:u("sec.wafConfig.options.default"),value:"default"},{label:u("sec.wafConfig.options.oneClick"),value:"oneClick"},{label:u("sec.wafConfig.options.slide"),value:"slide"},{label:u("sec.wafConfig.options.geetest"),value:"geetest"}]),f=async()=>{const g="/servers/server/settings/waf",{data:v,error:O}=await ht(g,{serverId:e.value});if(!O&&v){const{featureIsOn:y=!1,firewallConfig:S,firewallPolicyId:w,webId:_=0}=v;Object.assign(l,{featureIsOn:y,firewallConfig:S??l.firewallConfig,firewallPolicyId:w,webId:_}),S||(l.firewallConfig.firewallPolicyId=w)}},h=async()=>{var v;s.value=!0;const{error:g}=await Ee({webId:l.webId,firewallJSON:JSON.stringify(l.firewallConfig)},"/servers/server/settings/waf");g||(v=window.$message)==null||v.success(u("common.msgSync")),s.value=!1};return vt(()=>{f().finally(()=>{n.value=!1})}),(g,v)=>{const O=jt,y=nn,S=en,w=ve,_=ft,$=Re,A=nt,R=_s,k=Ss,x=re;return n.value?(L(),W(O,{key:0})):l.featureIsOn?(L(),te("div",c8,[d(x,{vertical:""},{default:p(()=>[d(A,{show:s.value},{default:p(()=>[d($,{"label-width":"150px","label-align":"left"},{default:p(()=>[d(w,{label:C(u)("sec.wafConfig.enableWebFirewall"),"label-placement":a.value},{default:p(()=>[d(S,{value:l.firewallConfig.isOn,"onUpdate:value":[v[0]||(v[0]=T=>l.firewallConfig.isOn=T),h]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(w,{label:C(u)("sec.wafConfig.humanVerificationMethod"),"label-placement":a.value,class:"mb-3"},{feedback:p(()=>[U("span",null,Q(C(u)("sec.wafConfig.useSystemDefaultSettings")),1)]),default:p(()=>[d(_,{value:l.firewallConfig.defaultCaptchaType,"onUpdate:value":[v[1]||(v[1]=T=>l.firewallConfig.defaultCaptchaType=T),h],options:c.value,style:{width:"280px"}},null,8,["value","options"])]),_:1},8,["label","label-placement"]),d(w,{label:C(u)("sec.wafConfig.enableGlobalRules"),"label-placement":a.value},{feedback:p(()=>[U("span",null,Q(C(u)("sec.wafConfig.useGlobalWAFPolicy")),1)]),default:p(()=>[d(S,{value:!l.firewallConfig.ignoreGlobalRules,"onUpdate:value":v[2]||(v[2]=T=>{l.firewallConfig.ignoreGlobalRules=!T,h()})},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["show"]),d(k,{type:"line",animated:""},{default:p(()=>[d(R,{name:"inbound",tab:C(u)("sec.wafConfig.inboundRules")},{default:p(()=>[d(vv,{id:l.firewallPolicyId,type:"inbound"},null,8,["id"])]),_:1},8,["tab"]),d(R,{name:"outbound",tab:C(u)("sec.wafConfig.outboundRules")},{default:p(()=>[d(vv,{id:l.firewallPolicyId,type:"outbound"},null,8,["id"])]),_:1},8,["tab"])]),_:1})]),_:1})])):(L(),W(y,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),u8=ce(d8,[["__scopeId","data-v-1aa310c3"]]),f8={class:"text-xs"},p8=ae({name:"HttpCondMimeType",__name:"http-cond-mime-type",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"mime-type",isRequest:!1,param:"${response.contentType}",operator:"mime type",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondMimeType.label")},{feedback:p(()=>[U("span",f8,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondMimeType.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),h8=ce(p8,[["__scopeId","data-v-029d7d8c"]]),m8=Object.freeze(Object.defineProperty({__proto__:null,default:h8},Symbol.toStringTag,{value:"Module"})),g8=ae({name:"OperatopCommon",__name:"operatop-common",props:Be({operatorItem:{}},{modelValue:{default:{type:"user-agent-regexp",isRequest:!0,param:"",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const e=i,t=Ze(i,"modelValue");return(n,s)=>{const o=Ne,a=ve;return L(),W(a,{label:n.$t("page.webSet.securityConfig.fiveShield.comparisonValue"),class:"mb-3"},{feedback:p(()=>[U("span",null,Q(e.operatorItem.feedback),1)]),default:p(()=>[d(o,{value:t.value.value,"onUpdate:value":s[0]||(s[0]=l=>t.value.value=l)},null,8,["value"])]),_:1},8,["label"])}}}),v8=ce(g8,[["__scopeId","data-v-1955dcf6"]]),b8=Object.freeze(Object.defineProperty({__proto__:null,default:v8},Symbol.toStringTag,{value:"Module"})),O8=ae({name:"OperatopCommon",__name:"operatop-lists",props:Be({operatorItem:{}},{modelValue:{default:{type:"user-agent-regexp",isRequest:!0,param:"",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const e=i,t=Ze(i,"modelValue"),s=B((()=>{try{return JSON.parse(t.value.value)}catch{return[]}})());return je(()=>s.value,o=>{t.value.value=JSON.stringify(o)}),(o,a)=>{const l=Wt,c=ve;return L(),W(c,{label:"对比值",class:"mb-3"},{feedback:p(()=>[U("span",null,Q(e.operatorItem.feedback),1)]),default:p(()=>[d(l,{value:s.value,"onUpdate:value":a[0]||(a[0]=f=>s.value=f)},null,8,["value"])]),_:1})}}}),C8=ce(O8,[["__scopeId","data-v-a9d50147"]]),y8=Object.freeze(Object.defineProperty({__proto__:null,default:C8},Symbol.toStringTag,{value:"Module"})),S8={class:"text-xs"},_8=ae({name:"HttpCondParams",__name:"http-cond-params",props:{editModel:{}},setup(i,{expose:e}){var O;const t={type:"params",isRequest:!0,param:"",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,s=()=>n.editModel.data.type===t.type?n.editModel.data:t,o=Object.assign({"../operator/operatop-common.vue":b8,"../operator/operatop-lists.vue":y8}),a={};for(const y in o){const S=((O=y.split("/").pop())==null?void 0:O.replace(".vue",""))||"";a[S]=o[y].default}const l=fe(s()),c=J(()=>[{value:"default",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.default")},{value:"${edgeVersion}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.edgeVersion",{edgeVersion:"{edgeVersion}"})},{value:"${remoteAddr}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remoteAddr",{remoteAddr:"{remoteAddr}"})},{value:"${rawRemoteAddr}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.rawRemoteAddr",{rawRemoteAddr:"{rawRemoteAddr}"})},{value:"${remotePort}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remotePort",{remotePort:"{remotePort}"})},{value:"${remoteUser}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remoteUser",{remoteUser:"{remoteUser}"})},{value:"${requestURI}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestURI",{requestURI:"{requestURI}"})},{value:"${requestPath}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPath",{requestPath:"{requestPath}"})},{value:"${requestURL}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestURL",{requestURL:"{requestURL}"})},{value:"${requestLength}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestLength",{requestLength:"{requestLength}"})},{value:"${requestMethod}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestMethod",{requestMethod:"{requestMethod}"})},{value:"${requestFilename}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestFilename",{requestFilename:"{requestFilename}"})},{value:"${requestPathExtension}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPathExtension",{requestPathExtension:"{requestPathExtension}"})},{value:"${requestPathLowerExtension}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPathLowerExtension",{requestPathLowerExtension:"{requestPathLowerExtension}"})},{value:"${scheme}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.scheme",{scheme:"{scheme}"})},{value:"${proto}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.proto",{proto:"{proto}"})},{value:"${timeISO8601}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timeISO8601",{timeISO8601:"{timeISO8601}"})},{value:"${timeLocal}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timeLocal",{timeLocal:"{timeLocal}"})},{value:"${msec}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.msec",{msec:"{msec}"})},{value:"${timestamp}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timestamp",{timestamp:"{timestamp}"})},{value:"${host}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.host",{host:"{host}"})},{value:"${cname}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cname",{cname:"{cname}"})},{value:"${serverName}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.serverName",{serverName:"{serverName}"})},{value:"${serverPort}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.serverPort",{serverPort:"{serverPort}"})},{value:"${referer}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.referer",{referer:"{referer}"})},{value:"${referer.host}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.refererHost",{refererHost:"{referer.host}"})},{value:"${userAgent}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.userAgent",{userAgent:"{userAgent}"})},{value:"${contentType}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.contentType",{contentType:"{contentType}"})},{value:"${cookies}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cookies",{cookies:"{cookies}"})},{value:"${cookie.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cookieNAME",{cookieNAME:"{cookie.NAME}"})},{value:"${isArgs}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.isArgs",{isArgs:"{isArgs}"})},{value:"${args}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.args",{args:"{args}"})},{value:"${arg.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.argNAME",{argNAME:"{arg.NAME}"})},{value:"${headers}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.headers",{headers:"{headers}"})},{value:"${header.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.headerNAME",{headerNAME:"{header.NAME}"})},{value:"${geo.country.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCountryName",{geoCountryName:"{geo.country.name}"})},{value:"${geo.country.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCountryId",{geoCountryId:"{geo.country.id}"})},{value:"${geo.province.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoProvinceName",{geoProvinceName:"{geo.province.name}"})},{value:"${geo.province.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoProvinceId",{geoProvinceId:"{geo.province.id}"})},{value:"${geo.city.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCityName",{geoCityName:"{geo.city.name}"})},{value:"${geo.city.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCityId",{geoCityId:"{geo.city.id}"})},{value:"${isp.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.ispName",{ispName:"{isp.name}"})},{value:"${isp.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.ispId",{ispId:"{isp.id}"})},{value:"${browser.os.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserOsName",{browserOsName:"{browser.os.name}"})},{value:"${browser.os.version}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserOsVersion",{browserOsVersion:"{browser.os.version}"})},{value:"${browser.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserName",{browserName:"{browser.name}"})},{value:"${browser.version}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserVersion",{browserVersion:"{browser.version}"})},{value:"${browser.isMobile}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserIsMobile",{browserIsMobile:"{browser.isMobile}"})}]),f=J(()=>g.value.find(S=>S.value===l.operator)),h=J(()=>f.value?a[f.value.component]:a["operatop-common"]),g=J(()=>[{value:"regexp",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.regexp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.regexp.feedback")},{value:"not regexp",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notRegexp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notRegexp.feedback")},{value:"wildcard match",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardMatch.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardMatch.feedback")},{value:"wildcard not match",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardNotMatch.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardNotMatch.feedback")},{value:"eq",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eq.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eq.feedback")},{value:"prefix",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.prefix.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.prefix.feedback")},{value:"suffix",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.suffix.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.suffix.feedback")},{value:"contains",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.contains.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.contains.feedback")},{value:"not contains",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notContains.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notContains.feedback")},{value:"not",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.not.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.not.feedback")},{value:"in",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.in.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.in.feedback")},{value:"not in",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notIn.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notIn.feedback")},{value:"file ext",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.fileExt.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.fileExt.feedback")},{value:"mime type",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mimeType.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mimeType.feedback")},{value:"version range",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.versionRange.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.versionRange.feedback")},{value:"eq int",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqInt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqInt.feedback")},{value:"eq float",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqFloat.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqFloat.feedback")},{value:"gt",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gt.feedback")},{value:"gte",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gte.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gte.feedback")},{value:"lt",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lt.feedback")},{value:"lte",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lte.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lte.feedback")},{value:"mod 10",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod10.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod10.feedback")},{value:"mod 100",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod100.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod100.feedback")},{value:"mod",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod.feedback")},{value:"eq ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqIp.feedback")},{value:"gt ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gtIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gtIp.feedback")},{value:"gte ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gteIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gteIp.feedback")},{value:"lt ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ltIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ltIp.feedback")},{value:"lte ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lteIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lteIp.feedback")},{value:"ip range",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipRange.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipRange.feedback")},{value:"ip mod 10",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod10.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod10.feedback")},{value:"ip mod 100",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod100.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod100.feedback")},{value:"ip mod",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod.feedback")}]),v=(y,S)=>{y!=="default"&&(l.param+=y)};return e({model:l}),(y,S)=>{const w=Ne,_=ft,$=re,A=ve,R=et;return L(),te(Ce,null,[d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.paramValue")},{feedback:p(()=>[U("span",S8,Q(C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.paramValue_description")),1)]),default:p(()=>[d($,{vertical:"",class:"w-full"},{default:p(()=>[d(w,{value:l.param,"onUpdate:value":S[0]||(S[0]=k=>l.param=k),placeholder:"${xxx}"},null,8,["value"]),d(_,{options:c.value,"default-value":"default","onUpdate:value":v},null,8,["options"])]),_:1})]),_:1},8,["label"]),d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.comparisonOperator")},{default:p(()=>[d(_,{value:l.operator,"onUpdate:value":S[1]||(S[1]=k=>l.operator=k),options:g.value},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(h.value),{modelValue:l,"onUpdate:modelValue":S[2]||(S[2]=k=>l=k),"operator-item":f.value},null,8,["modelValue","operator-item"])),d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(R,{checked:l.isCaseInsensitive,"onUpdate:checked":S[3]||(S[3]=k=>l.isCaseInsensitive=k),label:C(u)("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])],64)}}}),w8=ce(_8,[["__scopeId","data-v-55339929"]]),k8=Object.freeze(Object.defineProperty({__proto__:null,default:w8},Symbol.toStringTag,{value:"Module"})),x8={class:"text-xs"},P8=ae({name:"HttpCondUrlAll",__name:"http-cond-url-all",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-all",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"/",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve;return L(),W(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlAll.label")},{feedback:p(()=>[U("span",x8,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlAll.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=h=>o.value=h)},null,8,["value"])]),_:1},8,["label"])}}}),$8=ce(P8,[["__scopeId","data-v-4a21853c"]]),T8=Object.freeze(Object.defineProperty({__proto__:null,default:$8},Symbol.toStringTag,{value:"Module"})),R8={class:"text-xs"},I8=ae({name:"HttpCondUrlEqIndex",__name:"http-cond-url-eq-index",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-eq-index",isRequest:!0,param:"${requestPath}",operator:"eq",value:"/",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve;return L(),W(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEqIndex.label")},{feedback:p(()=>[U("span",R8,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEqIndex.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=h=>o.value=h)},null,8,["value"])]),_:1},8,["label"])}}}),Q8=ce(I8,[["__scopeId","data-v-fd2eb225"]]),A8=Object.freeze(Object.defineProperty({__proto__:null,default:Q8},Symbol.toStringTag,{value:"Module"})),N8={class:"text-xs"},M8=ae({name:"HttpCondUrlEq",__name:"http-cond-url-eq",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-eq",isRequest:!0,param:"${requestPath}",operator:"eq",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEq.label"),class:"mb-3"},{feedback:p(()=>[U("span",N8,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEq.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),L8=ce(M8,[["__scopeId","data-v-7bef4ed5"]]),U8=Object.freeze(Object.defineProperty({__proto__:null,default:L8},Symbol.toStringTag,{value:"Module"})),D8={class:"text-xs"},q8=ae({name:"HttpCondUrlExtension",__name:"http-cond-url-extension",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlExtension.label")},{feedback:p(()=>[U("span",D8,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlExtension.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),E8=ce(q8,[["__scopeId","data-v-c3f0d013"]]),B8=Object.freeze(Object.defineProperty({__proto__:null,default:E8},Symbol.toStringTag,{value:"Module"})),Z8={class:"text-xs"},z8=ae({name:"HttpCondUrlNotEq",__name:"http-cond-url-not-eq",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-eq",isRequest:!0,param:"${requestPath}",operator:"eq",value:"",isReverse:!0,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotEq.label"),class:"mb-3"},{feedback:p(()=>[U("span",Z8,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotEq.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),H8=ce(z8,[["__scopeId","data-v-c69180a1"]]),X8=Object.freeze(Object.defineProperty({__proto__:null,default:H8},Symbol.toStringTag,{value:"Module"})),j8={class:"text-xs"},V8=ae({name:"HttpCondUrlNotExtension",__name:"http-cond-url-not-extension",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"url-not-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"not in",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotExtension.label")},{feedback:p(()=>[U("span",j8,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotExtension.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),F8=ce(V8,[["__scopeId","data-v-559b3f2f"]]),W8=Object.freeze(Object.defineProperty({__proto__:null,default:F8},Symbol.toStringTag,{value:"Module"})),Y8={class:"text-xs"},G8=ae({name:"HttpCondUrlNotPrefix",__name:"http-cond-url-not-prefix",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-prefix",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"",isReverse:!0,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotPrefix.label"),class:"mb-3"},{feedback:p(()=>[U("span",Y8,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotPrefix.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),J8=ce(G8,[["__scopeId","data-v-73ef8124"]]),K8=Object.freeze(Object.defineProperty({__proto__:null,default:J8},Symbol.toStringTag,{value:"Module"})),eQ={class:"text-xs"},tQ=ae({name:"HttpCondUrlNotRegexp",__name:"http-cond-url-not-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-regexp",isRequest:!0,param:"${requestPath}",operator:"not regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",eQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),nQ=ce(tQ,[["__scopeId","data-v-4c68acb0"]]),sQ=Object.freeze(Object.defineProperty({__proto__:null,default:nQ},Symbol.toStringTag,{value:"Module"})),iQ={class:"text-xs"},oQ=ae({name:"HttpCondUrlPrefix",__name:"http-cond-url-prefix",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-prefix",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlPrefix.label"),class:"mb-3"},{feedback:p(()=>[U("span",iQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlPrefix.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),aQ=ce(oQ,[["__scopeId","data-v-dd4e8a98"]]),lQ=Object.freeze(Object.defineProperty({__proto__:null,default:aQ},Symbol.toStringTag,{value:"Module"})),rQ={class:"text-xs"},cQ=ae({name:"HttpCondUrlRegexp",__name:"http-cond-url-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-regexp",isRequest:!0,param:"${requestPath}",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",rQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),dQ=ce(cQ,[["__scopeId","data-v-ac4e8cfc"]]),uQ=Object.freeze(Object.defineProperty({__proto__:null,default:dQ},Symbol.toStringTag,{value:"Module"})),fQ={class:"text-xs"},pQ=ae({name:"HttpCondUrlWildcardMatch",__name:"http-cond-url-wildcard-match",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-wildcard-match",isRequest:!0,param:"${requestPath}",operator:"wildcard match",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlWildcardMatch.label"),class:"mb-3"},{feedback:p(()=>[U("span",fQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlWildcardMatch.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),hQ=ce(pQ,[["__scopeId","data-v-233b6568"]]),mQ=Object.freeze(Object.defineProperty({__proto__:null,default:hQ},Symbol.toStringTag,{value:"Module"})),gQ={class:"text-xs"},vQ=ae({name:"HttpCondUserAgentNotRegexp",__name:"http-cond-user-agent-not-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"user-agent-not-regexp",isRequest:!0,param:"${userAgent}",operator:"not regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentNotRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",gQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentNotRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),bQ=ce(vQ,[["__scopeId","data-v-23e5b231"]]),OQ=Object.freeze(Object.defineProperty({__proto__:null,default:bQ},Symbol.toStringTag,{value:"Module"})),CQ={class:"text-xs"},yQ=ae({name:"HttpCondUserAgentRegexp",__name:"http-cond-user-agent-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"user-agent-regexp",isRequest:!0,param:"${userAgent}",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",CQ,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),SQ=ce(yQ,[["__scopeId","data-v-31ff8568"]]),_Q=Object.freeze(Object.defineProperty({__proto__:null,default:SQ},Symbol.toStringTag,{value:"Module"})),wQ={class:"font-bold"},kQ={class:"flex gap-1 text-blue"},xQ=["onClick"],PQ=["onClick"],$Q={class:"text-xs"},TQ={class:"mt-2"},RQ={class:""},IQ={class:"flex items-center justify-center px-2"},QQ={class:"text-xs"},AQ=ae({name:"FiveShieldDrawer",__name:"five-shield-drawer",props:Be({optionsConds:{},editCondsData:{},condsData:{},codsName:{type:Function}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["handleUpdateConds"],["update:visible"]),setup(i,{emit:e}){var k;const t=Ze(i,"visible"),n=e,s=i,o=fe({component:"http-cond-url-extension"}),a=fe({type:"add",index:0,data:{type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"",isReverse:!1,isCaseInsensitive:!1}}),l=J(()=>s.editCondsData.type==="add"?u("page.webSet.securityConfig.fiveShield.createGroup"):u("page.webSet.securityConfig.fiveShield.editGroup")),c=fe({isOn:!0,connector:"and",conds:[],isReverse:!1,description:""}),f=B(),h=Object.assign({"./conds/http-cond-mime-type.vue":m8,"./conds/http-cond-params.vue":k8,"./conds/http-cond-url-all.vue":T8,"./conds/http-cond-url-eq-index.vue":A8,"./conds/http-cond-url-eq.vue":U8,"./conds/http-cond-url-extension.vue":B8,"./conds/http-cond-url-not-eq.vue":X8,"./conds/http-cond-url-not-extension.vue":W8,"./conds/http-cond-url-not-prefix.vue":K8,"./conds/http-cond-url-not-regexp.vue":sQ,"./conds/http-cond-url-prefix.vue":lQ,"./conds/http-cond-url-regexp.vue":uQ,"./conds/http-cond-url-wildcard-match.vue":mQ,"./conds/http-cond-user-agent-not-regexp.vue":OQ,"./conds/http-cond-user-agent-regexp.vue":_Q}),g={};for(const x in h){const T=((k=x.split("/").pop())==null?void 0:k.replace(".vue",""))||"";g[T]=h[x].default}const v=J(()=>g[o.component]),O=J(()=>{const x=s.optionsConds.find(T=>T.component===o.component);return(x==null?void 0:x.description)||""}),y=B(!1),S=B(!1),w=async()=>{const x=s.editCondsData.type,T={...s.condsData};if(x==="edit"){const M=s.editCondsData.index;T.groups[M]={...c}}else T.groups.push({...c});n("handleUpdateConds",T),t.value=!1},_=()=>{a.type==="edit"?c.conds[a.index]={...f.value.model}:c.conds.push({...f.value.model}),y.value=!1},$=(x,T)=>{const M=s.optionsConds.find(N=>N.type===x.type);o.component=M==null?void 0:M.component,Object.assign(a,{type:"edit",index:T,data:x}),y.value=!0},A=x=>{c.conds.splice(x,1)},R=()=>{a.type="add",o.component="http-cond-url-extension",a.data={type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1},y.value=!0};return je(()=>s.editCondsData,x=>{x&&Object.assign(c,js(x.data))},{deep:!0}),(x,T)=>{const M=_e,N=re,I=Te,q=ve,z=ft,H=Ne,F=et,V=Re,j=ze,se=Pt;return L(),te(Ce,null,[d(se,{show:t.value,"onUpdate:show":T[6]||(T[6]=G=>t.value=G)},{default:p(()=>[d(j,{style:{width:"600px"},title:l.value,bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p(()=>[U("span",{onClick:T[0]||(T[0]=()=>t.value=!1)},[d(M,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(N,null,{default:p(()=>[d(I,{type:"info",onClick:w},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1}),d(I,{onClick:T[5]||(T[5]=()=>t.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(V,{class:"max-h-[220px] overflow-y-auto"},{default:p(()=>[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.subConditionList")},{default:p(()=>[d(N,{vertical:""},{default:p(()=>[d(N,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(c.conds,(G,K)=>(L(),te("div",{key:K,class:"flex items-center justify-center gap-1 border rounded-md px-3 py-1 text-xs"},[U("span",wQ,Q(s.codsName(G.type))+":"+Q(G.value),1),U("div",kQ,[U("span",{class:"cursor-pointer",onClick:de=>$(G,K)},[d(M,{"local-icon":"material-symbols--edit"})],8,xQ),U("span",{class:"cursor-pointer",onClick:de=>A(K)},[d(M,{"local-icon":"mingcute--close-fill"})],8,PQ)])]))),128))]),_:1}),d(I,{dashed:"",size:"small",onClick:R},{icon:p(()=>[d(M,{"local-icon":"material-symbols-light--add-2"})]),_:1})]),_:1})]),_:1},8,["label"]),d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.subConditionRelation")},{feedback:p(()=>[U("span",$Q,Q(C(u)("page.webSet.securityConfig.fiveShield.allConditionsRequired")),1)]),default:p(()=>[d(z,{value:c.connector,"onUpdate:value":T[1]||(T[1]=G=>c.connector=G),options:[{label:C(u)("page.webSet.securityConfig.fiveShield.and"),value:"and"},{label:C(u)("page.webSet.securityConfig.fiveShield.or"),value:"or"}],style:{width:"80px"},"default-value":"and"},null,8,["value","options"])]),_:1},8,["label"]),U("div",TQ,[U("div",{class:"mb-4 flex cursor-pointer items-center text-[#0052d9]",onClick:T[2]||(T[2]=G=>S.value=!S.value)},[U("span",RQ,Q(C(u)("page.webSet.httpConfig.moreSetting")),1),d(M,{icon:"meteor-icons:angle-right",class:Ln(["transition-transform duration-200",[S.value?"rotate-90":""]])},null,8,["class"])]),S.value?(L(),te(Ce,{key:0},[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.additionalExplanation")},{default:p(()=>[d(H,{value:c.description,"onUpdate:value":T[3]||(T[3]=G=>c.description=G),type:"textarea"},null,8,["value"])]),_:1},8,["label"]),d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.enableCurrentGroup")},{default:p(()=>[d(F,{checked:c.isOn,"onUpdate:checked":T[4]||(T[4]=G=>c.isOn=G),label:C(u)("page.webSet.securityConfig.fiveShield.selectEnable")},null,8,["checked","label"])]),_:1},8,["label"])],64)):Xe("",!0)])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"]),d(se,{show:y.value,"onUpdate:show":T[9]||(T[9]=G=>y.value=G),"mask-closable":!1},{default:p(()=>[U("div",IQ,[d(j,{style:{"max-width":"480px"},title:a.type==="add"?C(u)("page.webSet.securityConfig.fiveShield.createCondition"):C(u)("page.webSet.securityConfig.fiveShield.editCondition"),bordered:!1,size:"huge"},{footer:p(()=>[d(N,null,{default:p(()=>[d(I,{type:"info",onClick:_},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1}),d(I,{onClick:T[8]||(T[8]=()=>y.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(V,{class:"max-h-[260px] overflow-y-auto"},{default:p(()=>[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.selectConditionType")},{feedback:p(()=>[U("span",QQ,Q(O.value),1)]),default:p(()=>[d(z,{value:o.component,"onUpdate:value":T[7]||(T[7]=G=>o.component=G),options:s.optionsConds,"label-field":"name","value-field":"component",style:{width:"480px"}},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:f,"edit-model":a},null,8,["edit-model"]))]),_:1})]),_:1},8,["title"])])]),_:1},8,["show"])],64)}}}),NQ=ce(AQ,[["__scopeId","data-v-a46062c5"]]),MQ={class:"mr-1"},LQ={class:"ml-1 flex gap-1"},UQ=["onClick"],DQ=["onClick"],qQ={class:"flex items-center gap-1 text-blue font-bold"},EQ=["innerHTML"],BQ=ae({name:"URLPatternsSelect",__name:"url-patterns-select",props:Be({options:{},urlPatterns:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["delete","update"],["update:visible"]),setup(i,{emit:e}){const t=fe({type:"wildcard",pattern:""}),n=fe({type:"add",index:0,data:{type:"",pattern:""}}),s=i,o=e,a=B(!1),l=Ze(i,"visible"),c=J(()=>{if(t.type==="wildcard"||t.type==="regexp"){const S=f.value.find(w=>w.type===t.type);return S==null?void 0:S.text}}),f=J(()=>[{type:"wildcard",text:u("page.webSet.securityConfig.fiveShield.wildcardExample")},{type:"regexp",text:u("page.webSet.securityConfig.fiveShield.regexExample")}]),h=S=>{o("delete",S)},g=S=>{const w=s.options.find(_=>_.type===S);return w==null?void 0:w.value},v=(S,w)=>{Object.assign(t,S),n.type="edit",n.index=w,l.value=!0},O=()=>{n.type="add",Object.assign(t,{type:"wildcard",pattern:""}),l.value=!0},y=()=>{n.data=t,o("update",n),l.value=!1};return(S,w)=>{const _=_e,$=re,A=ft,R=Ne,k=Te,x=tn,T=Pt;return L(),te(Ce,null,[d($,{vertical:""},{default:p(()=>[d($,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(s.urlPatterns,(M,N)=>(L(),te("div",{key:N,class:"flex items-center border rounded-md px-3 py-1 text-xs"},[U("span",MQ,"["+Q(g(M.type))+"]",1),U("span",null,Q(M.pattern),1),U("div",LQ,[U("span",{class:"cursor-pointer",onClick:I=>v(M,N)},[d(_,{"local-icon":"material-symbols-light--edit-outline-rounded"})],8,UQ),U("span",{class:"cursor-pointer",onClick:I=>h(N)},[d(_,{"local-icon":"iconamoon--close-fill"})],8,DQ)])]))),128))]),_:1}),l.value?(L(),W($,{key:0,class:"items-center"},{default:p(()=>[d(x,null,{default:p(()=>[d(A,{value:t.type,"onUpdate:value":w[0]||(w[0]=M=>t.type=M),options:s.options,"label-field":"value","value-field":"type",style:{"max-width":"100px"}},null,8,["value","options"]),t.type==="wildcard"||t.type==="regexp"?(L(),W(R,{key:0,value:t.pattern,"onUpdate:value":w[1]||(w[1]=M=>t.pattern=M),style:{width:"80%"}},null,8,["value"])):Xe("",!0),d(k,{onClick:y},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1})]),_:1}),U("div",qQ,[Zt(U("span",{class:"cursor-pointer",onClick:w[2]||(w[2]=()=>a.value=!0)},[d(_,{"local-icon":"f7--question-circle",class:"text-[18px] font-bold"})],512),[[zt,t.type==="wildcard"||t.type==="regexp"]]),U("span",{class:"cursor-pointer",onClick:w[3]||(w[3]=()=>l.value=!1)},[d(_,{"local-icon":"iconamoon:close--fill",class:"text-[18px] font-bold"})])])]),_:1})):Xe("",!0),d(k,{dashed:"",size:"small",onClick:O},{icon:p(()=>[d(_,{"local-icon":"material-symbols--add"})]),_:1})]),_:1}),d(T,{show:a.value,"onUpdate:show":w[4]||(w[4]=M=>a.value=M),preset:"dialog",title:"Dialog"},{header:p(()=>[U("div",null,Q(C(u)("common.systemHelp")),1)]),default:p(()=>[U("div",{innerHTML:c.value},null,8,EQ)]),_:1},8,["show"])],64)}}}),_c=ce(BQ,[["__scopeId","data-v-8808295a"]]),ZQ={class:"text-xs"},zQ={class:"text-xs"},HQ={class:"text-xs"},XQ={class:"text-xs"},jQ={class:"text-xs"};function VQ(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const FQ=ae({name:"FiveShield",__name:"five-shield",props:{uamConfig:{},feature:{type:Boolean}},setup(i){const e=fe({type:"add",data:{isOn:!0,connector:"and",conds:[],isReverse:!0,description:""},index:0}),t=J(()=>f.feature),n=Ws(),s=J(()=>n.query.serverId),o=qe("securityData"),a=qe("loading"),l=B(!1),c=xp(),f=i,h=B(!1),g=wt(),v=J(()=>g.isMobile),O=J(()=>v.value?"top":"left"),y=B(c.uamConfig),S=B(!1),w=B(!1),_=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),$=async()=>{var K;l.value=!0;const V=await Kt(),j="/servers/server/settings/uam",se={serverId:s.value,csrfToken:V,uamJSON:JSON.stringify(y.value),keyLife:y.value.keyLife,minQPSPerIP:y.value.minQPSPerIP,condsJSON:JSON.stringify(y.value.conds)},{error:G}=await Ee(se,j);G||(o.uamConfig=y.value,(K=window.$message)==null||K.success(u("common.msgSync"))),l.value=!1},A=V=>{y.value.exceptURLPatterns.splice(V,1),$()},R=V=>{y.value.onlyURLPatterns.splice(V,1),$()},k=V=>{const{type:j,index:se,data:G}=V;j==="edit"&&se>=0&&se<y.value.exceptURLPatterns.length?y.value.exceptURLPatterns[se]={...G}:j!=="edit"&&y.value.exceptURLPatterns.push({...G}),$()},x=V=>{const{type:j,index:se,data:G}=V;j==="edit"&&se>=0&&se<y.value.onlyURLPatterns.length?y.value.onlyURLPatterns[se]={...G}:j!=="edit"&&y.value.onlyURLPatterns.push({...G}),$()},T=(V,j)=>{e.type="edit",e.data=V,e.index=j,h.value=!0},M=V=>{y.value.conds.groups.splice(V,1),$()},N=()=>{e.type="add",e.data={isOn:!0,connector:"and",conds:[],isReverse:!1,description:""},h.value=!0},I=V=>{const j=z.value.find(se=>se.type===V);return j==null?void 0:j.name},q=J(()=>[{title:u("page.webSet.securityConfig.fiveShield.group"),key:"index",width:90,align:"center",render:(V,j)=>d("span",null,[" ",u("page.webSet.securityConfig.fiveShield.group"),X(" "),j+1])},{title:u("page.webSet.securityConfig.fiveShield.conds"),key:"conds",align:"center",render:V=>{let j;return d(re,{justify:"center",size:"small"},VQ(j=V.conds.map((se,G)=>d(Ls,{key:G,size:"small",class:"text-xs"},{default:()=>[I(se.type),X(" : "),se.value]})))?j:{default:()=>[j]})}},{title:u("page.webSet.securityConfig.fiveShield.actions"),key:"actions",align:"center",width:120,render:(V,j)=>d(re,{justify:"center",class:"text-blue items-center"},{default:()=>[d("span",{onClick:()=>T(V,j),class:"cursor-pointer "},[" ",d(_e,{localIcon:"material-symbols--edit",class:"text-[18px]"},null)," "]),d("span",{onClick:()=>M(j),class:"cursor-pointer "},[" ",d(_e,{localIcon:"mingcute--close-fill",class:"text-[18px]"},null)," "])]})}]),z=J(()=>[{type:"url-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.description"),component:"http-cond-url-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-eq-index",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.description"),component:"http-cond-url-eq-index",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-all",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.description"),component:"http-cond-url-all",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.description"),component:"http-cond-url-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.description"),component:"http-cond-url-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.description"),component:"http-cond-url-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-wildcard-match",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.description"),component:"http-cond-url-wildcard-match",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.description"),component:"http-cond-user-agent-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"params",name:u("page.webSet.securityConfig.fiveShield.optionsConds.params.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.params.description"),component:"http-cond-params",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.params.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.description"),component:"http-cond-url-not-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.description"),component:"http-cond-url-not-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.description"),component:"http-cond-url-not-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.description"),component:"http-cond-url-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.description"),component:"http-cond-user-agent-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"mime-type",name:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.description"),component:"http-cond-mime-type",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.paramsTitle"),isRequest:!1,caseInsensitive:!1}]),H=V=>{y.value.conds={...V},$()},F=V=>{JSON.stringify(f.uamConfig)!==JSON.stringify(y.value)&&$()};return je(()=>f.uamConfig,V=>{V!==null&&(y.value={...V})}),(V,j)=>{const se=ya,G=ao,K=en,de=ve,Oe=Re,we=un,pe=Qi,Se=Ut,xe=Ai,Me=tn,Pe=et,st=ze,Ye=Te,it=ws,Dt=Xt,sn=Ht,Un=nt;return C(a)?(L(),W(C(re),{key:0,vertical:""},{default:p(()=>[d(se,{height:"20px",width:"33%",sharp:!1}),d(se,{height:"20px",width:"66%",sharp:!1}),d(se,{height:"20px",sharp:!1})]),_:1})):(L(),te(Ce,{key:1},[d(Un,{show:l.value},{default:p(()=>[t.value?(L(),W(st,{key:1,title:C(u)("page.webSet.securityConfig.fiveShield.title")},{default:p(()=>[d(Oe,{class:"mb-4"},{default:p(()=>[d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.enable5sShield"),"label-placement":O.value},{feedback:p(()=>[U("span",ZQ,Q(C(u)("page.webSet.securityConfig.fiveShield.enable5sShieldDescription")),1)]),default:p(()=>[d(K,{value:y.value.isOn,"onUpdate:value":[j[0]||(j[0]=lt=>y.value.isOn=lt),j[1]||(j[1]=lt=>F(""))]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1}),d(sn,{"arrow-placement":"right"},{default:p(()=>[d(Dt,{name:"more"},{header:p(()=>[d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(_e,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(st,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"uil--shield"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.protectionSettings")),1)]),_:1})]),_:1}),d(Oe,{"label-width":120,"label-align":"left"},{default:p(()=>[d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.validationTTL"),"label-placement":O.value,class:"mb-4"},{feedback:p(()=>[U("span",zQ,Q(C(u)("page.webSet.securityConfig.fiveShield.validationNoRepeat")),1)]),default:p(()=>[d(Me,null,{default:p(()=>[d(Se,{value:y.value.keyLife,"onUpdate:value":j[2]||(j[2]=lt=>y.value.keyLife=lt),"show-button":!1,style:{"max-width":"80px"},onBlur:j[3]||(j[3]=lt=>F("验证有效期"))},null,8,["value"]),d(xe,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.second")),1)]),_:1})]),_:1})]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.minQPSPerIP"),"label-placement":O.value,class:"mb-4"},{feedback:p(()=>[U("span",HQ,Q(C(u)("page.webSet.securityConfig.fiveShield.minQPSTrigger")),1)]),default:p(()=>[d(Me,null,{default:p(()=>[d(Se,{value:y.value.minQPSPerIP,"onUpdate:value":j[4]||(j[4]=lt=>y.value.minQPSPerIP=lt),"show-button":!1,style:{"max-width":"80px"},onBlur:j[5]||(j[5]=lt=>F("单IP最低QPS"))},null,8,["value"]),d(xe,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.requestsPerSecond")),1)]),_:1})]),_:1})]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.addToIPWhitelist"),"label-placement":O.value,class:"mb-4"},{default:p(()=>[d(Pe,{checked:y.value.addToWhiteList,"onUpdate:checked":j[6]||(j[6]=lt=>y.value.addToWhiteList=lt),label:C(u)("page.webSet.securityConfig.fiveShield.addToTempWhitelist"),onChange:j[7]||(j[7]=lt=>F("加入IP白名单"))},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(st,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"mdi--filter-outline"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.urlFilterSettings")),1)]),_:1})]),_:1}),d(Oe,null,{default:p(()=>[d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.exceptionURL"),"label-placement":O.value,class:"mb-4"},{feedback:p(()=>[U("span",XQ,Q(C(u)("page.webSet.securityConfig.fiveShield.exceptionURLDescription")),1)]),default:p(()=>[d(_c,{visible:S.value,"onUpdate:visible":j[8]||(j[8]=lt=>S.value=lt),options:_.value,"url-patterns":y.value.exceptURLPatterns,onDelete:A,onUpdate:k},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.securityConfig.fiveShield.limitURL"),"label-placement":O.value,class:"mb-4"},{feedback:p(()=>[U("span",jQ,Q(C(u)("page.webSet.securityConfig.fiveShield.limitURLDescription")),1)]),default:p(()=>[d(_c,{visible:w.value,"onUpdate:visible":j[9]||(j[9]=lt=>w.value=lt),options:_.value,"url-patterns":y.value.onlyURLPatterns,onDelete:R,onUpdate:x},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(st,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"material-symbols--settings-input-component-outline-sharp"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.matchCondition")),1)]),_:1})]),_:1}),d(C(re),{size:"small"},{default:p(()=>[d(Ye,{class:"mb-2 text-sm",size:"small",type:"info",secondary:"",onClick:N},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.addGroup")),1)]),_:1})]),_:1}),d(it,{columns:q.value,pagination:{pageSize:10},data:y.value.conds.groups,size:"small","row-key":lt=>lt.index,"scroll-x":400,class:"min-h-[280px] text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["columns","data","row-key"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])):(L(),W(G,{key:0,title:C(u)("common.system"),type:"warning",class:"mb-4"},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.shield5SecNotEnabled")),1)]),_:1},8,["title"]))]),_:1},8,["show"]),d(NQ,{visible:h.value,"onUpdate:visible":j[10]||(j[10]=lt=>h.value=lt),"options-conds":z.value,"edit-conds-data":e,"conds-data":y.value.conds,"cods-name":I,onHandleUpdateConds:H},null,8,["visible","options-conds","edit-conds-data","conds-data"])],64))}}}),WQ={class:"text-xs"},YQ={class:"text-xs"},GQ={class:"text-xs"},JQ={class:"text-xs"},KQ=ae({name:"CCConfig",__name:"cc-config",props:{webId:{},ccConfig:{},feature:{type:Boolean}},setup(i){const e=wt(),t=i,n=J(()=>t.feature),s=J(()=>e.isMobile),o=J(()=>s.value?"top":"left"),a=qe("loading"),l=qe("securityData"),c=xp(),f=B(c.ccConfig),h=B(!1),g=B(!1),v=B(!1),O=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),y=async()=>{var N;v.value=!0;const k=await Kt(),x="/servers/server/settings/cc",T={webId:t.webId,csrfToken:k,ccJSON:JSON.stringify(f.value),minQPSPerIP:f.value.minQPSPerIP},{error:M}=await Ee(T,x);M||(l.ccConfig=f.value,(N=window.$message)==null||N.success(u("common.msgSync"))),v.value=!1},S=k=>{f.value.exceptURLPatterns.splice(k,1),y()},w=k=>{f.value.onlyURLPatterns.splice(k,1),y()},_=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<f.value.exceptURLPatterns.length?f.value.exceptURLPatterns[T]={...M}:x!=="edit"&&f.value.exceptURLPatterns.push({...M}),y()},$=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<f.value.onlyURLPatterns.length?f.value.onlyURLPatterns[T]={...M}:x!=="edit"&&f.value.onlyURLPatterns.push({...M}),y()},A=J({get:()=>!f.value.useDefaultThresholds,set:k=>{f.value.useDefaultThresholds=!k}}),R=()=>{JSON.stringify(t.ccConfig)!==JSON.stringify(f.value)&&y()};return je(()=>t.ccConfig,k=>{k!==null&&(k.thresholds.length===0&&(k.thresholds=[{blockSeconds:0,maxRequests:0,periodSeconds:0},{blockSeconds:0,maxRequests:0,periodSeconds:0},{blockSeconds:0,maxRequests:0,periodSeconds:0}]),f.value={...k})}),(k,x)=>{const T=ao,M=en,N=ve,I=Re,q=un,z=_e,H=Qi,F=et,V=ze,j=Ut,se=Ai,G=tn,K=re,de=Xt,Oe=Ht,we=nt;return n.value?(L(),W(we,{key:1,show:v.value},{default:p(()=>[C(a)?Xe("",!0):(L(),W(V,{key:0,title:C(u)("page.webSet.securityConfig.ccConfig.title")},{default:p(()=>[d(I,{class:"mb-4"},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.enableCC"),"label-placement":o.value},{feedback:p(()=>[U("span",WQ,Q(C(u)("page.webSet.securityConfig.ccConfig.enableCCDescription")),1)]),default:p(()=>[d(M,{value:f.value.isOn,"onUpdate:value":[x[0]||(x[0]=pe=>f.value.isOn=pe),R]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1}),d(Oe,{"arrow-placement":"right"},{default:p(()=>[d(de,{name:"more"},{header:p(()=>[d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(z,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(V,{size:"small",bordered:!1},{default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(z,{"local-icon":"iconoir--filter"}),d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.urlFilterSettings")),1)]),_:1})]),_:1}),d(I,null,{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.exceptionURL"),"label-placement":o.value,class:"mb-4"},{feedback:p(()=>[U("span",YQ,Q(C(u)("page.webSet.securityConfig.ccConfig.exceptionURL_desc")),1)]),default:p(()=>[d(_c,{visible:h.value,"onUpdate:visible":x[1]||(x[1]=pe=>h.value=pe),options:O.value,"url-patterns":f.value.exceptURLPatterns,onDelete:S,onUpdate:_},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.limitURL"),"label-placement":o.value,class:"mb-4"},{feedback:p(()=>[U("span",GQ,Q(C(u)("page.webSet.securityConfig.ccConfig.limitURL_desc")),1)]),default:p(()=>[d(_c,{visible:g.value,"onUpdate:visible":x[2]||(x[2]=pe=>g.value=pe),options:O.value,"url-patterns":f.value.onlyURLPatterns,onDelete:w,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.ignoreCommonFiles"),"label-placement":o.value,class:"mb-4"},{default:p(()=>[d(F,{checked:f.value.ignoreCommonFiles,"onUpdate:checked":x[3]||(x[3]=pe=>f.value.ignoreCommonFiles=pe),label:C(u)("page.webSet.securityConfig.ccConfig.ignoreCommonFiles_desc"),onChange:R},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(V,{size:"small",bordered:!1},{default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(z,{"local-icon":"uil--shield"}),d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.protectionSettings")),1)]),_:1})]),_:1}),d(I,{"label-width":120,"label-align":"left"},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.checkRequestFingerprint"),"label-placement":o.value,class:"mb-4"},{default:p(()=>[d(F,{checked:f.value.enableFingerprint,"onUpdate:checked":x[4]||(x[4]=pe=>f.value.enableFingerprint=pe),label:C(u)("page.webSet.securityConfig.ccConfig.checkRequestFingerprint_desc"),onChange:R},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.enableGET302Validation"),"label-placement":o.value,class:"mb-4"},{default:p(()=>[d(F,{checked:f.value.enableGET302,"onUpdate:checked":x[5]||(x[5]=pe=>f.value.enableGET302=pe),label:C(u)("page.webSet.securityConfig.ccConfig.enableGET302Validation_desc"),onChange:R},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.minQPSPerIP"),"label-placement":o.value,class:"mb-4"},{feedback:p(()=>[U("span",JQ,Q(C(u)("page.webSet.securityConfig.ccConfig.minQPSPerIP_desc")),1)]),default:p(()=>[d(G,null,{default:p(()=>[d(j,{value:f.value.minQPSPerIP,"onUpdate:value":x[6]||(x[6]=pe=>f.value.minQPSPerIP=pe),"show-button":!1,style:{"max-width":"80px"},onBlur:R},null,8,["value"]),d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.minQPSPerIP_unit")),1)]),_:1})]),_:1})]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(V,{size:"small",bordered:!1},{default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(z,{"local-icon":"material-symbols--settings-input-component-outline-sharp"}),d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.interceptThresholdSettings")),1)]),_:1})]),_:1}),d(I,null,{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.useCustomThreshold"),"label-placement":o.value},{default:p(()=>[d(M,{value:A.value,"onUpdate:value":[x[7]||(x[7]=pe=>A.value=pe),R]},null,8,["value"])]),_:1},8,["label","label-placement"]),Zt(d(N,{label:C(u)("page.webSet.securityConfig.ccConfig.customThreshold")},{default:p(()=>[d(K,{vertical:""},{default:p(()=>[d(G,null,{default:p(()=>[d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.maxRequestsPerIP5s")),1)]),_:1}),d(j,{value:f.value.thresholds[0].maxRequests,"onUpdate:value":x[8]||(x[8]=pe=>f.value.thresholds[0].maxRequests=pe),"show-button":!1,style:{"max-width":"80px"},onBlur:R},null,8,["value"]),d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.requests")),1)]),_:1})]),_:1}),d(G,null,{default:p(()=>[d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.maxRequestsPerIP60s")),1)]),_:1}),d(j,{value:f.value.thresholds[1].maxRequests,"onUpdate:value":x[9]||(x[9]=pe=>f.value.thresholds[1].maxRequests=pe),"show-button":!1,style:{"max-width":"80px"},onBlur:R},null,8,["value"]),d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.requests")),1)]),_:1})]),_:1}),d(G,null,{default:p(()=>[d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.maxRequestsPerIP300s")),1)]),_:1}),d(j,{value:f.value.thresholds[2].maxRequests,"onUpdate:value":x[10]||(x[10]=pe=>f.value.thresholds[2].maxRequests=pe),"show-button":!1,style:{"max-width":"80px"},onBlur:R},null,8,["value"]),d(se,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccConfig.requests")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["label"]),[[zt,!f.value.useDefaultThresholds]])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["title"]))]),_:1},8,["show"])):(L(),W(T,{key:0,title:C(u)("common.system"),type:"warning",class:"mb-4"},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.ccShieldNotEnabled")),1)]),_:1},8,["title"]))}}}),eA=ce(KQ,[["__scopeId","data-v-7a762292"]]),tA={class:"text-xs"},nA={class:"text-xs"},sA={class:"text-xs"},iA={class:"text-xs"},oA={class:"text-xs"},aA={class:"text-xs"};function lA(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const rA=ae({name:"DefenseConfig",__name:"defense-config",props:{webId:{},feature:{type:Boolean},defanseConfig:{}},setup(i){const e=wt(),t=i,n=J(()=>t.feature),s=J(()=>e.isMobile),o=J(()=>s.value?"top":"left"),a=B(!1),l=B(!1),c=fe({isOn:!1,records:[]}),f=()=>({enable:!0,riskTags:[],riskLevel:0,riskScore:0,recordOnly:!1,action:1}),h=fe(f()),g=qe("loading"),v=J(()=>[{id:1,name:u("page.webSet.securityConfig.defenseConfig.tags.proxy")},{id:2,name:u("page.webSet.securityConfig.defenseConfig.tags.tor")},{id:3,name:u("page.webSet.securityConfig.defenseConfig.tags.vpn")},{id:4,name:u("page.webSet.securityConfig.defenseConfig.tags.scan")},{id:5,name:u("page.webSet.securityConfig.defenseConfig.tags.idc")},{id:6,name:u("page.webSet.securityConfig.defenseConfig.tags.bruteForce")},{id:7,name:u("page.webSet.securityConfig.defenseConfig.tags.quickDial")}]),O=J(()=>[{label:u("page.webSet.securityConfig.defenseConfig.actionTags.shield5Seconds"),value:1},{label:u("page.webSet.securityConfig.defenseConfig.actionTags.invisibleVerification"),value:2},{label:u("page.webSet.securityConfig.defenseConfig.actionTags.captcha"),value:3},{label:u("page.webSet.securityConfig.defenseConfig.actionTags.ban"),value:4}]),y=J(()=>[{label:u("page.webSet.securityConfig.defenseConfig.riskLevel.notSelected"),value:0},{label:u("page.webSet.securityConfig.defenseConfig.riskLevel.lowRisk"),value:1},{label:u("page.webSet.securityConfig.defenseConfig.riskLevel.mediumRisk"),value:2},{label:u("page.webSet.securityConfig.defenseConfig.riskLevel.highRisk"),value:3}]),S=J(()=>[{title:u("page.webSet.securityConfig.defenseConfig.columns.riskTags"),key:"riskTags",align:"center",render:k=>{let x;const T=k.riskTags,M=N=>v.value.find(I=>I.id===N);return d(re,{justify:"start"},lA(x=T.map((N,I)=>d(Ls,{key:I,type:"info",size:"small"},{default:()=>{var q;return[X(" "),(q=M(N))==null?void 0:q.name,X(" ")]}})))?x:{default:()=>[x]})}},{title:u("page.webSet.securityConfig.defenseConfig.columns.riskLevel"),key:"riskLevel",align:"center",render:k=>{const x=k.riskLevel,T=M=>y.value.find(N=>N.value===M);return d(re,{justify:"center"},{default:()=>[d(Ls,{type:"error",size:"small"},{default:()=>{var M;return[X(" "),(M=T(x))==null?void 0:M.label,X(" ")]}})]})}},{title:u("page.webSet.securityConfig.defenseConfig.columns.riskScore"),key:"riskScore",align:"center"},{title:u("page.webSet.securityConfig.defenseConfig.columns.action"),align:"center",key:"action",render:k=>{const x=k.action,T=M=>O.value.find(N=>N.value===M);return d(re,{justify:"center"},{default:()=>[d(Ls,{type:"success",size:"small"},{default:()=>{var M;return[(M=T(x))==null?void 0:M.label]}})]})}},{title:u("page.webSet.securityConfig.defenseConfig.columns.observationMode"),key:"recordOnly",align:"center",render:k=>k.recordOnly?u("page.webSet.securityConfig.defenseConfig.Y"):u("page.webSet.securityConfig.defenseConfig.N")},{title:u("page.webSet.securityConfig.defenseConfig.columns.operation"),key:"actions",align:"center",render:(k,x)=>d(re,{justify:"center"},{default:()=>[d("span",{onClick:()=>_(x),class:"cursor-pointer text-blue"},[d(_e,{localIcon:"material-symbols--delete"},null)])]})}]),w=async(k,x)=>{l.value=!0;const T="/servers/server/settings/defense",N={csrfToken:await Kt(),webId:t.webId,defenseJSON:JSON.stringify(x?c:{...c,records:k})},{data:I,error:q}=await Ee(N,T);return l.value=!1,{data:I,error:q}},_=async k=>{var T;async function x(){var I,q;const M=[...c.records];M.splice(k,1);const{error:N}=await w(M);N?(q=window.$message)==null||q.error("删除失败，请重试！"):(c.records.splice(k,1),(I=window.$message)==null||I.success(u("common.msgSync")))}(T=window.$dialog)==null||T.error({title:u("common.tip"),content:u("common.confirmDelete"),positiveText:u("page.webSite.table.deleteConfirm"),negativeText:u("common.cancel"),onPositiveClick:()=>{x()}})},$=async()=>{var T,M;const k=[...c.records,{...h}],{error:x}=await w(k);x?(M=window.$message)==null||M.error("更新失败，请重试！"):(c.records.push({...h}),a.value=!1,(T=window.$message)==null||T.success(u("common.msgSync")))},A=async()=>{var x,T;const{error:k}=await w(c.records,!0);k?(T=window.$message)==null||T.error("更新失败，请重试！"):(x=window.$message)==null||x.success(u("common.msgSync"))},R=()=>{$()};return je(()=>t.defanseConfig,k=>{Object.assign(c,{...k})}),je(()=>a.value,k=>{k||Object.assign(h,{...f()})}),(k,x)=>{const T=ao,M=en,N=ve,I=Re,q=un,z=un,H=Qi,F=Te,V=ws,j=ze,se=Xt,G=Ht,K=et,de=Jc,Oe=kp,we=ft,pe=g2,Se=NO,xe=et,Me=nt,Pe=ze,st=Pt;return L(),te(Ce,null,[n.value?(L(),te(Ce,{key:1},[C(g)?Xe("",!0):(L(),W(j,{key:0,title:C(u)("page.webSet.securityConfig.defenseConfig.title")},{default:p(()=>[d(I,{class:"mb-4"},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.enable"),"label-placement":o.value},{feedback:p(()=>[U("span",tA,Q(C(u)("page.webSet.securityConfig.defenseConfig.description")),1)]),default:p(()=>[d(M,{value:c.isOn,"onUpdate:value":[x[0]||(x[0]=Ye=>c.isOn=Ye),A]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1}),d(G,{"arrow-placement":"right"},{default:p(()=>[d(se,{name:"more"},{header:p(()=>[d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(_e,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(j,{size:"small",bordered:!1},{footer:p(()=>[d(T,{"show-icon":!1,type:"warning"},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.defenseConfig.tip")),1)]),_:1})]),default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"material-symbols--settings-input-component-outline-sharp"}),d(z,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.defenseConfig.ruleList")),1)]),_:1})]),_:1}),d(F,{onClick:x[1]||(x[1]=()=>a.value=!0),class:"mb-3"},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.defenseConfig.addRule")),1)]),_:1}),d(V,{loading:l.value,columns:S.value,pagination:{pageSize:10},data:c.records,size:"small","row-key":Ye=>Ye.index,"scroll-x":900,class:"sm:h-full min-h-[280px] lg:text-[14px] md:text-sm text-xs"},null,8,["loading","columns","data","row-key"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title"]))],64)):(L(),W(T,{key:0,title:C(u)("common.system"),type:"warning",class:"mb-4"},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.activeDefenseNotEnabled")),1)]),_:1},8,["title"])),d(st,{show:a.value,"onUpdate:show":x[9]||(x[9]=Ye=>a.value=Ye),"mask-closable":!l.value},{default:p(()=>[d(Pe,{style:{width:"600px"},title:C(u)("page.webSet.securityConfig.defenseConfig.addRule"),bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p(()=>[U("span",{onClick:x[2]||(x[2]=()=>a.value=!1)},[d(_e,{"local-icon":"material-symbols-light--close-rounded",class:"text-2xl cursor-pointer transform transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(C(re),null,{default:p(()=>[d(F,{onClick:R,type:"info",disabled:l.value},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(F,{onClick:x[8]||(x[8]=()=>a.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(Me,{show:l.value},{default:p(()=>[d(I,{class:"max-h-[320px] overflow-y-auto"},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.columns.riskTags"),class:"mb-3"},{feedback:p(()=>[U("span",nA,Q(C(u)("page.webSet.securityConfig.defenseConfig.matchSelectedTags")),1)]),default:p(()=>[d(Oe,{name:"radiogroup"},{default:p(()=>[d(C(re),null,{default:p(()=>[d(de,{value:h.riskTags,"onUpdate:value":x[3]||(x[3]=Ye=>h.riskTags=Ye)},{default:p(()=>[(L(!0),te(Ce,null,Ot(v.value,Ye=>(L(),W(K,{key:Ye.id,label:Ye.name,value:Ye.id},null,8,["label","value"]))),128))]),_:1},8,["value"])]),_:1})]),_:1})]),_:1},8,["label"]),d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.columns.riskLevel"),class:"mb-3"},{feedback:p(()=>[U("span",sA,Q(C(u)("page.webSet.securityConfig.defenseConfig.matchRiskLevel")),1)]),default:p(()=>[d(we,{options:y.value,value:h.riskLevel,"onUpdate:value":x[4]||(x[4]=Ye=>h.riskLevel=Ye),"default-value":"0"},null,8,["options","value"])]),_:1},8,["label"]),d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.columns.riskScore"),class:"mb-3"},{feedback:p(()=>[U("span",iA,Q(C(u)("page.webSet.securityConfig.defenseConfig.riskScoreTip")),1)]),default:p(()=>[d(pe,{value:h.riskScore,"onUpdate:value":x[5]||(x[5]=Ye=>h.riskScore=Ye),step:1},null,8,["value"])]),_:1},8,["label"]),d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.columns.action"),class:"mb-3"},{feedback:p(()=>[U("span",oA,Q(C(u)("page.webSet.securityConfig.defenseConfig.actionTip")),1)]),default:p(()=>[d(Oe,{value:h.action,"onUpdate:value":x[6]||(x[6]=Ye=>h.action=Ye),name:"radiogroup"},{default:p(()=>[d(C(re),null,{default:p(()=>[(L(!0),te(Ce,null,Ot(O.value,Ye=>(L(),W(Se,{key:Ye.value,value:Ye.value,label:Ye.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),d(N,{label:C(u)("page.webSet.securityConfig.defenseConfig.columns.observationMode"),class:"mb-3"},{feedback:p(()=>[U("span",aA,Q(C(u)("page.webSet.securityConfig.defenseConfig.observationModeTip")),1)]),default:p(()=>[d(xe,{checked:h.recordOnly,"onUpdate:checked":x[7]||(x[7]=Ye=>h.recordOnly=Ye),label:C(u)("page.webSet.securityConfig.defenseConfig.enableObservation")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show","mask-closable"])],64)}}}),cA=ce(rA,[["__scopeId","data-v-d170042f"]]),dA={class:"h-full overflow-y-auto"},uA=ae({name:"SecurityConfig",__name:"security-config",setup(i){const e=Ws(),t=J(()=>e.query.serverId),n=J(()=>({serverId:t==null?void 0:t.value})),s=fe({uam:!0,cc:!0,defense:!0}),o=xp(),a=fe(o),l=B(!0),c=async(h,g)=>{const{data:v,error:O}=await ht(h,n.value);O?console.error(`Fetch failed: ${h}`,O):g(v)},f=async()=>{const h=[];h.push(c("/servers/server/settings/uam",g=>{const v=(g==null?void 0:g.uamConfig)||null;if(s.uam=g.featureIsOn,v!==null&&o.uamConfig)for(const O in v)v[O]===null&&(v[O]=o.uamConfig[O]);a.uamConfig=(g==null?void 0:g.uamConfig)||null})),h.push(c("/servers/server/settings/cc",g=>{const v=(g==null?void 0:g.ccConfig)||null;if(s.cc=g.featureIsOn,v!==null&&o.ccConfig)for(const O in v)v[O]===null&&(v[O]=o.ccConfig[O]);a.ccConfig=(g==null?void 0:g.ccConfig)||null,a.ccWebId=(g==null?void 0:g.webId)||null})),h.push(c("/servers/server/settings/defense",g=>{g.defenseConfig.records===null&&(g.defenseConfig.records=o.defenseConfig.records),s.defense=g.featureIsOn||!0,a.defenseConfig=(g==null?void 0:g.defenseConfig)||null,a.defenseWebId=(g==null?void 0:g.webId)||null})),await Promise.all(h),l.value=!1};return vt(()=>{f()}),Nn("securityData",a),Nn("loading",l),(h,g)=>{const v=re;return L(),te("div",dA,[d(v,{vertical:""},{default:p(()=>[d(FQ,{"uam-config":a.uamConfig,feature:s.uam},null,8,["uam-config","feature"]),d(eA,{"cc-config":a.ccConfig,"web-id":a.ccWebId,feature:s.cc},null,8,["cc-config","web-id","feature"]),d(cA,{"defanse-config":a.defenseConfig,"web-id":a.defenseWebId,feature:s.defense},null,8,["defanse-config","web-id","feature"])]),_:1})])}}}),fA=ce(uA,[["__scopeId","data-v-e7141a41"]]),pA={class:"mt-3"},hA=ae({name:"AddIpModal",__name:"add-ip-modal",props:Be({listId:{},editData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["getData"],["update:visible"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=B(!1),s=i,o=e,a=/^(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3}$/,l=/^(([0-9a-fA-F]{1,4}):){1,7}([0-9a-fA-F]{1,4})$/,c=/^((\d{1,3}\.){3}\d{1,3}|([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4})\/([0-9]|[1-2]\d|3[0-2]|[0-9]{1,3})$/,f=/^((25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3})-((25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3})$/,h=fe({value:"",expiredAt:null,reason:""});function g(y){return a.test(y)||l.test(y)||c.test(y)||f.test(y)}const v=async()=>{var _;if(!g(h.value)){(_=window.$message)==null||_.error("IP格式错误: 只支持 IPv4 / IPv6 / IPv4范围 / CIDR");return}n.value=!0;const y=await Kt(),{error:S,data:w}=await Ee({csrfToken:y,listId:s.listId,value:h.value,reason:h.reason,expiredAt:h.expiredAt?h.expiredAt/1e3:""},"/servers/server/settings/waf/ipadmin/createIPPopup");S||o("getData"),n.value=!1,t.value=!1},O=async()=>{var w,_,$,A;n.value=!0;const{error:y,data:S}=await ht("/servers/server/settings/waf/ipadmin/updateIPPopup",{listId:s.listId,itemId:(w=s.editData.data)==null?void 0:w.id});y||Object.assign(h,{value:(_=S==null?void 0:S.item)==null?void 0:_.value,expiredAt:(($=S==null?void 0:S.item)==null?void 0:$.expiredAt)*1e3,reason:(A=S==null?void 0:S.item)==null?void 0:A.reason}),n.value=!1};return je(()=>t.value,y=>{y&&s.editData.type==="edit"&&s.editData.data&&O(),y||Object.assign(h,{value:"",expiredAt:null,reason:""})}),(y,S)=>{const w=Ne,_=ve,$=r2,A=Xt,R=Ht,k=nt,x=Re,T=Te,M=re,N=Pt;return L(),W(N,{show:t.value,"onUpdate:show":S[4]||(S[4]=I=>t.value=I),class:"custom-card",preset:"dialog",title:y.$t("sec.accessControl.addIp"),size:"small",bordered:!1,"show-icon":!1},{action:p(()=>[d(M,{size:"small"},{default:p(()=>[d(T,{onClick:S[3]||(S[3]=()=>t.value=!1)},{default:p(()=>[X(Q(y.$t("common.cancel")),1)]),_:1}),d(T,{type:"primary",onClick:v,disabled:n.value},{default:p(()=>[X(Q(y.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),default:p(()=>[d(x,{class:"space-y-sm max-h-[380px] overflow-y-auto p-1"},{default:p(()=>[d(k,{show:n.value},{default:p(()=>[d(_,{label:y.$t("sec.accessControl.ipOrSegment")},{feedback:p(()=>[U("span",null,Q(y.$t("sec.accessControl.ipFormatHelp")),1)]),default:p(()=>[d(w,{value:h.value,"onUpdate:value":S[0]||(S[0]=I=>h.value=I)},null,8,["value"])]),_:1},8,["label"]),d(_,{label:y.$t("sec.accessControl.expirationTime")},{feedback:p(()=>[U("span",null,Q(y.$t("sec.accessControl.expirationHelp")),1)]),default:p(()=>[d($,{value:h.expiredAt,"onUpdate:value":S[1]||(S[1]=I=>h.expiredAt=I),type:"date",clearable:""},null,8,["value"])]),_:1},8,["label"]),d(R,{"arrow-placement":"right"},{default:p(()=>[d(A,{title:y.$t("sec.accessControl.moreOptions"),name:"more"},{default:p(()=>[d(_,{label:y.$t("sec.accessControl.remark")},{default:p(()=>[d(w,{value:h.reason,"onUpdate:value":S[2]||(S[2]=I=>h.reason=I)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["title"])]),_:1})]),_:1},8,["show"])]),_:1}),U("div",pA,[U("span",null,Q(y.$t("sec.accessControl.effectiveAfter5Min")),1)])]),_:1},8,["show","title"])}}}),DO=ce(hA,[["__scopeId","data-v-e6503815"]]),mA={class:"text-black dark:text-white flex items-center justify-center gap-1"},gA=ae({name:"IpItemText",__name:"ip-item-text",props:{items:{},list:{}},setup(i){const e=B({type:"edit",data:null}),t=i,n=B(!1),s=()=>{e.value={type:"edit",data:t.items},n.value=!0},o=()=>{var a;(a=window.$message)==null||a.success("保存成功！")};return(a,l)=>{var f,h;const c=_e;return L(),te("div",mA,[U("div",null,Q((f=t.items)==null?void 0:f.value),1),U("div",{class:"cursor-pointer",onClick:s},[d(c,{"local-icon":"mage--edit"})]),d(DO,{visible:n.value,"onUpdate:visible":l[0]||(l[0]=g=>n.value=g),"list-id":(h=t.list)==null?void 0:h.id,"edit-data":e.value,onGetData:o},null,8,["visible","list-id","edit-data"])])}}}),zu=ce(gA,[["__scopeId","data-v-c54ce8cc"]]),vA={key:2,class:"h-full overflow-y-auto p-2"},bA={class:"item-content"},OA={key:0},CA={key:0},yA={class:"text-red-500"},SA={key:1},_A={key:0},wA={key:0},kA={key:0,class:"text-green-500 flex gap-1 items-center"},xA={key:1,class:"text-gray-500 flex gap-1 items-center"},PA={key:1},$A={class:"text-red-500 flex gap-1 items-center"},TA={key:1},RA={class:"text-red-500"},IA={key:2},QA={class:"text-red-500"},AA={key:2},NA=ae({name:"IpadminConfig",__name:"ipadmin-config",setup(i){const e=qe("wafSettings"),t=Ws(),n=wt(),s=J(()=>t.query.serverId),o=B(!0),a=B(!1),l=B(""),c=B({featureIsOn:!1,firewallPolicyId:0,serverId:0,wafIsOn:!1}),f=B(null),h=async y=>{var $,A;const S=($=window.$message)==null?void 0:$.loading("正在查询中!");a.value=!0;const{error:w,data:_}=await Ee({ip:y,firewallPolicyId:e==null?void 0:e.firewallPolicyId},"/servers/server/settings/waf/ipadmin/test");S==null||S.destroy(),w||((A=window.$message)==null||A.success("查询成功!"),f.value=_),a.value=!1},g=async()=>{const{error:y,data:S}=await ht("/servers/server/settings/waf/ipadmin/test",{serverId:s.value,firewallPolicyId:e==null?void 0:e.firewallPolicyId});y||(c.value=S)},v=y=>{const S=/^(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3}$/,w=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(::)|(([0-9a-fA-F]{1,4}:){1,7}:)|(:{2}[0-9a-fA-F]{1,4}))$/;return S.test(y)||w.test(y)},O=()=>{var y,S;if(!l.value){(y=window.$message)==null||y.error("IP不能为空！");return}if(!v(l.value)){(S=window.$message)==null||S.error("请输入正确的 IP 地址");return}h(l.value)};return vt(()=>{g().finally(()=>o.value=!1)}),(y,S)=>{const w=jt,_=nn,$=ao,A=Ne,R=ve,k=_e,x=Re,T=ze,M=Te,N=re;return o.value?(L(),W(w,{key:0})):c.value.featureIsOn?(L(),te("div",vA,[d(N,{vertical:""},{default:p(()=>[c.value.wafIsOn?Xe("",!0):(L(),W($,{key:0,"show-icon":!1,type:"warning"},{default:p(()=>[X(Q(y.$t("sec.test.wafNotEnabled")),1)]),_:1})),d(T,{size:"small",title:y.$t("sec.test.ipCheck")},{default:p(()=>[d(x,{"label-placement":C(n).isMobile?"top":"left","label-align":"left","label-width":"100"},{default:p(()=>[d(R,{label:"IP",feedback:y.$t("sec.test.ipToCheck"),"show-require-mark":""},{default:p(()=>[d(A,{value:l.value,"onUpdate:value":S[0]||(S[0]=I=>l.value=I),placeholder:y.$t("sec.test.enterIp")},null,8,["value","placeholder"])]),_:1},8,["feedback"]),d(R,{label:y.$t("sec.test.checkResult")},{default:p(()=>{var I,q,z,H,F,V,j,se,G,K,de,Oe,we,pe,Se,xe,Me,Pe,st,Ye,it,Dt,sn,Un,lt,He,Mi,Fe,xn,Yt,gn,Pn,Hn,be,ke,Ae,ct,St,It,$n,on,Gt,Xn,Gs;return[U("div",bA,[(q=(I=f.value)==null?void 0:I.result)!=null&&q.isDone?(L(),te("div",OA,[(H=(z=f.value)==null?void 0:z.result)!=null&&H.isOk?Xe("",!0):(L(),te("div",CA,[U("span",yA,Q((V=(F=f.value)==null?void 0:F.result)==null?void 0:V.error),1)])),(se=(j=f.value)==null?void 0:j.result)!=null&&se.isFound?(L(),te("div",SA,[((K=(G=f.value)==null?void 0:G.result)==null?void 0:K.item)!==null?(L(),te("div",_A,[(Oe=(de=f.value)==null?void 0:de.result)!=null&&Oe.isAllowed?(L(),te("div",wA,[((Se=(pe=(we=f.value)==null?void 0:we.result)==null?void 0:pe.item)==null?void 0:Se.listType)=="white"?(L(),te("span",kA,[d(k,{"local-icon":"ix--success-filled"}),X(" "+Q(y.$t("sec.test.inWhitelist"))+" ",1),d(zu,{items:(Me=(xe=f.value)==null?void 0:xe.result)==null?void 0:Me.item,list:(st=(Pe=f.value)==null?void 0:Pe.result)==null?void 0:st.list},null,8,["items","list"])])):Xe("",!0),((Dt=(it=(Ye=f.value)==null?void 0:Ye.result)==null?void 0:it.item)==null?void 0:Dt.listType)=="grey"?(L(),te("span",xA,[d(k,{"local-icon":"mingcute--round-fill"}),X(" "+Q(y.$t("sec.test.inGreylist"))+" ",1),d(zu,{items:(Un=(sn=f.value)==null?void 0:sn.result)==null?void 0:Un.item,list:(He=(lt=f.value)==null?void 0:lt.result)==null?void 0:He.list},null,8,["items","list"])])):Xe("",!0)])):(L(),te("div",PA,[U("span",$A,[d(k,{"local-icon":"ant-design--stop-outlined"}),X(" "+Q(y.$t("sec.test.inBlacklist"))+" ",1),d(zu,{items:(Fe=(Mi=f.value)==null?void 0:Mi.result)==null?void 0:Fe.item,list:(Yt=(xn=f.value)==null?void 0:xn.result)==null?void 0:Yt.list},null,8,["items","list"])])]))])):Xe("",!0),((Pn=(gn=f.value)==null?void 0:gn.result)==null?void 0:Pn.province)!=null?(L(),te("div",TA,[U("span",RA,[S[1]||(S[1]=U("i",{class:"icon map marker"},null,-1)),X(" "+Q(y.$t("sec.test.inProvinceBlock"))+' "'+Q((ke=(be=(Hn=f.value)==null?void 0:Hn.result)==null?void 0:be.province)==null?void 0:ke.name)+'" ',1)])])):Xe("",!0),((ct=(Ae=f.value)==null?void 0:Ae.result)==null?void 0:ct.country)!=null&&((It=(St=f.value)==null?void 0:St.result)==null?void 0:It.province)==null?(L(),te("div",IA,[U("span",QA,[S[2]||(S[2]=U("i",{class:"icon globe"},null,-1)),X(" "+Q(y.$t("sec.test.inCountryBlock"))+' "'+Q((Gt=(on=($n=f.value)==null?void 0:$n.result)==null?void 0:on.country)==null?void 0:Gt.name)+'" ',1)])])):Xe("",!0)])):Xe("",!0),(Gs=(Xn=f.value)==null?void 0:Xn.result)!=null&&Gs.isFound?Xe("",!0):(L(),te("div",AA,Q(y.$t("sec.test.noMatchConfig",{ipInfo:l.value})),1))])):Xe("",!0)])]}),_:1},8,["label"])]),_:1},8,["label-placement"])]),_:1},8,["title"]),d(N,{size:"small"},{default:p(()=>[d(M,{type:"primary",onClick:O,disabled:l.value.length===0||a.value,loading:a.value},{default:p(()=>[X(Q(y.$t("sec.test.checkIpStatus")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1})])):(L(),W(_,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),MA=ce(NA,[["__scopeId","data-v-d26c27b4"]]);function LA(i){const t=new DOMParser().parseFromString(i,"text/html").querySelectorAll('.page a[href*="page="]');let n=1;return t.forEach(s=>{const o=s.getAttribute("href");if(!o)return;const a=new URL(o,location.origin),l=parseInt(a.searchParams.get("page")??"1",10);l>n&&(n=l)}),Number(n)}const UA=i=>i.length===0?1:LA(i),DA={key:2,class:"h-full overflow-y-auto p-2"},qA={class:"flex gap-2 items-center"},EA={key:0},BA={key:1,class:"flex gap-1 items-center justify-center"},ZA=ae({name:"AccessControl",__name:"access-control",setup(i){const e=qe("wafSettings"),t=Ws(),n=J(()=>t.query.serverId),s=B(!1),o=B(!1),a=B(!0),l=B("allowList"),c=B([]),f=B({type:"add",data:null}),h=J(()=>[{label:u("sec.accessControl.showBtn.allowList"),key:"allowList"},{label:u("sec.accessControl.showBtn.denyList"),key:"denyList"},{label:u("sec.accessControl.showBtn.greyList"),key:"greyList"}]),g=fe({page:1,pageSize:10,pageCount:1,pageSizes:[10,20,30,50]}),v=B({featureIsOn:!1,firstMenuItem:"",items:[],listId:0,page:"",serverId:0}),O=async F=>{s.value=!0;const{error:V,data:j}=await ht(`/servers/server/settings/waf/ipadmin/${l.value}`,{serverId:n.value,firewallPolicyId:e==null?void 0:e.firewallPolicyId,...F||{}});V||(v.value=j,g.pageCount=UA(j.page)),s.value=!1},y=F=>{f.value={type:"edit",data:{...F}},o.value=!0},S=async F=>{var j;async function V(){s.value=!0;const{error:se}=await Ee({itemId:F,listId:v.value.listId},"/servers/server/settings/waf/ipadmin/deleteIP");se?s.value=!1:O().finally(()=>{s.value=!1})}(j=window.$dialog)==null||j.error({title:u("page.webSite.table.deleteTip"),content:u("sec.accessControl.delete"),positiveText:u("page.webSite.table.deleteConfirm"),negativeText:u("common.cancel"),onPositiveClick:()=>{V()}})},w=J(()=>[{type:"selection"},{title:"IP",key:"value"},{title:u("sec.accessControl.columns.type"),key:"type"},{title:u("sec.accessControl.columns.leave"),key:"leave",render:F=>"-"},{title:u("sec.accessControl.columns.expiredTime"),key:"expiredTime"},{title:u("sec.accessControl.columns.reason"),key:"reason"},{title:u("page.plans.index.table.action"),key:"action",width:"120px",align:"center",fixed:"right",render:F=>d("div",{class:"flex items-center justify-center gap-2"},[d("span",{class:"cursor-pointer",onClick:()=>y(F)},[u("common.edit")]),d("span",{class:"cursor-pointer",onClick:()=>S(F.id)},[u("common.delete")])])}]),_=()=>{var F;(F=window.$dialog)==null||F.info({title:u("sec.accessControl.systemHelp"),content:u("sec.accessControl.idHelp")})},$=()=>{f.value={type:"add",data:null},o.value=!0},A=()=>{var j;async function F(se){s.value=!0,(await Mo({url:"/waf/iplists/deleteItems",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:se.toString()})).error?s.value=!1:(await O().finally(()=>{var K;(K=window.$message)==null||K.success(u("page.webSite.deleteSuccess"))}),c.value=[])}const V=new URLSearchParams;c.value.forEach(se=>{V.append("itemIds",se.toString())}),(j=window.$dialog)==null||j.error({title:u("page.webSite.table.deleteTip"),content:u("page.webSite.table.deleteContent"),positiveText:u("page.webSite.table.deleteConfirm"),negativeText:u("common.cancel"),onPositiveClick:()=>{F(V)}})},R=F=>{g.page=F,O({page:F})},k=F=>{g.pageSize=F,O({page:1,pageSize:F})},x=F=>{v.value.items=[],l.value=F,O()};function T(F){c.value=F}vt(()=>{O().finally(()=>{a.value=!1})});const M=F=>{const V=F;V.style.height="0",V.style.opacity="0"},N=F=>{const V=F;V.style.transition="all 0.3s ease",V.style.height=`${V.scrollHeight}px`,V.style.opacity="1"},I=F=>{const V=F;V.style.height=""},q=F=>{const V=F;V.style.height=`${V.scrollHeight}px`,V.style.opacity="1"},z=F=>{const V=F;V.style.transition="all 0.2s ease",V.offsetHeight,V.style.height="0",V.style.opacity="0"},H=F=>{const V=F;V.style.height=""};return(F,V)=>{const j=jt,se=nn,G=Te,K=re,de=_e,Oe=ze,we=ws;return a.value?(L(),W(j,{key:0})):v.value.featureIsOn?(L(),te("div",DA,[d(K,{vertical:""},{default:p(()=>[d(K,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(h.value,pe=>(L(),W(G,{onClick:Se=>x(pe.key),key:pe.key,type:l.value===pe.key?"primary":"default",size:"small"},{default:p(()=>[X(Q(pe.label),1)]),_:2},1032,["onClick","type"]))),128))]),_:1}),U("div",qA,[d(G,{size:"small",dashed:"",type:"success",disabled:s.value,onClick:$},{default:p(()=>[X(Q(C(u)("sec.accessControl.addIp")),1)]),_:1},8,["disabled"]),U("div",{class:"flex items-center justify-center gap-1 cursor-pointer",onClick:_},[V[2]||(V[2]=X(" ID: ")),s.value?(L(),te("div",EA,[d(de,{"local-icon":"eos-icons--three-dots-loading",class:"text-[20px]"})])):(L(),te("div",BA,[X(Q(v.value.listId)+" ",1),d(de,{"local-icon":"ri--question-fill",class:"text-[16px]"})]))])]),d(Gi,{onBeforeEnter:M,onEnter:N,onAfterEnter:I,onBeforeLeave:q,onLeave:z,onAfterLeave:H},{default:p(()=>[Zt(d(Oe,{size:"small",class:"mb-4"},{default:p(()=>[d(K,null,{default:p(()=>[d(G,{class:"text-xs md:text-sm",dashed:"",onClick:V[0]||(V[0]=()=>c.value=[])},{default:p(()=>[X(Q(C(u)("common.cancelSelected")),1)]),_:1}),d(G,{class:"text-xs md:text-sm",type:"error",dashed:"",onClick:A},{default:p(()=>[X(Q(C(u)("common.deleteSelected")),1)]),_:1})]),_:1})]),_:1},512),[[zt,c.value.length!==0]])]),_:1}),d(we,{remote:"","scroll-x":1e3,size:"small",data:v.value.items,"single-line":!1,"row-key":pe=>pe.id,columns:w.value,loading:s.value,pagination:g,"onUpdate:page":R,"onUpdate:pageSize":k,"onUpdate:checkedRowKeys":T,"checked-row-keys":c.value},null,8,["data","row-key","columns","loading","pagination","checked-row-keys"])]),_:1}),d(DO,{visible:o.value,"onUpdate:visible":V[1]||(V[1]=pe=>o.value=pe),"list-id":v.value.listId,onGetData:O,"edit-data":f.value},null,8,["visible","list-id","edit-data"])])):(L(),W(se,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),zA=ce(ZA,[["__scopeId","data-v-c3fe1e24"]]),HA={class:"mr-1"},XA={class:"flex gap-1 ml-1"},jA=["onClick"],VA=["onClick"],FA={class:"flex gap-1 items-center font-bold text-blue"},WA=["innerHTML"],YA=ae({name:"URLPatternsSelect",__name:"url-patterns-select",props:Be({options:{},urlPatterns:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["delete","update"],["update:visible"]),setup(i,{emit:e}){const t=fe({type:"wildcard",pattern:""}),n=fe({type:"add",index:0,data:{type:"",pattern:""}}),s=i,o=e,a=B(!1),l=Ze(i,"visible"),c=J(()=>{if(t.type==="wildcard"||t.type==="regexp"){const S=f.value.find(w=>w.type===t.type);return S==null?void 0:S.text}}),f=J(()=>[{type:"wildcard",text:u("page.webSet.securityConfig.fiveShield.wildcardExample")},{type:"regexp",text:u("page.webSet.securityConfig.fiveShield.regexExample")}]),h=S=>{o("delete",S)},g=S=>{const w=s.options.find(_=>_.type===S);return w==null?void 0:w.value},v=(S,w)=>{Object.assign(t,S),n.type="edit",n.index=w,l.value=!0},O=()=>{n.type="add",Object.assign(t,{type:"wildcard",pattern:""}),l.value=!0},y=()=>{n.data=t,o("update",n),l.value=!1};return(S,w)=>{const _=_e,$=re,A=ft,R=Ne,k=Te,x=tn,T=Te,M=Pt;return L(),te(Ce,null,[d($,{vertical:""},{default:p(()=>[d($,null,{default:p(()=>[(L(!0),te(Ce,null,Ot(s.urlPatterns,(N,I)=>(L(),te("div",{key:I,class:"flex px-3 py-1 border rounded-md text-xs items-center"},[U("span",HA,"["+Q(g(N.type))+"]",1),U("span",null,Q(N.pattern),1),U("div",XA,[U("span",{onClick:q=>v(N,I),class:"cursor-pointer"},[d(_,{"local-icon":"material-symbols-light--edit-outline-rounded"})],8,jA),U("span",{onClick:q=>h(I),class:"cursor-pointer"},[d(_,{"local-icon":"iconamoon--close-fill"})],8,VA)])]))),128))]),_:1}),l.value?(L(),W($,{key:0,class:"items-center"},{default:p(()=>[d(x,null,{default:p(()=>[d(A,{value:t.type,"onUpdate:value":w[0]||(w[0]=N=>t.type=N),options:s.options,"label-field":"value","value-field":"type",style:{"max-width":"100px"}},null,8,["value","options"]),t.type==="wildcard"||t.type==="regexp"?(L(),W(R,{key:0,value:t.pattern,"onUpdate:value":w[1]||(w[1]=N=>t.pattern=N),style:{width:"80%"}},null,8,["value"])):Xe("",!0),d(k,{onClick:y},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1})]),_:1}),U("div",FA,[Zt(U("span",{onClick:w[2]||(w[2]=()=>a.value=!0),class:"cursor-pointer"},[d(_,{"local-icon":"f7--question-circle",class:"text-[18px] font-bold"})],512),[[zt,t.type==="wildcard"||t.type==="regexp"]]),U("span",{onClick:w[3]||(w[3]=()=>l.value=!1),class:"cursor-pointer"},[d(_,{"local-icon":"iconamoon--close-fill",class:"text-[18px] font-bold"})])])]),_:1})):Xe("",!0),d(T,{dashed:"",size:"small",onClick:O},{icon:p(()=>[d(_,{"local-icon":"material-symbols--add"})]),_:1})]),_:1}),d(M,{show:a.value,"onUpdate:show":w[4]||(w[4]=N=>a.value=N),preset:"dialog",title:"Dialog"},{header:p(()=>[U("div",null,Q(C(u)("common.systemHelp")),1)]),default:p(()=>[U("div",{innerHTML:c.value},null,8,WA)]),_:1},8,["show"])],64)}}}),ss=ce(YA,[["__scopeId","data-v-89a64b5f"]]),GA={class:"tab-nav"},JA=["onClick"],KA={class:"tab-content"},eN={key:0,class:"group"},tN=["onClick"],nN=["onClick"],sN=ae({name:"AddCountriesModal",__name:"add-countries-modal",props:{visible:{default:!1},visibleModifiers:{},choose:{default:[]},chooseModifiers:{}},emits:Be(["handleUpdate"],["update:visible","update:choose"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=B([{codes:["阿尔巴尼亚"],id:80,isChecked:!1,isCommon:!1,letter:"A",name:"阿尔巴尼亚",pinyin:["a er ba ni ya"]},{codes:["阿尔及利亚"],id:96,isChecked:!1,isCommon:!1,letter:"A",name:"阿尔及利亚",pinyin:["a er ji li ya"]},{codes:["阿富汗"],id:29,isChecked:!1,isCommon:!1,letter:"A",name:"阿富汗",pinyin:["a fu han"]},{codes:["阿根廷"],id:211,isChecked:!1,isCommon:!0,letter:"A",name:"阿根廷",pinyin:["a gen ting"]},{codes:["阿拉伯联合酋长国","阿联酋"],id:41,isChecked:!1,isCommon:!1,letter:"A",name:"阿拉伯联合酋长国",pinyin:["a la bo lian he qiu zhang guo"]},{codes:["阿鲁巴"],id:197,isChecked:!1,isCommon:!1,letter:"A",name:"阿鲁巴",pinyin:["a lu ba"]},{codes:["阿曼"],id:42,isChecked:!1,isCommon:!1,letter:"A",name:"阿曼",pinyin:["a man"]},{codes:["阿塞拜疆"],id:46,isChecked:!1,isCommon:!1,letter:"A",name:"阿塞拜疆",pinyin:["a sai bai jiang"]},{codes:["阿森松岛"],id:254,isChecked:!1,isCommon:!1,letter:"A",name:"阿森松岛",pinyin:["a sen song dao","Ascension Island"]},{codes:["爱尔兰"],id:70,isChecked:!1,isCommon:!1,letter:"A",name:"爱尔兰",pinyin:["ai er lan"]},{codes:["埃及"],id:92,isChecked:!1,isCommon:!1,letter:"A",name:"埃及",pinyin:["ai ji"]},{codes:["埃塞俄比亚"],id:100,isChecked:!1,isCommon:!1,letter:"A",name:"埃塞俄比亚",pinyin:["ai sai e bi ya"]},{codes:["爱沙尼亚"],id:54,isChecked:!1,isCommon:!1,letter:"A",name:"爱沙尼亚",pinyin:["ai sha ni ya"]},{codes:["安道尔共和国","安道尔"],id:91,isChecked:!1,isCommon:!1,letter:"A",name:"安道尔共和国",pinyin:["an dao er gong he guo"]},{codes:["安哥拉"],id:127,isChecked:!1,isCommon:!1,letter:"A",name:"安哥拉",pinyin:["an ge la"]},{codes:["安圭拉"],id:192,isChecked:!1,isCommon:!1,letter:"A",name:"安圭拉",pinyin:["an gui la"]},{codes:["安提瓜和巴布达"],id:181,isChecked:!1,isCommon:!1,letter:"A",name:"安提瓜和巴布达",pinyin:["an ti gua he ba bu da"]},{codes:["澳大利亚"],id:141,isChecked:!1,isCommon:!0,letter:"A",name:"澳大利亚",pinyin:["ao da li ya"]},{codes:["奥地利"],id:66,isChecked:!1,isCommon:!1,letter:"A",name:"奥地利",pinyin:["ao de li"]},{codes:["奥兰群岛"],id:238,isChecked:!1,isCommon:!1,letter:"A",name:"奥兰群岛",pinyin:["ao lan qun dao"]},{codes:["巴巴多斯"],id:187,isChecked:!1,isCommon:!1,letter:"B",name:"巴巴多斯",pinyin:["ba ba duo si"]},{codes:["巴布亚新几内亚"],id:143,isChecked:!1,isCommon:!1,letter:"B",name:"巴布亚新几内亚",pinyin:["ba bu ya xin ji nei ya"]},{codes:["巴哈马"],id:176,isChecked:!1,isCommon:!1,letter:"B",name:"巴哈马",pinyin:["ba ha ma"]},{codes:["巴基斯坦"],id:21,isChecked:!1,isCommon:!0,letter:"B",name:"巴基斯坦",pinyin:["ba ji si tan"]},{codes:["巴拉圭"],id:213,isChecked:!1,isCommon:!1,letter:"B",name:"巴拉圭",pinyin:["ba la gui"]},{codes:["巴勒斯坦"],id:36,isChecked:!1,isCommon:!1,letter:"B",name:"巴勒斯坦",pinyin:["ba lei si tan"]},{codes:["巴林"],id:38,isChecked:!1,isCommon:!1,letter:"B",name:"巴林",pinyin:["ba lin"]},{codes:["巴拿马"],id:175,isChecked:!1,isCommon:!1,letter:"B",name:"巴拿马",pinyin:["ba na ma"]},{codes:["巴西"],id:209,isChecked:!1,isCommon:!0,letter:"B",name:"巴西",pinyin:["ba xi"]},{codes:["白俄罗斯"],id:57,isChecked:!1,isCommon:!1,letter:"B",name:"白俄罗斯",pinyin:["bai e luo si"]},{codes:["百慕大","百慕大群岛"],id:200,isChecked:!1,isCommon:!1,letter:"B",name:"百慕大",pinyin:["bai mu da"]},{codes:["保加利亚"],id:77,isChecked:!1,isCommon:!1,letter:"B",name:"保加利亚",pinyin:["bao jia li ya"]},{codes:["北马里亚纳","北马里亚纳群岛"],id:164,isChecked:!1,isCommon:!1,letter:"B",name:"北马里亚纳",pinyin:["bei ma li ya na"]},{codes:["北美","北美地区"],id:258,isChecked:!1,isCommon:!1,letter:"B",name:"北美",pinyin:["bei mei"]},{codes:["贝宁"],id:123,isChecked:!1,isCommon:!1,letter:"B",name:"贝宁",pinyin:["bei ning"]},{codes:["比利时"],id:72,isChecked:!1,isCommon:!1,letter:"B",name:"比利时",pinyin:["bi li shi"]},{codes:["冰岛"],id:52,isChecked:!1,isCommon:!1,letter:"B",name:"冰岛",pinyin:["bing dao"]},{codes:["博茨瓦纳"],id:131,isChecked:!1,isCommon:!1,letter:"B",name:"博茨瓦纳",pinyin:["bo ci wa na"]},{codes:["波多黎各"],id:189,isChecked:!1,isCommon:!1,letter:"B",name:"波多黎各",pinyin:["bo duo li ge"]},{codes:["波黑"],id:214,isChecked:!1,isCommon:!1,letter:"B",name:"波黑",pinyin:["bo hei"]},{codes:["波兰"],id:61,isChecked:!1,isCommon:!1,letter:"B",name:"波兰",pinyin:["bo lan"]},{codes:["玻利维亚"],id:208,isChecked:!1,isCommon:!1,letter:"B",name:"玻利维亚",pinyin:["bo li wei ya"]},{codes:["伯利兹"],id:170,isChecked:!1,isCommon:!1,letter:"B",name:"伯利兹",pinyin:["bo li zi"]},{codes:["博内尔岛","博内尔岛、圣尤斯特歇斯和萨巴岛"],id:241,isChecked:!1,isCommon:!1,letter:"B",name:"博内尔岛",pinyin:["bo nei er dao"]},{codes:["波斯尼亚和墨塞哥维那"],id:84,isChecked:!1,isCommon:!1,letter:"B",name:"波斯尼亚和墨塞哥维那",pinyin:["bo si ni ya he mo sai ge wei na"]},{codes:["不丹"],id:18,isChecked:!1,isCommon:!1,letter:"B",name:"不丹",pinyin:["bu dan"]},{codes:["布基纳法索"],id:114,isChecked:!1,isCommon:!1,letter:"B",name:"布基纳法索",pinyin:["bu ji na fa suo"]},{codes:["布隆迪"],id:108,isChecked:!1,isCommon:!1,letter:"B",name:"布隆迪",pinyin:["bu long di"]},{codes:["朝鲜"],id:3,isChecked:!1,isCommon:!1,letter:"C",name:"朝鲜",pinyin:["chao xian"]},{codes:["赤道几内亚"],id:228,isChecked:!1,isCommon:!1,letter:"C",name:"赤道几内亚",pinyin:["chi dao ji nei ya"]},{codes:["丹麦"],id:53,isChecked:!1,isCommon:!1,letter:"D",name:"丹麦",pinyin:["dan mai"]},{codes:["德国"],id:65,isChecked:!1,isCommon:!0,letter:"D",name:"德国",pinyin:["de guo"]},{codes:["东帝汶"],id:16,isChecked:!1,isCommon:!1,letter:"D",name:"东帝汶",pinyin:["dong di wen"]},{codes:["东萨摩亚"],id:247,isChecked:!1,isCommon:!1,letter:"D",name:"东萨摩亚",pinyin:["dong sa mo ya"]},{codes:["多哥"],id:122,isChecked:!1,isCommon:!1,letter:"D",name:"多哥",pinyin:["duo ge"]},{codes:["多米尼加共和国","多米尼加"],id:180,isChecked:!1,isCommon:!1,letter:"D",name:"多米尼加共和国",pinyin:["duo mi ni jia gong he guo"]},{codes:["多米尼克"],id:183,isChecked:!1,isCommon:!1,letter:"D",name:"多米尼克",pinyin:["duo mi ni ke"]},{codes:["厄瓜多尔"],id:206,isChecked:!1,isCommon:!1,letter:"E",name:"厄瓜多尔",pinyin:["e gua duo er"]},{codes:["厄立特里亚"],id:101,isChecked:!1,isCommon:!1,letter:"E",name:"厄立特里亚",pinyin:["e li te li ya"]},{codes:["俄罗斯"],id:58,isChecked:!1,isCommon:!1,letter:"E",name:"俄罗斯",pinyin:["e luo si"]},{codes:["法国"],id:74,isChecked:!1,isCommon:!0,letter:"F",name:"法国",pinyin:["fa guo"]},{codes:["法罗群岛"],id:233,isChecked:!1,isCommon:!1,letter:"F",name:"法罗群岛",pinyin:["fa luo qun dao"]},{codes:["法属波利尼西亚"],id:158,isChecked:!1,isCommon:!1,letter:"F",name:"法属波利尼西亚",pinyin:["fa shu bo li ni xi ya"]},{codes:["法属圭亚那"],id:204,isChecked:!1,isCommon:!1,letter:"F",name:"法属圭亚那",pinyin:["fa shu gui ya na"]},{codes:["法属圣马丁"],id:237,isChecked:!1,isCommon:!1,letter:"F",name:"法属圣马丁",pinyin:["fa shu sheng ma ding"]},{codes:["梵蒂冈"],id:86,isChecked:!1,isCommon:!1,letter:"F",name:"梵蒂冈",pinyin:["fan di gang"]},{codes:["斐济"],id:153,isChecked:!1,isCommon:!1,letter:"F",name:"斐济",pinyin:["fei ji"]},{codes:["菲律宾"],id:6,isChecked:!1,isCommon:!0,letter:"F",name:"菲律宾",pinyin:["fei lv bin"]},{codes:["非洲","非洲地区"],id:257,isChecked:!1,isCommon:!1,letter:"F",name:"非洲",pinyin:["fei zhou"]},{codes:["芬兰"],id:49,isChecked:!1,isCommon:!1,letter:"F",name:"芬兰",pinyin:["fen lan"]},{codes:["佛得角"],id:117,isChecked:!1,isCommon:!1,letter:"F",name:"佛得角",pinyin:["fu de jiao"]},{codes:["福克兰群岛","马尔维纳斯群岛"],id:244,isChecked:!1,isCommon:!1,letter:"F",name:"福克兰群岛",pinyin:["fu ke lan qun dao"]},{codes:["冈比亚"],id:112,isChecked:!1,isCommon:!1,letter:"G",name:"冈比亚",pinyin:["gang bi ya"]},{codes:["刚果共和国","刚果布"],id:225,isChecked:!1,isCommon:!1,letter:"G",name:"刚果共和国",pinyin:["gang guo gong he guo"]},{codes:["刚果民主共和国","刚果金"],id:230,isChecked:!1,isCommon:!1,letter:"G",name:"刚果民主共和国",pinyin:["gang guo min zhu gong he guo"]},{codes:["格林纳达"],id:186,isChecked:!1,isCommon:!1,letter:"G",name:"格林纳达",pinyin:["ge lin na da"]},{codes:["格陵兰","格陵兰岛"],id:168,isChecked:!1,isCommon:!1,letter:"G",name:"格陵兰",pinyin:["ge ling lan"]},{codes:["格鲁吉亚"],id:44,isChecked:!1,isCommon:!1,letter:"G",name:"格鲁吉亚",pinyin:["ge lu ji ya"]},{codes:["哥伦比亚"],id:201,isChecked:!1,isCommon:!1,letter:"G",name:"哥伦比亚",pinyin:["ge lun bi ya"]},{codes:["哥斯达黎加"],id:174,isChecked:!1,isCommon:!1,letter:"G",name:"哥斯达黎加",pinyin:["ge si da li jia"]},{codes:["根西岛"],id:234,isChecked:!1,isCommon:!1,letter:"G",name:"根西岛",pinyin:["gen xi dao"]},{codes:["古巴"],id:177,isChecked:!1,isCommon:!1,letter:"G",name:"古巴",pinyin:["gu ba"]},{codes:["瓜德罗普","瓜德罗普岛"],id:194,isChecked:!1,isCommon:!1,letter:"G",name:"瓜德罗普",pinyin:["gua de luo pu"]},{codes:["关岛"],id:156,isChecked:!1,isCommon:!1,letter:"G",name:"关岛",pinyin:["guan dao"]},{codes:["圭亚那"],id:203,isChecked:!1,isCommon:!1,letter:"G",name:"圭亚那",pinyin:["gui ya na"]},{codes:["哈萨克斯坦"],id:24,isChecked:!1,isCommon:!1,letter:"H",name:"哈萨克斯坦",pinyin:["ha sa ke si tan"]},{codes:["海地"],id:179,isChecked:!1,isCommon:!1,letter:"H",name:"海地",pinyin:["hai de"]},{codes:["韩国"],id:4,isChecked:!1,isCommon:!0,letter:"H",name:"韩国",pinyin:["han guo"]},{codes:["荷兰"],id:71,isChecked:!1,isCommon:!1,letter:"H",name:"荷兰",pinyin:["he lan"]},{codes:["荷属安的列斯","安的列斯"],id:196,isChecked:!1,isCommon:!1,letter:"H",name:"荷属安的列斯",pinyin:["he shu an de lie si"]},{codes:["荷属圣马丁"],id:251,isChecked:!1,isCommon:!1,letter:"H",name:"荷属圣马丁",pinyin:["he shu sheng ma ding"]},{codes:["黑山"],id:219,isChecked:!1,isCommon:!1,letter:"H",name:"黑山",pinyin:["hei shan"]},{codes:["洪都拉斯"],id:172,isChecked:!1,isCommon:!1,letter:"H",name:"洪都拉斯",pinyin:["hong dou la si"]},{codes:["吉布提"],id:103,isChecked:!1,isCommon:!1,letter:"J",name:"吉布提",pinyin:["ji bu ti"]},{codes:["吉尔吉斯斯坦"],id:25,isChecked:!1,isCommon:!1,letter:"J",name:"吉尔吉斯斯坦",pinyin:["ji er ji si si tan"]},{codes:["基里巴斯"],id:150,isChecked:!1,isCommon:!1,letter:"J",name:"基里巴斯",pinyin:["ji li ba si"]},{codes:["几内亚"],id:115,isChecked:!1,isCommon:!1,letter:"J",name:"几内亚",pinyin:["ji nei ya"]},{codes:["几内亚比绍"],id:116,isChecked:!1,isCommon:!1,letter:"J",name:"几内亚比绍",pinyin:["ji nei ya bi shao"]},{codes:["加纳"],id:121,isChecked:!1,isCommon:!1,letter:"J",name:"加纳",pinyin:["jia na"]},{codes:["加拿大"],id:165,isChecked:!1,isCommon:!0,letter:"J",name:"加拿大",pinyin:["jia na da"]},{codes:["加那利群岛"],id:125,isChecked:!1,isCommon:!1,letter:"J",name:"加那利群岛",pinyin:["jia na li qun dao"]},{codes:["加蓬"],id:223,isChecked:!1,isCommon:!1,letter:"J",name:"加蓬",pinyin:["jia peng"]},{codes:["柬埔寨"],id:9,isChecked:!1,isCommon:!0,letter:"J",name:"柬埔寨",pinyin:["jian pu zhai"]},{codes:["捷克"],id:62,isChecked:!1,isCommon:!1,letter:"J",name:"捷克",pinyin:["jie ke"]},{codes:["津巴布韦"],id:128,isChecked:!1,isCommon:!1,letter:"J",name:"津巴布韦",pinyin:["jin ba bu wei"]},{codes:["喀麦隆"],id:222,isChecked:!1,isCommon:!1,letter:"K",name:"喀麦隆",pinyin:["ka mai long"]},{codes:["卡塔尔"],id:39,isChecked:!1,isCommon:!1,letter:"K",name:"卡塔尔",pinyin:["ka ta er"]},{codes:["开曼群岛"],id:199,isChecked:!1,isCommon:!1,letter:"K",name:"开曼群岛",pinyin:["kai man qun dao"]},{codes:["克罗地亚"],id:83,isChecked:!1,isCommon:!1,letter:"K",name:"克罗地亚",pinyin:["ke luo de ya"]},{codes:["科摩罗"],id:137,isChecked:!1,isCommon:!1,letter:"K",name:"科摩罗",pinyin:["ke mo luo"]},{codes:["科索沃"],id:250,isChecked:!1,isCommon:!1,letter:"K",name:"科索沃",pinyin:["ke suo wo","Kosovo"]},{codes:["科特迪瓦"],id:120,isChecked:!1,isCommon:!1,letter:"K",name:"科特迪瓦",pinyin:["ke te di wa"]},{codes:["科威特"],id:40,isChecked:!1,isCommon:!1,letter:"K",name:"科威特",pinyin:["ke wei te"]},{codes:["肯尼亚"],id:104,isChecked:!1,isCommon:!1,letter:"K",name:"肯尼亚",pinyin:["ken ni ya"]},{codes:["库克群岛"],id:155,isChecked:!1,isCommon:!1,letter:"K",name:"库克群岛",pinyin:["ku ke qun dao"]},{codes:["库拉索"],id:240,isChecked:!1,isCommon:!1,letter:"K",name:"库拉索",pinyin:["ku la suo"]},{codes:["拉美","拉美地区"],id:259,isChecked:!1,isCommon:!1,letter:"L",name:"拉美",pinyin:["la mei"]},{codes:["拉脱维亚"],id:55,isChecked:!1,isCommon:!1,letter:"L",name:"拉脱维亚",pinyin:["la tuo wei ya"]},{codes:["莱索托"],id:135,isChecked:!1,isCommon:!1,letter:"L",name:"莱索托",pinyin:["lai suo tuo"]},{codes:["老挝"],id:8,isChecked:!1,isCommon:!1,letter:"L",name:"老挝",pinyin:["lao wo"]},{codes:["黎巴嫩"],id:34,isChecked:!1,isCommon:!1,letter:"L",name:"黎巴嫩",pinyin:["li ba nen"]},{codes:["利比里亚"],id:119,isChecked:!1,isCommon:!1,letter:"L",name:"利比里亚",pinyin:["li bi li ya"]},{codes:["利比亚"],id:93,isChecked:!1,isCommon:!1,letter:"L",name:"利比亚",pinyin:["li bi ya"]},{codes:["立陶宛"],id:56,isChecked:!1,isCommon:!1,letter:"L",name:"立陶宛",pinyin:["li tao wan"]},{codes:["列支敦士登"],id:68,isChecked:!1,isCommon:!1,letter:"L",name:"列支敦士登",pinyin:["lie zhi dun shi deng"]},{codes:["留尼旺","留尼汪岛","留尼汪"],id:139,isChecked:!1,isCommon:!1,letter:"L",name:"留尼旺",pinyin:["liu ni wang"]},{codes:["卢森堡"],id:73,isChecked:!1,isCommon:!1,letter:"L",name:"卢森堡",pinyin:["lu sen bao"]},{codes:["卢旺达"],id:107,isChecked:!1,isCommon:!1,letter:"L",name:"卢旺达",pinyin:["lu wang da"]},{codes:["罗马尼亚"],id:76,isChecked:!1,isCommon:!1,letter:"L",name:"罗马尼亚",pinyin:["luo ma ni ya"]},{codes:["马达加斯加"],id:136,isChecked:!1,isCommon:!1,letter:"M",name:"马达加斯加",pinyin:["ma da jia si jia"]},{codes:["马德拉群岛"],id:99,isChecked:!1,isCommon:!1,letter:"M",name:"马德拉群岛",pinyin:["ma de la qun dao"]},{codes:["马尔代夫"],id:23,isChecked:!1,isCommon:!1,letter:"M",name:"马尔代夫",pinyin:["ma er dai fu"]},{codes:["马耳他"],id:88,isChecked:!1,isCommon:!1,letter:"M",name:"马耳他",pinyin:["ma er ta"]},{codes:["马拉维"],id:129,isChecked:!1,isCommon:!1,letter:"M",name:"马拉维",pinyin:["ma la wei"]},{codes:["马来西亚"],id:12,isChecked:!1,isCommon:!0,letter:"M",name:"马来西亚",pinyin:["ma lai xi ya"]},{codes:["马里"],id:113,isChecked:!1,isCommon:!1,letter:"M",name:"马里",pinyin:["ma li"]},{codes:["北马其顿","马其顿"],id:79,isChecked:!1,isCommon:!1,letter:"M",name:"北马其顿",pinyin:["ma qi dun"]},{codes:["马绍尔群岛"],id:147,isChecked:!1,isCommon:!1,letter:"M",name:"马绍尔群岛",pinyin:["ma shao er qun dao"]},{codes:["马提尼克"],id:195,isChecked:!1,isCommon:!1,letter:"M",name:"马提尼克",pinyin:["ma ti ni ke"]},{codes:["法属马约特岛","马约特岛","马约特"],id:249,isChecked:!1,isCommon:!1,letter:"M",name:"马约特岛",pinyin:["ma yue te dao"]},{codes:["毛里求斯"],id:138,isChecked:!1,isCommon:!1,letter:"M",name:"毛里求斯",pinyin:["mao li qiu si"]},{codes:["毛里塔尼亚","毛利塔尼亚"],id:229,isChecked:!1,isCommon:!1,letter:"M",name:"毛里塔尼亚",pinyin:["mao li ta ni ya"]},{codes:["美国"],id:166,isChecked:!1,isCommon:!0,letter:"M",name:"美国",pinyin:["mei guo"]},{codes:["美属萨摩亚"],id:163,isChecked:!1,isCommon:!1,letter:"M",name:"美属萨摩亚",pinyin:["mei shu sa mo ya"]},{codes:["美属维尔京群岛","维尔京群岛（美国）","美属维尔京群岛"],id:191,isChecked:!1,isCommon:!1,letter:"M",name:"美属维尔京群岛",pinyin:["mei shu wei er jing qun dao"]},{codes:["蒙古"],id:2,isChecked:!1,isCommon:!1,letter:"M",name:"蒙古",pinyin:["meng gu"]},{codes:["孟加拉国","孟加拉"],id:19,isChecked:!1,isCommon:!1,letter:"M",name:"孟加拉国",pinyin:["meng jia la guo"]},{codes:["蒙特塞拉特岛","蒙塞拉特岛","蒙特塞拉特"],id:193,isChecked:!1,isCommon:!1,letter:"M",name:"蒙特塞拉特岛",pinyin:["meng te sai la te dao"]},{codes:["密克罗尼西亚","密克罗尼西亚联邦"],id:146,isChecked:!1,isCommon:!1,letter:"M",name:"密克罗尼西亚",pinyin:["mi ke luo ni xi ya"]},{codes:["秘鲁"],id:207,isChecked:!1,isCommon:!1,letter:"M",name:"秘鲁",pinyin:["mi lu"]},{codes:["缅甸"],id:10,isChecked:!1,isCommon:!0,letter:"M",name:"缅甸",pinyin:["mian dian"]},{codes:["摩尔多瓦"],id:60,isChecked:!1,isCommon:!1,letter:"M",name:"摩尔多瓦",pinyin:["mo er duo wa"]},{codes:["摩洛哥"],id:97,isChecked:!1,isCommon:!1,letter:"M",name:"摩洛哥",pinyin:["mo luo ge"]},{codes:["摩纳哥"],id:75,isChecked:!1,isCommon:!1,letter:"M",name:"摩纳哥",pinyin:["mo na ge"]},{codes:["莫桑比克"],id:130,isChecked:!1,isCommon:!1,letter:"M",name:"莫桑比克",pinyin:["mo sang bi ke"]},{codes:["墨西哥"],id:167,isChecked:!1,isCommon:!0,letter:"M",name:"墨西哥",pinyin:["mo xi ge"]},{codes:["纳米比亚"],id:132,isChecked:!1,isCommon:!1,letter:"N",name:"纳米比亚",pinyin:["na mi bi ya"]},{codes:["南非"],id:133,isChecked:!1,isCommon:!1,letter:"N",name:"南非",pinyin:["nan fei"]},{codes:["南极洲"],id:253,isChecked:!1,isCommon:!1,letter:"N",name:"南极洲",pinyin:["nan ji zhou"]},{codes:["南乔治亚岛和南桑威奇群岛"],id:252,isChecked:!1,isCommon:!1,letter:"N",name:"南乔治亚岛和南桑威奇群岛",pinyin:["nan qiao zhi ya dao he nan sang wei qi qun dao","South Georgia and The South Sandwich Islands","SGSSI"]},{codes:["南苏丹"],id:227,isChecked:!1,isCommon:!1,letter:"N",name:"南苏丹",pinyin:["nan su dan"]},{codes:["瑙鲁"],id:149,isChecked:!1,isCommon:!1,letter:"N",name:"瑙鲁",pinyin:["nao lu"]},{codes:["尼加拉瓜"],id:173,isChecked:!1,isCommon:!1,letter:"N",name:"尼加拉瓜",pinyin:["ni jia la gua"]},{codes:["尼泊尔"],id:17,isChecked:!1,isCommon:!1,letter:"N",name:"尼泊尔",pinyin:["ni po er"]},{codes:["尼日尔"],id:124,isChecked:!1,isCommon:!1,letter:"N",name:"尼日尔",pinyin:["ni ri er"]},{codes:["尼日利亚"],id:221,isChecked:!1,isCommon:!1,letter:"N",name:"尼日利亚",pinyin:["ni ri li ya"]},{codes:["纽埃"],id:161,isChecked:!1,isCommon:!1,letter:"N",name:"纽埃",pinyin:["niu ai"]},{codes:["诺福克岛"],id:248,isChecked:!1,isCommon:!1,letter:"N",name:"诺福克岛",pinyin:["nuo fu ke dao"]},{codes:["挪威"],id:51,isChecked:!1,isCommon:!1,letter:"N",name:"挪威",pinyin:["nuo wei"]},{codes:["欧洲"],id:256,isChecked:!1,isCommon:!1,letter:"O",name:"欧洲",pinyin:["ou zhou"]},{codes:["帕劳"],id:148,isChecked:!1,isCommon:!1,letter:"P",name:"帕劳",pinyin:["pa lao"]},{codes:["皮特凯恩岛"],id:159,isChecked:!1,isCommon:!1,letter:"P",name:"皮特凯恩岛",pinyin:["pi te kai en dao"]},{codes:["葡萄牙"],id:90,isChecked:!1,isCommon:!1,letter:"P",name:"葡萄牙",pinyin:["pu tao ya"]},{codes:["日本"],id:5,isChecked:!1,isCommon:!0,letter:"R",name:"日本",pinyin:["ri ben"]},{codes:["瑞典"],id:50,isChecked:!1,isCommon:!1,letter:"R",name:"瑞典",pinyin:["rui dian"]},{codes:["瑞士"],id:67,isChecked:!1,isCommon:!1,letter:"R",name:"瑞士",pinyin:["rui shi"]},{codes:["萨尔瓦多"],id:171,isChecked:!1,isCommon:!1,letter:"S",name:"萨尔瓦多",pinyin:["sa er wa duo"]},{codes:["萨摩亚"],id:152,isChecked:!1,isCommon:!1,letter:"S",name:"萨摩亚",pinyin:["sa mo ya"]},{codes:["塞尔维亚"],id:78,isChecked:!1,isCommon:!1,letter:"S",name:"塞尔维亚",pinyin:["sai er wei ya"]},{codes:["塞拉利昂"],id:118,isChecked:!1,isCommon:!1,letter:"S",name:"塞拉利昂",pinyin:["sai la li ang"]},{codes:["塞内加尔"],id:111,isChecked:!1,isCommon:!1,letter:"S",name:"塞内加尔",pinyin:["sai nei jia er"]},{codes:["塞浦路斯"],id:48,isChecked:!1,isCommon:!1,letter:"S",name:"塞浦路斯",pinyin:["sai pu lu si"]},{codes:["塞舌尔"],id:109,isChecked:!1,isCommon:!1,letter:"S",name:"塞舌尔",pinyin:["sai she er"]},{codes:["沙特阿拉伯"],id:37,isChecked:!1,isCommon:!1,letter:"S",name:"沙特阿拉伯",pinyin:["sha te a la bo"]},{codes:["圣巴泰勒米岛","圣巴泰勒米"],id:243,isChecked:!1,isCommon:!1,letter:"S",name:"圣巴泰勒米岛",pinyin:["sheng ba tai lei mi dao"]},{codes:["圣诞岛"],id:255,isChecked:!1,isCommon:!1,letter:"S",name:"圣诞岛",pinyin:["sheng dan dao"]},{codes:["圣多美及普林西比","圣多美和普林西比"],id:110,isChecked:!1,isCommon:!1,letter:"S",name:"圣多美及普林西比",pinyin:["sheng duo mei ji pu lin xi bi"]},{codes:["圣赫勒拿"],id:140,isChecked:!1,isCommon:!1,letter:"S",name:"圣赫勒拿",pinyin:["sheng he lei na"]},{codes:["圣基茨和尼维斯"],id:182,isChecked:!1,isCommon:!1,letter:"S",name:"圣基茨和尼维斯",pinyin:["sheng ji ci he ni wei si"]},{codes:["圣卢西亚"],id:184,isChecked:!1,isCommon:!1,letter:"S",name:"圣卢西亚",pinyin:["sheng lu xi ya"]},{codes:["圣马丁岛","圣马丁","圣马丁岛（荷兰部分）"],id:242,isChecked:!1,isCommon:!1,letter:"S",name:"圣马丁岛",pinyin:["sheng ma ding dao"]},{codes:["圣马力诺"],id:87,isChecked:!1,isCommon:!1,letter:"S",name:"圣马力诺",pinyin:["sheng ma li nuo"]},{codes:["圣皮埃尔和密克隆群岛"],id:236,isChecked:!1,isCommon:!1,letter:"S",name:"圣皮埃尔和密克隆群岛",pinyin:["sheng pi ai er he mi ke long qun dao"]},{codes:["圣文森特和格林纳丁斯"],id:185,isChecked:!1,isCommon:!1,letter:"S",name:"圣文森特和格林纳丁斯",pinyin:["sheng wen sen te he ge lin na ding si"]},{codes:["斯里兰卡"],id:22,isChecked:!1,isCommon:!1,letter:"S",name:"斯里兰卡",pinyin:["si li lan ka"]},{codes:["斯洛伐克"],id:63,isChecked:!1,isCommon:!1,letter:"S",name:"斯洛伐克",pinyin:["si luo fa ke"]},{codes:["斯洛文尼亚"],id:82,isChecked:!1,isCommon:!1,letter:"S",name:"斯洛文尼亚",pinyin:["si luo wen ni ya"]},{codes:["斯威士兰"],id:134,isChecked:!1,isCommon:!1,letter:"S",name:"斯威士兰",pinyin:["si wei shi lan"]},{codes:["苏丹"],id:94,isChecked:!1,isCommon:!1,letter:"S",name:"苏丹",pinyin:["su dan"]},{codes:["苏里南"],id:205,isChecked:!1,isCommon:!1,letter:"S",name:"苏里南",pinyin:["su li nan"]},{codes:["所罗门群岛"],id:144,isChecked:!1,isCommon:!1,letter:"S",name:"所罗门群岛",pinyin:["suo luo men qun dao"]},{codes:["索马里"],id:102,isChecked:!1,isCommon:!1,letter:"S",name:"索马里",pinyin:["suo ma li"]},{codes:["塔吉克斯坦"],id:26,isChecked:!1,isCommon:!1,letter:"T",name:"塔吉克斯坦",pinyin:["ta ji ke si tan"]},{codes:["泰国"],id:11,isChecked:!1,isCommon:!0,letter:"T",name:"泰国",pinyin:["tai guo"]},{codes:["坦桑尼亚"],id:105,isChecked:!1,isCommon:!1,letter:"T",name:"坦桑尼亚",pinyin:["tan sang ni ya"]},{codes:["汤加"],id:154,isChecked:!1,isCommon:!1,letter:"T",name:"汤加",pinyin:["tang jia"]},{codes:["特克斯和凯科斯群岛"],id:198,isChecked:!1,isCommon:!1,letter:"T",name:"特克斯和凯科斯群岛",pinyin:["te ke si he kai ke si qun dao"]},{codes:["特立尼达和多巴哥"],id:188,isChecked:!1,isCommon:!1,letter:"T",name:"特立尼达和多巴哥",pinyin:["te li ni da he duo ba ge"]},{codes:["土耳其"],id:47,isChecked:!1,isCommon:!1,letter:"T",name:"土耳其",pinyin:["tu er qi"]},{codes:["土库曼斯坦"],id:28,isChecked:!1,isCommon:!1,letter:"T",name:"土库曼斯坦",pinyin:["tu ku man si tan"]},{codes:["突尼斯"],id:95,isChecked:!1,isCommon:!1,letter:"T",name:"突尼斯",pinyin:["tu ni si"]},{codes:["图瓦卢"],id:151,isChecked:!1,isCommon:!1,letter:"T",name:"图瓦卢",pinyin:["tu wa lu"]},{codes:["托克劳","托克劳群岛"],id:162,isChecked:!1,isCommon:!1,letter:"T",name:"托克劳",pinyin:["tuo ke lao"]},{codes:["瓦利斯与富图纳","瓦利斯和富图纳群岛","瓦利斯群岛和富图纳群岛"],id:160,isChecked:!1,isCommon:!1,letter:"W",name:"瓦利斯与富图纳",pinyin:["wa li si yu fu tu na"]},{codes:["瓦努阿图共和国","瓦努阿图"],id:145,isChecked:!1,isCommon:!1,letter:"W",name:"瓦努阿图共和国",pinyin:["wa nu a tu gong he guo"]},{codes:["危地马拉"],id:169,isChecked:!1,isCommon:!1,letter:"W",name:"危地马拉",pinyin:["wei de ma la"]},{codes:["委内瑞拉"],id:202,isChecked:!1,isCommon:!1,letter:"W",name:"委内瑞拉",pinyin:["wei nei rui la"]},{codes:["文莱"],id:13,isChecked:!1,isCommon:!1,letter:"W",name:"文莱",pinyin:["wen lai"]},{codes:["乌干达"],id:106,isChecked:!1,isCommon:!1,letter:"W",name:"乌干达",pinyin:["wu gan da"]},{codes:["乌克兰"],id:59,isChecked:!1,isCommon:!1,letter:"W",name:"乌克兰",pinyin:["wu ke lan"]},{codes:["乌拉圭"],id:212,isChecked:!1,isCommon:!1,letter:"W",name:"乌拉圭",pinyin:["wu la gui"]},{codes:["乌兹别克斯坦"],id:27,isChecked:!1,isCommon:!1,letter:"W",name:"乌兹别克斯坦",pinyin:["wu zi bie ke si tan"]},{codes:["西班牙"],id:89,isChecked:!1,isCommon:!1,letter:"X",name:"西班牙",pinyin:["xi ban ya"]},{codes:["希腊"],id:81,isChecked:!1,isCommon:!1,letter:"X",name:"希腊",pinyin:["xi la"]},{codes:["新加坡"],id:14,isChecked:!1,isCommon:!0,letter:"X",name:"新加坡",pinyin:["xin jia po"]},{codes:["新喀里多尼亚","新喀里多尼亚群岛"],id:157,isChecked:!1,isCommon:!1,letter:"X",name:"新喀里多尼亚",pinyin:["xin ka li duo ni ya"]},{codes:["新西兰"],id:142,isChecked:!1,isCommon:!1,letter:"X",name:"新西兰",pinyin:["xin xi lan"]},{codes:["匈牙利"],id:64,isChecked:!1,isCommon:!1,letter:"X",name:"匈牙利",pinyin:["xiong ya li"]},{codes:["叙利亚"],id:32,isChecked:!1,isCommon:!1,letter:"X",name:"叙利亚",pinyin:["xu li ya"]},{codes:["牙买加"],id:178,isChecked:!1,isCommon:!1,letter:"Y",name:"牙买加",pinyin:["ya mai jia"]},{codes:["亚美尼亚"],id:45,isChecked:!1,isCommon:!1,letter:"Y",name:"亚美尼亚",pinyin:["ya mei ni ya"]},{codes:["亚速尔群岛"],id:98,isChecked:!1,isCommon:!1,letter:"Y",name:"亚速尔群岛",pinyin:["ya su er qun dao"]},{codes:["亚太","亚太地区"],id:260,isChecked:!1,isCommon:!1,letter:"Y",name:"亚太",pinyin:["ya tai"]},{codes:["也门"],id:43,isChecked:!1,isCommon:!1,letter:"Y",name:"也门",pinyin:["ye men"]},{codes:["意大利"],id:85,isChecked:!1,isCommon:!0,letter:"Y",name:"意大利",pinyin:["yi da li"]},{codes:["伊拉克"],id:30,isChecked:!1,isCommon:!1,letter:"Y",name:"伊拉克",pinyin:["yi la ke"]},{codes:["伊朗"],id:31,isChecked:!1,isCommon:!1,letter:"Y",name:"伊朗",pinyin:["yi lang"]},{codes:["以色列"],id:35,isChecked:!1,isCommon:!1,letter:"Y",name:"以色列",pinyin:["yi se lie"]},{codes:["印度"],id:20,isChecked:!1,isCommon:!0,letter:"Y",name:"印度",pinyin:["yin du"]},{codes:["印度尼西亚"],id:15,isChecked:!1,isCommon:!0,letter:"Y",name:"印度尼西亚",pinyin:["yin du ni xi ya"]},{codes:["英国"],id:69,isChecked:!1,isCommon:!0,letter:"Y",name:"英国",pinyin:["ying guo"]},{codes:["英属马恩岛","马恩岛"],id:220,isChecked:!1,isCommon:!1,letter:"Y",name:"英属马恩岛",pinyin:["ying shu ma en dao"]},{codes:["英属维尔京群岛","英属维京群岛"],id:190,isChecked:!1,isCommon:!1,letter:"Y",name:"英属维尔京群岛",pinyin:["ying shu wei er jing qun dao"]},{codes:["英属印度洋领地"],id:246,isChecked:!1,isCommon:!1,letter:"Y",name:"英属印度洋领地",pinyin:["ying shu yin du yang ling de"]},{codes:["约旦"],id:33,isChecked:!1,isCommon:!1,letter:"Y",name:"约旦",pinyin:["yue dan"]},{codes:["越南"],id:7,isChecked:!1,isCommon:!0,letter:"Y",name:"越南",pinyin:["yue nan"]},{codes:["赞比亚"],id:126,isChecked:!1,isCommon:!1,letter:"Z",name:"赞比亚",pinyin:["zan bi ya"]},{codes:["泽西岛"],id:218,isChecked:!1,isCommon:!1,letter:"Z",name:"泽西岛",pinyin:["ze xi dao"]},{codes:["乍得"],id:224,isChecked:!1,isCommon:!1,letter:"Z",name:"乍得",pinyin:["zha de"]},{codes:["直布罗陀"],id:215,isChecked:!1,isCommon:!1,letter:"Z",name:"直布罗陀",pinyin:["zhi bu luo tuo"]},{codes:["智利"],id:210,isChecked:!1,isCommon:!1,letter:"Z",name:"智利",pinyin:["zhi li"]},{codes:["中非共和国","中非"],id:226,isChecked:!1,isCommon:!1,letter:"Z",name:"中非共和国",pinyin:["zhong fei gong he guo"]},{codes:["中国","中华人民共和国"],id:1,isChecked:!1,isCommon:!0,letter:"Z",name:"中国",pinyin:["zhong guo"]},{codes:["中国内地","中国大陆"],id:264,isChecked:!1,isCommon:!0,letter:"Z",name:"中国内地",pinyin:["zhong guo nei di","zhong guo da lu"]},{codes:["中国香港","香港","香港特别行政区","Hongkong"],id:261,isChecked:!1,isCommon:!0,letter:"Z",name:"中国香港",pinyin:["zhong guo xiang gang","Hongkong"]},{codes:["中国澳门","澳门","澳门特别行政区","Macao"],id:263,isChecked:!1,isCommon:!0,letter:"Z",name:"中国澳门",pinyin:["zhong guo ao men","ao men","Macao"]},{codes:["中国台湾","台湾","台湾地区","Taiwan"],id:262,isChecked:!1,isCommon:!0,letter:"Z",name:"中国台湾",pinyin:["zhong guo tai wan","tai wan","Taiwan"]}]),s=B([{id:209,name:"巴西"},{id:65,name:"德国"}]),o=J(()=>{const g={};return n.value.forEach(v=>{g[v.letter]||(g[v.letter]=[]),g[v.letter].push(v)}),Object.keys(g).sort().map(v=>({letter:v,list:g[v].sort((O,y)=>O.pinyin[0].localeCompare(y.pinyin[0]))}))}),a=[{name:"常用",letters:[]},{name:"ABC",letters:["A","B","C"]},{name:"DEF",letters:["D","E","F"]},{name:"GHI",letters:["G","H","I"]},{name:"JKL",letters:["J","K","L"]},{name:"MNO",letters:["M","N","O"]},{name:"PQR",letters:["P","Q","R"]},{name:"STU",letters:["S","T","U"]},{name:"VWX",letters:["V","W","X"]},{name:"YZ",letters:["Y","Z"]}],l=B("常用"),c=Ze(i,"choose"),f=g=>{const v=c.value.indexOf(g);v===-1?c.value.push(g):c.value.splice(v,1),console.log(c.value)},h=()=>{t.value=!1};return(g,v)=>{const O=_e,y=Sp,S=Te,w=ze,_=Pt;return L(),W(_,{show:t.value,"onUpdate:show":v[1]||(v[1]=$=>t.value=$)},{default:p(()=>[d(w,{style:{width:"600px"},title:"选择区域",bordered:!1,size:"huge"},{"header-extra":p(()=>[U("span",{onClick:v[0]||(v[0]=()=>t.value=!1)},[d(O,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),action:p(()=>[d(S,{type:"primary",onClick:h},{default:p(()=>v[3]||(v[3]=[X("确定")])),_:1})]),default:p(()=>{var $;return[U("div",GA,[(L(),te(Ce,null,Ot(a,A=>U("button",{key:A.name,class:Ln(["tab-btn",{active:l.value===A.name}]),onClick:R=>l.value=A.name},Q(A.name),11,JA)),64))]),U("div",KA,[l.value==="常用"?(L(),te("div",eN,[v[2]||(v[2]=U("h3",null,"常用",-1)),U("ul",null,[(L(!0),te(Ce,null,Ot(s.value,A=>(L(),te("li",{key:A.id},[U("span",{class:Ln(["inline-block whitespace-nowrap overflow-x-auto cursor-pointer px-2 py-1 rounded",{"bg-green-500 text-white":c.value.includes(A.id)}]),onClick:R=>f(A.id)},[d(y,{style:{"max-width":"100px"}},{default:p(()=>[X(Q(A.name),1)]),_:2},1024)],10,tN)]))),128))])])):(L(!0),te(Ce,{key:1},Ot((($=a.find(A=>A.name===l.value))==null?void 0:$.letters)||[],A=>{var R;return L(),te("div",{key:A,class:"group"},[U("h3",null,Q(A),1),U("ul",null,[(L(!0),te(Ce,null,Ot(((R=o.value.find(k=>k.letter===A))==null?void 0:R.list)||[],k=>(L(),te("li",{key:k.id},[U("span",{class:Ln(["cursor-pointer px-2 rounded text-xs",{"bg-green-500 text-white":c.value.includes(k.id)}]),style:{height:"24px","line-height":"24px",display:"inline-block"},onClick:x=>f(k.id)},[d(y,{style:{"max-width":"70px"}},{default:p(()=>[X(Q(k.name),1)]),_:2},1024)],10,nN)]))),128))])])}),128))])]}),_:1})]),_:1},8,["show"])}}}),iN=ce(sN,[["__scopeId","data-v-6baf39cc"]]),oN=["onClick"],aN=ae({name:"ChooseCountries",__name:"choose-countries",props:{choose:{default:[]},chooseModifiers:{}},emits:["update:choose"],setup(i){const e=B(!1),t=B([{codes:["阿尔巴尼亚"],id:80,isChecked:!1,isCommon:!1,letter:"A",name:"阿尔巴尼亚",pinyin:["a er ba ni ya"]},{codes:["阿尔及利亚"],id:96,isChecked:!1,isCommon:!1,letter:"A",name:"阿尔及利亚",pinyin:["a er ji li ya"]},{codes:["阿富汗"],id:29,isChecked:!1,isCommon:!1,letter:"A",name:"阿富汗",pinyin:["a fu han"]},{codes:["阿根廷"],id:211,isChecked:!1,isCommon:!0,letter:"A",name:"阿根廷",pinyin:["a gen ting"]},{codes:["阿拉伯联合酋长国","阿联酋"],id:41,isChecked:!1,isCommon:!1,letter:"A",name:"阿拉伯联合酋长国",pinyin:["a la bo lian he qiu zhang guo"]},{codes:["阿鲁巴"],id:197,isChecked:!1,isCommon:!1,letter:"A",name:"阿鲁巴",pinyin:["a lu ba"]},{codes:["阿曼"],id:42,isChecked:!1,isCommon:!1,letter:"A",name:"阿曼",pinyin:["a man"]},{codes:["阿塞拜疆"],id:46,isChecked:!1,isCommon:!1,letter:"A",name:"阿塞拜疆",pinyin:["a sai bai jiang"]},{codes:["阿森松岛"],id:254,isChecked:!1,isCommon:!1,letter:"A",name:"阿森松岛",pinyin:["a sen song dao","Ascension Island"]},{codes:["爱尔兰"],id:70,isChecked:!1,isCommon:!1,letter:"A",name:"爱尔兰",pinyin:["ai er lan"]},{codes:["埃及"],id:92,isChecked:!1,isCommon:!1,letter:"A",name:"埃及",pinyin:["ai ji"]},{codes:["埃塞俄比亚"],id:100,isChecked:!1,isCommon:!1,letter:"A",name:"埃塞俄比亚",pinyin:["ai sai e bi ya"]},{codes:["爱沙尼亚"],id:54,isChecked:!1,isCommon:!1,letter:"A",name:"爱沙尼亚",pinyin:["ai sha ni ya"]},{codes:["安道尔共和国","安道尔"],id:91,isChecked:!1,isCommon:!1,letter:"A",name:"安道尔共和国",pinyin:["an dao er gong he guo"]},{codes:["安哥拉"],id:127,isChecked:!1,isCommon:!1,letter:"A",name:"安哥拉",pinyin:["an ge la"]},{codes:["安圭拉"],id:192,isChecked:!1,isCommon:!1,letter:"A",name:"安圭拉",pinyin:["an gui la"]},{codes:["安提瓜和巴布达"],id:181,isChecked:!1,isCommon:!1,letter:"A",name:"安提瓜和巴布达",pinyin:["an ti gua he ba bu da"]},{codes:["澳大利亚"],id:141,isChecked:!1,isCommon:!0,letter:"A",name:"澳大利亚",pinyin:["ao da li ya"]},{codes:["奥地利"],id:66,isChecked:!1,isCommon:!1,letter:"A",name:"奥地利",pinyin:["ao de li"]},{codes:["奥兰群岛"],id:238,isChecked:!1,isCommon:!1,letter:"A",name:"奥兰群岛",pinyin:["ao lan qun dao"]},{codes:["巴巴多斯"],id:187,isChecked:!1,isCommon:!1,letter:"B",name:"巴巴多斯",pinyin:["ba ba duo si"]},{codes:["巴布亚新几内亚"],id:143,isChecked:!1,isCommon:!1,letter:"B",name:"巴布亚新几内亚",pinyin:["ba bu ya xin ji nei ya"]},{codes:["巴哈马"],id:176,isChecked:!1,isCommon:!1,letter:"B",name:"巴哈马",pinyin:["ba ha ma"]},{codes:["巴基斯坦"],id:21,isChecked:!1,isCommon:!0,letter:"B",name:"巴基斯坦",pinyin:["ba ji si tan"]},{codes:["巴拉圭"],id:213,isChecked:!1,isCommon:!1,letter:"B",name:"巴拉圭",pinyin:["ba la gui"]},{codes:["巴勒斯坦"],id:36,isChecked:!1,isCommon:!1,letter:"B",name:"巴勒斯坦",pinyin:["ba lei si tan"]},{codes:["巴林"],id:38,isChecked:!1,isCommon:!1,letter:"B",name:"巴林",pinyin:["ba lin"]},{codes:["巴拿马"],id:175,isChecked:!1,isCommon:!1,letter:"B",name:"巴拿马",pinyin:["ba na ma"]},{codes:["巴西"],id:209,isChecked:!1,isCommon:!0,letter:"B",name:"巴西",pinyin:["ba xi"]},{codes:["白俄罗斯"],id:57,isChecked:!1,isCommon:!1,letter:"B",name:"白俄罗斯",pinyin:["bai e luo si"]},{codes:["百慕大","百慕大群岛"],id:200,isChecked:!1,isCommon:!1,letter:"B",name:"百慕大",pinyin:["bai mu da"]},{codes:["保加利亚"],id:77,isChecked:!1,isCommon:!1,letter:"B",name:"保加利亚",pinyin:["bao jia li ya"]},{codes:["北马里亚纳","北马里亚纳群岛"],id:164,isChecked:!1,isCommon:!1,letter:"B",name:"北马里亚纳",pinyin:["bei ma li ya na"]},{codes:["北美","北美地区"],id:258,isChecked:!1,isCommon:!1,letter:"B",name:"北美",pinyin:["bei mei"]},{codes:["贝宁"],id:123,isChecked:!1,isCommon:!1,letter:"B",name:"贝宁",pinyin:["bei ning"]},{codes:["比利时"],id:72,isChecked:!1,isCommon:!1,letter:"B",name:"比利时",pinyin:["bi li shi"]},{codes:["冰岛"],id:52,isChecked:!1,isCommon:!1,letter:"B",name:"冰岛",pinyin:["bing dao"]},{codes:["博茨瓦纳"],id:131,isChecked:!1,isCommon:!1,letter:"B",name:"博茨瓦纳",pinyin:["bo ci wa na"]},{codes:["波多黎各"],id:189,isChecked:!1,isCommon:!1,letter:"B",name:"波多黎各",pinyin:["bo duo li ge"]},{codes:["波黑"],id:214,isChecked:!1,isCommon:!1,letter:"B",name:"波黑",pinyin:["bo hei"]},{codes:["波兰"],id:61,isChecked:!1,isCommon:!1,letter:"B",name:"波兰",pinyin:["bo lan"]},{codes:["玻利维亚"],id:208,isChecked:!1,isCommon:!1,letter:"B",name:"玻利维亚",pinyin:["bo li wei ya"]},{codes:["伯利兹"],id:170,isChecked:!1,isCommon:!1,letter:"B",name:"伯利兹",pinyin:["bo li zi"]},{codes:["博内尔岛","博内尔岛、圣尤斯特歇斯和萨巴岛"],id:241,isChecked:!1,isCommon:!1,letter:"B",name:"博内尔岛",pinyin:["bo nei er dao"]},{codes:["波斯尼亚和墨塞哥维那"],id:84,isChecked:!1,isCommon:!1,letter:"B",name:"波斯尼亚和墨塞哥维那",pinyin:["bo si ni ya he mo sai ge wei na"]},{codes:["不丹"],id:18,isChecked:!1,isCommon:!1,letter:"B",name:"不丹",pinyin:["bu dan"]},{codes:["布基纳法索"],id:114,isChecked:!1,isCommon:!1,letter:"B",name:"布基纳法索",pinyin:["bu ji na fa suo"]},{codes:["布隆迪"],id:108,isChecked:!1,isCommon:!1,letter:"B",name:"布隆迪",pinyin:["bu long di"]},{codes:["朝鲜"],id:3,isChecked:!1,isCommon:!1,letter:"C",name:"朝鲜",pinyin:["chao xian"]},{codes:["赤道几内亚"],id:228,isChecked:!1,isCommon:!1,letter:"C",name:"赤道几内亚",pinyin:["chi dao ji nei ya"]},{codes:["丹麦"],id:53,isChecked:!1,isCommon:!1,letter:"D",name:"丹麦",pinyin:["dan mai"]},{codes:["德国"],id:65,isChecked:!1,isCommon:!0,letter:"D",name:"德国",pinyin:["de guo"]},{codes:["东帝汶"],id:16,isChecked:!1,isCommon:!1,letter:"D",name:"东帝汶",pinyin:["dong di wen"]},{codes:["东萨摩亚"],id:247,isChecked:!1,isCommon:!1,letter:"D",name:"东萨摩亚",pinyin:["dong sa mo ya"]},{codes:["多哥"],id:122,isChecked:!1,isCommon:!1,letter:"D",name:"多哥",pinyin:["duo ge"]},{codes:["多米尼加共和国","多米尼加"],id:180,isChecked:!1,isCommon:!1,letter:"D",name:"多米尼加共和国",pinyin:["duo mi ni jia gong he guo"]},{codes:["多米尼克"],id:183,isChecked:!1,isCommon:!1,letter:"D",name:"多米尼克",pinyin:["duo mi ni ke"]},{codes:["厄瓜多尔"],id:206,isChecked:!1,isCommon:!1,letter:"E",name:"厄瓜多尔",pinyin:["e gua duo er"]},{codes:["厄立特里亚"],id:101,isChecked:!1,isCommon:!1,letter:"E",name:"厄立特里亚",pinyin:["e li te li ya"]},{codes:["俄罗斯"],id:58,isChecked:!1,isCommon:!1,letter:"E",name:"俄罗斯",pinyin:["e luo si"]},{codes:["法国"],id:74,isChecked:!1,isCommon:!0,letter:"F",name:"法国",pinyin:["fa guo"]},{codes:["法罗群岛"],id:233,isChecked:!1,isCommon:!1,letter:"F",name:"法罗群岛",pinyin:["fa luo qun dao"]},{codes:["法属波利尼西亚"],id:158,isChecked:!1,isCommon:!1,letter:"F",name:"法属波利尼西亚",pinyin:["fa shu bo li ni xi ya"]},{codes:["法属圭亚那"],id:204,isChecked:!1,isCommon:!1,letter:"F",name:"法属圭亚那",pinyin:["fa shu gui ya na"]},{codes:["法属圣马丁"],id:237,isChecked:!1,isCommon:!1,letter:"F",name:"法属圣马丁",pinyin:["fa shu sheng ma ding"]},{codes:["梵蒂冈"],id:86,isChecked:!1,isCommon:!1,letter:"F",name:"梵蒂冈",pinyin:["fan di gang"]},{codes:["斐济"],id:153,isChecked:!1,isCommon:!1,letter:"F",name:"斐济",pinyin:["fei ji"]},{codes:["菲律宾"],id:6,isChecked:!1,isCommon:!0,letter:"F",name:"菲律宾",pinyin:["fei lv bin"]},{codes:["非洲","非洲地区"],id:257,isChecked:!1,isCommon:!1,letter:"F",name:"非洲",pinyin:["fei zhou"]},{codes:["芬兰"],id:49,isChecked:!1,isCommon:!1,letter:"F",name:"芬兰",pinyin:["fen lan"]},{codes:["佛得角"],id:117,isChecked:!1,isCommon:!1,letter:"F",name:"佛得角",pinyin:["fu de jiao"]},{codes:["福克兰群岛","马尔维纳斯群岛"],id:244,isChecked:!1,isCommon:!1,letter:"F",name:"福克兰群岛",pinyin:["fu ke lan qun dao"]},{codes:["冈比亚"],id:112,isChecked:!1,isCommon:!1,letter:"G",name:"冈比亚",pinyin:["gang bi ya"]},{codes:["刚果共和国","刚果布"],id:225,isChecked:!1,isCommon:!1,letter:"G",name:"刚果共和国",pinyin:["gang guo gong he guo"]},{codes:["刚果民主共和国","刚果金"],id:230,isChecked:!1,isCommon:!1,letter:"G",name:"刚果民主共和国",pinyin:["gang guo min zhu gong he guo"]},{codes:["格林纳达"],id:186,isChecked:!1,isCommon:!1,letter:"G",name:"格林纳达",pinyin:["ge lin na da"]},{codes:["格陵兰","格陵兰岛"],id:168,isChecked:!1,isCommon:!1,letter:"G",name:"格陵兰",pinyin:["ge ling lan"]},{codes:["格鲁吉亚"],id:44,isChecked:!1,isCommon:!1,letter:"G",name:"格鲁吉亚",pinyin:["ge lu ji ya"]},{codes:["哥伦比亚"],id:201,isChecked:!1,isCommon:!1,letter:"G",name:"哥伦比亚",pinyin:["ge lun bi ya"]},{codes:["哥斯达黎加"],id:174,isChecked:!1,isCommon:!1,letter:"G",name:"哥斯达黎加",pinyin:["ge si da li jia"]},{codes:["根西岛"],id:234,isChecked:!1,isCommon:!1,letter:"G",name:"根西岛",pinyin:["gen xi dao"]},{codes:["古巴"],id:177,isChecked:!1,isCommon:!1,letter:"G",name:"古巴",pinyin:["gu ba"]},{codes:["瓜德罗普","瓜德罗普岛"],id:194,isChecked:!1,isCommon:!1,letter:"G",name:"瓜德罗普",pinyin:["gua de luo pu"]},{codes:["关岛"],id:156,isChecked:!1,isCommon:!1,letter:"G",name:"关岛",pinyin:["guan dao"]},{codes:["圭亚那"],id:203,isChecked:!1,isCommon:!1,letter:"G",name:"圭亚那",pinyin:["gui ya na"]},{codes:["哈萨克斯坦"],id:24,isChecked:!1,isCommon:!1,letter:"H",name:"哈萨克斯坦",pinyin:["ha sa ke si tan"]},{codes:["海地"],id:179,isChecked:!1,isCommon:!1,letter:"H",name:"海地",pinyin:["hai de"]},{codes:["韩国"],id:4,isChecked:!1,isCommon:!0,letter:"H",name:"韩国",pinyin:["han guo"]},{codes:["荷兰"],id:71,isChecked:!1,isCommon:!1,letter:"H",name:"荷兰",pinyin:["he lan"]},{codes:["荷属安的列斯","安的列斯"],id:196,isChecked:!1,isCommon:!1,letter:"H",name:"荷属安的列斯",pinyin:["he shu an de lie si"]},{codes:["荷属圣马丁"],id:251,isChecked:!1,isCommon:!1,letter:"H",name:"荷属圣马丁",pinyin:["he shu sheng ma ding"]},{codes:["黑山"],id:219,isChecked:!1,isCommon:!1,letter:"H",name:"黑山",pinyin:["hei shan"]},{codes:["洪都拉斯"],id:172,isChecked:!1,isCommon:!1,letter:"H",name:"洪都拉斯",pinyin:["hong dou la si"]},{codes:["吉布提"],id:103,isChecked:!1,isCommon:!1,letter:"J",name:"吉布提",pinyin:["ji bu ti"]},{codes:["吉尔吉斯斯坦"],id:25,isChecked:!1,isCommon:!1,letter:"J",name:"吉尔吉斯斯坦",pinyin:["ji er ji si si tan"]},{codes:["基里巴斯"],id:150,isChecked:!1,isCommon:!1,letter:"J",name:"基里巴斯",pinyin:["ji li ba si"]},{codes:["几内亚"],id:115,isChecked:!1,isCommon:!1,letter:"J",name:"几内亚",pinyin:["ji nei ya"]},{codes:["几内亚比绍"],id:116,isChecked:!1,isCommon:!1,letter:"J",name:"几内亚比绍",pinyin:["ji nei ya bi shao"]},{codes:["加纳"],id:121,isChecked:!1,isCommon:!1,letter:"J",name:"加纳",pinyin:["jia na"]},{codes:["加拿大"],id:165,isChecked:!1,isCommon:!0,letter:"J",name:"加拿大",pinyin:["jia na da"]},{codes:["加那利群岛"],id:125,isChecked:!1,isCommon:!1,letter:"J",name:"加那利群岛",pinyin:["jia na li qun dao"]},{codes:["加蓬"],id:223,isChecked:!1,isCommon:!1,letter:"J",name:"加蓬",pinyin:["jia peng"]},{codes:["柬埔寨"],id:9,isChecked:!1,isCommon:!0,letter:"J",name:"柬埔寨",pinyin:["jian pu zhai"]},{codes:["捷克"],id:62,isChecked:!1,isCommon:!1,letter:"J",name:"捷克",pinyin:["jie ke"]},{codes:["津巴布韦"],id:128,isChecked:!1,isCommon:!1,letter:"J",name:"津巴布韦",pinyin:["jin ba bu wei"]},{codes:["喀麦隆"],id:222,isChecked:!1,isCommon:!1,letter:"K",name:"喀麦隆",pinyin:["ka mai long"]},{codes:["卡塔尔"],id:39,isChecked:!1,isCommon:!1,letter:"K",name:"卡塔尔",pinyin:["ka ta er"]},{codes:["开曼群岛"],id:199,isChecked:!1,isCommon:!1,letter:"K",name:"开曼群岛",pinyin:["kai man qun dao"]},{codes:["克罗地亚"],id:83,isChecked:!1,isCommon:!1,letter:"K",name:"克罗地亚",pinyin:["ke luo de ya"]},{codes:["科摩罗"],id:137,isChecked:!1,isCommon:!1,letter:"K",name:"科摩罗",pinyin:["ke mo luo"]},{codes:["科索沃"],id:250,isChecked:!1,isCommon:!1,letter:"K",name:"科索沃",pinyin:["ke suo wo","Kosovo"]},{codes:["科特迪瓦"],id:120,isChecked:!1,isCommon:!1,letter:"K",name:"科特迪瓦",pinyin:["ke te di wa"]},{codes:["科威特"],id:40,isChecked:!1,isCommon:!1,letter:"K",name:"科威特",pinyin:["ke wei te"]},{codes:["肯尼亚"],id:104,isChecked:!1,isCommon:!1,letter:"K",name:"肯尼亚",pinyin:["ken ni ya"]},{codes:["库克群岛"],id:155,isChecked:!1,isCommon:!1,letter:"K",name:"库克群岛",pinyin:["ku ke qun dao"]},{codes:["库拉索"],id:240,isChecked:!1,isCommon:!1,letter:"K",name:"库拉索",pinyin:["ku la suo"]},{codes:["拉美","拉美地区"],id:259,isChecked:!1,isCommon:!1,letter:"L",name:"拉美",pinyin:["la mei"]},{codes:["拉脱维亚"],id:55,isChecked:!1,isCommon:!1,letter:"L",name:"拉脱维亚",pinyin:["la tuo wei ya"]},{codes:["莱索托"],id:135,isChecked:!1,isCommon:!1,letter:"L",name:"莱索托",pinyin:["lai suo tuo"]},{codes:["老挝"],id:8,isChecked:!1,isCommon:!1,letter:"L",name:"老挝",pinyin:["lao wo"]},{codes:["黎巴嫩"],id:34,isChecked:!1,isCommon:!1,letter:"L",name:"黎巴嫩",pinyin:["li ba nen"]},{codes:["利比里亚"],id:119,isChecked:!1,isCommon:!1,letter:"L",name:"利比里亚",pinyin:["li bi li ya"]},{codes:["利比亚"],id:93,isChecked:!1,isCommon:!1,letter:"L",name:"利比亚",pinyin:["li bi ya"]},{codes:["立陶宛"],id:56,isChecked:!1,isCommon:!1,letter:"L",name:"立陶宛",pinyin:["li tao wan"]},{codes:["列支敦士登"],id:68,isChecked:!1,isCommon:!1,letter:"L",name:"列支敦士登",pinyin:["lie zhi dun shi deng"]},{codes:["留尼旺","留尼汪岛","留尼汪"],id:139,isChecked:!1,isCommon:!1,letter:"L",name:"留尼旺",pinyin:["liu ni wang"]},{codes:["卢森堡"],id:73,isChecked:!1,isCommon:!1,letter:"L",name:"卢森堡",pinyin:["lu sen bao"]},{codes:["卢旺达"],id:107,isChecked:!1,isCommon:!1,letter:"L",name:"卢旺达",pinyin:["lu wang da"]},{codes:["罗马尼亚"],id:76,isChecked:!1,isCommon:!1,letter:"L",name:"罗马尼亚",pinyin:["luo ma ni ya"]},{codes:["马达加斯加"],id:136,isChecked:!1,isCommon:!1,letter:"M",name:"马达加斯加",pinyin:["ma da jia si jia"]},{codes:["马德拉群岛"],id:99,isChecked:!1,isCommon:!1,letter:"M",name:"马德拉群岛",pinyin:["ma de la qun dao"]},{codes:["马尔代夫"],id:23,isChecked:!1,isCommon:!1,letter:"M",name:"马尔代夫",pinyin:["ma er dai fu"]},{codes:["马耳他"],id:88,isChecked:!1,isCommon:!1,letter:"M",name:"马耳他",pinyin:["ma er ta"]},{codes:["马拉维"],id:129,isChecked:!1,isCommon:!1,letter:"M",name:"马拉维",pinyin:["ma la wei"]},{codes:["马来西亚"],id:12,isChecked:!1,isCommon:!0,letter:"M",name:"马来西亚",pinyin:["ma lai xi ya"]},{codes:["马里"],id:113,isChecked:!1,isCommon:!1,letter:"M",name:"马里",pinyin:["ma li"]},{codes:["北马其顿","马其顿"],id:79,isChecked:!1,isCommon:!1,letter:"M",name:"北马其顿",pinyin:["ma qi dun"]},{codes:["马绍尔群岛"],id:147,isChecked:!1,isCommon:!1,letter:"M",name:"马绍尔群岛",pinyin:["ma shao er qun dao"]},{codes:["马提尼克"],id:195,isChecked:!1,isCommon:!1,letter:"M",name:"马提尼克",pinyin:["ma ti ni ke"]},{codes:["法属马约特岛","马约特岛","马约特"],id:249,isChecked:!1,isCommon:!1,letter:"M",name:"马约特岛",pinyin:["ma yue te dao"]},{codes:["毛里求斯"],id:138,isChecked:!1,isCommon:!1,letter:"M",name:"毛里求斯",pinyin:["mao li qiu si"]},{codes:["毛里塔尼亚","毛利塔尼亚"],id:229,isChecked:!1,isCommon:!1,letter:"M",name:"毛里塔尼亚",pinyin:["mao li ta ni ya"]},{codes:["美国"],id:166,isChecked:!1,isCommon:!0,letter:"M",name:"美国",pinyin:["mei guo"]},{codes:["美属萨摩亚"],id:163,isChecked:!1,isCommon:!1,letter:"M",name:"美属萨摩亚",pinyin:["mei shu sa mo ya"]},{codes:["美属维尔京群岛","维尔京群岛（美国）","美属维尔京群岛"],id:191,isChecked:!1,isCommon:!1,letter:"M",name:"美属维尔京群岛",pinyin:["mei shu wei er jing qun dao"]},{codes:["蒙古"],id:2,isChecked:!1,isCommon:!1,letter:"M",name:"蒙古",pinyin:["meng gu"]},{codes:["孟加拉国","孟加拉"],id:19,isChecked:!1,isCommon:!1,letter:"M",name:"孟加拉国",pinyin:["meng jia la guo"]},{codes:["蒙特塞拉特岛","蒙塞拉特岛","蒙特塞拉特"],id:193,isChecked:!1,isCommon:!1,letter:"M",name:"蒙特塞拉特岛",pinyin:["meng te sai la te dao"]},{codes:["密克罗尼西亚","密克罗尼西亚联邦"],id:146,isChecked:!1,isCommon:!1,letter:"M",name:"密克罗尼西亚",pinyin:["mi ke luo ni xi ya"]},{codes:["秘鲁"],id:207,isChecked:!1,isCommon:!1,letter:"M",name:"秘鲁",pinyin:["mi lu"]},{codes:["缅甸"],id:10,isChecked:!1,isCommon:!0,letter:"M",name:"缅甸",pinyin:["mian dian"]},{codes:["摩尔多瓦"],id:60,isChecked:!1,isCommon:!1,letter:"M",name:"摩尔多瓦",pinyin:["mo er duo wa"]},{codes:["摩洛哥"],id:97,isChecked:!1,isCommon:!1,letter:"M",name:"摩洛哥",pinyin:["mo luo ge"]},{codes:["摩纳哥"],id:75,isChecked:!1,isCommon:!1,letter:"M",name:"摩纳哥",pinyin:["mo na ge"]},{codes:["莫桑比克"],id:130,isChecked:!1,isCommon:!1,letter:"M",name:"莫桑比克",pinyin:["mo sang bi ke"]},{codes:["墨西哥"],id:167,isChecked:!1,isCommon:!0,letter:"M",name:"墨西哥",pinyin:["mo xi ge"]},{codes:["纳米比亚"],id:132,isChecked:!1,isCommon:!1,letter:"N",name:"纳米比亚",pinyin:["na mi bi ya"]},{codes:["南非"],id:133,isChecked:!1,isCommon:!1,letter:"N",name:"南非",pinyin:["nan fei"]},{codes:["南极洲"],id:253,isChecked:!1,isCommon:!1,letter:"N",name:"南极洲",pinyin:["nan ji zhou"]},{codes:["南乔治亚岛和南桑威奇群岛"],id:252,isChecked:!1,isCommon:!1,letter:"N",name:"南乔治亚岛和南桑威奇群岛",pinyin:["nan qiao zhi ya dao he nan sang wei qi qun dao","South Georgia and The South Sandwich Islands","SGSSI"]},{codes:["南苏丹"],id:227,isChecked:!1,isCommon:!1,letter:"N",name:"南苏丹",pinyin:["nan su dan"]},{codes:["瑙鲁"],id:149,isChecked:!1,isCommon:!1,letter:"N",name:"瑙鲁",pinyin:["nao lu"]},{codes:["尼加拉瓜"],id:173,isChecked:!1,isCommon:!1,letter:"N",name:"尼加拉瓜",pinyin:["ni jia la gua"]},{codes:["尼泊尔"],id:17,isChecked:!1,isCommon:!1,letter:"N",name:"尼泊尔",pinyin:["ni po er"]},{codes:["尼日尔"],id:124,isChecked:!1,isCommon:!1,letter:"N",name:"尼日尔",pinyin:["ni ri er"]},{codes:["尼日利亚"],id:221,isChecked:!1,isCommon:!1,letter:"N",name:"尼日利亚",pinyin:["ni ri li ya"]},{codes:["纽埃"],id:161,isChecked:!1,isCommon:!1,letter:"N",name:"纽埃",pinyin:["niu ai"]},{codes:["诺福克岛"],id:248,isChecked:!1,isCommon:!1,letter:"N",name:"诺福克岛",pinyin:["nuo fu ke dao"]},{codes:["挪威"],id:51,isChecked:!1,isCommon:!1,letter:"N",name:"挪威",pinyin:["nuo wei"]},{codes:["欧洲"],id:256,isChecked:!1,isCommon:!1,letter:"O",name:"欧洲",pinyin:["ou zhou"]},{codes:["帕劳"],id:148,isChecked:!1,isCommon:!1,letter:"P",name:"帕劳",pinyin:["pa lao"]},{codes:["皮特凯恩岛"],id:159,isChecked:!1,isCommon:!1,letter:"P",name:"皮特凯恩岛",pinyin:["pi te kai en dao"]},{codes:["葡萄牙"],id:90,isChecked:!1,isCommon:!1,letter:"P",name:"葡萄牙",pinyin:["pu tao ya"]},{codes:["日本"],id:5,isChecked:!1,isCommon:!0,letter:"R",name:"日本",pinyin:["ri ben"]},{codes:["瑞典"],id:50,isChecked:!1,isCommon:!1,letter:"R",name:"瑞典",pinyin:["rui dian"]},{codes:["瑞士"],id:67,isChecked:!1,isCommon:!1,letter:"R",name:"瑞士",pinyin:["rui shi"]},{codes:["萨尔瓦多"],id:171,isChecked:!1,isCommon:!1,letter:"S",name:"萨尔瓦多",pinyin:["sa er wa duo"]},{codes:["萨摩亚"],id:152,isChecked:!1,isCommon:!1,letter:"S",name:"萨摩亚",pinyin:["sa mo ya"]},{codes:["塞尔维亚"],id:78,isChecked:!1,isCommon:!1,letter:"S",name:"塞尔维亚",pinyin:["sai er wei ya"]},{codes:["塞拉利昂"],id:118,isChecked:!1,isCommon:!1,letter:"S",name:"塞拉利昂",pinyin:["sai la li ang"]},{codes:["塞内加尔"],id:111,isChecked:!1,isCommon:!1,letter:"S",name:"塞内加尔",pinyin:["sai nei jia er"]},{codes:["塞浦路斯"],id:48,isChecked:!1,isCommon:!1,letter:"S",name:"塞浦路斯",pinyin:["sai pu lu si"]},{codes:["塞舌尔"],id:109,isChecked:!1,isCommon:!1,letter:"S",name:"塞舌尔",pinyin:["sai she er"]},{codes:["沙特阿拉伯"],id:37,isChecked:!1,isCommon:!1,letter:"S",name:"沙特阿拉伯",pinyin:["sha te a la bo"]},{codes:["圣巴泰勒米岛","圣巴泰勒米"],id:243,isChecked:!1,isCommon:!1,letter:"S",name:"圣巴泰勒米岛",pinyin:["sheng ba tai lei mi dao"]},{codes:["圣诞岛"],id:255,isChecked:!1,isCommon:!1,letter:"S",name:"圣诞岛",pinyin:["sheng dan dao"]},{codes:["圣多美及普林西比","圣多美和普林西比"],id:110,isChecked:!1,isCommon:!1,letter:"S",name:"圣多美及普林西比",pinyin:["sheng duo mei ji pu lin xi bi"]},{codes:["圣赫勒拿"],id:140,isChecked:!1,isCommon:!1,letter:"S",name:"圣赫勒拿",pinyin:["sheng he lei na"]},{codes:["圣基茨和尼维斯"],id:182,isChecked:!1,isCommon:!1,letter:"S",name:"圣基茨和尼维斯",pinyin:["sheng ji ci he ni wei si"]},{codes:["圣卢西亚"],id:184,isChecked:!1,isCommon:!1,letter:"S",name:"圣卢西亚",pinyin:["sheng lu xi ya"]},{codes:["圣马丁岛","圣马丁","圣马丁岛（荷兰部分）"],id:242,isChecked:!1,isCommon:!1,letter:"S",name:"圣马丁岛",pinyin:["sheng ma ding dao"]},{codes:["圣马力诺"],id:87,isChecked:!1,isCommon:!1,letter:"S",name:"圣马力诺",pinyin:["sheng ma li nuo"]},{codes:["圣皮埃尔和密克隆群岛"],id:236,isChecked:!1,isCommon:!1,letter:"S",name:"圣皮埃尔和密克隆群岛",pinyin:["sheng pi ai er he mi ke long qun dao"]},{codes:["圣文森特和格林纳丁斯"],id:185,isChecked:!1,isCommon:!1,letter:"S",name:"圣文森特和格林纳丁斯",pinyin:["sheng wen sen te he ge lin na ding si"]},{codes:["斯里兰卡"],id:22,isChecked:!1,isCommon:!1,letter:"S",name:"斯里兰卡",pinyin:["si li lan ka"]},{codes:["斯洛伐克"],id:63,isChecked:!1,isCommon:!1,letter:"S",name:"斯洛伐克",pinyin:["si luo fa ke"]},{codes:["斯洛文尼亚"],id:82,isChecked:!1,isCommon:!1,letter:"S",name:"斯洛文尼亚",pinyin:["si luo wen ni ya"]},{codes:["斯威士兰"],id:134,isChecked:!1,isCommon:!1,letter:"S",name:"斯威士兰",pinyin:["si wei shi lan"]},{codes:["苏丹"],id:94,isChecked:!1,isCommon:!1,letter:"S",name:"苏丹",pinyin:["su dan"]},{codes:["苏里南"],id:205,isChecked:!1,isCommon:!1,letter:"S",name:"苏里南",pinyin:["su li nan"]},{codes:["所罗门群岛"],id:144,isChecked:!1,isCommon:!1,letter:"S",name:"所罗门群岛",pinyin:["suo luo men qun dao"]},{codes:["索马里"],id:102,isChecked:!1,isCommon:!1,letter:"S",name:"索马里",pinyin:["suo ma li"]},{codes:["塔吉克斯坦"],id:26,isChecked:!1,isCommon:!1,letter:"T",name:"塔吉克斯坦",pinyin:["ta ji ke si tan"]},{codes:["泰国"],id:11,isChecked:!1,isCommon:!0,letter:"T",name:"泰国",pinyin:["tai guo"]},{codes:["坦桑尼亚"],id:105,isChecked:!1,isCommon:!1,letter:"T",name:"坦桑尼亚",pinyin:["tan sang ni ya"]},{codes:["汤加"],id:154,isChecked:!1,isCommon:!1,letter:"T",name:"汤加",pinyin:["tang jia"]},{codes:["特克斯和凯科斯群岛"],id:198,isChecked:!1,isCommon:!1,letter:"T",name:"特克斯和凯科斯群岛",pinyin:["te ke si he kai ke si qun dao"]},{codes:["特立尼达和多巴哥"],id:188,isChecked:!1,isCommon:!1,letter:"T",name:"特立尼达和多巴哥",pinyin:["te li ni da he duo ba ge"]},{codes:["土耳其"],id:47,isChecked:!1,isCommon:!1,letter:"T",name:"土耳其",pinyin:["tu er qi"]},{codes:["土库曼斯坦"],id:28,isChecked:!1,isCommon:!1,letter:"T",name:"土库曼斯坦",pinyin:["tu ku man si tan"]},{codes:["突尼斯"],id:95,isChecked:!1,isCommon:!1,letter:"T",name:"突尼斯",pinyin:["tu ni si"]},{codes:["图瓦卢"],id:151,isChecked:!1,isCommon:!1,letter:"T",name:"图瓦卢",pinyin:["tu wa lu"]},{codes:["托克劳","托克劳群岛"],id:162,isChecked:!1,isCommon:!1,letter:"T",name:"托克劳",pinyin:["tuo ke lao"]},{codes:["瓦利斯与富图纳","瓦利斯和富图纳群岛","瓦利斯群岛和富图纳群岛"],id:160,isChecked:!1,isCommon:!1,letter:"W",name:"瓦利斯与富图纳",pinyin:["wa li si yu fu tu na"]},{codes:["瓦努阿图共和国","瓦努阿图"],id:145,isChecked:!1,isCommon:!1,letter:"W",name:"瓦努阿图共和国",pinyin:["wa nu a tu gong he guo"]},{codes:["危地马拉"],id:169,isChecked:!1,isCommon:!1,letter:"W",name:"危地马拉",pinyin:["wei de ma la"]},{codes:["委内瑞拉"],id:202,isChecked:!1,isCommon:!1,letter:"W",name:"委内瑞拉",pinyin:["wei nei rui la"]},{codes:["文莱"],id:13,isChecked:!1,isCommon:!1,letter:"W",name:"文莱",pinyin:["wen lai"]},{codes:["乌干达"],id:106,isChecked:!1,isCommon:!1,letter:"W",name:"乌干达",pinyin:["wu gan da"]},{codes:["乌克兰"],id:59,isChecked:!1,isCommon:!1,letter:"W",name:"乌克兰",pinyin:["wu ke lan"]},{codes:["乌拉圭"],id:212,isChecked:!1,isCommon:!1,letter:"W",name:"乌拉圭",pinyin:["wu la gui"]},{codes:["乌兹别克斯坦"],id:27,isChecked:!1,isCommon:!1,letter:"W",name:"乌兹别克斯坦",pinyin:["wu zi bie ke si tan"]},{codes:["西班牙"],id:89,isChecked:!1,isCommon:!1,letter:"X",name:"西班牙",pinyin:["xi ban ya"]},{codes:["希腊"],id:81,isChecked:!1,isCommon:!1,letter:"X",name:"希腊",pinyin:["xi la"]},{codes:["新加坡"],id:14,isChecked:!1,isCommon:!0,letter:"X",name:"新加坡",pinyin:["xin jia po"]},{codes:["新喀里多尼亚","新喀里多尼亚群岛"],id:157,isChecked:!1,isCommon:!1,letter:"X",name:"新喀里多尼亚",pinyin:["xin ka li duo ni ya"]},{codes:["新西兰"],id:142,isChecked:!1,isCommon:!1,letter:"X",name:"新西兰",pinyin:["xin xi lan"]},{codes:["匈牙利"],id:64,isChecked:!1,isCommon:!1,letter:"X",name:"匈牙利",pinyin:["xiong ya li"]},{codes:["叙利亚"],id:32,isChecked:!1,isCommon:!1,letter:"X",name:"叙利亚",pinyin:["xu li ya"]},{codes:["牙买加"],id:178,isChecked:!1,isCommon:!1,letter:"Y",name:"牙买加",pinyin:["ya mai jia"]},{codes:["亚美尼亚"],id:45,isChecked:!1,isCommon:!1,letter:"Y",name:"亚美尼亚",pinyin:["ya mei ni ya"]},{codes:["亚速尔群岛"],id:98,isChecked:!1,isCommon:!1,letter:"Y",name:"亚速尔群岛",pinyin:["ya su er qun dao"]},{codes:["亚太","亚太地区"],id:260,isChecked:!1,isCommon:!1,letter:"Y",name:"亚太",pinyin:["ya tai"]},{codes:["也门"],id:43,isChecked:!1,isCommon:!1,letter:"Y",name:"也门",pinyin:["ye men"]},{codes:["意大利"],id:85,isChecked:!1,isCommon:!0,letter:"Y",name:"意大利",pinyin:["yi da li"]},{codes:["伊拉克"],id:30,isChecked:!1,isCommon:!1,letter:"Y",name:"伊拉克",pinyin:["yi la ke"]},{codes:["伊朗"],id:31,isChecked:!1,isCommon:!1,letter:"Y",name:"伊朗",pinyin:["yi lang"]},{codes:["以色列"],id:35,isChecked:!1,isCommon:!1,letter:"Y",name:"以色列",pinyin:["yi se lie"]},{codes:["印度"],id:20,isChecked:!1,isCommon:!0,letter:"Y",name:"印度",pinyin:["yin du"]},{codes:["印度尼西亚"],id:15,isChecked:!1,isCommon:!0,letter:"Y",name:"印度尼西亚",pinyin:["yin du ni xi ya"]},{codes:["英国"],id:69,isChecked:!1,isCommon:!0,letter:"Y",name:"英国",pinyin:["ying guo"]},{codes:["英属马恩岛","马恩岛"],id:220,isChecked:!1,isCommon:!1,letter:"Y",name:"英属马恩岛",pinyin:["ying shu ma en dao"]},{codes:["英属维尔京群岛","英属维京群岛"],id:190,isChecked:!1,isCommon:!1,letter:"Y",name:"英属维尔京群岛",pinyin:["ying shu wei er jing qun dao"]},{codes:["英属印度洋领地"],id:246,isChecked:!1,isCommon:!1,letter:"Y",name:"英属印度洋领地",pinyin:["ying shu yin du yang ling de"]},{codes:["约旦"],id:33,isChecked:!1,isCommon:!1,letter:"Y",name:"约旦",pinyin:["yue dan"]},{codes:["越南"],id:7,isChecked:!1,isCommon:!0,letter:"Y",name:"越南",pinyin:["yue nan"]},{codes:["赞比亚"],id:126,isChecked:!1,isCommon:!1,letter:"Z",name:"赞比亚",pinyin:["zan bi ya"]},{codes:["泽西岛"],id:218,isChecked:!1,isCommon:!1,letter:"Z",name:"泽西岛",pinyin:["ze xi dao"]},{codes:["乍得"],id:224,isChecked:!1,isCommon:!1,letter:"Z",name:"乍得",pinyin:["zha de"]},{codes:["直布罗陀"],id:215,isChecked:!1,isCommon:!1,letter:"Z",name:"直布罗陀",pinyin:["zhi bu luo tuo"]},{codes:["智利"],id:210,isChecked:!1,isCommon:!1,letter:"Z",name:"智利",pinyin:["zhi li"]},{codes:["中非共和国","中非"],id:226,isChecked:!1,isCommon:!1,letter:"Z",name:"中非共和国",pinyin:["zhong fei gong he guo"]},{codes:["中国","中华人民共和国"],id:1,isChecked:!1,isCommon:!0,letter:"Z",name:"中国",pinyin:["zhong guo"]},{codes:["中国内地","中国大陆"],id:264,isChecked:!1,isCommon:!0,letter:"Z",name:"中国内地",pinyin:["zhong guo nei di","zhong guo da lu"]},{codes:["中国香港","香港","香港特别行政区","Hongkong"],id:261,isChecked:!1,isCommon:!0,letter:"Z",name:"中国香港",pinyin:["zhong guo xiang gang","Hongkong"]},{codes:["中国澳门","澳门","澳门特别行政区","Macao"],id:263,isChecked:!1,isCommon:!0,letter:"Z",name:"中国澳门",pinyin:["zhong guo ao men","ao men","Macao"]},{codes:["中国台湾","台湾","台湾地区","Taiwan"],id:262,isChecked:!1,isCommon:!0,letter:"Z",name:"中国台湾",pinyin:["zhong guo tai wan","tai wan","Taiwan"]}]),n=Ze(i,"choose"),s=J(()=>t.value.filter(l=>n.value.includes(l.id))),o=l=>{const c=n.value.indexOf(l);n.value.splice(c,1)},a=l=>{n.value=l};return(l,c)=>{const f=_e,h=re,g=Te;return L(),te(Ce,null,[d(h,{vertical:"",size:"small"},{default:p(()=>[d(h,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(s.value,v=>(L(),te("div",{key:v.id,class:"border px-3 py-1 rounded-md text-xs flex items-center justify-center gap-2"},[U("div",null," ("+Q(v.letter)+")"+Q(v.name),1),U("div",{class:"cursor-pointer",onClick:O=>o(v.id)},[d(f,{"local-icon":"ic--round-close",class:"text-[16px]"})],8,oN)]))),128))]),_:1}),d(g,{onClick:c[0]||(c[0]=()=>e.value=!0),dashed:""},{default:p(()=>c[3]||(c[3]=[X("+")])),_:1})]),_:1}),d(iN,{visible:e.value,"onUpdate:visible":c[1]||(c[1]=v=>e.value=v),choose:n.value,"onUpdate:choose":c[2]||(c[2]=v=>n.value=v),onHandleUpdate:a},null,8,["visible","choose"])],64)}}}),bv=ce(aN,[["__scopeId","data-v-68d9ac4e"]]),lN={key:1},rN={class:"text-xs"},cN={class:"text-xs"},dN=ae({name:"CountriesPage",__name:"countries-page",setup(i){const e=qe("wafSettings"),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=Ws(),a=B(!0),l=B(!1),c=J(()=>o.query.serverId),f=B([]),h=B([]),g=B(!1),v=B(!1),O=B({featureIsOn:!1,allowedCountries:[],deniedCountries:[],exceptURLPatterns:[],onlyURLPatterns:[],countryHTML:"",allowSearchEngine:!1}),y=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),S=k=>{O.value.exceptURLPatterns.splice(k,1)},w=k=>{O.value.onlyURLPatterns.splice(k,1)},_=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<O.value.exceptURLPatterns.length?O.value.exceptURLPatterns[T]={...M}:x!=="edit"&&O.value.exceptURLPatterns.push({...M})},$=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<O.value.onlyURLPatterns.length?O.value.onlyURLPatterns[T]={...M}:x!=="edit"&&O.value.onlyURLPatterns.push({...M})},A=async()=>{const{data:k,error:x}=await ht("/servers/server/settings/waf/ipadmin/countries",{serverId:c.value,firewallPolicyId:e==null?void 0:e.firewallPolicyId});x||(O.value=k,f.value=O.value.allowedCountries.map(T=>T.id),h.value=O.value.deniedCountries.map(T=>T.id))},R=async()=>{var M;l.value=!0;const k=new URLSearchParams,x={firewallPolicyId:e==null?void 0:e.firewallPolicyId,exceptURLPatternsJSON:JSON.stringify(O.value.exceptURLPatterns),onlyURLPatternsJSON:JSON.stringify(O.value.onlyURLPatterns),countryHTML:O.value.countryHTML,allowSearchEngine:O.value.allowSearchEngine?"1":"0"};if(Object.entries(x).forEach(([N,I])=>{k.append(N,I)}),f.value.length>0)for(let N=0;N<f.value.length;N+=1)k.append("allowCountryIds",f.value[N].toString());if(h.value.length>0)for(let N=0;N<h.value.length;N+=1)k.append("denyCountryIds",h.value[N].toString());const{error:T}=await oo(k.toString(),"/servers/server/settings/waf/ipadmin/countries");T||(M=window.$message)==null||M.success("保存成功！"),l.value=!1};return vt(()=>{A().finally(()=>a.value=!1)}),(k,x)=>{const T=jt,M=nn,N=ve,I=Re,q=ss,z=Ne,H=et,F=Xt,V=Ht,j=nt,se=Te,G=re,K=ze;return a.value?(L(),W(T,{key:0})):O.value.featureIsOn?(L(),W(K,{key:2,title:C(u)("sec.regionLimit.countries.regionAccessControl")},{footer:p(()=>[d(G,null,{default:p(()=>[d(se,{type:"primary",onClick:R,disabled:l.value},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),default:p(()=>[d(j,{show:l.value},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("sec.regionLimit.countries.allowedRegions")},{default:p(()=>[d(bv,{choose:f.value,"onUpdate:choose":x[0]||(x[0]=de=>f.value=de)},null,8,["choose"])]),_:1},8,["label"]),d(N,{label:C(u)("sec.regionLimit.countries.blockedRegions")},{default:p(()=>[f.value.length===0?(L(),W(bv,{key:0,choose:h.value,"onUpdate:choose":x[1]||(x[1]=de=>h.value=de)},null,8,["choose"])):(L(),te("span",lN,Q(C(u)("sec.regionLimit.countries.allowedRegionsTip")),1))]),_:1},8,["label"])]),_:1},8,["label-placement"]),d(V,{"arrow-placement":"right"},{default:p(()=>[d(F,{title:C(u)("sec.regionLimit.countries.moreOptions"),name:"more"},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.exceptionURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",rN,Q(C(u)("sec.regionLimit.countries.noLimitForUrls")),1)]),default:p(()=>[d(q,{visible:g.value,"onUpdate:visible":x[2]||(x[2]=de=>g.value=de),options:y.value,"url-patterns":O.value.exceptURLPatterns,onDelete:S,onUpdate:_},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.limitURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",cN,Q(C(u)("sec.regionLimit.countries.limitForUrls")),1)]),default:p(()=>[d(q,{visible:v.value,"onUpdate:visible":x[3]||(x[3]=de=>v.value=de),options:y.value,"url-patterns":O.value.onlyURLPatterns,onDelete:w,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("sec.regionLimit.countries.tipContent"),feedback:C(u)("sec.regionLimit.countries.tipContentHelp")},{default:p(()=>[d(z,{type:"textarea",value:O.value.countryHTML,"onUpdate:value":x[4]||(x[4]=de=>O.value.countryHTML=de)},null,8,["value"])]),_:1},8,["label","feedback"]),d(N,{label:C(u)("sec.regionLimit.countries.allowSearch")},{default:p(()=>[d(H,{checked:O.value.allowSearchEngine,"onUpdate:checked":x[5]||(x[5]=de=>O.value.allowSearchEngine=de),label:C(u)("sec.regionLimit.countries.allowSearchHelp")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1},8,["label-placement"])]),_:1},8,["title"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])):(L(),W(M,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),uN=ce(dN,[["__scopeId","data-v-18767101"]]),fN={class:"tab-content"},pN={class:"group"},hN=["onClick"],mN=ae({name:"AddProvidersModal",__name:"add-providers-modal",props:{visible:{default:!1},visibleModifiers:{},choose:{default:[]},chooseModifiers:{}},emits:Be(["handleUpdate"],["update:visible","update:choose"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=B([{id:1,isChecked:!1,name:"电信"},{id:2,isChecked:!1,name:"TOT"},{id:3,isChecked:!1,name:"联通"},{id:4,isChecked:!1,name:"谷歌"},{id:5,isChecked:!1,name:"软银"},{id:6,isChecked:!1,name:"Sify"},{id:7,isChecked:!1,name:"马来西亚电信"},{id:8,isChecked:!1,name:"方正宽带"},{id:9,isChecked:!1,name:"Tikona"},{id:10,isChecked:!1,name:"新加坡电信"},{id:11,isChecked:!1,name:"日本电信电话"},{id:12,isChecked:!1,name:"中华电信"},{id:13,isChecked:!1,name:"电讯盈科"},{id:14,isChecked:!1,name:"Globe-Telecom"},{id:15,isChecked:!1,name:"沃达丰印度"},{id:16,isChecked:!1,name:"Optus"},{id:17,isChecked:!1,name:"DTAC"},{id:18,isChecked:!1,name:"教育网"},{id:19,isChecked:!1,name:"Finance-and-Promoting-Technology"},{id:20,isChecked:!1,name:"多科莫"},{id:21,isChecked:!1,name:"歌华"},{id:22,isChecked:!1,name:"鹏博士"},{id:23,isChecked:!1,name:"韩国电信"},{id:24,isChecked:!1,name:"腾讯"},{id:25,isChecked:!1,name:"皓宽网络"},{id:26,isChecked:!1,name:"澳大利亚电信"},{id:27,isChecked:!1,name:"阿里云"},{id:28,isChecked:!1,name:"Dvois"},{id:29,isChecked:!1,name:"台湾之星"},{id:30,isChecked:!1,name:"KINX"},{id:31,isChecked:!1,name:"SK宽带"},{id:32,isChecked:!1,name:"橘子电信"},{id:33,isChecked:!1,name:"阿卡迈"},{id:34,isChecked:!1,name:"沃达丰"},{id:35,isChecked:!1,name:"科进"},{id:36,isChecked:!1,name:"GTT"},{id:37,isChecked:!1,name:"康卡斯特"},{id:38,isChecked:!1,name:"俄罗斯电信"},{id:39,isChecked:!1,name:"VimpelCom"},{id:40,isChecked:!1,name:"意大利电信"},{id:41,isChecked:!1,name:"Telenor"},{id:42,isChecked:!1,name:"哈萨克斯坦电信"},{id:43,isChecked:!1,name:"西班牙电信"},{id:44,isChecked:!1,name:"FastWeb"},{id:45,isChecked:!1,name:"Telia-Company"},{id:46,isChecked:!1,name:"亚马逊"},{id:47,isChecked:!1,name:"Level3"},{id:48,isChecked:!1,name:"微软"},{id:49,isChecked:!1,name:"Trans-Telecom"},{id:50,isChecked:!1,name:"Mobile-TeleSystems"},{id:51,isChecked:!1,name:"Liberty"},{id:52,isChecked:!1,name:"SoftLayer"},{id:53,isChecked:!1,name:"卡塔尔电信"},{id:54,isChecked:!1,name:"Tata"},{id:55,isChecked:!1,name:"阿曼电信"},{id:56,isChecked:!1,name:"T-Mobile"},{id:57,isChecked:!1,name:"Altice"},{id:58,isChecked:!1,name:"威瑞森"},{id:59,isChecked:!1,name:"美国电话电报"},{id:60,isChecked:!1,name:"Hurricane-Electric"},{id:61,isChecked:!1,name:"Equinix"},{id:62,isChecked:!1,name:"移动"},{id:63,isChecked:!1,name:"CAT"},{id:64,isChecked:!1,name:"Kvant-Telecom"},{id:65,isChecked:!1,name:"俄罗斯Tele2"},{id:66,isChecked:!1,name:"Smart"},{id:67,isChecked:!1,name:"RETN"},{id:68,isChecked:!1,name:"Net1"},{id:69,isChecked:!1,name:"阿里巴巴"},{id:70,isChecked:!1,name:"KDDI"},{id:71,isChecked:!1,name:"广州驰联"},{id:72,isChecked:!1,name:"香港宽频"},{id:73,isChecked:!1,name:"雅虎"},{id:74,isChecked:!1,name:"层峰网络"},{id:75,isChecked:!1,name:"越南邮电"},{id:76,isChecked:!1,name:"Ctrls"},{id:77,isChecked:!1,name:"Indusind"},{id:78,isChecked:!1,name:"GTPL"},{id:79,isChecked:!1,name:"MAXIS"},{id:80,isChecked:!1,name:"TPG电信"},{id:81,isChecked:!1,name:"Jastel"},{id:82,isChecked:!1,name:"苹果"},{id:83,isChecked:!1,name:"印度电信"},{id:84,isChecked:!1,name:"ACT"},{id:85,isChecked:!1,name:"Telus"},{id:86,isChecked:!1,name:"JIO"},{id:87,isChecked:!1,name:"Telin"},{id:88,isChecked:!1,name:"Claro"},{id:89,isChecked:!1,name:"Fastly"},{id:90,isChecked:!1,name:"CenturyLink"},{id:91,isChecked:!1,name:"罗杰斯通信"},{id:92,isChecked:!1,name:"EarthLink"},{id:93,isChecked:!1,name:"Sprint"},{id:94,isChecked:!1,name:"BSNL"},{id:95,isChecked:!1,name:"HathWay"},{id:96,isChecked:!1,name:"远传电信"},{id:97,isChecked:!1,name:"星和移动"},{id:98,isChecked:!1,name:"信实通信"},{id:99,isChecked:!1,name:"True"},{id:100,isChecked:!1,name:"Mahataa"},{id:101,isChecked:!1,name:"越南军用通讯"},{id:102,isChecked:!1,name:"Ezecom"},{id:103,isChecked:!1,name:"AIS"},{id:104,isChecked:!1,name:"新加坡第一通"},{id:105,isChecked:!1,name:"So-Net"},{id:106,isChecked:!1,name:"Syscon"},{id:107,isChecked:!1,name:"DiGi-Telecommunication"},{id:108,isChecked:!1,name:"澳门电讯"},{id:109,isChecked:!1,name:"菲律宾长途电话公司"},{id:110,isChecked:!1,name:"互联网泰国"},{id:111,isChecked:!1,name:"Ani-Network"},{id:112,isChecked:!1,name:"UMobile"},{id:113,isChecked:!1,name:"Biglobe"},{id:114,isChecked:!1,name:"重庆广电"},{id:115,isChecked:!1,name:"SK电讯"},{id:116,isChecked:!1,name:"Aircel"},{id:117,isChecked:!1,name:"Quadrant"},{id:118,isChecked:!1,name:"Elisa"},{id:119,isChecked:!1,name:"脸书"},{id:120,isChecked:!1,name:"MegaFon"},{id:121,isChecked:!1,name:"扎因"},{id:122,isChecked:!1,name:"ASK4"},{id:123,isChecked:!1,name:"XTRA-Telecom"},{id:124,isChecked:!1,name:"天威"},{id:125,isChecked:!1,name:"和记电讯"},{id:126,isChecked:!1,name:"铁通"},{id:127,isChecked:!1,name:"科技网"},{id:128,isChecked:!1,name:"德国电信"},{id:129,isChecked:!1,name:"GrameenPhone"},{id:130,isChecked:!1,name:"巴基斯坦电信"},{id:131,isChecked:!1,name:"Workonline"},{id:132,isChecked:!1,name:"Safaricom"},{id:133,isChecked:!1,name:"MTNL"},{id:134,isChecked:!1,name:"宁夏广电"},{id:135,isChecked:!1,name:"Webe-Digital"},{id:136,isChecked:!1,name:"广电"},{id:137,isChecked:!1,name:"西安交通大学"},{id:138,isChecked:!1,name:"老挝电信"},{id:139,isChecked:!1,name:"湖南广电"},{id:140,isChecked:!1,name:"黑龙江广电"},{id:141,isChecked:!1,name:"湖北广电"},{id:142,isChecked:!1,name:"Unitel"},{id:143,isChecked:!1,name:"You-Broadband"},{id:144,isChecked:!1,name:"Siti"},{id:145,isChecked:!1,name:"Cogetel"},{id:146,isChecked:!1,name:"SMTeleMedia"},{id:147,isChecked:!1,name:"VNPL"},{id:148,isChecked:!1,name:"台湾固网"},{id:149,isChecked:!1,name:"亚太电信"},{id:150,isChecked:!1,name:"台湾大哥大"},{id:151,isChecked:!1,name:"Intech"},{id:152,isChecked:!1,name:"MegaPort"},{id:153,isChecked:!1,name:"SpeedCast"},{id:154,isChecked:!1,name:"广东广电"},{id:155,isChecked:!1,name:"Banglalink"},{id:156,isChecked:!1,name:"SINET"},{id:157,isChecked:!1,name:"WiCAM"},{id:158,isChecked:!1,name:"Mtel"},{id:159,isChecked:!1,name:"华数"},{id:160,isChecked:!1,name:"上海驰联"},{id:161,isChecked:!1,name:"OpenNet"},{id:162,isChecked:!1,name:"Asianet"},{id:163,isChecked:!1,name:"老挝电信企业"},{id:164,isChecked:!1,name:"Alliance"},{id:165,isChecked:!1,name:"广西广电"},{id:166,isChecked:!1,name:"江苏广电"},{id:167,isChecked:!1,name:"世纪互联"},{id:168,isChecked:!1,name:"SkyCable"},{id:169,isChecked:!1,name:"SmileServ"},{id:170,isChecked:!1,name:"SmarTone"},{id:171,isChecked:!1,name:"BBIX"},{id:172,isChecked:!1,name:"FastNet"},{id:173,isChecked:!1,name:"百度"},{id:174,isChecked:!1,name:"Railtel"},{id:175,isChecked:!1,name:"内蒙古广电"},{id:176,isChecked:!1,name:"吉视传媒"},{id:177,isChecked:!1,name:"Excitel"},{id:178,isChecked:!1,name:"MyRepublic"},{id:179,isChecked:!1,name:"MobiFone"},{id:180,isChecked:!1,name:"Den-Digital"},{id:181,isChecked:!1,name:"网上网"},{id:182,isChecked:!1,name:"Biznet"},{id:183,isChecked:!1,name:"Netplus"},{id:184,isChecked:!1,name:"网宿"},{id:185,isChecked:!1,name:"Telecom-Cambodia"},{id:186,isChecked:!1,name:"CIX"},{id:187,isChecked:!1,name:"加拿大贝尔"},{id:188,isChecked:!1,name:"AIMS"},{id:189,isChecked:!1,name:"SKBB"},{id:190,isChecked:!1,name:"Nift"},{id:191,isChecked:!1,name:"有线通"},{id:192,isChecked:!1,name:"香港新世界"},{id:193,isChecked:!1,name:"华数传媒"},{id:194,isChecked:!1,name:"3BB"},{id:195,isChecked:!1,name:"辽宁广电"},{id:196,isChecked:!1,name:"河南广电"},{id:197,isChecked:!1,name:"陕西广电"},{id:198,isChecked:!1,name:"新疆广电"},{id:199,isChecked:!1,name:"山东广电"},{id:200,isChecked:!1,name:"四川广电"},{id:201,isChecked:!1,name:"文莱电信"},{id:202,isChecked:!1,name:"香港有线"},{id:203,isChecked:!1,name:"天驰网络"},{id:204,isChecked:!1,name:"湖南巨亚"},{id:205,isChecked:!1,name:"MSK-IX"},{id:206,isChecked:!1,name:"法国电信"},{id:207,isChecked:!1,name:"缅甸电信"},{id:208,isChecked:!1,name:"星通讯"},{id:209,isChecked:!1,name:"Netnod"},{id:210,isChecked:!1,name:"Masmovil"},{id:211,isChecked:!1,name:"AMS-IX"},{id:212,isChecked:!1,name:"Telefonica-O2"},{id:213,isChecked:!1,name:"Asiacell"},{id:214,isChecked:!1,name:"布伊格电信"},{id:215,isChecked:!1,name:"Vivo"},{id:216,isChecked:!1,name:"XL"},{id:217,isChecked:!1,name:"EE-Mobile"},{id:218,isChecked:!1,name:"Tesco"},{id:219,isChecked:!1,name:"Netnam"},{id:220,isChecked:!1,name:"河北广电"},{id:221,isChecked:!1,name:"JPIX"},{id:222,isChecked:!1,name:"Celcom"},{id:223,isChecked:!1,name:"印尼金光"},{id:224,isChecked:!1,name:"和记电讯印尼"},{id:225,isChecked:!1,name:"Indosat"},{id:226,isChecked:!1,name:"Excell"},{id:227,isChecked:!1,name:"StackPath"},{id:228,isChecked:!1,name:"贵州广电"},{id:229,isChecked:!1,name:"Camintel"},{id:230,isChecked:!1,name:"Vnetwork"},{id:231,isChecked:!1,name:"湖南有线"},{id:232,isChecked:!1,name:"山东乐享广电"},{id:233,isChecked:!1,name:"BroadWay"},{id:234,isChecked:!1,name:"First-Media"},{id:235,isChecked:!1,name:"西贡电信"},{id:236,isChecked:!1,name:"APSFL"},{id:237,isChecked:!1,name:"Teletalk"},{id:238,isChecked:!1,name:"越南电信"},{id:239,isChecked:!1,name:"2Degrees"},{id:240,isChecked:!1,name:"湄公网"},{id:241,isChecked:!1,name:"大连理工大学"},{id:242,isChecked:!1,name:"山东青岛广电"},{id:243,isChecked:!1,name:"浙江华数"},{id:244,isChecked:!1,name:"Spark-New-Zealand"},{id:245,isChecked:!1,name:"珠江宽频"},{id:246,isChecked:!1,name:"海南广电"},{id:247,isChecked:!1,name:"香港流动通讯"},{id:248,isChecked:!1,name:"墨西哥电信"},{id:249,isChecked:!1,name:"柬埔寨信威"},{id:250,isChecked:!1,name:"MIX"},{id:251,isChecked:!1,name:"Linx"},{id:252,isChecked:!1,name:"TPIX"},{id:253,isChecked:!1,name:"Movistar"},{id:254,isChecked:!1,name:"墨西哥美洲移动"},{id:255,isChecked:!1,name:"互联优势"},{id:256,isChecked:!1,name:"上海教委"},{id:257,isChecked:!1,name:"福建广电"},{id:258,isChecked:!1,name:"内网IP"},{id:259,isChecked:!1,name:"Cloudflare"},{id:260,isChecked:!1,name:"APNIC"},{id:261,isChecked:!1,name:"CNNIC"},{id:262,isChecked:!1,name:"ODN"},{id:263,isChecked:!1,name:"Uplus"},{id:264,isChecked:!1,name:"华为云"},{id:265,isChecked:!1,name:"京东云"},{id:266,isChecked:!1,name:"美团云"},{id:267,isChecked:!1,name:"263网络通信"},{id:268,isChecked:!1,name:"火山引擎"},{id:269,isChecked:!1,name:"GoDaddy"},{id:270,isChecked:!1,name:"优刻云"},{id:271,isChecked:!1,name:"NTT"},{id:272,isChecked:!1,name:"Facebook"},{id:273,isChecked:!1,name:"GitHub"},{id:274,isChecked:!1,name:"Orange"},{id:275,isChecked:!1,name:"Akamai"},{id:276,isChecked:!1,name:"Telkom"},{id:277,isChecked:!1,name:"OVH"},{id:278,isChecked:!1,name:"Shopify"},{id:279,isChecked:!1,name:"OCN"},{id:280,isChecked:!1,name:"京宽网络"},{id:281,isChecked:!1,name:"网易云"},{id:282,isChecked:!1,name:"ATT"},{id:283,isChecked:!1,name:"长城宽带"},{id:284,isChecked:!1,name:"Comcast"},{id:285,isChecked:!1,name:"Airtel"},{id:286,isChecked:!1,name:"Cox"},{id:287,isChecked:!1,name:"Shaw"},{id:288,isChecked:!1,name:"Eastlink"},{id:289,isChecked:!1,name:"Vodafone"},{id:290,isChecked:!1,name:"NttDoCoMo"},{id:291,isChecked:!1,name:"BBTEC"},{id:292,isChecked:!1,name:"Telstra"},{id:293,isChecked:!1,name:"iSeek"},{id:294,isChecked:!1,name:"Unitymedia"},{id:295,isChecked:!1,name:"Lanet"},{id:296,isChecked:!1,name:"TelecomItalia"},{id:297,isChecked:!1,name:"VirginMedia"},{id:298,isChecked:!1,name:"Hillsidenewmedia"},{id:299,isChecked:!1,name:"xTom"},{id:300,isChecked:!1,name:"Zenlayer"},{id:301,isChecked:!1,name:"Yandex"},{id:302,isChecked:!1,name:"CDNetworks"},{id:303,isChecked:!1,name:"iiNet"},{id:304,isChecked:!1,name:"VNPT"},{id:305,isChecked:!1,name:"JCOM"},{id:306,isChecked:!1,name:"Leaseweb"},{id:307,isChecked:!1,name:"hp.com"},{id:308,isChecked:!1,name:"Charter"},{id:309,isChecked:!1,name:"Verizon"},{id:310,isChecked:!1,name:"Cogeco"},{id:311,isChecked:!1,name:"TekSavvy"},{id:312,isChecked:!1,name:"CeRaNetworks"},{id:313,isChecked:!1,name:"Videotron"},{id:314,isChecked:!1,name:"Twcc"},{id:315,isChecked:!1,name:"Rogers"},{id:316,isChecked:!1,name:"IdeaCellular"},{id:317,isChecked:!1,name:"PLDT"},{id:318,isChecked:!1,name:"Tbroad"},{id:319,isChecked:!1,name:"LGCNS"},{id:320,isChecked:!1,name:"Frontier"},{id:321,isChecked:!1,name:"Telkomsel"},{id:322,isChecked:!1,name:"DNA"},{id:323,isChecked:!1,name:"Cogent"},{id:324,isChecked:!1,name:"PTCL"},{id:325,isChecked:!1,name:"Incapsula"},{id:326,isChecked:!1,name:"Linode"},{id:327,isChecked:!1,name:"Terrahost"},{id:328,isChecked:!1,name:"HEAnet"},{id:329,isChecked:!1,name:"Cloudinnovation"},{id:330,isChecked:!1,name:"电信通"},{id:331,isChecked:!1,name:"iPaddr"},{id:332,isChecked:!1,name:"Volia"},{id:333,isChecked:!1,name:"Bell"},{id:334,isChecked:!1,name:"Vocus"},{id:335,isChecked:!1,name:"eir"},{id:336,isChecked:!1,name:"DOSarrest"},{id:337,isChecked:!1,name:"大宽频"},{id:338,isChecked:!1,name:"油田宽带"},{id:339,isChecked:!1,name:"Telia"},{id:340,isChecked:!1,name:"NOS"},{id:341,isChecked:!1,name:"XO"},{id:342,isChecked:!1,name:"Zayo"},{id:343,isChecked:!1,name:"BitGravity"},{id:344,isChecked:!1,name:"Afilias"},{id:345,isChecked:!1,name:"Reflected"},{id:346,isChecked:!1,name:"VikingHost"},{id:347,isChecked:!1,name:"Vercel"},{id:348,isChecked:!1,name:"Free"},{id:349,isChecked:!1,name:"KPN"},{id:350,isChecked:!1,name:"Edgecast"},{id:351,isChecked:!1,name:"VodafoneAustralia"},{id:352,isChecked:!1,name:"和记黄埔"},{id:353,isChecked:!1,name:"Topchina"},{id:354,isChecked:!1,name:"中国长城互联网"},{id:355,isChecked:!1,name:"Twitter"},{id:356,isChecked:!1,name:"PetaExpress"},{id:357,isChecked:!1,name:"金山云"},{id:358,isChecked:!1,name:"Dropbox"},{id:359,isChecked:!1,name:"Voyager"},{id:360,isChecked:!1,name:"2degreesMobile"},{id:361,isChecked:!1,name:"SparkNZ"},{id:362,isChecked:!1,name:"台湾省教育网"},{id:363,isChecked:!1,name:"中电华通"},{id:364,isChecked:!1,name:"中电飞华"},{id:365,isChecked:!1,name:"西门子"},{id:366,isChecked:!1,name:"QuantilNetworks"},{id:367,isChecked:!1,name:"WPEngine"},{id:368,isChecked:!1,name:"Singtel"},{id:369,isChecked:!1,name:"BetConstruct"},{id:370,isChecked:!1,name:"Automattic"},{id:371,isChecked:!1,name:"NTX"},{id:372,isChecked:!1,name:"Squarespace"},{id:373,isChecked:!1,name:"Wix"},{id:374,isChecked:!1,name:"BODIS"},{id:375,isChecked:!1,name:"Lachtaristo"},{id:376,isChecked:!1,name:"Ziggo"},{id:377,isChecked:!1,name:"蓝汛"},{id:378,isChecked:!1,name:"StarHub"},{id:379,isChecked:!1,name:"UIH"},{id:380,isChecked:!1,name:"Chief"},{id:381,isChecked:!1,name:"Gcore"}]),s=Ze(i,"choose"),o=l=>{const c=s.value.indexOf(l);c===-1?s.value.push(l):s.value.splice(c,1),console.log(s.value)},a=()=>{t.value=!1};return(l,c)=>{const f=_e,h=Sp,g=Te,v=ze,O=Pt;return L(),W(O,{show:t.value,"onUpdate:show":c[1]||(c[1]=y=>t.value=y)},{default:p(()=>[d(v,{style:{width:"600px"},title:"选择区域",bordered:!1,size:"huge"},{"header-extra":p(()=>[U("span",{onClick:c[0]||(c[0]=()=>t.value=!1)},[d(f,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),action:p(()=>[d(g,{type:"primary",onClick:a},{default:p(()=>c[2]||(c[2]=[X("确定")])),_:1})]),default:p(()=>[U("div",fN,[U("div",pN,[U("ul",null,[(L(!0),te(Ce,null,Ot(n.value,y=>(L(),te("li",{key:y.id},[U("span",{class:Ln(["cursor-pointer px-2 rounded text-xs",{"bg-green-500 text-white":s.value.includes(y.id)}]),style:{height:"24px","line-height":"24px",display:"inline-block"},onClick:S=>o(y.id)},[d(h,{style:{"max-width":"70px"}},{default:p(()=>[X(Q(y.name),1)]),_:2},1024)],10,hN)]))),128))])])])]),_:1})]),_:1},8,["show"])}}}),gN=ce(mN,[["__scopeId","data-v-d502437a"]]),vN=["onClick"],bN=ae({name:"ChooseProviders",__name:"choose-providers",props:{choose:{default:[]},chooseModifiers:{}},emits:["update:choose"],setup(i){const e=B(!1),t=B([{id:1,isChecked:!1,name:"电信"},{id:2,isChecked:!1,name:"TOT"},{id:3,isChecked:!1,name:"联通"},{id:4,isChecked:!1,name:"谷歌"},{id:5,isChecked:!1,name:"软银"},{id:6,isChecked:!1,name:"Sify"},{id:7,isChecked:!1,name:"马来西亚电信"},{id:8,isChecked:!1,name:"方正宽带"},{id:9,isChecked:!1,name:"Tikona"},{id:10,isChecked:!1,name:"新加坡电信"},{id:11,isChecked:!1,name:"日本电信电话"},{id:12,isChecked:!1,name:"中华电信"},{id:13,isChecked:!1,name:"电讯盈科"},{id:14,isChecked:!1,name:"Globe-Telecom"},{id:15,isChecked:!1,name:"沃达丰印度"},{id:16,isChecked:!1,name:"Optus"},{id:17,isChecked:!1,name:"DTAC"},{id:18,isChecked:!1,name:"教育网"},{id:19,isChecked:!1,name:"Finance-and-Promoting-Technology"},{id:20,isChecked:!1,name:"多科莫"},{id:21,isChecked:!1,name:"歌华"},{id:22,isChecked:!1,name:"鹏博士"},{id:23,isChecked:!1,name:"韩国电信"},{id:24,isChecked:!1,name:"腾讯"},{id:25,isChecked:!1,name:"皓宽网络"},{id:26,isChecked:!1,name:"澳大利亚电信"},{id:27,isChecked:!1,name:"阿里云"},{id:28,isChecked:!1,name:"Dvois"},{id:29,isChecked:!1,name:"台湾之星"},{id:30,isChecked:!1,name:"KINX"},{id:31,isChecked:!1,name:"SK宽带"},{id:32,isChecked:!1,name:"橘子电信"},{id:33,isChecked:!1,name:"阿卡迈"},{id:34,isChecked:!1,name:"沃达丰"},{id:35,isChecked:!1,name:"科进"},{id:36,isChecked:!1,name:"GTT"},{id:37,isChecked:!1,name:"康卡斯特"},{id:38,isChecked:!1,name:"俄罗斯电信"},{id:39,isChecked:!1,name:"VimpelCom"},{id:40,isChecked:!1,name:"意大利电信"},{id:41,isChecked:!1,name:"Telenor"},{id:42,isChecked:!1,name:"哈萨克斯坦电信"},{id:43,isChecked:!1,name:"西班牙电信"},{id:44,isChecked:!1,name:"FastWeb"},{id:45,isChecked:!1,name:"Telia-Company"},{id:46,isChecked:!1,name:"亚马逊"},{id:47,isChecked:!1,name:"Level3"},{id:48,isChecked:!1,name:"微软"},{id:49,isChecked:!1,name:"Trans-Telecom"},{id:50,isChecked:!1,name:"Mobile-TeleSystems"},{id:51,isChecked:!1,name:"Liberty"},{id:52,isChecked:!1,name:"SoftLayer"},{id:53,isChecked:!1,name:"卡塔尔电信"},{id:54,isChecked:!1,name:"Tata"},{id:55,isChecked:!1,name:"阿曼电信"},{id:56,isChecked:!1,name:"T-Mobile"},{id:57,isChecked:!1,name:"Altice"},{id:58,isChecked:!1,name:"威瑞森"},{id:59,isChecked:!1,name:"美国电话电报"},{id:60,isChecked:!1,name:"Hurricane-Electric"},{id:61,isChecked:!1,name:"Equinix"},{id:62,isChecked:!1,name:"移动"},{id:63,isChecked:!1,name:"CAT"},{id:64,isChecked:!1,name:"Kvant-Telecom"},{id:65,isChecked:!1,name:"俄罗斯Tele2"},{id:66,isChecked:!1,name:"Smart"},{id:67,isChecked:!1,name:"RETN"},{id:68,isChecked:!1,name:"Net1"},{id:69,isChecked:!1,name:"阿里巴巴"},{id:70,isChecked:!1,name:"KDDI"},{id:71,isChecked:!1,name:"广州驰联"},{id:72,isChecked:!1,name:"香港宽频"},{id:73,isChecked:!1,name:"雅虎"},{id:74,isChecked:!1,name:"层峰网络"},{id:75,isChecked:!1,name:"越南邮电"},{id:76,isChecked:!1,name:"Ctrls"},{id:77,isChecked:!1,name:"Indusind"},{id:78,isChecked:!1,name:"GTPL"},{id:79,isChecked:!1,name:"MAXIS"},{id:80,isChecked:!1,name:"TPG电信"},{id:81,isChecked:!1,name:"Jastel"},{id:82,isChecked:!1,name:"苹果"},{id:83,isChecked:!1,name:"印度电信"},{id:84,isChecked:!1,name:"ACT"},{id:85,isChecked:!1,name:"Telus"},{id:86,isChecked:!1,name:"JIO"},{id:87,isChecked:!1,name:"Telin"},{id:88,isChecked:!1,name:"Claro"},{id:89,isChecked:!1,name:"Fastly"},{id:90,isChecked:!1,name:"CenturyLink"},{id:91,isChecked:!1,name:"罗杰斯通信"},{id:92,isChecked:!1,name:"EarthLink"},{id:93,isChecked:!1,name:"Sprint"},{id:94,isChecked:!1,name:"BSNL"},{id:95,isChecked:!1,name:"HathWay"},{id:96,isChecked:!1,name:"远传电信"},{id:97,isChecked:!1,name:"星和移动"},{id:98,isChecked:!1,name:"信实通信"},{id:99,isChecked:!1,name:"True"},{id:100,isChecked:!1,name:"Mahataa"},{id:101,isChecked:!1,name:"越南军用通讯"},{id:102,isChecked:!1,name:"Ezecom"},{id:103,isChecked:!1,name:"AIS"},{id:104,isChecked:!1,name:"新加坡第一通"},{id:105,isChecked:!1,name:"So-Net"},{id:106,isChecked:!1,name:"Syscon"},{id:107,isChecked:!1,name:"DiGi-Telecommunication"},{id:108,isChecked:!1,name:"澳门电讯"},{id:109,isChecked:!1,name:"菲律宾长途电话公司"},{id:110,isChecked:!1,name:"互联网泰国"},{id:111,isChecked:!1,name:"Ani-Network"},{id:112,isChecked:!1,name:"UMobile"},{id:113,isChecked:!1,name:"Biglobe"},{id:114,isChecked:!1,name:"重庆广电"},{id:115,isChecked:!1,name:"SK电讯"},{id:116,isChecked:!1,name:"Aircel"},{id:117,isChecked:!1,name:"Quadrant"},{id:118,isChecked:!1,name:"Elisa"},{id:119,isChecked:!1,name:"脸书"},{id:120,isChecked:!1,name:"MegaFon"},{id:121,isChecked:!1,name:"扎因"},{id:122,isChecked:!1,name:"ASK4"},{id:123,isChecked:!1,name:"XTRA-Telecom"},{id:124,isChecked:!1,name:"天威"},{id:125,isChecked:!1,name:"和记电讯"},{id:126,isChecked:!1,name:"铁通"},{id:127,isChecked:!1,name:"科技网"},{id:128,isChecked:!1,name:"德国电信"},{id:129,isChecked:!1,name:"GrameenPhone"},{id:130,isChecked:!1,name:"巴基斯坦电信"},{id:131,isChecked:!1,name:"Workonline"},{id:132,isChecked:!1,name:"Safaricom"},{id:133,isChecked:!1,name:"MTNL"},{id:134,isChecked:!1,name:"宁夏广电"},{id:135,isChecked:!1,name:"Webe-Digital"},{id:136,isChecked:!1,name:"广电"},{id:137,isChecked:!1,name:"西安交通大学"},{id:138,isChecked:!1,name:"老挝电信"},{id:139,isChecked:!1,name:"湖南广电"},{id:140,isChecked:!1,name:"黑龙江广电"},{id:141,isChecked:!1,name:"湖北广电"},{id:142,isChecked:!1,name:"Unitel"},{id:143,isChecked:!1,name:"You-Broadband"},{id:144,isChecked:!1,name:"Siti"},{id:145,isChecked:!1,name:"Cogetel"},{id:146,isChecked:!1,name:"SMTeleMedia"},{id:147,isChecked:!1,name:"VNPL"},{id:148,isChecked:!1,name:"台湾固网"},{id:149,isChecked:!1,name:"亚太电信"},{id:150,isChecked:!1,name:"台湾大哥大"},{id:151,isChecked:!1,name:"Intech"},{id:152,isChecked:!1,name:"MegaPort"},{id:153,isChecked:!1,name:"SpeedCast"},{id:154,isChecked:!1,name:"广东广电"},{id:155,isChecked:!1,name:"Banglalink"},{id:156,isChecked:!1,name:"SINET"},{id:157,isChecked:!1,name:"WiCAM"},{id:158,isChecked:!1,name:"Mtel"},{id:159,isChecked:!1,name:"华数"},{id:160,isChecked:!1,name:"上海驰联"},{id:161,isChecked:!1,name:"OpenNet"},{id:162,isChecked:!1,name:"Asianet"},{id:163,isChecked:!1,name:"老挝电信企业"},{id:164,isChecked:!1,name:"Alliance"},{id:165,isChecked:!1,name:"广西广电"},{id:166,isChecked:!1,name:"江苏广电"},{id:167,isChecked:!1,name:"世纪互联"},{id:168,isChecked:!1,name:"SkyCable"},{id:169,isChecked:!1,name:"SmileServ"},{id:170,isChecked:!1,name:"SmarTone"},{id:171,isChecked:!1,name:"BBIX"},{id:172,isChecked:!1,name:"FastNet"},{id:173,isChecked:!1,name:"百度"},{id:174,isChecked:!1,name:"Railtel"},{id:175,isChecked:!1,name:"内蒙古广电"},{id:176,isChecked:!1,name:"吉视传媒"},{id:177,isChecked:!1,name:"Excitel"},{id:178,isChecked:!1,name:"MyRepublic"},{id:179,isChecked:!1,name:"MobiFone"},{id:180,isChecked:!1,name:"Den-Digital"},{id:181,isChecked:!1,name:"网上网"},{id:182,isChecked:!1,name:"Biznet"},{id:183,isChecked:!1,name:"Netplus"},{id:184,isChecked:!1,name:"网宿"},{id:185,isChecked:!1,name:"Telecom-Cambodia"},{id:186,isChecked:!1,name:"CIX"},{id:187,isChecked:!1,name:"加拿大贝尔"},{id:188,isChecked:!1,name:"AIMS"},{id:189,isChecked:!1,name:"SKBB"},{id:190,isChecked:!1,name:"Nift"},{id:191,isChecked:!1,name:"有线通"},{id:192,isChecked:!1,name:"香港新世界"},{id:193,isChecked:!1,name:"华数传媒"},{id:194,isChecked:!1,name:"3BB"},{id:195,isChecked:!1,name:"辽宁广电"},{id:196,isChecked:!1,name:"河南广电"},{id:197,isChecked:!1,name:"陕西广电"},{id:198,isChecked:!1,name:"新疆广电"},{id:199,isChecked:!1,name:"山东广电"},{id:200,isChecked:!1,name:"四川广电"},{id:201,isChecked:!1,name:"文莱电信"},{id:202,isChecked:!1,name:"香港有线"},{id:203,isChecked:!1,name:"天驰网络"},{id:204,isChecked:!1,name:"湖南巨亚"},{id:205,isChecked:!1,name:"MSK-IX"},{id:206,isChecked:!1,name:"法国电信"},{id:207,isChecked:!1,name:"缅甸电信"},{id:208,isChecked:!1,name:"星通讯"},{id:209,isChecked:!1,name:"Netnod"},{id:210,isChecked:!1,name:"Masmovil"},{id:211,isChecked:!1,name:"AMS-IX"},{id:212,isChecked:!1,name:"Telefonica-O2"},{id:213,isChecked:!1,name:"Asiacell"},{id:214,isChecked:!1,name:"布伊格电信"},{id:215,isChecked:!1,name:"Vivo"},{id:216,isChecked:!1,name:"XL"},{id:217,isChecked:!1,name:"EE-Mobile"},{id:218,isChecked:!1,name:"Tesco"},{id:219,isChecked:!1,name:"Netnam"},{id:220,isChecked:!1,name:"河北广电"},{id:221,isChecked:!1,name:"JPIX"},{id:222,isChecked:!1,name:"Celcom"},{id:223,isChecked:!1,name:"印尼金光"},{id:224,isChecked:!1,name:"和记电讯印尼"},{id:225,isChecked:!1,name:"Indosat"},{id:226,isChecked:!1,name:"Excell"},{id:227,isChecked:!1,name:"StackPath"},{id:228,isChecked:!1,name:"贵州广电"},{id:229,isChecked:!1,name:"Camintel"},{id:230,isChecked:!1,name:"Vnetwork"},{id:231,isChecked:!1,name:"湖南有线"},{id:232,isChecked:!1,name:"山东乐享广电"},{id:233,isChecked:!1,name:"BroadWay"},{id:234,isChecked:!1,name:"First-Media"},{id:235,isChecked:!1,name:"西贡电信"},{id:236,isChecked:!1,name:"APSFL"},{id:237,isChecked:!1,name:"Teletalk"},{id:238,isChecked:!1,name:"越南电信"},{id:239,isChecked:!1,name:"2Degrees"},{id:240,isChecked:!1,name:"湄公网"},{id:241,isChecked:!1,name:"大连理工大学"},{id:242,isChecked:!1,name:"山东青岛广电"},{id:243,isChecked:!1,name:"浙江华数"},{id:244,isChecked:!1,name:"Spark-New-Zealand"},{id:245,isChecked:!1,name:"珠江宽频"},{id:246,isChecked:!1,name:"海南广电"},{id:247,isChecked:!1,name:"香港流动通讯"},{id:248,isChecked:!1,name:"墨西哥电信"},{id:249,isChecked:!1,name:"柬埔寨信威"},{id:250,isChecked:!1,name:"MIX"},{id:251,isChecked:!1,name:"Linx"},{id:252,isChecked:!1,name:"TPIX"},{id:253,isChecked:!1,name:"Movistar"},{id:254,isChecked:!1,name:"墨西哥美洲移动"},{id:255,isChecked:!1,name:"互联优势"},{id:256,isChecked:!1,name:"上海教委"},{id:257,isChecked:!1,name:"福建广电"},{id:258,isChecked:!1,name:"内网IP"},{id:259,isChecked:!1,name:"Cloudflare"},{id:260,isChecked:!1,name:"APNIC"},{id:261,isChecked:!1,name:"CNNIC"},{id:262,isChecked:!1,name:"ODN"},{id:263,isChecked:!1,name:"Uplus"},{id:264,isChecked:!1,name:"华为云"},{id:265,isChecked:!1,name:"京东云"},{id:266,isChecked:!1,name:"美团云"},{id:267,isChecked:!1,name:"263网络通信"},{id:268,isChecked:!1,name:"火山引擎"},{id:269,isChecked:!1,name:"GoDaddy"},{id:270,isChecked:!1,name:"优刻云"},{id:271,isChecked:!1,name:"NTT"},{id:272,isChecked:!1,name:"Facebook"},{id:273,isChecked:!1,name:"GitHub"},{id:274,isChecked:!1,name:"Orange"},{id:275,isChecked:!1,name:"Akamai"},{id:276,isChecked:!1,name:"Telkom"},{id:277,isChecked:!1,name:"OVH"},{id:278,isChecked:!1,name:"Shopify"},{id:279,isChecked:!1,name:"OCN"},{id:280,isChecked:!1,name:"京宽网络"},{id:281,isChecked:!1,name:"网易云"},{id:282,isChecked:!1,name:"ATT"},{id:283,isChecked:!1,name:"长城宽带"},{id:284,isChecked:!1,name:"Comcast"},{id:285,isChecked:!1,name:"Airtel"},{id:286,isChecked:!1,name:"Cox"},{id:287,isChecked:!1,name:"Shaw"},{id:288,isChecked:!1,name:"Eastlink"},{id:289,isChecked:!1,name:"Vodafone"},{id:290,isChecked:!1,name:"NttDoCoMo"},{id:291,isChecked:!1,name:"BBTEC"},{id:292,isChecked:!1,name:"Telstra"},{id:293,isChecked:!1,name:"iSeek"},{id:294,isChecked:!1,name:"Unitymedia"},{id:295,isChecked:!1,name:"Lanet"},{id:296,isChecked:!1,name:"TelecomItalia"},{id:297,isChecked:!1,name:"VirginMedia"},{id:298,isChecked:!1,name:"Hillsidenewmedia"},{id:299,isChecked:!1,name:"xTom"},{id:300,isChecked:!1,name:"Zenlayer"},{id:301,isChecked:!1,name:"Yandex"},{id:302,isChecked:!1,name:"CDNetworks"},{id:303,isChecked:!1,name:"iiNet"},{id:304,isChecked:!1,name:"VNPT"},{id:305,isChecked:!1,name:"JCOM"},{id:306,isChecked:!1,name:"Leaseweb"},{id:307,isChecked:!1,name:"hp.com"},{id:308,isChecked:!1,name:"Charter"},{id:309,isChecked:!1,name:"Verizon"},{id:310,isChecked:!1,name:"Cogeco"},{id:311,isChecked:!1,name:"TekSavvy"},{id:312,isChecked:!1,name:"CeRaNetworks"},{id:313,isChecked:!1,name:"Videotron"},{id:314,isChecked:!1,name:"Twcc"},{id:315,isChecked:!1,name:"Rogers"},{id:316,isChecked:!1,name:"IdeaCellular"},{id:317,isChecked:!1,name:"PLDT"},{id:318,isChecked:!1,name:"Tbroad"},{id:319,isChecked:!1,name:"LGCNS"},{id:320,isChecked:!1,name:"Frontier"},{id:321,isChecked:!1,name:"Telkomsel"},{id:322,isChecked:!1,name:"DNA"},{id:323,isChecked:!1,name:"Cogent"},{id:324,isChecked:!1,name:"PTCL"},{id:325,isChecked:!1,name:"Incapsula"},{id:326,isChecked:!1,name:"Linode"},{id:327,isChecked:!1,name:"Terrahost"},{id:328,isChecked:!1,name:"HEAnet"},{id:329,isChecked:!1,name:"Cloudinnovation"},{id:330,isChecked:!1,name:"电信通"},{id:331,isChecked:!1,name:"iPaddr"},{id:332,isChecked:!1,name:"Volia"},{id:333,isChecked:!1,name:"Bell"},{id:334,isChecked:!1,name:"Vocus"},{id:335,isChecked:!1,name:"eir"},{id:336,isChecked:!1,name:"DOSarrest"},{id:337,isChecked:!1,name:"大宽频"},{id:338,isChecked:!1,name:"油田宽带"},{id:339,isChecked:!1,name:"Telia"},{id:340,isChecked:!1,name:"NOS"},{id:341,isChecked:!1,name:"XO"},{id:342,isChecked:!1,name:"Zayo"},{id:343,isChecked:!1,name:"BitGravity"},{id:344,isChecked:!1,name:"Afilias"},{id:345,isChecked:!1,name:"Reflected"},{id:346,isChecked:!1,name:"VikingHost"},{id:347,isChecked:!1,name:"Vercel"},{id:348,isChecked:!1,name:"Free"},{id:349,isChecked:!1,name:"KPN"},{id:350,isChecked:!1,name:"Edgecast"},{id:351,isChecked:!1,name:"VodafoneAustralia"},{id:352,isChecked:!1,name:"和记黄埔"},{id:353,isChecked:!1,name:"Topchina"},{id:354,isChecked:!1,name:"中国长城互联网"},{id:355,isChecked:!1,name:"Twitter"},{id:356,isChecked:!1,name:"PetaExpress"},{id:357,isChecked:!1,name:"金山云"},{id:358,isChecked:!1,name:"Dropbox"},{id:359,isChecked:!1,name:"Voyager"},{id:360,isChecked:!1,name:"2degreesMobile"},{id:361,isChecked:!1,name:"SparkNZ"},{id:362,isChecked:!1,name:"台湾省教育网"},{id:363,isChecked:!1,name:"中电华通"},{id:364,isChecked:!1,name:"中电飞华"},{id:365,isChecked:!1,name:"西门子"},{id:366,isChecked:!1,name:"QuantilNetworks"},{id:367,isChecked:!1,name:"WPEngine"},{id:368,isChecked:!1,name:"Singtel"},{id:369,isChecked:!1,name:"BetConstruct"},{id:370,isChecked:!1,name:"Automattic"},{id:371,isChecked:!1,name:"NTX"},{id:372,isChecked:!1,name:"Squarespace"},{id:373,isChecked:!1,name:"Wix"},{id:374,isChecked:!1,name:"BODIS"},{id:375,isChecked:!1,name:"Lachtaristo"},{id:376,isChecked:!1,name:"Ziggo"},{id:377,isChecked:!1,name:"蓝汛"},{id:378,isChecked:!1,name:"StarHub"},{id:379,isChecked:!1,name:"UIH"},{id:380,isChecked:!1,name:"Chief"},{id:381,isChecked:!1,name:"Gcore"}]),n=Ze(i,"choose"),s=J(()=>t.value.filter(l=>n.value.includes(l.id))),o=l=>{const c=n.value.indexOf(l);n.value.splice(c,1)},a=l=>{n.value=l};return(l,c)=>{const f=_e,h=re,g=Te;return L(),te(Ce,null,[d(h,{vertical:"",size:"small"},{default:p(()=>[d(h,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(s.value,v=>(L(),te("div",{key:v.id,class:"border px-3 py-1 rounded-md text-xs flex items-center justify-center gap-2"},[U("div",null,Q(v.name),1),U("div",{class:"cursor-pointer",onClick:O=>o(v.id)},[d(f,{"local-icon":"ic--round-close",class:"text-[16px]"})],8,vN)]))),128))]),_:1}),d(g,{onClick:c[0]||(c[0]=()=>e.value=!0),dashed:""},{default:p(()=>c[3]||(c[3]=[X("+")])),_:1})]),_:1}),d(gN,{visible:e.value,"onUpdate:visible":c[1]||(c[1]=v=>e.value=v),choose:n.value,"onUpdate:choose":c[2]||(c[2]=v=>n.value=v),onHandleUpdate:a},null,8,["visible","choose"])],64)}}}),Ov=ce(bN,[["__scopeId","data-v-9af0701c"]]),ON={key:1},CN={class:"text-xs"},yN={class:"text-xs"},SN=ae({name:"ProvidersPage",__name:"providers-page",setup(i){const e=qe("wafSettings"),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=Ws(),a=B(!0),l=B(!1),c=J(()=>o.query.serverId),f=B(!1),h=B(!1),g=B({featureIsOn:!1,allowedProviders:[],deniedProviders:[],exceptURLPatterns:[],onlyURLPatterns:[],providerHTML:"",allowSearchEngine:!1}),v=B([]),O=B([]),y=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),S=k=>{g.value.exceptURLPatterns.splice(k,1)},w=k=>{g.value.onlyURLPatterns.splice(k,1)},_=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<g.value.exceptURLPatterns.length?g.value.exceptURLPatterns[T]={...M}:x!=="edit"&&g.value.exceptURLPatterns.push({...M})},$=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<g.value.onlyURLPatterns.length?g.value.onlyURLPatterns[T]={...M}:x!=="edit"&&g.value.onlyURLPatterns.push({...M})},A=async()=>{const{data:k,error:x}=await ht("/servers/server/settings/waf/ipadmin/providers",{serverId:c.value,firewallPolicyId:e==null?void 0:e.firewallPolicyId});x||(g.value=k,v.value=g.value.allowedProviders.map(T=>T.id),O.value=g.value.deniedProviders.map(T=>T.id))},R=async()=>{var M;l.value=!0;const k=new URLSearchParams,x={firewallPolicyId:e==null?void 0:e.firewallPolicyId,exceptURLPatternsJSON:JSON.stringify(g.value.exceptURLPatterns),onlyURLPatternsJSON:JSON.stringify(g.value.onlyURLPatterns),providerHTML:g.value.providerHTML};if(Object.entries(x).forEach(([N,I])=>{k.append(N,I)}),v.value.length>0)for(let N=0;N<v.value.length;N+=1)k.append("allowProviderIds",v.value[N].toString());if(O.value.length>0)for(let N=0;N<O.value.length;N+=1)k.append("denyProviderIds",O.value[N].toString());const{error:T}=await oo(k.toString(),"/servers/server/settings/waf/ipadmin/providers");T||(M=window.$message)==null||M.success("保存成功！"),l.value=!1};return vt(()=>{A().finally(()=>a.value=!1)}),(k,x)=>{const T=jt,M=nn,N=ve,I=Re,q=ss,z=Ne,H=Xt,F=Ht,V=nt,j=Te,se=re,G=ze;return a.value?(L(),W(T,{key:0})):g.value.featureIsOn?(L(),W(G,{key:2,title:C(u)("sec.regionLimit.countries.ispAccessControl")},{footer:p(()=>[d(se,null,{default:p(()=>[d(j,{type:"primary",onClick:R,disabled:l.value},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),default:p(()=>[d(V,{show:l.value},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("sec.regionLimit.countries.allowedRegions")},{default:p(()=>[d(Ov,{choose:v.value,"onUpdate:choose":x[0]||(x[0]=K=>v.value=K)},null,8,["choose"])]),_:1},8,["label"]),d(N,{label:C(u)("sec.regionLimit.countries.blockedRegions")},{default:p(()=>[v.value.length===0?(L(),W(Ov,{key:0,choose:O.value,"onUpdate:choose":x[1]||(x[1]=K=>O.value=K)},null,8,["choose"])):(L(),te("span",ON,Q(C(u)("sec.regionLimit.countries.allowedRegionsTip")),1))]),_:1},8,["label"])]),_:1},8,["label-placement"]),d(F,{"arrow-placement":"right"},{default:p(()=>[d(H,{title:C(u)("sec.regionLimit.countries.moreOptions"),name:"more"},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.exceptionURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",CN,Q(C(u)("sec.regionLimit.countries.noLimitForUrls")),1)]),default:p(()=>[d(q,{visible:f.value,"onUpdate:visible":x[2]||(x[2]=K=>f.value=K),options:y.value,"url-patterns":g.value.exceptURLPatterns,onDelete:S,onUpdate:_},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.limitURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",yN,Q(C(u)("sec.regionLimit.countries.limitForUrls")),1)]),default:p(()=>[d(q,{visible:h.value,"onUpdate:visible":x[3]||(x[3]=K=>h.value=K),options:y.value,"url-patterns":g.value.onlyURLPatterns,onDelete:w,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("sec.regionLimit.countries.tipContent"),feedback:C(u)("sec.regionLimit.countries.tipContentHelp")},{default:p(()=>[d(z,{type:"textarea",value:g.value.providerHTML,"onUpdate:value":x[4]||(x[4]=K=>g.value.providerHTML=K)},null,8,["value"])]),_:1},8,["label","feedback"])]),_:1},8,["label-placement"])]),_:1},8,["title"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])):(L(),W(M,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),_N=ce(SN,[["__scopeId","data-v-7416fbde"]]),wN={class:"tab-content"},kN={class:"group"},xN=["onClick"],PN=ae({name:"AddProvincesModal",__name:"add-provinces-modal",props:{visible:{default:!1},visibleModifiers:{},choose:{default:[]},chooseModifiers:{}},emits:Be(["handleUpdate"],["update:visible","update:choose"]),setup(i,{emit:e}){const t=Ze(i,"visible"),n=B([{id:1,isChecked:!1,name:"北京市"},{id:2,isChecked:!1,name:"天津市"},{id:3,isChecked:!1,name:"河北省"},{id:4,isChecked:!1,name:"山西省"},{id:5,isChecked:!1,name:"内蒙古自治区"},{id:6,isChecked:!1,name:"辽宁省"},{id:7,isChecked:!1,name:"吉林省"},{id:8,isChecked:!1,name:"黑龙江省"},{id:9,isChecked:!1,name:"上海市"},{id:10,isChecked:!1,name:"江苏省"},{id:11,isChecked:!1,name:"浙江省"},{id:12,isChecked:!1,name:"安徽省"},{id:13,isChecked:!1,name:"福建省"},{id:14,isChecked:!1,name:"江西省"},{id:15,isChecked:!1,name:"山东省"},{id:16,isChecked:!1,name:"河南省"},{id:17,isChecked:!1,name:"湖北省"},{id:18,isChecked:!1,name:"湖南省"},{id:19,isChecked:!1,name:"广东省"},{id:20,isChecked:!1,name:"广西壮族自治区"},{id:21,isChecked:!1,name:"海南省"},{id:22,isChecked:!1,name:"重庆市"},{id:23,isChecked:!1,name:"四川省"},{id:24,isChecked:!1,name:"贵州省"},{id:25,isChecked:!1,name:"云南省"},{id:26,isChecked:!1,name:"西藏自治区"},{id:27,isChecked:!1,name:"陕西省"},{id:28,isChecked:!1,name:"甘肃省"},{id:29,isChecked:!1,name:"青海省"},{id:30,isChecked:!1,name:"宁夏回族自治区"},{id:31,isChecked:!1,name:"新疆维吾尔自治区"},{id:32,isChecked:!1,name:"香港特别行政区"},{id:33,isChecked:!1,name:"澳门特别行政区"},{id:34,isChecked:!1,name:"台湾省"}]),s=Ze(i,"choose"),o=l=>{const c=s.value.indexOf(l);c===-1?s.value.push(l):s.value.splice(c,1),console.log(s.value)},a=()=>{t.value=!1};return(l,c)=>{const f=_e,h=Sp,g=Te,v=ze,O=Pt;return L(),W(O,{show:t.value,"onUpdate:show":c[1]||(c[1]=y=>t.value=y)},{default:p(()=>[d(v,{style:{width:"600px"},title:"选择区域",bordered:!1,size:"huge"},{"header-extra":p(()=>[U("span",{onClick:c[0]||(c[0]=()=>t.value=!1)},[d(f,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),action:p(()=>[d(g,{type:"primary",onClick:a},{default:p(()=>c[2]||(c[2]=[X("确定")])),_:1})]),default:p(()=>[U("div",wN,[U("div",kN,[U("ul",null,[(L(!0),te(Ce,null,Ot(n.value,y=>(L(),te("li",{key:y.id},[U("span",{class:Ln(["cursor-pointer px-2 rounded text-xs",{"bg-green-500 text-white":s.value.includes(y.id)}]),style:{height:"24px","line-height":"24px",display:"inline-block"},onClick:S=>o(y.id)},[d(h,{style:{"max-width":"70px"}},{default:p(()=>[X(Q(y.name),1)]),_:2},1024)],10,xN)]))),128))])])])]),_:1})]),_:1},8,["show"])}}}),$N=ce(PN,[["__scopeId","data-v-a1955fcf"]]),TN=["onClick"],RN=ae({name:"ChooseProvinces",__name:"choose-provinces",props:{choose:{default:[]},chooseModifiers:{}},emits:["update:choose"],setup(i){const e=B(!1),t=B([{id:1,isChecked:!1,name:"北京市"},{id:2,isChecked:!1,name:"天津市"},{id:3,isChecked:!1,name:"河北省"},{id:4,isChecked:!1,name:"山西省"},{id:5,isChecked:!1,name:"内蒙古自治区"},{id:6,isChecked:!1,name:"辽宁省"},{id:7,isChecked:!1,name:"吉林省"},{id:8,isChecked:!1,name:"黑龙江省"},{id:9,isChecked:!1,name:"上海市"},{id:10,isChecked:!1,name:"江苏省"},{id:11,isChecked:!1,name:"浙江省"},{id:12,isChecked:!1,name:"安徽省"},{id:13,isChecked:!1,name:"福建省"},{id:14,isChecked:!1,name:"江西省"},{id:15,isChecked:!1,name:"山东省"},{id:16,isChecked:!1,name:"河南省"},{id:17,isChecked:!1,name:"湖北省"},{id:18,isChecked:!1,name:"湖南省"},{id:19,isChecked:!1,name:"广东省"},{id:20,isChecked:!1,name:"广西壮族自治区"},{id:21,isChecked:!1,name:"海南省"},{id:22,isChecked:!1,name:"重庆市"},{id:23,isChecked:!1,name:"四川省"},{id:24,isChecked:!1,name:"贵州省"},{id:25,isChecked:!1,name:"云南省"},{id:26,isChecked:!1,name:"西藏自治区"},{id:27,isChecked:!1,name:"陕西省"},{id:28,isChecked:!1,name:"甘肃省"},{id:29,isChecked:!1,name:"青海省"},{id:30,isChecked:!1,name:"宁夏回族自治区"},{id:31,isChecked:!1,name:"新疆维吾尔自治区"},{id:32,isChecked:!1,name:"香港特别行政区"},{id:33,isChecked:!1,name:"澳门特别行政区"},{id:34,isChecked:!1,name:"台湾省"}]),n=Ze(i,"choose"),s=J(()=>t.value.filter(l=>n.value.includes(l.id))),o=l=>{const c=n.value.indexOf(l);n.value.splice(c,1)},a=l=>{n.value=l};return(l,c)=>{const f=_e,h=re,g=Te;return L(),te(Ce,null,[d(h,{vertical:"",size:"small"},{default:p(()=>[d(h,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(s.value,v=>(L(),te("div",{key:v.id,class:"border px-3 py-1 rounded-md text-xs flex items-center justify-center gap-2"},[U("div",null,Q(v.name),1),U("div",{class:"cursor-pointer",onClick:O=>o(v.id)},[d(f,{"local-icon":"ic--round-close",class:"text-[16px]"})],8,TN)]))),128))]),_:1}),d(g,{onClick:c[0]||(c[0]=()=>e.value=!0),dashed:""},{default:p(()=>c[3]||(c[3]=[X("+")])),_:1})]),_:1}),d($N,{visible:e.value,"onUpdate:visible":c[1]||(c[1]=v=>e.value=v),choose:n.value,"onUpdate:choose":c[2]||(c[2]=v=>n.value=v),onHandleUpdate:a},null,8,["visible","choose"])],64)}}}),Cv=ce(RN,[["__scopeId","data-v-dc564470"]]),IN={key:1},QN={class:"text-xs"},AN={class:"text-xs"},NN=ae({name:"ProvincesPage",__name:"provinces-page",setup(i){const e=qe("wafSettings"),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=Ws(),a=B(!0),l=B(!1),c=J(()=>o.query.serverId),f=B({featureIsOn:!1,allowedProvinces:[],deniedProvinces:[],exceptURLPatterns:[],onlyURLPatterns:[],provinceHTML:"",allowSearchEngine:!1}),h=B(!1),g=B(!1),v=B([]),O=B([]),y=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),S=k=>{f.value.exceptURLPatterns.splice(k,1)},w=k=>{f.value.onlyURLPatterns.splice(k,1)},_=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<f.value.exceptURLPatterns.length?f.value.exceptURLPatterns[T]={...M}:x!=="edit"&&f.value.exceptURLPatterns.push({...M})},$=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<f.value.onlyURLPatterns.length?f.value.onlyURLPatterns[T]={...M}:x!=="edit"&&f.value.onlyURLPatterns.push({...M})},A=async()=>{const{data:k,error:x}=await ht("/servers/server/settings/waf/ipadmin/provinces",{serverId:c.value,firewallPolicyId:e==null?void 0:e.firewallPolicyId});x||(f.value=k,v.value=f.value.allowedProvinces.map(T=>T.id),O.value=f.value.deniedProvinces.map(T=>T.id))},R=async()=>{var M;l.value=!0;const k=new URLSearchParams,x={firewallPolicyId:e==null?void 0:e.firewallPolicyId,exceptURLPatternsJSON:JSON.stringify(f.value.exceptURLPatterns),onlyURLPatternsJSON:JSON.stringify(f.value.onlyURLPatterns),provinceHTML:f.value.provinceHTML};if(Object.entries(x).forEach(([N,I])=>{k.append(N,I)}),v.value.length>0)for(let N=0;N<v.value.length;N+=1)k.append("allowProvinceIds",v.value[N].toString());if(O.value.length>0)for(let N=0;N<O.value.length;N+=1)k.append("denyProvinceIds",O.value[N].toString());const{error:T}=await oo(k.toString(),"/servers/server/settings/waf/ipadmin/provinces");T||(M=window.$message)==null||M.success("保存成功！"),l.value=!1};return vt(()=>{A().finally(()=>a.value=!1)}),(k,x)=>{const T=jt,M=nn,N=ve,I=Re,q=ss,z=Ne,H=Xt,F=Ht,V=nt,j=Te,se=re,G=ze;return a.value?(L(),W(T,{key:0})):f.value.featureIsOn?(L(),W(G,{key:2,title:C(u)("sec.regionLimit.countries.provinceAccessControl")},{footer:p(()=>[d(se,null,{default:p(()=>[d(j,{type:"primary",onClick:R,disabled:l.value},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),default:p(()=>[d(V,{show:l.value},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("sec.regionLimit.countries.allowedRegions")},{default:p(()=>[d(Cv,{choose:v.value,"onUpdate:choose":x[0]||(x[0]=K=>v.value=K)},null,8,["choose"])]),_:1},8,["label"]),d(N,{label:C(u)("sec.regionLimit.countries.blockedRegions")},{default:p(()=>[v.value.length===0?(L(),W(Cv,{key:0,choose:O.value,"onUpdate:choose":x[1]||(x[1]=K=>O.value=K)},null,8,["choose"])):(L(),te("span",IN,Q(C(u)("sec.regionLimit.countries.allowedRegionsTip")),1))]),_:1},8,["label"])]),_:1},8,["label-placement"]),d(F,{"arrow-placement":"right"},{default:p(()=>[d(H,{title:C(u)("sec.regionLimit.countries.moreOptions"),name:"more"},{default:p(()=>[d(I,{"label-placement":s.value},{default:p(()=>[d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.exceptionURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",QN,Q(C(u)("sec.regionLimit.countries.noLimitForUrls")),1)]),default:p(()=>[d(q,{visible:h.value,"onUpdate:visible":x[2]||(x[2]=K=>h.value=K),options:y.value,"url-patterns":f.value.exceptURLPatterns,onDelete:S,onUpdate:_},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.securityConfig.fiveShield.limitURL"),"label-placement":s.value,class:"mb-4"},{feedback:p(()=>[U("span",AN,Q(C(u)("sec.regionLimit.countries.limitForUrls"))+"<",1)]),default:p(()=>[d(q,{visible:g.value,"onUpdate:visible":x[3]||(x[3]=K=>g.value=K),options:y.value,"url-patterns":f.value.onlyURLPatterns,onDelete:w,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("sec.regionLimit.countries.tipContent"),feedback:C(u)("sec.regionLimit.countries.tipContentHelp")},{default:p(()=>[d(z,{type:"textarea",value:f.value.provinceHTML,"onUpdate:value":x[4]||(x[4]=K=>f.value.provinceHTML=K)},null,8,["value"])]),_:1},8,["label","feedback"])]),_:1},8,["label-placement"])]),_:1},8,["title"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])):(L(),W(M,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),MN=ce(NN,[["__scopeId","data-v-05639eab"]]),LN={class:"h-full overflow-y-auto p-2"},UN=ae({name:"RegionLimit",__name:"region-limit",setup(i){const e=B("countries"),t=J(()=>[{label:u("sec.regionLimit.showBtn.countries"),key:"countries"},{label:u("sec.regionLimit.showBtn.provinces"),key:"provinces"},{label:u("sec.regionLimit.showBtn.providers"),key:"providers"}]),n=o=>{e.value=o},s={countries:uN,provinces:MN,providers:_N};return(o,a)=>{const l=Te,c=re;return L(),te("div",LN,[d(c,{vertical:""},{default:p(()=>[d(c,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(t.value,f=>(L(),W(l,{key:f.key,onClick:h=>n(f.key),type:e.value===f.key?"primary":"default",size:"small"},{default:p(()=>[X(Q(f.label),1)]),_:2},1032,["onClick","type"]))),128))]),_:1}),(L(),W(yn(s[e.value])))]),_:1})])}}});function _a(i="base"){const e=Ws(),t=TO(),n=B(e.query.panel||i);function s(o){n.value=o;const a={...e.query,panel:o},l=t.resolve({query:a}).fullPath;window.history.replaceState({},"","#"+l),Object.assign(e.query,a)}return je(()=>e.query.panel,o=>{o?n.value=o:s(i)},{immediate:!0}),{activeTab:n,changeMainTab:s}}const DN=ae({name:"SecurityConfig",__name:"security-base",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),{activeTab:s,changeMainTab:o}=_a("base"),a=Ws(),l=J(()=>a.query.serverId),c=fe({firewallConfig:{isPrior:!1,isOn:!1,firewallPolicyId:0,ignoreGlobalRules:!1,defaultCaptchaType:"none"},featureIsOn:!1,webId:0,firewallPolicyId:0}),f=async()=>{const O="/servers/server/settings/waf",{data:y,error:S}=await ht(O,{serverId:l.value});if(!S&&y){const{featureIsOn:w=!1,firewallConfig:_,firewallPolicyId:$,webId:A=0}=y;Object.assign(c,{featureIsOn:w,firewallConfig:_??c.firewallConfig,firewallPolicyId:$,webId:A}),_||(c.firewallConfig.firewallPolicyId=$)}},h=B(null),g=B(0),v=()=>{if(h.value){const S=window.innerHeight-300;g.value=S}};return vt(()=>{f(),v(),window.addEventListener("resize",v)}),Ca(()=>{v()}),Nn("wafSettings",c),(O,y)=>{const S=_s,w=Ss;return L(),W(w,{value:C(s),onActiveNameChange:C(o),ref_key:"tabsRef",ref:h,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:g.value+"px"}:void 0)},{default:p(()=>[d(S,{name:"base",tab:O.$t("page.webSet.smartProtection"),"display-directive":"show:lazy"},{default:p(()=>[d(fA)]),_:1},8,["tab"]),d(S,{name:"requestLimits",tab:O.$t("page.webSet.requestLimits"),"display-directive":"show:lazy"},{default:p(()=>[d(sR)]),_:1},8,["tab"]),d(S,{name:"waf",tab:O.$t("sec.waf.title")},{default:p(()=>[d(u8)]),_:1},8,["tab"]),d(S,{name:"regionLimit",tab:O.$t("sec.regionLimit.title")},{default:p(()=>[d(UN)]),_:1},8,["tab"]),d(S,{name:"accessControl",tab:O.$t("sec.accessControl.title")},{default:p(()=>[d(zA)]),_:1},8,["tab"]),d(S,{name:"test",tab:O.$t("sec.test.title")},{default:p(()=>[d(MA)]),_:1},8,["tab"])]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),qN=ce(DN,[["__scopeId","data-v-082c9746"]]),EN={class:"text-xs"},BN=ae({name:"ChangeKeyDrawer",__name:"change-key-drawer",props:Be({config:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["updateConfig"],["update:visible"]),setup(i,{emit:e}){const t=e,n=i,s=fe({isOn:!0,scheme:"http",host:""}),o=Ze(i,"visible"),a=()=>{const l=js(n.config);l.cacheConfig.key=js(s),t("updateConfig",l),o.value=!1};return je(()=>n.config,l=>{l.cacheConfig.key&&Object.assign(s,js(l.cacheConfig.key))},{deep:!0,immediate:!0}),(l,c)=>{const f=_e,h=ft,g=Ne,v=tn,O=ve,y=et,S=Re,w=Te,_=re,$=ze,A=Pt;return L(),W(A,{show:o.value,"onUpdate:show":c[5]||(c[5]=R=>o.value=R)},{default:p(()=>[d($,{style:{width:"460px"},title:l.$t("common.modify"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:c[0]||(c[0]=()=>o.value=!1)},[d(f,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(_,{justify:"center"},{default:p(()=>[d(w,{class:"px-6",type:"info",onClick:a},{default:p(()=>[X(Q(l.$t("common.save")),1)]),_:1}),d(w,{class:"button-default px-6",onClick:c[4]||(c[4]=()=>o.value=!1)},{default:p(()=>[X(Q(l.$t("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(S,null,{default:p(()=>[d(O,{label:l.$t("page.webSet.cacheConfig.mainDomain")},{feedback:p(()=>[U("span",EN,Q(l.$t("page.webSet.cacheConfig.mainDomainTip")),1)]),default:p(()=>[d(v,null,{default:p(()=>[d(h,{value:s.scheme,"onUpdate:value":c[1]||(c[1]=R=>s.scheme=R),style:{width:"33%"},options:[{label:"http://",value:"http"},{label:"https://",value:"https"}]},null,8,["value"]),d(g,{value:s.host,"onUpdate:value":c[2]||(c[2]=R=>s.host=R)},null,8,["value"])]),_:1})]),_:1},8,["label"]),d(O,{label:l.$t("page.webSet.cacheConfig.enableMainDomain")},{default:p(()=>[d(y,{checked:s.isOn,"onUpdate:checked":c[3]||(c[3]=R=>s.isOn=R),label:l.$t("page.webSet.cacheConfig.enableMainDomainTip")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),ZN=ce(BN,[["__scopeId","data-v-5a6bc7d2"]]),zN={class:"text-xs"},HN=ae({name:"HttpCondMimeType",__name:"http-cond-mime-type",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"mime-type",isRequest:!1,param:"${response.contentType}",operator:"mime type",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondMimeType.label")},{feedback:p(()=>[U("span",zN,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondMimeType.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),XN=ce(HN,[["__scopeId","data-v-3f8ac717"]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:XN},Symbol.toStringTag,{value:"Module"})),jN=ae({name:"OperatopCommon",__name:"operatop-common",props:Be({operatorItem:{}},{modelValue:{default:{type:"user-agent-regexp",isRequest:!0,param:"",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const e=i,t=Ze(i,"modelValue");return(n,s)=>{const o=Ne,a=ve;return L(),W(a,{label:n.$t("page.webSet.securityConfig.fiveShield.comparisonValue"),class:"mb-3"},{feedback:p(()=>[U("span",null,Q(e.operatorItem.feedback),1)]),default:p(()=>[d(o,{value:t.value.value,"onUpdate:value":s[0]||(s[0]=l=>t.value.value=l)},null,8,["value"])]),_:1},8,["label"])}}}),VN=ce(jN,[["__scopeId","data-v-3c39c2e8"]]),FN=Object.freeze(Object.defineProperty({__proto__:null,default:VN},Symbol.toStringTag,{value:"Module"})),WN=ae({name:"OperatopCommon",__name:"operatop-lists",props:Be({operatorItem:{}},{modelValue:{default:{type:"user-agent-regexp",isRequest:!0,param:"",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const e=i,t=Ze(i,"modelValue"),s=B((()=>{try{return JSON.parse(t.value.value)}catch{return[]}})());return je(()=>s.value,o=>{t.value.value=JSON.stringify(o)}),(o,a)=>{const l=Wt,c=ve;return L(),W(c,{label:"对比值",class:"mb-3"},{feedback:p(()=>[U("span",null,Q(e.operatorItem.feedback),1)]),default:p(()=>[d(l,{value:s.value,"onUpdate:value":a[0]||(a[0]=f=>s.value=f)},null,8,["value"])]),_:1})}}}),YN=ce(WN,[["__scopeId","data-v-839067f0"]]),GN=Object.freeze(Object.defineProperty({__proto__:null,default:YN},Symbol.toStringTag,{value:"Module"})),JN={class:"text-xs"},KN=ae({name:"HttpCondParams",__name:"http-cond-params",props:{editModel:{}},setup(i,{expose:e}){var O;const t={type:"params",isRequest:!0,param:"",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,s=()=>n.editModel.data.type===t.type?n.editModel.data:t,o=Object.assign({"../operator/operatop-common.vue":FN,"../operator/operatop-lists.vue":GN}),a={};for(const y in o){const S=((O=y.split("/").pop())==null?void 0:O.replace(".vue",""))||"";a[S]=o[y].default}const l=fe(s()),c=J(()=>[{value:"default",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.default")},{value:"${edgeVersion}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.edgeVersion",{edgeVersion:"{edgeVersion}"})},{value:"${remoteAddr}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remoteAddr",{remoteAddr:"{remoteAddr}"})},{value:"${rawRemoteAddr}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.rawRemoteAddr",{rawRemoteAddr:"{rawRemoteAddr}"})},{value:"${remotePort}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remotePort",{remotePort:"{remotePort}"})},{value:"${remoteUser}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.remoteUser",{remoteUser:"{remoteUser}"})},{value:"${requestURI}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestURI",{requestURI:"{requestURI}"})},{value:"${requestPath}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPath",{requestPath:"{requestPath}"})},{value:"${requestURL}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestURL",{requestURL:"{requestURL}"})},{value:"${requestLength}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestLength",{requestLength:"{requestLength}"})},{value:"${requestMethod}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestMethod",{requestMethod:"{requestMethod}"})},{value:"${requestFilename}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestFilename",{requestFilename:"{requestFilename}"})},{value:"${requestPathExtension}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPathExtension",{requestPathExtension:"{requestPathExtension}"})},{value:"${requestPathLowerExtension}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.requestPathLowerExtension",{requestPathLowerExtension:"{requestPathLowerExtension}"})},{value:"${scheme}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.scheme",{scheme:"{scheme}"})},{value:"${proto}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.proto",{proto:"{proto}"})},{value:"${timeISO8601}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timeISO8601",{timeISO8601:"{timeISO8601}"})},{value:"${timeLocal}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timeLocal",{timeLocal:"{timeLocal}"})},{value:"${msec}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.msec",{msec:"{msec}"})},{value:"${timestamp}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.timestamp",{timestamp:"{timestamp}"})},{value:"${host}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.host",{host:"{host}"})},{value:"${cname}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cname",{cname:"{cname}"})},{value:"${serverName}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.serverName",{serverName:"{serverName}"})},{value:"${serverPort}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.serverPort",{serverPort:"{serverPort}"})},{value:"${referer}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.referer",{referer:"{referer}"})},{value:"${referer.host}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.refererHost")},{value:"${userAgent}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.userAgent",{userAgent:"{userAgent}"})},{value:"${contentType}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.contentType",{contentType:"{contentType}"})},{value:"${cookies}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cookies",{cookies:"{cookies}"})},{value:"${cookie.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.cookieNAME",{cookieNAME:"{cookie.NAME}"})},{value:"${isArgs}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.isArgs",{isArgs:"{isArgs}"})},{value:"${args}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.args",{args:"{args}"})},{value:"${arg.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.argNAME",{argNAME:"{arg.NAME}"})},{value:"${headers}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.headers",{headers:"{headers}"})},{value:"${header.NAME}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.headerNAME",{headerNAME:"{header.NAME}"})},{value:"${geo.country.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCountryName",{geoCountryName:"{geo.country.name}"})},{value:"${geo.country.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCountryId",{geoCountryId:"{geo.country.id}"})},{value:"${geo.province.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoProvinceName",{geoProvinceName:"{geo.province.name}"})},{value:"${geo.province.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoProvinceId",{geoProvinceId:"{geo.province.id}"})},{value:"${geo.city.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCityName",{geoCityName:"{geo.city.name}"})},{value:"${geo.city.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.geoCityId",{geoCityId:"{geo.city.id}"})},{value:"${isp.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.ispName",{ispName:"{isp.name}"})},{value:"${isp.id}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.ispId",{ispId:"{isp.id}"})},{value:"${browser.os.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserOsName",{browserOsName:"{browser.os.name}"})},{value:"${browser.os.version}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserOsVersion",{browserOsVersion:"{browser.os.version}"})},{value:"${browser.name}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserName",{browserName:"{browser.name}"})},{value:"${browser.version}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserVersion",{browserVersion:"{browser.version}"})},{value:"${browser.isMobile}",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.options.browserIsMobile",{browserIsMobile:"{browser.isMobile}"})}]),f=J(()=>g.value.find(S=>S.value===l.operator)),h=J(()=>f.value?a[f.value.component]:a["operatop-common"]),g=J(()=>[{value:"regexp",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.regexp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.regexp.feedback")},{value:"not regexp",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notRegexp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notRegexp.feedback")},{value:"wildcard match",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardMatch.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardMatch.feedback")},{value:"wildcard not match",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardNotMatch.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.wildcardNotMatch.feedback")},{value:"eq",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eq.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eq.feedback")},{value:"prefix",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.prefix.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.prefix.feedback")},{value:"suffix",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.suffix.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.suffix.feedback")},{value:"contains",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.contains.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.contains.feedback")},{value:"not contains",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notContains.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notContains.feedback")},{value:"not",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.not.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.not.feedback")},{value:"in",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.in.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.in.feedback")},{value:"not in",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notIn.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.notIn.feedback")},{value:"file ext",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.fileExt.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.fileExt.feedback")},{value:"mime type",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mimeType.label"),component:"operatop-lists",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mimeType.feedback")},{value:"version range",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.versionRange.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.versionRange.feedback")},{value:"eq int",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqInt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqInt.feedback")},{value:"eq float",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqFloat.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqFloat.feedback")},{value:"gt",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gt.feedback")},{value:"gte",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gte.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gte.feedback")},{value:"lt",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lt.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lt.feedback")},{value:"lte",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lte.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lte.feedback")},{value:"mod 10",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod10.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod10.feedback")},{value:"mod 100",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod100.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod100.feedback")},{value:"mod",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.mod.feedback")},{value:"eq ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.eqIp.feedback")},{value:"gt ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gtIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gtIp.feedback")},{value:"gte ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gteIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.gteIp.feedback")},{value:"lt ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ltIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ltIp.feedback")},{value:"lte ip",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lteIp.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.lteIp.feedback")},{value:"ip range",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipRange.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipRange.feedback")},{value:"ip mod 10",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod10.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod10.feedback")},{value:"ip mod 100",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod100.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod100.feedback")},{value:"ip mod",label:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod.label"),component:"operatop-common",feedback:u("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.operator.ipMod.feedback")}]),v=(y,S)=>{y!=="default"&&(l.param+=y)};return e({model:l}),(y,S)=>{const w=Ne,_=ft,$=re,A=ve,R=et;return L(),te(Ce,null,[d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.paramValue")},{feedback:p(()=>[U("span",JN,Q(C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.paramValue_description")),1)]),default:p(()=>[d($,{vertical:"",class:"w-full"},{default:p(()=>[d(w,{value:l.param,"onUpdate:value":S[0]||(S[0]=k=>l.param=k),placeholder:"${xxx}"},null,8,["value"]),d(_,{options:c.value,"default-value":"default","onUpdate:value":v},null,8,["options"])]),_:1})]),_:1},8,["label"]),d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondParams.comparisonOperator")},{default:p(()=>[d(_,{value:l.operator,"onUpdate:value":S[1]||(S[1]=k=>l.operator=k),options:g.value},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(h.value),{modelValue:l,"onUpdate:modelValue":S[2]||(S[2]=k=>l=k),"operator-item":f.value},null,8,["modelValue","operator-item"])),d(A,{label:C(u)("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(R,{checked:l.isCaseInsensitive,"onUpdate:checked":S[3]||(S[3]=k=>l.isCaseInsensitive=k),label:C(u)("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])],64)}}}),eM=ce(KN,[["__scopeId","data-v-1c2e1928"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,default:eM},Symbol.toStringTag,{value:"Module"})),tM={class:"text-xs"},nM=ae({name:"HttpCondUrlAll",__name:"http-cond-url-all",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-all",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"/",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve;return L(),W(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlAll.label")},{feedback:p(()=>[U("span",tM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlAll.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=h=>o.value=h)},null,8,["value"])]),_:1},8,["label"])}}}),sM=ce(nM,[["__scopeId","data-v-328495c3"]]),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:sM},Symbol.toStringTag,{value:"Module"})),iM={class:"text-xs"},oM=ae({name:"HttpCondUrlEqIndex",__name:"http-cond-url-eq-index",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-eq-index",isRequest:!0,param:"${requestPath}",operator:"eq",value:"/",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve;return L(),W(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEqIndex.label")},{feedback:p(()=>[U("span",iM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEqIndex.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=h=>o.value=h)},null,8,["value"])]),_:1},8,["label"])}}}),aM=ce(oM,[["__scopeId","data-v-60bdb4cf"]]),Ip=Object.freeze(Object.defineProperty({__proto__:null,default:aM},Symbol.toStringTag,{value:"Module"})),lM={class:"text-xs"},rM=ae({name:"HttpCondUrlEq",__name:"http-cond-url-eq",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-eq",isRequest:!0,param:"${requestPath}",operator:"eq",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEq.label"),class:"mb-3"},{feedback:p(()=>[U("span",lM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlEq.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),cM=ce(rM,[["__scopeId","data-v-2252facb"]]),Qp=Object.freeze(Object.defineProperty({__proto__:null,default:cM},Symbol.toStringTag,{value:"Module"})),dM={class:"text-xs"},uM=ae({name:"HttpCondUrlExtension",__name:"http-cond-url-extension",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlExtension.label")},{feedback:p(()=>[U("span",dM,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlExtension.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),fM=ce(uM,[["__scopeId","data-v-a427a8b0"]]),Ap=Object.freeze(Object.defineProperty({__proto__:null,default:fM},Symbol.toStringTag,{value:"Module"})),pM={class:"text-xs"},hM=ae({name:"HttpCondUrlNotEq",__name:"http-cond-url-not-eq",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-eq",isRequest:!0,param:"${requestPath}",operator:"eq",value:"",isReverse:!0,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotEq.label"),class:"mb-3"},{feedback:p(()=>[U("span",pM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotEq.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),mM=ce(hM,[["__scopeId","data-v-9e4a3b70"]]),Np=Object.freeze(Object.defineProperty({__proto__:null,default:mM},Symbol.toStringTag,{value:"Module"})),gM={class:"text-xs"},vM=ae({name:"HttpCondUrlNotExtension",__name:"http-cond-url-not-extension",props:{editModel:{}},setup(i,{expose:e}){const t=i,n={type:"url-not-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"not in",value:"[]",isReverse:!1,isCaseInsensitive:!1},s=()=>t.editModel.data.type===n.type?t.editModel.data:n,o=fe(s()),a=B(JSON.parse(s().value));return je(()=>a.value,l=>{o.value=JSON.stringify(l)}),e({model:o}),(l,c)=>{const f=Wt,h=ve;return L(),W(h,{label:l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotExtension.label")},{feedback:p(()=>[U("span",gM,Q(l.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotExtension.spanText")),1)]),default:p(()=>[d(f,{value:a.value,"onUpdate:value":c[0]||(c[0]=g=>a.value=g)},null,8,["value"])]),_:1},8,["label"])}}}),bM=ce(vM,[["__scopeId","data-v-a088f7a5"]]),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:bM},Symbol.toStringTag,{value:"Module"})),OM={class:"text-xs"},CM=ae({name:"HttpCondUrlNotPrefix",__name:"http-cond-url-not-prefix",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-prefix",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"",isReverse:!0,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotPrefix.label"),class:"mb-3"},{feedback:p(()=>[U("span",OM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotPrefix.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),yM=ce(CM,[["__scopeId","data-v-e777bb4b"]]),Lp=Object.freeze(Object.defineProperty({__proto__:null,default:yM},Symbol.toStringTag,{value:"Module"})),SM={class:"text-xs"},_M=ae({name:"HttpCondUrlNotRegexp",__name:"http-cond-url-not-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-not-regexp",isRequest:!0,param:"${requestPath}",operator:"not regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",SM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlNotRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),wM=ce(_M,[["__scopeId","data-v-14e06bfa"]]),Up=Object.freeze(Object.defineProperty({__proto__:null,default:wM},Symbol.toStringTag,{value:"Module"})),kM={class:"text-xs"},xM=ae({name:"HttpCondUrlPrefix",__name:"http-cond-url-prefix",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-prefix",isRequest:!0,param:"${requestPath}",operator:"prefix",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlPrefix.label"),class:"mb-3"},{feedback:p(()=>[U("span",kM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlPrefix.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),PM=ce(xM,[["__scopeId","data-v-c0cd6709"]]),Dp=Object.freeze(Object.defineProperty({__proto__:null,default:PM},Symbol.toStringTag,{value:"Module"})),$M={class:"text-xs"},TM=ae({name:"HttpCondUrlRegexp",__name:"http-cond-url-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-regexp",isRequest:!0,param:"${requestPath}",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",$M,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),RM=ce(TM,[["__scopeId","data-v-0e5d5165"]]),qp=Object.freeze(Object.defineProperty({__proto__:null,default:RM},Symbol.toStringTag,{value:"Module"})),IM={class:"text-xs"},QM=ae({name:"HttpCondUrlWildcardMatch",__name:"http-cond-url-wildcard-match",props:{editModel:{}},setup(i,{expose:e}){const t={type:"url-wildcard-match",isRequest:!0,param:"${requestPath}",operator:"wildcard match",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlWildcardMatch.label"),class:"mb-3"},{feedback:p(()=>[U("span",IM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUrlWildcardMatch.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),AM=ce(QM,[["__scopeId","data-v-4bde1761"]]),Ep=Object.freeze(Object.defineProperty({__proto__:null,default:AM},Symbol.toStringTag,{value:"Module"})),NM={class:"text-xs"},MM=ae({name:"HttpCondUserAgentNotRegexp",__name:"http-cond-user-agent-not-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"user-agent-not-regexp",isRequest:!0,param:"${userAgent}",operator:"not regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentNotRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",NM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentNotRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),LM=ce(MM,[["__scopeId","data-v-57012519"]]),Bp=Object.freeze(Object.defineProperty({__proto__:null,default:LM},Symbol.toStringTag,{value:"Module"})),UM={class:"text-xs"},DM=ae({name:"HttpCondUserAgentRegexp",__name:"http-cond-user-agent-regexp",props:{editModel:{}},setup(i,{expose:e}){const t={type:"user-agent-regexp",isRequest:!0,param:"${userAgent}",operator:"regexp",value:"",isReverse:!1,isCaseInsensitive:!1},n=i,o=fe(n.editModel.data.type===t.type?n.editModel.data:t);return e({model:o}),(a,l)=>{const c=Ne,f=ve,h=et,g=re;return L(),W(g,{vertical:""},{default:p(()=>[d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentRegexp.label"),class:"mb-3"},{feedback:p(()=>[U("span",UM,Q(a.$t("page.webSet.securityConfig.fiveShield.condsComponents.HttpCondUserAgentRegexp.spanText")),1)]),default:p(()=>[d(c,{value:o.value,"onUpdate:value":l[0]||(l[0]=v=>o.value=v)},null,8,["value"])]),_:1},8,["label"]),d(f,{label:a.$t("page.webSet.securityConfig.fiveShield.operator_description")},{default:p(()=>[d(h,{checked:o.isCaseInsensitive,"onUpdate:checked":l[1]||(l[1]=v=>o.isCaseInsensitive=v),label:a.$t("page.webSet.securityConfig.fiveShield.comparisonOperator_description")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})}}}),qM=ce(DM,[["__scopeId","data-v-f7d614ef"]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:qM},Symbol.toStringTag,{value:"Module"})),EM={class:"text-xs"},BM=ae({name:"Cache",__name:"cache",props:Be({optionsConds:{}},{loading:{default:!1},loadingModifiers:{}}),emits:Be(["closeModal"],["update:loading"]),setup(i,{emit:e}){var A;const t=e,n=qe("config"),s=qe("updataCache"),o=fe({component:"http-cond-url-extension"}),a=i,l=Ze(i,"loading"),c=fe({type:"add",index:0,data:{type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1}}),f=B(),h=Object.assign({"../../../../../../components/conds/http-cond-mime-type.vue":$p,"../../../../../../components/conds/http-cond-params.vue":Tp,"../../../../../../components/conds/http-cond-url-all.vue":Rp,"../../../../../../components/conds/http-cond-url-eq-index.vue":Ip,"../../../../../../components/conds/http-cond-url-eq.vue":Qp,"../../../../../../components/conds/http-cond-url-extension.vue":Ap,"../../../../../../components/conds/http-cond-url-not-eq.vue":Np,"../../../../../../components/conds/http-cond-url-not-extension.vue":Mp,"../../../../../../components/conds/http-cond-url-not-prefix.vue":Lp,"../../../../../../components/conds/http-cond-url-not-regexp.vue":Up,"../../../../../../components/conds/http-cond-url-prefix.vue":Dp,"../../../../../../components/conds/http-cond-url-regexp.vue":qp,"../../../../../../components/conds/http-cond-url-wildcard-match.vue":Ep,"../../../../../../components/conds/http-cond-user-agent-not-regexp.vue":Bp,"../../../../../../components/conds/http-cond-user-agent-regexp.vue":Zp}),g={};for(const R in h){const k=((A=R.split("/").pop())==null?void 0:A.replace(".vue",""))||"";g[k]=h[R].default}const v=J(()=>g[o.component]),O=J(()=>{const R=a.optionsConds.find(k=>k.component===o.component);return(R==null?void 0:R.description)||""}),y=B(!1),S=fe({isOn:!0,cachePolicyId:0,key:"${scheme}://${host}${requestPath}",life:{count:1,unit:"day"},status:[200],maxSize:{count:128,unit:"mb"},minSize:{count:0,unit:"kb"},skipCacheControlValues:["private","no-cache","no-store"],skipSetCookie:!0,enableRequestCachePragma:!1,conds:null,simpleCond:null,allowChunkedEncoding:!0,allowPartialContent:!0,forcePartialContent:!1,enableIfNoneMatch:!1,enableIfModifiedSince:!1,enableReadingOriginAsync:!1,isReverse:!1,methods:[],expiresTime:{isPrior:!1,isOn:!1,overwrite:!0,autoCalculate:!0,duration:{count:-1,unit:"hour"}}}),w=R=>{R?`${S.key}`:S.key.replace("${isArgs}${args}","")},_=async()=>{l.value=!0;const R="/servers/server/settings/cache/createPopup",k={condJSON:JSON.stringify(f.value.model),allowPartialContent:"1",statusList:"200",skipResponseCacheControlValues:["private","no-store","no-cache"],cacheRefJSON:JSON.stringify(S)},{data:x,error:T}=await Ee(k,R);T||(n==null||n.cacheConfig.cacheRefs.push(x.cacheRef),l.value=!1,t("closeModal"),s&&s())},$=J(()=>[{label:u("page.webSet.cacheConfig.minute"),value:"minute"},{label:u("page.webSet.cacheConfig.hour"),value:"hour"},{label:u("page.webSet.cacheConfig.day"),value:"day"}]);return(R,k)=>{const x=ft,T=ve,M=Ut,N=tn,I=et,q=Re,z=Te,H=re;return L(),te(Ce,null,[d(q,{class:"max-h-[260px] overflow-y-auto"},{default:p(()=>[d(T,{label:C(u)("page.webSet.securityConfig.fiveShield.selectConditionType")},{feedback:p(()=>[U("span",EM,Q(O.value),1)]),default:p(()=>[d(x,{value:o.component,"onUpdate:value":k[0]||(k[0]=F=>o.component=F),options:a.optionsConds,"label-field":"name","value-field":"component",style:{width:"480px"}},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:f,"edit-model":c},null,8,["edit-model"])),d(T,{label:C(u)("page.webSet.cacheConfig.cacheTTL"),class:"mt-3"},{default:p(()=>[d(N,null,{default:p(()=>[d(M,{value:S.life.count,"onUpdate:value":k[1]||(k[1]=F=>S.life.count=F),"show-button":!1,style:{width:"80px"}},null,8,["value"]),d(x,{value:S.life.unit,"onUpdate:value":k[2]||(k[2]=F=>S.life.unit=F),style:{width:"80px"},options:$.value},null,8,["value","options"])]),_:1})]),_:1},8,["label"]),d(T,{label:C(u)("page.webSet.cacheConfig.ignoreURIParams")},{default:p(()=>[d(I,{checked:y.value,"onUpdate:checked":[k[3]||(k[3]=F=>y.value=F),w],label:C(u)("page.webSet.cacheConfig.ignoreURIParamsTip")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1}),d(H,{class:"mt-2",justify:"center"},{default:p(()=>[d(z,{type:"info",class:"px-6",onClick:_},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1}),d(z,{class:"button-default px-6",onClick:k[4]||(k[4]=()=>t("closeModal"))},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})],64)}}}),ZM=ce(BM,[["__scopeId","data-v-a8f80124"]]),zM={class:"text-xs"},HM=ae({name:"NoCache",__name:"no-cache",props:Be({optionsConds:{}},{loading:{default:!1},loadingModifiers:{}}),emits:Be(["closeModal"],["update:loading"]),setup(i,{emit:e}){var w;const t=e,n=qe("config"),s=qe("updataCache"),o=fe({component:"http-cond-url-extension"}),a=i,l=Ze(i,"loading"),c=fe({type:"add",index:0,data:{type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1}}),f=B(),h=Object.assign({"../../../../../../components/conds/http-cond-mime-type.vue":$p,"../../../../../../components/conds/http-cond-params.vue":Tp,"../../../../../../components/conds/http-cond-url-all.vue":Rp,"../../../../../../components/conds/http-cond-url-eq-index.vue":Ip,"../../../../../../components/conds/http-cond-url-eq.vue":Qp,"../../../../../../components/conds/http-cond-url-extension.vue":Ap,"../../../../../../components/conds/http-cond-url-not-eq.vue":Np,"../../../../../../components/conds/http-cond-url-not-extension.vue":Mp,"../../../../../../components/conds/http-cond-url-not-prefix.vue":Lp,"../../../../../../components/conds/http-cond-url-not-regexp.vue":Up,"../../../../../../components/conds/http-cond-url-prefix.vue":Dp,"../../../../../../components/conds/http-cond-url-regexp.vue":qp,"../../../../../../components/conds/http-cond-url-wildcard-match.vue":Ep,"../../../../../../components/conds/http-cond-user-agent-not-regexp.vue":Bp,"../../../../../../components/conds/http-cond-user-agent-regexp.vue":Zp}),g={};for(const _ in h){const $=((w=_.split("/").pop())==null?void 0:w.replace(".vue",""))||"";g[$]=h[_].default}const v=J(()=>g[o.component]),O=J(()=>{const _=a.optionsConds.find($=>$.component===o.component);return(_==null?void 0:_.description)||""}),y={isOn:!0,cachePolicyId:0,key:"${scheme}://${host}${requestPath}${isArgs}${args}",life:{count:1,unit:"day"},status:[200],maxSize:{count:128,unit:"mb"},minSize:{count:0,unit:"kb"},skipCacheControlValues:["private","no-cache","no-store"],skipSetCookie:!0,enableRequestCachePragma:!1,conds:null,simpleCond:null,allowChunkedEncoding:!0,allowPartialContent:!0,forcePartialContent:!1,enableIfNoneMatch:!1,enableIfModifiedSince:!1,enableReadingOriginAsync:!1,isReverse:!0,methods:[],expiresTime:{isPrior:!1,isOn:!1,overwrite:!0,autoCalculate:!0,duration:{count:-1,unit:"hour"}}},S=async()=>{l.value=!0;const _="/servers/server/settings/cache/createPopup",$={condJSON:JSON.stringify(f.value.model),allowPartialContent:"1",statusList:"200",skipResponseCacheControlValues:["private","no-store","no-cache"],cacheRefJSON:JSON.stringify(y)},{data:A,error:R}=await Ee($,_);R||(n==null||n.cacheConfig.cacheRefs.push(A.cacheRef),l.value=!1,t("closeModal"),s&&s())};return(_,$)=>{const A=ft,R=ve,k=Re,x=Te,T=re;return L(),te(Ce,null,[d(k,{class:"max-h-[260px] overflow-y-auto"},{default:p(()=>[d(R,{label:_.$t("page.webSet.securityConfig.fiveShield.selectConditionType")},{feedback:p(()=>[U("span",zM,Q(O.value),1)]),default:p(()=>[d(A,{value:o.component,"onUpdate:value":$[0]||($[0]=M=>o.component=M),options:a.optionsConds,"label-field":"name","value-field":"component",style:{width:"480px"}},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:f,"edit-model":c},null,8,["edit-model"]))]),_:1}),d(T,{class:"mt-2",justify:"center"},{default:p(()=>[d(x,{type:"info",class:"px-6",onClick:S},{default:p(()=>$[2]||($[2]=[X("保存")])),_:1}),d(x,{class:"button-default px-6",onClick:$[1]||($[1]=()=>t("closeModal"))},{default:p(()=>$[3]||($[3]=[X("取消")])),_:1})]),_:1})],64)}}}),XM=ce(HM,[["__scopeId","data-v-e963d7af"]]),jM=ae({name:"EditModal",__name:"edit-modal",props:Be({modalData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(i){const e={cache:ZM,"no-cache":XM},t=J(()=>e[n.modalData.cacheType]),n=i,s=B(!1),o=Ze(i,"visible"),a=J(()=>[{type:"url-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.description"),component:"http-cond-url-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-eq-index",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.description"),component:"http-cond-url-eq-index",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-all",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.description"),component:"http-cond-url-all",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.description"),component:"http-cond-url-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.description"),component:"http-cond-url-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.description"),component:"http-cond-url-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-wildcard-match",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.description"),component:"http-cond-url-wildcard-match",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"params",name:u("page.webSet.securityConfig.fiveShield.optionsConds.params.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.params.description"),component:"http-cond-params",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.params.paramsTitle"),isRequest:!0,caseInsensitive:!1}]),l=()=>{o.value=!1};return(c,f)=>{const h=_e,g=nt,v=ze,O=Pt;return L(),W(O,{show:o.value,"onUpdate:show":f[2]||(f[2]=y=>o.value=y)},{default:p(()=>[d(v,{style:{width:"460px"},title:C(u)("page.webSet.cacheConfig.createRule"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:f[0]||(f[0]=()=>o.value=!1)},[d(h,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(g,{show:s.value},{default:p(()=>[(L(),W(yn(t.value),{loading:s.value,"onUpdate:loading":f[1]||(f[1]=y=>s.value=y),"options-conds":a.value,onCloseModal:l},null,40,["loading","options-conds"]))]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),VM=ce(jM,[["__scopeId","data-v-93a81237"]]),FM={class:"w-full overflow-x-auto"},WM={class:"max-h-[400px] min-w-[600px] overflow-y-auto"},YM={class:"text-center"},GM={key:0,style:{height:"50px"}},JM=["colspan"],KM={class:"cursor-pointer"},eL={class:"text-center"},tL={class:"drag-handle cursor-move py-2",style:{width:"50px"}},nL={class:"border rounded-xl px-3 py-1 text-xs"},sL={class:"border rounded-xl px-3 py-1 text-xs"},iL={class:"border rounded-xl px-3 py-1 text-xs"},oL={key:0},aL={class:"text-red"},lL={key:1},rL={style:{"min-width":"150px"}},cL=["onClick"],dL=["onClick"],uL=ae({name:"CacheTable",__name:"cache-table",props:Be({columns:{},data:{}},{data:{default:[]},dataModifiers:{}}),emits:Be(["updateCache"],["update:data"]),setup(i,{emit:e}){const t=e,n=i,s=Ze(i,"data"),o=B(!1),a=g=>{g==="cache"?(l.cacheType="cache",o.value=!0):(l.cacheType="no-cache",o.value=!0)},l=fe({cacheType:"cache",mode:"add"}),c=(g,v)=>{s.value[v].isOn=g,t("updateCache")},f=g=>{s.value.splice(g,1),t("updateCache")},h=()=>{var g;(g=window.$message)==null||g.warning(u("page.webSet.cacheConfig.detectedOrderChangeSyncing")),t("updateCache")};return(g,v)=>{const O=Te,y=re,S=$O,w=_e,_=Kc;return L(),te(Ce,null,[d(y,{class:"mb-3"},{default:p(()=>[d(O,{type:"info",class:"text-xs",size:"small",onClick:v[0]||(v[0]=$=>a("cache"))},{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.addCache")),1)]),_:1}),d(O,{class:"text-xs",size:"small",onClick:v[1]||(v[1]=$=>a("no-cache"))},{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.addNoCache")),1)]),_:1})]),_:1}),U("div",FM,[U("div",WM,[d(_,{bordered:!0,size:"small",class:"text-xs sm:h-full lg:text-[14px] md:text-sm"},{default:p(()=>{var $;return[U("thead",null,[U("tr",YM,[U("th",null,Q(C(u)("page.webSet.cacheConfig.sort")),1),(L(!0),te(Ce,null,Ot(n.columns,A=>(L(),te("th",{key:A.key},Q(A.title),1))),128))])]),s.value.length===0?(L(),te("tbody",GM,[U("tr",null,[U("td",{colspan:((($=n.columns)==null?void 0:$.length)||0)+1,class:"py-10 text-center text-gray-400"},[U("span",KM,[d(S,{trigger:"hover"},{trigger:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.noCacheRuleYet")),1)]),default:p(()=>[X(" "+Q(C(u)("page.webSet.cacheConfig.clickToAddRule")),1)]),_:1})])],8,JM)])])):Xe("",!0),d(C(Sa),{modelValue:s.value,"onUpdate:modelValue":v[2]||(v[2]=A=>s.value=A),tag:"tbody","item-key":"name",handle:".drag-handle",onChange:h},{item:p(({element:A,index:R})=>[U("tr",eL,[U("td",tL,[d(y,{justify:"center"},{default:p(()=>[d(w,{"local-icon":"material-symbols--menu",class:"text-[18px]"})]),_:1})]),U("td",null,[d(y,{vertical:""},{default:p(()=>[d(y,{justify:"center",size:"small"},{default:p(()=>[U("div",nL,[U("span",null,Q(A.simpleCond.param+" "+A.simpleCond.operator+" "+A.simpleCond.value),1)]),U("div",sL,[U("span",null,Q(A.minSize.count)+" - "+Q(A.maxSize.count+A.maxSize.unit.toUpperCase()),1)]),U("div",iL,[U("span",null,Q(C(u)("page.webSet.cacheConfig.shardCache")),1)])]),_:2},1024)]),_:2},1024)]),A.isReverse?(L(),te("td",oL,[U("span",aL,Q(C(u)("page.webSet.cacheConfig.noCache")),1)])):(L(),te("td",lL,Q(A.life.count+A.life.unit.toUpperCase()),1)),U("td",rL,[d(y,{justify:"center",class:"text-xs"},{default:p(()=>[U("span",{class:Ln(["cursor-pointer",A.isOn?"":"text-red-500"]),onClick:k=>c(!A.isOn,R)},Q(A.isOn?C(u)("page.webSet.cacheConfig.pause"):C(u)("page.webSet.cacheConfig.resume")),11,cL),U("span",{class:"cursor-pointer",onClick:k=>f(R)},Q(C(u)("page.webSet.cacheConfig.delete")),9,dL)]),_:2},1024)])])]),_:1},8,["modelValue"])]}),_:1})])]),v[4]||(v[4]=U("div",{class:"mt-2"},[U("span",{class:"text-xs text-gray"}," 所有条件匹配顺序为从上到下，可以拖动左侧图标进行牌序。网站设置的优先级比全局缓存策略设置的优先级要高。 ")],-1)),d(VM,{visible:o.value,"onUpdate:visible":v[3]||(v[3]=$=>o.value=$),"modal-data":l},null,8,["visible","modal-data"])],64)}}}),fL=ce(uL,[["__scopeId","data-v-411cd6e2"]]),pL={key:1,class:"h-full overflow-y-auto"},hL={class:"flex items-center gap-2"},mL={key:0},gL={key:1},vL=ae({name:"CacheConfig",__name:"cache-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=B(!1),l=B(!1),c=B([]),f=fe({cacheConfig:{isPrior:!1,isOn:!1,addStatusHeader:!1,addAgeHeader:!1,enableCacheControlMaxAge:!1,disablePolicyRefs:!1,key:null,purgeIsOn:!1,purgeKey:"",stale:void 0,cacheRefs:[]},webId:0}),h=async()=>{const y="/servers/server/settings/cache",{data:S,error:w}=await ht(y,{serverId:e.value});if(!w&&S){const{cacheConfig:_,webId:$=0}=S;Object.assign(f,{cacheConfig:_,webId:$})}},g=async y=>{var A;a.value=!0;const S="/servers/server/settings/cache",w={webId:f.webId,cacheJSON:JSON.stringify(y.cacheConfig),refsJSON:JSON.stringify(y.cacheConfig.cacheRefs)},{data:_,error:$}=await Ee(w,S);$||(f.cacheConfig=y.cacheConfig,(A=window.$message)==null||A.success(u("common.msgSync")),y.cacheConfig.isOn?c.value.push("more"):c.value=[]),a.value=!1},v=()=>{g(f)},O=J(()=>[{title:u("page.webSet.cacheConfig.cond"),key:"cond"},{title:u("page.webSet.cacheConfig.time"),key:"time"},{title:u("page.webSet.cacheConfig.action"),key:"action"}]);return Nn("config",f),Nn("updataCache",v),vt(()=>{h().finally(()=>{o.value=!1})}),(y,S)=>{const w=en,_=ve,$=Te,A=re,R=Re,k=un,x=_e,T=Qi,M=et,N=ze,I=Xt,q=Ht,z=nt;return o.value?(L(),W(jt,{key:0})):(L(),te("div",pL,[d(A,{vertical:""},{default:p(()=>[d(z,{show:a.value},{default:p(()=>[d(N,{title:C(u)("page.webSet.cacheConfig.title")},{default:p(()=>[d(R,null,{default:p(()=>[d(_,{label:C(u)("page.webSet.cacheConfig.enable"),"label-placement":s.value},{default:p(()=>[d(w,{value:f.cacheConfig.isOn,"onUpdate:value":[S[0]||(S[0]=H=>f.cacheConfig.isOn=H),S[1]||(S[1]=H=>g(f))]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(_,{label:C(u)("page.webSet.cacheConfig.cacheMainDomain"),"label-placement":s.value},{default:p(()=>[d(A,{vertical:""},{default:p(()=>[U("div",hL,[f.cacheConfig.key===null?(L(),te("span",mL,Q(C(u)("page.webSet.cacheConfig.default")),1)):(L(),te("span",gL,Q(f.cacheConfig.key.scheme+"://"+f.cacheConfig.key.host),1)),d($,{size:"small",onClick:S[2]||(S[2]=()=>l.value=!0)},{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.edit")),1)]),_:1})])]),_:1})]),_:1},8,["label","label-placement"])]),_:1}),d(q,{"expanded-names":c.value,"onUpdate:expandedNames":S[10]||(S[10]=H=>c.value=H),"arrow-placement":"right"},{default:p(()=>[d(I,{name:"more"},{header:p(()=>[d(k,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(x,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(N,{size:"small",bordered:!1},{footer:p(()=>[d(A,null,{default:p(()=>[d($,{type:"info",onClick:S[8]||(S[8]=H=>g(f))},{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.save")),1)]),_:1})]),_:1})]),default:p(()=>[d(T,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(x,{"local-icon":"ant-design--setting-filled"}),d(k,null,{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.advancedSettings")),1)]),_:1})]),_:1}),d(R,null,{default:p(()=>[d(_,{label:C(u)("page.webSet.cacheConfig.useDefaultCacheRule"),"label-placement":s.value},{default:p(()=>[d(M,{checked:f.cacheConfig.disablePolicyRefs,"onUpdate:checked":S[3]||(S[3]=H=>f.cacheConfig.disablePolicyRefs=H),label:C(u)("page.webSet.cacheConfig.defaultCacheRuleTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(_,{label:C(u)("page.webSet.cacheConfig.addXCacheHeader"),"label-placement":s.value},{default:p(()=>[d(M,{checked:f.cacheConfig.addStatusHeader,"onUpdate:checked":S[4]||(S[4]=H=>f.cacheConfig.addStatusHeader=H),label:C(u)("page.webSet.cacheConfig.xCacheHeaderTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(_,{label:C(u)("page.webSet.cacheConfig.addAgeHeader"),"label-placement":s.value},{default:p(()=>[d(M,{checked:f.cacheConfig.addAgeHeader,"onUpdate:checked":S[5]||(S[5]=H=>f.cacheConfig.addAgeHeader=H),label:C(u)("page.webSet.cacheConfig.ageHeaderTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(_,{label:C(u)("page.webSet.cacheConfig.supportOriginMaxAge"),"label-placement":s.value},{default:p(()=>[d(M,{checked:f.cacheConfig.enableCacheControlMaxAge,"onUpdate:checked":S[6]||(S[6]=H=>f.cacheConfig.enableCacheControlMaxAge=H),label:C(u)("page.webSet.cacheConfig.originMaxAgeTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(_,{label:C(u)("page.webSet.cacheConfig.allowPurge"),"label-placement":s.value},{default:p(()=>[d(M,{checked:f.cacheConfig.purgeIsOn,"onUpdate:checked":S[7]||(S[7]=H=>f.cacheConfig.purgeIsOn=H),label:C(u)("page.webSet.cacheConfig.allowPurgeTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(N,{size:"small",bordered:!1},{default:p(()=>[d(T,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(x,{"local-icon":"fa-solid--list-ul"}),d(k,null,{default:p(()=>[X(Q(C(u)("page.webSet.cacheConfig.cacheRule")),1)]),_:1})]),_:1}),d(fL,{data:f.cacheConfig.cacheRefs,"onUpdate:data":S[9]||(S[9]=H=>f.cacheConfig.cacheRefs=H),columns:O.value,onUpdateCache:v},null,8,["data","columns"])]),_:1})]),_:1})]),_:1},8,["expanded-names"])]),_:1},8,["title"])]),_:1},8,["show"])]),_:1}),d(ZN,{visible:l.value,"onUpdate:visible":S[11]||(S[11]=H=>l.value=H),config:f,onUpdateConfig:g},null,8,["visible","config"])]))}}}),bL=ce(vL,[["__scopeId","data-v-2cdf9c6f"]]);var tl={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var OL=tl.exports,yv;function CL(){return yv||(yv=1,function(i,e){(function(){var t,n="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,v=2,O=4,y=1,S=2,w=1,_=2,$=4,A=8,R=16,k=32,x=64,T=128,M=256,N=512,I=30,q="...",z=800,H=16,F=1,V=2,j=3,se=1/0,G=9007199254740991,K=17976931348623157e292,de=NaN,Oe=4294967295,we=Oe-1,pe=Oe>>>1,Se=[["ary",T],["bind",w],["bindKey",_],["curry",A],["curryRight",R],["flip",N],["partial",k],["partialRight",x],["rearg",M]],xe="[object Arguments]",Me="[object Array]",Pe="[object AsyncFunction]",st="[object Boolean]",Ye="[object Date]",it="[object DOMException]",Dt="[object Error]",sn="[object Function]",Un="[object GeneratorFunction]",lt="[object Map]",He="[object Number]",Mi="[object Null]",Fe="[object Object]",xn="[object Promise]",Yt="[object Proxy]",gn="[object RegExp]",Pn="[object Set]",Hn="[object String]",be="[object Symbol]",ke="[object Undefined]",Ae="[object WeakMap]",ct="[object WeakSet]",St="[object ArrayBuffer]",It="[object DataView]",$n="[object Float32Array]",on="[object Float64Array]",Gt="[object Int8Array]",Xn="[object Int16Array]",Gs="[object Int32Array]",co="[object Uint8Array]",Ta="[object Uint8ClampedArray]",Ra="[object Uint16Array]",Ia="[object Uint32Array]",dd=/\b__p \+= '';/g,ud=/\b(__p \+=) '' \+/g,fd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hl=/&(?:amp|lt|gt|quot|#39);/g,Xl=/[&<>"']/g,pd=RegExp(Hl.source),hd=RegExp(Xl.source),md=/<%-([\s\S]+?)%>/g,gd=/<%([\s\S]+?)%>/g,jl=/<%=([\s\S]+?)%>/g,e0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t0=/^\w*$/,n0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vd=/[\\^$.*+?()[\]{}|]/g,s0=RegExp(vd.source),bd=/^\s+/,i0=/\s/,o0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,a0=/\{\n\/\* \[wrapped with (.+)\] \*/,l0=/,? & /,r0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,c0=/[()=,{}\[\]\/\s]/,d0=/\\(\\)?/g,u0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ph=/\w*$/,f0=/^[-+]0x[0-9a-f]+$/i,p0=/^0b[01]+$/i,h0=/^\[object .+?Constructor\]$/,m0=/^0o[0-7]+$/i,g0=/^(?:0|[1-9]\d*)$/,v0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vl=/($^)/,b0=/['\n\r\u2028\u2029\\]/g,Fl="\\ud800-\\udfff",O0="\\u0300-\\u036f",C0="\\ufe20-\\ufe2f",y0="\\u20d0-\\u20ff",$h=O0+C0+y0,Th="\\u2700-\\u27bf",Rh="a-z\\xdf-\\xf6\\xf8-\\xff",S0="\\xac\\xb1\\xd7\\xf7",_0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",w0="\\u2000-\\u206f",k0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ih="A-Z\\xc0-\\xd6\\xd8-\\xde",Qh="\\ufe0e\\ufe0f",Ah=S0+_0+w0+k0,Od="['’]",x0="["+Fl+"]",Nh="["+Ah+"]",Wl="["+$h+"]",Mh="\\d+",P0="["+Th+"]",Lh="["+Rh+"]",Uh="[^"+Fl+Ah+Mh+Th+Rh+Ih+"]",Cd="\\ud83c[\\udffb-\\udfff]",$0="(?:"+Wl+"|"+Cd+")",Dh="[^"+Fl+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",Sd="[\\ud800-\\udbff][\\udc00-\\udfff]",Uo="["+Ih+"]",qh="\\u200d",Eh="(?:"+Lh+"|"+Uh+")",T0="(?:"+Uo+"|"+Uh+")",Bh="(?:"+Od+"(?:d|ll|m|re|s|t|ve))?",Zh="(?:"+Od+"(?:D|LL|M|RE|S|T|VE))?",zh=$0+"?",Hh="["+Qh+"]?",R0="(?:"+qh+"(?:"+[Dh,yd,Sd].join("|")+")"+Hh+zh+")*",I0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xh=Hh+zh+R0,A0="(?:"+[P0,yd,Sd].join("|")+")"+Xh,N0="(?:"+[Dh+Wl+"?",Wl,yd,Sd,x0].join("|")+")",M0=RegExp(Od,"g"),L0=RegExp(Wl,"g"),_d=RegExp(Cd+"(?="+Cd+")|"+N0+Xh,"g"),U0=RegExp([Uo+"?"+Lh+"+"+Bh+"(?="+[Nh,Uo,"$"].join("|")+")",T0+"+"+Zh+"(?="+[Nh,Uo+Eh,"$"].join("|")+")",Uo+"?"+Eh+"+"+Bh,Uo+"+"+Zh,Q0,I0,Mh,A0].join("|"),"g"),D0=RegExp("["+qh+Fl+$h+Qh+"]"),q0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,E0=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],B0=-1,qt={};qt[$n]=qt[on]=qt[Gt]=qt[Xn]=qt[Gs]=qt[co]=qt[Ta]=qt[Ra]=qt[Ia]=!0,qt[xe]=qt[Me]=qt[St]=qt[st]=qt[It]=qt[Ye]=qt[Dt]=qt[sn]=qt[lt]=qt[He]=qt[Fe]=qt[gn]=qt[Pn]=qt[Hn]=qt[Ae]=!1;var Lt={};Lt[xe]=Lt[Me]=Lt[St]=Lt[It]=Lt[st]=Lt[Ye]=Lt[$n]=Lt[on]=Lt[Gt]=Lt[Xn]=Lt[Gs]=Lt[lt]=Lt[He]=Lt[Fe]=Lt[gn]=Lt[Pn]=Lt[Hn]=Lt[be]=Lt[co]=Lt[Ta]=Lt[Ra]=Lt[Ia]=!0,Lt[Dt]=Lt[sn]=Lt[Ae]=!1;var Z0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},z0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},H0={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},X0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},j0=parseFloat,V0=parseInt,jh=typeof Dr=="object"&&Dr&&Dr.Object===Object&&Dr,F0=typeof self=="object"&&self&&self.Object===Object&&self,Tn=jh||F0||Function("return this")(),wd=e&&!e.nodeType&&e,uo=wd&&!0&&i&&!i.nodeType&&i,Vh=uo&&uo.exports===wd,kd=Vh&&jh.process,ks=function(){try{var ie=uo&&uo.require&&uo.require("util").types;return ie||kd&&kd.binding&&kd.binding("util")}catch{}}(),Fh=ks&&ks.isArrayBuffer,Wh=ks&&ks.isDate,Yh=ks&&ks.isMap,Gh=ks&&ks.isRegExp,Jh=ks&&ks.isSet,Kh=ks&&ks.isTypedArray;function us(ie,ue,le){switch(le.length){case 0:return ie.call(ue);case 1:return ie.call(ue,le[0]);case 2:return ie.call(ue,le[0],le[1]);case 3:return ie.call(ue,le[0],le[1],le[2])}return ie.apply(ue,le)}function W0(ie,ue,le,De){for(var at=-1,$t=ie==null?0:ie.length;++at<$t;){var vn=ie[at];ue(De,vn,le(vn),ie)}return De}function xs(ie,ue){for(var le=-1,De=ie==null?0:ie.length;++le<De&&ue(ie[le],le,ie)!==!1;);return ie}function Y0(ie,ue){for(var le=ie==null?0:ie.length;le--&&ue(ie[le],le,ie)!==!1;);return ie}function em(ie,ue){for(var le=-1,De=ie==null?0:ie.length;++le<De;)if(!ue(ie[le],le,ie))return!1;return!0}function Li(ie,ue){for(var le=-1,De=ie==null?0:ie.length,at=0,$t=[];++le<De;){var vn=ie[le];ue(vn,le,ie)&&($t[at++]=vn)}return $t}function Yl(ie,ue){var le=ie==null?0:ie.length;return!!le&&Do(ie,ue,0)>-1}function xd(ie,ue,le){for(var De=-1,at=ie==null?0:ie.length;++De<at;)if(le(ue,ie[De]))return!0;return!1}function Vt(ie,ue){for(var le=-1,De=ie==null?0:ie.length,at=Array(De);++le<De;)at[le]=ue(ie[le],le,ie);return at}function Ui(ie,ue){for(var le=-1,De=ue.length,at=ie.length;++le<De;)ie[at+le]=ue[le];return ie}function Pd(ie,ue,le,De){var at=-1,$t=ie==null?0:ie.length;for(De&&$t&&(le=ie[++at]);++at<$t;)le=ue(le,ie[at],at,ie);return le}function G0(ie,ue,le,De){var at=ie==null?0:ie.length;for(De&&at&&(le=ie[--at]);at--;)le=ue(le,ie[at],at,ie);return le}function $d(ie,ue){for(var le=-1,De=ie==null?0:ie.length;++le<De;)if(ue(ie[le],le,ie))return!0;return!1}var J0=Td("length");function K0(ie){return ie.split("")}function eS(ie){return ie.match(r0)||[]}function tm(ie,ue,le){var De;return le(ie,function(at,$t,vn){if(ue(at,$t,vn))return De=$t,!1}),De}function Gl(ie,ue,le,De){for(var at=ie.length,$t=le+(De?1:-1);De?$t--:++$t<at;)if(ue(ie[$t],$t,ie))return $t;return-1}function Do(ie,ue,le){return ue===ue?fS(ie,ue,le):Gl(ie,nm,le)}function tS(ie,ue,le,De){for(var at=le-1,$t=ie.length;++at<$t;)if(De(ie[at],ue))return at;return-1}function nm(ie){return ie!==ie}function sm(ie,ue){var le=ie==null?0:ie.length;return le?Id(ie,ue)/le:de}function Td(ie){return function(ue){return ue==null?t:ue[ie]}}function Rd(ie){return function(ue){return ie==null?t:ie[ue]}}function im(ie,ue,le,De,at){return at(ie,function($t,vn,Qt){le=De?(De=!1,$t):ue(le,$t,vn,Qt)}),le}function nS(ie,ue){var le=ie.length;for(ie.sort(ue);le--;)ie[le]=ie[le].value;return ie}function Id(ie,ue){for(var le,De=-1,at=ie.length;++De<at;){var $t=ue(ie[De]);$t!==t&&(le=le===t?$t:le+$t)}return le}function Qd(ie,ue){for(var le=-1,De=Array(ie);++le<ie;)De[le]=ue(le);return De}function sS(ie,ue){return Vt(ue,function(le){return[le,ie[le]]})}function om(ie){return ie&&ie.slice(0,cm(ie)+1).replace(bd,"")}function fs(ie){return function(ue){return ie(ue)}}function Ad(ie,ue){return Vt(ue,function(le){return ie[le]})}function Qa(ie,ue){return ie.has(ue)}function am(ie,ue){for(var le=-1,De=ie.length;++le<De&&Do(ue,ie[le],0)>-1;);return le}function lm(ie,ue){for(var le=ie.length;le--&&Do(ue,ie[le],0)>-1;);return le}function iS(ie,ue){for(var le=ie.length,De=0;le--;)ie[le]===ue&&++De;return De}var oS=Rd(Z0),aS=Rd(z0);function lS(ie){return"\\"+X0[ie]}function rS(ie,ue){return ie==null?t:ie[ue]}function qo(ie){return D0.test(ie)}function cS(ie){return q0.test(ie)}function dS(ie){for(var ue,le=[];!(ue=ie.next()).done;)le.push(ue.value);return le}function Nd(ie){var ue=-1,le=Array(ie.size);return ie.forEach(function(De,at){le[++ue]=[at,De]}),le}function rm(ie,ue){return function(le){return ie(ue(le))}}function Di(ie,ue){for(var le=-1,De=ie.length,at=0,$t=[];++le<De;){var vn=ie[le];(vn===ue||vn===h)&&(ie[le]=h,$t[at++]=le)}return $t}function Jl(ie){var ue=-1,le=Array(ie.size);return ie.forEach(function(De){le[++ue]=De}),le}function uS(ie){var ue=-1,le=Array(ie.size);return ie.forEach(function(De){le[++ue]=[De,De]}),le}function fS(ie,ue,le){for(var De=le-1,at=ie.length;++De<at;)if(ie[De]===ue)return De;return-1}function pS(ie,ue,le){for(var De=le+1;De--;)if(ie[De]===ue)return De;return De}function Eo(ie){return qo(ie)?mS(ie):J0(ie)}function Bs(ie){return qo(ie)?gS(ie):K0(ie)}function cm(ie){for(var ue=ie.length;ue--&&i0.test(ie.charAt(ue)););return ue}var hS=Rd(H0);function mS(ie){for(var ue=_d.lastIndex=0;_d.test(ie);)++ue;return ue}function gS(ie){return ie.match(_d)||[]}function vS(ie){return ie.match(U0)||[]}var bS=function ie(ue){ue=ue==null?Tn:Bo.defaults(Tn.Object(),ue,Bo.pick(Tn,E0));var le=ue.Array,De=ue.Date,at=ue.Error,$t=ue.Function,vn=ue.Math,Qt=ue.Object,Md=ue.RegExp,OS=ue.String,Ps=ue.TypeError,Kl=le.prototype,CS=$t.prototype,Zo=Qt.prototype,er=ue["__core-js_shared__"],tr=CS.toString,Rt=Zo.hasOwnProperty,yS=0,dm=function(){var r=/[^.]+$/.exec(er&&er.keys&&er.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),nr=Zo.toString,SS=tr.call(Qt),_S=Tn._,wS=Md("^"+tr.call(Rt).replace(vd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sr=Vh?ue.Buffer:t,qi=ue.Symbol,ir=ue.Uint8Array,um=sr?sr.allocUnsafe:t,or=rm(Qt.getPrototypeOf,Qt),fm=Qt.create,pm=Zo.propertyIsEnumerable,ar=Kl.splice,hm=qi?qi.isConcatSpreadable:t,Aa=qi?qi.iterator:t,fo=qi?qi.toStringTag:t,lr=function(){try{var r=vo(Qt,"defineProperty");return r({},"",{}),r}catch{}}(),kS=ue.clearTimeout!==Tn.clearTimeout&&ue.clearTimeout,xS=De&&De.now!==Tn.Date.now&&De.now,PS=ue.setTimeout!==Tn.setTimeout&&ue.setTimeout,rr=vn.ceil,cr=vn.floor,Ld=Qt.getOwnPropertySymbols,$S=sr?sr.isBuffer:t,mm=ue.isFinite,TS=Kl.join,RS=rm(Qt.keys,Qt),bn=vn.max,Dn=vn.min,IS=De.now,QS=ue.parseInt,gm=vn.random,AS=Kl.reverse,Ud=vo(ue,"DataView"),Na=vo(ue,"Map"),Dd=vo(ue,"Promise"),zo=vo(ue,"Set"),Ma=vo(ue,"WeakMap"),La=vo(Qt,"create"),dr=Ma&&new Ma,Ho={},NS=bo(Ud),MS=bo(Na),LS=bo(Dd),US=bo(zo),DS=bo(Ma),ur=qi?qi.prototype:t,Ua=ur?ur.valueOf:t,vm=ur?ur.toString:t;function E(r){if(an(r)&&!rt(r)&&!(r instanceof Ct)){if(r instanceof $s)return r;if(Rt.call(r,"__wrapped__"))return bg(r)}return new $s(r)}var Xo=function(){function r(){}return function(m){if(!Jt(m))return{};if(fm)return fm(m);r.prototype=m;var b=new r;return r.prototype=t,b}}();function fr(){}function $s(r,m){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!m,this.__index__=0,this.__values__=t}E.templateSettings={escape:md,evaluate:gd,interpolate:jl,variable:"",imports:{_:E}},E.prototype=fr.prototype,E.prototype.constructor=E,$s.prototype=Xo(fr.prototype),$s.prototype.constructor=$s;function Ct(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Oe,this.__views__=[]}function qS(){var r=new Ct(this.__wrapped__);return r.__actions__=Jn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Jn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Jn(this.__views__),r}function ES(){if(this.__filtered__){var r=new Ct(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function BS(){var r=this.__wrapped__.value(),m=this.__dir__,b=rt(r),P=m<0,D=b?r.length:0,Z=K_(0,D,this.__views__),Y=Z.start,ee=Z.end,oe=ee-Y,he=P?ee:Y-1,ge=this.__iteratees__,ye=ge.length,Ie=0,Ve=Dn(oe,this.__takeCount__);if(!b||!P&&D==oe&&Ve==oe)return Bm(r,this.__actions__);var Je=[];e:for(;oe--&&Ie<Ve;){he+=m;for(var pt=-1,Ke=r[he];++pt<ye;){var bt=ge[pt],_t=bt.iteratee,ms=bt.type,Fn=_t(Ke);if(ms==V)Ke=Fn;else if(!Fn){if(ms==F)continue e;break e}}Je[Ie++]=Ke}return Je}Ct.prototype=Xo(fr.prototype),Ct.prototype.constructor=Ct;function po(r){var m=-1,b=r==null?0:r.length;for(this.clear();++m<b;){var P=r[m];this.set(P[0],P[1])}}function ZS(){this.__data__=La?La(null):{},this.size=0}function zS(r){var m=this.has(r)&&delete this.__data__[r];return this.size-=m?1:0,m}function HS(r){var m=this.__data__;if(La){var b=m[r];return b===c?t:b}return Rt.call(m,r)?m[r]:t}function XS(r){var m=this.__data__;return La?m[r]!==t:Rt.call(m,r)}function jS(r,m){var b=this.__data__;return this.size+=this.has(r)?0:1,b[r]=La&&m===t?c:m,this}po.prototype.clear=ZS,po.prototype.delete=zS,po.prototype.get=HS,po.prototype.has=XS,po.prototype.set=jS;function vi(r){var m=-1,b=r==null?0:r.length;for(this.clear();++m<b;){var P=r[m];this.set(P[0],P[1])}}function VS(){this.__data__=[],this.size=0}function FS(r){var m=this.__data__,b=pr(m,r);if(b<0)return!1;var P=m.length-1;return b==P?m.pop():ar.call(m,b,1),--this.size,!0}function WS(r){var m=this.__data__,b=pr(m,r);return b<0?t:m[b][1]}function YS(r){return pr(this.__data__,r)>-1}function GS(r,m){var b=this.__data__,P=pr(b,r);return P<0?(++this.size,b.push([r,m])):b[P][1]=m,this}vi.prototype.clear=VS,vi.prototype.delete=FS,vi.prototype.get=WS,vi.prototype.has=YS,vi.prototype.set=GS;function bi(r){var m=-1,b=r==null?0:r.length;for(this.clear();++m<b;){var P=r[m];this.set(P[0],P[1])}}function JS(){this.size=0,this.__data__={hash:new po,map:new(Na||vi),string:new po}}function KS(r){var m=kr(this,r).delete(r);return this.size-=m?1:0,m}function e_(r){return kr(this,r).get(r)}function t_(r){return kr(this,r).has(r)}function n_(r,m){var b=kr(this,r),P=b.size;return b.set(r,m),this.size+=b.size==P?0:1,this}bi.prototype.clear=JS,bi.prototype.delete=KS,bi.prototype.get=e_,bi.prototype.has=t_,bi.prototype.set=n_;function ho(r){var m=-1,b=r==null?0:r.length;for(this.__data__=new bi;++m<b;)this.add(r[m])}function s_(r){return this.__data__.set(r,c),this}function i_(r){return this.__data__.has(r)}ho.prototype.add=ho.prototype.push=s_,ho.prototype.has=i_;function Zs(r){var m=this.__data__=new vi(r);this.size=m.size}function o_(){this.__data__=new vi,this.size=0}function a_(r){var m=this.__data__,b=m.delete(r);return this.size=m.size,b}function l_(r){return this.__data__.get(r)}function r_(r){return this.__data__.has(r)}function c_(r,m){var b=this.__data__;if(b instanceof vi){var P=b.__data__;if(!Na||P.length<s-1)return P.push([r,m]),this.size=++b.size,this;b=this.__data__=new bi(P)}return b.set(r,m),this.size=b.size,this}Zs.prototype.clear=o_,Zs.prototype.delete=a_,Zs.prototype.get=l_,Zs.prototype.has=r_,Zs.prototype.set=c_;function bm(r,m){var b=rt(r),P=!b&&Oo(r),D=!b&&!P&&Hi(r),Z=!b&&!P&&!D&&Wo(r),Y=b||P||D||Z,ee=Y?Qd(r.length,OS):[],oe=ee.length;for(var he in r)(m||Rt.call(r,he))&&!(Y&&(he=="length"||D&&(he=="offset"||he=="parent")||Z&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||Si(he,oe)))&&ee.push(he);return ee}function Om(r){var m=r.length;return m?r[Wd(0,m-1)]:t}function d_(r,m){return xr(Jn(r),mo(m,0,r.length))}function u_(r){return xr(Jn(r))}function qd(r,m,b){(b!==t&&!zs(r[m],b)||b===t&&!(m in r))&&Oi(r,m,b)}function Da(r,m,b){var P=r[m];(!(Rt.call(r,m)&&zs(P,b))||b===t&&!(m in r))&&Oi(r,m,b)}function pr(r,m){for(var b=r.length;b--;)if(zs(r[b][0],m))return b;return-1}function f_(r,m,b,P){return Ei(r,function(D,Z,Y){m(P,D,b(D),Y)}),P}function Cm(r,m){return r&&Ks(m,_n(m),r)}function p_(r,m){return r&&Ks(m,es(m),r)}function Oi(r,m,b){m=="__proto__"&&lr?lr(r,m,{configurable:!0,enumerable:!0,value:b,writable:!0}):r[m]=b}function Ed(r,m){for(var b=-1,P=m.length,D=le(P),Z=r==null;++b<P;)D[b]=Z?t:Cu(r,m[b]);return D}function mo(r,m,b){return r===r&&(b!==t&&(r=r<=b?r:b),m!==t&&(r=r>=m?r:m)),r}function Ts(r,m,b,P,D,Z){var Y,ee=m&g,oe=m&v,he=m&O;if(b&&(Y=D?b(r,P,D,Z):b(r)),Y!==t)return Y;if(!Jt(r))return r;var ge=rt(r);if(ge){if(Y=tw(r),!ee)return Jn(r,Y)}else{var ye=qn(r),Ie=ye==sn||ye==Un;if(Hi(r))return Hm(r,ee);if(ye==Fe||ye==xe||Ie&&!D){if(Y=oe||Ie?{}:cg(r),!ee)return oe?H_(r,p_(Y,r)):z_(r,Cm(Y,r))}else{if(!Lt[ye])return D?r:{};Y=nw(r,ye,ee)}}Z||(Z=new Zs);var Ve=Z.get(r);if(Ve)return Ve;Z.set(r,Y),Dg(r)?r.forEach(function(Ke){Y.add(Ts(Ke,m,b,Ke,r,Z))}):Lg(r)&&r.forEach(function(Ke,bt){Y.set(bt,Ts(Ke,m,b,bt,r,Z))});var Je=he?oe?au:ou:oe?es:_n,pt=ge?t:Je(r);return xs(pt||r,function(Ke,bt){pt&&(bt=Ke,Ke=r[bt]),Da(Y,bt,Ts(Ke,m,b,bt,r,Z))}),Y}function h_(r){var m=_n(r);return function(b){return ym(b,r,m)}}function ym(r,m,b){var P=b.length;if(r==null)return!P;for(r=Qt(r);P--;){var D=b[P],Z=m[D],Y=r[D];if(Y===t&&!(D in r)||!Z(Y))return!1}return!0}function Sm(r,m,b){if(typeof r!="function")throw new Ps(a);return Xa(function(){r.apply(t,b)},m)}function qa(r,m,b,P){var D=-1,Z=Yl,Y=!0,ee=r.length,oe=[],he=m.length;if(!ee)return oe;b&&(m=Vt(m,fs(b))),P?(Z=xd,Y=!1):m.length>=s&&(Z=Qa,Y=!1,m=new ho(m));e:for(;++D<ee;){var ge=r[D],ye=b==null?ge:b(ge);if(ge=P||ge!==0?ge:0,Y&&ye===ye){for(var Ie=he;Ie--;)if(m[Ie]===ye)continue e;oe.push(ge)}else Z(m,ye,P)||oe.push(ge)}return oe}var Ei=Wm(Js),_m=Wm(Zd,!0);function m_(r,m){var b=!0;return Ei(r,function(P,D,Z){return b=!!m(P,D,Z),b}),b}function hr(r,m,b){for(var P=-1,D=r.length;++P<D;){var Z=r[P],Y=m(Z);if(Y!=null&&(ee===t?Y===Y&&!hs(Y):b(Y,ee)))var ee=Y,oe=Z}return oe}function g_(r,m,b,P){var D=r.length;for(b=dt(b),b<0&&(b=-b>D?0:D+b),P=P===t||P>D?D:dt(P),P<0&&(P+=D),P=b>P?0:Eg(P);b<P;)r[b++]=m;return r}function wm(r,m){var b=[];return Ei(r,function(P,D,Z){m(P,D,Z)&&b.push(P)}),b}function Rn(r,m,b,P,D){var Z=-1,Y=r.length;for(b||(b=iw),D||(D=[]);++Z<Y;){var ee=r[Z];m>0&&b(ee)?m>1?Rn(ee,m-1,b,P,D):Ui(D,ee):P||(D[D.length]=ee)}return D}var Bd=Ym(),km=Ym(!0);function Js(r,m){return r&&Bd(r,m,_n)}function Zd(r,m){return r&&km(r,m,_n)}function mr(r,m){return Li(m,function(b){return _i(r[b])})}function go(r,m){m=Zi(m,r);for(var b=0,P=m.length;r!=null&&b<P;)r=r[ei(m[b++])];return b&&b==P?r:t}function xm(r,m,b){var P=m(r);return rt(r)?P:Ui(P,b(r))}function jn(r){return r==null?r===t?ke:Mi:fo&&fo in Qt(r)?J_(r):uw(r)}function zd(r,m){return r>m}function v_(r,m){return r!=null&&Rt.call(r,m)}function b_(r,m){return r!=null&&m in Qt(r)}function O_(r,m,b){return r>=Dn(m,b)&&r<bn(m,b)}function Hd(r,m,b){for(var P=b?xd:Yl,D=r[0].length,Z=r.length,Y=Z,ee=le(Z),oe=1/0,he=[];Y--;){var ge=r[Y];Y&&m&&(ge=Vt(ge,fs(m))),oe=Dn(ge.length,oe),ee[Y]=!b&&(m||D>=120&&ge.length>=120)?new ho(Y&&ge):t}ge=r[0];var ye=-1,Ie=ee[0];e:for(;++ye<D&&he.length<oe;){var Ve=ge[ye],Je=m?m(Ve):Ve;if(Ve=b||Ve!==0?Ve:0,!(Ie?Qa(Ie,Je):P(he,Je,b))){for(Y=Z;--Y;){var pt=ee[Y];if(!(pt?Qa(pt,Je):P(r[Y],Je,b)))continue e}Ie&&Ie.push(Je),he.push(Ve)}}return he}function C_(r,m,b,P){return Js(r,function(D,Z,Y){m(P,b(D),Z,Y)}),P}function Ea(r,m,b){m=Zi(m,r),r=pg(r,m);var P=r==null?r:r[ei(Is(m))];return P==null?t:us(P,r,b)}function Pm(r){return an(r)&&jn(r)==xe}function y_(r){return an(r)&&jn(r)==St}function S_(r){return an(r)&&jn(r)==Ye}function Ba(r,m,b,P,D){return r===m?!0:r==null||m==null||!an(r)&&!an(m)?r!==r&&m!==m:__(r,m,b,P,Ba,D)}function __(r,m,b,P,D,Z){var Y=rt(r),ee=rt(m),oe=Y?Me:qn(r),he=ee?Me:qn(m);oe=oe==xe?Fe:oe,he=he==xe?Fe:he;var ge=oe==Fe,ye=he==Fe,Ie=oe==he;if(Ie&&Hi(r)){if(!Hi(m))return!1;Y=!0,ge=!1}if(Ie&&!ge)return Z||(Z=new Zs),Y||Wo(r)?ag(r,m,b,P,D,Z):Y_(r,m,oe,b,P,D,Z);if(!(b&y)){var Ve=ge&&Rt.call(r,"__wrapped__"),Je=ye&&Rt.call(m,"__wrapped__");if(Ve||Je){var pt=Ve?r.value():r,Ke=Je?m.value():m;return Z||(Z=new Zs),D(pt,Ke,b,P,Z)}}return Ie?(Z||(Z=new Zs),G_(r,m,b,P,D,Z)):!1}function w_(r){return an(r)&&qn(r)==lt}function Xd(r,m,b,P){var D=b.length,Z=D,Y=!P;if(r==null)return!Z;for(r=Qt(r);D--;){var ee=b[D];if(Y&&ee[2]?ee[1]!==r[ee[0]]:!(ee[0]in r))return!1}for(;++D<Z;){ee=b[D];var oe=ee[0],he=r[oe],ge=ee[1];if(Y&&ee[2]){if(he===t&&!(oe in r))return!1}else{var ye=new Zs;if(P)var Ie=P(he,ge,oe,r,m,ye);if(!(Ie===t?Ba(ge,he,y|S,P,ye):Ie))return!1}}return!0}function $m(r){if(!Jt(r)||aw(r))return!1;var m=_i(r)?wS:h0;return m.test(bo(r))}function k_(r){return an(r)&&jn(r)==gn}function x_(r){return an(r)&&qn(r)==Pn}function P_(r){return an(r)&&Qr(r.length)&&!!qt[jn(r)]}function Tm(r){return typeof r=="function"?r:r==null?ts:typeof r=="object"?rt(r)?Qm(r[0],r[1]):Im(r):Gg(r)}function jd(r){if(!Ha(r))return RS(r);var m=[];for(var b in Qt(r))Rt.call(r,b)&&b!="constructor"&&m.push(b);return m}function $_(r){if(!Jt(r))return dw(r);var m=Ha(r),b=[];for(var P in r)P=="constructor"&&(m||!Rt.call(r,P))||b.push(P);return b}function Vd(r,m){return r<m}function Rm(r,m){var b=-1,P=Kn(r)?le(r.length):[];return Ei(r,function(D,Z,Y){P[++b]=m(D,Z,Y)}),P}function Im(r){var m=ru(r);return m.length==1&&m[0][2]?ug(m[0][0],m[0][1]):function(b){return b===r||Xd(b,r,m)}}function Qm(r,m){return du(r)&&dg(m)?ug(ei(r),m):function(b){var P=Cu(b,r);return P===t&&P===m?yu(b,r):Ba(m,P,y|S)}}function gr(r,m,b,P,D){r!==m&&Bd(m,function(Z,Y){if(D||(D=new Zs),Jt(Z))T_(r,m,Y,b,gr,P,D);else{var ee=P?P(fu(r,Y),Z,Y+"",r,m,D):t;ee===t&&(ee=Z),qd(r,Y,ee)}},es)}function T_(r,m,b,P,D,Z,Y){var ee=fu(r,b),oe=fu(m,b),he=Y.get(oe);if(he){qd(r,b,he);return}var ge=Z?Z(ee,oe,b+"",r,m,Y):t,ye=ge===t;if(ye){var Ie=rt(oe),Ve=!Ie&&Hi(oe),Je=!Ie&&!Ve&&Wo(oe);ge=oe,Ie||Ve||Je?rt(ee)?ge=ee:ln(ee)?ge=Jn(ee):Ve?(ye=!1,ge=Hm(oe,!0)):Je?(ye=!1,ge=Xm(oe,!0)):ge=[]:ja(oe)||Oo(oe)?(ge=ee,Oo(ee)?ge=Bg(ee):(!Jt(ee)||_i(ee))&&(ge=cg(oe))):ye=!1}ye&&(Y.set(oe,ge),D(ge,oe,P,Z,Y),Y.delete(oe)),qd(r,b,ge)}function Am(r,m){var b=r.length;if(b)return m+=m<0?b:0,Si(m,b)?r[m]:t}function Nm(r,m,b){m.length?m=Vt(m,function(Z){return rt(Z)?function(Y){return go(Y,Z.length===1?Z[0]:Z)}:Z}):m=[ts];var P=-1;m=Vt(m,fs(Ge()));var D=Rm(r,function(Z,Y,ee){var oe=Vt(m,function(he){return he(Z)});return{criteria:oe,index:++P,value:Z}});return nS(D,function(Z,Y){return Z_(Z,Y,b)})}function R_(r,m){return Mm(r,m,function(b,P){return yu(r,P)})}function Mm(r,m,b){for(var P=-1,D=m.length,Z={};++P<D;){var Y=m[P],ee=go(r,Y);b(ee,Y)&&Za(Z,Zi(Y,r),ee)}return Z}function I_(r){return function(m){return go(m,r)}}function Fd(r,m,b,P){var D=P?tS:Do,Z=-1,Y=m.length,ee=r;for(r===m&&(m=Jn(m)),b&&(ee=Vt(r,fs(b)));++Z<Y;)for(var oe=0,he=m[Z],ge=b?b(he):he;(oe=D(ee,ge,oe,P))>-1;)ee!==r&&ar.call(ee,oe,1),ar.call(r,oe,1);return r}function Lm(r,m){for(var b=r?m.length:0,P=b-1;b--;){var D=m[b];if(b==P||D!==Z){var Z=D;Si(D)?ar.call(r,D,1):Jd(r,D)}}return r}function Wd(r,m){return r+cr(gm()*(m-r+1))}function Q_(r,m,b,P){for(var D=-1,Z=bn(rr((m-r)/(b||1)),0),Y=le(Z);Z--;)Y[P?Z:++D]=r,r+=b;return Y}function Yd(r,m){var b="";if(!r||m<1||m>G)return b;do m%2&&(b+=r),m=cr(m/2),m&&(r+=r);while(m);return b}function mt(r,m){return pu(fg(r,m,ts),r+"")}function A_(r){return Om(Yo(r))}function N_(r,m){var b=Yo(r);return xr(b,mo(m,0,b.length))}function Za(r,m,b,P){if(!Jt(r))return r;m=Zi(m,r);for(var D=-1,Z=m.length,Y=Z-1,ee=r;ee!=null&&++D<Z;){var oe=ei(m[D]),he=b;if(oe==="__proto__"||oe==="constructor"||oe==="prototype")return r;if(D!=Y){var ge=ee[oe];he=P?P(ge,oe,ee):t,he===t&&(he=Jt(ge)?ge:Si(m[D+1])?[]:{})}Da(ee,oe,he),ee=ee[oe]}return r}var Um=dr?function(r,m){return dr.set(r,m),r}:ts,M_=lr?function(r,m){return lr(r,"toString",{configurable:!0,enumerable:!1,value:_u(m),writable:!0})}:ts;function L_(r){return xr(Yo(r))}function Rs(r,m,b){var P=-1,D=r.length;m<0&&(m=-m>D?0:D+m),b=b>D?D:b,b<0&&(b+=D),D=m>b?0:b-m>>>0,m>>>=0;for(var Z=le(D);++P<D;)Z[P]=r[P+m];return Z}function U_(r,m){var b;return Ei(r,function(P,D,Z){return b=m(P,D,Z),!b}),!!b}function vr(r,m,b){var P=0,D=r==null?P:r.length;if(typeof m=="number"&&m===m&&D<=pe){for(;P<D;){var Z=P+D>>>1,Y=r[Z];Y!==null&&!hs(Y)&&(b?Y<=m:Y<m)?P=Z+1:D=Z}return D}return Gd(r,m,ts,b)}function Gd(r,m,b,P){var D=0,Z=r==null?0:r.length;if(Z===0)return 0;m=b(m);for(var Y=m!==m,ee=m===null,oe=hs(m),he=m===t;D<Z;){var ge=cr((D+Z)/2),ye=b(r[ge]),Ie=ye!==t,Ve=ye===null,Je=ye===ye,pt=hs(ye);if(Y)var Ke=P||Je;else he?Ke=Je&&(P||Ie):ee?Ke=Je&&Ie&&(P||!Ve):oe?Ke=Je&&Ie&&!Ve&&(P||!pt):Ve||pt?Ke=!1:Ke=P?ye<=m:ye<m;Ke?D=ge+1:Z=ge}return Dn(Z,we)}function Dm(r,m){for(var b=-1,P=r.length,D=0,Z=[];++b<P;){var Y=r[b],ee=m?m(Y):Y;if(!b||!zs(ee,oe)){var oe=ee;Z[D++]=Y===0?0:Y}}return Z}function qm(r){return typeof r=="number"?r:hs(r)?de:+r}function ps(r){if(typeof r=="string")return r;if(rt(r))return Vt(r,ps)+"";if(hs(r))return vm?vm.call(r):"";var m=r+"";return m=="0"&&1/r==-1/0?"-0":m}function Bi(r,m,b){var P=-1,D=Yl,Z=r.length,Y=!0,ee=[],oe=ee;if(b)Y=!1,D=xd;else if(Z>=s){var he=m?null:F_(r);if(he)return Jl(he);Y=!1,D=Qa,oe=new ho}else oe=m?[]:ee;e:for(;++P<Z;){var ge=r[P],ye=m?m(ge):ge;if(ge=b||ge!==0?ge:0,Y&&ye===ye){for(var Ie=oe.length;Ie--;)if(oe[Ie]===ye)continue e;m&&oe.push(ye),ee.push(ge)}else D(oe,ye,b)||(oe!==ee&&oe.push(ye),ee.push(ge))}return ee}function Jd(r,m){return m=Zi(m,r),r=pg(r,m),r==null||delete r[ei(Is(m))]}function Em(r,m,b,P){return Za(r,m,b(go(r,m)),P)}function br(r,m,b,P){for(var D=r.length,Z=P?D:-1;(P?Z--:++Z<D)&&m(r[Z],Z,r););return b?Rs(r,P?0:Z,P?Z+1:D):Rs(r,P?Z+1:0,P?D:Z)}function Bm(r,m){var b=r;return b instanceof Ct&&(b=b.value()),Pd(m,function(P,D){return D.func.apply(D.thisArg,Ui([P],D.args))},b)}function Kd(r,m,b){var P=r.length;if(P<2)return P?Bi(r[0]):[];for(var D=-1,Z=le(P);++D<P;)for(var Y=r[D],ee=-1;++ee<P;)ee!=D&&(Z[D]=qa(Z[D]||Y,r[ee],m,b));return Bi(Rn(Z,1),m,b)}function Zm(r,m,b){for(var P=-1,D=r.length,Z=m.length,Y={};++P<D;){var ee=P<Z?m[P]:t;b(Y,r[P],ee)}return Y}function eu(r){return ln(r)?r:[]}function tu(r){return typeof r=="function"?r:ts}function Zi(r,m){return rt(r)?r:du(r,m)?[r]:vg(Tt(r))}var D_=mt;function zi(r,m,b){var P=r.length;return b=b===t?P:b,!m&&b>=P?r:Rs(r,m,b)}var zm=kS||function(r){return Tn.clearTimeout(r)};function Hm(r,m){if(m)return r.slice();var b=r.length,P=um?um(b):new r.constructor(b);return r.copy(P),P}function nu(r){var m=new r.constructor(r.byteLength);return new ir(m).set(new ir(r)),m}function q_(r,m){var b=m?nu(r.buffer):r.buffer;return new r.constructor(b,r.byteOffset,r.byteLength)}function E_(r){var m=new r.constructor(r.source,Ph.exec(r));return m.lastIndex=r.lastIndex,m}function B_(r){return Ua?Qt(Ua.call(r)):{}}function Xm(r,m){var b=m?nu(r.buffer):r.buffer;return new r.constructor(b,r.byteOffset,r.length)}function jm(r,m){if(r!==m){var b=r!==t,P=r===null,D=r===r,Z=hs(r),Y=m!==t,ee=m===null,oe=m===m,he=hs(m);if(!ee&&!he&&!Z&&r>m||Z&&Y&&oe&&!ee&&!he||P&&Y&&oe||!b&&oe||!D)return 1;if(!P&&!Z&&!he&&r<m||he&&b&&D&&!P&&!Z||ee&&b&&D||!Y&&D||!oe)return-1}return 0}function Z_(r,m,b){for(var P=-1,D=r.criteria,Z=m.criteria,Y=D.length,ee=b.length;++P<Y;){var oe=jm(D[P],Z[P]);if(oe){if(P>=ee)return oe;var he=b[P];return oe*(he=="desc"?-1:1)}}return r.index-m.index}function Vm(r,m,b,P){for(var D=-1,Z=r.length,Y=b.length,ee=-1,oe=m.length,he=bn(Z-Y,0),ge=le(oe+he),ye=!P;++ee<oe;)ge[ee]=m[ee];for(;++D<Y;)(ye||D<Z)&&(ge[b[D]]=r[D]);for(;he--;)ge[ee++]=r[D++];return ge}function Fm(r,m,b,P){for(var D=-1,Z=r.length,Y=-1,ee=b.length,oe=-1,he=m.length,ge=bn(Z-ee,0),ye=le(ge+he),Ie=!P;++D<ge;)ye[D]=r[D];for(var Ve=D;++oe<he;)ye[Ve+oe]=m[oe];for(;++Y<ee;)(Ie||D<Z)&&(ye[Ve+b[Y]]=r[D++]);return ye}function Jn(r,m){var b=-1,P=r.length;for(m||(m=le(P));++b<P;)m[b]=r[b];return m}function Ks(r,m,b,P){var D=!b;b||(b={});for(var Z=-1,Y=m.length;++Z<Y;){var ee=m[Z],oe=P?P(b[ee],r[ee],ee,b,r):t;oe===t&&(oe=r[ee]),D?Oi(b,ee,oe):Da(b,ee,oe)}return b}function z_(r,m){return Ks(r,cu(r),m)}function H_(r,m){return Ks(r,lg(r),m)}function Or(r,m){return function(b,P){var D=rt(b)?W0:f_,Z=m?m():{};return D(b,r,Ge(P,2),Z)}}function jo(r){return mt(function(m,b){var P=-1,D=b.length,Z=D>1?b[D-1]:t,Y=D>2?b[2]:t;for(Z=r.length>3&&typeof Z=="function"?(D--,Z):t,Y&&Vn(b[0],b[1],Y)&&(Z=D<3?t:Z,D=1),m=Qt(m);++P<D;){var ee=b[P];ee&&r(m,ee,P,Z)}return m})}function Wm(r,m){return function(b,P){if(b==null)return b;if(!Kn(b))return r(b,P);for(var D=b.length,Z=m?D:-1,Y=Qt(b);(m?Z--:++Z<D)&&P(Y[Z],Z,Y)!==!1;);return b}}function Ym(r){return function(m,b,P){for(var D=-1,Z=Qt(m),Y=P(m),ee=Y.length;ee--;){var oe=Y[r?ee:++D];if(b(Z[oe],oe,Z)===!1)break}return m}}function X_(r,m,b){var P=m&w,D=za(r);function Z(){var Y=this&&this!==Tn&&this instanceof Z?D:r;return Y.apply(P?b:this,arguments)}return Z}function Gm(r){return function(m){m=Tt(m);var b=qo(m)?Bs(m):t,P=b?b[0]:m.charAt(0),D=b?zi(b,1).join(""):m.slice(1);return P[r]()+D}}function Vo(r){return function(m){return Pd(Wg(Fg(m).replace(M0,"")),r,"")}}function za(r){return function(){var m=arguments;switch(m.length){case 0:return new r;case 1:return new r(m[0]);case 2:return new r(m[0],m[1]);case 3:return new r(m[0],m[1],m[2]);case 4:return new r(m[0],m[1],m[2],m[3]);case 5:return new r(m[0],m[1],m[2],m[3],m[4]);case 6:return new r(m[0],m[1],m[2],m[3],m[4],m[5]);case 7:return new r(m[0],m[1],m[2],m[3],m[4],m[5],m[6])}var b=Xo(r.prototype),P=r.apply(b,m);return Jt(P)?P:b}}function j_(r,m,b){var P=za(r);function D(){for(var Z=arguments.length,Y=le(Z),ee=Z,oe=Fo(D);ee--;)Y[ee]=arguments[ee];var he=Z<3&&Y[0]!==oe&&Y[Z-1]!==oe?[]:Di(Y,oe);if(Z-=he.length,Z<b)return ng(r,m,Cr,D.placeholder,t,Y,he,t,t,b-Z);var ge=this&&this!==Tn&&this instanceof D?P:r;return us(ge,this,Y)}return D}function Jm(r){return function(m,b,P){var D=Qt(m);if(!Kn(m)){var Z=Ge(b,3);m=_n(m),b=function(ee){return Z(D[ee],ee,D)}}var Y=r(m,b,P);return Y>-1?D[Z?m[Y]:Y]:t}}function Km(r){return yi(function(m){var b=m.length,P=b,D=$s.prototype.thru;for(r&&m.reverse();P--;){var Z=m[P];if(typeof Z!="function")throw new Ps(a);if(D&&!Y&&wr(Z)=="wrapper")var Y=new $s([],!0)}for(P=Y?P:b;++P<b;){Z=m[P];var ee=wr(Z),oe=ee=="wrapper"?lu(Z):t;oe&&uu(oe[0])&&oe[1]==(T|A|k|M)&&!oe[4].length&&oe[9]==1?Y=Y[wr(oe[0])].apply(Y,oe[3]):Y=Z.length==1&&uu(Z)?Y[ee]():Y.thru(Z)}return function(){var he=arguments,ge=he[0];if(Y&&he.length==1&&rt(ge))return Y.plant(ge).value();for(var ye=0,Ie=b?m[ye].apply(this,he):ge;++ye<b;)Ie=m[ye].call(this,Ie);return Ie}})}function Cr(r,m,b,P,D,Z,Y,ee,oe,he){var ge=m&T,ye=m&w,Ie=m&_,Ve=m&(A|R),Je=m&N,pt=Ie?t:za(r);function Ke(){for(var bt=arguments.length,_t=le(bt),ms=bt;ms--;)_t[ms]=arguments[ms];if(Ve)var Fn=Fo(Ke),gs=iS(_t,Fn);if(P&&(_t=Vm(_t,P,D,Ve)),Z&&(_t=Fm(_t,Z,Y,Ve)),bt-=gs,Ve&&bt<he){var rn=Di(_t,Fn);return ng(r,m,Cr,Ke.placeholder,b,_t,rn,ee,oe,he-bt)}var Hs=ye?b:this,ki=Ie?Hs[r]:r;return bt=_t.length,ee?_t=fw(_t,ee):Je&&bt>1&&_t.reverse(),ge&&oe<bt&&(_t.length=oe),this&&this!==Tn&&this instanceof Ke&&(ki=pt||za(ki)),ki.apply(Hs,_t)}return Ke}function eg(r,m){return function(b,P){return C_(b,r,m(P),{})}}function yr(r,m){return function(b,P){var D;if(b===t&&P===t)return m;if(b!==t&&(D=b),P!==t){if(D===t)return P;typeof b=="string"||typeof P=="string"?(b=ps(b),P=ps(P)):(b=qm(b),P=qm(P)),D=r(b,P)}return D}}function su(r){return yi(function(m){return m=Vt(m,fs(Ge())),mt(function(b){var P=this;return r(m,function(D){return us(D,P,b)})})})}function Sr(r,m){m=m===t?" ":ps(m);var b=m.length;if(b<2)return b?Yd(m,r):m;var P=Yd(m,rr(r/Eo(m)));return qo(m)?zi(Bs(P),0,r).join(""):P.slice(0,r)}function V_(r,m,b,P){var D=m&w,Z=za(r);function Y(){for(var ee=-1,oe=arguments.length,he=-1,ge=P.length,ye=le(ge+oe),Ie=this&&this!==Tn&&this instanceof Y?Z:r;++he<ge;)ye[he]=P[he];for(;oe--;)ye[he++]=arguments[++ee];return us(Ie,D?b:this,ye)}return Y}function tg(r){return function(m,b,P){return P&&typeof P!="number"&&Vn(m,b,P)&&(b=P=t),m=wi(m),b===t?(b=m,m=0):b=wi(b),P=P===t?m<b?1:-1:wi(P),Q_(m,b,P,r)}}function _r(r){return function(m,b){return typeof m=="string"&&typeof b=="string"||(m=Qs(m),b=Qs(b)),r(m,b)}}function ng(r,m,b,P,D,Z,Y,ee,oe,he){var ge=m&A,ye=ge?Y:t,Ie=ge?t:Y,Ve=ge?Z:t,Je=ge?t:Z;m|=ge?k:x,m&=~(ge?x:k),m&$||(m&=-4);var pt=[r,m,D,Ve,ye,Je,Ie,ee,oe,he],Ke=b.apply(t,pt);return uu(r)&&hg(Ke,pt),Ke.placeholder=P,mg(Ke,r,m)}function iu(r){var m=vn[r];return function(b,P){if(b=Qs(b),P=P==null?0:Dn(dt(P),292),P&&mm(b)){var D=(Tt(b)+"e").split("e"),Z=m(D[0]+"e"+(+D[1]+P));return D=(Tt(Z)+"e").split("e"),+(D[0]+"e"+(+D[1]-P))}return m(b)}}var F_=zo&&1/Jl(new zo([,-0]))[1]==se?function(r){return new zo(r)}:xu;function sg(r){return function(m){var b=qn(m);return b==lt?Nd(m):b==Pn?uS(m):sS(m,r(m))}}function Ci(r,m,b,P,D,Z,Y,ee){var oe=m&_;if(!oe&&typeof r!="function")throw new Ps(a);var he=P?P.length:0;if(he||(m&=-97,P=D=t),Y=Y===t?Y:bn(dt(Y),0),ee=ee===t?ee:dt(ee),he-=D?D.length:0,m&x){var ge=P,ye=D;P=D=t}var Ie=oe?t:lu(r),Ve=[r,m,b,P,D,ge,ye,Z,Y,ee];if(Ie&&cw(Ve,Ie),r=Ve[0],m=Ve[1],b=Ve[2],P=Ve[3],D=Ve[4],ee=Ve[9]=Ve[9]===t?oe?0:r.length:bn(Ve[9]-he,0),!ee&&m&(A|R)&&(m&=-25),!m||m==w)var Je=X_(r,m,b);else m==A||m==R?Je=j_(r,m,ee):(m==k||m==(w|k))&&!D.length?Je=V_(r,m,b,P):Je=Cr.apply(t,Ve);var pt=Ie?Um:hg;return mg(pt(Je,Ve),r,m)}function ig(r,m,b,P){return r===t||zs(r,Zo[b])&&!Rt.call(P,b)?m:r}function og(r,m,b,P,D,Z){return Jt(r)&&Jt(m)&&(Z.set(m,r),gr(r,m,t,og,Z),Z.delete(m)),r}function W_(r){return ja(r)?t:r}function ag(r,m,b,P,D,Z){var Y=b&y,ee=r.length,oe=m.length;if(ee!=oe&&!(Y&&oe>ee))return!1;var he=Z.get(r),ge=Z.get(m);if(he&&ge)return he==m&&ge==r;var ye=-1,Ie=!0,Ve=b&S?new ho:t;for(Z.set(r,m),Z.set(m,r);++ye<ee;){var Je=r[ye],pt=m[ye];if(P)var Ke=Y?P(pt,Je,ye,m,r,Z):P(Je,pt,ye,r,m,Z);if(Ke!==t){if(Ke)continue;Ie=!1;break}if(Ve){if(!$d(m,function(bt,_t){if(!Qa(Ve,_t)&&(Je===bt||D(Je,bt,b,P,Z)))return Ve.push(_t)})){Ie=!1;break}}else if(!(Je===pt||D(Je,pt,b,P,Z))){Ie=!1;break}}return Z.delete(r),Z.delete(m),Ie}function Y_(r,m,b,P,D,Z,Y){switch(b){case It:if(r.byteLength!=m.byteLength||r.byteOffset!=m.byteOffset)return!1;r=r.buffer,m=m.buffer;case St:return!(r.byteLength!=m.byteLength||!Z(new ir(r),new ir(m)));case st:case Ye:case He:return zs(+r,+m);case Dt:return r.name==m.name&&r.message==m.message;case gn:case Hn:return r==m+"";case lt:var ee=Nd;case Pn:var oe=P&y;if(ee||(ee=Jl),r.size!=m.size&&!oe)return!1;var he=Y.get(r);if(he)return he==m;P|=S,Y.set(r,m);var ge=ag(ee(r),ee(m),P,D,Z,Y);return Y.delete(r),ge;case be:if(Ua)return Ua.call(r)==Ua.call(m)}return!1}function G_(r,m,b,P,D,Z){var Y=b&y,ee=ou(r),oe=ee.length,he=ou(m),ge=he.length;if(oe!=ge&&!Y)return!1;for(var ye=oe;ye--;){var Ie=ee[ye];if(!(Y?Ie in m:Rt.call(m,Ie)))return!1}var Ve=Z.get(r),Je=Z.get(m);if(Ve&&Je)return Ve==m&&Je==r;var pt=!0;Z.set(r,m),Z.set(m,r);for(var Ke=Y;++ye<oe;){Ie=ee[ye];var bt=r[Ie],_t=m[Ie];if(P)var ms=Y?P(_t,bt,Ie,m,r,Z):P(bt,_t,Ie,r,m,Z);if(!(ms===t?bt===_t||D(bt,_t,b,P,Z):ms)){pt=!1;break}Ke||(Ke=Ie=="constructor")}if(pt&&!Ke){var Fn=r.constructor,gs=m.constructor;Fn!=gs&&"constructor"in r&&"constructor"in m&&!(typeof Fn=="function"&&Fn instanceof Fn&&typeof gs=="function"&&gs instanceof gs)&&(pt=!1)}return Z.delete(r),Z.delete(m),pt}function yi(r){return pu(fg(r,t,yg),r+"")}function ou(r){return xm(r,_n,cu)}function au(r){return xm(r,es,lg)}var lu=dr?function(r){return dr.get(r)}:xu;function wr(r){for(var m=r.name+"",b=Ho[m],P=Rt.call(Ho,m)?b.length:0;P--;){var D=b[P],Z=D.func;if(Z==null||Z==r)return D.name}return m}function Fo(r){var m=Rt.call(E,"placeholder")?E:r;return m.placeholder}function Ge(){var r=E.iteratee||wu;return r=r===wu?Tm:r,arguments.length?r(arguments[0],arguments[1]):r}function kr(r,m){var b=r.__data__;return ow(m)?b[typeof m=="string"?"string":"hash"]:b.map}function ru(r){for(var m=_n(r),b=m.length;b--;){var P=m[b],D=r[P];m[b]=[P,D,dg(D)]}return m}function vo(r,m){var b=rS(r,m);return $m(b)?b:t}function J_(r){var m=Rt.call(r,fo),b=r[fo];try{r[fo]=t;var P=!0}catch{}var D=nr.call(r);return P&&(m?r[fo]=b:delete r[fo]),D}var cu=Ld?function(r){return r==null?[]:(r=Qt(r),Li(Ld(r),function(m){return pm.call(r,m)}))}:Pu,lg=Ld?function(r){for(var m=[];r;)Ui(m,cu(r)),r=or(r);return m}:Pu,qn=jn;(Ud&&qn(new Ud(new ArrayBuffer(1)))!=It||Na&&qn(new Na)!=lt||Dd&&qn(Dd.resolve())!=xn||zo&&qn(new zo)!=Pn||Ma&&qn(new Ma)!=Ae)&&(qn=function(r){var m=jn(r),b=m==Fe?r.constructor:t,P=b?bo(b):"";if(P)switch(P){case NS:return It;case MS:return lt;case LS:return xn;case US:return Pn;case DS:return Ae}return m});function K_(r,m,b){for(var P=-1,D=b.length;++P<D;){var Z=b[P],Y=Z.size;switch(Z.type){case"drop":r+=Y;break;case"dropRight":m-=Y;break;case"take":m=Dn(m,r+Y);break;case"takeRight":r=bn(r,m-Y);break}}return{start:r,end:m}}function ew(r){var m=r.match(a0);return m?m[1].split(l0):[]}function rg(r,m,b){m=Zi(m,r);for(var P=-1,D=m.length,Z=!1;++P<D;){var Y=ei(m[P]);if(!(Z=r!=null&&b(r,Y)))break;r=r[Y]}return Z||++P!=D?Z:(D=r==null?0:r.length,!!D&&Qr(D)&&Si(Y,D)&&(rt(r)||Oo(r)))}function tw(r){var m=r.length,b=new r.constructor(m);return m&&typeof r[0]=="string"&&Rt.call(r,"index")&&(b.index=r.index,b.input=r.input),b}function cg(r){return typeof r.constructor=="function"&&!Ha(r)?Xo(or(r)):{}}function nw(r,m,b){var P=r.constructor;switch(m){case St:return nu(r);case st:case Ye:return new P(+r);case It:return q_(r,b);case $n:case on:case Gt:case Xn:case Gs:case co:case Ta:case Ra:case Ia:return Xm(r,b);case lt:return new P;case He:case Hn:return new P(r);case gn:return E_(r);case Pn:return new P;case be:return B_(r)}}function sw(r,m){var b=m.length;if(!b)return r;var P=b-1;return m[P]=(b>1?"& ":"")+m[P],m=m.join(b>2?", ":" "),r.replace(o0,`{
/* [wrapped with `+m+`] */
`)}function iw(r){return rt(r)||Oo(r)||!!(hm&&r&&r[hm])}function Si(r,m){var b=typeof r;return m=m??G,!!m&&(b=="number"||b!="symbol"&&g0.test(r))&&r>-1&&r%1==0&&r<m}function Vn(r,m,b){if(!Jt(b))return!1;var P=typeof m;return(P=="number"?Kn(b)&&Si(m,b.length):P=="string"&&m in b)?zs(b[m],r):!1}function du(r,m){if(rt(r))return!1;var b=typeof r;return b=="number"||b=="symbol"||b=="boolean"||r==null||hs(r)?!0:t0.test(r)||!e0.test(r)||m!=null&&r in Qt(m)}function ow(r){var m=typeof r;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?r!=="__proto__":r===null}function uu(r){var m=wr(r),b=E[m];if(typeof b!="function"||!(m in Ct.prototype))return!1;if(r===b)return!0;var P=lu(b);return!!P&&r===P[0]}function aw(r){return!!dm&&dm in r}var lw=er?_i:$u;function Ha(r){var m=r&&r.constructor,b=typeof m=="function"&&m.prototype||Zo;return r===b}function dg(r){return r===r&&!Jt(r)}function ug(r,m){return function(b){return b==null?!1:b[r]===m&&(m!==t||r in Qt(b))}}function rw(r){var m=Rr(r,function(P){return b.size===f&&b.clear(),P}),b=m.cache;return m}function cw(r,m){var b=r[1],P=m[1],D=b|P,Z=D<(w|_|T),Y=P==T&&b==A||P==T&&b==M&&r[7].length<=m[8]||P==(T|M)&&m[7].length<=m[8]&&b==A;if(!(Z||Y))return r;P&w&&(r[2]=m[2],D|=b&w?0:$);var ee=m[3];if(ee){var oe=r[3];r[3]=oe?Vm(oe,ee,m[4]):ee,r[4]=oe?Di(r[3],h):m[4]}return ee=m[5],ee&&(oe=r[5],r[5]=oe?Fm(oe,ee,m[6]):ee,r[6]=oe?Di(r[5],h):m[6]),ee=m[7],ee&&(r[7]=ee),P&T&&(r[8]=r[8]==null?m[8]:Dn(r[8],m[8])),r[9]==null&&(r[9]=m[9]),r[0]=m[0],r[1]=D,r}function dw(r){var m=[];if(r!=null)for(var b in Qt(r))m.push(b);return m}function uw(r){return nr.call(r)}function fg(r,m,b){return m=bn(m===t?r.length-1:m,0),function(){for(var P=arguments,D=-1,Z=bn(P.length-m,0),Y=le(Z);++D<Z;)Y[D]=P[m+D];D=-1;for(var ee=le(m+1);++D<m;)ee[D]=P[D];return ee[m]=b(Y),us(r,this,ee)}}function pg(r,m){return m.length<2?r:go(r,Rs(m,0,-1))}function fw(r,m){for(var b=r.length,P=Dn(m.length,b),D=Jn(r);P--;){var Z=m[P];r[P]=Si(Z,b)?D[Z]:t}return r}function fu(r,m){if(!(m==="constructor"&&typeof r[m]=="function")&&m!="__proto__")return r[m]}var hg=gg(Um),Xa=PS||function(r,m){return Tn.setTimeout(r,m)},pu=gg(M_);function mg(r,m,b){var P=m+"";return pu(r,sw(P,pw(ew(P),b)))}function gg(r){var m=0,b=0;return function(){var P=IS(),D=H-(P-b);if(b=P,D>0){if(++m>=z)return arguments[0]}else m=0;return r.apply(t,arguments)}}function xr(r,m){var b=-1,P=r.length,D=P-1;for(m=m===t?P:m;++b<m;){var Z=Wd(b,D),Y=r[Z];r[Z]=r[b],r[b]=Y}return r.length=m,r}var vg=rw(function(r){var m=[];return r.charCodeAt(0)===46&&m.push(""),r.replace(n0,function(b,P,D,Z){m.push(D?Z.replace(d0,"$1"):P||b)}),m});function ei(r){if(typeof r=="string"||hs(r))return r;var m=r+"";return m=="0"&&1/r==-1/0?"-0":m}function bo(r){if(r!=null){try{return tr.call(r)}catch{}try{return r+""}catch{}}return""}function pw(r,m){return xs(Se,function(b){var P="_."+b[0];m&b[1]&&!Yl(r,P)&&r.push(P)}),r.sort()}function bg(r){if(r instanceof Ct)return r.clone();var m=new $s(r.__wrapped__,r.__chain__);return m.__actions__=Jn(r.__actions__),m.__index__=r.__index__,m.__values__=r.__values__,m}function hw(r,m,b){(b?Vn(r,m,b):m===t)?m=1:m=bn(dt(m),0);var P=r==null?0:r.length;if(!P||m<1)return[];for(var D=0,Z=0,Y=le(rr(P/m));D<P;)Y[Z++]=Rs(r,D,D+=m);return Y}function mw(r){for(var m=-1,b=r==null?0:r.length,P=0,D=[];++m<b;){var Z=r[m];Z&&(D[P++]=Z)}return D}function gw(){var r=arguments.length;if(!r)return[];for(var m=le(r-1),b=arguments[0],P=r;P--;)m[P-1]=arguments[P];return Ui(rt(b)?Jn(b):[b],Rn(m,1))}var vw=mt(function(r,m){return ln(r)?qa(r,Rn(m,1,ln,!0)):[]}),bw=mt(function(r,m){var b=Is(m);return ln(b)&&(b=t),ln(r)?qa(r,Rn(m,1,ln,!0),Ge(b,2)):[]}),Ow=mt(function(r,m){var b=Is(m);return ln(b)&&(b=t),ln(r)?qa(r,Rn(m,1,ln,!0),t,b):[]});function Cw(r,m,b){var P=r==null?0:r.length;return P?(m=b||m===t?1:dt(m),Rs(r,m<0?0:m,P)):[]}function yw(r,m,b){var P=r==null?0:r.length;return P?(m=b||m===t?1:dt(m),m=P-m,Rs(r,0,m<0?0:m)):[]}function Sw(r,m){return r&&r.length?br(r,Ge(m,3),!0,!0):[]}function _w(r,m){return r&&r.length?br(r,Ge(m,3),!0):[]}function ww(r,m,b,P){var D=r==null?0:r.length;return D?(b&&typeof b!="number"&&Vn(r,m,b)&&(b=0,P=D),g_(r,m,b,P)):[]}function Og(r,m,b){var P=r==null?0:r.length;if(!P)return-1;var D=b==null?0:dt(b);return D<0&&(D=bn(P+D,0)),Gl(r,Ge(m,3),D)}function Cg(r,m,b){var P=r==null?0:r.length;if(!P)return-1;var D=P-1;return b!==t&&(D=dt(b),D=b<0?bn(P+D,0):Dn(D,P-1)),Gl(r,Ge(m,3),D,!0)}function yg(r){var m=r==null?0:r.length;return m?Rn(r,1):[]}function kw(r){var m=r==null?0:r.length;return m?Rn(r,se):[]}function xw(r,m){var b=r==null?0:r.length;return b?(m=m===t?1:dt(m),Rn(r,m)):[]}function Pw(r){for(var m=-1,b=r==null?0:r.length,P={};++m<b;){var D=r[m];P[D[0]]=D[1]}return P}function Sg(r){return r&&r.length?r[0]:t}function $w(r,m,b){var P=r==null?0:r.length;if(!P)return-1;var D=b==null?0:dt(b);return D<0&&(D=bn(P+D,0)),Do(r,m,D)}function Tw(r){var m=r==null?0:r.length;return m?Rs(r,0,-1):[]}var Rw=mt(function(r){var m=Vt(r,eu);return m.length&&m[0]===r[0]?Hd(m):[]}),Iw=mt(function(r){var m=Is(r),b=Vt(r,eu);return m===Is(b)?m=t:b.pop(),b.length&&b[0]===r[0]?Hd(b,Ge(m,2)):[]}),Qw=mt(function(r){var m=Is(r),b=Vt(r,eu);return m=typeof m=="function"?m:t,m&&b.pop(),b.length&&b[0]===r[0]?Hd(b,t,m):[]});function Aw(r,m){return r==null?"":TS.call(r,m)}function Is(r){var m=r==null?0:r.length;return m?r[m-1]:t}function Nw(r,m,b){var P=r==null?0:r.length;if(!P)return-1;var D=P;return b!==t&&(D=dt(b),D=D<0?bn(P+D,0):Dn(D,P-1)),m===m?pS(r,m,D):Gl(r,nm,D,!0)}function Mw(r,m){return r&&r.length?Am(r,dt(m)):t}var Lw=mt(_g);function _g(r,m){return r&&r.length&&m&&m.length?Fd(r,m):r}function Uw(r,m,b){return r&&r.length&&m&&m.length?Fd(r,m,Ge(b,2)):r}function Dw(r,m,b){return r&&r.length&&m&&m.length?Fd(r,m,t,b):r}var qw=yi(function(r,m){var b=r==null?0:r.length,P=Ed(r,m);return Lm(r,Vt(m,function(D){return Si(D,b)?+D:D}).sort(jm)),P});function Ew(r,m){var b=[];if(!(r&&r.length))return b;var P=-1,D=[],Z=r.length;for(m=Ge(m,3);++P<Z;){var Y=r[P];m(Y,P,r)&&(b.push(Y),D.push(P))}return Lm(r,D),b}function hu(r){return r==null?r:AS.call(r)}function Bw(r,m,b){var P=r==null?0:r.length;return P?(b&&typeof b!="number"&&Vn(r,m,b)?(m=0,b=P):(m=m==null?0:dt(m),b=b===t?P:dt(b)),Rs(r,m,b)):[]}function Zw(r,m){return vr(r,m)}function zw(r,m,b){return Gd(r,m,Ge(b,2))}function Hw(r,m){var b=r==null?0:r.length;if(b){var P=vr(r,m);if(P<b&&zs(r[P],m))return P}return-1}function Xw(r,m){return vr(r,m,!0)}function jw(r,m,b){return Gd(r,m,Ge(b,2),!0)}function Vw(r,m){var b=r==null?0:r.length;if(b){var P=vr(r,m,!0)-1;if(zs(r[P],m))return P}return-1}function Fw(r){return r&&r.length?Dm(r):[]}function Ww(r,m){return r&&r.length?Dm(r,Ge(m,2)):[]}function Yw(r){var m=r==null?0:r.length;return m?Rs(r,1,m):[]}function Gw(r,m,b){return r&&r.length?(m=b||m===t?1:dt(m),Rs(r,0,m<0?0:m)):[]}function Jw(r,m,b){var P=r==null?0:r.length;return P?(m=b||m===t?1:dt(m),m=P-m,Rs(r,m<0?0:m,P)):[]}function Kw(r,m){return r&&r.length?br(r,Ge(m,3),!1,!0):[]}function ek(r,m){return r&&r.length?br(r,Ge(m,3)):[]}var tk=mt(function(r){return Bi(Rn(r,1,ln,!0))}),nk=mt(function(r){var m=Is(r);return ln(m)&&(m=t),Bi(Rn(r,1,ln,!0),Ge(m,2))}),sk=mt(function(r){var m=Is(r);return m=typeof m=="function"?m:t,Bi(Rn(r,1,ln,!0),t,m)});function ik(r){return r&&r.length?Bi(r):[]}function ok(r,m){return r&&r.length?Bi(r,Ge(m,2)):[]}function ak(r,m){return m=typeof m=="function"?m:t,r&&r.length?Bi(r,t,m):[]}function mu(r){if(!(r&&r.length))return[];var m=0;return r=Li(r,function(b){if(ln(b))return m=bn(b.length,m),!0}),Qd(m,function(b){return Vt(r,Td(b))})}function wg(r,m){if(!(r&&r.length))return[];var b=mu(r);return m==null?b:Vt(b,function(P){return us(m,t,P)})}var lk=mt(function(r,m){return ln(r)?qa(r,m):[]}),rk=mt(function(r){return Kd(Li(r,ln))}),ck=mt(function(r){var m=Is(r);return ln(m)&&(m=t),Kd(Li(r,ln),Ge(m,2))}),dk=mt(function(r){var m=Is(r);return m=typeof m=="function"?m:t,Kd(Li(r,ln),t,m)}),uk=mt(mu);function fk(r,m){return Zm(r||[],m||[],Da)}function pk(r,m){return Zm(r||[],m||[],Za)}var hk=mt(function(r){var m=r.length,b=m>1?r[m-1]:t;return b=typeof b=="function"?(r.pop(),b):t,wg(r,b)});function kg(r){var m=E(r);return m.__chain__=!0,m}function mk(r,m){return m(r),r}function Pr(r,m){return m(r)}var gk=yi(function(r){var m=r.length,b=m?r[0]:0,P=this.__wrapped__,D=function(Z){return Ed(Z,r)};return m>1||this.__actions__.length||!(P instanceof Ct)||!Si(b)?this.thru(D):(P=P.slice(b,+b+(m?1:0)),P.__actions__.push({func:Pr,args:[D],thisArg:t}),new $s(P,this.__chain__).thru(function(Z){return m&&!Z.length&&Z.push(t),Z}))});function vk(){return kg(this)}function bk(){return new $s(this.value(),this.__chain__)}function Ok(){this.__values__===t&&(this.__values__=qg(this.value()));var r=this.__index__>=this.__values__.length,m=r?t:this.__values__[this.__index__++];return{done:r,value:m}}function Ck(){return this}function yk(r){for(var m,b=this;b instanceof fr;){var P=bg(b);P.__index__=0,P.__values__=t,m?D.__wrapped__=P:m=P;var D=P;b=b.__wrapped__}return D.__wrapped__=r,m}function Sk(){var r=this.__wrapped__;if(r instanceof Ct){var m=r;return this.__actions__.length&&(m=new Ct(this)),m=m.reverse(),m.__actions__.push({func:Pr,args:[hu],thisArg:t}),new $s(m,this.__chain__)}return this.thru(hu)}function _k(){return Bm(this.__wrapped__,this.__actions__)}var wk=Or(function(r,m,b){Rt.call(r,b)?++r[b]:Oi(r,b,1)});function kk(r,m,b){var P=rt(r)?em:m_;return b&&Vn(r,m,b)&&(m=t),P(r,Ge(m,3))}function xk(r,m){var b=rt(r)?Li:wm;return b(r,Ge(m,3))}var Pk=Jm(Og),$k=Jm(Cg);function Tk(r,m){return Rn($r(r,m),1)}function Rk(r,m){return Rn($r(r,m),se)}function Ik(r,m,b){return b=b===t?1:dt(b),Rn($r(r,m),b)}function xg(r,m){var b=rt(r)?xs:Ei;return b(r,Ge(m,3))}function Pg(r,m){var b=rt(r)?Y0:_m;return b(r,Ge(m,3))}var Qk=Or(function(r,m,b){Rt.call(r,b)?r[b].push(m):Oi(r,b,[m])});function Ak(r,m,b,P){r=Kn(r)?r:Yo(r),b=b&&!P?dt(b):0;var D=r.length;return b<0&&(b=bn(D+b,0)),Ar(r)?b<=D&&r.indexOf(m,b)>-1:!!D&&Do(r,m,b)>-1}var Nk=mt(function(r,m,b){var P=-1,D=typeof m=="function",Z=Kn(r)?le(r.length):[];return Ei(r,function(Y){Z[++P]=D?us(m,Y,b):Ea(Y,m,b)}),Z}),Mk=Or(function(r,m,b){Oi(r,b,m)});function $r(r,m){var b=rt(r)?Vt:Rm;return b(r,Ge(m,3))}function Lk(r,m,b,P){return r==null?[]:(rt(m)||(m=m==null?[]:[m]),b=P?t:b,rt(b)||(b=b==null?[]:[b]),Nm(r,m,b))}var Uk=Or(function(r,m,b){r[b?0:1].push(m)},function(){return[[],[]]});function Dk(r,m,b){var P=rt(r)?Pd:im,D=arguments.length<3;return P(r,Ge(m,4),b,D,Ei)}function qk(r,m,b){var P=rt(r)?G0:im,D=arguments.length<3;return P(r,Ge(m,4),b,D,_m)}function Ek(r,m){var b=rt(r)?Li:wm;return b(r,Ir(Ge(m,3)))}function Bk(r){var m=rt(r)?Om:A_;return m(r)}function Zk(r,m,b){(b?Vn(r,m,b):m===t)?m=1:m=dt(m);var P=rt(r)?d_:N_;return P(r,m)}function zk(r){var m=rt(r)?u_:L_;return m(r)}function Hk(r){if(r==null)return 0;if(Kn(r))return Ar(r)?Eo(r):r.length;var m=qn(r);return m==lt||m==Pn?r.size:jd(r).length}function Xk(r,m,b){var P=rt(r)?$d:U_;return b&&Vn(r,m,b)&&(m=t),P(r,Ge(m,3))}var jk=mt(function(r,m){if(r==null)return[];var b=m.length;return b>1&&Vn(r,m[0],m[1])?m=[]:b>2&&Vn(m[0],m[1],m[2])&&(m=[m[0]]),Nm(r,Rn(m,1),[])}),Tr=xS||function(){return Tn.Date.now()};function Vk(r,m){if(typeof m!="function")throw new Ps(a);return r=dt(r),function(){if(--r<1)return m.apply(this,arguments)}}function $g(r,m,b){return m=b?t:m,m=r&&m==null?r.length:m,Ci(r,T,t,t,t,t,m)}function Tg(r,m){var b;if(typeof m!="function")throw new Ps(a);return r=dt(r),function(){return--r>0&&(b=m.apply(this,arguments)),r<=1&&(m=t),b}}var gu=mt(function(r,m,b){var P=w;if(b.length){var D=Di(b,Fo(gu));P|=k}return Ci(r,P,m,b,D)}),Rg=mt(function(r,m,b){var P=w|_;if(b.length){var D=Di(b,Fo(Rg));P|=k}return Ci(m,P,r,b,D)});function Ig(r,m,b){m=b?t:m;var P=Ci(r,A,t,t,t,t,t,m);return P.placeholder=Ig.placeholder,P}function Qg(r,m,b){m=b?t:m;var P=Ci(r,R,t,t,t,t,t,m);return P.placeholder=Qg.placeholder,P}function Ag(r,m,b){var P,D,Z,Y,ee,oe,he=0,ge=!1,ye=!1,Ie=!0;if(typeof r!="function")throw new Ps(a);m=Qs(m)||0,Jt(b)&&(ge=!!b.leading,ye="maxWait"in b,Z=ye?bn(Qs(b.maxWait)||0,m):Z,Ie="trailing"in b?!!b.trailing:Ie);function Ve(rn){var Hs=P,ki=D;return P=D=t,he=rn,Y=r.apply(ki,Hs),Y}function Je(rn){return he=rn,ee=Xa(bt,m),ge?Ve(rn):Y}function pt(rn){var Hs=rn-oe,ki=rn-he,Jg=m-Hs;return ye?Dn(Jg,Z-ki):Jg}function Ke(rn){var Hs=rn-oe,ki=rn-he;return oe===t||Hs>=m||Hs<0||ye&&ki>=Z}function bt(){var rn=Tr();if(Ke(rn))return _t(rn);ee=Xa(bt,pt(rn))}function _t(rn){return ee=t,Ie&&P?Ve(rn):(P=D=t,Y)}function ms(){ee!==t&&zm(ee),he=0,P=oe=D=ee=t}function Fn(){return ee===t?Y:_t(Tr())}function gs(){var rn=Tr(),Hs=Ke(rn);if(P=arguments,D=this,oe=rn,Hs){if(ee===t)return Je(oe);if(ye)return zm(ee),ee=Xa(bt,m),Ve(oe)}return ee===t&&(ee=Xa(bt,m)),Y}return gs.cancel=ms,gs.flush=Fn,gs}var Fk=mt(function(r,m){return Sm(r,1,m)}),Wk=mt(function(r,m,b){return Sm(r,Qs(m)||0,b)});function Yk(r){return Ci(r,N)}function Rr(r,m){if(typeof r!="function"||m!=null&&typeof m!="function")throw new Ps(a);var b=function(){var P=arguments,D=m?m.apply(this,P):P[0],Z=b.cache;if(Z.has(D))return Z.get(D);var Y=r.apply(this,P);return b.cache=Z.set(D,Y)||Z,Y};return b.cache=new(Rr.Cache||bi),b}Rr.Cache=bi;function Ir(r){if(typeof r!="function")throw new Ps(a);return function(){var m=arguments;switch(m.length){case 0:return!r.call(this);case 1:return!r.call(this,m[0]);case 2:return!r.call(this,m[0],m[1]);case 3:return!r.call(this,m[0],m[1],m[2])}return!r.apply(this,m)}}function Gk(r){return Tg(2,r)}var Jk=D_(function(r,m){m=m.length==1&&rt(m[0])?Vt(m[0],fs(Ge())):Vt(Rn(m,1),fs(Ge()));var b=m.length;return mt(function(P){for(var D=-1,Z=Dn(P.length,b);++D<Z;)P[D]=m[D].call(this,P[D]);return us(r,this,P)})}),vu=mt(function(r,m){var b=Di(m,Fo(vu));return Ci(r,k,t,m,b)}),Ng=mt(function(r,m){var b=Di(m,Fo(Ng));return Ci(r,x,t,m,b)}),Kk=yi(function(r,m){return Ci(r,M,t,t,t,m)});function ex(r,m){if(typeof r!="function")throw new Ps(a);return m=m===t?m:dt(m),mt(r,m)}function tx(r,m){if(typeof r!="function")throw new Ps(a);return m=m==null?0:bn(dt(m),0),mt(function(b){var P=b[m],D=zi(b,0,m);return P&&Ui(D,P),us(r,this,D)})}function nx(r,m,b){var P=!0,D=!0;if(typeof r!="function")throw new Ps(a);return Jt(b)&&(P="leading"in b?!!b.leading:P,D="trailing"in b?!!b.trailing:D),Ag(r,m,{leading:P,maxWait:m,trailing:D})}function sx(r){return $g(r,1)}function ix(r,m){return vu(tu(m),r)}function ox(){if(!arguments.length)return[];var r=arguments[0];return rt(r)?r:[r]}function ax(r){return Ts(r,O)}function lx(r,m){return m=typeof m=="function"?m:t,Ts(r,O,m)}function rx(r){return Ts(r,g|O)}function cx(r,m){return m=typeof m=="function"?m:t,Ts(r,g|O,m)}function dx(r,m){return m==null||ym(r,m,_n(m))}function zs(r,m){return r===m||r!==r&&m!==m}var ux=_r(zd),fx=_r(function(r,m){return r>=m}),Oo=Pm(function(){return arguments}())?Pm:function(r){return an(r)&&Rt.call(r,"callee")&&!pm.call(r,"callee")},rt=le.isArray,px=Fh?fs(Fh):y_;function Kn(r){return r!=null&&Qr(r.length)&&!_i(r)}function ln(r){return an(r)&&Kn(r)}function hx(r){return r===!0||r===!1||an(r)&&jn(r)==st}var Hi=$S||$u,mx=Wh?fs(Wh):S_;function gx(r){return an(r)&&r.nodeType===1&&!ja(r)}function vx(r){if(r==null)return!0;if(Kn(r)&&(rt(r)||typeof r=="string"||typeof r.splice=="function"||Hi(r)||Wo(r)||Oo(r)))return!r.length;var m=qn(r);if(m==lt||m==Pn)return!r.size;if(Ha(r))return!jd(r).length;for(var b in r)if(Rt.call(r,b))return!1;return!0}function bx(r,m){return Ba(r,m)}function Ox(r,m,b){b=typeof b=="function"?b:t;var P=b?b(r,m):t;return P===t?Ba(r,m,t,b):!!P}function bu(r){if(!an(r))return!1;var m=jn(r);return m==Dt||m==it||typeof r.message=="string"&&typeof r.name=="string"&&!ja(r)}function Cx(r){return typeof r=="number"&&mm(r)}function _i(r){if(!Jt(r))return!1;var m=jn(r);return m==sn||m==Un||m==Pe||m==Yt}function Mg(r){return typeof r=="number"&&r==dt(r)}function Qr(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=G}function Jt(r){var m=typeof r;return r!=null&&(m=="object"||m=="function")}function an(r){return r!=null&&typeof r=="object"}var Lg=Yh?fs(Yh):w_;function yx(r,m){return r===m||Xd(r,m,ru(m))}function Sx(r,m,b){return b=typeof b=="function"?b:t,Xd(r,m,ru(m),b)}function _x(r){return Ug(r)&&r!=+r}function wx(r){if(lw(r))throw new at(o);return $m(r)}function kx(r){return r===null}function xx(r){return r==null}function Ug(r){return typeof r=="number"||an(r)&&jn(r)==He}function ja(r){if(!an(r)||jn(r)!=Fe)return!1;var m=or(r);if(m===null)return!0;var b=Rt.call(m,"constructor")&&m.constructor;return typeof b=="function"&&b instanceof b&&tr.call(b)==SS}var Ou=Gh?fs(Gh):k_;function Px(r){return Mg(r)&&r>=-9007199254740991&&r<=G}var Dg=Jh?fs(Jh):x_;function Ar(r){return typeof r=="string"||!rt(r)&&an(r)&&jn(r)==Hn}function hs(r){return typeof r=="symbol"||an(r)&&jn(r)==be}var Wo=Kh?fs(Kh):P_;function $x(r){return r===t}function Tx(r){return an(r)&&qn(r)==Ae}function Rx(r){return an(r)&&jn(r)==ct}var Ix=_r(Vd),Qx=_r(function(r,m){return r<=m});function qg(r){if(!r)return[];if(Kn(r))return Ar(r)?Bs(r):Jn(r);if(Aa&&r[Aa])return dS(r[Aa]());var m=qn(r),b=m==lt?Nd:m==Pn?Jl:Yo;return b(r)}function wi(r){if(!r)return r===0?r:0;if(r=Qs(r),r===se||r===-1/0){var m=r<0?-1:1;return m*K}return r===r?r:0}function dt(r){var m=wi(r),b=m%1;return m===m?b?m-b:m:0}function Eg(r){return r?mo(dt(r),0,Oe):0}function Qs(r){if(typeof r=="number")return r;if(hs(r))return de;if(Jt(r)){var m=typeof r.valueOf=="function"?r.valueOf():r;r=Jt(m)?m+"":m}if(typeof r!="string")return r===0?r:+r;r=om(r);var b=p0.test(r);return b||m0.test(r)?V0(r.slice(2),b?2:8):f0.test(r)?de:+r}function Bg(r){return Ks(r,es(r))}function Ax(r){return r?mo(dt(r),-9007199254740991,G):r===0?r:0}function Tt(r){return r==null?"":ps(r)}var Nx=jo(function(r,m){if(Ha(m)||Kn(m)){Ks(m,_n(m),r);return}for(var b in m)Rt.call(m,b)&&Da(r,b,m[b])}),Zg=jo(function(r,m){Ks(m,es(m),r)}),Nr=jo(function(r,m,b,P){Ks(m,es(m),r,P)}),Mx=jo(function(r,m,b,P){Ks(m,_n(m),r,P)}),Lx=yi(Ed);function Ux(r,m){var b=Xo(r);return m==null?b:Cm(b,m)}var Dx=mt(function(r,m){r=Qt(r);var b=-1,P=m.length,D=P>2?m[2]:t;for(D&&Vn(m[0],m[1],D)&&(P=1);++b<P;)for(var Z=m[b],Y=es(Z),ee=-1,oe=Y.length;++ee<oe;){var he=Y[ee],ge=r[he];(ge===t||zs(ge,Zo[he])&&!Rt.call(r,he))&&(r[he]=Z[he])}return r}),qx=mt(function(r){return r.push(t,og),us(zg,t,r)});function Ex(r,m){return tm(r,Ge(m,3),Js)}function Bx(r,m){return tm(r,Ge(m,3),Zd)}function Zx(r,m){return r==null?r:Bd(r,Ge(m,3),es)}function zx(r,m){return r==null?r:km(r,Ge(m,3),es)}function Hx(r,m){return r&&Js(r,Ge(m,3))}function Xx(r,m){return r&&Zd(r,Ge(m,3))}function jx(r){return r==null?[]:mr(r,_n(r))}function Vx(r){return r==null?[]:mr(r,es(r))}function Cu(r,m,b){var P=r==null?t:go(r,m);return P===t?b:P}function Fx(r,m){return r!=null&&rg(r,m,v_)}function yu(r,m){return r!=null&&rg(r,m,b_)}var Wx=eg(function(r,m,b){m!=null&&typeof m.toString!="function"&&(m=nr.call(m)),r[m]=b},_u(ts)),Yx=eg(function(r,m,b){m!=null&&typeof m.toString!="function"&&(m=nr.call(m)),Rt.call(r,m)?r[m].push(b):r[m]=[b]},Ge),Gx=mt(Ea);function _n(r){return Kn(r)?bm(r):jd(r)}function es(r){return Kn(r)?bm(r,!0):$_(r)}function Jx(r,m){var b={};return m=Ge(m,3),Js(r,function(P,D,Z){Oi(b,m(P,D,Z),P)}),b}function Kx(r,m){var b={};return m=Ge(m,3),Js(r,function(P,D,Z){Oi(b,D,m(P,D,Z))}),b}var eP=jo(function(r,m,b){gr(r,m,b)}),zg=jo(function(r,m,b,P){gr(r,m,b,P)}),tP=yi(function(r,m){var b={};if(r==null)return b;var P=!1;m=Vt(m,function(Z){return Z=Zi(Z,r),P||(P=Z.length>1),Z}),Ks(r,au(r),b),P&&(b=Ts(b,g|v|O,W_));for(var D=m.length;D--;)Jd(b,m[D]);return b});function nP(r,m){return Hg(r,Ir(Ge(m)))}var sP=yi(function(r,m){return r==null?{}:R_(r,m)});function Hg(r,m){if(r==null)return{};var b=Vt(au(r),function(P){return[P]});return m=Ge(m),Mm(r,b,function(P,D){return m(P,D[0])})}function iP(r,m,b){m=Zi(m,r);var P=-1,D=m.length;for(D||(D=1,r=t);++P<D;){var Z=r==null?t:r[ei(m[P])];Z===t&&(P=D,Z=b),r=_i(Z)?Z.call(r):Z}return r}function oP(r,m,b){return r==null?r:Za(r,m,b)}function aP(r,m,b,P){return P=typeof P=="function"?P:t,r==null?r:Za(r,m,b,P)}var Xg=sg(_n),jg=sg(es);function lP(r,m,b){var P=rt(r),D=P||Hi(r)||Wo(r);if(m=Ge(m,4),b==null){var Z=r&&r.constructor;D?b=P?new Z:[]:Jt(r)?b=_i(Z)?Xo(or(r)):{}:b={}}return(D?xs:Js)(r,function(Y,ee,oe){return m(b,Y,ee,oe)}),b}function rP(r,m){return r==null?!0:Jd(r,m)}function cP(r,m,b){return r==null?r:Em(r,m,tu(b))}function dP(r,m,b,P){return P=typeof P=="function"?P:t,r==null?r:Em(r,m,tu(b),P)}function Yo(r){return r==null?[]:Ad(r,_n(r))}function uP(r){return r==null?[]:Ad(r,es(r))}function fP(r,m,b){return b===t&&(b=m,m=t),b!==t&&(b=Qs(b),b=b===b?b:0),m!==t&&(m=Qs(m),m=m===m?m:0),mo(Qs(r),m,b)}function pP(r,m,b){return m=wi(m),b===t?(b=m,m=0):b=wi(b),r=Qs(r),O_(r,m,b)}function hP(r,m,b){if(b&&typeof b!="boolean"&&Vn(r,m,b)&&(m=b=t),b===t&&(typeof m=="boolean"?(b=m,m=t):typeof r=="boolean"&&(b=r,r=t)),r===t&&m===t?(r=0,m=1):(r=wi(r),m===t?(m=r,r=0):m=wi(m)),r>m){var P=r;r=m,m=P}if(b||r%1||m%1){var D=gm();return Dn(r+D*(m-r+j0("1e-"+((D+"").length-1))),m)}return Wd(r,m)}var mP=Vo(function(r,m,b){return m=m.toLowerCase(),r+(b?Vg(m):m)});function Vg(r){return Su(Tt(r).toLowerCase())}function Fg(r){return r=Tt(r),r&&r.replace(v0,oS).replace(L0,"")}function gP(r,m,b){r=Tt(r),m=ps(m);var P=r.length;b=b===t?P:mo(dt(b),0,P);var D=b;return b-=m.length,b>=0&&r.slice(b,D)==m}function vP(r){return r=Tt(r),r&&hd.test(r)?r.replace(Xl,aS):r}function bP(r){return r=Tt(r),r&&s0.test(r)?r.replace(vd,"\\$&"):r}var OP=Vo(function(r,m,b){return r+(b?"-":"")+m.toLowerCase()}),CP=Vo(function(r,m,b){return r+(b?" ":"")+m.toLowerCase()}),yP=Gm("toLowerCase");function SP(r,m,b){r=Tt(r),m=dt(m);var P=m?Eo(r):0;if(!m||P>=m)return r;var D=(m-P)/2;return Sr(cr(D),b)+r+Sr(rr(D),b)}function _P(r,m,b){r=Tt(r),m=dt(m);var P=m?Eo(r):0;return m&&P<m?r+Sr(m-P,b):r}function wP(r,m,b){r=Tt(r),m=dt(m);var P=m?Eo(r):0;return m&&P<m?Sr(m-P,b)+r:r}function kP(r,m,b){return b||m==null?m=0:m&&(m=+m),QS(Tt(r).replace(bd,""),m||0)}function xP(r,m,b){return(b?Vn(r,m,b):m===t)?m=1:m=dt(m),Yd(Tt(r),m)}function PP(){var r=arguments,m=Tt(r[0]);return r.length<3?m:m.replace(r[1],r[2])}var $P=Vo(function(r,m,b){return r+(b?"_":"")+m.toLowerCase()});function TP(r,m,b){return b&&typeof b!="number"&&Vn(r,m,b)&&(m=b=t),b=b===t?Oe:b>>>0,b?(r=Tt(r),r&&(typeof m=="string"||m!=null&&!Ou(m))&&(m=ps(m),!m&&qo(r))?zi(Bs(r),0,b):r.split(m,b)):[]}var RP=Vo(function(r,m,b){return r+(b?" ":"")+Su(m)});function IP(r,m,b){return r=Tt(r),b=b==null?0:mo(dt(b),0,r.length),m=ps(m),r.slice(b,b+m.length)==m}function QP(r,m,b){var P=E.templateSettings;b&&Vn(r,m,b)&&(m=t),r=Tt(r),m=Nr({},m,P,ig);var D=Nr({},m.imports,P.imports,ig),Z=_n(D),Y=Ad(D,Z),ee,oe,he=0,ge=m.interpolate||Vl,ye="__p += '",Ie=Md((m.escape||Vl).source+"|"+ge.source+"|"+(ge===jl?u0:Vl).source+"|"+(m.evaluate||Vl).source+"|$","g"),Ve="//# sourceURL="+(Rt.call(m,"sourceURL")?(m.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++B0+"]")+`
`;r.replace(Ie,function(Ke,bt,_t,ms,Fn,gs){return _t||(_t=ms),ye+=r.slice(he,gs).replace(b0,lS),bt&&(ee=!0,ye+=`' +
__e(`+bt+`) +
'`),Fn&&(oe=!0,ye+=`';
`+Fn+`;
__p += '`),_t&&(ye+=`' +
((__t = (`+_t+`)) == null ? '' : __t) +
'`),he=gs+Ke.length,Ke}),ye+=`';
`;var Je=Rt.call(m,"variable")&&m.variable;if(!Je)ye=`with (obj) {
`+ye+`
}
`;else if(c0.test(Je))throw new at(l);ye=(oe?ye.replace(dd,""):ye).replace(ud,"$1").replace(fd,"$1;"),ye="function("+(Je||"obj")+`) {
`+(Je?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(oe?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ye+`return __p
}`;var pt=Yg(function(){return $t(Z,Ve+"return "+ye).apply(t,Y)});if(pt.source=ye,bu(pt))throw pt;return pt}function AP(r){return Tt(r).toLowerCase()}function NP(r){return Tt(r).toUpperCase()}function MP(r,m,b){if(r=Tt(r),r&&(b||m===t))return om(r);if(!r||!(m=ps(m)))return r;var P=Bs(r),D=Bs(m),Z=am(P,D),Y=lm(P,D)+1;return zi(P,Z,Y).join("")}function LP(r,m,b){if(r=Tt(r),r&&(b||m===t))return r.slice(0,cm(r)+1);if(!r||!(m=ps(m)))return r;var P=Bs(r),D=lm(P,Bs(m))+1;return zi(P,0,D).join("")}function UP(r,m,b){if(r=Tt(r),r&&(b||m===t))return r.replace(bd,"");if(!r||!(m=ps(m)))return r;var P=Bs(r),D=am(P,Bs(m));return zi(P,D).join("")}function DP(r,m){var b=I,P=q;if(Jt(m)){var D="separator"in m?m.separator:D;b="length"in m?dt(m.length):b,P="omission"in m?ps(m.omission):P}r=Tt(r);var Z=r.length;if(qo(r)){var Y=Bs(r);Z=Y.length}if(b>=Z)return r;var ee=b-Eo(P);if(ee<1)return P;var oe=Y?zi(Y,0,ee).join(""):r.slice(0,ee);if(D===t)return oe+P;if(Y&&(ee+=oe.length-ee),Ou(D)){if(r.slice(ee).search(D)){var he,ge=oe;for(D.global||(D=Md(D.source,Tt(Ph.exec(D))+"g")),D.lastIndex=0;he=D.exec(ge);)var ye=he.index;oe=oe.slice(0,ye===t?ee:ye)}}else if(r.indexOf(ps(D),ee)!=ee){var Ie=oe.lastIndexOf(D);Ie>-1&&(oe=oe.slice(0,Ie))}return oe+P}function qP(r){return r=Tt(r),r&&pd.test(r)?r.replace(Hl,hS):r}var EP=Vo(function(r,m,b){return r+(b?" ":"")+m.toUpperCase()}),Su=Gm("toUpperCase");function Wg(r,m,b){return r=Tt(r),m=b?t:m,m===t?cS(r)?vS(r):eS(r):r.match(m)||[]}var Yg=mt(function(r,m){try{return us(r,t,m)}catch(b){return bu(b)?b:new at(b)}}),BP=yi(function(r,m){return xs(m,function(b){b=ei(b),Oi(r,b,gu(r[b],r))}),r});function ZP(r){var m=r==null?0:r.length,b=Ge();return r=m?Vt(r,function(P){if(typeof P[1]!="function")throw new Ps(a);return[b(P[0]),P[1]]}):[],mt(function(P){for(var D=-1;++D<m;){var Z=r[D];if(us(Z[0],this,P))return us(Z[1],this,P)}})}function zP(r){return h_(Ts(r,g))}function _u(r){return function(){return r}}function HP(r,m){return r==null||r!==r?m:r}var XP=Km(),jP=Km(!0);function ts(r){return r}function wu(r){return Tm(typeof r=="function"?r:Ts(r,g))}function VP(r){return Im(Ts(r,g))}function FP(r,m){return Qm(r,Ts(m,g))}var WP=mt(function(r,m){return function(b){return Ea(b,r,m)}}),YP=mt(function(r,m){return function(b){return Ea(r,b,m)}});function ku(r,m,b){var P=_n(m),D=mr(m,P);b==null&&!(Jt(m)&&(D.length||!P.length))&&(b=m,m=r,r=this,D=mr(m,_n(m)));var Z=!(Jt(b)&&"chain"in b)||!!b.chain,Y=_i(r);return xs(D,function(ee){var oe=m[ee];r[ee]=oe,Y&&(r.prototype[ee]=function(){var he=this.__chain__;if(Z||he){var ge=r(this.__wrapped__),ye=ge.__actions__=Jn(this.__actions__);return ye.push({func:oe,args:arguments,thisArg:r}),ge.__chain__=he,ge}return oe.apply(r,Ui([this.value()],arguments))})}),r}function GP(){return Tn._===this&&(Tn._=_S),this}function xu(){}function JP(r){return r=dt(r),mt(function(m){return Am(m,r)})}var KP=su(Vt),e$=su(em),t$=su($d);function Gg(r){return du(r)?Td(ei(r)):I_(r)}function n$(r){return function(m){return r==null?t:go(r,m)}}var s$=tg(),i$=tg(!0);function Pu(){return[]}function $u(){return!1}function o$(){return{}}function a$(){return""}function l$(){return!0}function r$(r,m){if(r=dt(r),r<1||r>G)return[];var b=Oe,P=Dn(r,Oe);m=Ge(m),r-=Oe;for(var D=Qd(P,m);++b<r;)m(b);return D}function c$(r){return rt(r)?Vt(r,ei):hs(r)?[r]:Jn(vg(Tt(r)))}function d$(r){var m=++yS;return Tt(r)+m}var u$=yr(function(r,m){return r+m},0),f$=iu("ceil"),p$=yr(function(r,m){return r/m},1),h$=iu("floor");function m$(r){return r&&r.length?hr(r,ts,zd):t}function g$(r,m){return r&&r.length?hr(r,Ge(m,2),zd):t}function v$(r){return sm(r,ts)}function b$(r,m){return sm(r,Ge(m,2))}function O$(r){return r&&r.length?hr(r,ts,Vd):t}function C$(r,m){return r&&r.length?hr(r,Ge(m,2),Vd):t}var y$=yr(function(r,m){return r*m},1),S$=iu("round"),_$=yr(function(r,m){return r-m},0);function w$(r){return r&&r.length?Id(r,ts):0}function k$(r,m){return r&&r.length?Id(r,Ge(m,2)):0}return E.after=Vk,E.ary=$g,E.assign=Nx,E.assignIn=Zg,E.assignInWith=Nr,E.assignWith=Mx,E.at=Lx,E.before=Tg,E.bind=gu,E.bindAll=BP,E.bindKey=Rg,E.castArray=ox,E.chain=kg,E.chunk=hw,E.compact=mw,E.concat=gw,E.cond=ZP,E.conforms=zP,E.constant=_u,E.countBy=wk,E.create=Ux,E.curry=Ig,E.curryRight=Qg,E.debounce=Ag,E.defaults=Dx,E.defaultsDeep=qx,E.defer=Fk,E.delay=Wk,E.difference=vw,E.differenceBy=bw,E.differenceWith=Ow,E.drop=Cw,E.dropRight=yw,E.dropRightWhile=Sw,E.dropWhile=_w,E.fill=ww,E.filter=xk,E.flatMap=Tk,E.flatMapDeep=Rk,E.flatMapDepth=Ik,E.flatten=yg,E.flattenDeep=kw,E.flattenDepth=xw,E.flip=Yk,E.flow=XP,E.flowRight=jP,E.fromPairs=Pw,E.functions=jx,E.functionsIn=Vx,E.groupBy=Qk,E.initial=Tw,E.intersection=Rw,E.intersectionBy=Iw,E.intersectionWith=Qw,E.invert=Wx,E.invertBy=Yx,E.invokeMap=Nk,E.iteratee=wu,E.keyBy=Mk,E.keys=_n,E.keysIn=es,E.map=$r,E.mapKeys=Jx,E.mapValues=Kx,E.matches=VP,E.matchesProperty=FP,E.memoize=Rr,E.merge=eP,E.mergeWith=zg,E.method=WP,E.methodOf=YP,E.mixin=ku,E.negate=Ir,E.nthArg=JP,E.omit=tP,E.omitBy=nP,E.once=Gk,E.orderBy=Lk,E.over=KP,E.overArgs=Jk,E.overEvery=e$,E.overSome=t$,E.partial=vu,E.partialRight=Ng,E.partition=Uk,E.pick=sP,E.pickBy=Hg,E.property=Gg,E.propertyOf=n$,E.pull=Lw,E.pullAll=_g,E.pullAllBy=Uw,E.pullAllWith=Dw,E.pullAt=qw,E.range=s$,E.rangeRight=i$,E.rearg=Kk,E.reject=Ek,E.remove=Ew,E.rest=ex,E.reverse=hu,E.sampleSize=Zk,E.set=oP,E.setWith=aP,E.shuffle=zk,E.slice=Bw,E.sortBy=jk,E.sortedUniq=Fw,E.sortedUniqBy=Ww,E.split=TP,E.spread=tx,E.tail=Yw,E.take=Gw,E.takeRight=Jw,E.takeRightWhile=Kw,E.takeWhile=ek,E.tap=mk,E.throttle=nx,E.thru=Pr,E.toArray=qg,E.toPairs=Xg,E.toPairsIn=jg,E.toPath=c$,E.toPlainObject=Bg,E.transform=lP,E.unary=sx,E.union=tk,E.unionBy=nk,E.unionWith=sk,E.uniq=ik,E.uniqBy=ok,E.uniqWith=ak,E.unset=rP,E.unzip=mu,E.unzipWith=wg,E.update=cP,E.updateWith=dP,E.values=Yo,E.valuesIn=uP,E.without=lk,E.words=Wg,E.wrap=ix,E.xor=rk,E.xorBy=ck,E.xorWith=dk,E.zip=uk,E.zipObject=fk,E.zipObjectDeep=pk,E.zipWith=hk,E.entries=Xg,E.entriesIn=jg,E.extend=Zg,E.extendWith=Nr,ku(E,E),E.add=u$,E.attempt=Yg,E.camelCase=mP,E.capitalize=Vg,E.ceil=f$,E.clamp=fP,E.clone=ax,E.cloneDeep=rx,E.cloneDeepWith=cx,E.cloneWith=lx,E.conformsTo=dx,E.deburr=Fg,E.defaultTo=HP,E.divide=p$,E.endsWith=gP,E.eq=zs,E.escape=vP,E.escapeRegExp=bP,E.every=kk,E.find=Pk,E.findIndex=Og,E.findKey=Ex,E.findLast=$k,E.findLastIndex=Cg,E.findLastKey=Bx,E.floor=h$,E.forEach=xg,E.forEachRight=Pg,E.forIn=Zx,E.forInRight=zx,E.forOwn=Hx,E.forOwnRight=Xx,E.get=Cu,E.gt=ux,E.gte=fx,E.has=Fx,E.hasIn=yu,E.head=Sg,E.identity=ts,E.includes=Ak,E.indexOf=$w,E.inRange=pP,E.invoke=Gx,E.isArguments=Oo,E.isArray=rt,E.isArrayBuffer=px,E.isArrayLike=Kn,E.isArrayLikeObject=ln,E.isBoolean=hx,E.isBuffer=Hi,E.isDate=mx,E.isElement=gx,E.isEmpty=vx,E.isEqual=bx,E.isEqualWith=Ox,E.isError=bu,E.isFinite=Cx,E.isFunction=_i,E.isInteger=Mg,E.isLength=Qr,E.isMap=Lg,E.isMatch=yx,E.isMatchWith=Sx,E.isNaN=_x,E.isNative=wx,E.isNil=xx,E.isNull=kx,E.isNumber=Ug,E.isObject=Jt,E.isObjectLike=an,E.isPlainObject=ja,E.isRegExp=Ou,E.isSafeInteger=Px,E.isSet=Dg,E.isString=Ar,E.isSymbol=hs,E.isTypedArray=Wo,E.isUndefined=$x,E.isWeakMap=Tx,E.isWeakSet=Rx,E.join=Aw,E.kebabCase=OP,E.last=Is,E.lastIndexOf=Nw,E.lowerCase=CP,E.lowerFirst=yP,E.lt=Ix,E.lte=Qx,E.max=m$,E.maxBy=g$,E.mean=v$,E.meanBy=b$,E.min=O$,E.minBy=C$,E.stubArray=Pu,E.stubFalse=$u,E.stubObject=o$,E.stubString=a$,E.stubTrue=l$,E.multiply=y$,E.nth=Mw,E.noConflict=GP,E.noop=xu,E.now=Tr,E.pad=SP,E.padEnd=_P,E.padStart=wP,E.parseInt=kP,E.random=hP,E.reduce=Dk,E.reduceRight=qk,E.repeat=xP,E.replace=PP,E.result=iP,E.round=S$,E.runInContext=ie,E.sample=Bk,E.size=Hk,E.snakeCase=$P,E.some=Xk,E.sortedIndex=Zw,E.sortedIndexBy=zw,E.sortedIndexOf=Hw,E.sortedLastIndex=Xw,E.sortedLastIndexBy=jw,E.sortedLastIndexOf=Vw,E.startCase=RP,E.startsWith=IP,E.subtract=_$,E.sum=w$,E.sumBy=k$,E.template=QP,E.times=r$,E.toFinite=wi,E.toInteger=dt,E.toLength=Eg,E.toLower=AP,E.toNumber=Qs,E.toSafeInteger=Ax,E.toString=Tt,E.toUpper=NP,E.trim=MP,E.trimEnd=LP,E.trimStart=UP,E.truncate=DP,E.unescape=qP,E.uniqueId=d$,E.upperCase=EP,E.upperFirst=Su,E.each=xg,E.eachRight=Pg,E.first=Sg,ku(E,function(){var r={};return Js(E,function(m,b){Rt.call(E.prototype,b)||(r[b]=m)}),r}(),{chain:!1}),E.VERSION=n,xs(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){E[r].placeholder=E}),xs(["drop","take"],function(r,m){Ct.prototype[r]=function(b){b=b===t?1:bn(dt(b),0);var P=this.__filtered__&&!m?new Ct(this):this.clone();return P.__filtered__?P.__takeCount__=Dn(b,P.__takeCount__):P.__views__.push({size:Dn(b,Oe),type:r+(P.__dir__<0?"Right":"")}),P},Ct.prototype[r+"Right"]=function(b){return this.reverse()[r](b).reverse()}}),xs(["filter","map","takeWhile"],function(r,m){var b=m+1,P=b==F||b==j;Ct.prototype[r]=function(D){var Z=this.clone();return Z.__iteratees__.push({iteratee:Ge(D,3),type:b}),Z.__filtered__=Z.__filtered__||P,Z}}),xs(["head","last"],function(r,m){var b="take"+(m?"Right":"");Ct.prototype[r]=function(){return this[b](1).value()[0]}}),xs(["initial","tail"],function(r,m){var b="drop"+(m?"":"Right");Ct.prototype[r]=function(){return this.__filtered__?new Ct(this):this[b](1)}}),Ct.prototype.compact=function(){return this.filter(ts)},Ct.prototype.find=function(r){return this.filter(r).head()},Ct.prototype.findLast=function(r){return this.reverse().find(r)},Ct.prototype.invokeMap=mt(function(r,m){return typeof r=="function"?new Ct(this):this.map(function(b){return Ea(b,r,m)})}),Ct.prototype.reject=function(r){return this.filter(Ir(Ge(r)))},Ct.prototype.slice=function(r,m){r=dt(r);var b=this;return b.__filtered__&&(r>0||m<0)?new Ct(b):(r<0?b=b.takeRight(-r):r&&(b=b.drop(r)),m!==t&&(m=dt(m),b=m<0?b.dropRight(-m):b.take(m-r)),b)},Ct.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ct.prototype.toArray=function(){return this.take(Oe)},Js(Ct.prototype,function(r,m){var b=/^(?:filter|find|map|reject)|While$/.test(m),P=/^(?:head|last)$/.test(m),D=E[P?"take"+(m=="last"?"Right":""):m],Z=P||/^find/.test(m);D&&(E.prototype[m]=function(){var Y=this.__wrapped__,ee=P?[1]:arguments,oe=Y instanceof Ct,he=ee[0],ge=oe||rt(Y),ye=function(bt){var _t=D.apply(E,Ui([bt],ee));return P&&Ie?_t[0]:_t};ge&&b&&typeof he=="function"&&he.length!=1&&(oe=ge=!1);var Ie=this.__chain__,Ve=!!this.__actions__.length,Je=Z&&!Ie,pt=oe&&!Ve;if(!Z&&ge){Y=pt?Y:new Ct(this);var Ke=r.apply(Y,ee);return Ke.__actions__.push({func:Pr,args:[ye],thisArg:t}),new $s(Ke,Ie)}return Je&&pt?r.apply(this,ee):(Ke=this.thru(ye),Je?P?Ke.value()[0]:Ke.value():Ke)})}),xs(["pop","push","shift","sort","splice","unshift"],function(r){var m=Kl[r],b=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",P=/^(?:pop|shift)$/.test(r);E.prototype[r]=function(){var D=arguments;if(P&&!this.__chain__){var Z=this.value();return m.apply(rt(Z)?Z:[],D)}return this[b](function(Y){return m.apply(rt(Y)?Y:[],D)})}}),Js(Ct.prototype,function(r,m){var b=E[m];if(b){var P=b.name+"";Rt.call(Ho,P)||(Ho[P]=[]),Ho[P].push({name:m,func:b})}}),Ho[Cr(t,_).name]=[{name:"wrapper",func:t}],Ct.prototype.clone=qS,Ct.prototype.reverse=ES,Ct.prototype.value=BS,E.prototype.at=gk,E.prototype.chain=vk,E.prototype.commit=bk,E.prototype.next=Ok,E.prototype.plant=yk,E.prototype.reverse=Sk,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=_k,E.prototype.first=E.prototype.head,Aa&&(E.prototype[Aa]=Ck),E},Bo=bS();uo?((uo.exports=Bo)._=Bo,wd._=Bo):Tn._=Bo}).call(OL)}(tl,tl.exports)),tl.exports}var Us=CL();const yL={class:"font-bold"},SL={class:"flex gap-1 text-blue"},_L=["onClick"],wL=["onClick"],kL={class:"text-xs"},xL={class:"mt-2"},PL={class:""},$L={class:"flex items-center justify-center px-2"},TL={class:"text-xs"},RL=ae({name:"FiveShieldDrawer",__name:"match-modale",props:Be({optionsConds:{},editCondsData:{},condsData:{},codsName:{type:Function}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["handleUpdateConds"],["update:visible"]),setup(i,{emit:e}){var k;const t=Ze(i,"visible"),n=e,s=i,o=fe({component:"http-cond-url-extension"}),a=fe({type:"add",index:0,data:{type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"",isReverse:!1,isCaseInsensitive:!1}}),l=J(()=>s.editCondsData.type==="add"?u("page.webSet.securityConfig.fiveShield.createGroup"):u("page.webSet.securityConfig.fiveShield.editGroup")),c=fe({isOn:!0,connector:"and",conds:[],isReverse:!1,description:""}),f=B(),h=Object.assign({"../conds/http-cond-mime-type.vue":$p,"../conds/http-cond-params.vue":Tp,"../conds/http-cond-url-all.vue":Rp,"../conds/http-cond-url-eq-index.vue":Ip,"../conds/http-cond-url-eq.vue":Qp,"../conds/http-cond-url-extension.vue":Ap,"../conds/http-cond-url-not-eq.vue":Np,"../conds/http-cond-url-not-extension.vue":Mp,"../conds/http-cond-url-not-prefix.vue":Lp,"../conds/http-cond-url-not-regexp.vue":Up,"../conds/http-cond-url-prefix.vue":Dp,"../conds/http-cond-url-regexp.vue":qp,"../conds/http-cond-url-wildcard-match.vue":Ep,"../conds/http-cond-user-agent-not-regexp.vue":Bp,"../conds/http-cond-user-agent-regexp.vue":Zp}),g={};for(const x in h){const T=((k=x.split("/").pop())==null?void 0:k.replace(".vue",""))||"";g[T]=h[x].default}const v=J(()=>g[o.component]),O=J(()=>{const x=s.optionsConds.find(T=>T.component===o.component);return(x==null?void 0:x.description)||""}),y=B(!1),S=B(!1),w=async()=>{const x=s.editCondsData.type,T={...s.condsData};if(x==="edit"){const M=s.editCondsData.index;T.groups[M]={...c}}else T.groups.push({...c});n("handleUpdateConds",T),t.value=!1},_=()=>{a.type==="edit"?c.conds[a.index]={...f.value.model}:c.conds.push({...f.value.model}),y.value=!1},$=(x,T)=>{const M=s.optionsConds.find(N=>N.type===x.type);o.component=M==null?void 0:M.component,Object.assign(a,{type:"edit",index:T,data:x}),y.value=!0},A=x=>{c.conds.splice(x,1)},R=()=>{a.type="add",o.component="http-cond-url-extension",a.data={type:"url-extension",isRequest:!0,param:"${requestPathLowerExtension}",operator:"in",value:"[]",isReverse:!1,isCaseInsensitive:!1},y.value=!0};return je(()=>s.editCondsData,x=>{x&&Object.assign(c,js(x.data))},{deep:!0}),(x,T)=>{const M=_e,N=re,I=Te,q=ve,z=ft,H=Ne,F=et,V=Re,j=ze,se=Pt,G=ft;return L(),te(Ce,null,[d(se,{show:t.value,"onUpdate:show":T[6]||(T[6]=K=>t.value=K)},{default:p(()=>[d(j,{style:{width:"600px"},title:l.value,bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p(()=>[U("span",{onClick:T[0]||(T[0]=()=>t.value=!1)},[d(M,{"local-icon":"material-symbols-light--close-rounded",class:"text-2xl cursor-pointer transform transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(N,null,{default:p(()=>[d(I,{type:"info",onClick:w},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1}),d(I,{onClick:T[5]||(T[5]=()=>t.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(V,{class:"overflow-y-auto max-h-[220px]"},{default:p(()=>[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.subConditionList")},{default:p(()=>[d(N,{vertical:""},{default:p(()=>[d(N,{size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(c.conds,(K,de)=>(L(),te("div",{key:de,class:"flex items-center justify-center px-3 py-1 gap-1 text-xs border rounded-md"},[U("span",yL,Q(s.codsName(K.type))+":"+Q(K.value),1),U("div",SL,[U("span",{onClick:Oe=>$(K,de),class:"cursor-pointer"},[d(M,{"local-icon":"material-symbols--edit"})],8,_L),U("span",{onClick:Oe=>A(de),class:"cursor-pointer"},[d(M,{"local-icon":"mingcute--close-fill"})],8,wL)])]))),128))]),_:1}),d(I,{onClick:R,dashed:"",size:"small"},{icon:p(()=>[d(M,{"local-icon":"material-symbols-light--add-2"})]),_:1})]),_:1})]),_:1},8,["label"]),d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.subConditionRelation")},{feedback:p(()=>[U("span",kL,Q(C(u)("page.webSet.securityConfig.fiveShield.allConditionsRequired")),1)]),default:p(()=>[d(z,{value:c.connector,"onUpdate:value":T[1]||(T[1]=K=>c.connector=K),options:[{label:C(u)("page.webSet.securityConfig.fiveShield.and"),value:"and"},{label:C(u)("page.webSet.securityConfig.fiveShield.or"),value:"or"}],style:{width:"80px"},"default-value":"and"},null,8,["value","options"])]),_:1},8,["label"]),U("div",xL,[U("div",{class:"flex items-center cursor-pointer text-[#0052d9] mb-4",onClick:T[2]||(T[2]=K=>S.value=!S.value)},[U("span",PL,Q(C(u)("page.webSet.httpConfig.moreSetting")),1),d(M,{"local-icon":"meteor-icons--angle-right",class:Ln(["transition-transform duration-200",S.value?"rotate-90":""])},null,8,["class"])]),S.value?(L(),te(Ce,{key:0},[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.additionalExplanation")},{default:p(()=>[d(H,{value:c.description,"onUpdate:value":T[3]||(T[3]=K=>c.description=K),type:"textarea"},null,8,["value"])]),_:1},8,["label"]),d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.enableCurrentGroup")},{default:p(()=>[d(F,{checked:c.isOn,"onUpdate:checked":T[4]||(T[4]=K=>c.isOn=K),label:C(u)("page.webSet.securityConfig.fiveShield.selectEnable")},null,8,["checked","label"])]),_:1},8,["label"])],64)):Xe("",!0)])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"]),d(se,{show:y.value,"onUpdate:show":T[9]||(T[9]=K=>y.value=K),"mask-closable":!1},{default:p(()=>[U("div",$L,[d(j,{style:{"max-width":"480px"},title:a.type==="add"?C(u)("page.webSet.securityConfig.fiveShield.createCondition"):C(u)("page.webSet.securityConfig.fiveShield.editCondition"),bordered:!1,size:"huge"},{footer:p(()=>[d(N,null,{default:p(()=>[d(I,{onClick:_,type:"info"},{default:p(()=>[X(Q(C(u)("common.confirm")),1)]),_:1}),d(I,{onClick:T[8]||(T[8]=()=>y.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(V,{class:"overflow-y-auto max-h-[260px]"},{default:p(()=>[d(q,{label:C(u)("page.webSet.securityConfig.fiveShield.selectConditionType")},{feedback:p(()=>[U("span",TL,Q(O.value),1)]),default:p(()=>[d(G,{value:o.component,"onUpdate:value":T[7]||(T[7]=K=>o.component=K),options:s.optionsConds,"label-field":"name","value-field":"component",style:{width:"480px"}},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:f,"edit-model":a},null,8,["edit-model"]))]),_:1})]),_:1},8,["title"])])]),_:1},8,["show"])],64)}}}),qO=ce(RL,[["__scopeId","data-v-d824f33a"]]),IL={key:2,class:"h-full overflow-y-auto"},QL={class:"text-xs"},AL={class:"text-xs"},NL={class:"text-xs"},ML={class:"ml-2 flex gap-1 text-gray-500"},LL={class:"drag-handle cursor-pointer text-sm"},UL={class:"text-xs text-red"},DL={class:"text-xs"},qL={class:"text-xs"},EL={class:"text-xs text-gray"},BL={class:"text-xs text-gray"};function ZL(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const zL=ae({name:"CompressionConfig",__name:"compression-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B([]),a=B(!0),l=B(null),c=B(!1),f=B(!1),h=B(!1),g=fe({type:"add",data:{isOn:!0,connector:"and",conds:[],isReverse:!0,description:""},index:0}),v=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),O=B({featureIsOn:!1,compressionConfig:{isPrior:!1,isOn:!1,useDefaultTypes:!1,types:["brotli","gzip","zstd","deflate"],level:0,decompressData:!1,gzipRef:void 0,deflateRef:void 0,brotliRef:void 0,gzip:void 0,deflate:void 0,brotli:void 0,minLength:{count:0,unit:"kb"},maxLength:{count:32,unit:"mb"},mimeTypes:["text/*","application/javascript","application/json","application/atom+xml","application/rss+xml","application/xhtml+xml","font/*","image/svg+xml"],extensions:[".js",".json",".html",".htm",".xml",".css",".woff2",".txt"],exceptExtensions:[".apk",".ipa"],conds:{isOn:!1,connector:"or",groups:[]},enablePartialContent:!1,onlyURLPatterns:[],exceptURLPatterns:[]},webId:0}),y=fe({featureIsOn:!1,compressionConfig:{isPrior:!1,isOn:!1,useDefaultTypes:!1,types:["brotli","gzip","zstd","deflate"],level:0,decompressData:!1,gzipRef:void 0,deflateRef:void 0,brotliRef:void 0,gzip:void 0,deflate:void 0,brotli:void 0,minLength:{count:0,unit:"kb"},maxLength:{count:32,unit:"mb"},mimeTypes:["text/*","application/javascript","application/json","application/atom+xml","application/rss+xml","application/xhtml+xml","font/*","image/svg+xml"],extensions:[".js",".json",".html",".htm",".xml",".css",".woff2",".txt"],exceptExtensions:[".apk",".ipa"],conds:{isOn:!1,connector:"or",groups:[]},enablePartialContent:!1,onlyURLPatterns:[],exceptURLPatterns:[]},webId:0}),S=V=>{y.compressionConfig.onlyURLPatterns.splice(V,1),$()},w=()=>{g.type="add",g.data={isOn:!0,connector:"and",conds:[],isReverse:!1,description:""},h.value=!0},_=async()=>{var K;const V="/servers/server/settings/compression",se={csrfToken:await Kt(),webId:y.webId,compressionJSON:JSON.stringify(y.compressionConfig),minLength:JSON.stringify(y.compressionConfig.minLength),maxLength:JSON.stringify(y.compressionConfig.maxLength),condsJSON:JSON.stringify(y.compressionConfig.conds)},{error:G}=await Ee(se,V);G||(O.value=Us.cloneDeep(y),(K=window.$message)==null||K.success(u("common.msgSync")))},$=()=>{var V;Us.isEqual(y,O.value)||((V=window.$message)==null||V.warning(u("common.pageChange")),_())},A=V=>{y.compressionConfig.conds={...V},$()},R=(V,j)=>{g.type="edit",g.data=V,g.index=j,h.value=!0},k=V=>{y.compressionConfig.conds&&y.compressionConfig.conds.groups.splice(V,1),$()},x=V=>{const{type:j,index:se,data:G}=V;j==="edit"&&se>=0&&se<y.compressionConfig.onlyURLPatterns.length?y.compressionConfig.onlyURLPatterns[se]={...G}:j!=="edit"&&y.compressionConfig.onlyURLPatterns.push({...G}),$()},T=V=>{const{type:j,index:se,data:G}=V;j==="edit"&&se>=0&&se<y.compressionConfig.exceptURLPatterns.length?y.compressionConfig.exceptURLPatterns[se]={...G}:j!=="edit"&&y.compressionConfig.exceptURLPatterns.push({...G}),$()},M=V=>{y.compressionConfig.exceptURLPatterns.splice(V,1),$()},N=async()=>{const V="/servers/server/settings/compression",{data:j,error:se}=await ht(V,{serverId:e.value});if(!se){const{featureIsOn:G=!1,compressionConfig:K,webId:de=0}=j;Object.assign(y,{featureIsOn:G,webId:de,...K&&{compressionConfig:K}}),O.value=Us.cloneDeep(y)}};je(l,V=>{V&&ia(()=>V.focus())}),je(()=>y.compressionConfig.conds,V=>{V===null&&(y.compressionConfig.conds={isOn:!1,connector:"or",groups:[]},O.value.compressionConfig.conds={isOn:!1,connector:"or",groups:[]})});const I=B(""),q=J(()=>[{label:u("page.webSet.compressionConfig.byte"),value:"byte"},{label:"KiB",value:"kb"},{label:"MiB",value:"mb"},{label:"GiB",value:"gb"}]),z=J(()=>[{type:"url-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.description"),component:"http-cond-url-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-eq-index",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.description"),component:"http-cond-url-eq-index",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-all",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.description"),component:"http-cond-url-all",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.description"),component:"http-cond-url-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.description"),component:"http-cond-url-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.description"),component:"http-cond-url-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-wildcard-match",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.description"),component:"http-cond-url-wildcard-match",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.description"),component:"http-cond-user-agent-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"params",name:u("page.webSet.securityConfig.fiveShield.optionsConds.params.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.params.description"),component:"http-cond-params",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.params.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.description"),component:"http-cond-url-not-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.description"),component:"http-cond-url-not-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.description"),component:"http-cond-url-not-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.description"),component:"http-cond-url-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.description"),component:"http-cond-user-agent-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"mime-type",name:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.description"),component:"http-cond-mime-type",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.paramsTitle"),isRequest:!1,caseInsensitive:!1}]),H=V=>{const j=z.value.find(se=>se.type===V);return j==null?void 0:j.name},F=J(()=>[{title:u("page.webSet.securityConfig.fiveShield.group"),key:"index",width:90,align:"center",render:(V,j)=>d("span",null,[" ",u("page.webSet.securityConfig.fiveShield.group"),X(" "),j+1])},{title:u("page.webSet.securityConfig.fiveShield.conds"),key:"conds",align:"center",render:V=>{let j;return d(re,{justify:"center",size:"small"},ZL(j=V.conds.map((se,G)=>d(Ls,{key:G,size:"small",class:"text-xs"},{default:()=>[H(se.type),X(" : "),se.value]})))?j:{default:()=>[j]})}},{title:u("page.webSet.securityConfig.fiveShield.actions"),key:"actions",align:"center",width:120,render:(V,j)=>d(re,{justify:"center",class:"text-blue items-center"},{default:()=>[d("span",{onClick:()=>R(V,j),class:"cursor-pointer "},[" ",d(_e,{localIcon:"material-symbols--edit",class:"text-[18px]"},null)," "]),d("span",{onClick:()=>k(j),class:"cursor-pointer "},[" ",d(_e,{localIcon:"material-symbols--close-rounded",class:"text-[18px]"},null)," "])]})}]);return vt(()=>{N().finally(()=>{a.value=!1})}),(V,j)=>{const se=jt,G=nn,K=en,de=ve,Oe=Re,we=un,pe=Qi,Se=Ne,xe=Wt,Me=ze,Pe=et,st=Jc,Ye=Ut,it=ft,Dt=tn,sn=ss,Un=Te,lt=ws,He=Xt,Mi=Ht;return a.value?(L(),W(se,{key:0})):y.featureIsOn?(L(),te("div",IL,[d(C(re),{vertical:""},{default:p(()=>[d(Me,{title:C(u)("page.webSet.compressionConfig.title")},{default:p(()=>[d(Oe,null,{default:p(()=>[d(de,{label:C(u)("page.webSet.compressionConfig.enable"),"label-placement":s.value},{default:p(()=>[d(K,{value:y.compressionConfig.isOn,"onUpdate:value":[j[0]||(j[0]=Fe=>y.compressionConfig.isOn=Fe),$]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1}),d(Mi,{"expanded-names":o.value,"onUpdate:expandedNames":j[18]||(j[18]=Fe=>o.value=Fe),"arrow-placement":"right"},{default:p(()=>[d(He,{name:"more"},{header:p(()=>[d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(_e,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(Me,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"mdi--file"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.compressionConfig.fileType")),1)]),_:1})]),_:1}),d(Oe,{"label-width":"120px","label-align":"left",class:"space-y-sm"},{default:p(()=>[d(de,{label:C(u)("page.webSet.compressionConfig.supportedExtensions"),"label-placement":s.value},{feedback:p(()=>[U("span",QL,Q(C(u)("page.webSet.compressionConfig.extensionsTip")),1)]),default:p(()=>[d(xe,{value:y.compressionConfig.extensions,"onUpdate:value":[j[2]||(j[2]=Fe=>y.compressionConfig.extensions=Fe),$],size:"small",class:"text-xs"},{input:p(({submit:Fe,deactivate:xn})=>[d(Se,{ref_key:"autoCompleteInstRef",ref:l,value:I.value,"onUpdate:value":j[1]||(j[1]=Yt=>I.value=Yt),size:"small",placeholder:C(u)("page.webSet.compressionConfig.extensionsExample"),"clear-after-select":!0,onKeyup:rl(()=>{const Yt=I.value.trim();if(Yt){const gn=Yt.startsWith(".")?Yt:`.${Yt}`;Fe(gn),I.value=""}},["enter"]),onBlur:xn},null,8,["value","placeholder","onKeyup","onBlur"])]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.compressionConfig.excludedExtensions"),"label-placement":s.value},{feedback:p(()=>[U("span",AL,Q(C(u)("page.webSet.compressionConfig.extensionsTip")),1)]),default:p(()=>[d(xe,{value:y.compressionConfig.exceptExtensions,"onUpdate:value":[j[4]||(j[4]=Fe=>y.compressionConfig.exceptExtensions=Fe),$],size:"small",class:"text-xs"},{input:p(({submit:Fe,deactivate:xn})=>[d(Se,{ref_key:"autoCompleteInstRef",ref:l,value:I.value,"onUpdate:value":j[3]||(j[3]=Yt=>I.value=Yt),size:"small",placeholder:C(u)("page.webSet.compressionConfig.extensionsExample"),"clear-after-select":!0,onKeyup:rl(()=>{const Yt=I.value.trim();if(Yt){const gn=Yt.startsWith(".")?Yt:`.${Yt}`;Fe(gn),I.value=""}},["enter"]),onBlur:xn},null,8,["value","placeholder","onKeyup","onBlur"])]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.compressionConfig.supportedMimeTypes"),"label-placement":s.value},{feedback:p(()=>[U("span",NL,Q(C(u)("page.webSet.compressionConfig.mimeTypeTip")),1)]),default:p(()=>[d(xe,{value:y.compressionConfig.mimeTypes,"onUpdate:value":[j[6]||(j[6]=Fe=>y.compressionConfig.mimeTypes=Fe),$],size:"small",class:"text-xs"},{input:p(({submit:Fe,deactivate:xn})=>[d(Se,{ref_key:"autoCompleteInstRef",ref:l,value:I.value,"onUpdate:value":j[5]||(j[5]=Yt=>I.value=Yt),size:"small",placeholder:C(u)("page.webSet.compressionConfig.mimeTypeExample"),onKeyup:rl(()=>{Fe(I.value),I.value=""},["enter"]),onBlur:xn},null,8,["value","placeholder","onKeyup","onBlur"])]),_:1},8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(Me,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"ant-design--setting-filled"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.compressionConfig.compressionAlgorithmSettings")),1)]),_:1})]),_:1}),d(Oe,{"label-width":"120px","label-align":"left"},{default:p(()=>[d(de,{label:C(u)("page.webSet.compressionConfig.compressionAlgorithms"),"label-placement":s.value},{feedback:p(()=>[U("span",DL,Q(C(u)("page.webSet.compressionConfig.extensionsTip")),1)]),default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[d(Pe,{checked:y.compressionConfig.useDefaultTypes,label:C(u)("page.webSet.compressionConfig.useDefaultAlgorithmOrder"),"onUpdate:checked":j[7]||(j[7]=Fe=>{y.compressionConfig.useDefaultTypes=Fe,$()})},null,8,["checked","label"]),y.compressionConfig.useDefaultTypes?Xe("",!0):(L(),te(Ce,{key:0},[d(st,{value:y.compressionConfig.types,"onUpdate:value":[j[8]||(j[8]=Fe=>y.compressionConfig.types=Fe),$]},{default:p(()=>[d(Pe,{value:"brotli",label:"brotli"}),d(Pe,{value:"gzip",label:"gzip"}),d(Pe,{value:"zstd",label:"zstd"}),d(Pe,{value:"deflate",label:"deflate"})]),_:1},8,["value"]),d(C(Sa),{modelValue:y.compressionConfig.types,"onUpdate:modelValue":j[9]||(j[9]=Fe=>y.compressionConfig.types=Fe),"item-key":"item","force-fallback":!0,handle:".drag-handle",animation:"200",class:"flex flex-wrap select-none gap-2",onChange:$},{item:p(({element:Fe,index:xn})=>[(L(),te("div",{key:xn,class:"drag-handle flex cursor-pointer items-center border border rounded-lg px-3 py-0.5 text-[10px] shadow-sm"},[U("span",null,Q(Fe),1),U("div",ML,[U("span",LL,[d(_e,{"local-icon":"material-symbols--menu"})])])]))]),_:1},8,["modelValue"]),U("span",UL,Q(C(u)("page.webSet.compressionConfig.algorithmSelectionTip")),1)],64))]),_:1})]),_:1},8,["label","label-placement"]),d(de,{label:C(u)("page.webSet.compressionConfig.supportRecompression"),"label-placement":s.value},{feedback:p(()=>[U("span",qL,Q(C(u)("page.webSet.compressionConfig.extensionsTip")),1)]),default:p(()=>[d(Pe,{checked:y.compressionConfig.decompressData,label:C(u)("page.webSet.compressionConfig.supportRecompressionTip"),"onUpdate:checked":j[10]||(j[10]=Fe=>{y.compressionConfig.decompressData=Fe,$()})},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(Me,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"fa-solid--sliders-h"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.compressionConfig.contentLengthSettings")),1)]),_:1})]),_:1}),d(Oe,{"label-width":"120px","label-align":"left"},{default:p(()=>[d(de,{label:C(u)("page.webSet.compressionConfig.minContentLength")},{default:p(()=>[d(Dt,null,{default:p(()=>[d(Ye,{value:y.compressionConfig.minLength.count,"onUpdate:value":j[11]||(j[11]=Fe=>y.compressionConfig.minLength.count=Fe),"show-button":!1,style:{width:"80px"},onBlur:$},null,8,["value"]),d(it,{value:y.compressionConfig.minLength.unit,"onUpdate:value":[j[12]||(j[12]=Fe=>y.compressionConfig.minLength.unit=Fe),$],options:q.value,style:{width:"80px"}},null,8,["value","options"])]),_:1})]),_:1},8,["label"]),d(de,{label:C(u)("page.webSet.compressionConfig.maxContentLength")},{default:p(()=>[d(Dt,null,{default:p(()=>[d(Ye,{value:y.compressionConfig.maxLength.count,"onUpdate:value":j[13]||(j[13]=Fe=>y.compressionConfig.maxLength.count=Fe),"show-button":!1,style:{width:"80px"},onBlur:$},null,8,["value"]),d(it,{value:y.compressionConfig.maxLength.unit,"onUpdate:value":[j[14]||(j[14]=Fe=>y.compressionConfig.maxLength.unit=Fe),$],options:q.value,style:{width:"80px"}},null,8,["value","options"])]),_:1})]),_:1},8,["label"])]),_:1})]),_:1}),d(Me,{size:"small",bordered:!1},{default:p(()=>[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"fa-solid--sliders-h"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.compressionConfig.advancedOptions")),1)]),_:1})]),_:1}),d(Oe,{"label-width":"120px","label-align":"left",class:"space-y-sm"},{default:p(()=>[d(de,{label:C(u)("page.webSet.compressionConfig.supportPartialContent")},{default:p(()=>[d(Pe,{checked:y.compressionConfig.enablePartialContent,label:C(u)("page.webSet.compressionConfig.supportPartialContentTip"),"onUpdate:checked":j[15]||(j[15]=Fe=>{y.compressionConfig.enablePartialContent=Fe,$()})},null,8,["checked","label"])]),_:1},8,["label"]),d(de,{label:C(u)("page.webSet.compressionConfig.excludedURLs")},{feedback:p(()=>[U("span",EL,Q(C(u)("page.webSet.compressionConfig.excludedURLsTip")),1)]),default:p(()=>[d(sn,{visible:c.value,"onUpdate:visible":j[16]||(j[16]=Fe=>c.value=Fe),options:v.value,"url-patterns":y.compressionConfig.exceptURLPatterns,onDelete:M,onUpdate:T},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(de,{label:C(u)("page.webSet.compressionConfig.limitedURLs")},{feedback:p(()=>[U("span",BL,Q(C(u)("page.webSet.compressionConfig.limitedURLsTip")),1)]),default:p(()=>[d(sn,{visible:f.value,"onUpdate:visible":j[17]||(j[17]=Fe=>f.value=Fe),options:v.value,"url-patterns":y.compressionConfig.onlyURLPatterns,onDelete:S,onUpdate:x},null,8,["visible","options","url-patterns"])]),_:1},8,["label"])]),_:1})]),_:1}),d(Me,{size:"small",bordered:!1},{default:p(()=>{var Fe;return[d(pe,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"material-symbols--settings-input-component-outline-sharp"}),d(we,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.matchCondition")),1)]),_:1})]),_:1}),d(C(re),{size:"small"},{default:p(()=>[d(Un,{class:"mb-2 text-sm",size:"small",type:"info",secondary:"",onClick:w},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.addGroup")),1)]),_:1})]),_:1}),d(lt,{columns:F.value,pagination:{pageSize:10},data:((Fe=y.compressionConfig.conds)==null?void 0:Fe.groups)||[],size:"small","row-key":xn=>xn.index,"scroll-x":400,class:"min-h-[280px] text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["columns","data","row-key"])]}),_:1})]),_:1})]),_:1},8,["expanded-names"])]),_:1},8,["title"])]),_:1}),d(qO,{visible:h.value,"onUpdate:visible":j[19]||(j[19]=Fe=>h.value=Fe),"options-conds":z.value,"edit-conds-data":g,"conds-data":y.compressionConfig.conds,"cods-name":H,onHandleUpdateConds:A},null,8,["visible","options-conds","edit-conds-data","conds-data"])])):(L(),W(G,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),HL=ce(zL,[["__scopeId","data-v-5c14bf2b"]]),XL={key:2,class:"h-full overflow-y-auto"},jL={class:"text-xs"},VL={class:"text-xs"},FL={class:"text-xs"},WL={class:"text-xs"},YL={class:"text-xs"},GL={class:"text-xs"},JL={class:"text-xs"},KL={class:"text-xs"},e3={class:"text-xs"},t3=ae({name:"OptimizationConfig",__name:"optimization-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=fe(O2()),l=B({js:{addExceptURLPatterns:!1,addOnlyURLPatterns:!1,loading:!1},css:{addExceptURLPatterns:!1,addOnlyURLPatterns:!1,loading:!1},html:{addExceptURLPatterns:!1,addOnlyURLPatterns:!1,loading:!1}}),c=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),f=async()=>{var q,z,H,F,V,j;const M="/servers/server/settings/optimization",{data:N,error:I}=await ht(M,{serverId:e.value});if(!I){const{featureIsOn:se=!1,optimizationConfig:G,webId:K=0}=N;Object.assign(a,{featureIsOn:se,webId:K,optimizationConfig:{...G,html:{...G.html,onlyURLPatterns:((q=G==null?void 0:G.html)==null?void 0:q.onlyURLPatterns)??[],exceptURLPatterns:((z=G==null?void 0:G.html)==null?void 0:z.exceptURLPatterns)??[]},javascript:{...G.javascript,onlyURLPatterns:((H=G==null?void 0:G.javascript)==null?void 0:H.onlyURLPatterns)??[],exceptURLPatterns:((F=G==null?void 0:G.javascript)==null?void 0:F.exceptURLPatterns)??[]},css:{...G.html,onlyURLPatterns:((V=G==null?void 0:G.css)==null?void 0:V.onlyURLPatterns)??[],exceptURLPatterns:((j=G==null?void 0:G.css)==null?void 0:j.exceptURLPatterns)??[]}}})}},h=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.html.exceptURLPatterns.length?a.optimizationConfig.html.exceptURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.html.exceptURLPatterns.push({...q})},g=M=>{a.optimizationConfig.html.exceptURLPatterns.splice(M,1)},v=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.html.onlyURLPatterns.length?a.optimizationConfig.html.onlyURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.html.onlyURLPatterns.push({...q})},O=M=>{a.optimizationConfig.html.onlyURLPatterns.splice(M,1)},y=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.css.exceptURLPatterns.length?a.optimizationConfig.css.exceptURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.css.exceptURLPatterns.push({...q})},S=M=>{a.optimizationConfig.css.exceptURLPatterns.splice(M,1)},w=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.css.onlyURLPatterns.length?a.optimizationConfig.css.onlyURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.css.onlyURLPatterns.push({...q})},_=M=>{a.optimizationConfig.css.onlyURLPatterns.splice(M,1)},$=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.javascript.exceptURLPatterns.length?a.optimizationConfig.javascript.exceptURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.javascript.exceptURLPatterns.push({...q})},A=M=>{a.optimizationConfig.javascript.exceptURLPatterns.splice(M,1)},R=M=>{const{type:N,index:I,data:q}=M;N==="edit"&&I>=0&&I<a.optimizationConfig.javascript.onlyURLPatterns.length?a.optimizationConfig.javascript.onlyURLPatterns[I]={...q}:N!=="edit"&&a.optimizationConfig.javascript.onlyURLPatterns.push({...q})},k=M=>{a.optimizationConfig.javascript.onlyURLPatterns.splice(M,1)},x=(M,N)=>{l.value[M].loading=N},T=async M=>{var F;x(M,!0);const N="/servers/server/settings/optimization",q={csrfToken:await Kt(),webId:a.webId,optimizationJSON:JSON.stringify(a.optimizationConfig)},{data:z,error:H}=await Ee(q,N);H||(F=window.$message)==null||F.success(u("common.msgSync")),x(M,!1)};return vt(()=>{f().finally(()=>{o.value=!1})}),(M,N)=>{const I=jt,q=nn,z=en,H=ve,F=un,V=_e,j=Re,se=Te,G=re,K=Xt,de=Ht,Oe=nt,we=ze;return o.value?(L(),W(I,{key:0})):a.featureIsOn?(L(),te("div",XL,[d(G,{vertical:""},{default:p(()=>[d(we,{title:C(u)("page.webSet.optimizationConfig.html.title")},{default:p(()=>[d(Oe,{show:l.value.html.loading},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.html.enable"),"label-placement":s.value},{feedback:p(()=>[U("span",jL,Q(C(u)("page.webSet.optimizationConfig.html.htmlOptimizationTip")),1)]),default:p(()=>[d(z,{value:a.optimizationConfig.html.isOn,"onUpdate:value":[N[0]||(N[0]=pe=>a.optimizationConfig.html.isOn=pe),N[1]||(N[1]=pe=>T("html"))]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(de,{"arrow-placement":"right"},{default:p(()=>[d(K,{name:"more"},{header:p(()=>[d(F,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(V,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(j,{class:"space-y-sm"},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.html.htmlExcludedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",VL,Q(C(u)("page.webSet.optimizationConfig.html.htmlExcludedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.html.addExceptURLPatterns,"onUpdate:visible":N[2]||(N[2]=pe=>l.value.html.addExceptURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.html.exceptURLPatterns,onDelete:g,onUpdate:h},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(H,{label:C(u)("page.webSet.optimizationConfig.html.htmlLimitedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",FL,Q(C(u)("page.webSet.optimizationConfig.html.htmlLimitedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.html.addOnlyURLPatterns,"onUpdate:visible":N[3]||(N[3]=pe=>l.value.html.addOnlyURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.html.onlyURLPatterns,onDelete:O,onUpdate:v},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"])]),_:1}),d(G,{class:"mt-2"},{default:p(()=>[d(se,{type:"info",onClick:N[4]||(N[4]=pe=>T("html"))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"]),d(we,{title:C(u)("page.webSet.optimizationConfig.js.title")},{default:p(()=>[d(Oe,{show:l.value.js.loading},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.js.enable"),"label-placement":s.value},{feedback:p(()=>[U("span",WL,Q(C(u)("page.webSet.optimizationConfig.js.jsOptimizationTip")),1)]),default:p(()=>[d(z,{value:a.optimizationConfig.javascript.isOn,"onUpdate:value":[N[5]||(N[5]=pe=>a.optimizationConfig.javascript.isOn=pe),N[6]||(N[6]=pe=>T("js"))]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(de,{"arrow-placement":"right"},{default:p(()=>[d(K,{name:"more"},{header:p(()=>[d(F,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(V,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(j,{class:"space-y-sm"},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.js.jsExcludedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",YL,Q(C(u)("page.webSet.optimizationConfig.js.jsExcludedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.js.addExceptURLPatterns,"onUpdate:visible":N[7]||(N[7]=pe=>l.value.js.addExceptURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.javascript.exceptURLPatterns,onDelete:A,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(H,{label:C(u)("page.webSet.optimizationConfig.js.jsLimitedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",GL,Q(C(u)("page.webSet.optimizationConfig.js.jsLimitedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.js.addOnlyURLPatterns,"onUpdate:visible":N[8]||(N[8]=pe=>l.value.js.addOnlyURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.javascript.onlyURLPatterns,onDelete:k,onUpdate:R},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"])]),_:1}),d(G,{class:"mt-2"},{default:p(()=>[d(se,{type:"info",onClick:N[9]||(N[9]=pe=>T("js"))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"]),d(we,{title:C(u)("page.webSet.optimizationConfig.css.title")},{default:p(()=>[d(Oe,{show:l.value.css.loading},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.css.enable"),"label-placement":s.value},{feedback:p(()=>[U("span",JL,Q(C(u)("page.webSet.optimizationConfig.css.cssOptimizationTip")),1)]),default:p(()=>[d(z,{value:a.optimizationConfig.css.isOn,"onUpdate:value":[N[10]||(N[10]=pe=>a.optimizationConfig.css.isOn=pe),N[11]||(N[11]=pe=>T("css"))]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(de,{"arrow-placement":"right"},{default:p(()=>[d(K,{name:"more"},{header:p(()=>[d(F,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(V,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(j,{class:"space-y-sm"},{default:p(()=>[d(H,{label:C(u)("page.webSet.optimizationConfig.css.cssExcludedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",KL,Q(C(u)("page.webSet.optimizationConfig.css.cssExcludedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.css.addExceptURLPatterns,"onUpdate:visible":N[12]||(N[12]=pe=>l.value.css.addExceptURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.css.exceptURLPatterns,onDelete:S,onUpdate:y},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"]),d(H,{label:C(u)("page.webSet.optimizationConfig.css.cssLimitedURLs"),"label-placement":s.value},{feedback:p(()=>[U("span",e3,Q(C(u)("page.webSet.optimizationConfig.css.cssLimitedURLsTip")),1)]),default:p(()=>[d(ss,{visible:l.value.css.addOnlyURLPatterns,"onUpdate:visible":N[13]||(N[13]=pe=>l.value.css.addOnlyURLPatterns=pe),options:c.value,"url-patterns":a.optimizationConfig.css.onlyURLPatterns,onDelete:_,onUpdate:w},null,8,["visible","options","url-patterns"])]),_:1},8,["label","label-placement"])]),_:1}),d(G,{class:"mt-2"},{default:p(()=>[d(se,{type:"info",onClick:N[14]||(N[14]=pe=>T("css"))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1})])):(L(),W(q,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),n3=ce(t3,[["__scopeId","data-v-6abe7268"]]),s3={key:2,class:"h-full overflow-y-auto"},i3={class:"text-xs"},o3={class:"text-xs"},a3={class:"text-xs"},l3={class:"text-xs"},r3={class:"text-xs"};function c3(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!Lo(i)}const d3=ae({name:"WebPConfig",__name:"webp-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!1),a=B(!0),l=B({webpConfig:{isPrior:!1,isOn:!1,minLength:{count:0,unit:"byte"},maxLength:{count:0,unit:"kb"},mimeTypes:["image/png","image/jpeg","image/bmp","image/x-ico"],extensions:[".png",".jpeg",".jpg",".bmp",".ico"],conds:{isOn:!0,connector:"or",groups:[]}},featureIsOn:!1,webId:0}),c=fe({webpConfig:{isPrior:!1,isOn:!1,minLength:{count:0,unit:"byte"},maxLength:{count:0,unit:"kb"},mimeTypes:["image/png","image/jpeg","image/bmp","image/x-ico"],extensions:[".png",".jpeg",".jpg",".bmp",".ico"],conds:{isOn:!0,connector:"or",groups:[]}},featureIsOn:!1,webId:0}),f=J(()=>[{label:u("page.webSet.compressionConfig.byte"),value:"byte"},{label:"KiB",value:"kb"},{label:"MiB",value:"mb"},{label:"GiB",value:"gb"}]),h=async()=>{const T="/servers/server/settings/webp",{data:M,error:N}=await ht(T,{serverId:e.value});if(!N){const{featureIsOn:I=!1,webpConfig:q,webId:z=0}=M;Object.assign(c,{featureIsOn:I,webId:z,webpConfig:{...q??c.webpConfig,conds:(q==null?void 0:q.conds)??{isOn:!0,connector:"or",groups:[]}}}),l.value=Us.cloneDeep(c)}},g=async()=>{var q;const T="/servers/server/settings/webp",N={csrfToken:await Kt(),webId:c.webId,webpJSON:JSON.stringify(c.webpConfig),minLength:JSON.stringify(c.webpConfig.minLength),maxLength:JSON.stringify(c.webpConfig.maxLength),condsJSON:JSON.stringify(c.webpConfig.conds)},{error:I}=await Ee(N,T);I||(l.value=Us.cloneDeep(c),(q=window.$message)==null||q.success(u("common.msgSync")))},v=()=>{var T;Us.isEqual(c,l.value)||((T=window.$message)==null||T.warning(u("common.pageChange")),g())},O=B(""),y=B(null);je(y,T=>{T&&ia(()=>T.focus())});const S=fe({type:"add",data:{isOn:!0,connector:"and",conds:[],isReverse:!0,description:""},index:0}),w=()=>{S.type="add",S.data={isOn:!0,connector:"and",conds:[],isReverse:!1,description:""},o.value=!0},_=(T,M)=>{S.type="edit",S.data=T,S.index=M,o.value=!0},$=T=>{c.webpConfig.conds&&c.webpConfig.conds.groups.splice(T,1)},A=T=>{c.webpConfig.conds={...T},v()},R=T=>{const M=k.value.find(N=>N.type===T);return M==null?void 0:M.name},k=J(()=>[{type:"url-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.description"),component:"http-cond-url-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-eq-index",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.description"),component:"http-cond-url-eq-index",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEqIndex.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-all",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.description"),component:"http-cond-url-all",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlAll.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.description"),component:"http-cond-url-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.description"),component:"http-cond-url-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.description"),component:"http-cond-url-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-wildcard-match",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.description"),component:"http-cond-url-wildcard-match",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlWildcardMatch.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.description"),component:"http-cond-user-agent-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"params",name:u("page.webSet.securityConfig.fiveShield.optionsConds.params.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.params.description"),component:"http-cond-params",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.params.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-extension",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.description"),component:"http-cond-url-not-extension",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotExtension.paramsTitle"),isRequest:!0,caseInsensitive:!1},{type:"url-not-prefix",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.description"),component:"http-cond-url-not-prefix",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotPrefix.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-eq",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.description"),component:"http-cond-url-not-eq",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotEq.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"url-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.description"),component:"http-cond-url-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.urlNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"user-agent-not-regexp",name:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.description"),component:"http-cond-user-agent-not-regexp",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.userAgentNotRegexp.paramsTitle"),isRequest:!0,caseInsensitive:!0},{type:"mime-type",name:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.name"),description:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.description"),component:"http-cond-mime-type",paramsTitle:u("page.webSet.securityConfig.fiveShield.optionsConds.mimeType.paramsTitle"),isRequest:!1,caseInsensitive:!1}]),x=J(()=>[{title:u("page.webSet.securityConfig.fiveShield.group"),key:"index",width:90,align:"center",render:(T,M)=>d("span",null,[" ",u("page.webSet.securityConfig.fiveShield.group"),X(" "),M+1])},{title:u("page.webSet.securityConfig.fiveShield.conds"),key:"conds",align:"center",render:T=>{let M;return d(re,{justify:"center",size:"small"},c3(M=T.conds.map((N,I)=>d(Ls,{key:I,size:"small",class:"text-xs"},{default:()=>[R(N.type),X(" : "),N.value]})))?M:{default:()=>[M]})}},{title:u("page.webSet.securityConfig.fiveShield.actions"),key:"actions",align:"center",width:120,render:(T,M)=>d(re,{justify:"center",class:"text-blue items-center"},{default:()=>[d("span",{onClick:()=>_(T,M),class:"cursor-pointer "},[" ",d(_e,{localIcon:"material-symbols--edit",class:"text-[18px]"},null)," "]),d("span",{onClick:()=>$(M),class:"cursor-pointer "},[" ",d(_e,{localIcon:"mingcute--close-fill",class:"text-[18px]"},null)," "])]})}]);return vt(()=>{h().finally(()=>{a.value=!1})}),(T,M)=>{const N=jt,I=nn,q=en,z=ve,H=un,F=Qi,V=Ne,j=Wt,se=Ut,G=ft,K=tn,de=Re,Oe=ze,we=Te,pe=ws,Se=Xt,xe=Ht;return a.value?(L(),W(N,{key:0})):c.featureIsOn?(L(),te("div",s3,[d(C(re),{vertical:""},{default:p(()=>[d(Oe,{title:C(u)("page.webSet.WebPConfig.title")},{default:p(()=>[d(z,{label:C(u)("page.webSet.WebPConfig.enable"),"label-placement":s.value},{feedback:p(()=>[U("span",i3,Q(C(u)("page.webSet.WebPConfig.webpTip")),1)]),default:p(()=>[d(q,{value:c.webpConfig.isOn,"onUpdate:value":[M[0]||(M[0]=Me=>c.webpConfig.isOn=Me),v]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(xe,{"arrow-placement":"right"},{default:p(()=>[d(Se,{name:"more"},{header:p(()=>[d(H,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(_e,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(Oe,{size:"small",bordered:!1},{default:p(()=>[d(F,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"fa-solid--sliders-h"}),d(H,null,{default:p(()=>[X(Q(C(u)("page.webSet.WebPConfig.detailedConfig")),1)]),_:1})]),_:1}),d(de,{"label-width":"120px","label-align":"left",class:"space-y-sm"},{default:p(()=>[d(z,{label:C(u)("page.webSet.WebPConfig.supportedExtensions"),"label-placement":s.value},{feedback:p(()=>[U("span",o3,Q(C(u)("page.webSet.WebPConfig.extensionsTip")),1)]),default:p(()=>[d(j,{value:c.webpConfig.extensions,"onUpdate:value":[M[2]||(M[2]=Me=>c.webpConfig.extensions=Me),v],size:"small",class:"text-xs"},{input:p(({submit:Me,deactivate:Pe})=>[d(V,{ref_key:"autoCompleteInstRef",ref:y,value:O.value,"onUpdate:value":M[1]||(M[1]=st=>O.value=st),size:"small",placeholder:C(u)("page.webSet.WebPConfig.extensionsExample"),"clear-after-select":!0,onKeyup:rl(()=>{const st=O.value.trim();if(st){const Ye=st.startsWith(".")?st:`.${st}`;Me(Ye),O.value=""}},["enter"]),onBlur:Pe},null,8,["value","placeholder","onKeyup","onBlur"])]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(z,{label:C(u)("page.webSet.WebPConfig.supportedMimeTypes"),"label-placement":s.value},{feedback:p(()=>[U("span",a3,Q(C(u)("page.webSet.WebPConfig.mimeTypeTip")),1)]),default:p(()=>[d(j,{value:c.webpConfig.mimeTypes,"onUpdate:value":[M[4]||(M[4]=Me=>c.webpConfig.mimeTypes=Me),v],size:"small",class:"text-xs"},{input:p(({submit:Me,deactivate:Pe})=>[d(V,{ref_key:"autoCompleteInstRef",ref:y,value:O.value,"onUpdate:value":M[3]||(M[3]=st=>O.value=st),size:"small",placeholder:C(u)("page.webSet.WebPConfig.mimeTypeExample"),onKeyup:rl(()=>{Me(O.value),O.value=""},["enter"]),onBlur:Pe},null,8,["value","placeholder","onKeyup","onBlur"])]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d(z,{label:C(u)("page.webSet.WebPConfig.minContentLength"),"label-placement":s.value},{feedback:p(()=>[U("span",l3,Q(C(u)("page.webSet.WebPConfig.minContentLengthTip")),1)]),default:p(()=>[d(K,null,{default:p(()=>[d(se,{value:c.webpConfig.minLength.count,"onUpdate:value":M[5]||(M[5]=Me=>c.webpConfig.minLength.count=Me),"show-button":!1,style:{width:"80px"},onBlur:v},null,8,["value"]),d(G,{value:c.webpConfig.minLength.unit,"onUpdate:value":[M[6]||(M[6]=Me=>c.webpConfig.minLength.unit=Me),v],options:f.value,style:{width:"80px"}},null,8,["value","options"])]),_:1})]),_:1},8,["label","label-placement"]),d(z,{label:C(u)("page.webSet.WebPConfig.maxContentLength"),"label-placement":s.value},{feedback:p(()=>[U("span",r3,Q(C(u)("page.webSet.WebPConfig.maxContentLengthTip")),1)]),default:p(()=>[d(K,null,{default:p(()=>[d(se,{value:c.webpConfig.maxLength.count,"onUpdate:value":M[7]||(M[7]=Me=>c.webpConfig.maxLength.count=Me),"show-button":!1,style:{width:"80px"},onBlur:v},null,8,["value"]),d(G,{value:c.webpConfig.maxLength.unit,"onUpdate:value":[M[8]||(M[8]=Me=>c.webpConfig.maxLength.unit=Me),v],options:f.value,style:{width:"80px"}},null,8,["value","options"])]),_:1})]),_:1},8,["label","label-placement"])]),_:1})]),_:1}),d(Oe,{size:"small",bordered:!1},{default:p(()=>{var Me;return[d(F,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_e,{"local-icon":"material-symbols--settings-input-component-outline-sharp"}),d(H,null,{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.matchCondition")),1)]),_:1})]),_:1}),d(C(re),{size:"small"},{default:p(()=>[d(we,{class:"mb-2 text-sm",size:"small",type:"info",secondary:"",onClick:w},{default:p(()=>[X(Q(C(u)("page.webSet.securityConfig.fiveShield.addGroup")),1)]),_:1})]),_:1}),d(pe,{columns:x.value,pagination:{pageSize:10},data:((Me=c.webpConfig.conds)==null?void 0:Me.groups)||[],size:"small","row-key":Pe=>Pe.index,"scroll-x":400,class:"min-h-[280px] text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["columns","data","row-key"])]}),_:1})]),_:1})]),_:1})]),_:1},8,["title"])]),_:1}),d(qO,{visible:o.value,"onUpdate:visible":M[9]||(M[9]=Me=>o.value=Me),"options-conds":k.value,"edit-conds-data":S,"conds-data":c.webpConfig.conds,"cods-name":R,onHandleUpdateConds:A},null,8,["visible","options-conds","edit-conds-data","conds-data"])])):(L(),W(I,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),u3=ce(d3,[["__scopeId","data-v-01c7bf2d"]]),f3={key:2,class:"h-full overflow-y-auto"},p3=ae({name:"CharsetConfig",__name:"charset-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=B(!1),l=B({charsetConfig:{isPrior:!1,isOn:!1,charset:"",isUpper:!1,force:!1},featureIsOn:!1,webId:0}),c=fe({charsetConfig:{isPrior:!1,isOn:!1,charset:"",isUpper:!1,force:!1},featureIsOn:!1,webId:0}),f=[{value:"",label:u("page.webSet.charsetConfig.notSelected")},{value:"utf-8",label:"Universal Alphabet (UTF-8)"},{value:"unicode",label:"Unicode"},{value:"gb2312",label:"Chinese Simplified (GB2312)"},{value:"big5",label:"Chinese Traditional (Big5)"},{value:"iso-8859-1",label:"Western Alphabet"},{value:"euc-kr",label:"Korean (EUC)"},{value:"shift-jis",label:"Japanese (Shift-JIS)"},{value:"us-ascii",label:"US-ASCII"},{value:"ASMO-708",label:"Arabic (ASMO 708)"},{value:"DOS-720",label:"Arabic (DOS)"},{value:"iso-8859-6",label:"Arabic (ISO)"},{value:"x-mac-arabic",label:"Arabic (Mac)"},{value:"windows-1256",label:"Arabic (Windows)"},{value:"ibm775",label:"Baltic (DOS)"},{value:"iso-8859-4",label:"Baltic (ISO)"},{value:"windows-1257",label:"Baltic (Windows)"},{value:"ibm852",label:"Central European (DOS)"},{value:"iso-8859-2",label:"Central European (ISO)"},{value:"x-mac-ce",label:"Central European (Mac)"},{value:"windows-1250",label:"Central European (Windows)"},{value:"EUC-CN",label:"Chinese Simplified (EUC)"},{value:"hz-gb-2312",label:"Chinese Simplified (HZ)"},{value:"x-mac-chinesesimp",label:"Chinese Simplified (Mac)"},{value:"x-Chinese-CNS",label:"Chinese Traditional (CNS)"},{value:"x-Chinese-Eten",label:"Chinese Traditional (Eten)"},{value:"x-mac-chinesetrad",label:"Chinese Traditional (Mac)"},{value:"950",label:"Chinese Traditional (Mac)"},{value:"cp866",label:"Cyrillic (DOS)"},{value:"iso-8859-5",label:"Cyrillic (ISO)"},{value:"koi8-r",label:"Cyrillic (KOI8-R)"},{value:"koi8-u",label:"Cyrillic (KOI8-U)"},{value:"x-mac-cyrillic",label:"Cyrillic (Mac)"},{value:"windows-1251",label:"Cyrillic (Windows)"},{value:"x-Europa",label:"Europa"},{value:"x-IA5-German",label:"German (IA5)"},{value:"ibm737",label:"Greek (DOS)"},{value:"iso-8859-7",label:"Greek (ISO)"},{value:"x-mac-greek",label:"Greek (Mac)"},{value:"windows-1253",label:"Greek (Windows)"},{value:"ibm869",label:"Greek, Modern (DOS)"},{value:"DOS-862",label:"Hebrew (DOS)"},{value:"iso-8859-8-i",label:"Hebrew (ISO-Logical)"},{value:"iso-8859-8",label:"Hebrew (ISO-Visual)"},{value:"x-mac-hebrew",label:"Hebrew (Mac)"},{value:"windows-1255",label:"Hebrew (Windows)"},{value:"x-EBCDIC-Arabic",label:"IBM EBCDIC (Arabic)"},{value:"x-EBCDIC-CyrillicRussian",label:"IBM EBCDIC (Cyrillic Russian)"},{value:"x-EBCDIC-CyrillicSerbianBulgarian",label:"IBM EBCDIC (Cyrillic Serbian-Bulgarian)"},{value:"x-EBCDIC-DenmarkNorway",label:"IBM EBCDIC (Denmark-Norway)"},{value:"x-ebcdic-denmarknorway-euro",label:"IBM EBCDIC (Denmark-Norway-Euro)"},{value:"x-EBCDIC-FinlandSweden",label:"IBM EBCDIC (Finland-Sweden)"},{value:"x-ebcdic-finlandsweden-euro",label:"IBM EBCDIC (Finland-Sweden-Euro)"},{value:"x-ebcdic-france-euro",label:"IBM EBCDIC (France-Euro)"},{value:"x-EBCDIC-Germany",label:"IBM EBCDIC (Germany)"},{value:"x-ebcdic-germany-euro",label:"IBM EBCDIC (Germany-Euro)"},{value:"x-EBCDIC-GreekModern",label:"IBM EBCDIC (Greek Modern)"},{value:"x-EBCDIC-Greek",label:"IBM EBCDIC (Greek)"},{value:"x-EBCDIC-Hebrew",label:"IBM EBCDIC (Hebrew)"},{value:"x-EBCDIC-Icelandic",label:"IBM EBCDIC (Icelandic)"},{value:"x-ebcdic-icelandic-euro",label:"IBM EBCDIC (Icelandic-Euro)"},{value:"x-ebcdic-international-euro",label:"IBM EBCDIC (International-Euro)"},{value:"x-EBCDIC-Italy",label:"IBM EBCDIC (Italy)"},{value:"x-ebcdic-italy-euro",label:"IBM EBCDIC (Italy-Euro)"},{value:"x-EBCDIC-JapaneseAndKana",label:"IBM EBCDIC (Japanese and Japanese Katakana)"},{value:"x-EBCDIC-JapaneseAndJapaneseLatin",label:"IBM EBCDIC (Japanese and Japanese-Latin)"},{value:"x-EBCDIC-JapaneseAndUSCanada",label:"IBM EBCDIC (Japanese and US-Canada)"},{value:"x-EBCDIC-JapaneseKatakana",label:"IBM EBCDIC (Japanese katakana)"},{value:"x-EBCDIC-KoreanAndKoreanExtended",label:"IBM EBCDIC (Korean and Korean Extended)"},{value:"x-EBCDIC-KoreanExtended",label:"IBM EBCDIC (Korean Extended)"},{value:"CP870",label:"IBM EBCDIC (Multilingual Latin-2)"},{value:"x-EBCDIC-SimplifiedChinese",label:"IBM EBCDIC (Simplified Chinese)"},{value:"X-EBCDIC-Spain",label:"IBM EBCDIC (Spain)"},{value:"x-ebcdic-spain-euro",label:"IBM EBCDIC (Spain-Euro)"},{value:"x-EBCDIC-Thai",label:"IBM EBCDIC (Thai)"},{value:"x-EBCDIC-TraditionalChinese",label:"IBM EBCDIC (Traditional Chinese)"},{value:"CP1026",label:"IBM EBCDIC (Turkish Latin-5)"},{value:"x-EBCDIC-Turkish",label:"IBM EBCDIC (Turkish)"},{value:"x-EBCDIC-UK",label:"IBM EBCDIC (UK)"},{value:"x-ebcdic-uk-euro",label:"IBM EBCDIC (UK-Euro)"},{value:"ebcdic-cp-us",label:"IBM EBCDIC (US-Canada)"},{value:"x-ebcdic-cp-us-euro",label:"IBM EBCDIC (US-Canada-Euro)"},{value:"ibm861",label:"Icelandic (DOS)"},{value:"x-mac-icelandic",label:"Icelandic (Mac)"},{value:"x-iscii-as",label:"ISCII Assamese"},{value:"x-iscii-be",label:"ISCII Bengali"},{value:"x-iscii-de",label:"ISCII Devanagari"},{value:"x-iscii-gu",label:"ISCII Gujarathi"},{value:"x-iscii-ka",label:"ISCII Kannada"},{value:"x-iscii-ma",label:"ISCII Malayalam"},{value:"x-iscii-or",label:"ISCII Oriya"},{value:"x-iscii-pa",label:"ISCII Panjabi"},{value:"x-iscii-ta",label:"ISCII Tamil"},{value:"x-iscii-te",label:"ISCII Telugu"},{value:"euc-jp",label:"Japanese (EUC)"},{value:"x-euc-jp",label:"Japanese (EUC)"},{value:"iso-2022-jp",label:"Japanese (JIS)"},{value:"csISO2022JP",label:"Japanese (JIS-Allow 1 byte Kana)"}],h=async()=>{const O="/servers/server/settings/charset",{data:y,error:S}=await ht(O,{serverId:e.value});if(!S){const{featureIsOn:w=!0,charsetConfig:_,webId:$=0}=y;Object.assign(c,{featureIsOn:w,webId:$,charsetConfig:{..._??c.charsetConfig}}),l.value=Us.cloneDeep(c)}},g=async()=>{var w;a.value=!0;const O="/servers/server/settings/charset",y={webId:c.webId,charsetJSON:JSON.stringify(c.charsetConfig),charset:""},{error:S}=await Ee(y,O);S||(l.value=Us.cloneDeep(c),(w=window.$message)==null||w.success(u("common.msgSync"))),a.value=!1},v=()=>{Us.isEqual(c,l.value)||g()};return vt(()=>{h().finally(()=>{o.value=!1})}),(O,y)=>{const S=jt,w=nn,_=et,$=ve,A=ft,R=Re,k=un,x=_e,T=Xt,M=Ht,N=nt,I=ze,q=re;return o.value?(L(),W(S,{key:0})):c.featureIsOn?(L(),te("div",f3,[d(q,{vertical:""},{default:p(()=>[d(I,{title:C(u)("page.webSet.charsetConfig.title")},{default:p(()=>[d(N,{show:a.value},{default:p(()=>[d(R,null,{default:p(()=>[d($,{label:C(u)("page.webSet.charsetConfig.enable"),"label-placement":s.value},{default:p(()=>[d(_,{checked:c.charsetConfig.isOn,label:C(u)("page.webSet.charsetConfig.enableCharsetTip"),"onUpdate:checked":y[0]||(y[0]=z=>{c.charsetConfig.isOn=z,v()})},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),Zt(d($,{label:C(u)("page.webSet.charsetConfig.selectCharset"),"label-placement":s.value},{default:p(()=>[d(A,{value:c.charsetConfig.charset,options:f,style:{width:"280px"},"onUpdate:value":y[1]||(y[1]=z=>{c.charsetConfig.charset=z,v()})},null,8,["value"])]),_:1},8,["label","label-placement"]),[[zt,c.charsetConfig.isOn]])]),_:1}),Zt(d(M,{"arrow-placement":"right"},{default:p(()=>[d(T,{name:"more"},{header:p(()=>[d(k,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(x,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(R,{"label-width":"120px","label-align":"left"},{default:p(()=>[d($,{label:C(u)("page.webSet.charsetConfig.forceOverrideCharset"),"label-placement":s.value},{default:p(()=>[d(_,{checked:c.charsetConfig.force,label:C(u)("page.webSet.charsetConfig.forceOverrideCharsetTip"),"onUpdate:checked":y[2]||(y[2]=z=>{c.charsetConfig.force=z,v()})},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d($,{label:C(u)("page.webSet.charsetConfig.uppercaseCharset"),"label-placement":s.value},{default:p(()=>[d(_,{checked:c.charsetConfig.isUpper,"onUpdate:checked":[y[3]||(y[3]=z=>c.charsetConfig.isUpper=z),y[4]||(y[4]=z=>{c.charsetConfig.isUpper=z,v()})],label:C(u)("page.webSet.charsetConfig.uppercaseCharsetTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1})]),_:1},512),[[zt,c.charsetConfig.isOn]])]),_:1},8,["show"])]),_:1},8,["title"])]),_:1})])):(L(),W(w,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),h3=ce(p3,[["__scopeId","data-v-52e868a1"]]),m3=ae({name:"PerformanceConfig",__name:"performance-config",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),{activeTab:s,changeMainTab:o}=_a("cache"),a=B(null),l=B(0),c=()=>{if(a.value){const g=window.innerHeight-300;l.value=g}};return vt(()=>{c(),window.addEventListener("resize",c)}),Ca(()=>{c()}),(f,h)=>{const g=_s,v=Ss;return L(),W(v,{value:C(s),onActiveNameChange:C(o),ref_key:"tabsRef",ref:a,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:l.value+"px"}:void 0)},{default:p(()=>[d(g,{name:"base",tab:f.$t("page.webSet.cache"),"display-directive":"show:lazy"},{default:p(()=>[d(bL)]),_:1},8,["tab"]),d(g,{name:"compression",tab:f.$t("page.webSet.compression"),"display-directive":"show:lazy"},{default:p(()=>[d(HL)]),_:1},8,["tab"]),d(g,{name:"optimization",tab:f.$t("page.webSet.optimization"),"display-directive":"show:lazy"},{default:p(()=>[d(n3)]),_:1},8,["tab"]),d(g,{name:"WebP",tab:"WebP","display-directive":"show:lazy"},{default:p(()=>[d(u3)]),_:1}),d(g,{name:"charset",tab:f.$t("page.webSet.charset")},{default:p(()=>[d(h3)]),_:1},8,["tab"])]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),g3=ce(m3,[["__scopeId","data-v-efa90435"]]),v3={class:"text-xs"},b3=ae({name:"ChangePagesDrawer",__name:"change-pages-drawer",props:Be({modalData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["handleChangePage"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=t,s=i,o=J(()=>s.modalData.type==="add"?u("common.add"):u("common.edit")),a=Ze(i,"visible"),l=B(!1),c=B(""),f=B(!1),h=B(!1),g=fe({id:0,isOn:!1,status:[],newStatus:0,bodyType:"html",url:"",body:"",onlyURLPatterns:[],exceptURLPatterns:[]}),v=()=>{const x=`<!DOCTYPE html>
<html lang="en">
<head>
	<title>\${status} \${statusMessage}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<style>
		address { line-height: 1.8; }
	</style>
</head>
<body>

<h1>\${status} \${statusMessage}</h1>
<p><!-- 内容 --></p>

<address>Connection: \${remoteAddr} (Client) -&gt; \${serverAddr} (Server)</address>
<address>Request ID: \${requestId}</address>

</body>
</html>`;g.body=x},O=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),y=x=>{const{type:T,index:M,data:N}=x;T==="edit"&&M>=0&&M<g.exceptURLPatterns.length?g.exceptURLPatterns[M]={...N}:T!=="edit"&&g.exceptURLPatterns.push({...N})},S=x=>{g.exceptURLPatterns.splice(x,1)},w=x=>{const{type:T,index:M,data:N}=x;T==="edit"&&M>=0&&M<g.onlyURLPatterns.length?g.onlyURLPatterns[M]={...N}:T!=="edit"&&g.onlyURLPatterns.push({...N})},_=x=>{g.onlyURLPatterns.splice(x,1)},$=x=>{var M,N,I,q;function T(z){try{const H=new URL(z);return["http:","https:"].includes(H.protocol)&&H.hostname.includes(".")}catch{return!1}}if(c.value.length!==3){(M=window.$message)==null||M.error("请输入正确响应状态码");return}switch(x){case"html":return g.body.length===0?((N=window.$message)==null||N.error(u("page.webSet.CustomizePagesConfig.enterHtml")),!1):!0;default:return g.url.length===0?((I=window.$message)==null||I.error(u("page.webSet.CustomizePagesConfig.enterUrl")),!1):T(g.url)?!0:((q=window.$message)==null||q.error(u("page.webSet.CustomizePagesConfig.enterValidUrl")),!1)}},A=x=>{g.status=[x.toString()]},R=()=>{$(g.bodyType)&&(l.value=!0,n("handleChangePage",s.modalData.type,g))};return je(()=>a.value,x=>{x||(c.value="",Object.assign(g,js({id:0,isOn:!1,status:[],newStatus:0,bodyType:"html",url:"",body:"",onlyURLPatterns:[],exceptURLPatterns:[]})))}),je(()=>s.modalData,x=>{var T;x.type==="edit"&&(Object.assign(g,js(x.data)),c.value=((T=x.data)==null?void 0:T.status[0])??"")},{deep:!0}),e({closeIsLoading:()=>{l.value=!1}}),(x,T)=>{const M=_e,N=Ne,I=ve,q=_s,z=Ss,H=un,F=ss,V=Ut,j=Xt,se=Ht,G=nt,K=Re,de=Te,Oe=re,we=ze,pe=Pt;return L(),W(pe,{show:a.value,"onUpdate:show":T[11]||(T[11]=Se=>a.value=Se)},{default:p(()=>[d(we,{style:{width:"460px"},title:o.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:T[0]||(T[0]=()=>a.value=!1)},[d(M,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(Oe,{justify:"center"},{default:p(()=>[d(de,{type:"info",class:"px-6",disabled:l.value,onClick:R},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(de,{class:"button-default px-6",onClick:T[10]||(T[10]=()=>a.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(K,{style:{"max-height":"300px",overflow:"auto"}},{default:p(()=>[d(G,{show:l.value},{default:p(()=>[d(I,{label:C(u)("page.webSet.CustomizePagesConfig.columns.responseCode")},{default:p(()=>[d(N,{value:c.value,"onUpdate:value":T[1]||(T[1]=Se=>c.value=Se),maxlength:3,"show-button":!1,placeholder:C(u)("page.webSet.CustomizePagesConfig.statusCode"),style:{width:"90px"},onChange:T[2]||(T[2]=Se=>A(Se))},null,8,["value","placeholder"])]),_:1},8,["label"]),d(I,{label:"内容类型"},{default:p(()=>[d(z,{value:g.bodyType,"onUpdate:value":T[6]||(T[6]=Se=>g.bodyType=Se),type:"segment",animated:""},{default:p(()=>[d(q,{name:"html",tab:"HTML"},{default:p(()=>[d(I,{label:C(u)("page.webSet.CustomizePagesConfig.html")},{feedback:p(()=>[U("span",v3,[U("span",{class:"cursor-pointer text-[#36C677]",onClick:v},Q(C(u)("page.webSet.CustomizePagesConfig.useTemplate")),1),X(" 。"+Q(C(u)("page.webSet.CustomizePagesConfig.htmlTip")),1)])]),default:p(()=>[d(N,{value:g.body,"onUpdate:value":T[3]||(T[3]=Se=>g.body=Se),type:"textarea",placeholder:""},null,8,["value"])]),_:1},8,["label"])]),_:1}),d(q,{name:"url",tab:C(u)("page.webSet.CustomizePagesConfig.readUrl")},{default:p(()=>[d(I,{label:C(u)("page.webSet.CustomizePagesConfig.displayUrl")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.readUrlContent")),1)]),default:p(()=>[d(N,{value:g.url,"onUpdate:value":T[4]||(T[4]=Se=>g.url=Se),placeholder:C(u)("page.webSet.CustomizePagesConfig.readUrlTip")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["tab"]),d(q,{name:"redirectURL",tab:C(u)("page.webSet.CustomizePagesConfig.redirectUrl")},{default:p(()=>[d(I,{label:C(u)("page.webSet.CustomizePagesConfig.redirectTo")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.redirectUrlContent")),1)]),default:p(()=>[d(N,{value:g.url,"onUpdate:value":T[5]||(T[5]=Se=>g.url=Se),placeholder:C(u)("page.webSet.CustomizePagesConfig.redirectUrlTip")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["tab"])]),_:1},8,["value"])]),_:1}),d(se,{"arrow-placement":"right"},{default:p(()=>[d(j,{name:"more"},{header:p(()=>[d(H,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(M,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(I,{label:C(u)("page.webSet.compressionConfig.excludedURLs")},{default:p(()=>[d(F,{visible:f.value,"onUpdate:visible":T[7]||(T[7]=Se=>f.value=Se),options:O.value,"url-patterns":g.exceptURLPatterns,onDelete:S,onUpdate:y},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(I,{label:C(u)("page.webSet.compressionConfig.limitedURLs")},{default:p(()=>[d(F,{visible:h.value,"onUpdate:visible":T[8]||(T[8]=Se=>h.value=Se),options:O.value,"url-patterns":g.onlyURLPatterns,onDelete:_,onUpdate:w},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(I,{label:C(u)("page.webSet.CustomizePagesConfig.statusCodeNew")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.statusCodeTip")),1)]),default:p(()=>[d(V,{value:g.newStatus,"onUpdate:value":T[9]||(T[9]=Se=>g.newStatus=Se),maxlength:3,placeholder:C(u)("page.webSet.CustomizePagesConfig.statusCode"),"show-button":!1,style:{width:"90px"}},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["show"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),O3=ce(b3,[["__scopeId","data-v-41fa5925"]]),C3={key:2,class:"h-full overflow-y-auto"},y3={class:"text-xs"},S3=ae({name:"CustomizePages",__name:"customize-pages",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),s=qe("serverId",B("0")),o=B(),a=B(!1),l=B(!1),c=B(!0),f=fe({pages:[],shutdownConfig:{isPrior:!1,isOn:!1,bodyType:"html",url:"",body:"",status:0},enableGlobalPages:!1,featureIsOn:!1,webId:0}),h=fe({type:"add",data:null}),g=()=>{h.type="add",l.value=!0},v=I=>{h.type="edit",h.data={...I,exceptURLPatterns:I.exceptURLPatterns??[],onlyURLPatterns:I.onlyURLPatterns??[]},l.value=!0},O=async I=>{var H;a.value=!0;const q=f.pages.findIndex(F=>F.id===I.id);f.pages.splice(q,1);const{error:z}=await M();z||(H=window.$message)==null||H.success(u("common.msgSync")),a.value=!1},y=J(()=>[{title:u("page.webSet.CustomizePagesConfig.columns.responseCode"),key:"status",render:I=>{const q=I.status;return d(Ce,null,[q.map((z,H)=>d("span",{key:H},[z]))])}},{title:u("page.webSet.CustomizePagesConfig.columns.pageType"),key:"bodyType",render:I=>d(re,{vertical:!0},{default:()=>[d("div",null,[I.url]),d("div",null,[I.bodyType])]})},{title:u("page.webSet.CustomizePagesConfig.columns.newCode"),key:"newStatus",render:I=>I.newStatus===0?u("page.webSet.CustomizePagesConfig.keep"):I.newStatus},{title:u("page.webSet.CustomizePagesConfig.columns.exceptionUrl"),key:"exceptURLPatterns",render:I=>{const q=I.exceptURLPatterns;return d(Ce,null,[q==null?void 0:q.map((z,H)=>d("span",{class:"border px-2 rounded-xl",key:H},[`${z.type}/${z.pattern}`]))])}},{title:u("page.webSet.CustomizePagesConfig.columns.limitUrl"),key:"onlyURLPatterns",render:I=>{const q=I.onlyURLPatterns;return d(Ce,null,[q==null?void 0:q.map((z,H)=>d("span",{class:"border px-2 rounded-xl",key:H},[`${z.type}/${z.pattern}`]))])}},{title:u("page.webSet.securityConfig.fiveShield.actions"),key:"actions",align:"center",render:I=>d(re,{justify:"center"},{default:()=>[d("span",{onClick:()=>v(I)},[u("common.modify")]),d("span",{onClick:()=>O(I)},[u("common.delete")])]})}]),S=async()=>{const I="/servers/server/settings/pages",{data:q,error:z}=await ht(I,{serverId:s.value});if(!z){const{featureIsOn:H=!1,enableGlobalPages:F=!1,pages:V=[],shutdownConfig:j={isPrior:!1,isOn:!1,bodyType:"html",url:"",body:"",status:0},webId:se=0}=q;Object.assign(f,{pages:V??[],shutdownConfig:j??f.shutdownConfig,enableGlobalPages:F,featureIsOn:H,webId:se})}},w=async I=>{var j;const{id:q,isOn:z,...H}=I,{data:F,error:V}=await Ee({pageId:q,exceptURLPatternsJSON:JSON.stringify(H.exceptURLPatterns),onlyURLPatternsJSON:JSON.stringify(H.onlyURLPatterns),status:H.status,body:H.body,bodyType:H.bodyType,url:H.url,newStatus:H.newStatus},"/servers/server/settings/pages/updatePopup");if(!V){const{data:se,error:G}=await M();G||(j=window.$message)==null||j.success(u("common.msgSync"))}},_=async I=>{var j;const{id:q,isOn:z,...H}=I,{data:F,error:V}=await Ee({exceptURLPatternsJSON:JSON.stringify(H.exceptURLPatterns),onlyURLPatternsJSON:JSON.stringify(H.onlyURLPatterns),status:H.status,body:H.body,bodyType:H.bodyType,url:H.url,newStatus:H.newStatus},"/servers/server/settings/pages/createPopup");if(!V){f.pages.push({...F.page});const{data:se,error:G}=await M();G||(j=window.$message)==null||j.success(u("common.msgSync"))}},$=async(I,q)=>{if(I==="edit"){const z=f.pages.findIndex(H=>H.id===q.id);z!==-1&&(f.pages[z]={...q}),await w(q)}else await _(q)},A=I=>{var z,H,F;if(!f.shutdownConfig.isOn)return!0;function q(V){try{const j=new URL(V);return["http:","https:"].includes(j.protocol)&&j.hostname.includes(".")}catch{return!1}}switch(I){case"html":return f.shutdownConfig.body.length===0?((z=window.$message)==null||z.error(u("page.webSet.CustomizePagesConfig.enterHtml")),!1):!0;default:return f.shutdownConfig.url.length===0?((H=window.$message)==null||H.error(u("page.webSet.CustomizePagesConfig.enterUrl")),!1):q(f.shutdownConfig.url)?!0:((F=window.$message)==null||F.error(u("page.webSet.CustomizePagesConfig.enterValidUrl")),!1)}},R=B(!1),k=B(!1),x=(I,q)=>{function z(){R.value=q}function H(){k.value=q}({shutdown:z,other:H})[I]()},T=async I=>{var z;if(!A(f.shutdownConfig.bodyType))return;x(I,!0);const{error:q}=await M();q||(z=window.$message)==null||z.success(u("common.msgSync")),x(I,!1)},M=async()=>{const{data:I,error:q}=await Ee({webId:f.webId,pagesJSON:JSON.stringify(f.pages),shutdownJSON:JSON.stringify(f.shutdownConfig),body:"",shutdownStatus:"",enableGlobalPages:f.enableGlobalPages?1:0},"/servers/server/settings/pages");return o.value.closeIsLoading(),l.value=!1,{data:I,error:q}},N=()=>{const I=`<!DOCTYPE html>
<html lang="en">
<head>
	<title>\${status} \${statusMessage}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<style>
		address { line-height: 1.8; }
	</style>
</head>
<body>

<h1>\${status} \${statusMessage}</h1>
<p><!-- 内容 --></p>

<address>Connection: \${remoteAddr} (Client) -&gt; \${serverAddr} (Server)</address>
<address>Request ID: \${requestId}</address>

</body>
</html>`;f.shutdownConfig.body=I};return vt(()=>{S().finally(()=>{c.value=!1})}),(I,q)=>{const z=jt,H=nn,F=et,V=ve,j=Ne,se=_s,G=Ss,K=Ut,de=Te,Oe=nt,we=ze,pe=ws;return c.value?(L(),W(z,{key:0})):f.featureIsOn?(L(),te("div",C3,[d(C(re),{vertical:""},{default:p(()=>[d(we,{title:C(u)("page.webSet.CustomizePagesConfig.shutdown")},{default:p(()=>[d(Oe,{show:R.value},{default:p(()=>[d(V,{label:C(u)("page.webSet.CustomizePagesConfig.enableShutdown"),"label-placement":n.value},{default:p(()=>[d(F,{checked:f.shutdownConfig.isOn,label:C(u)("page.webSet.CustomizePagesConfig.shutdownTip"),onChange:q[0]||(q[0]=Se=>{f.shutdownConfig.isOn=Se,Se||T("shutdown")})},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),f.shutdownConfig.isOn?(L(),te(Ce,{key:0},[d(G,{value:f.shutdownConfig.bodyType,"onUpdate:value":q[4]||(q[4]=Se=>f.shutdownConfig.bodyType=Se),animated:""},{default:p(()=>[d(se,{name:"html",tab:"HTML"},{default:p(()=>[d(V,{label:C(u)("page.webSet.CustomizePagesConfig.html"),class:"mt-4"},{feedback:p(()=>[U("span",y3,[U("span",{class:"cursor-pointer text-[#36C677]",onClick:N},Q(C(u)("page.webSet.CustomizePagesConfig.useTemplate")),1),X(" 。"+Q(C(u)("page.webSet.CustomizePagesConfig.htmlTip")),1)])]),default:p(()=>[d(j,{value:f.shutdownConfig.body,"onUpdate:value":q[1]||(q[1]=Se=>f.shutdownConfig.body=Se),type:"textarea",placeholder:""},null,8,["value"])]),_:1},8,["label"])]),_:1}),d(se,{name:"url",tab:C(u)("page.webSet.CustomizePagesConfig.readUrl")},{default:p(()=>[d(V,{label:C(u)("page.webSet.CustomizePagesConfig.displayUrl"),class:"mt-4"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.readUrlContent")),1)]),default:p(()=>[d(j,{value:f.shutdownConfig.url,"onUpdate:value":q[2]||(q[2]=Se=>f.shutdownConfig.url=Se),placeholder:C(u)("page.webSet.CustomizePagesConfig.readUrlTip")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["tab"]),d(se,{name:"redirectURL",tab:C(u)("page.webSet.CustomizePagesConfig.redirectUrl")},{default:p(()=>[d(V,{label:C(u)("page.webSet.CustomizePagesConfig.redirectTo"),class:"mt-4"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.redirectUrlContent")),1)]),default:p(()=>[d(j,{value:f.shutdownConfig.url,"onUpdate:value":q[3]||(q[3]=Se=>f.shutdownConfig.url=Se),placeholder:C(u)("page.webSet.CustomizePagesConfig.redirectUrlTip")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["tab"])]),_:1},8,["value"]),d(V,{label:C(u)("page.webSet.CustomizePagesConfig.statusCodeNew"),"label-placement":n.value,class:"mt-4"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.CustomizePagesConfig.statusCodeTip")),1)]),default:p(()=>[d(K,{value:f.shutdownConfig.status,"onUpdate:value":q[5]||(q[5]=Se=>f.shutdownConfig.status=Se),maxlength:3,placeholder:C(u)("page.webSet.CustomizePagesConfig.statusCode"),"show-button":!1,style:{width:"90px"}},null,8,["value","placeholder"])]),_:1},8,["label","label-placement"]),d(C(re),null,{default:p(()=>[d(de,{type:"info",onClick:q[6]||(q[6]=Se=>T("shutdown"))},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})],64)):Xe("",!0)]),_:1},8,["show"])]),_:1},8,["title"]),d(we,{title:C(u)("page.webSet.CustomizePagesConfig.customPage")},{default:p(()=>[d(C(re),{class:"mb-2"},{default:p(()=>[d(de,{type:"info",onClick:g},{default:p(()=>[X(Q(C(u)("page.webSet.CustomizePagesConfig.addCustomPage")),1)]),_:1})]),_:1}),d(pe,{loading:a.value,columns:y.value,data:f.pages,pagination:{pageSize:10},size:"small","row-key":Se=>Se.index,"scroll-x":"max-content",class:"min-h-[280px] w-full text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["loading","columns","data","row-key"])]),_:1},8,["title"]),d(we,{title:C(u)("page.webSet.CustomizePagesConfig.otherSettings")},{default:p(()=>[d(Oe,{show:k.value},{default:p(()=>[d(V,{label:C(u)("page.webSet.CustomizePagesConfig.enableSystemCustomPage"),"label-placement":n.value},{default:p(()=>[d(F,{checked:f.enableGlobalPages,label:C(u)("page.webSet.CustomizePagesConfig.enableSystemCustomPageTip"),onChange:q[7]||(q[7]=Se=>{f.enableGlobalPages=Se,T("other")})},null,8,["checked","label"])]),_:1},8,["label","label-placement"])]),_:1},8,["show"])]),_:1},8,["title"])]),_:1}),d(O3,{ref_key:"childRef",ref:o,visible:l.value,"onUpdate:visible":q[8]||(q[8]=Se=>l.value=Se),"modal-data":h,onHandleChangePage:$},null,8,["visible","modal-data"])])):(L(),W(H,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),_3=ce(S3,[["__scopeId","data-v-47dbf632"]]),w3={class:"text-xs"},k3={class:"text-xs"},x3={class:"text-xs"},P3=ae({name:"HeadersDrawer",__name:"headers-drawer",props:Be({id:{},type:{},editData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(i){const e=B(!1),t=qe("getData"),n=Ze(i,"visible"),s=i,o=J(()=>s.editData.type==="add"?u("page.webSet.headersConfig.createCustom"):u("page.webSet.headersConfig.editCustom")),a=fe({id:0,isOn:!0,name:"",value:"",status:{always:!0,codes:[]},disableRedirect:!1,shouldAppend:!1,shouldReplace:!1,replaceValues:[],methods:[],domains:[]}),l=async()=>{var O;if(a.name.trim()===""){(O=window.$message)==null||O.warning("请输入报头名称!");return}e.value=!0;const h="/servers/server/settings/headers/updateSetPopup",g={headerPolicyId:s.id,headerId:a.id,type:s.type,name:a.name,value:a.value,statusListJSON:JSON.stringify(a.status.codes.map(Number)),methodsJSON:JSON.stringify(a.methods),domainsJSON:JSON.stringify(a.domains),disableRedirect:1,replaceValuesJSON:JSON.stringify(a.replaceValues)},{error:v}=await Ee(g,h);!v&&t&&t(),e.value=!1,n.value=!1},c=async()=>{var O;if(a.name.trim()===""){(O=window.$message)==null||O.warning("请输入报头名称!");return}e.value=!0;const h="/servers/server/settings/headers/createSetPopup",g={headerPolicyId:s.id,type:s.type,name:a.name,value:a.value,statusListJSON:JSON.stringify(a.status.codes.map(Number)),methodsJSON:JSON.stringify(a.methods),domainsJSON:JSON.stringify(a.domains),replaceValuesJSON:JSON.stringify(a.replaceValues)},{error:v}=await Ee(g,h);!v&&t&&t(),e.value=!1,n.value=!1},f=()=>{if(s.editData.type==="edit"){l();return}c()};return vt(()=>{Array.isArray(a.status.codes)||(a.status.codes=[])}),je(()=>s.editData,h=>{Object.assign(a,h.editData)},{deep:!0}),(h,g)=>{const v=_e,O=Ne,y=ve,S=un,w=Wt,_=et,$=Re,A=Xt,R=Ht,k=nt,x=Te,T=re,M=ze,N=Pt;return L(),W(N,{show:n.value,"onUpdate:show":g[11]||(g[11]=I=>n.value=I)},{default:p(()=>[d(M,{style:{width:"460px"},title:o.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:g[0]||(g[0]=()=>n.value=!1)},[d(v,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(T,{justify:"center"},{default:p(()=>[d(x,{loading:e.value,type:"info",class:"px-6",onClick:g[9]||(g[9]=()=>f())},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["loading"]),d(x,{class:"button-default px-6",onClick:g[10]||(g[10]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(k,{show:e.value},{default:p(()=>[d($,{class:"space-y-sm",style:{"max-height":"280px","overflow-y":"auto"}},{default:p(()=>[d(y,{label:C(u)("page.webSet.headersConfig.headerName")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.headersConfig.headerNameTip")),1)]),default:p(()=>[d(O,{value:a.name,"onUpdate:value":g[1]||(g[1]=I=>a.name=I),placeholder:C(u)("page.webSet.headersConfig.headerNameExample")},null,8,["value","placeholder"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.headerValue")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.headersConfig.headerValueTip")),1)]),default:p(()=>[d(O,{value:a.value,"onUpdate:value":g[2]||(g[2]=I=>a.value=I)},null,8,["value"])]),_:1},8,["label"]),d(R,{"arrow-placement":"right"},{default:p(()=>[d(A,{name:"more"},{header:p(()=>[d(S,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(v,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d($,{class:"space-y-sm"},{default:p(()=>[d(y,{label:C(u)("page.webSet.headersConfig.supportedCodes")},{feedback:p(()=>[U("span",w3,Q(C(u)("page.webSet.headersConfig.supportedCodesTip")),1)]),default:p(()=>[d(w,{value:a.status.codes,"onUpdate:value":g[3]||(g[3]=I=>a.status.codes=I)},null,8,["value"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.supportedMethods")},{feedback:p(()=>[U("span",k3,Q(C(u)("page.webSet.headersConfig.supportedMethodsTip")),1)]),default:p(()=>[d(w,{value:a.methods,"onUpdate:value":g[4]||(g[4]=I=>a.methods=I)},null,8,["value"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.supportedDomains")},{feedback:p(()=>[U("span",x3,Q(C(u)("page.webSet.headersConfig.supportedDomainsTip")),1)]),default:p(()=>[d(w,{value:a.domains,"onUpdate:value":g[5]||(g[5]=I=>a.domains=I)},null,8,["value"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.appendOnly")},{default:p(()=>[d(_,{checked:a.shouldAppend,"onUpdate:checked":g[6]||(g[6]=I=>a.shouldAppend=I),label:C(u)("page.webSet.headersConfig.appendOnlyTip")},null,8,["checked","label"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.disableOnRedirect")},{default:p(()=>[d(_,{checked:a.disableRedirect,"onUpdate:checked":g[7]||(g[7]=I=>a.disableRedirect=I),label:C(u)("page.webSet.headersConfig.disableOnRedirectTip")},null,8,["checked","label"])]),_:1},8,["label"]),d(y,{label:C(u)("page.webSet.headersConfig.enableReplace")},{default:p(()=>[d(_,{checked:a.shouldReplace,"onUpdate:checked":g[8]||(g[8]=I=>a.shouldReplace=I),label:C(u)("page.webSet.headersConfig.enableReplaceTip")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),EO=ce(P3,[["__scopeId","data-v-bb442010"]]),$3=["onClick"],T3=ae({name:"DynamicTags",__name:"dynamic-tags",props:{value:{default:()=>[]},valueModifiers:{}},emits:Be(["create","delete"],["update:value"]),setup(i,{emit:e}){const t=B(!1),n=B(""),s=Ze(i,"value"),o=e,a=()=>{n.value.trim()&&(s.value=[...s.value,n.value],o("create",n.value),t.value=!1,n.value="")},l=c=>{const f=s.value[c];s.value.splice(c,1),o("delete",f)};return(c,f)=>{const h=_e,g=re,v=Te,O=Ne,y=ve,S=Re,w=ze,_=Pt;return L(),te(Ce,null,[d(g,{vertical:"",class:"space-y-sm",size:"small"},{default:p(()=>[s.value.length!==0?(L(),W(g,{key:0,size:"small"},{default:p(()=>[(L(!0),te(Ce,null,Ot(s.value,($,A)=>(L(),te("div",{key:A,class:"flex items-center gap-2 border rounded-xl px-3"},[X(Q($)+" ",1),U("div",{class:"cursor-pointer",onClick:R=>l(A)},[d(h,{"local-icon":"material-symbols--close-rounded"})],8,$3)]))),128))]),_:1})):Xe("",!0),d(v,{size:"small",onClick:f[0]||(f[0]=()=>t.value=!0)},{default:p(()=>f[4]||(f[4]=[X("+")])),_:1})]),_:1}),d(_,{show:t.value,"onUpdate:show":f[3]||(f[3]=$=>t.value=$)},{default:p(()=>[d(w,{style:{width:"460px"},title:c.$t("page.webSet.headersConfig.createCustom"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:f[1]||(f[1]=()=>t.value=!1)},[d(h,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(g,null,{default:p(()=>[d(v,{onClick:a},{default:p(()=>[X(Q(c.$t("common.save")),1)]),_:1})]),_:1})]),default:p(()=>[d(S,null,{default:p(()=>[d(y,{label:c.$t("page.webSet.headersConfig.headerName")},{feedback:p(()=>[U("span",null,Q(c.$t("page.webSet.headersConfig.headerNameTip")),1)]),default:p(()=>[d(O,{value:n.value,"onUpdate:value":f[2]||(f[2]=$=>n.value=$)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])],64)}}}),wc=ce(T3,[["__scopeId","data-v-88af59dd"]]),R3={class:"text-xs"},I3={class:"text-xs"},Q3=ae({name:"RequestPage",__name:"request-page",props:{config:{}},setup(i){const e=B(!1),t=B(!1),n=qe("getData"),s=fe({editData:{id:0,isOn:!1,name:"",value:"",status:{always:!0,codes:[]},disableRedirect:!1,shouldAppend:!1,shouldReplace:!1,replaceValues:[],methods:[],domains:[]},type:"add"}),o=wt(),a=J(()=>o.isMobile),l=J(()=>a.value?"top":"left"),c=i,f=B(!1),h=fe(tt(c.config)),g=()=>{s.type="add",s.editData={id:0,isOn:!0,name:"",value:"",status:{always:!1,codes:[]},disableRedirect:!1,shouldAppend:!1,shouldReplace:!1,replaceValues:[],methods:[],domains:[]},f.value=!0},v=async A=>{var x,T;e.value=!0;const R=(T=(x=h.requestHeaderPolicy)==null?void 0:x.setHeaders)==null?void 0:T.findIndex(M=>M.id===A.id);if(R===void 0||R<0)return;const{error:k}=await Ee({headerPolicyId:h.requestHeaderPolicy.id,type:"setHeader",headerId:A.id},"/servers/server/settings/headers/delete");!k&&n&&await n(),e.value=!1},O=A=>{const R=A.status.codes===null?[]:A.status.codes.map(String);s.type="edit",s.editData={...A,status:{always:!0,codes:R}},f.value=!0},y=J(()=>[{title:u("page.webSet.headersConfig.name"),key:"name"},{title:u("page.webSet.headersConfig.value"),key:"value"},{title:u("page.webSet.cacheConfig.action"),key:"actions",width:120,align:"center",render:A=>d(re,null,{default:()=>[d("div",{class:"cursor-pointer",onClick:()=>O(A)},[u("common.modify")]),d("div",{class:"cursor-pointer",onClick:()=>v(A)},[u("common.delete")])]})}]);je(()=>c.config,A=>{A&&Object.assign(h,tt({...A,requestHeaderPolicy:{...A.requestHeaderPolicy,deleteHeaders:A.requestHeaderPolicy.deleteHeaders??[],nonStandardHeaders:A.requestHeaderPolicy.nonStandardHeaders??[]}}))},{deep:!0,immediate:!0});const S=async A=>{t.value=!0;const R="/servers/server/settings/headers/deleteDeletingHeader",{error:k}=await Ee({headerPolicyId:h.requestHeaderRef.headerPolicyId,headerName:A},R);!k&&n&&await n(),t.value=!1},w=async A=>{t.value=!0;const R="/servers/server/settings/headers/createDeletePopup",{error:k}=await Ee({headerPolicyId:h.requestHeaderRef.headerPolicyId,name:A},R);!k&&n&&await n(),t.value=!1},_=async A=>{t.value=!0;const R="/servers/server/settings/headers/deleteNonStandardHeader",{error:k}=await Ee({headerPolicyId:h.requestHeaderRef.headerPolicyId,headerName:A},R);!k&&n&&await n(),t.value=!1},$=async A=>{t.value=!0;const R="/servers/server/settings/headers/createNonStandardPopup",{error:k}=await Ee({headerPolicyId:h.requestHeaderRef.headerPolicyId,name:A},R);!k&&n&&await n(),t.value=!1};return(A,R)=>{const k=Te,x=ao,T=ws,M=ze,N=ve,I=Re,q=nt;return L(),te(Ce,null,[d(C(re),{vertical:""},{default:p(()=>[d(M,{title:C(u)("page.webSet.headersConfig.setHeader")},{default:p(()=>[d(C(re),{class:"mb-2"},{default:p(()=>[d(k,{type:"info",onClick:R[0]||(R[0]=()=>g())},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.addHeader")),1)]),_:1})]),_:1}),h.requestHeaderPolicy.setHeaders?(L(),W(T,{key:1,loading:e.value,columns:y.value,pagination:{pageSize:10},data:c.config.requestHeaderPolicy.setHeaders??[],size:"small","row-key":z=>z.index,class:"min-h-[280px] w-full text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["loading","columns","data","row-key"])):(L(),W(x,{key:0,type:"info",class:"mt-4"},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.noHeader")),1)]),_:1})),d(x,{type:"warning",class:"mt-4"},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.overrideHeaderTip")),1)]),_:1})]),_:1},8,["title"]),d(M,{title:C(u)("page.webSet.headersConfig.otherHeaderSettings")},{default:p(()=>[d(q,{show:t.value},{default:p(()=>[d(I,{class:"space-y-sm"},{default:p(()=>[d(N,{label:C(u)("page.webSet.headersConfig.delHeader"),"label-placement":l.value},{feedback:p(()=>[U("span",R3,Q(C(u)("page.webSet.headersConfig.headerNameTip")),1)]),default:p(()=>[d(wc,{value:h.requestHeaderPolicy.deleteHeaders,"onUpdate:value":R[1]||(R[1]=z=>h.requestHeaderPolicy.deleteHeaders=z),onDelete:S,onCreate:w},null,8,["value"])]),_:1},8,["label","label-placement"]),d(N,{label:C(u)("page.webSet.headersConfig.nonStandardHeader"),"label-placement":l.value},{feedback:p(()=>[U("span",I3,Q(C(u)("page.webSet.headersConfig.nonStandardHeaderExample")),1)]),default:p(()=>[d(wc,{value:h.requestHeaderPolicy.nonStandardHeaders,"onUpdate:value":R[2]||(R[2]=z=>h.requestHeaderPolicy.nonStandardHeaders=z),onDelete:_,onCreate:$},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1}),d(EO,{id:c.config.requestHeaderPolicy.id,visible:f.value,"onUpdate:visible":R[3]||(R[3]=z=>f.value=z),type:"request","edit-data":s},null,8,["id","visible","edit-data"])],64)}}}),A3=ce(Q3,[["__scopeId","data-v-f69228d2"]]),N3=ae({name:"CorsDrawer",__name:"cors-drawer",props:Be({cors:{},headerPolicyId:{}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(i){const e=B(!1),t=i,n=qe("getData"),s=fe({isOn:!1,allowMethods:[],allowOrigin:"",allowCredentials:!1,exposeHeaders:[],maxAge:0,requestHeaders:[],requestMethod:"",optionsMethodOnly:!1}),o=Ze(i,"visible"),a=async()=>{e.value=!0;const l=await Kt(),{error:c}=await Ee({csrfToken:l,headerPolicyId:t.headerPolicyId,corsJSON:JSON.stringify(s),methodsJSON:JSON.stringify(s.allowMethods)},"/servers/server/settings/headers/updateCORSPopup");!c&&n&&await n(),e.value=!1,o.value=!1};return je(()=>t.cors,l=>{l&&Object.assign(s,js(l))},{deep:!0,immediate:!0}),(l,c)=>{const f=_e,h=et,g=ve,v=un,O=Wt,y=Ut,S=Ai,w=tn,_=Ne,$=Re,A=Xt,R=Ht,k=nt,x=Te,T=re,M=ze,N=Pt;return L(),W(N,{show:o.value,"onUpdate:show":c[10]||(c[10]=I=>o.value=I)},{default:p(()=>[d(M,{style:{width:"460px"},title:l.$t("page.webSet.headersConfig.editCORS"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:c[0]||(c[0]=()=>o.value=!1)},[d(f,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(k,{show:e.value},{default:p(()=>[d($,{style:{"max-height":"280px","overflow-y":"auto"},class:"px-1"},{default:p(()=>[d(g,{label:l.$t("page.webSet.headersConfig.enableCORS")},{default:p(()=>[d(h,{checked:s.isOn,"onUpdate:checked":c[1]||(c[1]=I=>s.isOn=I),label:l.$t("page.webSet.headersConfig.enableCORSTip")},null,8,["checked","label"])]),_:1},8,["label"]),d(R,{"arrow-placement":"right"},{default:p(()=>[d(A,{name:"more"},{header:p(()=>[d(v,null,{default:p(()=>[X(Q(l.$t("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(f,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d($,{class:"space-y-sm"},{default:p(()=>[d(g,{label:l.$t("page.webSet.headersConfig.allowMethods")},{feedback:p(()=>[U("span",null,[U("span",{class:"cursor-pointer text-[#36C677]",onClick:c[3]||(c[3]=()=>{s.allowMethods=["PUT","GET","POST","DELETE","HEAD","OPTIONS","PATCH"]})},Q(l.$t("page.webSet.headersConfig.addDefault")),1),X(" "+Q(l.$t("page.webSet.headersConfig.allowMethodsTip")),1)])]),default:p(()=>[d(O,{value:s.allowMethods,"onUpdate:value":c[2]||(c[2]=I=>s.allowMethods=I)},null,8,["value"])]),_:1},8,["label"]),d(g,{label:l.$t("page.webSet.headersConfig.maxAge")},{feedback:p(()=>[U("span",null,Q(l.$t("page.webSet.headersConfig.maxAgeTip")),1)]),default:p(()=>[d(w,null,{default:p(()=>[d(y,{value:s.maxAge,"onUpdate:value":c[4]||(c[4]=I=>s.maxAge=I),style:{width:"33%"},"show-button":!1},null,8,["value"]),d(S,null,{default:p(()=>c[11]||(c[11]=[X("秒")])),_:1})]),_:1})]),_:1},8,["label"]),d(g,{label:l.$t("page.webSet.headersConfig.exposeHeaders")},{feedback:p(()=>[U("span",null,Q(l.$t("page.webSet.headersConfig.exposeHeadersTip")),1)]),default:p(()=>[d(O,{value:s.requestHeaders,"onUpdate:value":c[5]||(c[5]=I=>s.requestHeaders=I)},null,8,["value"])]),_:1},8,["label"]),d(g,{label:l.$t("page.webSet.headersConfig.requestMethod")},{feedback:p(()=>[U("span",null,Q(l.$t("page.webSet.headersConfig.requestMethodTip")),1)]),default:p(()=>[d(_,{value:s.requestMethod,"onUpdate:value":c[6]||(c[6]=I=>s.requestMethod=I)},null,8,["value"])]),_:1},8,["label"]),d(g,{label:l.$t("page.webSet.headersConfig.optionsOnly")},{default:p(()=>[d(h,{checked:s.optionsMethodOnly,"onUpdate:checked":c[7]||(c[7]=I=>s.optionsMethodOnly=I),label:l.$t("page.webSet.headersConfig.optionsOnlyTip")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"]),d(T,{justify:"center",class:"mt-4"},{default:p(()=>[d(x,{disabled:e.value,type:"info",class:"px-6",onClick:c[8]||(c[8]=()=>a())},{default:p(()=>[X(Q(l.$t("common.save")),1)]),_:1},8,["disabled"]),d(x,{class:"button-default px-6",onClick:c[9]||(c[9]=()=>o.value=!1)},{default:p(()=>[X(Q(l.$t("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["show"])}}}),M3=ce(N3,[["__scopeId","data-v-215832d0"]]),L3={class:"text-xs"},U3={class:"text-xs"},D3={class:"flex items-center gap-2"},q3={key:0},E3={key:1},B3=ae({name:"ResponsePage",__name:"response-page",props:{config:{}},setup(i){const e=B(!1),t=B(!1),n=qe("getData"),s=fe({editData:{id:0,isOn:!1,name:"",value:"",status:{always:!0,codes:[]},disableRedirect:!1,shouldAppend:!1,shouldReplace:!1,replaceValues:[],methods:[],domains:[]},type:"add"}),o=wt(),a=J(()=>o.isMobile),l=J(()=>a.value?"top":"left"),c=i,f=B(!1),h=B(!1),g=fe(tt(c.config)),v=()=>{s.type="add",s.editData={id:0,isOn:!0,name:"",value:"",status:{always:!1,codes:[]},disableRedirect:!1,shouldAppend:!1,shouldReplace:!1,replaceValues:[],methods:[],domains:[]},f.value=!0},O=async R=>{var T,M;e.value=!0;const k=(M=(T=g.responseHeaderPolicy)==null?void 0:T.setHeaders)==null?void 0:M.findIndex(N=>N.id===R.id);if(k===void 0||k<0)return;const{error:x}=await Ee({headerPolicyId:g.responseHeaderPolicy.id,type:"setHeader",headerId:R.id},"/servers/server/settings/headers/delete");!x&&n&&await n(),e.value=!1},y=R=>{const k=R.status.codes===null?[]:R.status.codes.map(String);s.type="edit",s.editData={...R,status:{always:!0,codes:k}},f.value=!0},S=J(()=>[{title:u("page.webSet.headersConfig.name"),key:"name"},{title:u("page.webSet.headersConfig.value"),key:"value"},{title:u("page.webSet.cacheConfig.action"),key:"actions",width:120,align:"center",render:R=>d(re,null,{default:()=>[d("div",{class:"cursor-pointer",onClick:()=>y(R)},[u("common.modify")]),d("div",{class:"cursor-pointer",onClick:()=>O(R)},[u("common.delete")])]})}]);je(()=>c.config,R=>{R&&Object.assign(g,tt({...R,responseHeaderPolicy:{...R.responseHeaderPolicy,deleteHeaders:R.responseHeaderPolicy.deleteHeaders??[],nonStandardHeaders:R.responseHeaderPolicy.nonStandardHeaders??[]}}))},{deep:!0,immediate:!0});const w=async R=>{t.value=!0;const k="/servers/server/settings/headers/deleteDeletingHeader",{error:x}=await Ee({headerPolicyId:g.responseHeaderRef.headerPolicyId,headerName:R},k);!x&&n&&await n(),t.value=!1},_=async R=>{t.value=!0;const k="/servers/server/settings/headers/createDeletePopup",{error:x}=await Ee({headerPolicyId:g.responseHeaderRef.headerPolicyId,name:R},k);!x&&n&&await n(),t.value=!1},$=async R=>{t.value=!0;const k="/servers/server/settings/headers/deleteNonStandardHeader",{error:x}=await Ee({headerPolicyId:g.responseHeaderRef.headerPolicyId,headerName:R},k);!x&&n&&await n(),t.value=!1},A=async R=>{t.value=!0;const k="/servers/server/settings/headers/createNonStandardPopup",{error:x}=await Ee({headerPolicyId:g.responseHeaderRef.headerPolicyId,name:R},k);!x&&n&&await n(),t.value=!1};return(R,k)=>{const x=Te,T=ao,M=ws,N=ze,I=ve,q=Re,z=nt;return L(),te(Ce,null,[d(C(re),{vertical:""},{default:p(()=>[d(N,{title:C(u)("page.webSet.headersConfig.setResHeader")},{default:p(()=>[d(C(re),{class:"mb-2"},{default:p(()=>[d(x,{type:"info",onClick:k[0]||(k[0]=()=>v())},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.addHeader")),1)]),_:1})]),_:1}),g.responseHeaderPolicy.setHeaders?(L(),W(M,{key:1,loading:e.value,columns:S.value,pagination:{pageSize:10},data:c.config.responseHeaderPolicy.setHeaders??[],size:"small","row-key":H=>H.index,class:"min-h-[280px] w-full text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["loading","columns","data","row-key"])):(L(),W(T,{key:0,type:"info",class:"mt-4"},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.noHeader")),1)]),_:1})),d(T,{type:"warning",class:"mt-4"},{default:p(()=>[X(Q(C(u)("page.webSet.headersConfig.overrideHeaderTip")),1)]),_:1})]),_:1},8,["title"]),d(N,{title:C(u)("page.webSet.headersConfig.otherHeaderSettings")},{default:p(()=>[d(z,{show:t.value},{default:p(()=>[d(q,{class:"space-y-sm"},{default:p(()=>[d(I,{label:C(u)("page.webSet.headersConfig.delHeader"),"label-placement":l.value},{feedback:p(()=>[U("span",L3,Q(C(u)("page.webSet.headersConfig.headerNameTip"))+"-Yyy。",1)]),default:p(()=>[d(wc,{value:g.responseHeaderPolicy.deleteHeaders,"onUpdate:value":k[1]||(k[1]=H=>g.responseHeaderPolicy.deleteHeaders=H),onDelete:w,onCreate:_},null,8,["value"])]),_:1},8,["label","label-placement"]),d(I,{label:C(u)("page.webSet.headersConfig.nonStandardHeader"),"label-placement":l.value},{feedback:p(()=>[U("span",U3,Q(C(u)("page.webSet.headersConfig.nonStandardHeaderExample")),1)]),default:p(()=>[d(wc,{value:g.responseHeaderPolicy.nonStandardHeaders,"onUpdate:value":k[2]||(k[2]=H=>g.responseHeaderPolicy.nonStandardHeaders=H),onDelete:$,onCreate:A},null,8,["value"])]),_:1},8,["label","label-placement"]),d(I,{label:C(u)("page.webSet.headersConfig.cors"),"label-placement":l.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.headersConfig.corsTip")),1)]),default:p(()=>{var H;return[U("div",D3,[(H=g.responseHeaderPolicy.cors)!=null&&H.isOn?(L(),te("div",q3,Q(C(u)("page.webSet.headersConfig.enable")),1)):(L(),te("div",E3,Q(C(u)("page.webSet.headersConfig.disable")),1)),U("div",{class:"cursor-pointer text-[#36C677]",onClick:k[3]||(k[3]=()=>h.value=!0)},Q(C(u)("page.webSet.headersConfig.edit")),1)])]}),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1}),d(M3,{visible:h.value,"onUpdate:visible":k[4]||(k[4]=H=>h.value=H),"header-policy-id":g.responseHeaderRef.headerPolicyId,cors:g.responseHeaderPolicy.cors},null,8,["visible","header-policy-id","cors"]),d(EO,{id:c.config.responseHeaderPolicy.id,visible:f.value,"onUpdate:visible":k[5]||(k[5]=H=>f.value=H),type:"response","edit-data":s},null,8,["id","visible","edit-data"])],64)}}}),Z3=ce(B3,[["__scopeId","data-v-5d2527d8"]]),z3={key:1,class:"h-full overflow-y-auto p-2"},H3=ae({name:"HeadersConfig",__name:"headers-config",setup(i){const e=qe("serverId",B("0")),t=B("response"),n=B(!0),s=J(()=>t.value==="request"?A3:Z3),o=fe({requestHeaderPolicy:{id:0,name:"",isOn:!1,description:"",setHeaderRefs:[],setHeaders:[],deleteHeaders:[],expires:void 0,cors:null,nonStandardHeaders:void 0},requestHeaderRef:{isPrior:!1,isOn:!1,headerPolicyId:0},responseHeaderPolicy:{id:0,name:"",isOn:!1,description:"",setHeaderRefs:[],setHeaders:[],deleteHeaders:[],expires:void 0,cors:null,nonStandardHeaders:void 0},responseHeaderRef:{isPrior:!1,isOn:!1,headerPolicyId:0},featureIsOn:!1,webId:0}),a=async()=>{const l="/servers/server/settings/headers",{data:c,error:f}=await ht(l,{serverId:e.value});f||Object.assign(o,c)};return vt(()=>{a().finally(()=>{n.value=!1})}),Nn("getData",a),(l,c)=>{const f=jt,h=i2,g=kp,v=re;return n.value?(L(),W(f,{key:0})):(L(),te("div",z3,[d(v,{vertical:""},{default:p(()=>[d(g,{value:t.value,"onUpdate:value":c[0]||(c[0]=O=>t.value=O),name:"radiobuttongroup1"},{default:p(()=>[d(h,{value:"response",label:l.$t("page.webSet.headersConfig.response")},null,8,["label"]),d(h,{value:"request",label:l.$t("page.webSet.headersConfig.request")},null,8,["label"])]),_:1},8,["value"]),(L(),W(yn(s.value),{config:o},null,8,["config"]))]),_:1})]))}}}),X3=ce(H3,[["__scopeId","data-v-f80b090b"]]),j3=ae({name:"AddUaDrawer",__name:"add-ua-drawer",props:{visible:{default:!1},visibleModifiers:{},filters:{default:()=>[]},filtersModifiers:{}},emits:Be(["update"],["update:visible","update:filters"]),setup(i,{expose:e,emit:t}){const n=Ze(i,"visible"),s=Ze(i,"filters"),o=B(!1),a=t,l=fe({keywords:[],action:"allow"}),c=async()=>{o.value=!0,s.value.push({...l}),Object.assign(l,{keywords:[],action:"allow"}),a("update")};return e({closeModal:()=>{o.value=!1,n.value=!1}}),(h,g)=>{const v=_e,O=Wt,y=ve,S=ft,w=Re,_=nt,$=Te,A=re,R=ze,k=Pt;return L(),W(k,{show:n.value,"onUpdate:show":g[4]||(g[4]=x=>n.value=x)},{default:p(()=>[d(R,{style:{width:"460px"},title:h.$t("page.webSet.userAgentConfig.addKeyword"),bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:g[0]||(g[0]=()=>n.value=!1)},[d(v,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(A,{justify:"center"},{default:p(()=>[d($,{disabled:o.value,type:"info",class:"px-6",onClick:c},{default:p(()=>[X(Q(h.$t("common.save")),1)]),_:1},8,["disabled"]),d($,{class:"button-default px-6",onClick:g[3]||(g[3]=()=>n.value=!1)},{default:p(()=>[X(Q(h.$t("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(_,{show:o.value},{default:p(()=>[d(w,{class:"space-y-sm"},{default:p(()=>[d(y,{label:h.$t("page.webSet.userAgentConfig.keywords")},{feedback:p(()=>[U("span",null,Q(h.$t("page.webSet.userAgentConfig.keywordTip")),1)]),default:p(()=>[d(O,{value:l.keywords,"onUpdate:value":g[1]||(g[1]=x=>l.keywords=x)},null,8,["value"])]),_:1},8,["label"]),d(y,{label:h.$t("page.webSet.userAgentConfig.action")},{default:p(()=>[d(S,{value:l.action,"onUpdate:value":g[2]||(g[2]=x=>l.action=x),options:[{label:h.$t("page.webSet.userAgentConfig.notAllowed"),value:"deny"},{label:h.$t("page.webSet.userAgentConfig.allowed"),value:"allow"}]},null,8,["value","options"])]),_:1},8,["label"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),V3=ce(j3,[["__scopeId","data-v-e779c484"]]),F3={key:2,class:"h-full overflow-y-auto"},W3={class:"text-xs text-gray"},Y3={class:"text-xs text-gray"},G3=ae({name:"UserAgent",__name:"user-agent",setup(i){const e=qe("serverId",B("0")),t=B(!0),n=wt(),s=J(()=>n.isMobile),o=J(()=>s.value?"top":"left"),a=B(!1),l=B(!1),c=B(),f=B(!1),h=B(!1),g=fe({userAgentConfig:{isPrior:!1,isOn:!1,filters:[],onlyURLPatterns:[],exceptURLPatterns:[]},featureIsOn:!1,webId:0}),v=async()=>{const k="/servers/server/settings/userAgent",{data:x,error:T}=await ht(k,{serverId:e.value});if(!T&&x){const{featureIsOn:M=!1,webId:N=0,userAgentConfig:I}=x;Object.assign(g,{webId:N,userAgentConfig:{...I,filters:I.filters??[],onlyURLPatterns:I.onlyURLPatterns??[],exceptURLPatterns:I.exceptURLPatterns??[]},featureIsOn:M})}},O=async()=>{var M,N;l.value=!0;const k="/servers/server/settings/userAgent",x=await Kt(),{error:T}=await Ee({csrfToken:x,webId:g.webId,userAgentJSON:JSON.stringify(g.userAgentConfig)},k);T||(M=window.$message)==null||M.success(u("common.msgSync")),l.value=!1,(N=c.value)==null||N.closeModal()},y=async k=>{l.value=!0,g.userAgentConfig.filters.splice(k,1),await O(),l.value=!1},S=J(()=>[{title:u("page.webSet.userAgentConfig.keywords"),key:"keywords"},{title:u("page.webSet.userAgentConfig.action"),key:"action"},{title:u("page.webSet.userAgentConfig.ops"),key:"actions",width:120,align:"center",render:(k,x)=>d(Ce,null,[d("span",{class:"cursor-pointer",onClick:()=>y(x)},[u("common.delete")])])}]),w=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),_=k=>{g.userAgentConfig.onlyURLPatterns.splice(k,1),O()},$=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<g.userAgentConfig.onlyURLPatterns.length?g.userAgentConfig.onlyURLPatterns[T]={...M}:x!=="edit"&&g.userAgentConfig.onlyURLPatterns.push({...M}),O()},A=k=>{const{type:x,index:T,data:M}=k;x==="edit"&&T>=0&&T<g.userAgentConfig.exceptURLPatterns.length?g.userAgentConfig.exceptURLPatterns[T]={...M}:x!=="edit"&&g.userAgentConfig.exceptURLPatterns.push({...M}),O()},R=k=>{g.userAgentConfig.exceptURLPatterns.splice(k,1),O()};return vt(()=>{v().finally(()=>{t.value=!1})}),(k,x)=>{const T=jt,M=nn,N=en,I=ve,q=un,z=_e,H=Qi,F=Te,V=re,j=ws,se=ze,G=ss,K=Xt,de=Ht,Oe=Re,we=nt;return t.value?(L(),W(T,{key:0})):g.featureIsOn?(L(),te("div",F3,[d(we,{show:l.value},{default:p(()=>[d(V,{vertical:""},{default:p(()=>[d(se,{title:C(u)("page.webSet.userAgentConfig.ua")},{default:p(()=>[d(Oe,null,{default:p(()=>[d(I,{label:C(u)("page.webSet.userAgentConfig.uaOn"),"label-placement":o.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.userAgentConfig.uaOnTip")),1)]),default:p(()=>[d(N,{value:g.userAgentConfig.isOn,"onUpdate:value":[x[0]||(x[0]=pe=>g.userAgentConfig.isOn=pe),O]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(de,{"arrow-placement":"right"},{default:p(()=>[d(K,{name:"more"},{header:p(()=>[d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(z,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(se,{size:"small",bordered:!1},{default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(z,{"local-icon":"fa-solid--list-ul"}),d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.userAgentConfig.uaList")),1)]),_:1})]),_:1}),d(V,{class:"mb-4"},{default:p(()=>[d(F,{type:"info",onClick:x[1]||(x[1]=()=>a.value=!0)},{default:p(()=>[X(Q(C(u)("page.webSet.userAgentConfig.addUAWhite")),1)]),_:1})]),_:1}),d(j,{columns:S.value,pagination:{pageSize:10},data:g.userAgentConfig.filters,size:"small","row-key":pe=>pe.index,class:"min-h-[280px] w-full text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["columns","data","row-key"])]),_:1}),d(se,{size:"small",bordered:!1},{default:p(()=>[d(H,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(z,{"local-icon":"ant-design--setting-filled"}),d(q,null,{default:p(()=>[X(Q(C(u)("page.webSet.userAgentConfig.adv")),1)]),_:1})]),_:1}),d(I,{label:C(u)("page.webSet.compressionConfig.excludedURLs")},{feedback:p(()=>[U("span",W3,Q(C(u)("page.webSet.compressionConfig.excludedURLsTip")),1)]),default:p(()=>[d(G,{visible:f.value,"onUpdate:visible":x[2]||(x[2]=pe=>f.value=pe),options:w.value,"url-patterns":g.userAgentConfig.exceptURLPatterns,onDelete:R,onUpdate:A},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(I,{label:C(u)("page.webSet.compressionConfig.limitedURLs")},{feedback:p(()=>[U("span",Y3,Q(C(u)("page.webSet.compressionConfig.limitedURLsTip")),1)]),default:p(()=>[d(G,{visible:h.value,"onUpdate:visible":x[3]||(x[3]=pe=>h.value=pe),options:w.value,"url-patterns":g.userAgentConfig.onlyURLPatterns,onDelete:_,onUpdate:$},null,8,["visible","options","url-patterns"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])]),_:1}),d(V3,{ref_key:"drawerRef",ref:c,visible:a.value,"onUpdate:visible":x[4]||(x[4]=pe=>a.value=pe),filters:g.userAgentConfig.filters,"onUpdate:filters":x[5]||(x[5]=pe=>g.userAgentConfig.filters=pe),onUpdate:O},null,8,["visible","filters"])]),_:1},8,["show"])])):(L(),W(M,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),J3=ce(G3,[["__scopeId","data-v-a501c57a"]]),K3={key:2,class:"h-full overflow-y-auto"},eU=ae({name:"WebsSocket",__name:"web-socket",setup(i){const e=qe("serverId",B("0")),t=B(!0),n=wt(),s=J(()=>n.isMobile),o=J(()=>s.value?"top":"left"),a=B(!1),l=fe({websocketConfig:{id:0,isOn:!1,handshakeTimeout:{count:30,unit:"second"},allowAllOrigins:!0,allowedOrigins:[],requestSameOrigin:!0,requestOrigin:""},websocketRef:{isPrior:!1,isOn:!1,websocketId:0},featureIsOn:!1,webId:0}),c=async()=>{const h="/servers/server/settings/websocket",{data:g,error:v}=await ht(h,{serverId:e.value});if(!v&&g){const O=o2(g,l);Object.assign(l,O)}},f=async h=>{var O;a.value=!0;const g="/servers/server/settings/websocket",{error:v}=await Ee({webId:l.webId,websocketRefJSON:JSON.stringify(l.websocketRef),websocketJSON:JSON.stringify(l.websocketConfig)},g);v||(h&&l.websocketRef.websocketId===0&&await c(),(O=window.$message)==null||O.success(u("common.msgSync"))),a.value=!1};return vt(()=>{c().finally(()=>{t.value=!1})}),(h,g)=>{const v=jt,O=nn,y=en,S=ve,w=un,_=_e,$=Qi,A=et,R=Wt,k=Re,x=ze,T=Ne,M=Te,N=re,I=Xt,q=Ht,z=nt;return t.value?(L(),W(v,{key:0})):l.featureIsOn?(L(),te("div",K3,[d(N,{vertical:""},{default:p(()=>[d(x,{title:C(u)("page.webSet.webSocketConfig.basic")},{default:p(()=>[d(z,{show:a.value},{default:p(()=>[d(k,null,{default:p(()=>[d(S,{label:C(u)("page.webSet.webSocketConfig.enableWS"),"label-placement":o.value},{default:p(()=>[d(y,{value:l.websocketRef.isOn,"onUpdate:value":[g[0]||(g[0]=H=>l.websocketRef.isOn=H),f]},null,8,["value"])]),_:1},8,["label","label-placement"]),d(q,{"arrow-placement":"right"},{default:p(()=>[d(I,{name:"more"},{header:p(()=>[d(w,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(_,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(x,{size:"small",bordered:!1},{default:p(()=>[d($,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_,{"local-icon":"fluent--globe-32-regular"}),d(w,null,{default:p(()=>[X(Q(C(u)("page.webSet.webSocketConfig.originSetting")),1)]),_:1})]),_:1}),d(k,{"label-width":"120","label-align":"left"},{default:p(()=>[d(S,{label:C(u)("page.webSet.webSocketConfig.allowAllOrigin"),"label-placement":o.value},{default:p(()=>[d(A,{checked:l.websocketConfig.allowAllOrigins,"onUpdate:checked":g[1]||(g[1]=H=>l.websocketConfig.allowAllOrigins=H),label:C(u)("page.webSet.webSocketConfig.allowAllOriginTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),Zt(d(S,{label:C(u)("page.webSet.webSocketConfig.allowedOriginList"),"label-placement":o.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.webSocketConfig.allowedOriginListTip")),1)]),default:p(()=>[d(R,{value:l.websocketConfig.allowedOrigins,"onUpdate:value":g[2]||(g[2]=H=>l.websocketConfig.allowedOrigins=H)},null,8,["value"])]),_:1},8,["label","label-placement"]),[[zt,!l.websocketConfig.allowAllOrigins]])]),_:1})]),_:1}),d(x,{size:"small",bordered:!1},{default:p(()=>[d($,{prefix:"bar","align-text":"",type:"info",class:"flex items-center gap-1"},{default:p(()=>[d(_,{"local-icon":"ant-design--setting-filled"}),d(w,null,{default:p(()=>[X(Q(C(u)("page.webSet.webSocketConfig.advanced")),1)]),_:1})]),_:1}),d(k,{"label-width":"120","label-align":"left"},{default:p(()=>[d(S,{label:C(u)("page.webSet.webSocketConfig.passOrigin"),"label-placement":o.value},{default:p(()=>[d(A,{checked:l.websocketConfig.requestSameOrigin,"onUpdate:checked":g[3]||(g[3]=H=>l.websocketConfig.requestSameOrigin=H),label:C(u)("page.webSet.webSocketConfig.passOriginTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),Zt(d(S,{label:C(u)("page.webSet.webSocketConfig.customPassOrigin"),"label-placement":o.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.webSocketConfig.customPassOriginTip")),1)]),default:p(()=>[d(T,{value:l.websocketConfig.requestOrigin,"onUpdate:value":g[4]||(g[4]=H=>l.websocketConfig.requestOrigin=H)},null,8,["value"])]),_:1},8,["label","label-placement"]),[[zt,!l.websocketConfig.requestSameOrigin]])]),_:1})]),_:1}),d(N,null,{default:p(()=>[d(M,{type:"info",onClick:g[5]||(g[5]=()=>f())},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1})])):(L(),W(O,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),tU=ce(eU,[["__scopeId","data-v-20909437"]]),nU=ae({name:"PageConfig",__name:"page-config",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),s=B(null),o=B(0),a=()=>{if(s.value){const g=window.innerHeight-300;o.value=g}},{activeTab:l,changeMainTab:c}=_a("CustomizePages");return vt(()=>{a(),window.addEventListener("resize",a)}),Ca(()=>{a()}),(f,h)=>{const g=_s,v=Ss;return L(),W(v,{value:C(l),onActiveNameChange:C(c),ref_key:"tabsRef",ref:s,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:o.value+"px"}:void 0)},{default:p(()=>[d(g,{name:"base",tab:f.$t("page.webSet.CustomizePages"),"display-directive":"show:lazy"},{default:p(()=>[d(_3)]),_:1},8,["tab"]),d(g,{name:"headers",tab:f.$t("page.webSet.headers"),"display-directive":"show:lazy"},{default:p(()=>[d(X3)]),_:1},8,["tab"]),d(g,{name:"userAgent",tab:f.$t("page.webSet.userAgent"),"display-directive":"show:lazy"},{default:p(()=>[d(J3)]),_:1},8,["tab"]),d(g,{name:"WebsSocket",tab:"WebsSocket","display-directive":"show:lazy"},{default:p(()=>[d(tU)]),_:1})]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),sU=ce(nU,[["__scopeId","data-v-bcec6a54"]]),iU={key:2,class:"h-full overflow-y-auto p-2"},oU=ae({name:"StatConfig",__name:"stat-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=B(!1),l=fe({statConfig:{isPrior:!1,isOn:!1},featureIsOn:!0,webId:0}),c=async()=>{const h="/servers/server/settings/stat",{data:g,error:v}=await ht(h,{serverId:e.value});if(!v&&g){const{featureIsOn:O=!0,statConfig:y,webId:S=0}=g;Object.assign(l,{featureIsOn:O,statConfig:y??l.statConfig,webId:S})}},f=async()=>{var g;a.value=!0;const{error:h}=await Ee({webId:l.webId,statJSON:JSON.stringify(l.statConfig)},"/servers/server/settings/stat");h||(g=window.$message)==null||g.success(u("common.msgSync")),a.value=!1};return vt(()=>{c().finally(()=>{o.value=!1})}),(h,g)=>{const v=jt,O=nn,y=en,S=ve,w=Re,_=nt,$=ze,A=re;return o.value?(L(),W(v,{key:0})):l.featureIsOn?(L(),te("div",iU,[d(A,{vertical:""},{default:p(()=>[d($,{title:C(u)("page.webSet.StatConfig.statisticsSettings")},{default:p(()=>[d(_,{show:a.value},{default:p(()=>[d(w,null,{default:p(()=>[d(S,{label:C(u)("page.webSet.StatConfig.enableStatistics"),"label-placement":s.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.StatConfig.enableStatisticsTip")),1)]),default:p(()=>[d(y,{value:l.statConfig.isOn,"onUpdate:value":[g[0]||(g[0]=R=>l.statConfig.isOn=R),f]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1})])):(L(),W(O,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),aU=ce(oU,[["__scopeId","data-v-4059909c"]]),lU={key:2,class:"h-full overflow-y-auto p-2"},rU=ae({name:"AccessLog",__name:"access-log",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=B(!1),l=fe({accessLogConfig:{isPrior:!1,isOn:!1,fields:["1","2"],status1:!1,status2:!0,status3:!0,status4:!0,status5:!0,enableClientClosed:!1,storageOnly:!1,storagePolicies:[],firewallOnly:!0},featureIsOn:!0,webId:0}),c=async()=>{const O="/servers/server/settings/accessLog",{data:y,error:S}=await ht(O,{serverId:e.value});if(!S&&y){const{featureIsOn:w=!0,accessLogConfig:_,webId:$=0}=y;_!=null&&_.fields&&(_.fields=_.fields.map(String)),Object.assign(l,{featureIsOn:w,accessLogConfig:_??l.accessLogConfig,webId:$})}},f=[{key:"status1",label:"1xx"},{key:"status2",label:"2xx"},{key:"status3",label:"3xx"},{key:"status4",label:"4xx"},{key:"status5",label:"5xx"}],h=async()=>{var y;a.value=!0;const{error:O}=await Ee({webId:l.webId,accessLogJSON:JSON.stringify({...l.accessLogConfig,fields:l.accessLogConfig.fields.map(Number)})},"/servers/server/settings/accessLog");O||(y=window.$message)==null||y.success(u("common.msgSync")),a.value=!1};function g(O){return l.accessLogConfig[O]}function v(O,y){l.accessLogConfig[O]=y,h()}return vt(()=>{c().finally(()=>{o.value=!1})}),(O,y)=>{const S=jt,w=nn,_=en,$=ve,A=Re,R=ze,k=et,x=re,T=Jc,M=nt;return o.value?(L(),W(S,{key:0})):l.featureIsOn?(L(),te("div",lU,[d(x,{vertical:""},{default:p(()=>[d(M,{show:a.value},{default:p(()=>[d(x,{vertical:""},{default:p(()=>[d(R,{title:C(u)("page.webSet.AccessLogConfig.accessLogSettings")},{default:p(()=>[d(A,null,{default:p(()=>[d($,{label:C(u)("page.webSet.AccessLogConfig.enableAccessLog"),"label-placement":s.value},{default:p(()=>[d(_,{value:l.accessLogConfig.isOn,"onUpdate:value":[y[0]||(y[0]=N=>l.accessLogConfig.isOn=N),h]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),l.accessLogConfig.isOn?(L(),W(R,{key:0,title:C(u)("page.webSet.advancedOptions")},{default:p(()=>[d(A,{"label-width":"120px","label-align":"left"},{default:p(()=>[d($,{label:C(u)("page.webSet.AccessLogConfig.accessLogFields"),"label-placement":s.value},{default:p(()=>[d(T,{value:l.accessLogConfig.fields,"onUpdate:value":y[1]||(y[1]=N=>{l.accessLogConfig.fields=N,h()})},{default:p(()=>[d(x,{"item-style":"display: flex;"},{default:p(()=>[d(k,{value:"1",label:C(u)("page.webSet.AccessLogConfig.requestHeaderList")},null,8,["label"]),d(k,{value:"2",label:C(u)("page.webSet.AccessLogConfig.responseHeaderList")},null,8,["label"])]),_:1})]),_:1},8,["value"])]),_:1},8,["label","label-placement"]),d($,{label:C(u)("page.webSet.AccessLogConfig.logStatusCodes"),"label-placement":s.value},{default:p(()=>[d(x,{"item-style":"display: flex;"},{default:p(()=>[(L(),te(Ce,null,Ot(f,N=>d(k,{key:N.key,label:N.label,checked:g(N.key),"onUpdate:checked":I=>v(N.key,I)},null,8,["label","checked","onUpdate:checked"])),64))]),_:1})]),_:1},8,["label","label-placement"]),d($,{label:C(u)("page.webSet.AccessLogConfig.onlyLogWAF"),"label-placement":s.value},{default:p(()=>[d(x,{"item-style":"display: flex;"},{default:p(()=>[d(k,{checked:l.accessLogConfig.firewallOnly,label:C(u)("page.webSet.AccessLogConfig.onlyLogWAFTip"),"onUpdate:checked":y[2]||(y[2]=N=>{l.accessLogConfig.firewallOnly=N,h()})},null,8,["checked","label"])]),_:1})]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"])):Xe("",!0)]),_:1})]),_:1},8,["show"])]),_:1})])):(L(),W(w,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),cU=ce(rU,[["__scopeId","data-v-1ffb8985"]]),dU={key:2,class:"h-full overflow-y-auto p-2"},uU=ae({name:"RemoteAddr",__name:"remote-addr",setup(i){const e=qe("serverId",B("0")),t=wt(),n=J(()=>t.isMobile),s=J(()=>n.value?"top":"left"),o=B(!0),a=B(!1),l=B({remoteAddrConfig:{isPrior:!1,isOn:!1,value:"",type:"",requestHeaderName:""},featureIsOn:!1,webId:0}),c=fe({remoteAddrConfig:{isPrior:!1,isOn:!1,value:"${rawRemoteAddr}",type:"default",requestHeaderName:""},featureIsOn:!0,webId:0}),f=J(()=>[{label:u("page.webSet.RemoteAddr.options.default.label"),value:"default",description:u("page.webSet.RemoteAddr.options.default.description")},{label:u("page.webSet.RemoteAddr.options.proxy.label"),value:"proxy",description:u("page.webSet.RemoteAddr.options.proxy.description")},{label:u("page.webSet.RemoteAddr.options.requestHeader.label"),value:"requestHeader",description:u("page.webSet.RemoteAddr.options.requestHeader.description")},{label:u("page.webSet.RemoteAddr.options.variable.label"),value:"variable",description:u("page.webSet.RemoteAddr.options.variable.description")}]),h=J(()=>f.value.find(S=>S.value===c.remoteAddrConfig.type)),g=async()=>{const S="/servers/server/settings/remoteAddr",{data:w,error:_}=await ht(S,{serverId:e.value});if(!_&&w){const{featureIsOn:$=!0,remoteAddrConfig:A,webId:R=0}=w;Object.assign(c,{featureIsOn:$,remoteAddrConfig:A??c.remoteAddrConfig,webId:R}),l.value=Us.cloneDeep(c)}},v=async()=>{var _;a.value=!0;const S=await Kt(),{error:w}=await Ee({csrfToken:S,webId:c.webId,remoteAddrJSON:JSON.stringify(c.remoteAddrConfig),requestHeaderName:c.remoteAddrConfig.requestHeaderName,value:c.remoteAddrConfig.value},"/servers/server/settings/remoteAddr");w||(l.value=Us.cloneDeep(c),(_=window.$message)==null||_.success(u("common.msgSync"))),a.value=!1},O=S=>{switch(S){case"requestHeader":return;case"variable":return;default:v()}},y=()=>{Us.isEqual(c,l.value)||v()};return vt(()=>{g().finally(()=>{o.value=!1})}),(S,w)=>{const _=jt,$=nn,A=en,R=ve,k=Re,x=ze,T=ft,M=Ne,N=re,I=nt;return o.value?(L(),W(_,{key:0})):c.featureIsOn?(L(),te("div",dU,[d(I,{show:a.value},{default:p(()=>[d(N,{vertical:""},{default:p(()=>[d(x,{title:C(u)("page.webSet.RemoteAddr.visitorIPSettings")},{default:p(()=>[d(k,null,{default:p(()=>[d(R,{label:C(u)("page.webSet.RemoteAddr.enableVisitorIPLog"),"label-placement":s.value},{default:p(()=>[d(A,{value:c.remoteAddrConfig.isOn,"onUpdate:value":[w[0]||(w[0]=q=>c.remoteAddrConfig.isOn=q),v]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),c.remoteAddrConfig.isOn?(L(),W(x,{key:0,title:C(u)("page.webSet.RemoteAddr.ipRetrievalMethod")},{default:p(()=>[d(k,{"label-width":"100px","label-align":"left"},{default:p(()=>[d(R,{label:C(u)("page.webSet.RemoteAddr.ipRetrievalMethod"),"label-placement":s.value,class:"mb-3"},{feedback:p(()=>{var q;return[U("span",null,Q((q=h.value)==null?void 0:q.description),1)]}),default:p(()=>[d(T,{value:c.remoteAddrConfig.type,"onUpdate:value":[w[1]||(w[1]=q=>c.remoteAddrConfig.type=q),O],options:f.value,style:{"max-width":"280px"}},null,8,["value","options"])]),_:1},8,["label","label-placement"]),c.remoteAddrConfig.type==="variable"?(L(),W(R,{key:0,label:C(u)("page.webSet.RemoteAddr.readIPVariable"),"label-placement":s.value,class:"mb-3"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.RemoteAddr.ipVariableDescription")),1)]),default:p(()=>[d(M,{value:c.remoteAddrConfig.value,"onUpdate:value":w[2]||(w[2]=q=>c.remoteAddrConfig.value=q),style:{"max-width":"280px"},onBlur:y},null,8,["value"])]),_:1},8,["label","label-placement"])):Xe("",!0),c.remoteAddrConfig.type==="requestHeader"?(L(),W(R,{key:1,label:C(u)("page.webSet.RemoteAddr.requestHeader"),"label-placement":s.value,class:"mb-3"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.RemoteAddr.requestHeaderTip")),1)]),default:p(()=>[d(M,{value:c.remoteAddrConfig.requestHeaderName,"onUpdate:value":w[3]||(w[3]=q=>c.remoteAddrConfig.requestHeaderName=q),style:{"max-width":"280px"},onBlur:y},null,8,["value"])]),_:1},8,["label","label-placement"])):Xe("",!0)]),_:1})]),_:1},8,["title"])):Xe("",!0)]),_:1})]),_:1},8,["show"])])):(L(),W($,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),fU=ce(uU,[["__scopeId","data-v-f11a770e"]]),pU=ae({name:"StatisticsConfig",__name:"statistics-config",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),s=B(null),o=B(0),a=()=>{if(s.value){const g=window.innerHeight-300;o.value=g}},{activeTab:l,changeMainTab:c}=_a("stat");return vt(()=>{a(),window.addEventListener("resize",a)}),Ca(()=>{a()}),(f,h)=>{const g=_s,v=Ss;return L(),W(v,{value:C(l),onActiveNameChange:C(c),ref_key:"tabsRef",ref:s,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:o.value+"px"}:void 0)},{default:p(()=>[d(g,{name:"base",tab:f.$t("page.webSet.statistics"),"display-directive":"show:lazy"},{default:p(()=>[d(aU)]),_:1},8,["tab"]),d(g,{name:"accessLog",tab:f.$t("page.webSet.accessLogs"),"display-directive":"show:lazy"},{default:p(()=>[d(cU)]),_:1},8,["tab"]),d(g,{name:"visitorIP",tab:f.$t("page.webSet.visitorIP"),"display-directive":"show:lazy"},{default:p(()=>[d(fU)]),_:1},8,["tab"])]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),hU=ce(pU,[["__scopeId","data-v-621256e6"]]);let _f=[],BO=[];(()=>{let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<i.length;e++)(e%2?BO:_f).push(t=t+i[e])})();function mU(i){if(i<768)return!1;for(let e=0,t=_f.length;;){let n=e+t>>1;if(i<_f[n])t=n;else if(i>=BO[n])e=n+1;else return!0;if(e==t)return!1}}function Sv(i){return i>=127462&&i<=127487}const _v=8205;function gU(i,e,t=!0,n=!0){return(t?ZO:vU)(i,e,n)}function ZO(i,e,t){if(e==i.length)return e;e&&zO(i.charCodeAt(e))&&HO(i.charCodeAt(e-1))&&e--;let n=Hu(i,e);for(e+=wv(n);e<i.length;){let s=Hu(i,e);if(n==_v||s==_v||t&&mU(s))e+=wv(s),n=s;else if(Sv(s)){let o=0,a=e-2;for(;a>=0&&Sv(Hu(i,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function vU(i,e,t){for(;e>0;){let n=ZO(i,e-2,t);if(n<e)return n;e--}return 0}function Hu(i,e){let t=i.charCodeAt(e);if(!HO(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return zO(n)?(t-55296<<10)+(n-56320)+65536:t}function zO(i){return i>=56320&&i<57344}function HO(i){return i>=55296&&i<56320}function wv(i){return i<65536?1:2}class kt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=ua(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),oi.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=ua(this,e,t);let n=[];return this.decompose(e,t,n,0),oi.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),s=new cl(this),o=new cl(e);for(let a=t,l=t;;){if(s.next(a),o.next(a),a=0,s.lineBreak!=o.lineBreak||s.done!=o.done||s.value!=o.value)return!1;if(l+=s.value.length,s.done||l>=n)return!0}}iter(e=1){return new cl(this,e)}iterRange(e,t=this.length){return new XO(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new jO(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?kt.empty:e.length<=32?new dn(e):oi.from(dn.split(e,[]))}}class dn extends kt{constructor(e,t=bU(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let o=0;;o++){let a=this.text[o],l=s+a.length;if((t?n:l)>=e)return new OU(s,l,n,a);s=l+1,n++}}decompose(e,t,n,s){let o=e<=0&&t>=this.length?this:new dn(kv(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let a=n.pop(),l=cc(o.text,a.text.slice(),0,o.length);if(l.length<=32)n.push(new dn(l,a.length+o.length));else{let c=l.length>>1;n.push(new dn(l.slice(0,c)),new dn(l.slice(c)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof dn))return super.replace(e,t,n);[e,t]=ua(this,e,t);let s=cc(this.text,cc(n.text,kv(this.text,0,e)),t),o=this.length+n.length-(t-e);return s.length<=32?new dn(s,o):oi.from(dn.split(s,[]),o)}sliceString(e,t=this.length,n=`
`){[e,t]=ua(this,e,t);let s="";for(let o=0,a=0;o<=t&&a<this.text.length;a++){let l=this.text[a],c=o+l.length;o>e&&a&&(s+=n),e<c&&t>o&&(s+=l.slice(Math.max(0,e-o),t-o)),o=c+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let o of e)n.push(o),s+=o.length+1,n.length==32&&(t.push(new dn(n,s)),n=[],s=-1);return s>-1&&t.push(new dn(n,s)),t}}class oi extends kt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let o=0;;o++){let a=this.children[o],l=s+a.length,c=n+a.lines-1;if((t?c:l)>=e)return a.lineInner(e,t,n,s);s=l+1,n=c+1}}decompose(e,t,n,s){for(let o=0,a=0;a<=t&&o<this.children.length;o++){let l=this.children[o],c=a+l.length;if(e<=c&&t>=a){let f=s&((a<=e?1:0)|(c>=t?2:0));a>=e&&c<=t&&!f?n.push(l):l.decompose(e-a,t-a,n,f)}a=c+1}}replace(e,t,n){if([e,t]=ua(this,e,t),n.lines<this.lines)for(let s=0,o=0;s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e>=o&&t<=l){let c=a.replace(e-o,t-o,n),f=this.lines-a.lines+c.lines;if(c.lines<f>>4&&c.lines>f>>6){let h=this.children.slice();return h[s]=c,new oi(h,this.length-(t-e)+n.length)}return super.replace(o,l,c)}o=l+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
`){[e,t]=ua(this,e,t);let s="";for(let o=0,a=0;o<this.children.length&&a<=t;o++){let l=this.children[o],c=a+l.length;a>e&&o&&(s+=n),e<c&&t>a&&(s+=l.sliceString(e-a,t-a,n)),a=c+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof oi))return 0;let n=0,[s,o,a,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,o+=t){if(s==a||o==l)return n;let c=this.children[s],f=e.children[o];if(c!=f)return n+c.scanIdentical(f,t);n+=c.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let O of e)n+=O.lines;if(n<32){let O=[];for(let y of e)y.flatten(O);return new dn(O,t)}let s=Math.max(32,n>>5),o=s<<1,a=s>>1,l=[],c=0,f=-1,h=[];function g(O){let y;if(O.lines>o&&O instanceof oi)for(let S of O.children)g(S);else O.lines>a&&(c>a||!c)?(v(),l.push(O)):O instanceof dn&&c&&(y=h[h.length-1])instanceof dn&&O.lines+y.lines<=32?(c+=O.lines,f+=O.length+1,h[h.length-1]=new dn(y.text.concat(O.text),y.length+1+O.length)):(c+O.lines>s&&v(),c+=O.lines,f+=O.length+1,h.push(O))}function v(){c!=0&&(l.push(h.length==1?h[0]:oi.from(h,f)),f=-1,c=h.length=0)}for(let O of e)g(O);return v(),l.length==1?l[0]:new oi(l,t)}}kt.empty=new dn([""],0);function bU(i){let e=-1;for(let t of i)e+=t.length+1;return e}function cc(i,e,t=0,n=1e9){for(let s=0,o=0,a=!0;o<i.length&&s<=n;o++){let l=i[o],c=s+l.length;c>=t&&(c>n&&(l=l.slice(0,n-s)),s<t&&(l=l.slice(t-s)),a?(e[e.length-1]+=l,a=!1):e.push(l)),s=c+1}return e}function kv(i,e,t){return cc(i,[""],e,t)}class cl{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof dn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],o=this.offsets[n],a=o>>1,l=s instanceof dn?s.text.length:s.children.length;if(a==(t>0?l:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(s instanceof dn){let c=s.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=s.children[a+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof dn?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class XO{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new cl(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class jO{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(kt.prototype[Symbol.iterator]=function(){return this.iter()},cl.prototype[Symbol.iterator]=XO.prototype[Symbol.iterator]=jO.prototype[Symbol.iterator]=function(){return this});class OU{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}}function ua(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function Mn(i,e,t=!0,n=!0){return gU(i,e,t,n)}function CU(i){return i>=56320&&i<57344}function yU(i){return i>=55296&&i<56320}function is(i,e){let t=i.charCodeAt(e);if(!yU(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return CU(n)?(t-55296<<10)+(n-56320)+65536:t}function zp(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function ai(i){return i<65536?1:2}const wf=/\r\n?|\n/;var An=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(An||(An={}));class ui{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let o=this.sections[t++],a=this.sections[t++];a<0?(e(n,s,o),s+=o):s+=a,n+=o}}iterChangedRanges(e,t=!1){kf(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new ui(e)}composeDesc(e){return this.empty?e:e.empty?this:VO(this,e)}mapDesc(e,t=!1){return e.empty?this:xf(this,e,t)}mapPos(e,t=-1,n=An.Simple){let s=0,o=0;for(let a=0;a<this.sections.length;){let l=this.sections[a++],c=this.sections[a++],f=s+l;if(c<0){if(f>e)return o+(e-s);o+=l}else{if(n!=An.Simple&&f>=e&&(n==An.TrackDel&&s<e&&f>e||n==An.TrackBefore&&s<e||n==An.TrackAfter&&f>e))return null;if(f>e||f==e&&t<0&&!l)return e==s||t<0?o:o+c;o+=c}s=f}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return o}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let o=this.sections[n++],a=this.sections[n++],l=s+o;if(a>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ui(e)}static create(e){return new ui(e)}}class On extends ui{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return kf(this,(t,n,s,o,a)=>e=e.replace(s,s+(n-t),a),!1),e}mapDesc(e,t=!1){return xf(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,o=0;s<t.length;s+=2){let a=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=a;let c=s>>1;for(;n.length<c;)n.push(kt.empty);n.push(a?e.slice(o,o+a):kt.empty)}o+=a}return new On(t,n)}compose(e){return this.empty?e:e.empty?this:VO(this,e,!0)}map(e,t=!1){return e.empty?this:xf(this,e,t,!0)}iterChanges(e,t=!1){kf(this,e,t)}get desc(){return ui.create(this.sections)}filter(e){let t=[],n=[],s=[],o=new ml(this);e:for(let a=0,l=0;;){let c=a==e.length?1e9:e[a++];for(;l<c||l==c&&o.len==0;){if(o.done)break e;let h=Math.min(o.len,c-l);En(s,h,-1);let g=o.ins==-1?-1:o.off==0?o.ins:0;En(t,h,g),g>0&&Fi(n,t,o.text),o.forward(h),l+=h}let f=e[a++];for(;l<f;){if(o.done)break e;let h=Math.min(o.len,f-l);En(t,h,-1),En(s,h,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(h),l+=h}}return{changes:new On(t,n),filtered:ui.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],o=[],a=0,l=null;function c(h=!1){if(!h&&!s.length)return;a<t&&En(s,t-a,-1);let g=new On(s,o);l=l?l.compose(g.map(l)):g,s=[],o=[],a=0}function f(h){if(Array.isArray(h))for(let g of h)f(g);else if(h instanceof On){if(h.length!=t)throw new RangeError(`Mismatched change set length (got ${h.length}, expected ${t})`);c(),l=l?l.compose(h.map(l)):h}else{let{from:g,to:v=g,insert:O}=h;if(g>v||g<0||v>t)throw new RangeError(`Invalid change range ${g} to ${v} (in doc of length ${t})`);let y=O?typeof O=="string"?kt.of(O.split(n||wf)):O:kt.empty,S=y.length;if(g==v&&S==0)return;g<a&&c(),g>a&&En(s,g-a,-1),En(s,v-g,S),Fi(o,s,y),a=v}}return f(e),c(!l),l}static empty(e){return new On(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let o=e[s];if(typeof o=="number")t.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((a,l)=>l&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)t.push(o[0],0);else{for(;n.length<s;)n.push(kt.empty);n[s]=kt.of(o.slice(1)),t.push(o[0],n[s].length)}}}return new On(t,n)}static createSet(e,t){return new On(e,t)}}function En(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function Fi(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(kt.empty);i.push(t)}}function kf(i,e,t){let n=i.inserted;for(let s=0,o=0,a=0;a<i.sections.length;){let l=i.sections[a++],c=i.sections[a++];if(c<0)s+=l,o+=l;else{let f=s,h=o,g=kt.empty;for(;f+=l,h+=c,c&&n&&(g=g.append(n[a-2>>1])),!(t||a==i.sections.length||i.sections[a+1]<0);)l=i.sections[a++],c=i.sections[a++];e(s,f,o,h,g),s=f,o=h}}}function xf(i,e,t,n=!1){let s=[],o=n?[]:null,a=new ml(i),l=new ml(e);for(let c=-1;;){if(a.done&&l.len||l.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&l.ins==-1){let f=Math.min(a.len,l.len);En(s,f,-1),a.forward(f),l.forward(f)}else if(l.ins>=0&&(a.ins<0||c==a.i||a.off==0&&(l.len<a.len||l.len==a.len&&!t))){let f=l.len;for(En(s,l.ins,-1);f;){let h=Math.min(a.len,f);a.ins>=0&&c<a.i&&a.len<=h&&(En(s,0,a.ins),o&&Fi(o,s,a.text),c=a.i),a.forward(h),f-=h}l.next()}else if(a.ins>=0){let f=0,h=a.len;for(;h;)if(l.ins==-1){let g=Math.min(h,l.len);f+=g,h-=g,l.forward(g)}else if(l.ins==0&&l.len<h)h-=l.len,l.next();else break;En(s,f,c<a.i?a.ins:0),o&&c<a.i&&Fi(o,s,a.text),c=a.i,a.forward(a.len-h)}else{if(a.done&&l.done)return o?On.createSet(s,o):ui.create(s);throw new Error("Mismatched change set lengths")}}}function VO(i,e,t=!1){let n=[],s=t?[]:null,o=new ml(i),a=new ml(e);for(let l=!1;;){if(o.done&&a.done)return s?On.createSet(n,s):ui.create(n);if(o.ins==0)En(n,o.len,0,l),o.next();else if(a.len==0&&!a.done)En(n,0,a.ins,l),s&&Fi(s,n,a.text),a.next();else{if(o.done||a.done)throw new Error("Mismatched change set lengths");{let c=Math.min(o.len2,a.len),f=n.length;if(o.ins==-1){let h=a.ins==-1?-1:a.off?0:a.ins;En(n,c,h,l),s&&h&&Fi(s,n,a.text)}else a.ins==-1?(En(n,o.off?0:o.len,c,l),s&&Fi(s,n,o.textBit(c))):(En(n,o.off?0:o.len,a.off?0:a.ins,l),s&&!a.off&&Fi(s,n,a.text));l=(o.ins>c||a.ins>=0&&a.len>c)&&(l||n.length>f),o.forward2(c),a.forward(c)}}}}class ml{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?kt.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?kt.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ko{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new ko(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return me.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return me.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return me.range(e.anchor,e.head)}static create(e,t,n){return new ko(e,t,n)}}class me{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:me.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new me([this.main],0)}addRange(e,t=!0){return me.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,me.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new me(e.ranges.map(t=>ko.fromJSON(t)),e.main)}static single(e,t=e){return new me([me.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,s=0;s<e.length;s++){let o=e[s];if(o.empty?o.from<=n:o.from<n)return me.normalized(e.slice(),t);n=o.to}return new me(e,t)}static cursor(e,t=0,n,s){return ko.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let o=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?ko.create(t,e,48|o):ko.create(e,t,(t>e?8:0)|o)}static normalized(e,t=0){let n=e[t];e.sort((s,o)=>s.from-o.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let o=e[s],a=e[s-1];if(o.empty?o.from<=a.to:o.from<a.to){let l=a.from,c=Math.max(o.to,a.to);s<=t&&t--,e.splice(--s,2,o.anchor>o.head?me.range(c,l):me.range(l,c))}}return new me(e,t)}}function FO(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Hp=0;class Le{constructor(e,t,n,s,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=Hp++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Le(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Xp),!!e.static,e.enables)}of(e){return new dc([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new dc(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new dc(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function Xp(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class dc{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=Hp++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,o=this.id,a=e[o]>>1,l=this.type==2,c=!1,f=!1,h=[];for(let g of this.dependencies)g=="doc"?c=!0:g=="selection"?f=!0:(((t=e[g.id])!==null&&t!==void 0?t:1)&1)==0&&h.push(e[g.id]);return{create(g){return g.values[a]=n(g),1},update(g,v){if(c&&v.docChanged||f&&(v.docChanged||v.selection)||Pf(g,h)){let O=n(g);if(l?!xv(O,g.values[a],s):!s(O,g.values[a]))return g.values[a]=O,1}return 0},reconfigure:(g,v)=>{let O,y=v.config.address[o];if(y!=null){let S=xc(v,y);if(this.dependencies.every(w=>w instanceof Le?v.facet(w)===g.facet(w):w instanceof kn?v.field(w,!1)==g.field(w,!1):!0)||(l?xv(O=n(g),S,s):s(O=n(g),S)))return g.values[a]=S,0}else O=n(g);return g.values[a]=O,1}}}}function xv(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function Pf(i,e){let t=!1;for(let n of e)dl(i,n)&1&&(t=!0);return t}function SU(i,e,t){let n=t.map(c=>i[c.id]),s=t.map(c=>c.type),o=n.filter(c=>!(c&1)),a=i[e.id]>>1;function l(c){let f=[];for(let h=0;h<n.length;h++){let g=xc(c,n[h]);if(s[h]==2)for(let v of g)f.push(v);else f.push(g)}return e.combine(f)}return{create(c){for(let f of n)dl(c,f);return c.values[a]=l(c),1},update(c,f){if(!Pf(c,o))return 0;let h=l(c);return e.compare(h,c.values[a])?0:(c.values[a]=h,1)},reconfigure(c,f){let h=Pf(c,n),g=f.config.facets[e.id],v=f.facet(e);if(g&&!h&&Xp(t,g))return c.values[a]=v,0;let O=l(c);return e.compare(O,v)?(c.values[a]=v,0):(c.values[a]=O,1)}}}const qr=Le.define({static:!0});class kn{constructor(e,t,n,s,o){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=o,this.provides=void 0}static define(e){let t=new kn(Hp++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(qr).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let o=n.values[t],a=this.updateF(o,s);return this.compareF(o,a)?0:(n.values[t]=a,1)},reconfigure:(n,s)=>{let o=n.facet(qr),a=s.facet(qr),l;return(l=o.find(c=>c.field==this))&&l!=a.find(c=>c.field==this)?(n.values[t]=l.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,qr.of({field:this,create:e})]}get extension(){return this}}const So={lowest:4,low:3,default:2,high:1,highest:0};function Va(i){return e=>new WO(e,i)}const lo={highest:Va(So.highest),high:Va(So.high),default:Va(So.default),low:Va(So.low),lowest:Va(So.lowest)};class WO{constructor(e,t){this.inner=e,this.prec=t}}class Il{of(e){return new $f(this,e)}reconfigure(e){return Il.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class $f{constructor(e,t){this.compartment=e,this.inner=t}}class kc{constructor(e,t,n,s,o,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let s=[],o=Object.create(null),a=new Map;for(let v of _U(e,t,a))v instanceof kn?s.push(v):(o[v.facet.id]||(o[v.facet.id]=[])).push(v);let l=Object.create(null),c=[],f=[];for(let v of s)l[v.id]=f.length<<1,f.push(O=>v.slot(O));let h=n==null?void 0:n.config.facets;for(let v in o){let O=o[v],y=O[0].facet,S=h&&h[v]||[];if(O.every(w=>w.type==0))if(l[y.id]=c.length<<1|1,Xp(S,O))c.push(n.facet(y));else{let w=y.combine(O.map(_=>_.value));c.push(n&&y.compare(w,n.facet(y))?n.facet(y):w)}else{for(let w of O)w.type==0?(l[w.id]=c.length<<1|1,c.push(w.value)):(l[w.id]=f.length<<1,f.push(_=>w.dynamicSlot(_)));l[y.id]=f.length<<1,f.push(w=>SU(w,y,O))}}let g=f.map(v=>v(l));return new kc(e,a,g,l,c,o)}}function _U(i,e,t){let n=[[],[],[],[],[]],s=new Map;function o(a,l){let c=s.get(a);if(c!=null){if(c<=l)return;let f=n[c].indexOf(a);f>-1&&n[c].splice(f,1),a instanceof $f&&t.delete(a.compartment)}if(s.set(a,l),Array.isArray(a))for(let f of a)o(f,l);else if(a instanceof $f){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let f=e.get(a.compartment)||a.inner;t.set(a.compartment,f),o(f,l)}else if(a instanceof WO)o(a.inner,a.prec);else if(a instanceof kn)n[l].push(a),a.provides&&o(a.provides,l);else if(a instanceof dc)n[l].push(a),a.facet.extensions&&o(a.facet.extensions,So.default);else{let f=a.extension;if(!f)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(f,l)}}return o(i,So.default),n.reduce((a,l)=>a.concat(l))}function dl(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function xc(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const YO=Le.define(),Tf=Le.define({combine:i=>i.some(e=>e),static:!0}),GO=Le.define({combine:i=>i.length?i[0]:void 0,static:!0}),JO=Le.define(),KO=Le.define(),eC=Le.define(),tC=Le.define({combine:i=>i.length?i[0]:!1});class Ni{constructor(e,t){this.type=e,this.value=t}static define(){return new wU}}class wU{of(e){return new Ni(this,e)}}class kU{constructor(e){this.map=e}of(e){return new ot(this,e)}}class ot{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ot(this.type,t)}is(e){return this.type==e}static define(e={}){return new kU(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let o=s.map(t);o&&n.push(o)}return n}}ot.reconfigure=ot.define();ot.appendConfig=ot.define();class hn{constructor(e,t,n,s,o,a){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,n&&FO(n,t.newLength),o.some(l=>l.type==hn.time)||(this.annotations=o.concat(hn.time.of(Date.now())))}static create(e,t,n,s,o,a){return new hn(e,t,n,s,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(hn.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}hn.time=Ni.define();hn.userEvent=Ni.define();hn.addToHistory=Ni.define();hn.remote=Ni.define();function xU(i,e){let t=[];for(let n=0,s=0;;){let o,a;if(n<i.length&&(s==e.length||e[s]>=i[n]))o=i[n++],a=i[n++];else if(s<e.length)o=e[s++],a=e[s++];else return t;!t.length||t[t.length-1]<o?t.push(o,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function nC(i,e,t){var n;let s,o,a;return t?(s=e.changes,o=On.empty(e.changes.length),a=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),o=i.changes.mapDesc(e.changes,!0),a=i.changes.compose(s)),{changes:a,selection:e.selection?e.selection.map(o):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:ot.mapEffects(i.effects,s).concat(ot.mapEffects(e.effects,o)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function Rf(i,e,t){let n=e.selection,s=oa(e.annotations);return e.userEvent&&(s=s.concat(hn.userEvent.of(e.userEvent))),{changes:e.changes instanceof On?e.changes:On.of(e.changes||[],t,i.facet(GO)),selection:n&&(n instanceof me?n:me.single(n.anchor,n.head)),effects:oa(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function sC(i,e,t){let n=Rf(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(t=!1);let a=!!e[o].sequential;n=nC(n,Rf(i,e[o],a?n.changes.newLength:i.doc.length),a)}let s=hn.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return $U(t?PU(s):s)}function PU(i){let e=i.startState,t=!0;for(let s of e.facet(JO)){let o=s(i);if(o===!1){t=!1;break}Array.isArray(o)&&(t=t===!0?o:xU(t,o))}if(t!==!0){let s,o;if(t===!1)o=i.changes.invertedDesc,s=On.empty(e.doc.length);else{let a=i.changes.filter(t);s=a.changes,o=a.filtered.mapDesc(a.changes).invertedDesc}i=hn.create(e,s,i.selection&&i.selection.map(o),ot.mapEffects(i.effects,o),i.annotations,i.scrollIntoView)}let n=e.facet(KO);for(let s=n.length-1;s>=0;s--){let o=n[s](i);o instanceof hn?i=o:Array.isArray(o)&&o.length==1&&o[0]instanceof hn?i=o[0]:i=sC(e,oa(o),!1)}return i}function $U(i){let e=i.startState,t=e.facet(eC),n=i;for(let s=t.length-1;s>=0;s--){let o=t[s](i);o&&Object.keys(o).length&&(n=nC(n,Rf(e,o,i.changes.newLength),!0))}return n==i?i:hn.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const TU=[];function oa(i){return i==null?TU:Array.isArray(i)?i:[i]}var Ft=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(Ft||(Ft={}));const RU=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let If;try{If=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function IU(i){if(If)return If.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||RU.test(t)))return!0}return!1}function QU(i){return e=>{if(!/\S/.test(e))return Ft.Space;if(IU(e))return Ft.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return Ft.Word;return Ft.Other}}class yt{constructor(e,t,n,s,o,a){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)dl(this,l<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return dl(this,n),xc(this,n)}update(...e){return sC(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let l of e.effects)l.is(Il.reconfigure)?(t&&(s=new Map,t.compartments.forEach((c,f)=>s.set(f,c)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(ot.reconfigure)?(t=null,n=l.value):l.is(ot.appendConfig)&&(t=null,n=oa(n).concat(l.value));let o;t?o=e.startState.values.slice():(t=kc.resolve(n,s,this),o=new yt(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,f)=>f.reconfigure(c,this),null).values);let a=e.startState.facet(Tf)?e.newSelection:e.newSelection.asSingle();new yt(t,e.newDoc,a,o,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:me.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),o=[n.range],a=oa(n.effects);for(let l=1;l<t.ranges.length;l++){let c=e(t.ranges[l]),f=this.changes(c.changes),h=f.map(s);for(let v=0;v<l;v++)o[v]=o[v].map(h);let g=s.mapDesc(f,!0);o.push(c.range.map(g)),s=s.compose(h),a=ot.mapEffects(a,h).concat(ot.mapEffects(oa(c.effects),g))}return{changes:s,selection:me.create(o,t.mainIndex),effects:a}}changes(e=[]){return e instanceof On?e:On.of(e,this.doc.length,this.facet(yt.lineSeparator))}toText(e){return kt.of(e.split(this.facet(yt.lineSeparator)||wf))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(dl(this,t),xc(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof kn&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let o in n)if(Object.prototype.hasOwnProperty.call(e,o)){let a=n[o],l=e[o];s.push(a.init(c=>a.spec.fromJSON(l,c)))}}return yt.create({doc:e.doc,selection:me.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=kc.resolve(e.extensions||[],new Map),n=e.doc instanceof kt?e.doc:kt.of((e.doc||"").split(t.staticFacet(yt.lineSeparator)||wf)),s=e.selection?e.selection instanceof me?e.selection:me.single(e.selection.anchor,e.selection.head):me.single(0);return FO(s,n.length),t.staticFacet(Tf)||(s=s.asSingle()),new yt(t,n,s,t.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(yt.tabSize)}get lineBreak(){return this.facet(yt.lineSeparator)||`
`}get readOnly(){return this.facet(tC)}phrase(e,...t){for(let n of this.facet(yt.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let o=+(s||1);return!o||o>t.length?n:t[o-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let o of this.facet(YO))for(let a of o(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&s.push(a[e]);return s}charCategorizer(e){return QU(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-n,l=e-n;for(;a>0;){let c=Mn(t,a,!1);if(o(t.slice(c,a))!=Ft.Word)break;a=c}for(;l<s;){let c=Mn(t,l);if(o(t.slice(l,c))!=Ft.Word)break;l=c}return a==l?null:me.range(a+n,l+n)}}yt.allowMultipleSelections=Tf;yt.tabSize=Le.define({combine:i=>i.length?i[0]:4});yt.lineSeparator=GO;yt.readOnly=tC;yt.phrases=Le.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}});yt.languageData=YO;yt.changeFilter=JO;yt.transactionFilter=KO;yt.transactionExtender=eC;Il.reconfigure=ot.define();function hi(i,e,t={}){let n={};for(let s of i)for(let o of Object.keys(s)){let a=s[o],l=n[o];if(l===void 0)n[o]=a;else if(!(l===a||a===void 0))if(Object.hasOwnProperty.call(t,o))n[o]=t[o](l,a);else throw new Error("Config merge conflict for field "+o)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class Ro{eq(e){return this==e}range(e,t=e){return Qf.create(e,t,this)}}Ro.prototype.startSide=Ro.prototype.endSide=0;Ro.prototype.point=!1;Ro.prototype.mapMode=An.TrackDel;let Qf=class iC{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new iC(e,t,n)}};function Af(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class jp{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let o=n?this.to:this.from;for(let a=s,l=o.length;;){if(a==l)return a;let c=a+l>>1,f=o[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==a)return f>=0?a:l;f>=0?l=c:a=c+1}}between(e,t,n,s){for(let o=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,o);o<a;o++)if(s(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,t){let n=[],s=[],o=[],a=-1,l=-1;for(let c=0;c<this.value.length;c++){let f=this.value[c],h=this.from[c]+e,g=this.to[c]+e,v,O;if(h==g){let y=t.mapPos(h,f.startSide,f.mapMode);if(y==null||(v=O=y,f.startSide!=f.endSide&&(O=t.mapPos(h,f.endSide),O<v)))continue}else if(v=t.mapPos(h,f.startSide),O=t.mapPos(g,f.endSide),v>O||v==O&&f.startSide>0&&f.endSide<=0)continue;(O-v||f.endSide-f.startSide)<0||(a<0&&(a=v),f.point&&(l=Math.max(l,O-v)),n.push(f),s.push(v-a),o.push(O-a))}return{mapped:n.length?new jp(s,o,n,l):null,pos:a}}}class xt{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new xt(e,t,n,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:s=0,filterTo:o=this.length}=e,a=e.filter;if(t.length==0&&!a)return this;if(n&&(t=t.slice().sort(Af)),this.isEmpty)return t.length?xt.of(t):this;let l=new oC(this,null,-1).goto(0),c=0,f=[],h=new Ti;for(;l.value||c<t.length;)if(c<t.length&&(l.from-t[c].from||l.startSide-t[c].value.startSide)>=0){let g=t[c++];h.addInner(g.from,g.to,g.value)||f.push(g)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(l.chunkIndex)<t[c].from)&&(!a||s>this.chunkEnd(l.chunkIndex)||o<this.chunkPos[l.chunkIndex])&&h.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!a||s>l.to||o<l.from||a(l.from,l.to,l.value))&&(h.addInner(l.from,l.to,l.value)||f.push(Qf.create(l.from,l.to,l.value))),l.next());return h.finishInner(this.nextLayer.isEmpty&&!f.length?xt.empty:this.nextLayer.update({add:f,filter:a,filterFrom:s,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let a=0;a<this.chunk.length;a++){let l=this.chunkPos[a],c=this.chunk[a],f=e.touchesRange(l,l+c.length);if(f===!1)s=Math.max(s,c.maxPoint),t.push(c),n.push(e.mapPos(l));else if(f===!0){let{mapped:h,pos:g}=c.map(l,e);h&&(s=Math.max(s,h.maxPoint),t.push(h),n.push(g))}}let o=this.nextLayer.map(e);return t.length==0?o:new xt(n,t,o||xt.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let o=this.chunkPos[s],a=this.chunk[s];if(t>=o&&e<=o+a.length&&a.between(o,e-o,t-o,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return gl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return gl.from(e).goto(t)}static compare(e,t,n,s,o=-1){let a=e.filter(g=>g.maxPoint>0||!g.isEmpty&&g.maxPoint>=o),l=t.filter(g=>g.maxPoint>0||!g.isEmpty&&g.maxPoint>=o),c=Pv(a,l,n),f=new Fa(a,c,o),h=new Fa(l,c,o);n.iterGaps((g,v,O)=>$v(f,g,h,v,O,s)),n.empty&&n.length==0&&$v(f,0,h,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=999999999);let o=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),a=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let l=Pv(o,a),c=new Fa(o,l,0).goto(n),f=new Fa(a,l,0).goto(n);for(;;){if(c.to!=f.to||!Nf(c.active,f.active)||c.point&&(!f.point||!c.point.eq(f.point)))return!1;if(c.to>s)return!0;c.next(),f.next()}}static spans(e,t,n,s,o=-1){let a=new Fa(e,null,o).goto(t),l=t,c=a.openStart;for(;;){let f=Math.min(a.to,n);if(a.point){let h=a.activeForPoint(a.to),g=a.pointFrom<t?h.length+1:a.point.startSide<0?h.length:Math.min(h.length,c);s.point(l,f,a.point,h,g,a.pointRank),c=Math.min(a.openEnd(f),h.length)}else f>l&&(s.span(l,f,a.active,c),c=a.openEnd(f));if(a.to>n)return c+(a.point&&a.to>n?1:0);l=a.to,a.next()}}static of(e,t=!1){let n=new Ti;for(let s of e instanceof Qf?[e]:t?AU(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return xt.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=xt.empty;s=s.nextLayer)t=new xt(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}xt.empty=new xt([],[],null,-1);function AU(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(Af(e,n)>0)return i.slice().sort(Af);e=n}return i}xt.empty.nextLayer=xt.empty;class Ti{finishChunk(e){this.chunks.push(new jp(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ti)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(xt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=xt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Pv(i,e,t){let n=new Map;for(let o of i)for(let a=0;a<o.chunk.length;a++)o.chunk[a].maxPoint<=0&&n.set(o.chunk[a],o.chunkPos[a]);let s=new Set;for(let o of e)for(let a=0;a<o.chunk.length;a++){let l=n.get(o.chunk[a]);l!=null&&(t?t.mapPos(l):l)==o.chunkPos[a]&&!(t!=null&&t.touchesRange(l,l+o.chunk[a].length))&&s.add(o.chunk[a])}return s}class oC{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class gl{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let o=0;o<e.length;o++)for(let a=e[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=n&&s.push(new oC(a,t,n,o));return s.length==1?s[0]:new gl(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Xu(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Xu(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Xu(this.heap,0)}}}function Xu(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class Fa{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=gl.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Er(this.active,e),Er(this.activeTo,e),Er(this.activeRank,e),this.minActive=Tv(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:o}=this.cursor;for(;t<this.activeRank.length&&(o-this.activeRank[t]||s-this.activeTo[t])>0;)t++;Br(this.active,t,n),Br(this.activeTo,t,s),Br(this.activeRank,t,o),e&&Br(e,t,this.cursor.from),this.minActive=Tv(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),n&&Er(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function $v(i,e,t,n,s,o){i.goto(e),t.goto(n);let a=n+s,l=n,c=n-e;for(;;){let f=i.to+c-t.to,h=f||i.endSide-t.endSide,g=h<0?i.to+c:t.to,v=Math.min(g,a);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Nf(i.activeForPoint(i.to),t.activeForPoint(t.to))||o.comparePoint(l,v,i.point,t.point):v>l&&!Nf(i.active,t.active)&&o.compareRange(l,v,i.active,t.active),g>a)break;(f||i.openEnd!=t.openEnd)&&o.boundChange&&o.boundChange(g),l=g,h<=0&&i.next(),h>=0&&t.next()}}function Nf(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!i[t].eq(e[t]))return!1;return!0}function Er(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function Br(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function Tv(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function wa(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=Mn(i,s));return n}function Mf(i,e,t,n){for(let s=0,o=0;;){if(o>=e)return s;if(s==i.length)break;o+=i.charCodeAt(s)==9?t-o%t:1,s=Mn(i,s)}return n===!0?-1:i.length}const Lf="ͼ",Rv=typeof Symbol>"u"?"__"+Lf:Symbol.for(Lf),Uf=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Iv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class eo{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,f){let h=[],g=/^@(\w+)\b/.exec(a[0]),v=g&&g[1]=="keyframes";if(g&&l==null)return c.push(a[0]+";");for(let O in l){let y=l[O];if(/&/.test(O))o(O.split(/,\s*/).map(S=>a.map(w=>S.replace(/&/,w))).reduce((S,w)=>S.concat(w)),y,c);else if(y&&typeof y=="object"){if(!g)throw new RangeError("The value of a property ("+O+") should be a primitive value.");o(s(O),y,h,v)}else y!=null&&h.push(O.replace(/_.*/,"").replace(/[A-Z]/g,S=>"-"+S.toLowerCase())+": "+y+";")}(h.length||v)&&c.push((n&&!g&&!f?a.map(n):a).join(", ")+" {"+h.join(" ")+"}")}for(let a in e)o(s(a),e[a],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=Iv[Rv]||1;return Iv[Rv]=e+1,Lf+e.toString(36)}static mount(e,t,n){let s=e[Uf],o=n&&n.nonce;s?o&&s.setNonce(o):s=new NU(e,o),s.mount(Array.isArray(t)?t:[t],e)}}let Qv=new Map;class NU{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let o=Qv.get(n);if(o)return e[Uf]=o;this.sheet=new s.CSSStyleSheet,Qv.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Uf]=this}mount(e,t){let n=this.sheet,s=0,o=0;for(let a=0;a<e.length;a++){let l=e[a],c=this.modules.indexOf(l);if(c<o&&c>-1&&(this.modules.splice(c,1),o--,c=-1),c==-1){if(this.modules.splice(o++,0,l),n)for(let f=0;f<l.rules.length;f++)n.insertRule(l.rules[f],s++)}else{for(;o<c;)s+=this.modules[o++].rules.length;s+=l.rules.length,o++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let c=0;c<this.modules.length;c++)a+=this.modules[c].getRules()+`
`;this.styleTag.textContent=a;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var to={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},vl={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},MU=typeof navigator<"u"&&/Mac/.test(navigator.platform),LU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Qn=0;Qn<10;Qn++)to[48+Qn]=to[96+Qn]=String(Qn);for(var Qn=1;Qn<=24;Qn++)to[Qn+111]="F"+Qn;for(var Qn=65;Qn<=90;Qn++)to[Qn]=String.fromCharCode(Qn+32),vl[Qn]=String.fromCharCode(Qn);for(var ju in to)vl.hasOwnProperty(ju)||(vl[ju]=to[ju]);function UU(i){var e=MU&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||LU&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?vl:to)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function bl(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function Df(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function uc(i,e){if(!e.anchorNode)return!1;try{return Df(i,e.anchorNode)}catch{return!1}}function fa(i){return i.nodeType==3?Qo(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function ul(i,e,t,n){return t?Av(i,e,t,n,-1)||Av(i,e,t,n,1):!1}function Io(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function Pc(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Av(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:pi(i))){if(i.nodeName=="DIV")return!1;let o=i.parentNode;if(!o||o.nodeType!=1)return!1;e=Io(i)+(s<0?0:1),i=o}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?pi(i):0}else return!1}}function pi(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function Ql(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function DU(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function aC(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function qU(i,e,t,n,s,o,a,l){let c=i.ownerDocument,f=c.defaultView||window;for(let h=i,g=!1;h&&!g;)if(h.nodeType==1){let v,O=h==c.body,y=1,S=1;if(O)v=DU(f);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(g=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let $=h.getBoundingClientRect();({scaleX:y,scaleY:S}=aC(h,$)),v={left:$.left,right:$.left+h.clientWidth*y,top:$.top,bottom:$.top+h.clientHeight*S}}let w=0,_=0;if(s=="nearest")e.top<v.top?(_=e.top-(v.top+a),t>0&&e.bottom>v.bottom+_&&(_=e.bottom-v.bottom+a)):e.bottom>v.bottom&&(_=e.bottom-v.bottom+a,t<0&&e.top-_<v.top&&(_=e.top-(v.top+a)));else{let $=e.bottom-e.top,A=v.bottom-v.top;_=(s=="center"&&$<=A?e.top+$/2-A/2:s=="start"||s=="center"&&t<0?e.top-a:e.bottom-A+a)-v.top}if(n=="nearest"?e.left<v.left?(w=e.left-(v.left+o),t>0&&e.right>v.right+w&&(w=e.right-v.right+o)):e.right>v.right&&(w=e.right-v.right+o,t<0&&e.left<v.left+w&&(w=e.left-(v.left+o))):w=(n=="center"?e.left+(e.right-e.left)/2-(v.right-v.left)/2:n=="start"==l?e.left-o:e.right-(v.right-v.left)+o)-v.left,w||_)if(O)f.scrollBy(w,_);else{let $=0,A=0;if(_){let R=h.scrollTop;h.scrollTop+=_/S,A=(h.scrollTop-R)*S}if(w){let R=h.scrollLeft;h.scrollLeft+=w/y,$=(h.scrollLeft-R)*y}e={left:e.left-$,top:e.top-A,right:e.right-$,bottom:e.bottom-A},$&&Math.abs($-w)<1&&(n="nearest"),A&&Math.abs(A-_)<1&&(s="nearest")}if(O)break;(e.top<v.top||e.bottom>v.bottom||e.left<v.left||e.right>v.right)&&(e={left:Math.max(e.left,v.left),right:Math.min(e.right,v.right),top:Math.max(e.top,v.top),bottom:Math.min(e.bottom,v.bottom)}),h=h.assignedSlot||h.parentNode}else if(h.nodeType==11)h=h.host;else break}function EU(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:n}}class BU{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?pi(t):0),n,Math.min(e.focusOffset,n?pi(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let Go=null;function lC(i){if(i.setActive)return i.setActive();if(Go)return i.focus(Go);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(Go==null?{get preventScroll(){return Go={preventScroll:!0},!0}}:void 0),!Go){Go=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],o=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=o&&(n.scrollLeft=o)}}}let Nv;function Qo(i,e,t=e){let n=Nv||(Nv=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function aa(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let o=new KeyboardEvent("keydown",s);o.synthetic=!0,i.dispatchEvent(o);let a=new KeyboardEvent("keyup",s);return a.synthetic=!0,i.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function ZU(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function rC(i){for(;i.attributes.length;)i.removeAttributeNode(i.attributes[0])}function zU(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,pi(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=pi(t))}else{if(t==i)return!0;n=Io(t),t=t.parentNode}}function cC(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function dC(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=pi(t)}else if(t.parentNode&&!Pc(t))n=Io(t),t=t.parentNode;else return null}}function uC(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!Pc(t))n=Io(t)+1,t=t.parentNode;else return null}}class Bn{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Bn(e.parentNode,Io(e),t)}static after(e,t){return new Bn(e.parentNode,Io(e)+1,t)}}const Vp=[];class Mt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,s=null,o;for(let a of this.children){if(a.flags&7){if(!a.dom&&(o=s?s.nextSibling:n.firstChild)){let l=Mt.get(o);(!l||!l.parent&&l.canReuseDOM(a))&&a.reuseDOM(o)}a.sync(e,t),a.flags&=-8}if(o=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&o!=a.dom&&(t.written=!0),a.dom.parentNode==n)for(;o&&o!=a.dom;)o=Mv(o);else n.insertBefore(a.dom,o);s=a.dom}for(o=s?s.nextSibling:n.firstChild,o&&t&&t.node==n&&(t.written=!0);o;)o=Mv(o)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let s=pi(e)==0?0:t==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;s==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?s=-1:s=1),e=o}s<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Mt.get(n);)n=n.nextSibling;if(!n)return this.length;for(let s=0,o=0;;s++){let a=this.children[s];if(a.dom==n)return o;o+=a.length+a.breakAfter}}domBoundsAround(e,t,n=0){let s=-1,o=-1,a=-1,l=-1;for(let c=0,f=n,h=n;c<this.children.length;c++){let g=this.children[c],v=f+g.length;if(f<e&&v>t)return g.domBoundsAround(e,t,f);if(v>=e&&s==-1&&(s=c,o=f),f>t&&g.dom.parentNode==this.dom){a=c,l=h;break}h=v,f=v+g.breakAfter}return{from:o,to:l<0?n+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=Vp){this.markDirty();for(let s=e;s<t;s++){let o=this.children[s];o.parent==this&&n.indexOf(o)<0&&o.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let s=0;s<n.length;s++)n[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new fC(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,s,o,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Mt.prototype.breakAfter=0;function Mv(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class fC{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function pC(i,e,t,n,s,o,a,l,c){let{children:f}=i,h=f.length?f[e]:null,g=o.length?o[o.length-1]:null,v=g?g.breakAfter:a;if(!(e==n&&h&&!a&&!v&&o.length<2&&h.merge(t,s,o.length?g:null,t==0,l,c))){if(n<f.length){let O=f[n];O&&(s<O.length||O.breakAfter&&(g!=null&&g.breakAfter))?(e==n&&(O=O.split(s),s=0),!v&&g&&O.merge(0,s,g,!0,0,c)?o[o.length-1]=O:((s||O.children.length&&!O.children[0].length)&&O.merge(0,s,null,!1,0,c),o.push(O))):O!=null&&O.breakAfter&&(g?g.breakAfter=1:a=1),n++}for(h&&(h.breakAfter=a,t>0&&(!a&&o.length&&h.merge(t,h.length,o[0],!1,l,0)?h.breakAfter=o.shift().breakAfter:(t<h.length||h.children.length&&h.children[h.children.length-1].length==0)&&h.merge(t,h.length,null,!1,l,0),e++));e<n&&o.length;)if(f[n-1].become(o[o.length-1]))n--,o.pop(),c=o.length?0:l;else if(f[e].become(o[0]))e++,o.shift(),l=o.length?0:c;else break;!o.length&&e&&n<f.length&&!f[e-1].breakAfter&&f[n].merge(0,0,f[e-1],!1,l,c)&&e--,(e<n||o.length)&&i.replaceChildren(e,n,o)}}function hC(i,e,t,n,s,o){let a=i.childCursor(),{i:l,off:c}=a.findPos(t,1),{i:f,off:h}=a.findPos(e,-1),g=e-t;for(let v of n)g+=v.length;i.length+=g,pC(i,f,h,l,c,n,0,s,o)}let os=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},qf=typeof document<"u"?document:{documentElement:{style:{}}};const Ef=/Edge\/(\d+)/.exec(os.userAgent),mC=/MSIE \d/.test(os.userAgent),Bf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(os.userAgent),ed=!!(mC||Bf||Ef),Lv=!ed&&/gecko\/(\d+)/i.test(os.userAgent),Vu=!ed&&/Chrome\/(\d+)/.exec(os.userAgent),HU="webkitFontSmoothing"in qf.documentElement.style,gC=!ed&&/Apple Computer/.test(os.vendor),Uv=gC&&(/Mobile\/\w+/.test(os.userAgent)||os.maxTouchPoints>2);var Ue={mac:Uv||/Mac/.test(os.platform),windows:/Win/.test(os.platform),linux:/Linux|X11/.test(os.platform),ie:ed,ie_version:mC?qf.documentMode||6:Bf?+Bf[1]:Ef?+Ef[1]:0,gecko:Lv,gecko_version:Lv?+(/Firefox\/(\d+)/.exec(os.userAgent)||[0,0])[1]:0,chrome:!!Vu,chrome_version:Vu?+Vu[1]:0,ios:Uv,android:/Android\b/.test(os.userAgent),safari:gC,webkit_version:HU?+(/\bAppleWebKit\/(\d+)/.exec(os.userAgent)||[0,0])[1]:0,tabSize:qf.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const XU=256;class Vs extends Mt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Vs)||this.length-(t-e)+n.length>XU||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Vs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Bn(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return jU(this.dom,e,t)}}class Ri extends Mt{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let s of t)s.setParent(this)}setAttrs(e){if(rC(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,s,o,a){return n&&(!(n instanceof Ri&&n.mark.eq(this.mark))||e&&o<=0||t<this.length&&a<=0)?!1:(hC(this,e,t,n?n.children.slice():[],o-1,a-1),this.markDirty(),!0)}split(e){let t=[],n=0,s=-1,o=0;for(let l of this.children){let c=n+l.length;c>e&&t.push(n<e?l.split(e-n):l),s<0&&n>=e&&(s=o),n=c,o++}let a=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ri(this.mark,t,a)}domAtPos(e){return vC(this,e)}coordsAt(e,t){return OC(this,e,t)}}function jU(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let s=e,o=e,a=0;e==0&&t<0||e==n&&t>=0?Ue.chrome||Ue.gecko||(e?(s--,a=1):o<n&&(o++,a=-1)):t<0?s--:o<n&&o++;let l=Qo(i,s,o).getClientRects();if(!l.length)return null;let c=l[(a?a<0:t>=0)?0:l.length-1];return Ue.safari&&!a&&c.width==0&&(c=Array.prototype.find.call(l,f=>f.width)||c),a?Ql(c,a<0):c||null}class Wi extends Mt{static create(e,t,n){return new Wi(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Wi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,s,o,a){return n&&(!(n instanceof Wi)||!this.widget.compare(n.widget)||e>0&&o<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Wi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return kt.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,s=this.posAtStart;return n?n.slice(s,s+this.length):kt.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Bn.before(this.dom):Bn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.side?this.side<0:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return Ql(o,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class pa extends Mt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof pa&&e.side==this.side}split(){return new pa(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Bn.before(this.dom):Bn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return kt.empty}get isHidden(){return!0}}Vs.prototype.children=Wi.prototype.children=pa.prototype.children=Vp;function vC(i,e){let t=i.dom,{children:n}=i,s=0;for(let o=0;s<n.length;s++){let a=n[s],l=o+a.length;if(!(l==o&&a.getSide()<=0)){if(e>o&&e<l&&a.dom.parentNode==t)return a.domAtPos(e-o);if(e<=o)break;o=l}}for(let o=s;o>0;o--){let a=n[o-1];if(a.dom.parentNode==t)return a.domAtPos(a.length)}for(let o=s;o<n.length;o++){let a=n[o];if(a.dom.parentNode==t)return a.domAtPos(0)}return new Bn(t,0)}function bC(i,e,t){let n,{children:s}=i;t>0&&e instanceof Ri&&s.length&&(n=s[s.length-1])instanceof Ri&&n.mark.eq(e.mark)?bC(n,e.children[0],t-1):(s.push(e),e.setParent(i)),i.length+=e.length}function OC(i,e,t){let n=null,s=-1,o=null,a=-1;function l(f,h){for(let g=0,v=0;g<f.children.length&&v<=h;g++){let O=f.children[g],y=v+O.length;y>=h&&(O.children.length?l(O,h-v):(!o||o.isHidden&&(t>0||FU(o,O)))&&(y>h||v==y&&O.getSide()>0)?(o=O,a=h-v):(v<h||v==y&&O.getSide()<0&&!O.isHidden)&&(n=O,s=h-v)),v=y}}l(i,e);let c=(t<0?n:o)||n||o;return c?c.coordsAt(Math.max(0,c==n?s:a),t):VU(i)}function VU(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=fa(e);return t[t.length-1]||null}function FU(i,e){let t=i.coordsAt(0,1),n=e.coordsAt(0,1);return t&&n&&n.top<t.bottom}function Zf(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const Dv=Object.create(null);function $c(i,e,t){if(i==e)return!0;i||(i=Dv),e||(e=Dv);let n=Object.keys(i),s=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let o of n)if(o!=t&&(s.indexOf(o)==-1||i[o]!==e[o]))return!1;return!0}function zf(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function WU(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class mi{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Yn=function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i}(Yn||(Yn={}));class We extends Ro{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Al(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new no(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:o,end:a}=CC(e,t);n=(o?t?-3e8:-1:5e8)-1,s=(a?t?2e8:1:-6e8)+1}return new no(e,n,s,t,e.widget||null,!0)}static line(e){return new Nl(e)}static set(e,t=!1){return xt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}We.none=xt.empty;class Al extends We{constructor(e){let{start:t,end:n}=CC(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Al&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&$c(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Al.prototype.point=!1;class Nl extends We{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Nl&&this.spec.class==e.spec.class&&$c(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Nl.prototype.mapMode=An.TrackBefore;Nl.prototype.point=!0;class no extends We{constructor(e,t,n,s,o,a){super(t,n,o,e),this.block=s,this.isReplace=a,this.mapMode=s?t<=0?An.TrackBefore:An.TrackAfter:An.TrackDel}get type(){return this.startSide!=this.endSide?Yn.WidgetRange:this.startSide<=0?Yn.WidgetBefore:Yn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof no&&YU(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}no.prototype.point=!0;function CC(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function YU(i,e){return i==e||!!(i&&e&&i.compare(e))}function fc(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class pn extends Mt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,o,a){if(n){if(!(n instanceof pn))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),hC(this,e,t,n?n.children.slice():[],o,a),!0}split(e){let t=new pn;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:s}=this.childPos(e);s&&(t.append(this.children[n].split(s),0),this.children[n].merge(s,this.children[n].length,null,!1,0,0),n++);for(let o=n;o<this.children.length;o++)t.append(this.children[o],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){$c(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){bC(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Zf(t,this.attrs||{})),n&&(this.attrs=Zf({class:n},this.attrs||{}))}domAtPos(e){return vC(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(rC(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(zf(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&Mt.get(s)instanceof Ri;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((n=Mt.get(s))===null||n===void 0?void 0:n.isEditable)==!1&&(!Ue.ios||!this.children.some(o=>o instanceof Vs))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Vs)||/[^ -~]/.test(n.text))return null;let s=fa(n.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=OC(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:s}=this.parent.view.viewState,o=n.bottom-n.top;if(Math.abs(o-s.lineHeight)<2&&s.textHeight<o){let a=(o-s.textHeight)/2;return{top:n.top+a,bottom:n.bottom-a,left:n.left,right:n.left}}}return n}become(e){return e instanceof pn&&this.children.length==0&&e.children.length==0&&$c(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,s=0;n<e.children.length;n++){let o=e.children[n],a=s+o.length;if(a>=t){if(o instanceof pn)return o;if(a>t)break}s=a+o.breakAfter}return null}}class $i extends Mt{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,o,a){return n&&(!(n instanceof $i)||!this.widget.compare(n.widget)||e>0&&o<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Bn.before(this.dom):Bn.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new $i(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return Vp}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):kt.empty}domBoundsAround(){return null}become(e){return e instanceof $i&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof Hf?null:Ql(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class Hf extends mi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class fl{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof $i&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new pn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Zr(new pa(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof $i)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Zr(new Vs(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,o,a){if(this.disallowBlockEffectsFor[a]&&n instanceof no){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(n instanceof no)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new $i(n.widget||ha.block,l,n));else{let c=Wi.create(n.widget||ha.inline,l,l?0:n.startSide),f=this.atCursorPos&&!c.isEditable&&o<=s.length&&(e<t||n.startSide>0),h=!c.isEditable&&(e<t||o>s.length||n.startSide<=0),g=this.getLine();this.pendingBuffer==2&&!f&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),f&&(g.append(Zr(new pa(1),s),o),o=s.length+Math.max(0,o-s.length)),g.append(Zr(c,s),o),this.atCursorPos=h,this.pendingBuffer=h?e<t||o>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,s,o){let a=new fl(e,t,n,o);return a.openEnd=xt.spans(s,t,n,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function Zr(i,e){for(let t of e)i=new Ri(t,[i],i.length);return i}class ha extends mi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ha.inline=new ha("span");ha.block=new ha("div");var Bt=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Bt||(Bt={}));const Ao=Bt.LTR,Fp=Bt.RTL;function yC(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const GU=yC("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),JU=yC("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Xf=Object.create(null),ti=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);Xf[e]=t,Xf[t]=-e}function SC(i){return i<=247?GU[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?JU[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const KU=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Yi{get dir(){return this.level%2?Fp:Ao}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let o=-1;for(let a=0;a<e.length;a++){let l=e[a];if(l.from<=t&&l.to>=t){if(l.level==n)return a;(o<0||(s!=0?s<0?l.from<t:l.to>t:e[o].level>l.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function _C(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!_C(n.inner,s.inner))return!1}return!0}const Nt=[];function eD(i,e,t,n,s){for(let o=0;o<=n.length;o++){let a=o?n[o-1].to:e,l=o<n.length?n[o].from:t,c=o?256:s;for(let f=a,h=c,g=c;f<l;f++){let v=SC(i.charCodeAt(f));v==512?v=h:v==8&&g==4&&(v=16),Nt[f]=v==4?2:v,v&7&&(g=v),h=v}for(let f=a,h=c,g=c;f<l;f++){let v=Nt[f];if(v==128)f<l-1&&h==Nt[f+1]&&h&24?v=Nt[f]=h:Nt[f]=256;else if(v==64){let O=f+1;for(;O<l&&Nt[O]==64;)O++;let y=f&&h==8||O<t&&Nt[O]==8?g==1?1:8:256;for(let S=f;S<O;S++)Nt[S]=y;f=O-1}else v==8&&g==1&&(Nt[f]=1);h=v,v&7&&(g=v)}}}function tD(i,e,t,n,s){let o=s==1?2:1;for(let a=0,l=0,c=0;a<=n.length;a++){let f=a?n[a-1].to:e,h=a<n.length?n[a].from:t;for(let g=f,v,O,y;g<h;g++)if(O=Xf[v=i.charCodeAt(g)])if(O<0){for(let S=l-3;S>=0;S-=3)if(ti[S+1]==-O){let w=ti[S+2],_=w&2?s:w&4?w&1?o:s:0;_&&(Nt[g]=Nt[ti[S]]=_),l=S;break}}else{if(ti.length==189)break;ti[l++]=g,ti[l++]=v,ti[l++]=c}else if((y=Nt[g])==2||y==1){let S=y==s;c=S?0:1;for(let w=l-3;w>=0;w-=3){let _=ti[w+2];if(_&2)break;if(S)ti[w+2]|=2;else{if(_&4)break;ti[w+2]|=4}}}}}function nD(i,e,t,n){for(let s=0,o=n;s<=t.length;s++){let a=s?t[s-1].to:i,l=s<t.length?t[s].from:e;for(let c=a;c<l;){let f=Nt[c];if(f==256){let h=c+1;for(;;)if(h==l){if(s==t.length)break;h=t[s++].to,l=s<t.length?t[s].from:e}else if(Nt[h]==256)h++;else break;let g=o==1,v=(h<e?Nt[h]:n)==1,O=g==v?g?1:2:n;for(let y=h,S=s,w=S?t[S-1].to:i;y>c;)y==w&&(y=t[--S].from,w=S?t[S-1].to:i),Nt[--y]=O;c=h}else o=f,c++}}}function jf(i,e,t,n,s,o,a){let l=n%2?2:1;if(n%2==s%2)for(let c=e,f=0;c<t;){let h=!0,g=!1;if(f==o.length||c<o[f].from){let S=Nt[c];S!=l&&(h=!1,g=S==16)}let v=!h&&l==1?[]:null,O=h?n:n+1,y=c;e:for(;;)if(f<o.length&&y==o[f].from){if(g)break e;let S=o[f];if(!h)for(let w=S.to,_=f+1;;){if(w==t)break e;if(_<o.length&&o[_].from==w)w=o[_++].to;else{if(Nt[w]==l)break e;break}}if(f++,v)v.push(S);else{S.from>c&&a.push(new Yi(c,S.from,O));let w=S.direction==Ao!=!(O%2);Vf(i,w?n+1:n,s,S.inner,S.from,S.to,a),c=S.to}y=S.to}else{if(y==t||(h?Nt[y]!=l:Nt[y]==l))break;y++}v?jf(i,c,y,n+1,s,v,a):c<y&&a.push(new Yi(c,y,O)),c=y}else for(let c=t,f=o.length;c>e;){let h=!0,g=!1;if(!f||c>o[f-1].to){let S=Nt[c-1];S!=l&&(h=!1,g=S==16)}let v=!h&&l==1?[]:null,O=h?n:n+1,y=c;e:for(;;)if(f&&y==o[f-1].to){if(g)break e;let S=o[--f];if(!h)for(let w=S.from,_=f;;){if(w==e)break e;if(_&&o[_-1].to==w)w=o[--_].from;else{if(Nt[w-1]==l)break e;break}}if(v)v.push(S);else{S.to<c&&a.push(new Yi(S.to,c,O));let w=S.direction==Ao!=!(O%2);Vf(i,w?n+1:n,s,S.inner,S.from,S.to,a),c=S.from}y=S.from}else{if(y==e||(h?Nt[y-1]!=l:Nt[y-1]==l))break;y--}v?jf(i,y,c,n+1,s,v,a):y<c&&a.push(new Yi(y,c,O)),c=y}}function Vf(i,e,t,n,s,o,a){let l=e%2?2:1;eD(i,s,o,n,l),tD(i,s,o,n,l),nD(s,o,n,l),jf(i,s,o,e,t,n,a)}function sD(i,e,t){if(!i)return[new Yi(0,0,e==Fp?1:0)];if(e==Ao&&!t.length&&!KU.test(i))return wC(i.length);if(t.length)for(;i.length>Nt.length;)Nt[Nt.length]=256;let n=[],s=e==Ao?0:1;return Vf(i,s,s,t,0,i.length,n),n}function wC(i){return[new Yi(0,i,0)]}let kC="";function iD(i,e,t,n,s){var o;let a=n.head-i.from,l=Yi.find(e,a,(o=n.bidiLevel)!==null&&o!==void 0?o:-1,n.assoc),c=e[l],f=c.side(s,t);if(a==f){let v=l+=s?1:-1;if(v<0||v>=e.length)return null;c=e[l=v],a=c.side(!s,t),f=c.side(s,t)}let h=Mn(i.text,a,c.forward(s,t));(h<c.from||h>c.to)&&(h=f),kC=i.text.slice(Math.min(a,h),Math.max(a,h));let g=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return g&&h==f&&g.level+(s?0:1)<c.level?me.cursor(g.side(!s,t)+i.from,g.forward(s,t)?1:-1,g.level):me.cursor(h+i.from,c.forward(s,t)?-1:1,c.level)}function oD(i,e,t){for(let n=e;n<t;n++){let s=SC(i.charCodeAt(n));if(s==1)return Ao;if(s==2||s==4)return Fp}return Ao}const xC=Le.define(),PC=Le.define(),$C=Le.define(),TC=Le.define(),Ff=Le.define(),RC=Le.define(),IC=Le.define(),Wp=Le.define(),Yp=Le.define(),QC=Le.define({combine:i=>i.some(e=>e)}),AC=Le.define({combine:i=>i.some(e=>e)}),NC=Le.define();class la{constructor(e,t="nearest",n="nearest",s=5,o=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new la(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new la(me.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const zr=ot.define({map:(i,e)=>i.map(e)}),MC=ot.define();function ls(i,e,t){let n=i.facet(TC);n.length?n[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Pi=Le.define({combine:i=>i.length?i[0]:!0});let aD=0;const nl=Le.define();class fn{constructor(e,t,n,s,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=o(this)}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:o,decorations:a}=t||{};return new fn(aD++,e,n,s,l=>{let c=[nl.of(l)];return a&&c.push(Ol.of(f=>{let h=f.plugin(l);return h?a(h):We.none})),o&&c.push(o(l)),c})}static fromClass(e,t){return fn.define(n=>new e(n),t)}}class Fu{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(ls(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){ls(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){ls(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const LC=Le.define(),Gp=Le.define(),Ol=Le.define(),UC=Le.define(),Jp=Le.define(),DC=Le.define();function qv(i,e){let t=i.state.facet(DC);if(!t.length)return t;let n=t.map(o=>o instanceof Function?o(i):o),s=[];return xt.spans(n,e.from,e.to,{point(){},span(o,a,l,c){let f=o-e.from,h=a-e.from,g=s;for(let v=l.length-1;v>=0;v--,c--){let O=l[v].spec.bidiIsolate,y;if(O==null&&(O=oD(e.text,f,h)),c>0&&g.length&&(y=g[g.length-1]).to==f&&y.direction==O)y.to=h,g=y.inner;else{let S={from:f,to:h,direction:O,inner:[]};g.push(S),g=S.inner}}}}),s}const qC=Le.define();function Kp(i){let e=0,t=0,n=0,s=0;for(let o of i.state.facet(qC)){let a=o(i);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(n=Math.max(n,a.top)),a.bottom!=null&&(s=Math.max(s,a.bottom)))}return{left:e,right:t,top:n,bottom:s}}const sl=Le.define();class Ds{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new Ds(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,o=0,a=0,l=0;;s++){let c=s==e.length?null:e[s],f=a-l,h=c?c.fromB:1e9;for(;o<t.length&&t[o]<h;){let g=t[o],v=t[o+1],O=Math.max(l,g),y=Math.min(h,v);if(O<=y&&new Ds(O+f,y+f,O,y).addToSet(n),v>h)break;o+=2}if(!c)return n;new Ds(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),a=c.toA,l=c.toB}}}class Tc{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=On.empty(this.startState.doc.length);for(let o of n)this.changes=this.changes.compose(o.changes);let s=[];this.changes.iterChangedRanges((o,a,l,c)=>s.push(new Ds(o,a,l,c))),this.changedRanges=s}static create(e,t,n){return new Tc(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Ev extends Mt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=We.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new pn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ds(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:f,toA:h})=>h<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!pD(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let o=s>-1?rD(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:f,to:h}=this.hasComposition;n=new Ds(f,h,e.changes.mapPos(f,-1),e.changes.mapPos(h,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ue.ie||Ue.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.updateDeco(),c=uD(a,l,e.changes);return n=Ds.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Ue.chrome||Ue.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||s.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof $i&&a.widget instanceof Hf&&o.push(a.dom);s.updateGaps(o)}updateChildren(e,t,n){let s=n?n.range.addToSet(e.slice()):e,o=this.childCursor(t);for(let a=s.length-1;;a--){let l=a>=0?s[a]:null;if(!l)break;let{fromA:c,toA:f,fromB:h,toB:g}=l,v,O,y,S;if(n&&n.range.fromB<g&&n.range.toB>h){let R=fl.build(this.view.state.doc,h,n.range.fromB,this.decorations,this.dynamicDecorationMap),k=fl.build(this.view.state.doc,n.range.toB,g,this.decorations,this.dynamicDecorationMap);O=R.breakAtStart,y=R.openStart,S=k.openEnd;let x=this.compositionView(n);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),R.content.length&&x.merge(0,0,R.content[R.content.length-1],!0,0,R.openEnd)&&R.content.pop(),v=R.content.concat(x).concat(k.content)}else({content:v,breakAtStart:O,openStart:y,openEnd:S}=fl.build(this.view.state.doc,h,g,this.decorations,this.dynamicDecorationMap));let{i:w,off:_}=o.findPos(f,1),{i:$,off:A}=o.findPos(c,-1);pC(this,$,A,w,_,v,O,y,S)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(MC)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Vs(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Ri(s,[t],t.length);let n=new pn;return n.append(t,0),n}fixCompositionDOM(e){let t=(o,a)=>{a.flags|=8|(a.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(a);let l=Mt.get(o);l&&l!=a&&(l.dom=null),a.setDOM(o)},n=this.childPos(e.range.fromB,1),s=this.children[n.i];t(e.line,s);for(let o=e.marks.length-1;o>=-1;o--)n=s.childPos(n.off,1),s=s.children[n.i],t(o>=0?e.marks[o].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,s=n==this.dom,o=!s&&!(this.view.state.facet(Pi)||this.dom.tabIndex>-1)&&uc(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(s||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(l.anchor)),f=l.empty?c:this.moveToLine(this.domAtPos(l.head));if(Ue.gecko&&l.empty&&!this.hasComposition&&lD(c)){let g=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(g,c.node.childNodes[c.offset]||null)),c=f=new Bn(g,0),a=!0}let h=this.view.observer.selectionRange;(a||!h.focusNode||(!ul(c.node,c.offset,h.anchorNode,h.anchorOffset)||!ul(f.node,f.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,l))&&(this.view.observer.ignore(()=>{Ue.android&&Ue.chrome&&this.dom.contains(h.focusNode)&&fD(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let g=bl(this.view.root);if(g)if(l.empty){if(Ue.gecko){let v=cD(c.node,c.offset);if(v&&v!=3){let O=(v==1?dC:uC)(c.node,c.offset);O&&(c=new Bn(O.node,O.offset))}}g.collapse(c.node,c.offset),l.bidiLevel!=null&&g.caretBidiLevel!==void 0&&(g.caretBidiLevel=l.bidiLevel)}else if(g.extend){g.collapse(c.node,c.offset);try{g.extend(f.node,f.offset)}catch{}}else{let v=document.createRange();l.anchor>l.head&&([c,f]=[f,c]),v.setEnd(f.node,f.offset),v.setStart(c.node,c.offset),g.removeAllRanges(),g.addRange(v)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,f)),this.impreciseAnchor=c.precise?null:new Bn(h.anchorNode,h.anchorOffset),this.impreciseHead=f.precise?null:new Bn(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ul(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=bl(e.root),{anchorNode:s,anchorOffset:o}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=pn.find(this,t.head);if(!a)return;let l=a.posAtStart;if(t.head==l||t.head==l+a.length)return;let c=this.coordsAt(t.head,-1),f=this.coordsAt(t.head,1);if(!c||!f||c.bottom>f.top)return;let h=this.domAtPos(t.head+t.assoc);n.collapse(h.node,h.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let g=e.observer.selectionRange;e.docView.posFromDOM(g.anchorNode,g.anchorOffset)!=t.from&&n.collapse(s,o)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let s=e.offset;!n&&s<t.childNodes.length;s++){let o=Mt.get(t.childNodes[s]);o instanceof pn&&(n=o.domAtPos(0))}for(let s=e.offset-1;!n&&s>=0;s--){let o=Mt.get(t.childNodes[s]);o instanceof pn&&(n=o.domAtPos(o.length))}return n?new Bn(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Mt.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(n<s.length||s instanceof pn)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,s=0;for(let o=this.length,a=this.children.length-1;a>=0;a--){let l=this.children[a],c=o-l.breakAfter,f=c-l.length;if(c<e)break;if(f<=e&&(f<e||l.covers(-1))&&(c>e||l.covers(1))&&(!n||l instanceof pn&&!(n instanceof pn&&t>=0)))n=l,s=f;else if(n&&f==e&&c==e&&l instanceof $i&&Math.abs(t)<2){if(l.deco.startSide<0)break;a&&(n=null)}o=f}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),s=this.children[t];if(!(s instanceof pn))return null;for(;s.children.length;){let{i:l,off:c}=s.childPos(n,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}n=c}if(!(s instanceof Vs))return null;let o=Mn(s.text,n);if(o==n)return null;let a=Qo(s.dom,n,o).getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l==a.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,o=this.view.contentDOM.clientWidth,a=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==Bt.LTR;for(let f=0,h=0;h<this.children.length;h++){let g=this.children[h],v=f+g.length;if(v>s)break;if(f>=n){let O=g.dom.getBoundingClientRect();if(t.push(O.height),a){let y=g.dom.lastChild,S=y?fa(y):[];if(S.length){let w=S[S.length-1],_=c?w.right-O.left:O.right-w.left;_>l&&(l=_,this.minWidth=o,this.minWidthFrom=f,this.minWidthTo=v)}}}f=v+g.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Bt.RTL:Bt.LTR}measureTextSize(){for(let o of this.children)if(o instanceof pn){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),t,n,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=fa(e.firstChild)[0];t=e.getBoundingClientRect().height,n=o?o.width/27:7,s=o?o.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new fC(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let o=s==t.viewports.length?null:t.viewports[s],a=o?o.from-1:this.length;if(a>n){let l=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(We.replace({widget:new Hf(l),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!o)break;n=o.to+1}return We.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Ol).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),n=!1,s=this.view.state.facet(UC).map((o,a)=>{let l=typeof o=="function";return l&&(n=!0),l?o(this.view):o});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(xt.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(NC))try{if(f(this.view,e.range,e))return!0}catch(h){ls(this.view.state,h,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let o=Kp(this.view),a={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;qU(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Bt.LTR)}}function lD(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function EC(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=dC(t.focusNode,t.focusOffset),s=uC(t.focusNode,t.focusOffset),o=n||s;if(s&&n&&s.node!=n.node){let l=Mt.get(s.node);if(!l||l instanceof Vs&&l.text!=s.node.nodeValue)o=s;else if(i.docView.lastCompositionAfterCursor){let c=Mt.get(n.node);!c||c instanceof Vs&&c.text!=n.node.nodeValue||(o=s)}}if(i.docView.lastCompositionAfterCursor=o!=n,!o)return null;let a=e-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}function rD(i,e,t){let n=EC(i,t);if(!n)return null;let{node:s,from:o,to:a}=n,l=s.nodeValue;if(/[\n\r]/.test(l)||i.state.doc.sliceString(n.from,n.to)!=l)return null;let c=e.invertedDesc,f=new Ds(c.mapPos(o),c.mapPos(a),o,a),h=[];for(let g=s.parentNode;;g=g.parentNode){let v=Mt.get(g);if(v instanceof Ri)h.push({node:g,deco:v.mark});else{if(v instanceof pn||g.nodeName=="DIV"&&g.parentNode==i.contentDOM)return{range:f,text:s,marks:h,line:g};if(g!=i.contentDOM)h.push({node:g,deco:new Al({inclusive:!0,attributes:WU(g),tagName:g.tagName.toLowerCase()})});else return null}}}function cD(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let dD=class{constructor(){this.changes=[]}compareRange(e,t){fc(e,t,this.changes)}comparePoint(e,t){fc(e,t,this.changes)}boundChange(e){fc(e,e,this.changes)}};function uD(i,e,t){let n=new dD;return xt.compare(i,e,t,n),n.changes}function fD(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function pD(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}function hD(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),o=e-s.from;if(s.length==0)return me.cursor(e);o==0?t=1:o==s.length&&(t=-1);let a=o,l=o;t<0?a=Mn(s.text,o,!1):l=Mn(s.text,o);let c=n(s.text.slice(a,l));for(;a>0;){let f=Mn(s.text,a,!1);if(n(s.text.slice(f,a))!=c)break;a=f}for(;l<s.length;){let f=Mn(s.text,l);if(n(s.text.slice(l,f))!=c)break;l=f}return me.range(a+s.from,l+s.from)}function mD(i,e){return e.left>i?e.left-i:Math.max(0,i-e.right)}function gD(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Wu(i,e){return i.top<e.bottom-1&&i.bottom>e.top+1}function Bv(i,e){return e<i.top?{top:e,left:i.left,right:i.right,bottom:i.bottom}:i}function Zv(i,e){return e>i.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Wf(i,e,t){let n,s,o,a,l=!1,c,f,h,g;for(let y=i.firstChild;y;y=y.nextSibling){let S=fa(y);for(let w=0;w<S.length;w++){let _=S[w];s&&Wu(s,_)&&(_=Bv(Zv(_,s.bottom),s.top));let $=mD(e,_),A=gD(t,_);if($==0&&A==0)return y.nodeType==3?zv(y,e,t):Wf(y,e,t);if(!n||a>A||a==A&&o>$){n=y,s=_,o=$,a=A;let R=A?t<_.top?-1:1:$?e<_.left?-1:1:0;l=!R||(R>0?w<S.length-1:w>0)}$==0?t>_.bottom&&(!h||h.bottom<_.bottom)?(c=y,h=_):t<_.top&&(!g||g.top>_.top)&&(f=y,g=_):h&&Wu(h,_)?h=Zv(h,_.bottom):g&&Wu(g,_)&&(g=Bv(g,_.top))}}if(h&&h.bottom>=t?(n=c,s=h):g&&g.top<=t&&(n=f,s=g),!n)return{node:i,offset:0};let v=Math.max(s.left,Math.min(s.right,e));if(n.nodeType==3)return zv(n,v,t);if(l&&n.contentEditable!="false")return Wf(n,v,t);let O=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(s.left+s.right)/2?1:0);return{node:i,offset:O}}function zv(i,e,t){let n=i.nodeValue.length,s=-1,o=1e9,a=0;for(let l=0;l<n;l++){let c=Qo(i,l,l+1).getClientRects();for(let f=0;f<c.length;f++){let h=c[f];if(h.top==h.bottom)continue;a||(a=e-h.left);let g=(h.top>t?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&g<o){let v=e>=(h.left+h.right)/2,O=v;if((Ue.chrome||Ue.gecko)&&Qo(i,l).getBoundingClientRect().left==h.right&&(O=!v),g<=0)return{node:i,offset:l+(O?1:0)};s=l+(O?1:0),o=g}}}return{node:i,offset:s>-1?s:a>0?i.nodeValue.length:0}}function BC(i,e,t,n=-1){var s,o;let a=i.contentDOM.getBoundingClientRect(),l=a.top+i.viewState.paddingTop,c,{docHeight:f}=i.viewState,{x:h,y:g}=e,v=g-l;if(v<0)return 0;if(v>f)return i.state.doc.length;for(let R=i.viewState.heightOracle.textHeight/2,k=!1;c=i.elementAtHeight(v),c.type!=Yn.Text;)for(;v=n>0?c.bottom+R:c.top-R,!(v>=0&&v<=f);){if(k)return t?null:0;k=!0,n=-n}g=l+v;let O=c.from;if(O<i.viewport.from)return i.viewport.from==0?0:t?null:Hv(i,a,c,h,g);if(O>i.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Hv(i,a,c,h,g);let y=i.dom.ownerDocument,S=i.root.elementFromPoint?i.root:y,w=S.elementFromPoint(h,g);w&&!i.contentDOM.contains(w)&&(w=null),w||(h=Math.max(a.left+1,Math.min(a.right-1,h)),w=S.elementFromPoint(h,g),w&&!i.contentDOM.contains(w)&&(w=null));let _,$=-1;if(w&&((s=i.docView.nearest(w))===null||s===void 0?void 0:s.isEditable)!=!1){if(y.caretPositionFromPoint){let R=y.caretPositionFromPoint(h,g);R&&({offsetNode:_,offset:$}=R)}else if(y.caretRangeFromPoint){let R=y.caretRangeFromPoint(h,g);R&&({startContainer:_,startOffset:$}=R,(!i.contentDOM.contains(_)||Ue.safari&&vD(_,$,h)||Ue.chrome&&bD(_,$,h))&&(_=void 0))}_&&($=Math.min(pi(_),$))}if(!_||!i.docView.dom.contains(_)){let R=pn.find(i.docView,O);if(!R)return v>c.top+c.height/2?c.to:c.from;({node:_,offset:$}=Wf(R.dom,h,g))}let A=i.docView.nearest(_);if(!A)return null;if(A.isWidget&&((o=A.dom)===null||o===void 0?void 0:o.nodeType)==1){let R=A.dom.getBoundingClientRect();return e.y<R.top||e.y<=R.bottom&&e.x<=(R.left+R.right)/2?A.posAtStart:A.posAtEnd}else return A.localPosFromDOM(_,$)+A.posAtStart}function Hv(i,e,t,n,s){let o=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let l=i.viewState.heightOracle.textHeight,c=Math.floor((s-t.top-(i.defaultLineHeight-l)*.5)/l);o+=c*i.viewState.heightOracle.lineLength}let a=i.state.sliceDoc(t.from,t.to);return t.from+Mf(a,o,i.state.tabSize)}function vD(i,e,t){let n;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(let s=i.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Qo(i,n-1,n).getBoundingClientRect().left>t}function bD(i,e,t){if(e!=0)return!1;for(let s=i;;){let o=s.parentNode;if(!o||o.nodeType!=1||o.firstChild!=s)return!1;if(o.classList.contains("cm-line"))break;s=o}let n=i.nodeType==1?i.getBoundingClientRect():Qo(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function Yf(i,e,t){let n=i.lineBlockAt(e);if(Array.isArray(n.type)){let s;for(let o of n.type){if(o.from>e)break;if(!(o.to<e)){if(o.from<e&&o.to>e)return o;(!s||o.type==Yn.Text&&(s.type!=o.type||(t<0?o.from<e:o.to>e)))&&(s=o)}}return s||n}return n}function OD(i,e,t,n){let s=Yf(i,e.head,e.assoc||-1),o=!n||s.type!=Yn.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(o){let a=i.dom.getBoundingClientRect(),l=i.textDirectionAt(s.from),c=i.posAtCoords({x:t==(l==Bt.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(c!=null)return me.cursor(c,t?-1:1)}return me.cursor(t?s.to:s.from,t?-1:1)}function Xv(i,e,t,n){let s=i.state.doc.lineAt(e.head),o=i.bidiSpans(s),a=i.textDirectionAt(s.from);for(let l=e,c=null;;){let f=iD(s,o,a,l,t),h=kC;if(!f){if(s.number==(t?i.state.doc.lines:1))return l;h=`
`,s=i.state.doc.line(s.number+(t?1:-1)),o=i.bidiSpans(s),f=i.visualLineSide(s,!t)}if(c){if(!c(h))return l}else{if(!n)return f;c=n(h)}l=f}}function CD(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return o=>{let a=n(o);return s==Ft.Space&&(s=a),s==a}}function yD(i,e,t,n){let s=e.head,o=t?1:-1;if(s==(t?i.state.doc.length:0))return me.cursor(s,e.assoc);let a=e.goalColumn,l,c=i.contentDOM.getBoundingClientRect(),f=i.coordsAtPos(s,e.assoc||-1),h=i.documentTop;if(f)a==null&&(a=f.left-c.left),l=o<0?f.top:f.bottom;else{let O=i.viewState.lineBlockAt(s);a==null&&(a=Math.min(c.right-c.left,i.defaultCharacterWidth*(s-O.from))),l=(o<0?O.top:O.bottom)+h}let g=c.left+a,v=n??i.viewState.heightOracle.textHeight>>1;for(let O=0;;O+=10){let y=l+(v+O)*o,S=BC(i,{x:g,y},!1,o);if(y<c.top||y>c.bottom||(o<0?S<s:S>s)){let w=i.docView.coordsForChar(S),_=!w||y<w.top?-1:1;return me.cursor(S,_,void 0,a)}}}function pc(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(o,a,l)=>{if(e>o&&e<a){let c=n||t||(e-o<a-e?-1:1);e=c<0?o:a,n=c}});if(!n)return e}}function Yu(i,e,t){let n=pc(i.state.facet(Jp).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:me.cursor(n,n<t.from?1:-1)}const il="";class SD{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(yt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=il}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let o=this.text.length;this.readNode(s);let a=s.nextSibling;if(a==t)break;let l=Mt.get(s),c=Mt.get(a);(l&&c?l.breakAfter:(l?l.breakAfter:Pc(s))||Pc(a)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>o)&&this.lineBreak(),s=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,l;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(l=s.exec(t))&&(o=l.index,a=l[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=a-1);n=o+a}}readNode(e){if(e.cmIgnore)return;let t=Mt.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(_D(e,n.node,n.offset)?t:0))}}function _D(i,e,t){for(;;){if(!e||t<pi(e))return!1;if(e==i)return!0;t=Io(e)+1,e=e.parentNode}}class jv{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class wD{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let l=o||a?[]:PD(e),c=new SD(l,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=$D(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!Df(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),f=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!Df(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),h=e.viewport;if((Ue.ios||Ue.chrome)&&e.state.selection.main.empty&&c!=f&&(h.from>0||h.to<e.state.doc.length)){let g=Math.min(c,f),v=Math.max(c,f),O=h.from-g,y=h.to-v;(O==0||O==1||g==0)&&(y==0||y==-1||v==e.state.doc.length)&&(c=0,f=e.state.doc.length)}this.newSel=me.single(f,c)}}}function ZC(i,e){let t,{newSel:n}=e,s=i.state.selection.main,o=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,c=s.from,f=null;(o===8||Ue.android&&e.text.length<l-a)&&(c=s.to,f="end");let h=xD(i.state.doc.sliceString(a,l,il),e.text,c-a,f);h&&(Ue.chrome&&o==13&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==il+il&&h.toB--,t={from:a+h.from,to:a+h.toA,insert:kt.of(e.text.slice(h.from,h.toB).split(il))})}else n&&(!i.hasFocus&&i.state.facet(Pi)||n.main.eq(s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(Ue.mac||Ue.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=me.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:kt.of([t.insert.toString().replace("."," ")])}):t&&t.from>=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:Ue.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
 `&&i.lineWrapping&&(n&&(n=me.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:kt.of([" "])}),t)return eh(i,t,n,o);if(n&&!n.main.eq(s)){let a=!1,l="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(a=!0),l=i.inputState.lastSelectionOrigin),i.dispatch({selection:n,scrollIntoView:a,userEvent:l}),!0}else return!1}function eh(i,e,t,n=-1){if(Ue.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(Ue.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&aa(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&aa(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&aa(i.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let a,l=()=>a||(a=kD(i,e,t));return i.state.facet(RC).some(c=>c(i,e.from,e.to,o,l))||i.dispatch(l()),!0}function kD(i,e,t){let n,s=i.state,o=s.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let l=o.from<e.from?s.sliceDoc(o.from,e.from):"",c=o.to>e.to?s.sliceDoc(e.to,o.to):"";n=s.replaceSelection(i.state.toText(l+e.insert.sliceString(0,void 0,i.state.lineBreak)+c))}else{let l=s.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let f=i.state.sliceDoc(e.from,e.to),h,g=t&&EC(i,t.main.head);if(g){let y=e.insert.length-(e.to-e.from);h={from:g.from,to:g.to-y}}else h=i.state.doc.lineAt(o.head);let v=o.to-e.to,O=o.to-o.from;n=s.changeByRange(y=>{if(y.from==o.from&&y.to==o.to)return{changes:l,range:c||y.map(l)};let S=y.to-v,w=S-f.length;if(y.to-y.from!=O||i.state.sliceDoc(w,S)!=f||y.to>=h.from&&y.from<=h.to)return{range:y};let _=s.changes({from:w,to:S,insert:e.insert}),$=y.to-o.to;return{changes:_,range:c?me.range(Math.max(0,c.anchor+$),Math.max(0,c.head+$)):y.map(_)}})}else n={changes:l,selection:c&&s.selection.replaceRange(c)}}let a="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,a+=".compose",i.inputState.compositionFirstChange&&(a+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:a,scrollIntoView:!0})}function xD(i,e,t,n){let s=Math.min(i.length,e.length),o=0;for(;o<s&&i.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==s&&i.length==e.length)return null;let a=i.length,l=e.length;for(;a>0&&l>0&&i.charCodeAt(a-1)==e.charCodeAt(l-1);)a--,l--;if(n=="end"){let c=Math.max(0,o-Math.min(a,l));t-=a+c-o}if(a<o&&i.length<e.length){let c=t<=o&&t>=a?o-t:0;o-=c,l=o+(l-a),a=o}else if(l<o){let c=t<=o&&t>=l?o-t:0;o-=c,a=o+(a-l),l=o}return{from:o,toA:a,toB:l}}function PD(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:o}=i.observer.selectionRange;return t&&(e.push(new jv(t,n)),(s!=t||o!=n)&&e.push(new jv(s,o))),e}function $D(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?me.single(t+e,n+e):null}class TD{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ue.safari&&e.contentDOM.addEventListener("input",()=>null),Ue.gecko&&XD(e.contentDOM.ownerDocument)}handleEvent(e){!UD(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=RD(e),n=this.handlers,s=this.view.contentDOM;for(let o in t)if(o!="scroll"){let a=!t[o].handlers.length,l=n[o];l&&a!=!l.handlers.length&&(s.removeEventListener(o,this.handleEvent),l=null),l||s.addEventListener(o,this.handleEvent,{passive:a})}for(let o in n)o!="scroll"&&!t[o]&&s.removeEventListener(o,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&HC.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ue.android&&Ue.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Ue.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=zC.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||ID.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,aa(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Ue.safari&&!Ue.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Vv(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){ls(t.state,s)}}}function RD(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec;if(s&&s.domEventHandlers)for(let o in s.domEventHandlers){let a=s.domEventHandlers[o];a&&t(o).handlers.push(Vv(n.value,a))}if(s&&s.domEventObservers)for(let o in s.domEventObservers){let a=s.domEventObservers[o];a&&t(o).observers.push(Vv(n.value,a))}}for(let n in Fs)t(n).handlers.push(Fs[n]);for(let n in qs)t(n).observers.push(qs[n]);return e}const zC=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ID="dthko",HC=[16,17,18,20,91,92,224,225],Hr=6;function Xr(i){return Math.max(0,i)*.7+8}function QD(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class AD{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=EU(e.contentDOM),this.atoms=e.state.facet(Jp).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(yt.allowMultipleSelections)&&ND(e,t),this.dragging=LD(e,t)&&VC(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&QD(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,o=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=Kp(this.view);e.clientX-c.left<=s+Hr?t=-Xr(s-e.clientX):e.clientX+c.right>=a-Hr&&(t=Xr(e.clientX-a)),e.clientY-c.top<=o+Hr?n=-Xr(o-e.clientY):e.clientY+c.bottom>=l-Hr&&(n=Xr(e.clientY-l)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let s=e.ranges[n],o=null;if(s.empty){let a=pc(this.atoms,s.from,0);a!=s.from&&(o=me.cursor(a,-1))}else{let a=pc(this.atoms,s.from,-1),l=pc(this.atoms,s.to,1);(a!=s.from||l!=s.to)&&(o=me.range(s.from==s.anchor?a:l,s.from==s.head?a:l))}o&&(t||(t=e.ranges.slice()),t[n]=o)}return t?me.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function ND(i,e){let t=i.state.facet(xC);return t.length?t[0](e):Ue.mac?e.metaKey:e.ctrlKey}function MD(i,e){let t=i.state.facet(PC);return t.length?t[0](e):Ue.mac?!e.altKey:!e.ctrlKey}function LD(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=bl(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let o=0;o<s.length;o++){let a=s[o];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function UD(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Mt.get(t))&&n.ignoreEvent(e))return!1;return!0}const Fs=Object.create(null),qs=Object.create(null),XC=Ue.ie&&Ue.ie_version<15||Ue.ios&&Ue.webkit_version<604;function DD(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),jC(i,t.value)},50)}function td(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function jC(i,e){e=td(i.state,Wp,e);let{state:t}=i,n,s=1,o=t.toText(e),a=o.lines==t.selection.ranges.length;if(Gf!=null&&t.selection.ranges.every(c=>c.empty)&&Gf==o.toString()){let c=-1;n=t.changeByRange(f=>{let h=t.doc.lineAt(f.from);if(h.from==c)return{range:f};c=h.from;let g=t.toText((a?o.line(s++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:g},range:me.cursor(f.from+g.length)}})}else a?n=t.changeByRange(c=>{let f=o.line(s++);return{changes:{from:c.from,to:c.to,insert:f.text},range:me.cursor(c.from+f.length)}}):n=t.replaceSelection(o);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}qs.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft};Fs.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1);qs.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")};qs.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")};Fs.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet($C))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=BD(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new AD(i,e,t,n)),n&&i.observer.ignore(()=>{lC(i.contentDOM);let o=i.root.activeElement;o&&!o.contains(i.contentDOM)&&o.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Fv(i,e,t,n){if(n==1)return me.cursor(e,t);if(n==2)return hD(i.state,e,t);{let s=pn.find(i.docView,e),o=i.state.doc.lineAt(s?s.posAtEnd:e),a=s?s.posAtStart:o.from,l=s?s.posAtEnd:o.to;return l<i.state.doc.length&&l==o.to&&l++,me.range(a,l)}}let Wv=(i,e,t)=>e>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function qD(i,e,t,n){let s=pn.find(i.docView,e);if(!s)return 1;let o=e-s.posAtStart;if(o==0)return 1;if(o==s.length)return-1;let a=s.coordsAt(o,-1);if(a&&Wv(t,n,a))return-1;let l=s.coordsAt(o,1);return l&&Wv(t,n,l)?1:a&&a.bottom>=n?-1:1}function Yv(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:qD(i,t,e.clientX,e.clientY)}}const ED=Ue.ie&&Ue.ie_version<=11;let Gv=null,Jv=0,Kv=0;function VC(i){if(!ED)return i.detail;let e=Gv,t=Kv;return Gv=i,Kv=Date.now(),Jv=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Jv+1)%3:1}function BD(i,e){let t=Yv(i,e),n=VC(e),s=i.state.selection;return{update(o){o.docChanged&&(t.pos=o.changes.mapPos(t.pos),s=s.map(o.changes))},get(o,a,l){let c=Yv(i,o),f,h=Fv(i,c.pos,c.bias,n);if(t.pos!=c.pos&&!a){let g=Fv(i,t.pos,t.bias,n),v=Math.min(g.from,h.from),O=Math.max(g.to,h.to);h=v<h.from?me.range(v,O):me.range(O,v)}return a?s.replaceRange(s.main.extend(h.from,h.to)):l&&n==1&&s.ranges.length>1&&(f=ZD(s,c.pos))?f:l?s.addRange(h):me.create([h])}}}function ZD(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return me.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}Fs.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.nearest(e.target);if(s&&s.isWidget){let o=s.posAtStart,a=o+s.length;(o>=t.to||a<=t.from)&&(t=me.range(o,a))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",td(i.state,Yp,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Fs.dragend=i=>(i.inputState.draggedContent=null,!1);function eb(i,e,t,n){if(t=td(i.state,Wp,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=i.inputState,a=n&&o&&MD(i,e)?{from:o.from,to:o.to}:null,l={from:s,insert:t},c=i.state.changes(a?[a,l]:l);i.focus(),i.dispatch({changes:c,selection:{anchor:c.mapPos(s,-1),head:c.mapPos(s,1)},userEvent:a?"move.drop":"input.drop"}),i.inputState.draggedContent=null}Fs.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,o=()=>{++s==t.length&&eb(i,e,n.filter(a=>a!=null).join(i.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let l=new FileReader;l.onerror=o,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(n[a]=l.result),o()},l.readAsText(t[a])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return eb(i,e,n,!0),!0}return!1};Fs.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=XC?null:e.clipboardData;return t?(jC(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(DD(i),!1)};function zD(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function HD(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:o}of i.selection.ranges){let a=i.doc.lineAt(o);a.number>s&&(e.push(a.text),t.push({from:a.from,to:Math.min(i.doc.length,a.to+1)})),s=a.number}n=!0}return{text:td(i,Yp,e.join(i.lineBreak)),ranges:t,linewise:n}}let Gf=null;Fs.copy=Fs.cut=(i,e)=>{let{text:t,ranges:n,linewise:s}=HD(i.state);if(!t&&!s)return!1;Gf=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let o=XC?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",t),!0):(zD(i,t),!1)};const FC=Ni.define();function WC(i,e){let t=[];for(let n of i.facet(IC)){let s=n(i,e);s&&t.push(s)}return t.length?i.update({effects:t,annotations:FC.of(!0)}):null}function YC(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=WC(i.state,e);t?i.dispatch(t):i.update([])}},10)}qs.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),YC(i)};qs.blur=i=>{i.observer.clearSelectionRange(),YC(i)};qs.compositionstart=qs.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))};qs.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,Ue.chrome&&Ue.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))};qs.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()};Fs.beforeinput=(i,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let o=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let l=a[0],c=i.posAtDOM(l.startContainer,l.startOffset),f=i.posAtDOM(l.endContainer,l.endOffset);return eh(i,{from:c,to:f,insert:i.state.toText(o)},null),!0}}let s;if(Ue.chrome&&Ue.android&&(s=zC.find(o=>o.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let o=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return Ue.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),Ue.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>qs.compositionend(i,e),20),!1};const tb=new Set;function XD(i){tb.has(i)||(tb.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const nb=["pre-wrap","normal","pre-line","break-spaces"];let ma=!1;function sb(){ma=!1}class jD{constructor(e){this.lineWrapping=e,this.doc=kt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return nb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,o,a){let l=nb.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=o,c){this.heightSamples={};for(let f=0;f<a.length;f++){let h=a[f];h<0?f++:this.heightSamples[Math.floor(h*10)]=!0}}return c}}class VD{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class li{constructor(e,t,n,s,o){this.from=e,this.length=t,this.top=n,this.height=s,this._content=o}get type(){return typeof this._content=="number"?Yn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof no?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new li(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Et=function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i}(Et||(Et={}));const hc=.001;class Gn{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>hc&&(ma=!0),this.height=e)}replace(e,t,n){return Gn.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let o=this,a=n.doc;for(let l=s.length-1;l>=0;l--){let{fromA:c,toA:f,fromB:h,toB:g}=s[l],v=o.lineAt(c,Et.ByPosNoHeight,n.setDoc(t),0,0),O=v.to>=f?v:o.lineAt(f,Et.ByPosNoHeight,n,0,0);for(g+=O.to-f,f=O.to;l>0&&v.from<=s[l-1].toA;)c=s[l-1].fromA,h=s[l-1].fromB,l--,c<v.from&&(v=o.lineAt(c,Et.ByPosNoHeight,n,0,0));h+=v.from-c,c=v.from;let y=th.build(n.setDoc(a),e,h,g);o=Rc(o,o.replace(c,f,y))}return o.updateHeight(n,0)}static empty(){return new Cs(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,o=0;for(;;)if(t==n)if(s>o*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),n+=1+l.break,s-=l.size}else if(o>s*2){let l=e[n];l.break?e.splice(n,1,l.left,null,l.right):e.splice(n,1,l.left,l.right),n+=2+l.break,o-=l.size}else break;else if(s<o){let l=e[t++];l&&(s+=l.size)}else{let l=e[--n];l&&(o+=l.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,n++),new FD(Gn.of(e.slice(0,t)),a,Gn.of(e.slice(n)))}}function Rc(i,e){return i==e?i:(i.constructor!=e.constructor&&(ma=!0),e)}Gn.prototype.size=1;class GC extends Gn{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,s){return new li(s,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,s,o){return this.blockAt(0,n,s,o)}forEachLine(e,t,n,s,o,a){e<=o+this.length&&t>=o&&a(this.blockAt(0,n,s,o))}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Cs extends GC{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new li(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Cs||s instanceof In&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof In?s=new Cs(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):Gn.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class In extends Gn{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,o=s-n+1,a,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*o);a=c/o,this.length>o+1&&(l=(this.height-c)/(this.length-o-1))}else a=this.height/o;return{firstLine:n,lastLine:s,perLine:a,perChar:l}}blockAt(e,t,n,s){let{firstLine:o,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let f=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),h=t.doc.lineAt(f),g=l+h.length*c,v=Math.max(n,e-g/2);return new li(h.from,h.length,v,g,0)}else{let f=Math.max(0,Math.min(a-o,Math.floor((e-n)/l))),{from:h,length:g}=t.doc.line(o+f);return new li(h,g,n+l*f,l,0)}}lineAt(e,t,n,s,o){if(t==Et.ByHeight)return this.blockAt(e,n,s,o);if(t==Et.ByPosNoHeight){let{from:O,to:y}=n.doc.lineAt(e);return new li(O,y-O,0,0,0)}let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(n,o),f=n.doc.lineAt(e),h=l+f.length*c,g=f.number-a,v=s+l*g+c*(f.from-o-g);return new li(f.from,f.length,Math.max(s,Math.min(v,s+this.height-h)),h,0)}forEachLine(e,t,n,s,o,a){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:l,perLine:c,perChar:f}=this.heightMetrics(n,o);for(let h=e,g=s;h<=t;){let v=n.doc.lineAt(h);if(h==e){let y=v.number-l;g+=c*y+f*(e-o-y)}let O=c+f*v.length;a(new li(v.from,v.length,g,O,0)),g+=O,h=v.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let o=n[n.length-1];o instanceof In?n[n.length-1]=new In(o.length+s):n.push(null,new In(s-1))}if(e>0){let o=n[0];o instanceof In?n[0]=new In(e+o.length):n.unshift(new In(e-1),null)}return Gn.of(n)}decomposeLeft(e,t){t.push(new In(e-1),null)}decomposeRight(e,t){t.push(null,new In(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let o=t+this.length;if(s&&s.from<=t+this.length&&s.more){let a=[],l=Math.max(t,s.from),c=-1;for(s.from>t&&a.push(new In(s.from-t-1).updateHeight(e,t));l<=o&&s.more;){let h=e.doc.lineAt(l).length;a.length&&a.push(null);let g=s.heights[s.index++];c==-1?c=g:Math.abs(g-c)>=hc&&(c=-2);let v=new Cs(h,g);v.outdated=!1,a.push(v),l+=h+1}l<=o&&a.push(null,new In(o-l).updateHeight(e,l));let f=Gn.of(a);return(c<0||Math.abs(f.height-this.height)>=hc||Math.abs(c-this.heightMetrics(e,t).perLine)>=hc)&&(ma=!0),Rc(this,f)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class FD extends Gn{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let o=n+this.left.height;return e<o?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,o,s+this.left.length+this.break)}lineAt(e,t,n,s,o){let a=s+this.left.height,l=o+this.left.length+this.break,c=t==Et.ByHeight?e<a:e<l,f=c?this.left.lineAt(e,t,n,s,o):this.right.lineAt(e,t,n,a,l);if(this.break||(c?f.to<l:f.from>l))return f;let h=t==Et.ByPosNoHeight?Et.ByPosNoHeight:Et.ByPos;return c?f.join(this.right.lineAt(l,h,n,a,l)):this.left.lineAt(l,h,n,s,o).join(f)}forEachLine(e,t,n,s,o,a){let l=s+this.left.height,c=o+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,s,o,a),t>=c&&this.right.forEachLine(e,t,n,l,c,a);else{let f=this.lineAt(c,Et.ByPos,n,s,o);e<f.from&&this.left.forEachLine(e,f.from-1,n,s,o,a),f.to>=e&&f.from<=t&&a(f),t>f.to&&this.right.forEachLine(f.to+1,t,n,l,c,a)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let l of n)o.push(l);if(e>0&&ib(o,a-1),t<this.length){let l=o.length;this.decomposeRight(t,o),ib(o,l)}return Gn.of(o)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<s&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Gn.of(this.break?[e,null,t]:[e,t]):(this.left=Rc(this.left,e),this.right=Rc(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:o,right:a}=this,l=t+o.length+this.break,c=null;return s&&s.from<=t+o.length&&s.more?c=o=o.updateHeight(e,t,n,s):o.updateHeight(e,t,n),s&&s.from<=l+a.length&&s.more?c=a=a.updateHeight(e,l,n,s):a.updateHeight(e,l,n),c?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function ib(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof In&&(n=i[e+1])instanceof In&&i.splice(e-1,3,new In(t.length+1+n.length))}const WD=5;class th{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Cs?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Cs(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,o=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new GC(a,s,n)):(a||o||s>=WD)&&this.addLineDeco(s,o,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Cs(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new In(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Cs)return e;let t=new Cs(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Cs)&&!this.isCovered?this.nodes.push(new Cs(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Cs&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let o=new th(n,e);return xt.spans(t,n,s,o,0),o.finish(n)}}function YD(i,e,t){let n=new GD;return xt.compare(i,e,t,n,0),n.changes}class GD{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&fc(e,t,this.changes,5)}}function JD(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,o=Math.max(0,t.left),a=Math.min(s.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(s.innerHeight,t.bottom);for(let f=i.parentNode;f&&f!=n.body;)if(f.nodeType==1){let h=f,g=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&g.overflow!="visible"){let v=h.getBoundingClientRect();o=Math.max(o,v.left),a=Math.min(a,v.right),l=Math.max(l,v.top),c=Math.min(f==i.parentNode?s.innerHeight:c,v.bottom)}f=g.position=="absolute"||g.position=="fixed"?h.offsetParent:h.parentNode}else if(f.nodeType==11)f=f.host;else break;return{left:o-t.left,right:Math.max(o,a)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function KD(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function eq(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Gu{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],o=t[n];if(s.from!=o.from||s.to!=o.to||s.size!=o.size)return!1}return!0}draw(e,t){return We.replace({widget:new tq(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class tq extends mi{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class ob{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=ab,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Bt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Gp).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new jD(t),this.stateDeco=e.facet(Ol).filter(n=>typeof n!="function"),this.heightMap=Gn.empty().applyChanges(this.stateDeco,kt.empty,this.heightOracle.setDoc(e.doc),[new Ds(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=We.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:o,to:a})=>s>=o&&s<=a)){let{from:o,to:a}=this.lineBlockAt(s);e.push(new jr(o,a))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ab:new nh(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ol(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Ol).filter(h=>typeof h!="function");let s=e.changedRanges,o=Ds.extendWithRanges(s,YD(n,this.stateDeco,e?e.changes:On.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);sb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||ma)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let c=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let f=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(f||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(AC)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Bt.RTL:Bt.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),l=t.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let f=0,h=0;if(l.width&&l.height){let{scaleX:R,scaleY:k}=aC(t,l);(R>.005&&Math.abs(this.scaleX-R)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=R,this.scaleY=k,f|=16,a=c=!0)}let g=(parseInt(n.paddingTop)||0)*this.scaleY,v=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=g||this.paddingBottom!=v)&&(this.paddingTop=g,this.paddingBottom=v,f|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,f|=16);let O=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=O&&(this.scrollAnchorHeight=-1,this.scrollTop=O),this.scrolledToBottom=cC(e.scrollDOM);let y=(this.printing?eq:JD)(t,this.paddingTop),S=y.top-this.pixelViewport.top,w=y.bottom-this.pixelViewport.bottom;this.pixelViewport=y;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(c=!0)),!this.inView&&!this.scrollTarget&&!KD(e.dom))return 0;let $=l.width;if((this.contentDOMWidth!=$||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,f|=16),c){let R=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(R)&&(a=!0),a||s.lineWrapping&&Math.abs($-this.contentDOMWidth)>s.charWidth){let{lineHeight:k,charWidth:x,textHeight:T}=e.docView.measureTextSize();a=k>0&&s.refresh(o,k,x,T,$/x,R),a&&(e.docView.minWidth=0,f|=16)}S>0&&w>0?h=Math.max(S,w):S<0&&w<0&&(h=Math.min(S,w)),sb();for(let k of this.viewports){let x=k.from==this.viewport.from?R:e.docView.measureVisibleLineHeights(k);this.heightMap=(a?Gn.empty().applyChanges(this.stateDeco,kt.empty,this.heightOracle,[new Ds(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,a,new VD(k.from,x))}ma&&(f|=2)}let A=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return A&&(f&2&&(f|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),f|=this.updateForViewport()),(f&2||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),f|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),f}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new jr(s.lineAt(a-n*1e3,Et.ByHeight,o,0,0).from,s.lineAt(l+(1-n)*1e3,Et.ByHeight,o,0,0).to);if(t){let{head:f}=t.range;if(f<c.from||f>c.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),g=s.lineAt(f,Et.ByPos,o,0,0),v;t.y=="center"?v=(g.top+g.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&f<c.from?v=g.top:v=g.bottom-h,c=new jr(s.lineAt(v-1e3/2,Et.ByHeight,o,0,0).from,s.lineAt(v+h+1e3/2,Et.ByHeight,o,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new jr(this.heightMap.lineAt(n,Et.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,Et.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,Et.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,Et.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:l}=this;return(e==0||s<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||o>=l+Math.max(10,Math.min(n,250)))&&s>a-2*1e3&&o<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new Gu(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,o=s>>1,a=s<<1;if(this.defaultTextDirection!=Bt.LTR&&!n)return[];let l=[],c=(h,g,v,O)=>{if(g-h<o)return;let y=this.state.selection.main,S=[y.from];y.empty||S.push(y.to);for(let _ of S)if(_>h&&_<g){c(h,_-10,v,O),c(_+10,g,v,O);return}let w=sq(e,_=>_.from>=v.from&&_.to<=v.to&&Math.abs(_.from-h)<o&&Math.abs(_.to-g)<o&&!S.some($=>_.from<$&&_.to>$));if(!w){if(g<v.to&&t&&n&&t.visibleRanges.some(A=>A.from<=g&&A.to>=g)){let A=t.moveToLineBoundary(me.cursor(g),!1,!0).head;A>h&&(g=A)}let _=this.gapSize(v,h,g,O),$=n||_<2e6?_:2e6;w=new Gu(h,g,_,$)}l.push(w)},f=h=>{if(h.length<a||h.type!=Yn.Text)return;let g=nq(h.from,h.to,this.stateDeco);if(g.total<a)return;let v=this.scrollTarget?this.scrollTarget.range.head:null,O,y;if(n){let S=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,w,_;if(v!=null){let $=Fr(g,v),A=((this.visibleBottom-this.visibleTop)/2+S)/h.height;w=$-A,_=$+A}else w=(this.visibleTop-h.top-S)/h.height,_=(this.visibleBottom-h.top+S)/h.height;O=Vr(g,w),y=Vr(g,_)}else{let S=g.total*this.heightOracle.charWidth,w=s*this.heightOracle.charWidth,_=0;if(S>2e6)for(let x of e)x.from>=h.from&&x.from<h.to&&x.size!=x.displaySize&&x.from*this.heightOracle.charWidth+_<this.pixelViewport.left&&(_=x.size-x.displaySize);let $=this.pixelViewport.left+_,A=this.pixelViewport.right+_,R,k;if(v!=null){let x=Fr(g,v),T=((A-$)/2+w)/S;R=x-T,k=x+T}else R=($-w)/S,k=(A+w)/S;O=Vr(g,R),y=Vr(g,k)}O>h.from&&c(h.from,O,h,g),y<h.to&&c(y,h.to,h,g)};for(let h of this.viewportLines)Array.isArray(h.type)?h.type.forEach(f):f(h);return l}gapSize(e,t,n,s){let o=Fr(s,n)-Fr(s,t);return this.heightOracle.lineWrapping?e.height*o:s.total*this.heightOracle.charWidth*o}updateLineGaps(e){Gu.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=We.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];xt.spans(t,this.viewport.from,this.viewport.to,{span(o,a){n.push({from:o,to:a})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let o=0;o<n.length&&!(s&8);o++){let a=this.visibleRanges[o],l=n[o];(a.from!=l.from||a.to!=l.to)&&(s|=4,e&&e.mapPos(a.from,-1)==l.from&&e.mapPos(a.to,1)==l.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ol(this.heightMap.lineAt(e,Et.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||ol(this.heightMap.lineAt(this.scaler.fromDOM(e),Et.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ol(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class jr{constructor(e,t){this.from=e,this.to=t}}function nq(i,e,t){let n=[],s=i,o=0;return xt.spans(t,i,e,{span(){},point(a,l){a>s&&(n.push({from:s,to:a}),o+=a-s),s=l}},20),s<e&&(n.push({from:s,to:e}),o+=e-s),{total:o,ranges:n}}function Vr({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:o,to:a}=e[s],l=a-o;if(n<=l)return o+n;n-=l}}function Fr(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function sq(i,e){for(let t of i)if(e(t))return t}const ab={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};class nh{constructor(e,t,n){let s=0,o=0,a=0;this.viewports=n.map(({from:l,to:c})=>{let f=t.lineAt(l,Et.ByPos,e,0,0).top,h=t.lineAt(c,Et.ByPos,e,0,0).bottom;return s+=h-f,{from:l,to:c,top:f,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=a+(l.top-o)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return s+(e-n)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);n=o.bottom,s=o.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return n+(e-s)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);n=o.bottom,s=o.domBottom}}eq(e){return e instanceof nh?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function ol(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new li(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>ol(s,e)):i._content)}const Wr=Le.define({combine:i=>i.join(" ")}),Jf=Le.define({combine:i=>i.indexOf(!0)>-1}),Kf=eo.newName(),JC=eo.newName(),KC=eo.newName(),ey={"&light":"."+JC,"&dark":"."+KC};function ep(i,e,t){return new eo(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const iq=ep("."+Kf,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ey),oq={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ju=Ue.ie&&Ue.ie_version<=11;class aq{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new BU,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(Ue.ie&&Ue.ie_version<=11||Ue.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Ue.chrome&&Ue.chrome_version<126)&&(this.editContext=new rq(e),e.state.facet(Pi)&&(e.contentDOM.editContext=this.editContext.editContext)),Ju&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,s=this.selectionRange;if(n.state.facet(Pi)?n.root.activeElement!=this.dom:!uc(this.dom,s))return;let o=s.anchorNode&&n.docView.nearest(s.anchorNode);if(o&&o.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Ue.ie&&Ue.ie_version<=11||Ue.android&&Ue.chrome)&&!n.state.selection.main.empty&&s.focusNode&&ul(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=bl(e.root);if(!t)return!1;let n=Ue.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&lq(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=uc(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&zU(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,oq),Ju&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ju&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&aa(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,s=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(s=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&uc(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new wD(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=ZC(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=lb(t,e.previousSibling||e.target.previousSibling,-1),s=lb(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Pi)!=e.state.facet(Pi)&&(e.view.contentDOM.editContext=e.state.facet(Pi)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function lb(i,e,t){for(;e;){let n=Mt.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function rb(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,o=e.endOffset,a=i.docView.domAtPos(i.state.selection.main.anchor);return ul(a.node,a.offset,s,o)&&([t,n,s,o]=[s,o,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:o}}function lq(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return rb(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?rb(i,t):null}class rq{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let s=e.state.selection.main,{anchor:o,head:a}=s,l=this.toEditorPos(n.updateRangeStart),c=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:l,drifted:!1});let f={from:l,to:c,insert:kt.of(n.text.split(`
`))};if(f.from==this.from&&o<this.from?f.from=o:f.to==this.to&&o>this.to&&(f.to=o),f.from==f.to&&!f.insert.length){let h=me.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));h.main.eq(s)||e.dispatch({selection:h,userEvent:"select"});return}if((Ue.mac||Ue.android)&&f.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:c,insert:kt.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);eh(e,f,me.single(this.toEditorPos(n.selectionStart,h),this.toEditorPos(n.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let s=[],o=null;for(let a=this.toEditorPos(n.rangeStart),l=this.toEditorPos(n.rangeEnd);a<l;a++){let c=e.coordsForChar(a);o=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||o||new DOMRect,s.push(o)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let o of n.getTextFormats()){let a=o.underlineStyle,l=o.underlineThickness;if(a!="None"&&l!="None"){let c=this.toEditorPos(o.rangeStart),f=this.toEditorPos(o.rangeEnd);if(c<f){let h=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${l=="Thin"?1:2}px`;s.push(We.mark({attributes:{style:h}}).range(c,f))}}}e.dispatch({effects:MC.of(We.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=bl(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((o,a,l,c,f)=>{if(n)return;let h=f.length-(a-o);if(s&&a>=s.to)if(s.from==o&&s.to==a&&s.insert.eq(f)){s=this.pendingContextChange=null,t+=h,this.to+=h;return}else s=null,this.revertPending(e.state);if(o+=t,a+=t,a<=this.from)this.from+=h,this.to+=h;else if(o<this.to){if(o<this.from||a>this.to||this.to-this.from+f.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),f.toString()),this.to+=h}t+=h}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Qe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(o=>n(o,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ZU(e.parent)||document,this.viewState=new ob(e.state||yt.create(e)),e.scrollTo&&e.scrollTo.is(zr)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(nl).map(s=>new Fu(s));for(let s of this.plugins)s.update(this);this.observer=new aq(this),this.inputState=new TD(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ev(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof hn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,s,o=this.state;for(let v of e){if(v.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=v.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,l=0,c=null;e.some(v=>v.annotation(FC))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=WC(o,a),c||(l=1));let f=this.observer.delayedAndroidKey,h=null;if(f?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(h=null)):this.observer.clear(),o.facet(yt.phrases)!=this.state.facet(yt.phrases))return this.setState(o);s=Tc.create(this,o,e),s.flags|=l;let g=this.viewState.scrollTarget;try{this.updateState=2;for(let v of e){if(g&&(g=g.map(v.changes)),v.scrollIntoView){let{main:O}=v.state.selection;g=new la(O.empty?O:me.cursor(O.head,O.head>O.anchor?-1:1))}for(let O of v.effects)O.is(zr)&&(g=O.value.clip(this.state))}this.viewState.update(s,g),this.bidiCache=Ic.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(sl)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(v=>v.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Wr)!=s.state.facet(Wr)&&(this.viewState.mustMeasureContent=!0),(t||n||g||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let v of this.state.facet(Ff))try{v(s)}catch(O){ls(this.state,O,"update listener")}(c||h)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),h&&!ZC(this,h)&&f.force&&aa(this.contentDOM,f.key,f.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new ob(e),this.plugins=e.facet(nl).map(n=>new Fu(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new Ev(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(nl),n=e.state.facet(nl);if(t!=n){let s=[];for(let o of n){let a=t.indexOf(o);if(a<0)s.push(new Fu(o));else{let l=this.plugins[a];l.mustUpdate=e,s.push(l)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(n){ls(this.state,n,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(cC(n))o=-1,a=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(s);o=O.from,a=O.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let h=f.map(O=>{try{return O.read(this)}catch(y){return ls(this.state,y),cb}}),g=Tc.create(this,this.state,[]),v=!1;g.flags|=c,t?t.flags|=c:t=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g),v&&this.docViewUpdate());for(let O=0;O<f.length;O++)if(h[O]!=cb)try{let y=f[O];y.write&&y.write(h[O],this)}catch(y){ls(this.state,y)}if(v&&this.docView.updateSelection(!0),!g.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let y=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-a;if(y>1||y<-1){s=s+y,n.scrollTop=s/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Ff))l(t)}get themeClasses(){return Kf+" "+(this.state.facet(Jf)?KC:JC)+" "+this.state.facet(Wr)}updateAttrs(){let e=db(this,LC,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Pi)?"true":"false",class:"cm-content",style:`${Ue.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),db(this,Gp,t);let n=this.observer.ignore(()=>{let s=zf(this.contentDOM,this.contentAttrs,t),o=zf(this.dom,this.editorAttrs,e);return s||o});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(Qe.announce)){t&&(this.announceDOM.textContent=""),t=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(sl);let e=this.state.facet(Qe.cspNonce);eo.mount(this.root,this.styleModules.concat(iq).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Yu(this,e,Xv(this,e,t,n))}moveByGroup(e,t){return Yu(this,e,Xv(this,e,t,n=>CD(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),o=n[t?n.length-1:0];return me.cursor(o.side(t,s)+e.from,o.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return OD(this,e,t,n)}moveVertically(e,t,n){return Yu(this,e,yD(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),BC(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),o=this.bidiSpans(s),a=o[Yi.find(o,e-s.from,-1,t)];return Ql(n,a.dir==Bt.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(QC)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>cq)return wC(e.length);let t=this.textDirectionAt(e.from),n;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==t&&(o.fresh||_C(o.isolates,n=qv(this,e))))return o.order;n||(n=qv(this,e));let s=sD(e.text,t,n);return this.bidiCache.push(new Ic(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ue.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{lC(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zr.of(new la(typeof e=="number"?me.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return zr.of(new la(me.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return fn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return fn.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=eo.newName(),s=[Wr.of(n),sl.of(ep(`.${n}`,e))];return t&&t.dark&&s.push(Jf.of(!0)),s}static baseTheme(e){return lo.lowest(sl.of(ep("."+Kf,e,ey)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&Mt.get(n)||Mt.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}Qe.styleModule=sl;Qe.inputHandler=RC;Qe.clipboardInputFilter=Wp;Qe.clipboardOutputFilter=Yp;Qe.scrollHandler=NC;Qe.focusChangeEffect=IC;Qe.perLineTextDirection=QC;Qe.exceptionSink=TC;Qe.updateListener=Ff;Qe.editable=Pi;Qe.mouseSelectionStyle=$C;Qe.dragMovesSelection=PC;Qe.clickAddsSelectionRange=xC;Qe.decorations=Ol;Qe.outerDecorations=UC;Qe.atomicRanges=Jp;Qe.bidiIsolatedRanges=DC;Qe.scrollMargins=qC;Qe.darkTheme=Jf;Qe.cspNonce=Le.define({combine:i=>i.length?i[0]:""});Qe.contentAttributes=Gp;Qe.editorAttributes=LC;Qe.lineWrapping=Qe.contentAttributes.of({class:"cm-lineWrapping"});Qe.announce=ot.define();const cq=4096,cb={};class Ic{constructor(e,t,n,s,o,a){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=o,this.order=a}static update(e,t){if(t.empty&&!e.some(o=>o.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:Bt.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let a=e[o];a.dir==s&&!t.touchesRange(a.from,a.to)&&n.push(new Ic(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return n}}function db(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let o=n[s],a=typeof o=="function"?o(i):o;a&&Zf(a,t)}return t}const dq=Ue.mac?"mac":Ue.windows?"win":Ue.linux?"linux":"key";function uq(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,o,a,l;for(let c=0;c<t.length-1;++c){const f=t[c];if(/^(cmd|meta|m)$/i.test(f))l=!0;else if(/^a(lt)?$/i.test(f))s=!0;else if(/^(c|ctrl|control)$/i.test(f))o=!0;else if(/^s(hift)?$/i.test(f))a=!0;else if(/^mod$/i.test(f))e=="mac"?l=!0:o=!0;else throw new Error("Unrecognized modifier name: "+f)}return s&&(n="Alt-"+n),o&&(n="Ctrl-"+n),l&&(n="Meta-"+n),a&&(n="Shift-"+n),n}function Yr(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const fq=lo.default(Qe.domEventHandlers({keydown(i,e){return ny(ty(e.state),i,e,"editor")}})),Ml=Le.define({enables:fq}),ub=new WeakMap;function ty(i){let e=i.facet(Ml),t=ub.get(e);return t||ub.set(e,t=mq(e.reduce((n,s)=>n.concat(s),[]))),t}function pq(i,e,t){return ny(ty(i.state),e,i,t)}let Vi=null;const hq=4e3;function mq(i,e=dq){let t=Object.create(null),n=Object.create(null),s=(a,l)=>{let c=n[a];if(c==null)n[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,l,c,f,h)=>{var g,v;let O=t[a]||(t[a]=Object.create(null)),y=l.split(/ (?!$)/).map(_=>uq(_,e));for(let _=1;_<y.length;_++){let $=y.slice(0,_).join(" ");s($,!0),O[$]||(O[$]={preventDefault:!0,stopPropagation:!1,run:[A=>{let R=Vi={view:A,prefix:$,scope:a};return setTimeout(()=>{Vi==R&&(Vi=null)},hq),!0}]})}let S=y.join(" ");s(S,!1);let w=O[S]||(O[S]={preventDefault:!1,stopPropagation:!1,run:((v=(g=O._any)===null||g===void 0?void 0:g.run)===null||v===void 0?void 0:v.slice())||[]});c&&w.run.push(c),f&&(w.preventDefault=!0),h&&(w.stopPropagation=!0)};for(let a of i){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let f of l){let h=t[f]||(t[f]=Object.create(null));h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:g}=a;for(let v in h)h[v].run.push(O=>g(O,tp))}let c=a[e]||a.key;if(c)for(let f of l)o(f,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(f,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return t}let tp=null;function ny(i,e,t,n){tp=e;let s=UU(e),o=is(s,0),a=ai(o)==s.length&&s!=" ",l="",c=!1,f=!1,h=!1;Vi&&Vi.view==t&&Vi.scope==n&&(l=Vi.prefix+" ",HC.indexOf(e.keyCode)<0&&(f=!0,Vi=null));let g=new Set,v=w=>{if(w){for(let _ of w.run)if(!g.has(_)&&(g.add(_),_(t)))return w.stopPropagation&&(h=!0),!0;w.preventDefault&&(w.stopPropagation&&(h=!0),f=!0)}return!1},O=i[n],y,S;return O&&(v(O[l+Yr(s,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ue.windows&&e.ctrlKey&&e.altKey)&&(y=to[e.keyCode])&&y!=s?(v(O[l+Yr(y,e,!0)])||e.shiftKey&&(S=vl[e.keyCode])!=s&&S!=y&&v(O[l+Yr(S,e,!1)]))&&(c=!0):a&&e.shiftKey&&v(O[l+Yr(s,e,!0)])&&(c=!0),!c&&v(O._any)&&(c=!0)),f&&(c=!0),c&&h&&e.stopPropagation(),tp=null,c}class Ll{constructor(e,t,n,s,o){this.className=e,this.left=t,this.top=n,this.width=s,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let o=sy(e);return[new Ll(t,s.left-o.left,s.top-o.top,null,s.bottom-s.top)]}else return gq(e,t,n)}}function sy(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Bt.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function fb(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let o=i.dom.getBoundingClientRect(),a=(s.top+s.bottom)/2,l=i.posAtCoords({x:o.left+1,y:a}),c=i.posAtCoords({x:o.right-1,y:a});return l==null||c==null?n:{from:Math.max(n.from,Math.min(l,c)),to:Math.min(n.to,Math.max(l,c))}}function gq(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),o=i.textDirection==Bt.LTR,a=i.contentDOM,l=a.getBoundingClientRect(),c=sy(i),f=a.querySelector(".cm-line"),h=f&&window.getComputedStyle(f),g=l.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),v=l.right-(h?parseInt(h.paddingRight):0),O=Yf(i,n,1),y=Yf(i,s,-1),S=O.type==Yn.Text?O:null,w=y.type==Yn.Text?y:null;if(S&&(i.lineWrapping||O.widgetLineBreaks)&&(S=fb(i,n,1,S)),w&&(i.lineWrapping||y.widgetLineBreaks)&&(w=fb(i,s,-1,w)),S&&w&&S.from==w.from&&S.to==w.to)return $(A(t.from,t.to,S));{let k=S?A(t.from,null,S):R(O,!1),x=w?A(null,t.to,w):R(y,!0),T=[];return(S||O).to<(w||y).from-(S&&w?1:0)||O.widgetLineBreaks>1&&k.bottom+i.defaultLineHeight/2<x.top?T.push(_(g,k.bottom,v,x.top)):k.bottom<x.top&&i.elementAtHeight((k.bottom+x.top)/2).type==Yn.Text&&(k.bottom=x.top=(k.bottom+x.top)/2),$(k).concat(T).concat($(x))}function _(k,x,T,M){return new Ll(e,k-c.left,x-c.top,T-k,M-x)}function $({top:k,bottom:x,horizontal:T}){let M=[];for(let N=0;N<T.length;N+=2)M.push(_(T[N],k,T[N+1],x));return M}function A(k,x,T){let M=1e9,N=-1e9,I=[];function q(F,V,j,se,G){let K=i.coordsAtPos(F,F==T.to?-2:2),de=i.coordsAtPos(j,j==T.from?2:-2);!K||!de||(M=Math.min(K.top,de.top,M),N=Math.max(K.bottom,de.bottom,N),G==Bt.LTR?I.push(o&&V?g:K.left,o&&se?v:de.right):I.push(!o&&se?g:de.left,!o&&V?v:K.right))}let z=k??T.from,H=x??T.to;for(let F of i.visibleRanges)if(F.to>z&&F.from<H)for(let V=Math.max(F.from,z),j=Math.min(F.to,H);;){let se=i.state.doc.lineAt(V);for(let G of i.bidiSpans(se)){let K=G.from+se.from,de=G.to+se.from;if(K>=j)break;de>V&&q(Math.max(K,V),k==null&&K<=z,Math.min(de,j),x==null&&de>=H,G.dir)}if(V=se.to+1,V>=j)break}return I.length==0&&q(z,k==null,H,x==null,i.textDirection),{top:M,bottom:N,horizontal:I}}function R(k,x){let T=l.top+(x?k.top:k.bottom);return{top:T,bottom:T,horizontal:[]}}}function vq(i,e){return i.constructor==e.constructor&&i.eq(e)}class bq{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(mc)!=e.state.facet(mc)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(mc);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,n)=>!vq(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const mc=Le.define();function iy(i){return[fn.define(e=>new bq(e,i)),mc.of(i)]}const Cl=Le.define({combine(i){return hi(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Oq(i={}){return[Cl.of(i),Cq,yq,Sq,AC.of(!0)]}function oy(i){return i.startState.facet(Cl)!=i.state.facet(Cl)}const Cq=iy({above:!0,markers(i){let{state:e}=i,t=e.facet(Cl),n=[];for(let s of e.selection.ranges){let o=s==e.selection.main;if(s.empty||t.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:me.cursor(s.head,s.head>s.anchor?-1:1);for(let c of Ll.forRange(i,a,l))n.push(c)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=oy(i);return t&&pb(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){pb(e.state,i)},class:"cm-cursorLayer"});function pb(i,e){e.style.animationDuration=i.facet(Cl).cursorBlinkRate+"ms"}const yq=iy({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Ll.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||oy(i)},class:"cm-selectionLayer"}),Sq=lo.highest(Qe.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),ay=ot.define({map(i,e){return i==null?null:e.mapPos(i)}}),al=kn.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(ay)?n.value:t,i)}}),_q=fn.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(al);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(i.startState.field(al)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(al),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(al)!=i&&this.view.dispatch({effects:ay.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function wq(){return[al,_q]}function hb(i,e,t,n,s){e.lastIndex=0;for(let o=i.iterRange(t,n),a=t,l;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;l=e.exec(o.value);)s(a+l.index,l)}function kq(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:o}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),o=Math.min(i.state.doc.lineAt(o).to,o+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=o:n.push({from:s,to:o});return n}class xq{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:o,maxLength:a=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,c,f,h)=>s(h,f,f+l[0].length,l,c);else if(typeof n=="function")this.addMatch=(l,c,f,h)=>{let g=n(l,c,f);g&&h(f,f+l[0].length,g)};else if(n)this.addMatch=(l,c,f,h)=>h(f,f+l[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let t=new Ti,n=t.add.bind(t);for(let{from:s,to:o}of kq(e,this.maxLength))hb(e.state.doc,this.regexp,s,o,(a,l)=>this.addMatch(l,e,a,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((o,a,l,c)=>{c>=e.view.viewport.from&&l<=e.view.viewport.to&&(n=Math.min(l,n),s=Math.max(c,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let o of e.visibleRanges){let a=Math.max(o.from,n),l=Math.min(o.to,s);if(l>=a){let c=e.state.doc.lineAt(a),f=c.to<l?e.state.doc.lineAt(l):c,h=Math.max(o.from,c.from),g=Math.min(o.to,f.to);if(this.boundary){for(;a>c.from;a--)if(this.boundary.test(c.text[a-1-c.from])){h=a;break}for(;l<f.to;l++)if(this.boundary.test(f.text[l-f.from])){g=l;break}}let v=[],O,y=(S,w,_)=>v.push(_.range(S,w));if(c==f)for(this.regexp.lastIndex=h-c.from;(O=this.regexp.exec(c.text))&&O.index<g-c.from;)this.addMatch(O,e,O.index+c.from,y);else hb(e.state.doc,this.regexp,h,g,(S,w)=>this.addMatch(w,e,S,y));t=t.update({filterFrom:h,filterTo:g,filter:(S,w)=>S<h||w>g,add:v})}}return t}}const np=/x/.unicode!=null?"gu":"g",Pq=new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`,np),$q={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ku=null;function Tq(){var i;if(Ku==null&&typeof document<"u"&&document.body){let e=document.body.style;Ku=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Ku||!1}const gc=Le.define({combine(i){let e=hi(i,{render:null,specialChars:Pq,addSpecialChars:null});return(e.replaceTabs=!Tq())&&(e.specialChars=new RegExp("	|"+e.specialChars.source,np)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,np)),e}});function Rq(i={}){return[gc.of(i),Iq()]}let mb=null;function Iq(){return mb||(mb=fn.fromClass(class{constructor(i){this.view=i,this.decorations=We.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(gc)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new xq({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,o=is(e[0],0);if(o==9){let a=s.lineAt(n),l=t.state.tabSize,c=wa(a.text,l,n-a.from);return We.replace({widget:new Mq((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=We.replace({widget:new Nq(i,o)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(gc);i.startState.facet(gc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const Qq="•";function Aq(i){return i>=32?Qq:i==10?"␤":String.fromCharCode(9216+i)}class Nq extends mi{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Aq(this.code),n=e.state.phrase("Control character")+" "+($q[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let o=document.createElement("span");return o.textContent=t,o.title=n,o.setAttribute("aria-label",n),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Mq extends mi{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="	",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Lq(){return Dq}const Uq=We.line({class:"cm-activeLine"}),Dq=fn.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(Uq.range(s.from)),e=s.from)}return We.set(t)}},{decorations:i=>i.decorations});class qq extends mi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?fa(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=Ql(t[0],n.direction!="rtl"),o=parseInt(n.lineHeight);return s.bottom-s.top>o*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+o}:s}ignoreEvent(){return!1}}function Eq(i){let e=fn.fromClass(class{constructor(t){this.view=t,this.placeholder=i?We.set([We.widget({widget:new qq(i),side:1}).range(0)]):We.none}get decorations(){return this.view.state.doc.length?We.none:this.placeholder}},{decorations:t=>t.decorations});return typeof i=="string"?[e,Qe.contentAttributes.of({"aria-placeholder":i})]:e}const sp=2e3;function Bq(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),o=[];if(e.off>sp||t.off>sp||e.col<0||t.col<0){let a=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let c=n;c<=s;c++){let f=i.doc.line(c);f.length<=l&&o.push(me.range(f.from+a,f.to+l))}}else{let a=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let c=n;c<=s;c++){let f=i.doc.line(c),h=Mf(f.text,a,i.tabSize,!0);if(h<0)o.push(me.cursor(f.to));else{let g=Mf(f.text,l,i.tabSize);o.push(me.range(f.from+h,f.from+g))}}}return o}function Zq(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function gb(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,o=s>sp?-1:s==n.length?Zq(i,e.clientX):wa(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:o,off:s}}function zq(i,e){let t=gb(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let o=s.changes.mapPos(s.startState.doc.line(t.line).from),a=s.state.doc.lineAt(o);t={line:a.number,col:t.col,off:Math.min(t.off,a.length)},n=n.map(s.changes)}},get(s,o,a){let l=gb(i,s);if(!l)return n;let c=Bq(i.state,t,l);return c.length?a?me.create(c.concat(n.ranges)):me.create(c):n}}:null}function Hq(i){let e=t=>t.altKey&&t.button==0;return Qe.mouseSelectionStyle.of((t,n)=>e(n)?zq(t,n):null)}const Xq={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},jq={style:"cursor: crosshair"};function Vq(i={}){let[e,t]=Xq[i.key||"Alt"],n=fn.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,Qe.contentAttributes.of(s=>{var o;return!((o=s.plugin(n))===null||o===void 0)&&o.isDown?jq:null})]}const Wa="-10000px";class ly{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=n(a,o))}update(e,t){var n;let s=e.state.facet(this.facet),o=s.filter(c=>c);if(s===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let a=[],l=t?[]:null;for(let c=0;c<o.length;c++){let f=o[c],h=-1;if(f){for(let g=0;g<this.tooltips.length;g++){let v=this.tooltips[g];v&&v.create==f.create&&(h=g)}if(h<0)a[c]=this.createTooltipView(f,c?a[c-1]:null),l&&(l[c]=!!f.above);else{let g=a[c]=this.tooltipViews[h];l&&(l[c]=t[h]),g.update&&g.update(e)}}}for(let c of this.tooltipViews)a.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(l.forEach((c,f)=>t[f]=c),t.length=l.length),this.input=s,this.tooltips=o,this.tooltipViews=a,!0}}function Fq(i){let e=i.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const ef=Le.define({combine:i=>{var e,t,n;return{position:Ue.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||Fq}}}),vb=new WeakMap,sh=fn.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(ef);this.position=e.position,this.parent=e.parent,this.classes=i.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ly(i,ih,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),i.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(ef);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Wa,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Ue.gecko)t=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Wa&&o.style.left=="0px"){let a=o.getBoundingClientRect();t=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(t||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(i=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=Kp(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let l=this.manager.tooltipViews[a];return l.getCoords?l.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(ef).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:o}=i,a=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],f=this.manager.tooltipViews[l],{dom:h}=f,g=i.pos[l],v=i.size[l];if(!g||c.clip!==!1&&(g.bottom<=Math.max(t.top,n.top)||g.top>=Math.min(t.bottom,n.bottom)||g.right<Math.max(t.left,n.left)-.1||g.left>Math.min(t.right,n.right)+.1)){h.style.top=Wa;continue}let O=c.arrow?f.dom.querySelector(".cm-tooltip-arrow"):null,y=O?7:0,S=v.right-v.left,w=(e=vb.get(f))!==null&&e!==void 0?e:v.bottom-v.top,_=f.offset||Yq,$=this.view.textDirection==Bt.LTR,A=v.width>n.right-n.left?$?n.left:n.right-v.width:$?Math.max(n.left,Math.min(g.left-(O?14:0)+_.x,n.right-S)):Math.min(Math.max(n.left,g.left-S+(O?14:0)-_.x),n.right-S),R=this.above[l];!c.strictSide&&(R?g.top-w-y-_.y<n.top:g.bottom+w+y+_.y>n.bottom)&&R==n.bottom-g.bottom>g.top-n.top&&(R=this.above[l]=!R);let k=(R?g.top-n.top:n.bottom-g.bottom)-y;if(k<w&&f.resize!==!1){if(k<this.view.defaultLineHeight){h.style.top=Wa;continue}vb.set(f,w),h.style.height=(w=k)/o+"px"}else h.style.height&&(h.style.height="");let x=R?g.top-w-y-_.y:g.bottom+y+_.y,T=A+S;if(f.overlap!==!0)for(let M of a)M.left<T&&M.right>A&&M.top<x+w&&M.bottom>x&&(x=R?M.top-w-2-y:M.bottom+y+2);if(this.position=="absolute"?(h.style.top=(x-i.parent.top)/o+"px",bb(h,(A-i.parent.left)/s)):(h.style.top=x/o+"px",bb(h,A/s)),O){let M=g.left+($?_.x:-_.x)-(A+14-7);O.style.left=M/s+"px"}f.overlap!==!0&&a.push({left:A,top:x,right:T,bottom:x+w}),h.classList.toggle("cm-tooltip-above",R),h.classList.toggle("cm-tooltip-below",!R),f.positioned&&f.positioned(i.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let i of this.manager.tooltipViews)i.dom.style.top=Wa}},{eventObservers:{scroll(){this.maybeMeasure()}}});function bb(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const Wq=Qe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Yq={x:0,y:0},ih=Le.define({enables:[sh,Wq]}),Qc=Le.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class nd{static create(e){return new nd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ly(e,Qc,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Gq=ih.compute([Qc],i=>{let e=i.facet(Qc);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:nd.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Jq{constructor(e,t,n,s,o){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let s,o=1;if(n instanceof Wi)s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let l=e.coordsAtPos(s);if(!l||t.y<l.top||t.y>l.bottom||t.x<l.left-e.defaultCharacterWidth||t.x>l.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(s)).find(h=>h.from<=s&&h.to>=s),f=c&&c.dir==Bt.RTL?-1:1;o=t.x<l.left?-f:f}let a=this.source(e,s,o);if(a!=null&&a.then){let l=this.pending={pos:s};a.then(c=>{this.pending==l&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>ls(e.state,c,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(sh),t=e?e.manager.tooltips.findIndex(n=>n.create==nd.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:o}=this;if(s.length&&o&&!Kq(o.dom,e)||this.pending){let{pos:a}=s[0]||this.pending,l=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:a;(a==l?this.view.posAtCoords(this.lastMove)!=a:!e5(this.view,a,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Gr=4;function Kq(i,e){let{left:t,right:n,top:s,bottom:o}=i.getBoundingClientRect(),a;if(a=i.querySelector(".cm-tooltip-arrow")){let l=a.getBoundingClientRect();s=Math.min(l.top,s),o=Math.max(l.bottom,o)}return e.clientX>=t-Gr&&e.clientX<=n+Gr&&e.clientY>=s-Gr&&e.clientY<=o+Gr}function e5(i,e,t,n,s,o){let a=i.scrollDOM.getBoundingClientRect(),l=i.documentTop+i.documentPadding.top+i.contentHeight;if(a.left>n||a.right<n||a.top>s||Math.min(a.bottom,l)<s)return!1;let c=i.posAtCoords({x:n,y:s},!1);return c>=e&&c<=t}function t5(i,e={}){let t=ot.define(),n=kn.define({create(){return[]},update(s,o){if(s.length&&(e.hideOnChange&&(o.docChanged||o.selection)?s=[]:e.hideOn&&(s=s.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let l of s){let c=o.changes.mapPos(l.pos,-1,An.TrackDel);if(c!=null){let f=Object.assign(Object.create(null),l);f.pos=c,f.end!=null&&(f.end=o.changes.mapPos(f.end)),a.push(f)}}s=a}for(let a of o.effects)a.is(t)&&(s=a.value),a.is(n5)&&(s=[]);return s},provide:s=>Qc.from(s)});return{active:n,extension:[n,fn.define(s=>new Jq(s,i,n,t,e.hoverTime||300)),Gq]}}function ry(i,e){let t=i.plugin(sh);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const n5=ot.define(),Ob=Le.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function yl(i,e){let t=i.plugin(cy),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const cy=fn.fromClass(class{constructor(i){this.input=i.state.facet(Sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(Ob);this.top=new Jr(i,!0,e.topContainer),this.bottom=new Jr(i,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(i){let e=i.state.facet(Ob);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Jr(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Jr(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(Sl);if(t!=this.input){let n=t.filter(c=>c),s=[],o=[],a=[],l=[];for(let c of n){let f=this.specs.indexOf(c),h;f<0?(h=c(i.view),l.push(h)):(h=this.panels[f],h.update&&h.update(i)),s.push(h),(h.top?o:a).push(h)}this.specs=n,this.panels=s,this.top.sync(o),this.bottom.sync(a);for(let c of l)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>Qe.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Jr{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Cb(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Cb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Cb(i){let e=i.nextSibling;return i.remove(),e}const Sl=Le.define({enables:cy});class Ii extends Ro{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ii.prototype.elementClass="";Ii.prototype.toDOM=void 0;Ii.prototype.mapMode=An.TrackBefore;Ii.prototype.startSide=Ii.prototype.endSide=-1;Ii.prototype.point=!0;const vc=Le.define(),s5=Le.define(),i5={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>xt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},pl=Le.define();function o5(i){return[dy(),pl.of(Object.assign(Object.assign({},i5),i))]}const yb=Le.define({combine:i=>i.some(e=>e)});function dy(i){return[a5]}const a5=fn.fromClass(class{constructor(i){this.view=i,this.prevViewport=i.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=i.state.facet(pl).map(e=>new _b(i,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!i.state.facet(yb),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}i.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(yb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&this.dom.remove();let t=xt.iter(this.view.state.facet(vc),this.view.viewport.from),n=[],s=this.gutters.map(o=>new l5(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(o.type)){let a=!0;for(let l of o.type)if(l.type==Yn.Text&&a){ip(t,n,l.from);for(let c of s)c.line(this.view,l,n);a=!1}else if(l.widget)for(let c of s)c.widget(this.view,l)}else if(o.type==Yn.Text){ip(t,n,o.from);for(let a of s)a.line(this.view,o,n)}else if(o.widget)for(let a of s)a.widget(this.view,o);for(let o of s)o.finish();i&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(i){let e=i.startState.facet(pl),t=i.state.facet(pl),n=i.docChanged||i.heightChanged||i.viewportChanged||!xt.eq(i.startState.facet(vc),i.state.facet(vc),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let o of t){let a=e.indexOf(o);a<0?s.push(new _b(this.view,o)):(this.gutters[a].update(i),s.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),s.indexOf(o)<0&&o.destroy();for(let o of s)this.dom.appendChild(o.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove()}},{provide:i=>Qe.scrollMargins.of(e=>{let t=e.plugin(i);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Bt.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Sb(i){return Array.isArray(i)?i:[i]}function ip(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class l5{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=xt.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,o=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==s.elements.length){let l=new uy(e,a,o,n);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,a,o,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];ip(this.cursor,s,t.from),n.length&&(s=s.concat(n));let o=this.gutter.config.lineMarker(e,t,s);o&&s.unshift(o);let a=this.gutter;s.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let o of e.state.facet(s5)){let a=o(e,t.widget,t);a&&(s||(s=[])).push(a)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class _b{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let o=s.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let c=o.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=s.clientY;let l=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,l,s)&&s.preventDefault()});this.markers=Sb(t.markers(e)),t.initialSpacer&&(this.spacer=new uy(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Sb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!xt.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class uy{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),r5(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let o=0,a=0;;){let l=a,c=o<t.length?t[o++]:null,f=!1;if(c){let h=c.elementClass;h&&(n+=" "+h);for(let g=a;g<this.markers.length;g++)if(this.markers[g].compare(c)){l=g,f=!0;break}}else l=this.markers.length;for(;a<l;){let h=this.markers[a++];if(h.toDOM){h.destroy(s);let g=s.nextSibling;s.remove(),s=g}}if(!c)break;c.toDOM&&(f?s=s.nextSibling:this.dom.insertBefore(c.toDOM(e),s)),f&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function r5(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const c5=Le.define(),d5=Le.define(),ta=Le.define({combine(i){return hi(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let o=n[s],a=t[s];n[s]=o?(l,c,f)=>o(l,c,f)||a(l,c,f):a}return n}})}});class tf extends Ii{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function nf(i,e){return i.state.facet(ta).formatNumber(e,i.state)}const u5=pl.compute([ta],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(c5)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new tf(nf(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet(d5)){let o=s(e,t,n);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(ta)!=e.state.facet(ta),initialSpacer(e){return new tf(nf(e,wb(e.state.doc.lines)))},updateSpacer(e,t){let n=nf(t.view,wb(t.view.state.doc.lines));return n==e.number?e:new tf(n)},domEventHandlers:i.facet(ta).domEventHandlers}));function fy(i={}){return[ta.of(i),dy(),u5]}function wb(i){let e=9;for(;e<i;)e=e*10+9;return e}const f5=new class extends Ii{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},p5=vc.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(f5.range(s)))}return xt.of(e)});function h5(){return p5}const py=1024;let m5=0;class sf{constructor(e,t){this.from=e,this.to=t}}class gt{constructor(e={}){this.id=m5++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ds.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}gt.closedBy=new gt({deserialize:i=>i.split(" ")});gt.openedBy=new gt({deserialize:i=>i.split(" ")});gt.group=new gt({deserialize:i=>i.split(" ")});gt.isolate=new gt({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}});gt.contextHash=new gt({perNode:!0});gt.lookAhead=new gt({perNode:!0});gt.mounted=new gt({perNode:!0});class Ac{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[gt.mounted.id]}}const g5=Object.create(null);class ds{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):g5,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new ds(e.name||"",t,e.id,n);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(s)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[o[0].id]=o[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(gt.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(gt.group),o=-1;o<(s?s.length:0);o++){let a=t[o<0?n.name:s[o]];if(a)return a}}}}ds.none=new ds("",Object.create(null),0,8);class oh{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let s=null;for(let o of e){let a=o(n);a&&(s||(s=Object.assign({},n.props)),s[a[0].id]=a[1])}t.push(s?new ds(n.name,s,n.id,n.flags):n)}return new oh(t)}}const Kr=new WeakMap,kb=new WeakMap;var Cn;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(Cn||(Cn={}));class mn{constructor(e,t,n,s,o){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,o&&o.length){this.props=Object.create(null);for(let[a,l]of o)this.props[typeof a=="number"?a:a.id]=l}}toString(){let e=Ac.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.toString();s&&(t&&(t+=","),t+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ap(this.topNode,e)}cursorAt(e,t=0,n=0){let s=Kr.get(this)||this.topNode,o=new ap(s);return o.moveTo(e,t),Kr.set(this,o._tree),o}get topNode(){return new cs(this,0,0,null)}resolve(e,t=0){let n=_l(Kr.get(this)||this.topNode,e,t,!1);return Kr.set(this,n),n}resolveInner(e,t=0){let n=_l(kb.get(this)||this.topNode,e,t,!0);return kb.set(this,n),n}resolveStack(e,t=0){return O5(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:o=this.length}=e,a=e.mode||0,l=(a&Cn.IncludeAnonymous)>0;for(let c=this.cursor(a|Cn.IncludeAnonymous);;){let f=!1;if(c.from<=o&&c.to>=s&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;f=!0}for(;f&&n&&(l||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;f=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rh(ds.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new mn(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new mn(ds.none,t,n,s)))}static build(e){return C5(e)}}mn.empty=new mn(ds.none,[],[],0);class ah{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ah(this.buffer,this.index)}}class so{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return ds.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],s=this.set.types[t],o=s.name;if(/\W/.test(o)&&!s.isError&&(o=JSON.stringify(o)),e+=4,n==e)return o;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return o+"("+a.join(",")+")"}findChild(e,t,n,s,o){let{buffer:a}=this,l=-1;for(let c=e;c!=t&&!(hy(o,s,a[c+1],a[c+2])&&(l=c,n>0));c=a[c+3]);return l}slice(e,t,n){let s=this.buffer,o=new Uint16Array(t-e),a=0;for(let l=e,c=0;l<t;){o[c++]=s[l++],o[c++]=s[l++]-n;let f=o[c++]=s[l++]-n;o[c++]=s[l++]-e,a=Math.max(a,f)}return new so(o,a,this.set)}}function hy(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function _l(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let a=!n&&i instanceof cs&&i.index<0?null:i.parent;if(!a)return i;i=a}let o=n?0:Cn.IgnoreOverlays;if(n)for(let a=i,l=a.parent;l;a=l,l=a.parent)a instanceof cs&&a.index<0&&((s=l.enter(e,t,o))===null||s===void 0?void 0:s.from)!=a.from&&(i=l);for(;;){let a=i.enter(e,t,o);if(!a)return i;i=a}}class my{cursor(e=0){return new ap(this,e)}getChild(e,t=null,n=null){let s=xb(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return xb(this,e,t,n)}resolve(e,t=0){return _l(this,e,t,!1)}resolveInner(e,t=0){return _l(this,e,t,!0)}matchContext(e){return op(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class cs extends my{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,s,o=0){for(let a=this;;){for(let{children:l,positions:c}=a._tree,f=t>0?l.length:-1;e!=f;e+=t){let h=l[e],g=c[e]+a.from;if(hy(s,n,g,g+h.length)){if(h instanceof so){if(o&Cn.ExcludeBuffers)continue;let v=h.findChild(0,h.buffer.length,t,n-g,s);if(v>-1)return new ri(new v5(a,h,e,g),null,v)}else if(o&Cn.IncludeAnonymous||!h.type.isAnonymous||lh(h)){let v;if(!(o&Cn.IgnoreMounts)&&(v=Ac.get(h))&&!v.overlay)return new cs(v.tree,g,e,a);let O=new cs(h,g,e,a);return o&Cn.IncludeAnonymous||!O.type.isAnonymous?O:O.nextChild(t<0?h.children.length-1:0,t,n,s)}}}if(o&Cn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let s;if(!(n&Cn.IgnoreOverlays)&&(s=Ac.get(this._tree))&&s.overlay){let o=e-this.from;for(let{from:a,to:l}of s.overlay)if((t>0?a<=o:a<o)&&(t<0?l>=o:l>o))return new cs(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function xb(i,e,t,n){let s=i.cursor(),o=[];if(!s.firstChild())return o;if(t!=null){for(let a=!1;!a;)if(a=s.type.is(t),!s.nextSibling())return o}for(;;){if(n!=null&&s.type.is(n))return o;if(s.type.is(e)&&o.push(s.node),!s.nextSibling())return n==null?o:[]}}function op(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class v5{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class ri extends my{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new ri(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Cn.ExcludeBuffers)return null;let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new ri(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ri(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ri(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,o=n.buffer[this.index+3];if(o>s){let a=n.buffer[this.index+1];e.push(n.slice(s,o,a)),t.push(0)}return new mn(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function gy(i){if(!i.length)return null;let e=0,t=i[0];for(let o=1;o<i.length;o++){let a=i[o];(a.from>t.from||a.to<t.to)&&(t=a,e=o)}let n=t instanceof cs&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new b5(s,t)}class b5{constructor(e,t){this.heads=e,this.node=t}get next(){return gy(this.heads)}}function O5(i,e,t){let n=i.resolveInner(e,t),s=null;for(let o=n instanceof cs?n:n.context.parent;o;o=o.parent)if(o.index<0){let a=o.parent;(s||(s=[n])).push(a.resolve(e,t)),o=a}else{let a=Ac.get(o.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let l=new cs(a.tree,a.overlay[0].from+o.from,-1,o);(s||(s=[n])).push(_l(l,e,t,!1))}}return s?gy(s):n}class ap{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof cs)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof cs?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Cn.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Cn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Cn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(s.buffer.buffer[o+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let o=t+e,a=e<0?-1:n._tree.children.length;o!=a;o+=e){let l=n._tree.children[o];if(this.mode&Cn.IncludeAnonymous||l instanceof so||!l.type.isAnonymous||lh(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,o=this.stack.length;o>=0;){for(let a=e;a;a=a._parent)if(a.index==s){if(s==this.index)return a;t=a,n=o+1;break e}s=this.stack[--o]}for(let s=n;s<this.stack.length;s++)t=new ri(this.buffer,t,this.stack[s]);return this.bufferNode=new ri(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return op(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,o=this.stack.length-1;s>=0;o--){if(o<0)return op(this._tree,e,s);let a=n[t.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[s]&&e[s]!=a.name)return!1;s--}}return!0}}function lh(i){return i.children.some(e=>e instanceof so||!e.type.isAnonymous||lh(e))}function C5(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=py,reused:o=[],minRepeatType:a=n.types.length}=i,l=Array.isArray(t)?new ah(t,t.length):t,c=n.types,f=0,h=0;function g(k,x,T,M,N,I){let{id:q,start:z,end:H,size:F}=l,V=h,j=f;for(;F<0;)if(l.next(),F==-1){let Oe=o[q];T.push(Oe),M.push(z-k);return}else if(F==-3){f=q;return}else if(F==-4){h=q;return}else throw new RangeError(`Unrecognized record size: ${F}`);let se=c[q],G,K,de=z-k;if(H-z<=s&&(K=w(l.pos-x,N))){let Oe=new Uint16Array(K.size-K.skip),we=l.pos-K.size,pe=Oe.length;for(;l.pos>we;)pe=_(K.start,Oe,pe);G=new so(Oe,H-K.start,n),de=K.start-k}else{let Oe=l.pos-F;l.next();let we=[],pe=[],Se=q>=a?q:-1,xe=0,Me=H;for(;l.pos>Oe;)Se>=0&&l.id==Se&&l.size>=0?(l.end<=Me-s&&(y(we,pe,z,xe,l.end,Me,Se,V,j),xe=we.length,Me=l.end),l.next()):I>2500?v(z,Oe,we,pe):g(z,Oe,we,pe,Se,I+1);if(Se>=0&&xe>0&&xe<we.length&&y(we,pe,z,xe,z,Me,Se,V,j),we.reverse(),pe.reverse(),Se>-1&&xe>0){let Pe=O(se,j);G=rh(se,we,pe,0,we.length,0,H-z,Pe,Pe)}else G=S(se,we,pe,H-z,V-H,j)}T.push(G),M.push(de)}function v(k,x,T,M){let N=[],I=0,q=-1;for(;l.pos>x;){let{id:z,start:H,end:F,size:V}=l;if(V>4)l.next();else{if(q>-1&&H<q)break;q<0&&(q=F-s),N.push(z,H,F),I++,l.next()}}if(I){let z=new Uint16Array(I*4),H=N[N.length-2];for(let F=N.length-3,V=0;F>=0;F-=3)z[V++]=N[F],z[V++]=N[F+1]-H,z[V++]=N[F+2]-H,z[V++]=V;T.push(new so(z,N[2]-H,n)),M.push(H-k)}}function O(k,x){return(T,M,N)=>{let I=0,q=T.length-1,z,H;if(q>=0&&(z=T[q])instanceof mn){if(!q&&z.type==k&&z.length==N)return z;(H=z.prop(gt.lookAhead))&&(I=M[q]+z.length+H)}return S(k,T,M,N,I,x)}}function y(k,x,T,M,N,I,q,z,H){let F=[],V=[];for(;k.length>M;)F.push(k.pop()),V.push(x.pop()+T-N);k.push(S(n.types[q],F,V,I-N,z-I,H)),x.push(N-T)}function S(k,x,T,M,N,I,q){if(I){let z=[gt.contextHash,I];q=q?[z].concat(q):[z]}if(N>25){let z=[gt.lookAhead,N];q=q?[z].concat(q):[z]}return new mn(k,x,T,M,q)}function w(k,x){let T=l.fork(),M=0,N=0,I=0,q=T.end-s,z={size:0,start:0,skip:0};e:for(let H=T.pos-k;T.pos>H;){let F=T.size;if(T.id==x&&F>=0){z.size=M,z.start=N,z.skip=I,I+=4,M+=4,T.next();continue}let V=T.pos-F;if(F<0||V<H||T.start<q)break;let j=T.id>=a?4:0,se=T.start;for(T.next();T.pos>V;){if(T.size<0)if(T.size==-3)j+=4;else break e;else T.id>=a&&(j+=4);T.next()}N=se,M+=F,I+=j}return(x<0||M==k)&&(z.size=M,z.start=N,z.skip=I),z.size>4?z:void 0}function _(k,x,T){let{id:M,start:N,end:I,size:q}=l;if(l.next(),q>=0&&M<a){let z=T;if(q>4){let H=l.pos-(q-4);for(;l.pos>H;)T=_(k,x,T)}x[--T]=z,x[--T]=I-k,x[--T]=N-k,x[--T]=M}else q==-3?f=M:q==-4&&(h=M);return T}let $=[],A=[];for(;l.pos>0;)g(i.start||0,i.bufferStart||0,$,A,-1,0);let R=(e=i.length)!==null&&e!==void 0?e:$.length?A[0]+$[0].length:0;return new mn(c[i.topID],$.reverse(),A.reverse(),R)}const Pb=new WeakMap;function bc(i,e){if(!i.isAnonymous||e instanceof so||e.type!=i)return 1;let t=Pb.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof mn)){t=1;break}t+=bc(i,n)}Pb.set(e,t)}return t}function rh(i,e,t,n,s,o,a,l,c){let f=0;for(let y=n;y<s;y++)f+=bc(i,e[y]);let h=Math.ceil(f*1.5/8),g=[],v=[];function O(y,S,w,_,$){for(let A=w;A<_;){let R=A,k=S[A],x=bc(i,y[A]);for(A++;A<_;A++){let T=bc(i,y[A]);if(x+T>=h)break;x+=T}if(A==R+1){if(x>h){let T=y[R];O(T.children,T.positions,0,T.children.length,S[R]+$);continue}g.push(y[R])}else{let T=S[A-1]+y[A-1].length-k;g.push(rh(i,y,S,R,A,k,T,null,c))}v.push(k+$-o)}}return O(e,t,n,s,0),(l||c)(g,v,a)}class y5{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof ri?this.setBuffer(e.context.buffer,e.index,t):e instanceof cs&&this.map.set(e.tree,t)}get(e){return e instanceof ri?this.getBuffer(e.context.buffer,e.index):e instanceof cs?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Po{constructor(e,t,n,s,o=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new Po(0,e.length,e,0,!1,n)];for(let o of t)o.to>e.length&&s.push(o);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],o=1,a=e.length?e[0]:null;for(let l=0,c=0,f=0;;l++){let h=l<t.length?t[l]:null,g=h?h.fromA:1e9;if(g-c>=n)for(;a&&a.from<g;){let v=a;if(c>=v.from||g<=v.to||f){let O=Math.max(v.from,c)-f,y=Math.min(v.to,g)-f;v=O>=y?null:new Po(O,y,v.tree,v.offset+f,l>0,!!h)}if(v&&s.push(v),a.to>g)break;a=o<e.length?e[o++]:null}if(!h)break;c=h.toA,f=h.toA-h.toB}return s}}class vy{startParse(e,t,n){return typeof e=="string"&&(e=new S5(e)),n=n?n.length?n.map(s=>new sf(s.from,s.to)):[new sf(0,0)]:[new sf(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let o=s.advance();if(o)return o}}}class S5{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new gt({perNode:!0});let _5=0;class As{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=_5++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof As&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new As(n,[],null,[]);if(s.set.push(s),t)for(let o of t.set)s.set.push(o);return s}static defineModifier(e){let t=new Nc(e);return n=>n.modified.indexOf(t)>-1?n:Nc.get(n.base||n,n.modified.concat(t).sort((s,o)=>s.id-o.id))}}let w5=0;class Nc{constructor(e){this.name=e,this.instances=[],this.id=w5++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(l=>l.base==e&&k5(t,l.modified));if(n)return n;let s=[],o=new As(e.name,s,e,t);for(let l of t)l.instances.push(o);let a=x5(t);for(let l of e.set)if(!l.modified.length)for(let c of a)s.push(Nc.get(l,c));return o}}function k5(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function x5(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function by(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let o=[],a=2,l=s;for(let g=0;;){if(l=="..."&&g>0&&g+3==s.length){a=1;break}let v=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!v)throw new RangeError("Invalid path: "+s);if(o.push(v[0]=="*"?"":v[0][0]=='"'?JSON.parse(v[0]):v[0]),g+=v[0].length,g==s.length)break;let O=s[g++];if(g==s.length&&O=="!"){a=0;break}if(O!="/")throw new RangeError("Invalid path: "+s);l=s.slice(g)}let c=o.length-1,f=o[c];if(!f)throw new RangeError("Invalid path: "+s);let h=new Mc(n,a,c>0?o.slice(0,c):null);e[f]=h.sort(e[f])}}return Oy.add(e)}const Oy=new gt;class Mc{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Mc.empty=new Mc([],2,null);function Cy(i,e){let t=Object.create(null);for(let o of i)if(!Array.isArray(o.tag))t[o.tag.id]=o.class;else for(let a of o.tag)t[a.id]=o.class;let{scope:n,all:s=null}=e||{};return{style:o=>{let a=s;for(let l of o)for(let c of l.set){let f=t[c.id];if(f){a=a?a+" "+f:f;break}}return a},scope:n}}function P5(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function $5(i,e,t,n=0,s=i.length){let o=new T5(n,Array.isArray(e)?e:[e],t);o.highlightRange(i.cursor(),n,s,"",o.highlighters),o.flush(s)}class T5{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,o){let{type:a,from:l,to:c}=e;if(l>=n||c<=t)return;a.isTop&&(o=this.highlighters.filter(O=>!O.scope||O.scope(a)));let f=s,h=R5(e)||Mc.empty,g=P5(o,h.tags);if(g&&(f&&(f+=" "),f+=g,h.mode==1&&(s+=(s?" ":"")+g)),this.startSpan(Math.max(t,l),f),h.opaque)return;let v=e.tree&&e.tree.prop(gt.mounted);if(v&&v.overlay){let O=e.node.enter(v.overlay[0].from+l,1),y=this.highlighters.filter(w=>!w.scope||w.scope(v.tree.type)),S=e.firstChild();for(let w=0,_=l;;w++){let $=w<v.overlay.length?v.overlay[w]:null,A=$?$.from+l:c,R=Math.max(t,_),k=Math.min(n,A);if(R<k&&S)for(;e.from<k&&(this.highlightRange(e,R,k,s,o),this.startSpan(Math.min(k,e.to),f),!(e.to>=A||!e.nextSibling())););if(!$||A>n)break;_=$.to+l,_>t&&(this.highlightRange(O.cursor(),Math.max(t,$.from+l),Math.min(n,_),"",y),this.startSpan(Math.min(n,_),f))}S&&e.parent()}else if(e.firstChild()){v&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,o),this.startSpan(Math.min(n,e.to),f)}while(e.nextSibling());e.parent()}}}function R5(i){let e=i.type.prop(Oy);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const $e=As.define,ec=$e(),Xi=$e(),$b=$e(Xi),Tb=$e(Xi),ji=$e(),tc=$e(ji),of=$e(ji),ii=$e(),Co=$e(ii),ni=$e(),si=$e(),lp=$e(),Ya=$e(lp),nc=$e(),ne={comment:ec,lineComment:$e(ec),blockComment:$e(ec),docComment:$e(ec),name:Xi,variableName:$e(Xi),typeName:$b,tagName:$e($b),propertyName:Tb,attributeName:$e(Tb),className:$e(Xi),labelName:$e(Xi),namespace:$e(Xi),macroName:$e(Xi),literal:ji,string:tc,docString:$e(tc),character:$e(tc),attributeValue:$e(tc),number:of,integer:$e(of),float:$e(of),bool:$e(ji),regexp:$e(ji),escape:$e(ji),color:$e(ji),url:$e(ji),keyword:ni,self:$e(ni),null:$e(ni),atom:$e(ni),unit:$e(ni),modifier:$e(ni),operatorKeyword:$e(ni),controlKeyword:$e(ni),definitionKeyword:$e(ni),moduleKeyword:$e(ni),operator:si,derefOperator:$e(si),arithmeticOperator:$e(si),logicOperator:$e(si),bitwiseOperator:$e(si),compareOperator:$e(si),updateOperator:$e(si),definitionOperator:$e(si),typeOperator:$e(si),controlOperator:$e(si),punctuation:lp,separator:$e(lp),bracket:Ya,angleBracket:$e(Ya),squareBracket:$e(Ya),paren:$e(Ya),brace:$e(Ya),content:ii,heading:Co,heading1:$e(Co),heading2:$e(Co),heading3:$e(Co),heading4:$e(Co),heading5:$e(Co),heading6:$e(Co),contentSeparator:$e(ii),list:$e(ii),quote:$e(ii),emphasis:$e(ii),strong:$e(ii),link:$e(ii),monospace:$e(ii),strikethrough:$e(ii),inserted:$e(),deleted:$e(),changed:$e(),invalid:$e(),meta:nc,documentMeta:$e(nc),annotation:$e(nc),processingInstruction:$e(nc),definition:As.defineModifier("definition"),constant:As.defineModifier("constant"),function:As.defineModifier("function"),standard:As.defineModifier("standard"),local:As.defineModifier("local"),special:As.defineModifier("special")};for(let i in ne){let e=ne[i];e instanceof As&&(e.name=i)}Cy([{tag:ne.link,class:"tok-link"},{tag:ne.heading,class:"tok-heading"},{tag:ne.emphasis,class:"tok-emphasis"},{tag:ne.strong,class:"tok-strong"},{tag:ne.keyword,class:"tok-keyword"},{tag:ne.atom,class:"tok-atom"},{tag:ne.bool,class:"tok-bool"},{tag:ne.url,class:"tok-url"},{tag:ne.labelName,class:"tok-labelName"},{tag:ne.inserted,class:"tok-inserted"},{tag:ne.deleted,class:"tok-deleted"},{tag:ne.literal,class:"tok-literal"},{tag:ne.string,class:"tok-string"},{tag:ne.number,class:"tok-number"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],class:"tok-string2"},{tag:ne.variableName,class:"tok-variableName"},{tag:ne.local(ne.variableName),class:"tok-variableName tok-local"},{tag:ne.definition(ne.variableName),class:"tok-variableName tok-definition"},{tag:ne.special(ne.variableName),class:"tok-variableName2"},{tag:ne.definition(ne.propertyName),class:"tok-propertyName tok-definition"},{tag:ne.typeName,class:"tok-typeName"},{tag:ne.namespace,class:"tok-namespace"},{tag:ne.className,class:"tok-className"},{tag:ne.macroName,class:"tok-macroName"},{tag:ne.propertyName,class:"tok-propertyName"},{tag:ne.operator,class:"tok-operator"},{tag:ne.comment,class:"tok-comment"},{tag:ne.meta,class:"tok-meta"},{tag:ne.invalid,class:"tok-invalid"},{tag:ne.punctuation,class:"tok-punctuation"}]);var af;const na=new gt;function yy(i){return Le.define({combine:i?e=>e.concat(i):void 0})}const ch=new gt;class Xs{constructor(e,t,n=[],s=""){this.data=e,this.name=s,yt.prototype.hasOwnProperty("tree")||Object.defineProperty(yt.prototype,"tree",{get(){return Sn(this)}}),this.parser=t,this.extension=[io.of(this),yt.languageData.of((o,a,l)=>{let c=Rb(o,a,l),f=c.type.prop(na);if(!f)return[];let h=o.facet(f),g=c.type.prop(ch);if(g){let v=c.resolve(a-c.from,l);for(let O of g)if(O.test(v,o)){let y=o.facet(O.facet);return O.type=="replace"?y:y.concat(h)}}return h})].concat(n)}isActiveAt(e,t,n=-1){return Rb(e,t,n).type.prop(na)==this.data}findRegions(e){let t=e.facet(io);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(o,a)=>{if(o.prop(na)==this.data){n.push({from:a,to:a+o.length});return}let l=o.prop(gt.mounted);if(l){if(l.tree.prop(na)==this.data){if(l.overlay)for(let c of l.overlay)n.push({from:c.from+a,to:c.to+a});else n.push({from:a,to:a+o.length});return}else if(l.overlay){let c=n.length;if(s(l.tree,l.overlay[0].from+a),n.length>c)return}}for(let c=0;c<o.children.length;c++){let f=o.children[c];f instanceof mn&&s(f,o.positions[c]+a)}};return s(Sn(e),0),n}get allowsNesting(){return!0}}Xs.setState=ot.define();function Rb(i,e,t){let n=i.facet(io),s=Sn(i).topNode;if(!n||n.allowsNesting)for(let o=s;o;o=o.enter(e,t,Cn.ExcludeBuffers))o.type.isTop&&(s=o);return s}class Lc extends Xs{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=yy(e.languageData);return new Lc(t,e.parser.configure({props:[na.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new Lc(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Sn(i){let e=i.field(Xs.state,!1);return e?e.tree:mn.empty}class I5{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Ga=null;class Uc{constructor(e,t,n=[],s,o,a,l,c){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=o,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Uc(e,t,[],mn.empty,0,n,[],null)}startParse(){return this.parser.startParse(new I5(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=mn.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(Po.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Po.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Ga;Ga=this;try{return e()}finally{Ga=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Ib(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:o,viewport:a,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((f,h,g,v)=>c.push({fromA:f,toA:h,fromB:g,toB:v})),n=Po.applyChanges(n,c),s=mn.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){l=[];for(let f of this.skipped){let h=e.mapPos(f.from,1),g=e.mapPos(f.to,-1);h<g&&l.push({from:h,to:g})}}}return new Uc(this.parser,t,n,s,o,a,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:o}=this.skipped[n];s<e.to&&o>e.from&&(this.fragments=Ib(this.fragments,s,o),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends vy{createParse(t,n,s){let o=s[0].from,a=s[s.length-1].to;return{parsedPos:o,advance(){let c=Ga;if(c){for(let f of s)c.tempSkipped.push(f);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=a,new mn(ds.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Ga}}function Ib(i,e,t){return Po.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class ga{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new ga(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Uc.create(e.facet(io).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new ga(n)}}Xs.state=kn.define({create:ga.init,update(i,e){for(let t of e.effects)if(t.is(Xs.setState))return t.value;return e.startState.facet(io)!=e.state.facet(io)?ga.init(e.state):i.apply(e)}});let Sy=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Sy=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const lf=typeof navigator<"u"&&(!((af=navigator.scheduling)===null||af===void 0)&&af.isInputPending)?()=>navigator.scheduling.isInputPending():null,Q5=fn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Xs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Xs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Sy(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,o=n.field(Xs.state);if(o.tree==o.context.tree&&o.context.isDone(s+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!lf?Math.max(25,e.timeRemaining()-5):1e9),l=o.context.treeLen<s&&n.doc.length>s+1e3,c=o.context.work(()=>lf&&lf()||Date.now()>a,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Xs.setState.of(new ga(o.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>ls(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),io=Le.define({combine(i){return i.length?i[0]:null},enables:i=>[Xs.state,Q5,Qe.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class A5{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const N5=Le.define(),Ul=Le.define({combine:i=>{if(!i.length)return"  ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function Dc(i){let e=i.facet(Ul);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function wl(i,e){let t="",n=i.tabSize,s=i.facet(Ul)[0];if(s=="	"){for(;e>=n;)t+="	",e-=n;s=" "}for(let o=0;o<e;o++)t+=s;return t}function dh(i,e){i instanceof yt&&(i=new sd(i));for(let n of i.state.facet(N5)){let s=n(i,e);if(s!==void 0)return s}let t=Sn(i.state);return t.length>=e?M5(i,t,e):null}class sd{constructor(e,t={}){this.state=e,this.options=t,this.unit=Dc(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:o}=this.options;return s!=null&&s>=n.from&&s<=n.to?o&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),o=this.countColumn(n,e-s),a=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return a>-1&&(o+=a-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return wa(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let a=o(s);if(a>-1)return a}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const _y=new gt;function M5(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let o=[];for(let a=s;a&&!(a.from==n.node.from&&a.type==n.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)n={node:o[a],next:n}}return wy(n,i,t)}function wy(i,e,t){for(let n=i;n;n=n.next){let s=U5(n.node);if(s)return s(uh.create(e,t,n))}return 0}function L5(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function U5(i){let e=i.type.prop(_y);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(gt.closedBy))){let s=i.lastChild,o=s&&n.indexOf(s.name)>-1;return a=>ky(a,!0,1,void 0,o&&!L5(a)?s.from:void 0)}return i.parent==null?D5:null}function D5(){return 0}class uh extends sd{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new uh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(q5(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return wy(this.context.next,this.base,this.pos)}}function q5(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function E5(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,o=i.state.doc.lineAt(t.from),a=s==null||s<=o.from?o.to:Math.min(o.to,s);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==n)return null;if(!c.type.isSkipped){if(c.from>=a)return null;let f=/^ */.exec(o.text.slice(t.to-o.from))[0].length;return{from:t.from,to:t.to+f}}l=c.to}}function B5({closing:i,align:e=!0,units:t=1}){return n=>ky(n,e,t,i)}function ky(i,e,t,n,s){let o=i.textAfter,a=o.match(/^\s*/)[0].length,l=n&&o.slice(a,a+n.length)==n||s==i.pos+a,c=e?E5(i):null;return c?l?i.column(c.from):i.column(c.to):i.baseIndent+(l?0:i.unit*t)}const Z5=i=>i.baseIndent;function rf({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const z5=200;function H5(){return yt.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+z5)return i;let o=t.sliceString(s.from,n);if(!e.some(f=>f.test(o)))return i;let{state:a}=i,l=-1,c=[];for(let{head:f}of a.selection.ranges){let h=a.doc.lineAt(f);if(h.from==l)continue;l=h.from;let g=dh(a,h.from);if(g==null)continue;let v=/^\s*/.exec(h.text)[0],O=wl(a,g);v!=O&&c.push({from:h.from,to:h.from+v.length,insert:O})}return c.length?[i,{changes:c,sequential:!0}]:i})}const X5=Le.define(),xy=new gt;function j5(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function V5(i,e,t){let n=Sn(i);if(n.length<t)return null;let s=n.resolveStack(t,1),o=null;for(let a=s;a;a=a.next){let l=a.node;if(l.to<=t||l.from>t)continue;if(o&&l.from<e)break;let c=l.type.prop(xy);if(c&&(l.to<n.length-50||n.length==i.doc.length||!F5(l))){let f=c(l,i);f&&f.from<=t&&f.from>=e&&f.to>t&&(o=f)}}return o}function F5(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function qc(i,e,t){for(let n of i.facet(X5)){let s=n(i,e,t);if(s)return s}return V5(i,e,t)}function Py(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const id=ot.define({map:Py}),Dl=ot.define({map:Py});function $y(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const No=kn.define({create(){return We.none},update(i,e){i=i.map(e.changes);for(let t of e.effects)if(t.is(id)&&!W5(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(Iy),s=n?We.replace({widget:new nE(n(e.state,t.value))}):Qb;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Dl)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;i.between(n,n,(s,o)=>{s<n&&o>n&&(t=!0)}),t&&(i=i.update({filterFrom:n,filterTo:n,filter:(s,o)=>o<=n||s>=n}))}return i},provide:i=>Qe.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(Qb.range(n,s))}return We.set(e,!0)}});function Ec(i,e,t){var n;let s=null;return(n=i.field(No,!1))===null||n===void 0||n.between(e,t,(o,a)=>{(!s||s.from>o)&&(s={from:o,to:a})}),s}function W5(i,e,t){let n=!1;return i.between(e,e,(s,o)=>{s==e&&o==t&&(n=!0)}),n}function Ty(i,e){return i.field(No,!1)?e:e.concat(ot.appendConfig.of(Qy()))}const Y5=i=>{for(let e of $y(i)){let t=qc(i.state,e.from,e.to);if(t)return i.dispatch({effects:Ty(i.state,[id.of(t),Ry(i,t)])}),!0}return!1},G5=i=>{if(!i.state.field(No,!1))return!1;let e=[];for(let t of $y(i)){let n=Ec(i.state,t.from,t.to);n&&e.push(Dl.of(n),Ry(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function Ry(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return Qe.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const J5=i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),o=qc(e,s.from,s.to);o&&t.push(id.of(o)),n=(o?i.lineBlockAt(o.to):s).to+1}return t.length&&i.dispatch({effects:Ty(i.state,t)}),!!t.length},K5=i=>{let e=i.state.field(No,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Dl.of({from:n,to:s}))}),i.dispatch({effects:t}),!0},eE=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Y5},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:G5},{key:"Ctrl-Alt-[",run:J5},{key:"Ctrl-Alt-]",run:K5}],tE={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Iy=Le.define({combine(i){return hi(i,tE)}});function Qy(i){return[No,oE]}function Ay(i,e){let{state:t}=i,n=t.facet(Iy),s=a=>{let l=i.lineBlockAt(i.posAtDOM(a.target)),c=Ec(i.state,l.from,l.to);c&&i.dispatch({effects:Dl.of(c)}),a.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let o=document.createElement("span");return o.textContent=n.placeholderText,o.setAttribute("aria-label",t.phrase("folded code")),o.title=t.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=s,o}const Qb=We.replace({widget:new class extends mi{toDOM(i){return Ay(i,null)}}});class nE extends mi{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ay(e,this.value)}}const sE={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class cf extends Ii{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function iE(i={}){let e=Object.assign(Object.assign({},sE),i),t=new cf(e,!0),n=new cf(e,!1),s=fn.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(io)!=a.state.facet(io)||a.startState.field(No,!1)!=a.state.field(No,!1)||Sn(a.startState)!=Sn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let l=new Ti;for(let c of a.viewportLineBlocks){let f=Ec(a.state,c.from,c.to)?n:qc(a.state,c.from,c.to)?t:null;f&&l.add(c.from,c.from,f)}return l.finish()}}),{domEventHandlers:o}=e;return[s,o5({class:"cm-foldGutter",markers(a){var l;return((l=a.plugin(s))===null||l===void 0?void 0:l.markers)||xt.empty},initialSpacer(){return new cf(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,l,c)=>{if(o.click&&o.click(a,l,c))return!0;let f=Ec(a.state,l.from,l.to);if(f)return a.dispatch({effects:Dl.of(f)}),!0;let h=qc(a.state,l.from,l.to);return h?(a.dispatch({effects:id.of(h)}),!0):!1}})}),Qy()]}const oE=Qe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ql{constructor(e,t){this.specs=e;let n;function s(l){let c=eo.newName();return(n||(n=Object.create(null)))["."+c]=l,c}const o=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,a=t.scope;this.scope=a instanceof Xs?l=>l.prop(na)==a.data:a?l=>l==a:void 0,this.style=Cy(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:o}).style,this.module=n?new eo(n):null,this.themeType=t.themeType}static define(e,t){return new ql(e,t||{})}}const rp=Le.define(),Ny=Le.define({combine(i){return i.length?[i[0]]:null}});function df(i){let e=i.facet(rp);return e.length?e:i.facet(Ny)}function My(i,e){let t=[lE],n;return i instanceof ql&&(i.module&&t.push(Qe.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(Ny.of(i)):n?t.push(rp.computeN([Qe.darkTheme],s=>s.facet(Qe.darkTheme)==(n=="dark")?[i]:[])):t.push(rp.of(i)),t}class aE{constructor(e){this.markCache=Object.create(null),this.tree=Sn(e.state),this.decorations=this.buildDeco(e,df(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Sn(e.state),n=df(e.state),s=n!=df(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<o.to&&!s&&t.type==this.tree.type&&a>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return We.none;let n=new Ti;for(let{from:s,to:o}of e.visibleRanges)$5(this.tree,t,(a,l,c)=>{n.add(a,l,this.markCache[c]||(this.markCache[c]=We.mark({class:c})))},s,o);return n.finish()}}const lE=lo.high(fn.fromClass(aE,{decorations:i=>i.decorations})),rE=ql.define([{tag:ne.meta,color:"#404740"},{tag:ne.link,textDecoration:"underline"},{tag:ne.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strong,fontWeight:"bold"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.keyword,color:"#708"},{tag:[ne.atom,ne.bool,ne.url,ne.contentSeparator,ne.labelName],color:"#219"},{tag:[ne.literal,ne.inserted],color:"#164"},{tag:[ne.string,ne.deleted],color:"#a11"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],color:"#e40"},{tag:ne.definition(ne.variableName),color:"#00f"},{tag:ne.local(ne.variableName),color:"#30a"},{tag:[ne.typeName,ne.namespace],color:"#085"},{tag:ne.className,color:"#167"},{tag:[ne.special(ne.variableName),ne.macroName],color:"#256"},{tag:ne.definition(ne.propertyName),color:"#00c"},{tag:ne.comment,color:"#940"},{tag:ne.invalid,color:"#f00"}]),cE=Qe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Ly=1e4,Uy="()[]{}",Dy=Le.define({combine(i){return hi(i,{afterCursor:!0,brackets:Uy,maxScanDistance:Ly,renderMatch:fE})}}),dE=We.mark({class:"cm-matchingBracket"}),uE=We.mark({class:"cm-nonmatchingBracket"});function fE(i){let e=[],t=i.matched?dE:uE;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const pE=kn.define({create(){return We.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(Dy);for(let s of e.state.selection.ranges){if(!s.empty)continue;let o=ci(e.state,s.head,-1,n)||s.head>0&&ci(e.state,s.head-1,1,n)||n.afterCursor&&(ci(e.state,s.head,1,n)||s.head<e.state.doc.length&&ci(e.state,s.head+1,-1,n));o&&(t=t.concat(n.renderMatch(o,e.state)))}return We.set(t,!0)},provide:i=>Qe.decorations.from(i)}),hE=[pE,cE];function mE(i={}){return[Dy.of(i),hE]}const gE=new gt;function cp(i,e,t){let n=i.prop(e<0?gt.openedBy:gt.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function dp(i){let e=i.type.prop(gE);return e?e(i.node):i}function ci(i,e,t,n={}){let s=n.maxScanDistance||Ly,o=n.brackets||Uy,a=Sn(i),l=a.resolveInner(e,t);for(let c=l;c;c=c.parent){let f=cp(c.type,t,o);if(f&&c.from<c.to){let h=dp(c);if(h&&(t>0?e>=h.from&&e<h.to:e>h.from&&e<=h.to))return vE(i,e,t,c,h,f,o)}}return bE(i,e,t,a,l.type,s,o)}function vE(i,e,t,n,s,o,a){let l=n.parent,c={from:s.from,to:s.to},f=0,h=l==null?void 0:l.cursor();if(h&&(t<0?h.childBefore(n.from):h.childAfter(n.to)))do if(t<0?h.to<=n.from:h.from>=n.to){if(f==0&&o.indexOf(h.type.name)>-1&&h.from<h.to){let g=dp(h);return{start:c,end:g?{from:g.from,to:g.to}:void 0,matched:!0}}else if(cp(h.type,t,a))f++;else if(cp(h.type,-t,a)){if(f==0){let g=dp(h);return{start:c,end:g&&g.from<g.to?{from:g.from,to:g.to}:void 0,matched:!1}}f--}}while(t<0?h.prevSibling():h.nextSibling());return{start:c,matched:!1}}function bE(i,e,t,n,s,o,a){let l=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),c=a.indexOf(l);if(c<0||c%2==0!=t>0)return null;let f={from:t<0?e-1:e,to:t>0?e+1:e},h=i.doc.iterRange(e,t>0?i.doc.length:0),g=0;for(let v=0;!h.next().done&&v<=o;){let O=h.value;t<0&&(v+=O.length);let y=e+v*t;for(let S=t>0?0:O.length-1,w=t>0?O.length:-1;S!=w;S+=t){let _=a.indexOf(O[S]);if(!(_<0||n.resolveInner(y+S,1).type!=s))if(_%2==0==t>0)g++;else{if(g==1)return{start:f,end:{from:y+S,to:y+S+1},matched:_>>1==c>>1};g--}}t>0&&(v+=O.length)}return h.done?{start:f,matched:!1}:null}const OE=Object.create(null),Ab=[ds.none],Nb=[],Mb=Object.create(null),CE=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])CE[i]=yE(OE,e);function uf(i,e){Nb.indexOf(i)>-1||(Nb.push(i),console.warn(e))}function yE(i,e){let t=[];for(let l of e.split(" ")){let c=[];for(let f of l.split(".")){let h=i[f]||ne[f];h?typeof h=="function"?c.length?c=c.map(h):uf(f,`Modifier ${f} used at start of tag`):c.length?uf(f,`Tag ${f} used as modifier`):c=Array.isArray(h)?h:[h]:uf(f,`Unknown highlighting tag ${f}`)}for(let f of c)t.push(f)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(l=>l.id),o=Mb[s];if(o)return o.id;let a=Mb[s]=ds.define({id:Ab.length,name:n,props:[by({[n]:t})]});return Ab.push(a),a.id}Bt.RTL,Bt.LTR;const SE=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=ph(i.state,t.from);return n.line?_E(i):n.block?kE(i):!1};function fh(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const _E=fh($E,0),wE=fh(qy,0),kE=fh((i,e)=>qy(i,e,PE(e)),0);function ph(i,e){let t=i.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const Ja=50;function xE(i,{open:e,close:t},n,s){let o=i.sliceDoc(n-Ja,n),a=i.sliceDoc(s,s+Ja),l=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(a)[0].length,f=o.length-l;if(o.slice(f-e.length,f)==e&&a.slice(c,c+t.length)==t)return{open:{pos:n-l,margin:l&&1},close:{pos:s+c,margin:c&&1}};let h,g;s-n<=2*Ja?h=g=i.sliceDoc(n,s):(h=i.sliceDoc(n,n+Ja),g=i.sliceDoc(s-Ja,s));let v=/^\s*/.exec(h)[0].length,O=/\s*$/.exec(g)[0].length,y=g.length-O-t.length;return h.slice(v,v+e.length)==e&&g.slice(y,y+t.length)==t?{open:{pos:n+v+e.length,margin:/\s/.test(h.charAt(v+e.length))?1:0},close:{pos:s-O-t.length,margin:/\s/.test(g.charAt(y-1))?1:0}}:null}function PE(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let o=e.length-1;o>=0&&e[o].to>n.from?e[o].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function qy(i,e,t=e.selection.ranges){let n=t.map(o=>ph(e,o.from).block);if(!n.every(o=>o))return null;let s=t.map((o,a)=>xE(e,n[a],o.from,o.to));if(i!=2&&!s.every(o=>o))return{changes:e.changes(t.map((o,a)=>s[a]?[]:[{from:o.from,insert:n[a].open+" "},{from:o.to,insert:" "+n[a].close}]))};if(i!=1&&s.some(o=>o)){let o=[];for(let a=0,l;a<s.length;a++)if(l=s[a]){let c=n[a],{open:f,close:h}=l;o.push({from:f.pos-c.open.length,to:f.pos+f.margin},{from:h.pos-h.margin,to:h.pos+c.close.length})}return{changes:o}}return null}function $E(i,e,t=e.selection.ranges){let n=[],s=-1;for(let{from:o,to:a}of t){let l=n.length,c=1e9,f=ph(e,o).line;if(f){for(let h=o;h<=a;){let g=e.doc.lineAt(h);if(g.from>s&&(o==a||a>g.from)){s=g.from;let v=/^\s*/.exec(g.text)[0].length,O=v==g.length,y=g.text.slice(v,v+f.length)==f?v:-1;v<g.text.length&&v<c&&(c=v),n.push({line:g,comment:y,token:f,indent:v,empty:O,single:!1})}h=g.to+1}if(c<1e9)for(let h=l;h<n.length;h++)n[h].indent<n[h].line.text.length&&(n[h].indent=c);n.length==l+1&&(n[l].single=!0)}}if(i!=2&&n.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:l,token:c,indent:f,empty:h,single:g}of n)(g||!h)&&o.push({from:l.from+f,insert:c+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(i!=1&&n.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:l,token:c}of n)if(l>=0){let f=a.from+l,h=f+c.length;a.text[h-a.from]==" "&&h++,o.push({from:f,to:h})}return{changes:o}}return null}const up=Ni.define(),TE=Ni.define(),RE=Le.define(),Ey=Le.define({combine(i){return hi(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),By=kn.define({create(){return di.empty},update(i,e){let t=e.state.facet(Ey),n=e.annotation(up);if(n){let c=rs.fromTransaction(e,n.selection),f=n.side,h=f==0?i.undone:i.done;return c?h=Bc(h,h.length,t.minDepth,c):h=Hy(h,e.startState.selection),new di(f==0?n.rest:h,f==0?h:n.rest)}let s=e.annotation(TE);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(hn.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let o=rs.fromTransaction(e),a=e.annotation(hn.time),l=e.annotation(hn.userEvent);return o?i=i.addChanges(o,a,l,t,e):e.selection&&(i=i.addSelection(e.startState.selection,a,l,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new di(i.done.map(rs.fromJSON),i.undone.map(rs.fromJSON))}});function IE(i={}){return[By,Ey.of(i),Qe.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Zy:e.inputType=="historyRedo"?fp:null;return n?(e.preventDefault(),n(t)):!1}})]}function od(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(By,!1);if(!s)return!1;let o=s.pop(i,t,e);return o?(n(o),!0):!1}}const Zy=od(0,!1),fp=od(1,!1),QE=od(0,!0),AE=od(1,!0);class rs{constructor(e,t,n,s,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=o}setSelAfter(e){return new rs(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new rs(e.changes&&On.fromJSON(e.changes),[],e.mapped&&ui.fromJSON(e.mapped),e.startSelection&&me.fromJSON(e.startSelection),e.selectionsAfter.map(me.fromJSON))}static fromTransaction(e,t){let n=Ns;for(let s of e.startState.facet(RE)){let o=s(e);o.length&&(n=n.concat(o))}return!n.length&&e.changes.empty?null:new rs(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Ns)}static selection(e){return new rs(void 0,Ns,void 0,void 0,e)}}function Bc(i,e,t,n){let s=e+1>t+20?e-t-1:0,o=i.slice(s,e);return o.push(n),o}function NE(i,e){let t=[],n=!1;return i.iterChangedRanges((s,o)=>t.push(s,o)),e.iterChangedRanges((s,o,a,l)=>{for(let c=0;c<t.length;){let f=t[c++],h=t[c++];l>=f&&a<=h&&(n=!0)}}),n}function ME(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function zy(i,e){return i.length?e.length?i.concat(e):i:e}const Ns=[],LE=200;function Hy(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LE));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),Bc(i,i.length-1,1e9,t.setSelAfter(n)))}else return[rs.selection([e])]}function UE(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function ff(i,e){if(!i.length)return i;let t=i.length,n=Ns;for(;t;){let s=DE(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let o=i.slice(0,t);return o[t-1]=s,o}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[rs.selection(n)]:Ns}function DE(i,e,t){let n=zy(i.selectionsAfter.length?i.selectionsAfter.map(l=>l.map(e)):Ns,t);if(!i.changes)return rs.selection(n);let s=i.changes.map(e),o=e.mapDesc(i.changes,!0),a=i.mapped?i.mapped.composeDesc(o):o;return new rs(s,ot.mapEffects(i.effects,e),a,i.startSelection.map(o),n)}const qE=/^(input\.type|delete)($|\.)/;class di{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new di(this.done,this.undone):this}addChanges(e,t,n,s,o){let a=this.done,l=a[a.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!n||qE.test(n))&&(!l.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(o,NE(l.changes,e.changes))||n=="input.type.compose")?a=Bc(a,a.length-1,s.minDepth,new rs(e.changes.compose(l.changes),zy(ot.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,Ns)):a=Bc(a,a.length,s.minDepth,e),new di(a,Ns,t,n)}addSelection(e,t,n,s){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Ns;return o.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&ME(o[o.length-1],e)?this:new di(Hy(this.done,e),this.undone,t,n)}addMapping(e){return new di(ff(this.done,e),ff(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let o=s[s.length-1],a=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:up.of({side:e,rest:UE(s),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let l=s.length==1?Ns:s.slice(0,s.length-1);return o.mapped&&(l=ff(l,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:up.of({side:e,rest:l,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}di.empty=new di(Ns,Ns);const EE=[{key:"Mod-z",run:Zy,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:fp,preventDefault:!0},{linux:"Ctrl-Shift-z",run:fp,preventDefault:!0},{key:"Mod-u",run:QE,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:AE,preventDefault:!0}];function ka(i,e){return me.create(i.ranges.map(e),i.mainIndex)}function gi(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ys({state:i,dispatch:e},t){let n=ka(i.selection,t);return n.eq(i.selection,!0)?!1:(e(gi(i,n)),!0)}function ad(i,e){return me.cursor(e?i.to:i.from)}function Xy(i,e){return Ys(i,t=>t.empty?i.moveByChar(t,e):ad(t,e))}function zn(i){return i.textDirectionAt(i.state.selection.main.head)==Bt.LTR}const jy=i=>Xy(i,!zn(i)),Vy=i=>Xy(i,zn(i));function Fy(i,e){return Ys(i,t=>t.empty?i.moveByGroup(t,e):ad(t,e))}const BE=i=>Fy(i,!zn(i)),ZE=i=>Fy(i,zn(i));function zE(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function ld(i,e,t){let n=Sn(i).resolveInner(e.head),s=t?gt.closedBy:gt.openedBy;for(let c=e.head;;){let f=t?n.childAfter(c):n.childBefore(c);if(!f)break;zE(i,f,s)?n=f:c=t?f.to:f.from}let o=n.type.prop(s),a,l;return o&&(a=t?ci(i,n.from,1):ci(i,n.to,-1))&&a.matched?l=t?a.end.to:a.end.from:l=t?n.to:n.from,me.cursor(l,t?-1:1)}const HE=i=>Ys(i,e=>ld(i.state,e,!zn(i))),XE=i=>Ys(i,e=>ld(i.state,e,zn(i)));function Wy(i,e){return Ys(i,t=>{if(!t.empty)return ad(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const Yy=i=>Wy(i,!1),Gy=i=>Wy(i,!0);function Jy(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let o of i.state.facet(Qe.scrollMargins)){let a=o(i);a!=null&&a.top&&(t=Math.max(a==null?void 0:a.top,t)),a!=null&&a.bottom&&(n=Math.max(a==null?void 0:a.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function Ky(i,e){let t=Jy(i),{state:n}=i,s=ka(n.selection,a=>a.empty?i.moveVertically(a,e,t.height):ad(a,e));if(s.eq(n.selection))return!1;let o;if(t.selfScroll){let a=i.coordsAtPos(n.selection.main.head),l=i.scrollDOM.getBoundingClientRect(),c=l.top+t.marginTop,f=l.bottom-t.marginBottom;a&&a.top>c&&a.bottom<f&&(o=Qe.scrollIntoView(s.main.head,{y:"start",yMargin:a.top-c}))}return i.dispatch(gi(n,s),{effects:o}),!0}const Lb=i=>Ky(i,!1),pp=i=>Ky(i,!0);function ro(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let o=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;o&&e.head!=n.from+o&&(s=me.cursor(n.from+o))}return s}const jE=i=>Ys(i,e=>ro(i,e,!0)),VE=i=>Ys(i,e=>ro(i,e,!1)),FE=i=>Ys(i,e=>ro(i,e,!zn(i))),WE=i=>Ys(i,e=>ro(i,e,zn(i))),YE=i=>Ys(i,e=>me.cursor(i.lineBlockAt(e.head).from,1)),GE=i=>Ys(i,e=>me.cursor(i.lineBlockAt(e.head).to,-1));function JE(i,e,t){let n=!1,s=ka(i.selection,o=>{let a=ci(i,o.head,-1)||ci(i,o.head,1)||o.head>0&&ci(i,o.head-1,1)||o.head<i.doc.length&&ci(i,o.head+1,-1);if(!a||!a.end)return o;n=!0;let l=a.start.from==o.head?a.end.to:a.end.from;return me.cursor(l)});return n?(e(gi(i,s)),!0):!1}const KE=({state:i,dispatch:e})=>JE(i,e);function Es(i,e){let t=ka(i.state.selection,n=>{let s=e(n);return me.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(gi(i.state,t)),!0)}function e1(i,e){return Es(i,t=>i.moveByChar(t,e))}const t1=i=>e1(i,!zn(i)),n1=i=>e1(i,zn(i));function s1(i,e){return Es(i,t=>i.moveByGroup(t,e))}const e4=i=>s1(i,!zn(i)),t4=i=>s1(i,zn(i)),n4=i=>Es(i,e=>ld(i.state,e,!zn(i))),s4=i=>Es(i,e=>ld(i.state,e,zn(i)));function i1(i,e){return Es(i,t=>i.moveVertically(t,e))}const o1=i=>i1(i,!1),a1=i=>i1(i,!0);function l1(i,e){return Es(i,t=>i.moveVertically(t,e,Jy(i).height))}const Ub=i=>l1(i,!1),Db=i=>l1(i,!0),i4=i=>Es(i,e=>ro(i,e,!0)),o4=i=>Es(i,e=>ro(i,e,!1)),a4=i=>Es(i,e=>ro(i,e,!zn(i))),l4=i=>Es(i,e=>ro(i,e,zn(i))),r4=i=>Es(i,e=>me.cursor(i.lineBlockAt(e.head).from)),c4=i=>Es(i,e=>me.cursor(i.lineBlockAt(e.head).to)),qb=({state:i,dispatch:e})=>(e(gi(i,{anchor:0})),!0),Eb=({state:i,dispatch:e})=>(e(gi(i,{anchor:i.doc.length})),!0),Bb=({state:i,dispatch:e})=>(e(gi(i,{anchor:i.selection.main.anchor,head:0})),!0),Zb=({state:i,dispatch:e})=>(e(gi(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),d4=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),u4=({state:i,dispatch:e})=>{let t=rd(i).map(({from:n,to:s})=>me.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:me.create(t),userEvent:"select"})),!0},f4=({state:i,dispatch:e})=>{let t=ka(i.selection,n=>{let s=Sn(i),o=s.resolveStack(n.from,1);if(n.empty){let a=s.resolveStack(n.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:l}=a;if((l.from<n.from&&l.to>=n.to||l.to>n.to&&l.from<=n.from)&&a.next)return me.range(l.to,l.from)}return n});return t.eq(i.selection)?!1:(e(gi(i,t)),!0)},p4=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=me.create([t.main]):t.main.empty||(n=me.create([me.cursor(t.main.head)])),n?(e(gi(i,n)),!0):!1};function El(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(o=>{let{from:a,to:l}=o;if(a==l){let c=e(o);c<a?(t="delete.backward",c=sc(i,c,!1)):c>a&&(t="delete.forward",c=sc(i,c,!0)),a=Math.min(a,c),l=Math.max(l,c)}else a=sc(i,a,!1),l=sc(i,l,!0);return a==l?{range:o}:{changes:{from:a,to:l},range:me.cursor(a,a<o.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Qe.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function sc(i,e,t){if(i instanceof Qe)for(let n of i.state.facet(Qe.atomicRanges).map(s=>s(i)))n.between(e,e,(s,o)=>{s<e&&o>e&&(e=t?o:s)});return e}const r1=(i,e,t)=>El(i,n=>{let s=n.from,{state:o}=i,a=o.doc.lineAt(s),l,c;if(t&&!e&&s>a.from&&s<a.from+200&&!/[^ \t]/.test(l=a.text.slice(0,s-a.from))){if(l[l.length-1]=="	")return s-1;let f=wa(l,o.tabSize),h=f%Dc(o)||Dc(o);for(let g=0;g<h&&l[l.length-1-g]==" ";g++)s--;c=s}else c=Mn(a.text,s-a.from,e,e)+a.from,c==s&&a.number!=(e?o.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(c-a.from,s-a.from))&&(c=Mn(a.text,c-a.from,!1,!1)+a.from);return c}),hp=i=>r1(i,!1,!0),c1=i=>r1(i,!0,!1),d1=(i,e)=>El(i,t=>{let n=t.head,{state:s}=i,o=s.doc.lineAt(n),a=s.charCategorizer(n);for(let l=null;;){if(n==(e?o.to:o.from)){n==t.head&&o.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let c=Mn(o.text,n-o.from,e)+o.from,f=o.text.slice(Math.min(n,c)-o.from,Math.max(n,c)-o.from),h=a(f);if(l!=null&&h!=l)break;(f!=" "||n!=t.head)&&(l=h),n=c}return n}),u1=i=>d1(i,!1),h4=i=>d1(i,!0),m4=i=>El(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),g4=i=>El(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),v4=i=>El(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),b4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:kt.of(["",""])},range:me.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},O4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,o=i.doc.lineAt(s),a=s==o.from?s-1:Mn(o.text,s-o.from,!1)+o.from,l=s==o.to?s+1:Mn(o.text,s-o.from,!0)+o.from;return{changes:{from:a,to:l,insert:i.doc.slice(s,l).append(i.doc.slice(a,s))},range:me.cursor(l)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function rd(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),o=i.doc.lineAt(n.to);if(!n.empty&&n.to==o.from&&(o=i.doc.lineAt(n.to-1)),t>=s.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(n)}else e.push({from:s.from,to:o.to,ranges:[n]});t=o.number+1}return e}function f1(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let o of rd(i)){if(t?o.to==i.doc.length:o.from==0)continue;let a=i.doc.lineAt(t?o.to+1:o.from-1),l=a.length+1;if(t){n.push({from:o.to,to:a.to},{from:o.from,insert:a.text+i.lineBreak});for(let c of o.ranges)s.push(me.range(Math.min(i.doc.length,c.anchor+l),Math.min(i.doc.length,c.head+l)))}else{n.push({from:a.from,to:o.from},{from:o.to,insert:i.lineBreak+a.text});for(let c of o.ranges)s.push(me.range(c.anchor-l,c.head-l))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:me.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const C4=({state:i,dispatch:e})=>f1(i,e,!1),y4=({state:i,dispatch:e})=>f1(i,e,!0);function p1(i,e,t){if(i.readOnly)return!1;let n=[];for(let s of rd(i))t?n.push({from:s.from,insert:i.doc.slice(s.from,s.to)+i.lineBreak}):n.push({from:s.to,insert:i.lineBreak+i.doc.slice(s.from,s.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const S4=({state:i,dispatch:e})=>p1(i,e,!1),_4=({state:i,dispatch:e})=>p1(i,e,!0),w4=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(rd(e).map(({from:s,to:o})=>(s>0?s--:o<e.doc.length&&o++,{from:s,to:o}))),n=ka(e.selection,s=>{let o;if(i.lineWrapping){let a=i.lineBlockAt(s.head),l=i.coordsAtPos(s.head,s.assoc||1);l&&(o=a.bottom+i.documentTop-l.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,o)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function k4(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Sn(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),o;return n&&s&&n.to<=e&&s.from>=e&&(o=n.type.prop(gt.closedBy))&&o.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const zb=h1(!1),x4=h1(!0);function h1(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:o,to:a}=s,l=e.doc.lineAt(o),c=!i&&o==a&&k4(e,o);i&&(o=a=(a<=l.to?l:e.doc.lineAt(a)).to);let f=new sd(e,{simulateBreak:o,simulateDoubleBreak:!!c}),h=dh(f,o);for(h==null&&(h=wa(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));a<l.to&&/\s/.test(l.text[a-l.from]);)a++;c?{from:o,to:a}=c:o>l.from&&o<l.from+100&&!/\S/.test(l.text.slice(0,o))&&(o=l.from);let g=["",wl(e,h)];return c&&g.push(wl(e,f.lineIndent(l.from,-1))),{changes:{from:o,to:a,insert:kt.of(g)},range:me.cursor(o+1+g[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function hh(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let a=n.from;a<=n.to;){let l=i.doc.lineAt(a);l.number>t&&(n.empty||n.to>l.from)&&(e(l,s,n),t=l.number),a=l.to+1}let o=i.changes(s);return{changes:s,range:me.range(o.mapPos(n.anchor,1),o.mapPos(n.head,1))}})}const P4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new sd(i,{overrideIndentation:o=>{let a=t[o];return a??-1}}),s=hh(i,(o,a,l)=>{let c=dh(n,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let f=/^\s*/.exec(o.text)[0],h=wl(i,c);(f!=h||l.from<o.from+f.length)&&(t[o.from]=c,a.push({from:o.from,to:o.from+f.length,insert:h}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},m1=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(hh(i,(t,n)=>{n.push({from:t.from,insert:i.facet(Ul)})}),{userEvent:"input.indent"})),!0),g1=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(hh(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let o=wa(s,i.tabSize),a=0,l=wl(i,Math.max(0,o-Dc(i)));for(;a<s.length&&a<l.length&&s.charCodeAt(a)==l.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+s.length,insert:l.slice(a)})}),{userEvent:"delete.dedent"})),!0),$4=i=>(i.setTabFocusMode(),!0),T4=[{key:"Ctrl-b",run:jy,shift:t1,preventDefault:!0},{key:"Ctrl-f",run:Vy,shift:n1},{key:"Ctrl-p",run:Yy,shift:o1},{key:"Ctrl-n",run:Gy,shift:a1},{key:"Ctrl-a",run:YE,shift:r4},{key:"Ctrl-e",run:GE,shift:c4},{key:"Ctrl-d",run:c1},{key:"Ctrl-h",run:hp},{key:"Ctrl-k",run:m4},{key:"Ctrl-Alt-h",run:u1},{key:"Ctrl-o",run:b4},{key:"Ctrl-t",run:O4},{key:"Ctrl-v",run:pp}],R4=[{key:"ArrowLeft",run:jy,shift:t1,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:BE,shift:e4,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:FE,shift:a4,preventDefault:!0},{key:"ArrowRight",run:Vy,shift:n1,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ZE,shift:t4,preventDefault:!0},{mac:"Cmd-ArrowRight",run:WE,shift:l4,preventDefault:!0},{key:"ArrowUp",run:Yy,shift:o1,preventDefault:!0},{mac:"Cmd-ArrowUp",run:qb,shift:Bb},{mac:"Ctrl-ArrowUp",run:Lb,shift:Ub},{key:"ArrowDown",run:Gy,shift:a1,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Eb,shift:Zb},{mac:"Ctrl-ArrowDown",run:pp,shift:Db},{key:"PageUp",run:Lb,shift:Ub},{key:"PageDown",run:pp,shift:Db},{key:"Home",run:VE,shift:o4,preventDefault:!0},{key:"Mod-Home",run:qb,shift:Bb},{key:"End",run:jE,shift:i4,preventDefault:!0},{key:"Mod-End",run:Eb,shift:Zb},{key:"Enter",run:zb,shift:zb},{key:"Mod-a",run:d4},{key:"Backspace",run:hp,shift:hp},{key:"Delete",run:c1},{key:"Mod-Backspace",mac:"Alt-Backspace",run:u1},{key:"Mod-Delete",mac:"Alt-Delete",run:h4},{mac:"Mod-Backspace",run:g4},{mac:"Mod-Delete",run:v4}].concat(T4.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),I4=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:HE,shift:n4},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:XE,shift:s4},{key:"Alt-ArrowUp",run:C4},{key:"Shift-Alt-ArrowUp",run:S4},{key:"Alt-ArrowDown",run:y4},{key:"Shift-Alt-ArrowDown",run:_4},{key:"Escape",run:p4},{key:"Mod-Enter",run:x4},{key:"Alt-l",mac:"Ctrl-l",run:u4},{key:"Mod-i",run:f4,preventDefault:!0},{key:"Mod-[",run:g1},{key:"Mod-]",run:m1},{key:"Mod-Alt-\\",run:P4},{key:"Shift-Mod-k",run:w4},{key:"Shift-Mod-\\",run:KE},{key:"Mod-/",run:SE},{key:"Alt-A",run:wE},{key:"Ctrl-m",mac:"Shift-Alt-m",run:$4}].concat(R4),Q4={key:"Tab",run:m1,shift:g1};function At(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)v1(i,arguments[e]);return i}function v1(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)v1(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}const Hb=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class va{constructor(e,t,n=0,s=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=o?l=>o(Hb(l)):Hb,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return is(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=zp(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ai(e);let s=this.normalize(t);if(s.length)for(let o=0,a=n;;o++){let l=s.charCodeAt(o),c=this.match(l,a,this.bufferPos+this.bufferStart);if(o==s.length-1){if(c)return this.value=c,this;break}a==n&&o<t.length&&t.charCodeAt(o)==l&&a++}}}match(e,t,n){let s=null;for(let o=0;o<this.matches.length;o+=2){let a=this.matches[o],l=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?s={from:this.matches[o+1],to:n}:(this.matches[o]++,l=!0)),l||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(va.prototype[Symbol.iterator]=function(){return this});const b1={from:-1,to:-1,match:/.*/.exec("")},mh="gm"+(/x/.unicode==null?"":"u");class O1{constructor(e,t,n,s=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=b1,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new C1(e,t,n,s,o);this.re=new RegExp(t,mh+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let a=e.lineAt(s);this.curLineStart=a.from,this.matchPos=Zc(e,s),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=Zc(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const pf=new WeakMap;class ra{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=pf.get(e);if(!s||s.from>=n||s.to<=t){let l=new ra(t,e.sliceString(t,n));return pf.set(e,l),l}if(s.from==t&&s.to==n)return s;let{text:o,from:a}=s;return a>t&&(o=e.sliceString(t,a)+o,a=t),s.to<n&&(o+=e.sliceString(s.to,n)),pf.set(e,new ra(a,o)),new ra(t,o.slice(t-a,n-a))}}class C1{constructor(e,t,n,s,o){this.text=e,this.to=o,this.done=!1,this.value=b1,this.matchPos=Zc(e,s),this.re=new RegExp(t,mh+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=ra.get(e,s,this.chunkEnd(s+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=Zc(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ra.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(O1.prototype[Symbol.iterator]=C1.prototype[Symbol.iterator]=function(){return this});function A4(i){try{return new RegExp(i,mh),!0}catch{return!1}}function Zc(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}function mp(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=At("input",{class:"cm-textfield",name:"line",value:e}),n=At("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),i.dispatch({effects:hl.of(!1)}),i.focus()):o.keyCode==13&&(o.preventDefault(),s())},onsubmit:o=>{o.preventDefault(),s()}},At("label",i.state.phrase("Go to line"),": ",t)," ",At("button",{class:"cm-button",type:"submit"},i.state.phrase("go")),At("button",{name:"close",onclick:()=>{i.dispatch({effects:hl.of(!1)}),i.focus()},"aria-label":i.state.phrase("close"),type:"button"},["×"]));function s(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!o)return;let{state:a}=i,l=a.doc.lineAt(a.selection.main.head),[,c,f,h,g]=o,v=h?+h.slice(1):0,O=f?+f:l.number;if(f&&g){let w=O/100;c&&(w=w*(c=="-"?-1:1)+l.number/a.doc.lines),O=Math.round(a.doc.lines*w)}else f&&c&&(O=O*(c=="-"?-1:1)+l.number);let y=a.doc.line(Math.max(1,Math.min(a.doc.lines,O))),S=me.cursor(y.from+Math.max(0,Math.min(v,y.length)));i.dispatch({effects:[hl.of(!1),Qe.scrollIntoView(S.from,{y:"center"})],selection:S}),i.focus()}return{dom:n}}const hl=ot.define(),Xb=kn.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(hl)&&(i=t.value);return i},provide:i=>Sl.from(i,e=>e?mp:null)}),N4=i=>{let e=yl(i,mp);if(!e){let t=[hl.of(!0)];i.state.field(Xb,!1)==null&&t.push(ot.appendConfig.of([Xb,M4])),i.dispatch({effects:t}),e=yl(i,mp)}return e&&e.dom.querySelector("input").select(),!0},M4=Qe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),L4={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},U4=Le.define({combine(i){return hi(i,L4,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function D4(i){return[z4,Z4]}const q4=We.mark({class:"cm-selectionMatch"}),E4=We.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function jb(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=Ft.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=Ft.Word)}function B4(i,e,t,n){return i(e.sliceDoc(t,t+1))==Ft.Word&&i(e.sliceDoc(n-1,n))==Ft.Word}const Z4=fn.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(U4),{state:t}=i,n=t.selection;if(n.ranges.length>1)return We.none;let s=n.main,o,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return We.none;let c=t.wordAt(s.head);if(!c)return We.none;a=t.charCategorizer(s.head),o=t.sliceDoc(c.from,c.to)}else{let c=s.to-s.from;if(c<e.minSelectionLength||c>200)return We.none;if(e.wholeWords){if(o=t.sliceDoc(s.from,s.to),a=t.charCategorizer(s.head),!(jb(a,t,s.from,s.to)&&B4(a,t,s.from,s.to)))return We.none}else if(o=t.sliceDoc(s.from,s.to),!o)return We.none}let l=[];for(let c of i.visibleRanges){let f=new va(t.doc,o,c.from,c.to);for(;!f.next().done;){let{from:h,to:g}=f.value;if((!a||jb(a,t,h,g))&&(s.empty&&h<=s.from&&g>=s.to?l.push(E4.range(h,g)):(h>=s.to||g<=s.from)&&l.push(q4.range(h,g)),l.length>e.maxMatches))return We.none}}return We.set(l)}},{decorations:i=>i.decorations}),z4=Qe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),H4=({state:i,dispatch:e})=>{let{selection:t}=i,n=me.create(t.ranges.map(s=>i.wordAt(s.head)||me.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function X4(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),o=s&&s.from==t.from&&s.to==t.to;for(let a=!1,l=new va(i.doc,e,n[n.length-1].to);;)if(l.next(),l.done){if(a)return null;l=new va(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),a=!0}else{if(a&&n.some(c=>c.from==l.value.from))continue;if(o){let c=i.wordAt(l.value.from);if(!c||c.from!=l.value.from||c.to!=l.value.to)continue}return l.value}}const j4=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(o=>o.from===o.to))return H4({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(o=>i.sliceDoc(o.from,o.to)!=n))return!1;let s=X4(i,n);return s?(e(i.update({selection:i.selection.addRange(me.range(s.from,s.to),!1),effects:Qe.scrollIntoView(s.to)})),!0):!1},xa=Le.define({combine(i){return hi(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new iB(e),scrollToMatch:e=>Qe.scrollIntoView(e)})}});class y1{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||A4(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
`:n=="r"?"\r":n=="t"?"	":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Y4(this):new F4(this)}getCursor(e,t=0,n){let s=e.doc?e:yt.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Ko(this,s,t,n):Jo(this,s,t,n)}}class S1{constructor(e){this.spec=e}}function Jo(i,e,t,n){return new va(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:s=>s.toLowerCase(),i.wholeWord?V4(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function V4(i,e){return(t,n,s,o)=>((o>t||o+s.length<n)&&(o=Math.max(0,t-2),s=i.sliceString(o,Math.min(i.length,n+2))),(e(zc(s,t-o))!=Ft.Word||e(Hc(s,t-o))!=Ft.Word)&&(e(Hc(s,n-o))!=Ft.Word||e(zc(s,n-o))!=Ft.Word))}class F4 extends S1{constructor(e){super(e)}nextMatch(e,t,n){let s=Jo(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let o=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Jo(this.spec,e,0,o).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let o=Math.max(t,s-1e4-this.spec.unquoted.length),a=Jo(this.spec,e,o,s),l=null;for(;!a.nextOverlapping().done;)l=a.value;if(l)return l;if(o==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Jo(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let o=Jo(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}function Ko(i,e,t,n){return new O1(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?W4(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function zc(i,e){return i.slice(Mn(i,e,!1),e)}function Hc(i,e){return i.slice(e,Mn(i,e))}function W4(i){return(e,t,n)=>!n[0].length||(i(zc(n.input,n.index))!=Ft.Word||i(Hc(n.input,n.index))!=Ft.Word)&&(i(Hc(n.input,n.index+n[0].length))!=Ft.Word||i(zc(n.input,n.index+n[0].length))!=Ft.Word)}class Y4 extends S1{nextMatch(e,t,n){let s=Ko(this.spec,e,n,e.doc.length).next();return s.done&&(s=Ko(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let o=Math.max(t,n-s*1e4),a=Ko(this.spec,e,o,n),l=null;for(;!a.next().done;)l=a.value;if(l&&(o==t||l.from>o+10))return l;if(o==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let s=n.length;s>0;s--){let o=+n.slice(0,s);if(o>0&&o<e.match.length)return e.match[o]+n.slice(s)}return t})}matchAll(e,t){let n=Ko(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let o=Ko(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}const kl=ot.define(),gh=ot.define(),Ji=kn.define({create(i){return new hf(gp(i).create(),null)},update(i,e){for(let t of e.effects)t.is(kl)?i=new hf(t.value.create(),i.panel):t.is(gh)&&(i=new hf(i.query,t.value?vh:null));return i},provide:i=>Sl.from(i,e=>e.panel)});class hf{constructor(e,t){this.query=e,this.panel=t}}const G4=We.mark({class:"cm-searchMatch"}),J4=We.mark({class:"cm-searchMatch cm-searchMatch-selected"}),K4=fn.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(Ji))}update(i){let e=i.state.field(Ji);(e!=i.startState.field(Ji)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return We.none;let{view:t}=this,n=new Ti;for(let s=0,o=t.visibleRanges,a=o.length;s<a;s++){let{from:l,to:c}=o[s];for(;s<a-1&&c>o[s+1].from-2*250;)c=o[++s].to;i.highlight(t.state,l,c,(f,h)=>{let g=t.state.selection.ranges.some(v=>v.from==f&&v.to==h);n.add(f,h,g?J4:G4)})}return n.finish()}},{decorations:i=>i.decorations});function Bl(i){return e=>{let t=e.state.field(Ji,!1);return t&&t.query.spec.valid?i(e,t):k1(e)}}const Xc=Bl((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=me.single(n.from,n.to),o=i.state.facet(xa);return i.dispatch({selection:s,effects:[bh(i,n),o.scrollToMatch(s.main,i)],userEvent:"select.search"}),w1(i),!0}),jc=Bl((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let o=me.single(s.from,s.to),a=i.state.facet(xa);return i.dispatch({selection:o,effects:[bh(i,s),a.scrollToMatch(o.main,i)],userEvent:"select.search"}),w1(i),!0}),eB=Bl((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:me.create(t.map(n=>me.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),tB=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,o=[],a=0;for(let l=new va(i.doc,i.sliceDoc(n,s));!l.next().done;){if(o.length>1e3)return!1;l.value.from==n&&(a=o.length),o.push(me.range(l.value.from,l.value.to))}return e(i.update({selection:me.create(o,a),userEvent:"select.search.matches"})),!0},Vb=Bl((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let o=e.nextMatch(t,n,n);if(!o)return!1;let a=o,l=[],c,f,h=[];a.from==n&&a.to==s&&(f=t.toText(e.getReplacement(a)),l.push({from:a.from,to:a.to,insert:f}),a=e.nextMatch(t,a.from,a.to),h.push(Qe.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+".")));let g=i.state.changes(l);return a&&(c=me.single(a.from,a.to).map(g),h.push(bh(i,a)),h.push(t.facet(xa).scrollToMatch(c.main,i))),i.dispatch({changes:g,selection:c,effects:h,userEvent:"input.replace"}),!0}),nB=Bl((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:o,to:a}=s;return{from:o,to:a,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:Qe.announce.of(n),userEvent:"input.replace.all"}),!0});function vh(i){return i.state.facet(xa).createPanel(i)}function gp(i,e){var t,n,s,o,a;let l=i.selection.main,c=l.empty||l.to>l.from+100?"":i.sliceDoc(l.from,l.to);if(e&&!c)return e;let f=i.facet(xa);return new y1({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:f.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:f.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:f.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:f.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:f.wholeWord})}function _1(i){let e=yl(i,vh);return e&&e.dom.querySelector("[main-field]")}function w1(i){let e=_1(i);e&&e==i.root.activeElement&&e.select()}const k1=i=>{let e=i.state.field(Ji,!1);if(e&&e.panel){let t=_1(i);if(t&&t!=i.root.activeElement){let n=gp(i.state,e.query.spec);n.valid&&i.dispatch({effects:kl.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[gh.of(!0),e?kl.of(gp(i.state,e.query.spec)):ot.appendConfig.of(aB)]});return!0},x1=i=>{let e=i.state.field(Ji,!1);if(!e||!e.panel)return!1;let t=yl(i,vh);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:gh.of(!1)}),!0},sB=[{key:"Mod-f",run:k1,scope:"editor search-panel"},{key:"F3",run:Xc,shift:jc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Xc,shift:jc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:x1,scope:"editor search-panel"},{key:"Mod-Shift-l",run:tB},{key:"Mod-Alt-g",run:N4},{key:"Mod-d",run:j4,preventDefault:!0}];class iB{constructor(e){this.view=e;let t=this.query=e.state.field(Ji).query.spec;this.commit=this.commit.bind(this),this.searchField=At("input",{value:t.search,placeholder:bs(e,"Find"),"aria-label":bs(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=At("input",{value:t.replace,placeholder:bs(e,"Replace"),"aria-label":bs(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=At("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=At("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=At("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,o,a){return At("button",{class:"cm-button",name:s,onclick:o,type:"button"},a)}this.dom=At("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>Xc(e),[bs(e,"next")]),n("prev",()=>jc(e),[bs(e,"previous")]),n("select",()=>eB(e),[bs(e,"all")]),At("label",null,[this.caseField,bs(e,"match case")]),At("label",null,[this.reField,bs(e,"regexp")]),At("label",null,[this.wordField,bs(e,"by word")]),...e.state.readOnly?[]:[At("br"),this.replaceField,n("replace",()=>Vb(e),[bs(e,"replace")]),n("replaceAll",()=>nB(e),[bs(e,"replace all")])],At("button",{name:"close",onclick:()=>x1(e),"aria-label":bs(e,"close"),type:"button"},["×"])])}commit(){let e=new y1({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:kl.of(e)}))}keydown(e){pq(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?jc:Xc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Vb(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(kl)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(xa).top}}function bs(i,e){return i.state.phrase(e)}const ic=30,oc=/[\s\.,:;?!]/;function bh(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,o=Math.max(n.from,e-ic),a=Math.min(s,t+ic),l=i.state.sliceDoc(o,a);if(o!=n.from){for(let c=0;c<ic;c++)if(!oc.test(l[c+1])&&oc.test(l[c])){l=l.slice(c);break}}if(a!=s){for(let c=l.length-1;c>l.length-ic;c--)if(!oc.test(l[c-1])&&oc.test(l[c])){l=l.slice(0,c);break}}return Qe.announce.of(`${i.state.phrase("current match")}. ${l} ${i.state.phrase("on line")} ${n.number}.`)}const oB=Qe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aB=[Ji,lo.low(K4),oB];class P1{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Sn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),o=s.search(T1(e,!1));return o<0?null:{from:n+o,to:this.pos,text:s.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function Fb(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lB(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let o=1;o<s.length;o++)t[s[o]]=!0}let n=Fb(e)+Fb(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function $1(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:lB(e);return s=>{let o=s.matchBefore(n);return o||s.explicit?{from:o?o.from:s.pos,options:e,validFor:t}:null}}function rB(i,e){return t=>{for(let n=Sn(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class Wb{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function $o(i){return i.selection.main.from}function T1(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",o=n[n.length-1]!="$";return!s&&!o?i:new RegExp(`${s?"^":""}(?:${n})${o?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const Oh=Ni.define();function cB(i,e,t,n){let{main:s}=i.selection,o=t-s.from,a=n-s.from;return Object.assign(Object.assign({},i.changeByRange(l=>{if(l!=s&&t!=n&&i.sliceDoc(l.from+o,l.from+a)!=i.sliceDoc(t,n))return{range:l};let c=i.toText(e);return{changes:{from:l.from+o,to:n==s.from?l.to:l.from+a,insert:c},range:me.cursor(l.from+o+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const Yb=new WeakMap;function dB(i){if(!Array.isArray(i))return i;let e=Yb.get(i);return e||Yb.set(i,e=$1(i)),e}const Vc=ot.define(),xl=ot.define();class uB{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=is(e,t),s=ai(n);this.chars.push(n);let o=e.slice(t,t+s),a=o.toUpperCase();this.folded.push(is(a==o?o.toLowerCase():a,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:o,byWord:a}=this;if(t.length==1){let $=is(e,0),A=ai($),R=A==e.length?0:-100;if($!=t[0])if($==n[0])R+=-200;else return null;return this.ret(R,[0,A])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,f=0;if(l<0){for(let $=0,A=Math.min(e.length,200);$<A&&f<c;){let R=is(e,$);(R==t[f]||R==n[f])&&(s[f++]=$),$+=ai(R)}if(f<c)return null}let h=0,g=0,v=!1,O=0,y=-1,S=-1,w=/[a-z]/.test(e),_=!0;for(let $=0,A=Math.min(e.length,200),R=0;$<A&&g<c;){let k=is(e,$);l<0&&(h<c&&k==t[h]&&(o[h++]=$),O<c&&(k==t[O]||k==n[O]?(O==0&&(y=$),S=$+1,O++):O=0));let x,T=k<255?k>=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=zp(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!$||T==1&&w||R==0&&T!=0)&&(t[g]==k||n[g]==k&&(v=!0)?a[g++]=$:a.length&&(_=!1)),R=T,$+=ai(k)}return g==c&&a[0]==0&&_?this.result(-100+(v?-200:0),a,e):O==c&&y==0?this.ret(-200-e.length+(S==e.length?0:-100),[0,S]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):O==c?this.ret(-900-e.length,[y,S]):g==c?this.result(-100+(v?-200:0)+-700+(_?0:-1100),a,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],o=0;for(let a of t){let l=a+(this.astral?ai(is(n,a)):1);o&&s[o-1]==a?s[o-1]=l:(s[o++]=a,s[o++]=l)}return this.ret(e-n.length,s)}}class fB{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const wn=Le.define({combine(i){return hi(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pB,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Gb(e(n),t(n)),optionClass:(e,t)=>n=>Gb(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Gb(i,e){return i?e?i+" "+e:i:e}function pB(i,e,t,n,s,o){let a=i.textDirection==Bt.RTL,l=a,c=!1,f="top",h,g,v=e.left-s.left,O=s.right-e.right,y=n.right-n.left,S=n.bottom-n.top;if(l&&v<Math.min(y,O)?l=!1:!l&&O<Math.min(y,v)&&(l=!0),y<=(l?v:O))h=Math.max(s.top,Math.min(t.top,s.bottom-S))-e.top,g=Math.min(400,l?v:O);else{c=!0,g=Math.min(400,(a?e.right:s.right-e.left)-30);let $=s.bottom-e.bottom;$>=S||$>e.top?h=t.bottom-e.top:(f="bottom",h=e.bottom-t.top)}let w=(e.bottom-e.top)/o.offsetHeight,_=(e.right-e.left)/o.offsetWidth;return{style:`${f}: ${h/w}px; max-width: ${g/_}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}function hB(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,o){let a=document.createElement("span");a.className="cm-completionLabel";let l=t.displayLabel||t.label,c=0;for(let f=0;f<o.length;){let h=o[f++],g=o[f++];h>c&&a.appendChild(document.createTextNode(l.slice(c,h)));let v=a.appendChild(document.createElement("span"));v.appendChild(document.createTextNode(l.slice(h,g))),v.className="cm-completionMatchedText",c=g}return c<l.length&&a.appendChild(document.createTextNode(l.slice(c))),a},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function mf(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class mB{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:o,selected:a}=s.open,l=e.state.facet(wn);this.optionContent=hB(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=mf(o.length,a,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:f}=e.state.field(t).open;for(let h=c.target,g;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(g=/-(\d+)$/.exec(h.id))&&+g[1]<f.length){this.applyCompletion(e,f[+g[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let f=e.state.field(this.stateField,!1);f&&f.tooltip&&e.state.facet(wn).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:xl.of(null)})}),this.showOptions(o,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:o,selected:a,disabled:l}=n.open;(!s.open||s.open.options!=o)&&(this.range=mf(o.length,a,e.state.facet(wn).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=mf(t.options.length,t.selected,this.view.state.facet(wn).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:s}=n;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(n);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,n)}).catch(a=>ls(this.view.state,a,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:o}=e;n.appendChild(s),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&vB(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return s.top>Math.min(o.bottom,t.bottom)-10||s.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(wn).positionInfo(this.view,t,s,n,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",a=>{a.target==s&&a.preventDefault()});let o=null;for(let a=n.from;a<n.to;a++){let{completion:l,match:c}=e[a],{section:f}=l;if(f){let v=typeof f=="string"?f:f.name;if(v!=o&&(a>n.from||n.from==0))if(o=v,typeof f!="string"&&f.header)s.appendChild(f.header(f));else{let O=s.appendChild(document.createElement("completion-section"));O.textContent=v}}const h=s.appendChild(document.createElement("li"));h.id=t+"-"+a,h.setAttribute("role","option");let g=this.optionClass(l);g&&(h.className=g);for(let v of this.optionContent){let O=v(l,this.view.state,this.view,c);O&&h.appendChild(O)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function gB(i,e){return t=>new mB(t,i,e)}function vB(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function Jb(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function bB(i,e){let t=[],n=null,s=f=>{t.push(f);let{section:h}=f.completion;if(h){n||(n=[]);let g=typeof h=="string"?h:h.name;n.some(v=>v.name==g)||n.push(typeof h=="string"?{name:g}:h)}},o=e.facet(wn);for(let f of i)if(f.hasResult()){let h=f.result.getMatch;if(f.result.filter===!1)for(let g of f.result.options)s(new Wb(g,f.source,h?h(g):[],1e9-t.length));else{let g=e.sliceDoc(f.from,f.to),v,O=o.filterStrict?new fB(g):new uB(g);for(let y of f.result.options)if(v=O.match(y.label)){let S=y.displayLabel?h?h(y,v.matched):[]:v.matched;s(new Wb(y,f.source,S,v.score+(y.boost||0)))}}}if(n){let f=Object.create(null),h=0,g=(v,O)=>{var y,S;return((y=v.rank)!==null&&y!==void 0?y:1e9)-((S=O.rank)!==null&&S!==void 0?S:1e9)||(v.name<O.name?-1:1)};for(let v of n.sort(g))h-=1e5,f[v.name]=h;for(let v of t){let{section:O}=v.completion;O&&(v.score+=f[typeof O=="string"?O:O.name])}}let a=[],l=null,c=o.compareCompletions;for(let f of t.sort((h,g)=>g.score-h.score||c(h.completion,g.completion))){let h=f.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?a.push(f):Jb(f.completion)>Jb(l)&&(a[a.length-1]=f),l=f.completion}return a}class sa{constructor(e,t,n,s,o,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=o,this.disabled=a}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new sa(this.options,Kb(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,o,a){if(s&&!a&&e.some(f=>f.isPending))return s.setDisabled();let l=bB(e,t);if(!l.length)return s&&e.some(f=>f.isPending)?s.setDisabled():null;let c=t.facet(wn).selectOnOpen?0:-1;if(s&&s.selected!=c&&s.selected!=-1){let f=s.options[s.selected].completion;for(let h=0;h<l.length;h++)if(l[h].completion==f){c=h;break}}return new sa(l,Kb(n,c),{pos:e.reduce((f,h)=>h.hasResult()?Math.min(f,h.from):f,1e8),create:wB,above:o.aboveCursor},s?s.timestamp:Date.now(),c,!1)}map(e){return new sa(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new sa(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Fc{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Fc(SB,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(wn),o=(n.override||t.languageDataAt("autocomplete",$o(t)).map(dB)).map(c=>(this.active.find(h=>h.source==c)||new Ms(c,this.active.some(h=>h.state!=0)?1:0)).update(e,n));o.length==this.active.length&&o.every((c,f)=>c==this.active[f])&&(o=this.active);let a=this.open,l=e.effects.some(c=>c.is(Ch));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!OB(o,this.active)||l?a=sa.build(o,t,this.id,a,n,l):a&&a.disabled&&!o.some(c=>c.isPending)&&(a=null),!a&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new Ms(c.source,0):c));for(let c of e.effects)c.is(I1)&&(a=a&&a.setSelected(c.value,this.id));return o==this.active&&a==this.open?this:new Fc(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?CB:yB}}function OB(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,o=n==e.length;if(s||o)return s==o;if(i[t++].result!=e[n++].result)return!1}}const CB={"aria-autocomplete":"list"},yB={};function Kb(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const SB=[];function R1(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(Oh);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class Ms{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=R1(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new Ms(s.source,0)),n&4&&s.state==0&&(s=new Ms(this.source,1)),s=s.updateFor(e,n);for(let o of e.effects)if(o.is(Vc))s=new Ms(s.source,1,o.value);else if(o.is(xl))s=new Ms(s.source,0);else if(o.is(Ch))for(let a of o.value)a.source==s.source&&(s=a);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange($o(e.state))}}class ca extends Ms{constructor(e,t,n,s,o,a){super(e,3,t),this.limit=n,this.result=s,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=$o(e.state);if(l>a||!s||t&2&&($o(e.startState)==this.from||l<this.limit))return new Ms(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return _B(s.validFor,e.state,o,a)?new ca(this.source,this.explicit,c,s,o,a):s.update&&(s=s.update(s,o,a,new P1(e.state,l,!1)))?new ca(this.source,this.explicit,c,s,s.from,(n=s.to)!==null&&n!==void 0?n:$o(e.state)):new Ms(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ca(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Ms(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function _B(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):T1(i,!0).test(s)}const Ch=ot.define({map(i,e){return i.map(t=>t.map(e))}}),I1=ot.define(),as=kn.define({create(){return Fc.start()},update(i,e){return i.update(e)},provide:i=>[ih.from(i,e=>e.tooltip),Qe.contentAttributes.from(i,e=>e.attrs)]});function yh(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field(as).active.find(s=>s.source==e.source);return n instanceof ca?(typeof t=="string"?i.dispatch(Object.assign(Object.assign({},cB(i.state,t,n.from,n.to)),{annotations:Oh.of(e.completion)})):t(i,e.completion,n.from,n.to),!0):!1}const wB=gB(as,yh);function ac(i,e="option"){return t=>{let n=t.state.field(as,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(wn).interactionDelay)return!1;let s=1,o;e=="page"&&(o=ry(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=n.open.options,l=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:a-1;return l<0?l=e=="page"?0:a-1:l>=a&&(l=e=="page"?a-1:0),t.dispatch({effects:I1.of(l)}),!0}}const kB=i=>{let e=i.state.field(as,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(wn).interactionDelay?!1:yh(i,e.open.options[e.open.selected])},eO=i=>i.state.field(as,!1)?(i.dispatch({effects:Vc.of(!0)}),!0):!1,xB=i=>{let e=i.state.field(as,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:xl.of(null)}),!0)};class PB{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const $B=50,TB=1e3,RB=fn.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(as).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field(as),t=i.state.facet(wn);if(!i.selectionSet&&!i.docChanged&&i.startState.field(as)==e)return;let n=i.transactions.some(o=>{let a=R1(o,t);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;o<this.running.length;o++){let a=this.running[o];if(n||a.context.abortOnDocChange&&i.docChanged||a.updates.length+i.transactions.length>$B&&Date.now()-a.time>TB){for(let l of a.context.abortListeners)try{l()}catch(c){ls(this.view.state,c)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(o=>o.effects.some(a=>a.is(Vc)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let o of i.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(as);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(wn).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=$o(e),n=new P1(e,t,i.explicit,this.view),s=new PB(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(o=>{s.context.aborted||(s.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:xl.of(null)}),ls(this.view.state,o)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(wn).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(wn),n=this.view.state.field(as);for(let s=0;s<this.running.length;s++){let o=this.running[s];if(o.done===void 0)continue;if(this.running.splice(s--,1),o.done){let l=$o(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(l,o.done.from+(o.active.explicit?0:1)),f=new ca(o.active.source,o.active.explicit,c,o.done,o.done.from,(i=o.done.to)!==null&&i!==void 0?i:l);for(let h of o.updates)f=f.update(h,t);if(f.hasResult()){e.push(f);continue}}let a=n.active.find(l=>l.source==o.active.source);if(a&&a.isPending)if(o.done==null){let l=new Ms(o.active.source,0);for(let c of o.updates)l=l.update(c,t);l.isPending||e.push(l)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Ch.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(as,!1);if(e&&e.tooltip&&this.view.state.facet(wn).closeOnBlur){let t=e.open&&ry(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:xl.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Vc.of(!1)}),20),this.composing=0}}}),IB=typeof navigator=="object"&&/Win/.test(navigator.platform),QB=lo.highest(Qe.domEventHandlers({keydown(i,e){let t=e.state.field(as,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(IB&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(a=>a.source==n.source),o=n.completion.commitCharacters||s.result.commitCharacters;return o&&o.indexOf(i.key)>-1&&yh(e,n),!1}})),Q1=Qe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class AB{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class Sh{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,An.TrackDel),n=e.mapPos(this.to,1,An.TrackDel);return t==null||n==null?null:new Sh(this.field,t,n)}}class _h{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],o=e.doc.lineAt(t),a=/^\s*/.exec(o.text)[0];for(let c of this.lines){if(n.length){let f=a,h=/^\t*/.exec(c)[0].length;for(let g=0;g<h;g++)f+=e.facet(Ul);s.push(t+f.length-h),c=f+c.slice(h)}n.push(c),t+=c.length+1}let l=this.fieldPositions.map(c=>new Sh(c.field,s[c.line]+c.from,s[c.line]+c.to));return{text:n,ranges:l}}static parse(e){let t=[],n=[],s=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let l=o[1]?+o[1]:null,c=o[2]||o[3]||"",f=-1,h=c.replace(/\\[{}]/g,g=>g[1]);for(let g=0;g<t.length;g++)(l!=null?t[g].seq==l:h&&t[g].name==h)&&(f=g);if(f<0){let g=0;for(;g<t.length&&(l==null||t[g].seq!=null&&t[g].seq<l);)g++;t.splice(g,0,{seq:l,name:h}),f=g;for(let v of s)v.field>=f&&v.field++}s.push(new AB(f,n.length,o.index,o.index+h.length)),a=a.slice(0,o.index)+c+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(l,c,f)=>{for(let h of s)h.line==n.length&&h.from>f&&(h.from--,h.to--);return c}),n.push(a)}return new _h(n,s)}}let NB=We.widget({widget:new class extends mi{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),MB=We.mark({class:"cm-snippetField"});class Pa{constructor(e,t){this.ranges=e,this.active=t,this.deco=We.set(e.map(n=>(n.from==n.to?NB:MB).range(n.from,n.to)))}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new Pa(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const Zl=ot.define({map(i,e){return i&&i.map(e)}}),LB=ot.define(),Pl=kn.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(Zl))return t.value;if(t.is(LB)&&i)return new Pa(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>Qe.decorations.from(i,e=>e?e.deco:We.none)});function wh(i,e){return me.create(i.filter(t=>t.field==e).map(t=>me.range(t.from,t.to)))}function UB(i){let e=_h.parse(i);return(t,n,s,o)=>{let{text:a,ranges:l}=e.instantiate(t.state,s),{main:c}=t.state.selection,f={changes:{from:s,to:o==c.from?c.to:o,insert:kt.of(a)},scrollIntoView:!0,annotations:n?[Oh.of(n),hn.userEvent.of("input.complete")]:void 0};if(l.length&&(f.selection=wh(l,0)),l.some(h=>h.field>0)){let h=new Pa(l,0),g=f.effects=[Zl.of(h)];t.state.field(Pl,!1)===void 0&&g.push(ot.appendConfig.of([Pl,ZB,zB,Q1]))}t.dispatch(t.state.update(f))}}function A1(i){return({state:e,dispatch:t})=>{let n=e.field(Pl,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,o=i>0&&!n.ranges.some(a=>a.field==s+i);return t(e.update({selection:wh(n.ranges,s),effects:Zl.of(o?null:new Pa(n.ranges,s)),scrollIntoView:!0})),!0}}const DB=({state:i,dispatch:e})=>i.field(Pl,!1)?(e(i.update({effects:Zl.of(null)})),!0):!1,qB=A1(1),EB=A1(-1),BB=[{key:"Tab",run:qB,shift:EB},{key:"Escape",run:DB}],tO=Le.define({combine(i){return i.length?i[0]:BB}}),ZB=lo.highest(Ml.compute([tO],i=>i.facet(tO)));function ns(i,e){return Object.assign(Object.assign({},e),{apply:UB(i)})}const zB=Qe.domEventHandlers({mousedown(i,e){let t=e.state.field(Pl,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(o=>o.from<=n&&o.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:wh(t.ranges,s.field),effects:Zl.of(t.ranges.some(o=>o.field>s.field)?new Pa(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),$l={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},xo=ot.define({map(i,e){let t=e.mapPos(i,-1,An.TrackAfter);return t??void 0}}),kh=new class extends Ro{};kh.startSide=1;kh.endSide=-1;const N1=kn.define({create(){return xt.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(xo)&&(i=i.update({add:[kh.range(t.value,t.value+1)]}));return i}});function HB(){return[jB,N1]}const gf="()[]{}<>«»»«［］｛｝";function M1(i){for(let e=0;e<gf.length;e+=2)if(gf.charCodeAt(e)==i)return gf.charAt(e+1);return zp(i<128?i:i+1)}function L1(i,e){return i.languageDataAt("closeBrackets",e)[0]||$l}const XB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),jB=Qe.inputHandler.of((i,e,t,n)=>{if((XB?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&ai(is(n,0))==1||e!=s.from||t!=s.to)return!1;let o=WB(i.state,n);return o?(i.dispatch(o),!0):!1}),VB=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=L1(i,i.selection.main.head).brackets||$l.brackets,s=null,o=i.changeByRange(a=>{if(a.empty){let l=YB(i.doc,a.head);for(let c of n)if(c==l&&cd(i.doc,a.head)==M1(is(c,0)))return{changes:{from:a.head-c.length,to:a.head+c.length},range:me.cursor(a.head-c.length)}}return{range:s=a}});return s||e(i.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},FB=[{key:"Backspace",run:VB}];function WB(i,e){let t=L1(i,i.selection.main.head),n=t.brackets||$l.brackets;for(let s of n){let o=M1(is(s,0));if(e==s)return o==s?KB(i,s,n.indexOf(s+s+s)>-1,t):GB(i,s,o,t.before||$l.before);if(e==o&&U1(i,i.selection.main.from))return JB(i,s,o)}return null}function U1(i,e){let t=!1;return i.field(N1).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function cd(i,e){let t=i.sliceString(e,e+2);return t.slice(0,ai(is(t,0)))}function YB(i,e){let t=i.sliceString(e-2,e);return ai(is(t,0))==t.length?t:t.slice(1)}function GB(i,e,t,n){let s=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:t,from:a.to}],effects:xo.of(a.to+e.length),range:me.range(a.anchor+e.length,a.head+e.length)};let l=cd(i.doc,a.head);return!l||/\s/.test(l)||n.indexOf(l)>-1?{changes:{insert:e+t,from:a.head},effects:xo.of(a.head+e.length),range:me.cursor(a.head+e.length)}:{range:s=a}});return s?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function JB(i,e,t){let n=null,s=i.changeByRange(o=>o.empty&&cd(i.doc,o.head)==t?{changes:{from:o.head,to:o.head+t.length,insert:t},range:me.cursor(o.head+t.length)}:n={range:o});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function KB(i,e,t,n){let s=n.stringPrefixes||$l.stringPrefixes,o=null,a=i.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:xo.of(l.to+e.length),range:me.range(l.anchor+e.length,l.head+e.length)};let c=l.head,f=cd(i.doc,c),h;if(f==e){if(nO(i,c))return{changes:{insert:e+e,from:c},effects:xo.of(c+e.length),range:me.cursor(c+e.length)};if(U1(i,c)){let v=t&&i.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+v.length,insert:v},range:me.cursor(c+v.length)}}}else{if(t&&i.sliceDoc(c-2*e.length,c)==e+e&&(h=sO(i,c-2*e.length,s))>-1&&nO(i,h))return{changes:{insert:e+e+e+e,from:c},effects:xo.of(c+e.length),range:me.cursor(c+e.length)};if(i.charCategorizer(c)(f)!=Ft.Word&&sO(i,c,s)>-1&&!eZ(i,c,e,s))return{changes:{insert:e+e,from:c},effects:xo.of(c+e.length),range:me.cursor(c+e.length)}}return{range:o=l}});return o?null:i.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function nO(i,e){let t=Sn(i).resolveInner(e+1);return t.parent&&t.from==e}function eZ(i,e,t,n){let s=Sn(i).resolveInner(e,-1),o=n.reduce((a,l)=>Math.max(a,l.length),0);for(let a=0;a<5;a++){let l=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+o)),c=l.indexOf(t);if(!c||c>-1&&n.indexOf(l.slice(0,c))>-1){let h=s.firstChild;for(;h&&h.from==s.from&&h.to-h.from>t.length+c;){if(i.sliceDoc(h.to-t.length,h.to)==t)return!1;h=h.firstChild}return!0}let f=s.to==e&&s.parent;if(!f)break;s=f}return!1}function sO(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=Ft.Word)return e;for(let s of t){let o=e-s.length;if(i.sliceDoc(o,e)==s&&n(i.sliceDoc(o-1,o))!=Ft.Word)return o}return-1}function tZ(i={}){return[QB,as,wn.of(i),RB,nZ,Q1]}const D1=[{key:"Ctrl-Space",run:eO},{mac:"Alt-`",run:eO},{key:"Escape",run:xB},{key:"ArrowDown",run:ac(!0)},{key:"ArrowUp",run:ac(!1)},{key:"PageDown",run:ac(!0,"page")},{key:"PageUp",run:ac(!1,"page")},{key:"Enter",run:kB}],nZ=lo.highest(Ml.computeN([wn],i=>i.facet(wn).defaultKeymap?[D1]:[]));class iO{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class _o{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=n.facet(Tl).markerFilter;s&&(e=s(e,n));let o=e.slice().sort((h,g)=>h.from-g.from||h.to-g.to),a=new Ti,l=[],c=0;for(let h=0;;){let g=h==o.length?null:o[h];if(!g&&!l.length)break;let v,O;for(l.length?(v=c,O=l.reduce((S,w)=>Math.min(S,w.to),g&&g.from>v?g.from:1e8)):(v=g.from,O=g.to,l.push(g),h++);h<o.length;){let S=o[h];if(S.from==v&&(S.to>S.from||S.to==v))l.push(S),h++,O=Math.min(S.to,O);else{O=Math.min(S.from,O);break}}let y=mZ(l);if(l.some(S=>S.from==S.to||S.from==S.to-1&&n.doc.lineAt(S.from).to==S.from))a.add(v,v,We.widget({widget:new uZ(y),diagnostics:l.slice()}));else{let S=l.reduce((w,_)=>_.markClass?w+" "+_.markClass:w,"");a.add(v,O,We.mark({class:"cm-lintRange cm-lintRange-"+y+S,diagnostics:l.slice(),inclusiveEnd:l.some(w=>w.to>O)}))}c=O;for(let S=0;S<l.length;S++)l[S].to<=c&&l.splice(S--,1)}let f=a.finish();return new _o(f,t,ba(f))}}function ba(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,o,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!n)n=new iO(s,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new iO(n.from,o,n.diagnostic)}}),n}function sZ(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(Tl).hideOn(i,t,n);if(s!=null)return s;let o=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(a=>a.is(q1))||i.changes.touchesRange(o.from,Math.max(o.to,n)))}function iZ(i,e){return i.field(ys,!1)?e:e.concat(ot.appendConfig.of(gZ))}const q1=ot.define(),xh=ot.define(),E1=ot.define(),ys=kn.define({create(){return new _o(We.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let o=e.changes.mapPos(i.selected.from,1);n=ba(t,i.selected.diagnostic,o)||ba(t,null,o)}!t.size&&s&&e.state.facet(Tl).autoPanel&&(s=null),i=new _o(t,s,n)}for(let t of e.effects)if(t.is(q1)){let n=e.state.facet(Tl).autoPanel?t.value.length?Rl.open:null:i.panel;i=_o.init(t.value,n,e.state)}else t.is(xh)?i=new _o(i.diagnostics,t.value?Rl.open:null,i.selected):t.is(E1)&&(i=new _o(i.diagnostics,i.panel,t.value));return i},provide:i=>[Sl.from(i,e=>e.panel),Qe.decorations.from(i,e=>e.diagnostics)]}),oZ=We.mark({class:"cm-lintRange cm-lintRange-active"});function aZ(i,e,t){let{diagnostics:n}=i.state.field(ys),s,o=-1,a=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(c,f,{spec:h})=>{if(e>=c&&e<=f&&(c==f||(e>c||t>0)&&(e<f||t<0)))return s=h.diagnostics,o=c,a=f,!1});let l=i.state.facet(Tl).tooltipFilter;return s&&l&&(s=l(s,i.state)),s?{pos:o,end:a,above:i.state.doc.lineAt(o).to<a,create(){return{dom:lZ(i,s)}}}:null}function lZ(i,e){return At("ul",{class:"cm-tooltip-lint"},e.map(t=>Z1(i,t,!1)))}const rZ=i=>{let e=i.state.field(ys,!1);(!e||!e.panel)&&i.dispatch({effects:iZ(i.state,[xh.of(!0)])});let t=yl(i,Rl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},oO=i=>{let e=i.state.field(ys,!1);return!e||!e.panel?!1:(i.dispatch({effects:xh.of(!1)}),!0)},cZ=i=>{let e=i.state.field(ys,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},dZ=[{key:"Mod-Shift-m",run:rZ,preventDefault:!0},{key:"F8",run:cZ}],Tl=Le.define({combine(i){return Object.assign({sources:i.map(e=>e.source).filter(e=>e!=null)},hi(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function B1(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(o=>o.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Z1(i,e,t){var n;let s=t?B1(e.actions):[];return At("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},At("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((o,a)=>{let l=!1,c=v=>{if(v.preventDefault(),l)return;l=!0;let O=ba(i.state.field(ys).diagnostics,e);O&&o.apply(i,O.from,O.to)},{name:f}=o,h=s[a]?f.indexOf(s[a]):-1,g=h<0?f:[f.slice(0,h),At("u",f.slice(h,h+1)),f.slice(h+1)];return At("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${f}${h<0?"":` (access key "${s[a]})"`}.`},g)}),e.source&&At("div",{class:"cm-diagnosticSource"},e.source))}class uZ extends mi{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return At("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class aO{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Z1(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Rl{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)oO(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=B1(o.actions);for(let l=0;l<a.length;l++)if(a[l].toUpperCase().charCodeAt(0)==s.keyCode){let c=ba(this.view.state.field(ys).diagnostics,o);c&&o.actions[l].apply(e,c.from,c.to)}}else return;s.preventDefault()},n=s=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(s.target)&&this.moveSelection(o)};this.list=At("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=At("div",{class:"cm-panel-lint"},this.list,At("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>oO(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(ys).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(ys),n=0,s=!1,o=null,a=new Set;for(e.between(0,this.view.state.doc.length,(l,c,{spec:f})=>{for(let h of f.diagnostics){if(a.has(h))continue;a.add(h);let g=-1,v;for(let O=n;O<this.items.length;O++)if(this.items[O].diagnostic==h){g=O;break}g<0?(v=new aO(this.view,h),this.items.splice(n,0,v),s=!0):(v=this.items[g],g>n&&(this.items.splice(n,g-n),s=!0)),t&&v.diagnostic==t.diagnostic?v.dom.hasAttribute("aria-selected")||(v.dom.setAttribute("aria-selected","true"),o=v):v.dom.hasAttribute("aria-selected")&&v.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new aO(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:c})=>{let f=c.height/this.list.offsetHeight;l.top<c.top?this.list.scrollTop-=(c.top-l.top)/f:l.bottom>c.bottom&&(this.list.scrollTop+=(l.bottom-c.bottom)/f)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(ys),n=ba(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:E1.of(n)})}static open(e){return new Rl(e)}}function fZ(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function lc(i){return fZ(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const pZ=Qe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:lc("#d11")},".cm-lintRange-warning":{backgroundImage:lc("orange")},".cm-lintRange-info":{backgroundImage:lc("#999")},".cm-lintRange-hint":{backgroundImage:lc("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function hZ(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function mZ(i){let e="hint",t=1;for(let n of i){let s=hZ(n.severity);s>t&&(t=s,e=n.severity)}return e}const gZ=[ys,Qe.decorations.compute([ys],i=>{let{selected:e,panel:t}=i.field(ys);return!e||!t||e.from==e.to?We.none:We.set([oZ.range(e.from,e.to)])}),t5(aZ,{hideOn:sZ}),pZ],vZ=[fy(),h5(),Rq(),IE(),iE(),Oq(),wq(),yt.allowMultipleSelections.of(!0),H5(),My(rE,{fallback:!0}),mE(),HB(),tZ(),Hq(),Vq(),Lq(),D4(),Ml.of([...FB,...I4,...sB,...EE,...eE,...D1,...dZ])];/*!
* VueCodemirror v6.1.1
* Copyright (c) Surmon. All rights reserved.
* Released under the MIT License.
* Surmon
*/var bZ=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[vZ]}),OZ=Symbol("vue-codemirror-global-config"),Wn,CZ=function(i){var e=i.onUpdate,t=i.onChange,n=i.onFocus,s=i.onBlur,o=function(a,l){var c={};for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&l.indexOf(f)<0&&(c[f]=a[f]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(f=Object.getOwnPropertySymbols(a);h<f.length;h++)l.indexOf(f[h])<0&&Object.prototype.propertyIsEnumerable.call(a,f[h])&&(c[f[h]]=a[f[h]])}return c}(i,["onUpdate","onChange","onFocus","onBlur"]);return yt.create({doc:o.doc,selection:o.selection,extensions:(Array.isArray(o.extensions)?o.extensions:[o.extensions]).concat([Qe.updateListener.of(function(a){e(a),a.docChanged&&t(a.state.doc.toString(),a),a.focusChanged&&(a.view.hasFocus?n(a):s(a))})])})},ea=function(i){var e=new Il;return{compartment:e,run:function(t){e.get(i.state)?i.dispatch({effects:e.reconfigure(t)}):i.dispatch({effects:ot.appendConfig.of(e.of(t))})}}},lO=function(i,e){var t=ea(i),n=t.compartment,s=t.run;return function(o){var a=n.get(i.state);s(o??a!==e?e:[])}},rc={type:Boolean,default:void 0},yZ={autofocus:rc,disabled:rc,indentWithTab:rc,tabSize:Number,placeholder:String,style:Object,autoDestroy:rc,phrases:Object,root:Object,extensions:Array,selection:Object},SZ={modelValue:{type:String,default:""}},_Z=Object.assign(Object.assign({},yZ),SZ);(function(i){i.Change="change",i.Update="update",i.Focus="focus",i.Blur="blur",i.Ready="ready",i.ModelUpdate="update:modelValue"})(Wn||(Wn={}));var wo={};wo[Wn.Change]=function(i,e){return!0},wo[Wn.Update]=function(i){return!0},wo[Wn.Focus]=function(i){return!0},wo[Wn.Blur]=function(i){return!0},wo[Wn.Ready]=function(i){return!0};var z1={};z1[Wn.ModelUpdate]=wo[Wn.Change];var wZ=Object.assign(Object.assign({},wo),z1),kZ=ae({name:"VueCodemirror",props:Object.assign({},_Z),emits:Object.assign({},wZ),setup:function(i,e){var t=Tu(),n=Tu(),s=Tu(),o=Object.assign(Object.assign({},bZ),qe(OZ,{})),a=J(function(){var l={};return Object.keys(Sf(i)).forEach(function(c){var f;c!=="modelValue"&&(l[c]=(f=i[c])!==null&&f!==void 0?f:o[c])}),l});return vt(function(){var l;n.value=CZ({doc:i.modelValue,selection:a.value.selection,extensions:(l=o.extensions)!==null&&l!==void 0?l:[],onFocus:function(f){return e.emit(Wn.Focus,f)},onBlur:function(f){return e.emit(Wn.Blur,f)},onUpdate:function(f){return e.emit(Wn.Update,f)},onChange:function(f,h){f!==i.modelValue&&(e.emit(Wn.Change,f,h),e.emit(Wn.ModelUpdate,f,h))}}),s.value=function(f){return new Qe(Object.assign({},f))}({state:n.value,parent:t.value,root:a.value.root});var c=function(f){var h=function(){return f.state.doc.toString()},g=ea(f).run,v=lO(f,[Qe.editable.of(!1),yt.readOnly.of(!0)]),O=lO(f,Ml.of([Q4])),y=ea(f).run,S=ea(f).run,w=ea(f).run,_=ea(f).run;return{focus:function(){return f.focus()},getDoc:h,setDoc:function($){$!==h()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:$}})},reExtensions:g,toggleDisabled:v,toggleIndentWithTab:O,setTabSize:function($){y([yt.tabSize.of($),Ul.of(" ".repeat($))])},setPhrases:function($){S([yt.phrases.of($)])},setPlaceholder:function($){w(Eq($))},setStyle:function($){$===void 0&&($={}),_(Qe.theme({"&":Object.assign({},$)}))}}}(s.value);je(function(){return i.modelValue},function(f){f!==c.getDoc()&&c.setDoc(f)}),je(function(){return i.extensions},function(f){return c.reExtensions(f||[])},{immediate:!0}),je(function(){return a.value.disabled},function(f){return c.toggleDisabled(f)},{immediate:!0}),je(function(){return a.value.indentWithTab},function(f){return c.toggleIndentWithTab(f)},{immediate:!0}),je(function(){return a.value.tabSize},function(f){return c.setTabSize(f)},{immediate:!0}),je(function(){return a.value.phrases},function(f){return c.setPhrases(f||{})},{immediate:!0}),je(function(){return a.value.placeholder},function(f){return c.setPlaceholder(f)},{immediate:!0}),je(function(){return a.value.style},function(f){return c.setStyle(f)},{immediate:!0}),a.value.autofocus&&c.focus(),e.emit(Wn.Ready,{state:n.value,view:s.value,container:t.value})}),kO(function(){a.value.autoDestroy&&s.value&&function(l){l.destroy()}(s.value)}),function(){return cn("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),rO=kZ;const xZ="#e5c07b",cO="#e06c75",PZ="#56b6c2",$Z="#ffffff",Oc="#abb2bf",vp="#7d8799",TZ="#61afef",RZ="#98c379",dO="#d19a66",IZ="#c678dd",QZ="#21252b",uO="#2c313a",fO="#282c34",vf="#353a42",AZ="#3E4451",pO="#528bff",NZ=Qe.theme({"&":{color:Oc,backgroundColor:fO},".cm-content":{caretColor:pO},".cm-cursor, .cm-dropCursor":{borderLeftColor:pO},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:AZ},".cm-panels":{backgroundColor:QZ,color:Oc},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:fO,color:vp,border:"none"},".cm-activeLineGutter":{backgroundColor:uO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:vf},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:vf,borderBottomColor:vf},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:uO,color:Oc}}},{dark:!0}),MZ=ql.define([{tag:ne.keyword,color:IZ},{tag:[ne.name,ne.deleted,ne.character,ne.propertyName,ne.macroName],color:cO},{tag:[ne.function(ne.variableName),ne.labelName],color:TZ},{tag:[ne.color,ne.constant(ne.name),ne.standard(ne.name)],color:dO},{tag:[ne.definition(ne.name),ne.separator],color:Oc},{tag:[ne.typeName,ne.className,ne.number,ne.changed,ne.annotation,ne.modifier,ne.self,ne.namespace],color:xZ},{tag:[ne.operator,ne.operatorKeyword,ne.url,ne.escape,ne.regexp,ne.link,ne.special(ne.string)],color:PZ},{tag:[ne.meta,ne.comment],color:vp},{tag:ne.strong,fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.link,color:vp,textDecoration:"underline"},{tag:ne.heading,fontWeight:"bold",color:cO},{tag:[ne.atom,ne.bool,ne.special(ne.variableName)],color:dO},{tag:[ne.processingInstruction,ne.string,ne.inserted],color:RZ},{tag:ne.invalid,color:$Z}]),LZ=[NZ,My(MZ)];var hO={};class Wc{constructor(e,t,n,s,o,a,l,c,f,h=0,g){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=o,this.score=a,this.buffer=l,this.bufferBase=c,this.curContext=f,this.lookAhead=h,this.parent=g}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new Wc(e,[],t,n,n,0,[],0,s?new mO(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,s=e&65535,{parser:o}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let l=o.dynamicPrecedence(s);if(l&&(this.score+=l),n==0){this.pushState(o.getGoto(this.state,s,!0),this.reducePos),s<o.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(s,this.reducePos);return}let c=this.stack.length-(n-1)*3-(e&262144?6:0),f=c?this.stack[c-2]:this.p.ranges[0].from,h=this.reducePos-f;h>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(f==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=f,this.p.lastBigReductionSize=h));let g=c?this.stack[c-1]:0,v=this.bufferBase+this.buffer.length-g;if(s<o.minRepeatTerm||e&131072){let O=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,f,O,v+4,!0)}if(e&262144)this.state=this.stack[c];else{let O=this.stack[c-3];this.state=o.getGoto(O,s,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(s,f)}storeNode(e,t,n,s=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,l=this.buffer.length;if(l==0&&a.parent&&(l=a.bufferBase-a.parent.bufferBase,a=a.parent),l>0&&a.buffer[l-4]==0&&a.buffer[l-1]>-1){if(t==n)return;if(a.buffer[l-2]>=t){a.buffer[l-2]=n;return}}}if(!o||this.pos==n)this.buffer.push(e,t,n,s);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let l=!1;for(let c=a;c>0&&this.buffer[c-2]>n;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;a>0&&this.buffer[a-2]>n;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,s>4&&(s-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=n,this.buffer[a+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:a}=this.p;(s>this.pos||t<=a.maxNode)&&(this.pos=s,a.stateFlag(o,1)||(this.reducePos=s)),this.pushState(o,n),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,s,4)}else this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4)}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Wc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new UZ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let o=0,a;o<t.length;o+=2)(a=t[o+1])!=this.state&&this.p.parser.hasAction(a,e)&&s.push(t[o],a);if(this.stack.length<120)for(let o=0;s.length<8&&o<t.length;o+=2){let a=t[o+1];s.some((l,c)=>c&1&&l==a)||s.push(t[o],a)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let o=t[s+1];if(o==this.state)continue;let a=this.split();a.pushState(o,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(t[s],this.pos),a.reducePos=this.pos,a.score-=200,n.push(a)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,o=this.stack.length-n*3;if(o<0||e.getGoto(this.stack[o],s,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,o)=>{if(!t.includes(s))return t.push(s),e.allActions(s,a=>{if(!(a&393216))if(a&65536){let l=(a>>19)-o;if(l>1){let c=a&65535,f=this.stack.length-l*3;if(f>=0&&e.getGoto(this.stack[f],c,!1)>=0)return l<<19|65536|c}}else{let l=n(a,o+1);if(l!=null)return l}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new mO(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class mO{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class UZ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Yc{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Yc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Yc(this.stack,this.pos,this.index)}}function ll(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let o=0;for(;;){let a=i.charCodeAt(n++),l=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;let c=a-32;if(c>=46&&(c-=46,l=!0),o+=c,l)break;o*=46}t?t[s++]=o:t=new e(o)}return t}class Cc{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const gO=new Cc;class DZ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=gO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,s=this.rangeIndex,o=this.pos+e;for(;o<n.from;){if(!s)return null;let a=this.ranges[--s];o-=n.from-a.to,n=a}for(;t<0?o>n.to:o>=n.to;){if(s==this.ranges.length-1)return null;let a=this.ranges[++s];o+=a.from-n.to,n=a}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(n=o,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,l=this.range;for(;l.to<=n;)l=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=gO,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class da{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;H1(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}da.prototype.contextual=da.prototype.fallback=da.prototype.extend=!1;class bp{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?ll(e):e}token(e,t){let n=e.pos,s=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(H1(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||s++,a==null)break;e.reset(a,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}bp.prototype.contextual=da.prototype.fallback=da.prototype.extend=!1;class zl{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function H1(i,e,t,n,s,o){let a=0,l=1<<n,{dialect:c}=t.p.parser;e:for(;(l&i[a])!=0;){let f=i[a+1];for(let O=a+3;O<f;O+=2)if((i[O+1]&l)>0){let y=i[O];if(c.allows(y)&&(e.token.value==-1||e.token.value==y||qZ(y,e.token.value,s,o))){e.acceptToken(y);break}}let h=e.next,g=0,v=i[a+2];if(e.next<0&&v>g&&i[f+v*3-3]==65535){a=i[f+v*3-1];continue e}for(;g<v;){let O=g+v>>1,y=f+O+(O<<1),S=i[y],w=i[y+1]||65536;if(h<S)v=O;else if(h>=w)g=O+1;else{a=i[y+2],e.advance();continue e}}break}}function vO(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function qZ(i,e,t,n){let s=vO(t,n,e);return s<0||vO(t,n,i)<s}const Os=typeof process<"u"&&hO&&/\bparse\b/.test(hO.LOG);let bf=null;function bO(i,e,t){let n=i.cursor(Cn.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class EZ{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?bO(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?bO(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[s],a=this.start[t]+n.positions[s];if(a>e)return this.nextStart=a,null;if(o instanceof mn){if(a==e){if(a<this.safeFrom)return null;let l=a+o.length;if(l<=this.safeTo){let c=o.prop(gt.lookAhead);if(!c||l+c<this.fragment.to)return o}}this.index[t]++,a+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+o.length}}}class BZ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Cc)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:o}=s,a=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,c=0;for(let f=0;f<o.length;f++){if((1<<f&a)==0)continue;let h=o[f],g=this.tokens[f];if(!(n&&!h.fallback)&&((h.contextual||g.start!=e.pos||g.mask!=a||g.context!=l)&&(this.updateCachedToken(g,h,e),g.mask=a,g.context=l),g.lookAhead>g.end+25&&(c=Math.max(g.lookAhead,c)),g.value!=0)){let v=t;if(g.extended>-1&&(t=this.addActions(e,g.extended,g.end,t)),t=this.addActions(e,g.value,g.end,t),!h.extend&&(n=g,t>v))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!n&&e.pos==this.stream.end&&(n=new Cc,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Cc,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:o}=n.p;for(let a=0;a<o.specialized.length;a++)if(o.specialized[a]==e.value){let l=o.specializers[a](this.stream.read(e.start,e.end),n);if(l>=0&&n.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let o=0;o<s;o+=3)if(this.actions[o]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:o}=e,{parser:a}=e.p,{data:l}=a;for(let c=0;c<2;c++)for(let f=a.stateSlot(o,c?2:1);;f+=3){if(l[f]==65535)if(l[f+1]==1)f=xi(l,f+2);else{s==0&&l[f+1]==2&&(s=this.putAction(xi(l,f+2),t,n,s));break}l[f]==t&&(s=this.putAction(xi(l,f+1),t,n,s))}return s}}class ZZ{constructor(e,t,n,s){this.parser=e,this.input=t,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new DZ(t,s),this.tokens=new BZ(e,this.stream),this.topTerm=e.top[1];let{from:o}=s[0];this.stacks=[Wc.start(this,e.top[0],o)],this.fragments=n.length&&this.stream.end-o>e.bufferLength*4?new EZ(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let l=e[a];for(;;){if(this.tokens.mainToken=null,l.pos>t)n.push(l);else{if(this.advanceStack(l,n,e))continue;{s||(s=[],o=[]),s.push(l);let c=this.tokens.getMainToken(l);o.push(c.value,c.end)}}break}}if(!n.length){let a=s&&XZ(s);if(a)return Os&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Os&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let a=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,o,n);if(a)return Os&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((l,c)=>c.score-l.score);n.length>a;)n.pop();n.some(l=>l.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let l=n[a];for(let c=a+1;c<n.length;c++){let f=n[c];if(l.sameState(f)||l.buffer.length>500&&f.buffer.length>500)if((l.score-f.score||l.buffer.length-f.buffer.length)>0)n.splice(c--,1);else{n.splice(a--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let s=e.pos,{parser:o}=this,a=Os?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let f=e.curContext&&e.curContext.tracker.strict,h=f?e.curContext.hash:0;for(let g=this.fragments.nodeAt(s);g;){let v=this.parser.nodeSet.types[g.type.id]==g.type?o.getGoto(e.state,g.type.id):-1;if(v>-1&&g.length&&(!f||(g.prop(gt.contextHash)||0)==h))return e.useNode(g,v),Os&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(g.type.id)})`),!0;if(!(g instanceof mn)||g.children.length==0||g.positions[0]>0)break;let O=g.children[0];if(O instanceof mn&&g.positions[0]==0)g=O;else break}}let l=o.stateSlot(e.state,4);if(l>0)return e.reduce(l),Os&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let f=0;f<c.length;){let h=c[f++],g=c[f++],v=c[f++],O=f==c.length||!n,y=O?e:e.split(),S=this.tokens.mainToken;if(y.apply(h,g,S?S.start:y.pos,v),Os&&console.log(a+this.stackID(y)+` (via ${(h&65536)==0?"shift":`reduce of ${o.getName(h&65535)}`} for ${o.getName(g)} @ ${s}${y==e?"":", split"})`),O)return!0;y.pos>s?t.push(y):n.push(y)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return OO(e,t),!0}}runRecovery(e,t,n){let s=null,o=!1;for(let a=0;a<e.length;a++){let l=e[a],c=t[a<<1],f=t[(a<<1)+1],h=Os?this.stackID(l)+" -> ":"";if(l.deadEnd&&(o||(o=!0,l.restart(),Os&&console.log(h+this.stackID(l)+" (restarted)"),this.advanceFully(l,n))))continue;let g=l.split(),v=h;for(let O=0;g.forceReduce()&&O<10&&(Os&&console.log(v+this.stackID(g)+" (via force-reduce)"),!this.advanceFully(g,n));O++)Os&&(v=this.stackID(g)+" -> ");for(let O of l.recoverByInsert(c))Os&&console.log(h+this.stackID(O)+" (via recover-insert)"),this.advanceFully(O,n);this.stream.end>l.pos?(f==l.pos&&(f++,c=0),l.recoverByDelete(c,f),Os&&console.log(h+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),OO(l,n)):(!s||s.score<l.score)&&(s=l)}return s}stackToTree(e){return e.close(),mn.build({buffer:Yc.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(bf||(bf=new WeakMap)).get(e);return t||bf.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function OO(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class zZ{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const Of=i=>i;class HZ{constructor(e){this.start=e.start,this.shift=e.shift||Of,this.reduce=e.reduce||Of,this.reuse=e.reuse||Of,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Gc extends vy{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let n=Object.keys(e.topRules).map(l=>e.topRules[l][1]),s=[];for(let l=0;l<t.length;l++)s.push([]);function o(l,c,f){s[l].push([c,c.deserialize(String(f))])}if(e.nodeProps)for(let l of e.nodeProps){let c=l[0];typeof c=="string"&&(c=gt[c]);for(let f=1;f<l.length;){let h=l[f++];if(h>=0)o(h,c,l[f++]);else{let g=l[f+-h];for(let v=-h;v>0;v--)o(l[f++],c,g);f++}}}this.nodeSet=new oh(t.map((l,c)=>ds.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:s[c],top:n.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=py;let a=ll(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(CO),this.states=ll(e.states,Uint32Array),this.data=ll(e.stateData),this.goto=ll(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new da(a,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let s=new ZZ(this,e,t,n);for(let o of this.wrappers)s=o(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let o=s[t+1];;){let a=s[o++],l=a&1,c=s[o++];if(l&&n)return c;for(let f=o+(a>>1);o<f;o++)if(s[o]==e)return c;if(l)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let o=this.stateSlot(e,s?2:1),a;;o+=3){if((a=n[o])==65535)if(n[o+1]==1)a=n[o=xi(n,o+2)];else{if(n[o+1]==2)return xi(n,o+2);break}if(a==t||a==0)return xi(n,o+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let o=this.stateSlot(e,1);s==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=xi(this.data,o+2);else break;s=t(xi(this.data,o+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=xi(this.data,n+2);else break;if((this.data[n+2]&1)==0){let s=this.data[n+1];t.some((o,a)=>a&1&&o==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(Gc.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(o=>o.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let o=e.specializers.find(l=>l.from==n.external);if(!o)return n;let a=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[s]=CO(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let o of e.split(" ")){let a=t.indexOf(o);a>=0&&(n[a]=!0)}let s=null;for(let o=0;o<t.length;o++)if(!n[o])for(let a=this.dialects[t[o]],l;(l=this.data[a++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[l]=1;return new zZ(e,n,s)}static deserialize(e){return new Gc(e)}}function xi(i,e){return i[e]|i[e+1]<<16}function XZ(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function CO(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const jZ=315,VZ=316,yO=1,FZ=2,WZ=3,YZ=4,GZ=317,JZ=319,KZ=320,ez=5,tz=6,nz=0,Op=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],X1=125,sz=59,Cp=47,iz=42,oz=43,az=45,lz=60,rz=44,cz=63,dz=46,uz=91,fz=new HZ({start:!1,shift(i,e){return e==ez||e==tz||e==JZ?i:e==KZ},strict:!1}),pz=new zl((i,e)=>{let{next:t}=i;(t==X1||t==-1||e.context)&&i.acceptToken(GZ)},{contextual:!0,fallback:!0}),hz=new zl((i,e)=>{let{next:t}=i,n;Op.indexOf(t)>-1||t==Cp&&((n=i.peek(1))==Cp||n==iz)||t!=X1&&t!=sz&&t!=-1&&!e.context&&i.acceptToken(jZ)},{contextual:!0}),mz=new zl((i,e)=>{i.next==uz&&!e.context&&i.acceptToken(VZ)},{contextual:!0}),gz=new zl((i,e)=>{let{next:t}=i;if(t==oz||t==az){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(yO);i.acceptToken(n?yO:FZ)}}else t==cz&&i.peek(1)==dz&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(WZ))},{contextual:!0});function Cf(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const vz=new zl((i,e)=>{if(i.next!=lz||!e.dialectEnabled(nz)||(i.advance(),i.next==Cp))return;let t=0;for(;Op.indexOf(i.next)>-1;)i.advance(),t++;if(Cf(i.next,!0)){for(i.advance(),t++;Cf(i.next,!1);)i.advance(),t++;for(;Op.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==rz)return;for(let n=0;;n++){if(n==7){if(!Cf(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(YZ,-t)}),bz=by({"get set async static":ne.modifier,"for while do if else switch try catch finally return throw break continue default case":ne.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":ne.operatorKeyword,"let var const using function class extends":ne.definitionKeyword,"import export from":ne.moduleKeyword,"with debugger new":ne.keyword,TemplateString:ne.special(ne.string),super:ne.atom,BooleanLiteral:ne.bool,this:ne.self,null:ne.null,Star:ne.modifier,VariableName:ne.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":ne.function(ne.variableName),VariableDefinition:ne.definition(ne.variableName),Label:ne.labelName,PropertyName:ne.propertyName,PrivatePropertyName:ne.special(ne.propertyName),"CallExpression/MemberExpression/PropertyName":ne.function(ne.propertyName),"FunctionDeclaration/VariableDefinition":ne.function(ne.definition(ne.variableName)),"ClassDeclaration/VariableDefinition":ne.definition(ne.className),"NewExpression/VariableName":ne.className,PropertyDefinition:ne.definition(ne.propertyName),PrivatePropertyDefinition:ne.definition(ne.special(ne.propertyName)),UpdateOp:ne.updateOperator,"LineComment Hashbang":ne.lineComment,BlockComment:ne.blockComment,Number:ne.number,String:ne.string,Escape:ne.escape,ArithOp:ne.arithmeticOperator,LogicOp:ne.logicOperator,BitOp:ne.bitwiseOperator,CompareOp:ne.compareOperator,RegExp:ne.regexp,Equals:ne.definitionOperator,Arrow:ne.function(ne.punctuation),": Spread":ne.punctuation,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace,"InterpolationStart InterpolationEnd":ne.special(ne.brace),".":ne.derefOperator,", ;":ne.separator,"@":ne.meta,TypeName:ne.typeName,TypeDefinition:ne.definition(ne.typeName),"type enum interface implements namespace module declare":ne.definitionKeyword,"abstract global Privacy readonly override":ne.modifier,"is keyof unique infer asserts":ne.operatorKeyword,JSXAttributeValue:ne.attributeValue,JSXText:ne.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ne.angleBracket,"JSXIdentifier JSXNameSpacedName":ne.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ne.attributeName,"JSXBuiltin/JSXIdentifier":ne.standard(ne.tagName)}),Oz={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,for:474,of:483,while:486,with:490,do:494,if:498,else:500,switch:504,case:510,try:516,catch:520,finally:524,return:528,throw:532,break:536,continue:540,debugger:544},Cz={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},yz={__proto__:null,"<":193},Sz=Gc.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Ik'#IkO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JqO6[Q!0MxO'#JrO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO7eQMhO'#F|O9[Q`O'#F{OOQ!0Lf'#Jr'#JrOOQ!0Lb'#Jq'#JqO9aQ`O'#GwOOQ['#K^'#K^O9lQ`O'#IXO9qQ!0LrO'#IYOOQ['#J_'#J_OOQ['#I^'#I^Q`QlOOQ`QlOOO9yQ!L^O'#DvO:QQlO'#EOO:XQlO'#EQO9gQ`O'#GsO:`QMhO'#CoO:nQ`O'#EnO:yQ`O'#EyO;OQMhO'#FeO;mQ`O'#GsOOQO'#K_'#K_O;rQ`O'#K_O<QQ`O'#G{O<QQ`O'#G|O<QQ`O'#HOO9gQ`O'#HRO<wQ`O'#HUO>`Q`O'#CeO>pQ`O'#HbO>xQ`O'#HhO>xQ`O'#HjO`QlO'#HlO>xQ`O'#HnO>xQ`O'#HqO>}Q`O'#HwO?SQ!0LsO'#H}O%[QlO'#IPO?_Q!0LsO'#IRO?jQ!0LsO'#ITO9qQ!0LrO'#IVO?uQ!0MxO'#CiO@wQpO'#DlQOQ`OOO%[QlO'#EQOA_Q`O'#ETO:`QMhO'#EnOAjQ`O'#EnOAuQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Ju'#JuO%[QlO'#JuOOQO'#Jx'#JxOOQO'#Ig'#IgOBuQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J|'#J|OCqQ!0MSO'#EgOC{QpO'#EWOOQO'#Jw'#JwODaQpO'#JxOEnQpO'#EWOC{QpO'#EgPE{O&2DjO'#CbPOOO)CD|)CD|OOOO'#I_'#I_OFWO#tO,59UOOQ!0Lh,59U,59UOOOO'#I`'#I`OFfO&jO,59UOFtQ!L^O'#DcOOOO'#Ib'#IbOF{O#@ItO,59{OOQ!0Lf,59{,59{OGZQlO'#IcOGnQ`O'#JsOImQ!fO'#JsO+}QlO'#JsOItQ`O,5:ROJ[Q`O'#EpOJiQ`O'#KSOJtQ`O'#KROJtQ`O'#KROJ|Q`O,5;^OKRQ`O'#KQOOQ!0Ln,5:^,5:^OKYQlO,5:^OMWQ!0MxO,5:fOMwQ`O,5:nONbQ!0LrO'#KPONiQ`O'#KOO9aQ`O'#KOON}Q`O'#KOO! VQ`O,5;]O! [Q`O'#KOO!#aQ!fO'#JrOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$PQ!fO,5:sOOQS'#Jy'#JyOOQO-E<i-E<iO9gQ`O,5=_O!$gQ`O,5=_O!$lQlO,5;ZO!&oQMhO'#EkO!(YQ`O,5;ZO!(_QlO'#DyO!(iQpO,5;dO!(qQpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)PQlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IoO!+SQ!0LrO,5<iO%[QlO,5;eO!&oQMhO,5;eO!+qQMhO,5;eO!-cQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-jQ,UO'#FjO!.gQ,UO'#KWO!.RQ,UO'#KWO!.nQ,UO'#KWOOQO'#KW'#KWO!/SQ,UO,5<SOOOW,5<`,5<`O!/eQlO'#FvOOOW'#In'#InO7VO7dO,5<QO!/lQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0]Q$IUO'#CyOOQ!0Lh'#C}'#C}O!0pO#@ItO'#DRO!1^QMjO,5<eO!1eQ`O,5<hO!3QQ(CWO'#GXO!3_Q`O'#GYO!3dQ`O'#GYO!5SQ(CWO'#G^O!6XQpO'#GbOOQO'#Gn'#GnO!+xQMhO'#GmOOQO'#Gp'#GpO!+xQMhO'#GoO!6zQ$IUO'#JkOOQ!0Lh'#Jk'#JkO!7UQ`O'#JjO!7dQ`O'#JiO!7lQ`O'#CuOOQ!0Lh'#C{'#C{O!7}Q`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO1SQ`O'#DZO!+xQMhO'#GPO!+xQMhO'#GRO!8SQ`O'#GTO!8XQ`O'#GUO!3dQ`O'#G[O!+xQMhO'#GaO<QQ`O'#JjO!8^Q`O'#EqO!8{Q`O,5<gOOQ!0Lb'#Cr'#CrO!9TQ`O'#ErO!9}QpO'#EsOOQ!0Lb'#KQ'#KQO!:UQ!0LrO'#K`O9qQ!0LrO,5=cO`QlO,5>sOOQ['#Jg'#JgOOQ[,5>t,5>tOOQ[-E<[-E<[O!<TQ!0MxO,5:bO!9xQpO,5:`O!>nQ!0MxO,5:jO%[QlO,5:jO!AUQ!0MxO,5:lOOQO,5@y,5@yO!AuQMhO,5=_O!BTQ!0LrO'#JhO9[Q`O'#JhO!BfQ!0LrO,59ZO!BqQpO,59ZO!ByQMhO,59ZO:`QMhO,59ZO!CUQ`O,5;ZO!C^Q`O'#HaO!CrQ`O'#KcO%[QlO,5;}O!9xQpO,5<PO!CzQ`O,5=zO!DPQ`O,5=zO!DUQ`O,5=zO9qQ!0LrO,5=zO<QQ`O,5=jOOQO'#Cy'#CyO!DdQpO,5=gO!DlQMhO,5=hO!DwQ`O,5=jO!D|Q!bO,5=mO!EUQ`O'#K_O>}Q`O'#HWO9gQ`O'#HYO!EZQ`O'#HYO:`QMhO'#H[O!E`Q`O'#H[OOQ[,5=p,5=pO!EeQ`O'#H]O!EvQ`O'#CoO!E{Q`O,59PO!FVQ`O,59PO!H[QlO,59POOQ[,59P,59PO!HlQ!0LrO,59PO%[QlO,59PO!JwQlO'#HdOOQ['#He'#HeOOQ['#Hf'#HfO`QlO,5=|O!K_Q`O,5=|O`QlO,5>SO`QlO,5>UO!KdQ`O,5>WO`QlO,5>YO!KiQ`O,5>]O!KnQlO,5>cOOQ[,5>i,5>iO%[QlO,5>iO9qQ!0LrO,5>kOOQ[,5>m,5>mO# xQ`O,5>mOOQ[,5>o,5>oO# xQ`O,5>oOOQ[,5>q,5>qO#!fQpO'#D_O%[QlO'#JuO##XQpO'#JuO##cQpO'#DmO##tQpO'#DmO#&VQlO'#DmO#&^Q`O'#JtO#&fQ`O,5:WO#&kQ`O'#EtO#&yQ`O'#KTO#'RQ`O,5;_O#'WQpO'#DmO#'eQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#'lQ`O,5:oO>}Q`O,5;YO!BqQpO,5;YO!ByQMhO,5;YO:`QMhO,5;YO#'tQ`O,5@aO#'yQ07dO,5:sOOQO-E<e-E<eO#)PQ!0MSO,5;ROC{QpO,5:rO#)ZQpO,5:rOC{QpO,5;RO!BfQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#)hQ!0LrO,5;RO#)sQ!0LrO,5;RO!BqQpO,5:rOOQO,5;X,5;XO#*RQ!0LrO,5;RPOOO'#I]'#I]P#*gO&2DjO,58|POOO,58|,58|OOOO-E<]-E<]OOQ!0Lh1G.p1G.pOOOO-E<^-E<^OOOO,59},59}O#*rQ!bO,59}OOOO-E<`-E<`OOQ!0Lf1G/g1G/gO#*wQ!fO,5>}O+}QlO,5>}OOQO,5?T,5?TO#+RQlO'#IcOOQO-E<a-E<aO#+`Q`O,5@_O#+hQ!fO,5@_O#+oQ`O,5@mOOQ!0Lf1G/m1G/mO%[QlO,5@nO#+wQ`O'#IiOOQO-E<g-E<gO#+oQ`O,5@mOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@kO#,]Q!0LrO,5@kO#,nQ!0LrO,5@kO#,uQ`O,5@jO9aQ`O,5@jO#,}Q`O,5@jO#-]Q`O'#IlO#,uQ`O,5@jOOQ!0Lb1G0w1G0wO!(iQpO,5:uO!(tQpO,5:uOOQS,5:w,5:wO#-}QdO,5:wO#.VQMhO1G2yO9gQ`O1G2yOOQ!0Lf1G0u1G0uO#.eQ!0MxO1G0uO#/jQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0WQ!0MzO'#JkO!$lQlO1G0uO#2cQ!fO'#JvO%[QlO'#JvO#2mQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#2rQ`O1G1OO#5WQ!0MxO1G1PO#5_Q!0MxO1G1PO#7uQ!0MxO1G1PO#7|Q!0MxO1G1PO#:dQ!0MxO1G1PO#<zQ!0MxO1G1PO#=RQ!0MxO1G1PO#=YQ!0MxO1G1PO#?pQ!0MxO1G1PO#?wQ!0MxO1G1PO#BUQ?MtO'#CiO#DPQ?MtO1G1`O#DWQ?MtO'#JrO#DkQ!0MxO,5?ZOOQ!0Lb-E<m-E<mO#FxQ!0MxO1G1PO#GuQ!0MzO1G1POOQ!0Lf1G1P1G1PO#HxQMjO'#J{O#ISQ`O,5:xO#IXQ!0MxO1G1cO#I{Q,UO,5<WO#JTQ,UO,5<XO#J]Q,UO'#FoO#JtQ`O'#FnOOQO'#KX'#KXOOQO'#Im'#ImO#JyQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#K[Q?MtO'#JqO#KfQ`O,5<bO!)PQlO,5<bOOOW-E<l-E<lOOQ!0Lf1G1l1G1lO#KkQpO'#KWOOQ!0Lf,5<d,5<dO#KsQpO,5<dO#KxQMhO'#DTOOOO'#Ia'#IaO#LPO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8XQ`O'#IqO#L[Q`O,5<zOOQ!0Lh,5<w,5<wO!+xQMhO'#ItO#LxQMjO,5=XO!+xQMhO'#IvO#MkQMjO,5=ZO!&oQMhO,5=]OOQO1G2S1G2SO#MuQ!dO'#CrO#NYQ(CWO'#ErO$ _QpO'#GbO$ uQ!dO,5<sO$ |Q`O'#KZO9aQ`O'#KZO$![Q`O,5<uO!+xQMhO,5<tO$!aQ`O'#GZO$!rQ`O,5<tO$!wQ!dO'#GWO$#UQ!dO'#K[O$#`Q`O'#K[O!&oQMhO'#K[O$#eQ`O,5<xO$#jQlO'#JuO$#tQpO'#GcO##tQpO'#GcO$$VQ`O'#GgO!3dQ`O'#GkO$$[Q!0LrO'#IsO$$gQpO,5<|OOQ!0Lp,5<|,5<|O$$nQpO'#GcO$${QpO'#GdO$%^QpO'#GdO$%cQMjO,5=XO$%sQMjO,5=ZOOQ!0Lh,5=^,5=^O!+xQMhO,5@UO!+xQMhO,5@UO$&TQ`O'#IxO$&iQ`O,5@TO$&qQ`O,59aOOQ!0Lh,59i,59iO$'hQ$IYO,59uOOQ!0Lh'#Jo'#JoO$(ZQMjO,5<kO$(|QMjO,5<mO@oQ`O,5<oOOQ!0Lh,5<p,5<pO$)WQ`O,5<vO$)]QMjO,5<{O$)mQ`O,5@UO$){Q`O'#KOO!$lQlO1G2RO$*QQ`O1G2RO9aQ`O'#KRO9aQ`O'#EtO%[QlO'#EtO9aQ`O'#IzO$*VQ!0LrO,5@zOOQ[1G2}1G2}OOQ[1G4_1G4_OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$,XQ!0MxO1G0UOOQ[1G2y1G2yO!&oQMhO1G2yO%[QlO1G2yO#.YQ`O1G2yO$.]QMhO'#EkOOQ!0Lb,5@S,5@SO$.jQ!0LrO,5@SOOQ[1G.u1G.uO!BfQ!0LrO1G.uO!BqQpO1G.uO!ByQMhO1G.uO$.{Q`O1G0uO$/QQ`O'#CiO$/]Q`O'#KdO$/eQ`O,5={O$/jQ`O'#KdO$/oQ`O'#KdO$/}Q`O'#JQO$0]Q`O,5@}O$0eQ!fO1G1iOOQ!0Lf1G1k1G1kO9gQ`O1G3fO@oQ`O1G3fO$0lQ`O1G3fO$0qQ`O1G3fOOQ[1G3f1G3fO!DwQ`O1G3UO!&oQMhO1G3RO$0vQ`O1G3ROOQ[1G3S1G3SO!&oQMhO1G3SO$0{Q`O1G3SO$1TQpO'#HQOOQ[1G3U1G3UO!6SQpO'#I|O!D|Q!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$1]QMhO,5=tO9gQ`O,5=tO$$VQ`O,5=vO9[Q`O,5=vO!BqQpO,5=vO!ByQMhO,5=vO:`QMhO,5=vO$1kQ`O'#KbO$1vQ`O,5=wOOQ[1G.k1G.kO$1{Q!0LrO1G.kO@oQ`O1G.kO$2WQ`O1G.kO9qQ!0LrO1G.kO$4`Q!fO,5APO$4mQ`O,5APO9aQ`O,5APO$4xQlO,5>OO$5PQ`O,5>OOOQ[1G3h1G3hO`QlO1G3hOOQ[1G3n1G3nOOQ[1G3p1G3pO>xQ`O1G3rO$5UQlO1G3tO$9YQlO'#HsOOQ[1G3w1G3wO$9gQ`O'#HyO>}Q`O'#H{OOQ[1G3}1G3}O$9oQlO1G3}O9qQ!0LrO1G4TOOQ[1G4V1G4VOOQ!0Lb'#G_'#G_O9qQ!0LrO1G4XO9qQ!0LrO1G4ZO$=vQ`O,5@aO!)PQlO,5;`O9aQ`O,5;`O>}Q`O,5:XO!)PQlO,5:XO!BqQpO,5:XO$={Q?MtO,5:XOOQO,5;`,5;`O$>VQpO'#IdO$>mQ`O,5@`OOQ!0Lf1G/r1G/rO$>uQpO'#IjO$?PQ`O,5@oOOQ!0Lb1G0y1G0yO##tQpO,5:XOOQO'#If'#IfO$?XQpO,5:qOOQ!0Ln,5:q,5:qO#'oQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO>}Q`O1G0tO!BqQpO1G0tO!ByQMhO1G0tOOQ!0Lb1G5{1G5{O!BfQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$?`Q!0LrO1G0mO$?kQ!0LrO1G0mO!BqQpO1G0^OC{QpO1G0^O$?yQ!0LrO1G0mOOQO1G0^1G0^O$@_Q!0MxO1G0mPOOO-E<Z-E<ZPOOO1G.h1G.hOOOO1G/i1G/iO$@iQ!bO,5<iO$@qQ!fO1G4iOOQO1G4o1G4oO%[QlO,5>}O$@{Q`O1G5yO$ATQ`O1G6XO$A]Q!fO1G6YO9aQ`O,5?TO$AgQ!0MxO1G6VO%[QlO1G6VO$AwQ!0LrO1G6VO$BYQ`O1G6UO$BYQ`O1G6UO9aQ`O1G6UO$BbQ`O,5?WO9aQ`O,5?WOOQO,5?W,5?WO$BvQ`O,5?WO$){Q`O,5?WOOQO-E<j-E<jOOQS1G0a1G0aOOQS1G0c1G0cO#.QQ`O1G0cOOQ[7+(e7+(eO!&oQMhO7+(eO%[QlO7+(eO$CUQ`O7+(eO$CaQMhO7+(eO$CoQ!0MzO,5=XO$EzQ!0MzO,5=ZO$HVQ!0MzO,5=XO$JhQ!0MzO,5=ZO$LyQ!0MzO,59uO% OQ!0MzO,5<kO%#ZQ!0MzO,5<mO%%fQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%'wQ!0MxO7+&aO%(kQlO'#IeO%(xQ`O,5@bO%)QQ!fO,5@bOOQ!0Lf1G0P1G0PO%)[Q`O7+&jOOQ!0Lf7+&j7+&jO%)aQ?MtO,5:fO%[QlO7+&zO%)kQ?MtO,5:bO%)xQ?MtO,5:jO%*SQ?MtO,5:lO%*^QMhO'#IhO%*hQ`O,5@gOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%*pQ!jO,5<ZO!)PQlO,5<YOOQO-E<k-E<kOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%*{Q`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%+QQ!dO,59oOOOO-E<_-E<_OOQ!0Lh1G/X1G/XO%+XQ!0MxO7+'kOOQ!0Lh,5?],5?]O%+{QMhO1G2fP%,SQ`O'#IqPOQ!0Lh-E<o-E<oO%,pQMjO,5?`OOQ!0Lh-E<r-E<rO%-cQMjO,5?bOOQ!0Lh-E<t-E<tO%-mQ!dO1G2wO%-tQ!dO'#CrO%.[QMhO'#KRO$#jQlO'#JuOOQ!0Lh1G2_1G2_O%.cQ`O'#IpO%.wQ`O,5@uO%.wQ`O,5@uO%/PQ`O,5@uO%/[Q`O,5@uOOQO1G2a1G2aO%/jQMjO1G2`O!+xQMhO1G2`O%/zQ(CWO'#IrO%0XQ`O,5@vO!&oQMhO,5@vO%0aQ!dO,5@vOOQ!0Lh1G2d1G2dO%2qQ!fO'#CiO%2{Q`O,5=POOQ!0Lb,5<},5<}O%3TQpO,5<}OOQ!0Lb,5=O,5=OOClQ`O,5<}O%3`QpO,5<}OOQ!0Lb,5=R,5=RO$){Q`O,5=VOOQO,5?_,5?_OOQO-E<q-E<qOOQ!0Lp1G2h1G2hO##tQpO,5<}O$#jQlO,5=PO%3nQ`O,5=OO%3yQpO,5=OO!+xQMhO'#ItO%4sQMjO1G2sO!+xQMhO'#IvO%5fQMjO1G2uO%5pQMjO1G5pO%5zQMjO1G5pOOQO,5?d,5?dOOQO-E<v-E<vOOQO1G.{1G.{O!9xQpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%6XQ`O1G2ZO!+xQMhO1G2bO!+xQMhO1G5pO!+xQMhO1G5pO%6^Q!0MxO7+'mOOQ!0Lf7+'m7+'mO!$lQlO7+'mO%7QQ`O,5;`OOQ!0Lb,5?f,5?fOOQ!0Lb-E<x-E<xO%7VQ!dO'#K]O#'oQ`O7+(eO4UQ!fO7+(eO$CXQ`O7+(eO%7aQ!0MvO'#CiO%7tQ!0MvO,5=SO%8fQ`O,5=SO%8nQ`O,5=SOOQ!0Lb1G5n1G5nOOQ[7+$a7+$aO!BfQ!0LrO7+$aO!BqQpO7+$aO!$lQlO7+&aO%8sQ`O'#JPO%9[Q`O,5AOOOQO1G3g1G3gO9gQ`O,5AOO%9[Q`O,5AOO%9dQ`O,5AOOOQO,5?l,5?lOOQO-E=O-E=OOOQ!0Lf7+'T7+'TO%9iQ`O7+)QO9qQ!0LrO7+)QO9gQ`O7+)QO@oQ`O7+)QOOQ[7+(p7+(pO%9nQ!0MvO7+(mO!&oQMhO7+(mO!DrQ`O7+(nOOQ[7+(n7+(nO!&oQMhO7+(nO%9xQ`O'#KaO%:TQ`O,5=lOOQO,5?h,5?hOOQO-E<z-E<zOOQ[7+(s7+(sO%;gQpO'#HZOOQ[1G3`1G3`O!&oQMhO1G3`O%[QlO1G3`O%;nQ`O1G3`O%;yQMhO1G3`O9qQ!0LrO1G3bO$$VQ`O1G3bO9[Q`O1G3bO!BqQpO1G3bO!ByQMhO1G3bO%<XQ`O'#JOO%<mQ`O,5@|O%<uQpO,5@|OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@oQ`O7+$VO9qQ!0LrO7+$VO%=QQ`O7+$VO%[QlO1G6kO%[QlO1G6lO%=VQ!0LrO1G6kO%=aQlO1G3jO%=hQ`O1G3jO%=mQlO1G3jOOQ[7+)S7+)SO9qQ!0LrO7+)^O`QlO7+)`OOQ['#Kg'#KgOOQ['#JR'#JRO%=tQlO,5>_OOQ[,5>_,5>_O%[QlO'#HtO%>RQ`O'#HvOOQ[,5>e,5>eO9aQ`O,5>eOOQ[,5>g,5>gOOQ[7+)i7+)iOOQ[7+)o7+)oOOQ[7+)s7+)sOOQ[7+)u7+)uO%>WQpO1G5{O%>rQ?MtO1G0zO%>|Q`O1G0zOOQO1G/s1G/sO%?XQ?MtO1G/sO>}Q`O1G/sO!)PQlO'#DmOOQO,5?O,5?OOOQO-E<b-E<bOOQO,5?U,5?UOOQO-E<h-E<hO!BqQpO1G/sOOQO-E<d-E<dOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#'oQ`O7+%uOOQ!0Lf7+&`7+&`O>}Q`O7+&`O!BqQpO7+&`OOQO7+%x7+%xO$@_Q!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%?cQ!0LrO7+&XO!BfQ!0LrO7+%xO!BqQpO7+%xO%?nQ!0LrO7+&XO%?|Q!0MxO7++qO%[QlO7++qO%@^Q`O7++pO%@^Q`O7++pOOQO1G4r1G4rO9aQ`O1G4rO%@fQ`O1G4rOOQS7+%}7+%}O#'oQ`O<<LPO4UQ!fO<<LPO%@tQ`O<<LPOOQ[<<LP<<LPO!&oQMhO<<LPO%[QlO<<LPO%@|Q`O<<LPO%AXQ!0MzO,5?`O%CdQ!0MzO,5?bO%EoQ!0MzO1G2`O%HQQ!0MzO1G2sO%J]Q!0MzO1G2uO%LhQ!fO,5?PO%[QlO,5?POOQO-E<c-E<cO%LrQ`O1G5|OOQ!0Lf<<JU<<JUO%LzQ?MtO1G0uO& RQ?MtO1G1PO& YQ?MtO1G1PO&#ZQ?MtO1G1PO&#bQ?MtO1G1PO&%cQ?MtO1G1PO&'dQ?MtO1G1PO&'kQ?MtO1G1PO&'rQ?MtO1G1PO&)sQ?MtO1G1PO&)zQ?MtO1G1PO&*RQ!0MxO<<JfO&+yQ?MtO1G1PO&,vQ?MvO1G1PO&-yQ?MvO'#JkO&0PQ?MtO1G1cO&0^Q?MtO1G0UO&0hQMjO,5?SOOQO-E<f-E<fO!)PQlO'#FqOOQO'#KY'#KYOOQO1G1u1G1uO&0rQ`O1G1tO&0wQ?MtO,5?ZOOOW7+'h7+'hOOOO1G/Z1G/ZO&1RQ!dO1G4wOOQ!0Lh7+(Q7+(QP!&oQMhO,5?]O!+xQMhO7+(cO&1YQ`O,5?[O9aQ`O,5?[OOQO-E<n-E<nO&1hQ`O1G6aO&1hQ`O1G6aO&1pQ`O1G6aO&1{QMjO7+'zO&2]Q!dO,5?^O&2gQ`O,5?^O!&oQMhO,5?^OOQO-E<p-E<pO&2lQ!dO1G6bO&2vQ`O1G6bO&3OQ`O1G2kO!&oQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%3TQpO1G2iO!BqQpO1G2iOClQ`O1G2iOOQ!0Lb1G2q1G2qO&3TQpO1G2iO&3cQ`O1G2kO$){Q`O1G2jOClQ`O1G2jO$#jQlO1G2kO&3kQ`O1G2jO&4_QMjO,5?`OOQ!0Lh-E<s-E<sO&5QQMjO,5?bOOQ!0Lh-E<u-E<uO!+xQMhO7++[OOQ!0Lh1G/c1G/cO&5[Q`O1G/cOOQ!0Lh7+'u7+'uO&5aQMjO7+'|O&5qQMjO7++[O&5{QMjO7++[O&6YQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&6|Q`O1G0zO!&oQMhO'#IyO&7RQ`O,5@wO&9TQ!fO<<LPO!&oQMhO1G2nO&9[Q!0LrO1G2nOOQ[<<G{<<G{O!BfQ!0LrO<<G{O&9mQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?k,5?kO&:aQ`O,5?kO&:fQ`O,5?kOOQO-E<}-E<}O&:tQ`O1G6jO&:tQ`O1G6jO9gQ`O1G6jO@oQ`O<<LlOOQ[<<Ll<<LlO&:|Q`O<<LlO9qQ!0LrO<<LlOOQ[<<LX<<LXO%9nQ!0MvO<<LXOOQ[<<LY<<LYO!DrQ`O<<LYO&;RQpO'#I{O&;^Q`O,5@{O!)PQlO,5@{OOQ[1G3W1G3WOOQO'#I}'#I}O9qQ!0LrO'#I}O&;fQpO,5=uOOQ[,5=u,5=uO&;mQpO'#EgO&;tQpO'#GeO&;yQ`O7+(zO&<OQ`O7+(zOOQ[7+(z7+(zO!&oQMhO7+(zO%[QlO7+(zO&<WQ`O7+(zOOQ[7+(|7+(|O9qQ!0LrO7+(|O$$VQ`O7+(|O9[Q`O7+(|O!BqQpO7+(|O&<cQ`O,5?jOOQO-E<|-E<|OOQO'#H^'#H^O&<nQ`O1G6hO9qQ!0LrO<<GqOOQ[<<Gq<<GqO@oQ`O<<GqO&<vQ`O7+,VO&<{Q`O7+,WO%[QlO7+,VO%[QlO7+,WOOQ[7+)U7+)UO&=QQ`O7+)UO&=VQlO7+)UO&=^Q`O7+)UOOQ[<<Lx<<LxOOQ[<<Lz<<LzOOQ[-E=P-E=POOQ[1G3y1G3yO&=cQ`O,5>`OOQ[,5>b,5>bO&=hQ`O1G4PO9aQ`O7+&fO!)PQlO7+&fOOQO7+%_7+%_O&=mQ?MtO1G6YO>}Q`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO>}Q`O<<IzOOQO<<Is<<IsO$@_Q!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!BfQ!0LrO<<IdO&=wQ!0LrO<<IsO&>SQ!0MxO<= ]O&>dQ`O<= [OOQO7+*^7+*^O9aQ`O7+*^OOQ[ANAkANAkO&>lQ!fOANAkO!&oQMhOANAkO#'oQ`OANAkO4UQ!fOANAkO&>sQ`OANAkO%[QlOANAkO&>{Q!0MzO7+'zO&A^Q!0MzO,5?`O&CiQ!0MzO,5?bO&EtQ!0MzO7+'|O&HVQ!fO1G4kO&HaQ?MtO7+&aO&JeQ?MvO,5=XO&LlQ?MvO,5=ZO&L|Q?MvO,5=XO&M^Q?MvO,5=ZO&MnQ?MvO,59uO' tQ?MvO,5<kO'#wQ?MvO,5<mO'&]Q?MvO,5<{O'(RQ?MtO7+'kO'(`Q?MtO7+'mO'(mQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*c7+*cO'(rQMjO<<K}OOQO1G4v1G4vO'(yQ`O1G4vO')UQ`O1G4vO')dQ`O7++{O')dQ`O7++{O!&oQMhO1G4xO')lQ!dO1G4xO')vQ`O7++|O'*OQ`O7+(VO'*ZQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!BqQpO7+(TOClQ`O7+(TO'*eQ`O7+(VO!&oQMhO7+(VO$){Q`O7+(UO'*jQ`O7+(VOClQ`O7+(UO'*rQMjO<<NvOOQ!0Lh7+$}7+$}O!+xQMhO<<NvO'*|Q!dO,5?eOOQO-E<w-E<wO'+WQ!0MvO7+(YO!&oQMhO7+(YOOQ[AN=gAN=gO9gQ`O1G5VOOQO1G5V1G5VO'+hQ`O1G5VO'+mQ`O7+,UO'+mQ`O7+,UO9qQ!0LrOANBWO@oQ`OANBWOOQ[ANBWANBWOOQ[ANAsANAsOOQ[ANAtANAtO'+uQ`O,5?gOOQO-E<y-E<yO',QQ?MtO1G6gOOQO,5?i,5?iOOQO-E<{-E<{OOQ[1G3a1G3aO',[Q`O,5=POOQ[<<Lf<<LfO!&oQMhO<<LfO&;yQ`O<<LfO',aQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9qQ!0LrO<<LhO$$VQ`O<<LhO9[Q`O<<LhO',iQpO1G5UO',tQ`O7+,SOOQ[AN=]AN=]O9qQ!0LrOAN=]OOQ[<= q<= qOOQ[<= r<= rO',|Q`O<= qO'-RQ`O<= rOOQ[<<Lp<<LpO'-WQ`O<<LpO'-]QlO<<LpOOQ[1G3z1G3zO>}Q`O7+)kO'-dQ`O<<JQO'-oQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$@_Q!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<Mx<<MxOOQ[G27VG27VO!&oQMhOG27VO#'oQ`OG27VO'-yQ!fOG27VO4UQ!fOG27VO'.QQ`OG27VO'.YQ?MtO<<JfO'.gQ?MvO1G2`O'0]Q?MvO,5?`O'2`Q?MvO,5?bO'4cQ?MvO1G2sO'6fQ?MvO1G2uO'8iQ?MtO<<KXO'8vQ?MtO<<I{OOQO1G1w1G1wO!+xQMhOANAiOOQO7+*b7+*bO'9TQ`O7+*bO'9`Q`O<= gO'9hQ!dO7+*dOOQ!0Lb<<Kq<<KqO$){Q`O<<KqOClQ`O<<KqO'9rQ`O<<KqO!&oQMhO<<KqOOQ!0Lb<<Ko<<KoO!BqQpO<<KoO'9}Q!dO<<KqOOQ!0Lb<<Kp<<KpO':XQ`O<<KqO!&oQMhO<<KqO$){Q`O<<KpO':^QMjOANDbO':hQ!0MvO<<KtOOQO7+*q7+*qO9gQ`O7+*qO':xQ`O<= pOOQ[G27rG27rO9qQ!0LrOG27rO!)PQlO1G5RO';QQ`O7+,RO';YQ`O1G2kO&;yQ`OANBQOOQ[ANBQANBQO!&oQMhOANBQO';_Q`OANBQOOQ[ANBSANBSO9qQ!0LrOANBSO$$VQ`OANBSOOQO'#H_'#H_OOQO7+*p7+*pOOQ[G22wG22wOOQ[ANE]ANE]OOQ[ANE^ANE^OOQ[ANB[ANB[O';gQ`OANB[OOQ[<<MV<<MVO!)PQlOAN?lOOQOG24yG24yO$@_Q!0MxOG24yO#'oQ`OLD,qOOQ[LD,qLD,qO!&oQMhOLD,qO';lQ!fOLD,qO';sQ?MvO7+'zO'=iQ?MvO,5?`O'?lQ?MvO,5?bO'AoQ?MvO7+'|O'CeQMjOG27TOOQO<<M|<<M|OOQ!0LbANA]ANA]O$){Q`OANA]OClQ`OANA]O'CuQ!dOANA]OOQ!0LbANAZANAZO'C|Q`OANA]O!&oQMhOANA]O'DXQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N]<<N]OOQ[LD-^LD-^O'DcQ?MtO7+*mOOQO'#Gf'#GfOOQ[G27lG27lO&;yQ`OG27lO!&oQMhOG27lOOQ[G27nG27nO9qQ!0LrOG27nOOQ[G27vG27vO'DmQ?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#'oQ`O!$(!]O!&oQMhO!$(!]O'DwQ!0MzOG27TOOQ!0LbG26wG26wO$){Q`OG26wO'GYQ`OG26wOClQ`OG26wO'GeQ!dOG26wO!&oQMhOG26wOOQ[LD-WLD-WO&;yQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#'oQ`O!)9EwOOQ!0LbLD,cLD,cO$){Q`OLD,cOClQ`OLD,cO'GlQ`OLD,cO'GwQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'HOQ?MvOG27TOOQ!0Lb!$( }!$( }O$){Q`O!$( }OClQ`O!$( }O'ItQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$){Q`O!)9EiOClQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$){Q`O!.K;TOOQ!0Lb!4/0o!4/0oO!)PQlO'#DzO1PQ`O'#EXO'JPQ!fO'#JqO'JWQ!L^O'#DvO'J_QlO'#EOO'JfQ!fO'#CiO'L|Q!fO'#CiO!)PQlO'#EQO'M^QlO,5;ZO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO,5;eO!)PQlO'#IoO( aQ`O,5<iO!)PQlO,5;eO( iQMhO,5;eO(#SQMhO,5;eO!)PQlO,5;wO!&oQMhO'#GmO( iQMhO'#GmO!&oQMhO'#GoO( iQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&oQMhO'#GPO( iQMhO'#GPO!&oQMhO'#GRO( iQMhO'#GRO!&oQMhO'#GaO( iQMhO'#GaO!)PQlO,5:jO(#ZQpO'#D_O(#eQpO'#JuO!)PQlO,5@nO'M^QlO1G0uO(#oQ?MtO'#CiO!)PQlO1G2PO!&oQMhO'#ItO( iQMhO'#ItO!&oQMhO'#IvO( iQMhO'#IvO(#yQ!dO'#CrO!&oQMhO,5<tO( iQMhO,5<tO'M^QlO1G2RO!)PQlO7+&zO!&oQMhO1G2`O( iQMhO1G2`O!&oQMhO'#ItO( iQMhO'#ItO!&oQMhO'#IvO( iQMhO'#IvO!&oQMhO1G2bO( iQMhO1G2bO'M^QlO7+'mO'M^QlO7+&aO!&oQMhOANAiO( iQMhOANAiO($^Q`O'#EoO($cQ`O'#EoO($kQ`O'#F]O($pQ`O'#EyO($uQ`O'#KSO(%QQ`O'#KQO(%]Q`O,5;ZO(%bQMjO,5<eO(%iQ`O'#GYO(%nQ`O'#GYO(%sQ`O,5<gO(%{Q`O,5;ZO(&TQ?MtO1G1`O(&[Q`O,5<tO(&aQ`O,5<tO(&fQ`O,5<vO(&kQ`O,5<vO(&pQ`O1G2RO(&uQ`O1G0uO(&zQMjO<<K}O('RQMjO<<K}O7eQMhO'#F|O9[Q`O'#F{OAjQ`O'#EnO!)PQlO,5;tO!3dQ`O'#GYO!3dQ`O'#GYO!3dQ`O'#G[O!3dQ`O'#G[O!+xQMhO7+(cO!+xQMhO7+(cO%-mQ!dO1G2wO%-mQ!dO1G2wO!&oQMhO,5=]O!&oQMhO,5=]",stateData:"((X~O'{OS'|OSTOS'}RQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&V!WO&]!XO&_!YO&a!ZO&c![O&f!]O&l!^O&r!_O&t!`O&v!aO&x!bO&z!cO(SSO(UTO(XUO(`VO(n[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(S!dO(UTO(XUO(`VO(n[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|;wO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(T!lO(UTO(XUO(d!mO(n!sO~O'}!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'y]X(`]X(q]X(x]X(y]X~O!g%RX~P(qO_!}O(U#PO(V!}O(W#PO~O_#QO(W#PO(X#PO(Y#QO~Ox#SO!U#TO(a#TO(b#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(S;{O(UTO(XUO(`VO(n[O~O![#ZO!]#WO!Y(gP!Y(uP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(UTO(XUO(`VO(n[O~Op#mO![#iO!|]O#i#lO#j#iO(S;|O!k(rP~P.iO!l#oO(S#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(`VO(q$YO(x#|O(y#}O~Oa(eX'y(eX'v(eX!k(eX!Y(eX!_(eX%i(eX!g(eX~P1qO#S$dO#`$eO$Q$eOP(fXR(fX[(fXj(fXr(fX!Q(fX!S(fX!](fX!l(fX!p(fX#R(fX#n(fX#o(fX#p(fX#q(fX#r(fX#s(fX#t(fX#u(fX#v(fX#x(fX#z(fX#{(fX(`(fX(q(fX(x(fX(y(fX!_(fX%i(fX~Oa(fX'y(fX'v(fX!Y(fX!k(fXv(fX!g(fX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%cOk%cOl%cOp%WOr%XOs$tOt$tOz%YO|%ZO!O%[O!S${O!_$|O!i%aO!l$xO#j%bO$W%_O$t%]O$v%^O$y%`O(S$sO(UTO(XUO(`$uO(x$}O(y%POg(]P~O!l%dO~O!S%gO!_%hO(S%fO~O!g%lO~Oa%mO'y%mO~O!Q%qO~P%[O(T!lO~P%[O%n%uO~P%[Oh%VO!l%dO(S%fO(T!lO~Oe%|O!l%dO(S%fO~Oj$RO~O!Q&RO!_&OO!l&QO%j&UO(S%fO(T!lO(UTO(XUO`)VP~O!x#sO~O%s&WO!S)RX!_)RX(S)RX~O(S&XO~Ol!PO!u&^O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&cOe&bO!x&`O%h&aO%{&_O~P<VOd&fOeyOl!PO!_&eO!u&^O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&iO#`&lO%j&gO(T!lO~P=[O!l&mO!u&qO~O!l#oO~O!_XO~Oa%mO'w&yO'y%mO~Oa%mO'w&|O'y%mO~Oa%mO'w'OO'y%mO~O'v]X!Y]Xv]X!k]X&Z]X!_]X%i]X!g]X~P(qO!b']O!c'UO!d'UO(T!lO(UTO(XUO~Os'SO!S'RO!['VO(d'QO!^(hP!^(wP~P@cOn'`O!_'^O(S%fO~Oe'eO!l%dO(S%fO~O!Q&RO!l&QO~Os!nO!S!oO!|;wO#T!pO#U!pO#W!pO#X!pO(T!lO(UTO(XUO(d!mO(n!sO~O!b'kO!c'jO!d'jO#V!pO#['lO#]'lO~PA}Oa%mOh%VO!g#vO!l%dO'y%mO(q'nO~O!p'rO#`'pO~PC]Os!nO!S!oO(UTO(XUO(d!mO(n!sO~O!_XOs(lX!S(lX!b(lX!c(lX!d(lX!|(lX#T(lX#U(lX#V(lX#W(lX#X(lX#[(lX#](lX(T(lX(U(lX(X(lX(d(lX(n(lX~O!c'jO!d'jO(T!lO~PC{O(O'vO(P'vO(Q'xO~O_!}O(U'zO(V!}O(W'zO~O_#QO(W'zO(X'zO(Y#QO~Ov'|O~P%[Ox#SO!U#TO(a#TO(b(PO~O![(RO!Y'VX!Y']X!]'VX!]']X~P+}O!](TO!Y(gX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](TO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(`VO(q$YO(x#|O(y#}O~O!Y(gX~PGvO!Y(YO~O!Y(tX!](tX!g(tX!k(tX(q(tX~O#`(tX#k#dX!^(tX~PIyO#`(ZO!Y(vX!](vX~O!]([O!Y(uX~O!Y(_O~O#`$eO~PIyO!^(`O~P`OR#zO!Q#yO!S#{O!l#xO(`VOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(q!na(x!na(y!na~Oa!na'y!na'v!na!Y!na!k!nav!na!_!na%i!na!g!na~PKaO!k(aO~O!g#vO#`(bO(q'nO!](sXa(sX'y(sX~O!k(sX~PM|O!S%gO!_%hO!|]O#i(gO#j(fO(S%fO~O!](hO!k(rX~O!k(jO~O!S%gO!_%hO#j(fO(S%fO~OP(fXR(fX[(fXj(fXr(fX!Q(fX!S(fX!](fX!l(fX!p(fX#R(fX#n(fX#o(fX#p(fX#q(fX#r(fX#s(fX#t(fX#u(fX#v(fX#x(fX#z(fX#{(fX(`(fX(q(fX(x(fX(y(fX~O!g#vO!k(fX~P! jOR(lO!Q(kO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(S!{a~P!#kO!x(pO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(S!dO(UTO(XUO(`VO(n[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<eO!S${O!_$|O!i=vO!l$xO#j<kO$W%_O$t<gO$v<iO$y%`O(S(tO(UTO(XUO(`$uO(x$}O(y%PO~O#k(vO~O![(xO!k(jP~P%[O(d(zO(n[O~O!S(|O!l#xO(d(zO(n[O~OP;vOQ;vOSfOd=rOe!iOpkOr;vOskOtkOzkO|;vO!O;vO!SWO!WkO!XkO!_!eO!i;yO!lZO!o;vO!p;vO!q;vO!s;zO!u;}O!x!hO$W!kO$n=pO(S)ZO(UTO(XUO(`VO(n[O~O!]$_Oa$qa'y$qa'v$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)bO~P!&oOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%[O!S${O!_$|O!i%aO!l$xO#j%bO$W%_O$t%]O$v%^O$y%`O(S(tO(UTO(XUO(`$uO(x$}O(y%PO~Og(oP~P!+xO!Q)gO!g)fO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)fO!_(zX$Z(zX$](zX$_(zX$f(zX~O!Q)gO~P!.RO!Q)gO!_(zX$Z(zX$](zX$_(zX$f(zX~O!_)iO$Z)mO$])hO$_)hO$f)nO~O![)qO~P!)PO$]$hO$_$gO$f)uO~On$zX!Q$zX#S$zX'x$zX(x$zX(y$zX~OgmXg$zXnmX!]mX#`mX~P!/wOx)wO(a)xO(b)zO~On*TO!Q)|O'x)}O(x$}O(y%PO~Og){O~P!0{Og*UO~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<eO!S*WO!_*XO!i=vO!l$xO#j<kO$W%_O$t<gO$v<iO$y%`O(UTO(XUO(`$uO(x$}O(y%PO~O![*[O(S*VO!k(}P~P!1jO#k*^O~O!l*_O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<eO!S${O!_$|O!i=vO!l$xO#j<kO$W%_O$t<gO$v<iO$y%`O(S*aO(UTO(XUO(`$uO(x$}O(y%PO~O![*dO!Y)OP~P!3iOr*pOs!nO!S*fO!b*nO!c*hO!d*hO!l*_O#[*oO%`*jO(T!lO(UTO(XUO(d!mO~O!^*mO~P!5^O#S$dOn(_X!Q(_X'x(_X(x(_X(y(_X!](_X#`(_X~Og(_X$O(_X~P!6`On*uO#`*tOg(^X!](^X~O!]*vOg(]X~Oj%cOk%cOl%cO(S&XOg(]P~Os*yO~O!l+OO~O(S(tO~Op+TO!S%gO![#iO!_%hO!|]O#i#lO#j#iO(S%fO!k(rP~O!g#vO#k+UO~O!S%gO![+WO!]([O!_%hO(S%fO!Y(uP~Os'YO!S+YO![+XO(UTO(XUO(d(zO~O!^(wP~P!9iO!]+ZOa)SX'y)SX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(`VO(q$YO(x#|O(y#}O~Oa!ja!]!ja'y!ja'v!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:aOR#zO!Q#yO!S#{O!l#xO(`VOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(q!ra(x!ra(y!ra~Oa!ra'y!ra'v!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!<wOR#zO!Q#yO!S#{O!l#xO(`VOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(q!ta(x!ta(y!ta~Oa!ta'y!ta'v!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?_Oh%VOn+dO!_'^O%i+cO~O!g+fOa([X!_([X'y([X!]([X~Oa%mO!_XO'y%mO~Oh%VO!l%dO~Oh%VO!l%dO(S%fO~O!g#vO#k(vO~Ob+qO%j+rO(S+nO(UTO(XUO!^)WP~O!]+sO`)VX~O[+wO~O`+xO~O!_&OO(S%fO(T!lO`)VP~Oh%VO#`+}O~Oh%VOn,QO!_$|O~O!_,SO~O!Q,UO!_XO~O%n%uO~O!x,ZO~Oe,`O~Ob,aO(S#nO(UTO(XUO!^)UP~Oe%|O~O%j!QO(S&XO~P=[O[,fO`,eO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(UTO(XUO(`VO(n[O~O!_!eO!u!gO$W!kO(S!dO~P!F_O`,eOa%mO'y%mO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(S!dO(UTO(XUO(`VO(n[O~Oa,kOl!OO!uwO%l!OO%m!OO%n!OO~P!HwO!l&mO~O&],qO~O!_,sO~O&n,uO&p,vOP&kaQ&kaS&kaY&kaa&kad&kae&kal&kap&kar&kas&kat&kaz&ka|&ka!O&ka!S&ka!W&ka!X&ka!_&ka!i&ka!l&ka!o&ka!p&ka!q&ka!s&ka!u&ka!x&ka!|&ka$W&ka$n&ka%h&ka%j&ka%l&ka%m&ka%n&ka%q&ka%s&ka%v&ka%w&ka%y&ka&V&ka&]&ka&_&ka&a&ka&c&ka&f&ka&l&ka&r&ka&t&ka&v&ka&x&ka&z&ka'v&ka(S&ka(U&ka(X&ka(`&ka(n&ka!^&ka&d&kab&ka&i&ka~O(S,{O~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P# }O!g-QO#`-POh(iX!]#hX!^#hX!g(iX!l(iX~O!](iX!^(iX~P#!pOh%VO!g-SO!l%dO!]!aX!^!aX~Os!nO!S!oO(UTO(XUO(d!mO~OP;vOQ;vOSfOd=rOe!iOpkOr;vOskOtkOzkO|;vO!O;vO!SWO!WkO!XkO!_!eO!i;yO!lZO!o;vO!p;vO!q;vO!s;zO!u;}O!x!hO$W!kO$n=pO(UTO(XUO(`VO(n[O~O(S<rO~P#$VO!]-WO!^(hX~O!^-YO~O!g-QO#`-PO!]#hX!^#hX~O!]-ZO!^(wX~O!^-]O~O!c-^O!d-^O(T!lO~P##tO!^-aO~P'_On-dO!_'^O~O!Y-iO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(T!{a(U!{a(X!{a(d!{a(n!{a~P!#kO!p-nO#`-lO~PC]O!c-pO!d-pO(T!lO~PC{Oa%mO#`-lO'y%mO~Oa%mO!g#vO#`-lO'y%mO~Oa%mO!g#vO!p-nO#`-lO'y%mO(q'nO~O(O'vO(P'vO(Q-uO~Ov-vO~O!Y'Va!]'Va~P!:aO![-zO!Y'VX!]'VX~P%[O!](TO!Y(ga~O!Y(ga~PGvO!]([O!Y(ua~O!S%gO![.OO!_%hO(S%fO!Y']X!]']X~O#`.QO!](sa!k(saa(sa'y(sa~O!g#vO~P#,]O!](hO!k(ra~O!S%gO!_%hO#j.UO(S%fO~Op.ZO!S%gO![.WO!_%hO!|]O#i.YO#j.WO(S%fO!]'`X!k'`X~OR._O!l#xO~Oh%VOn.bO!_'^O%i.aO~Oa#ci!]#ci'y#ci'v#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:aOn=|O!Q)|O'x)}O(x$}O(y%PO~O#k#_aa#_a#`#_a'y#_a!]#_a!k#_a!_#_a!Y#_a~P#/XO#k(_XP(_XR(_X[(_Xa(_Xj(_Xr(_X!S(_X!l(_X!p(_X#R(_X#n(_X#o(_X#p(_X#q(_X#r(_X#s(_X#t(_X#u(_X#v(_X#x(_X#z(_X#{(_X'y(_X(`(_X(q(_X!k(_X!Y(_X'v(_Xv(_X!_(_X%i(_X!g(_X~P!6`O!].oO!k(jX~P!:aO!k.rO~O!Y.tO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(`VO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'y#mi(q#mi(x#mi(y#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#2wO#n$OO~P#2wOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(`VO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'y#mi(q#mi(x#mi(y#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#5fO#r$QO~P#5fOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(`VOa#mi!]#mi#x#mi#z#mi#{#mi'y#mi(q#mi(x#mi(y#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8TOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(`VO(y#}Oa#mi!]#mi#z#mi#{#mi'y#mi(q#mi(x#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#:kO#x#mi~P#:kO#v$SO~P#8TOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(`VO(x#|O(y#}Oa#mi!]#mi#{#mi'y#mi(q#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#=aO#z$WO~P#=aOP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(`]X(q]X(x]X(y]X!]]X!^]X~O$O]X~P#@OOP$[OR#zO[<_Oj<SOr<]O!Q#yO!S#{O!l#xO!p$[O#R<SO#n<PO#o<QO#p<QO#q<QO#r<RO#s<SO#t<SO#u<^O#v<TO#x<VO#z<XO#{<YO(`VO(q$YO(x#|O(y#}O~O$O.vO~P#B]O#S$dO#`<`O$Q<`O$O(fX!^(fX~P! jOa'ca!]'ca'y'ca'v'ca!k'ca!Y'cav'ca!_'ca%i'ca!g'ca~P!:aO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'y#mi(q#mi'v#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(`VO(x#mi(y#mi~P#E_On=|O!Q)|O'x)}O(x$}O(y%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(`#mi~P#E_O!].zOg(oX~P!0{Og.|O~Oa$Pi!]$Pi'y$Pi'v$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:aO$].}O$_.}O~O$]/OO$_/OO~O!g)fO#`/PO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/QO~O!_)iO$Z/SO$])hO$_)hO$f/TO~O!]<ZO!^(eX~P#B]O!^/UO~O!g)fO$f(zX~O$f/WO~Ov/XO~P!&oOx)wO(a)xO(b/[O~O!S/_O~O(x$}On%aa!Q%aa'x%aa(y%aa!]%aa#`%aa~Og%aa$O%aa~P#LaO(y%POn%ca!Q%ca'x%ca(x%ca!]%ca#`%ca~Og%ca$O%ca~P#MSO!]fX!gfX!kfX!k$zX(qfX~P!/wO![/hO!]([O(S/gO!Y(uP!Y)OP~P!1jOr*pO!b*nO!c*hO!d*hO!l*_O#[*oO%`*jO(T!lO(UTO(XUO~Os<oO!S/iO![+XO!^*mO(d<nO!^(wP~P#NmO!k/jO~P#/XO!]/kO!g#vO(q'nO!k(}X~O!k/pO~O!S%gO![*[O!_%hO(S%fO!k(}P~O#k/rO~O!Y$zX!]$zX!g%RX~P!/wO!]/sO!Y)OX~P#/XO!g/uO~O!Y/wO~OpkO(S/xO~P.iOh%VOr/}O!g#vO!l%dO(q'nO~O!g+fO~Oa%mO!]0RO'y%mO~O!^0TO~P!5^O!c0UO!d0UO(T!lO~P##tOs!nO!S0VO(UTO(XUO(d!mO~O#[0XO~Og%aa!]%aa#`%aa$O%aa~P!0{Og%ca!]%ca#`%ca$O%ca~P!0{Oj%cOk%cOl%cO(S&XOg'lX!]'lX~O!]*vOg(]a~Og0bO~OR0cO!Q0cO!S0dO#S$dOn}a'x}a(x}a(y}a!]}a#`}a~Og}a$O}a~P$&vO!Q)|O'x)}On$sa(x$sa(y$sa!]$sa#`$sa~Og$sa$O$sa~P$'rO!Q)|O'x)}On$ua(x$ua(y$ua!]$ua#`$ua~Og$ua$O$ua~P$(eO#k0gO~Og%Ta!]%Ta#`%Ta$O%Ta~P!0{On0iO#`0hOg(^a!](^a~O!g#vO~O#k0lO~O!]+ZOa)Sa'y)Sa~OR#zO!Q#yO!S#{O!l#xO(`VOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(q!ri(x!ri(y!ri~Oa!ri'y!ri'v!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$*bOh%VOr%XOs$tOt$tOz%YO|%ZO!O<eO!S${O!_$|O!i=vO!l$xO#j<kO$W%_O$t<gO$v<iO$y%`O(UTO(XUO(`$uO(x$}O(y%PO~Op0uO%]0vO(S0tO~P$,xO!g+fOa([a!_([a'y([a!]([a~O#k0|O~O[]X!]fX!^fX~O!]0}O!^)WX~O!^1PO~O[1QO~Ob1SO(S+nO(UTO(XUO~O!_&OO(S%fO`'tX!]'tX~O!]+sO`)Va~O!k1VO~P!:aO[1YO~O`1ZO~O#`1^O~On1aO!_$|O~O(d(zO!^)TP~Oh%VOn1jO!_1gO%i1iO~O[1tO!]1rO!^)UX~O!^1uO~O`1wOa%mO'y%mO~O(S#nO(UTO(XUO~O#S$dO#`$eO$Q$eOP(fXR(fX[(fXr(fX!Q(fX!S(fX!](fX!l(fX!p(fX#R(fX#n(fX#o(fX#p(fX#q(fX#r(fX#s(fX#t(fX#u(fX#v(fX#x(fX#z(fX#{(fX(`(fX(q(fX(x(fX(y(fX~Oj1zO&Z1{Oa(fX~P$2cOj1zO#`$eO&Z1{O~Oa1}O~P%[Oa2PO~O&d2SOP&biQ&biS&biY&bia&bid&bie&bil&bip&bir&bis&bit&biz&bi|&bi!O&bi!S&bi!W&bi!X&bi!_&bi!i&bi!l&bi!o&bi!p&bi!q&bi!s&bi!u&bi!x&bi!|&bi$W&bi$n&bi%h&bi%j&bi%l&bi%m&bi%n&bi%q&bi%s&bi%v&bi%w&bi%y&bi&V&bi&]&bi&_&bi&a&bi&c&bi&f&bi&l&bi&r&bi&t&bi&v&bi&x&bi&z&bi'v&bi(S&bi(U&bi(X&bi(`&bi(n&bi!^&bib&bi&i&bi~Ob2YO!^2WO&i2XO~P`O!_XO!l2[O~O&p,vOP&kiQ&kiS&kiY&kia&kid&kie&kil&kip&kir&kis&kit&kiz&ki|&ki!O&ki!S&ki!W&ki!X&ki!_&ki!i&ki!l&ki!o&ki!p&ki!q&ki!s&ki!u&ki!x&ki!|&ki$W&ki$n&ki%h&ki%j&ki%l&ki%m&ki%n&ki%q&ki%s&ki%v&ki%w&ki%y&ki&V&ki&]&ki&_&ki&a&ki&c&ki&f&ki&l&ki&r&ki&t&ki&v&ki&x&ki&z&ki'v&ki(S&ki(U&ki(X&ki(`&ki(n&ki!^&ki&d&kib&ki&i&ki~O!Y2bO~O!]!aa!^!aa~P#B]Os!nO!S!oO![2hO(d!mO!]'WX!^'WX~P@cO!]-WO!^(ha~O!]'^X!^'^X~P!9iO!]-ZO!^(wa~O!^2oO~P'_Oa%mO#`2xO'y%mO~Oa%mO!g#vO#`2xO'y%mO~Oa%mO!g#vO!p2|O#`2xO'y%mO(q'nO~Oa%mO'y%mO~P!:aO!]$_Ov$qa~O!Y'Vi!]'Vi~P!:aO!](TO!Y(gi~O!]([O!Y(ui~O!Y(vi!](vi~P!:aO!](si!k(sia(si'y(si~P!:aO#`3OO!](si!k(sia(si'y(si~O!](hO!k(ri~O!S%gO!_%hO!|]O#i3TO#j3SO(S%fO~O!S%gO!_%hO#j3SO(S%fO~On3[O!_'^O%i3ZO~Oh%VOn3[O!_'^O%i3ZO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'y%aa(`%aa(q%aa!k%aa!Y%aa'v%aav%aa!_%aa%i%aa!g%aa~P#LaO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'y%ca(`%ca(q%ca!k%ca!Y%ca'v%cav%ca!_%ca%i%ca!g%ca~P#MSO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'y%aa(`%aa(q%aa!k%aa!Y%aa'v%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/XO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'y%ca(`%ca(q%ca!k%ca!Y%ca'v%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/XO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'y}a(`}a(q}a!k}a!Y}a'v}av}a!_}a%i}a!g}a~P$&vO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'y$sa(`$sa(q$sa!k$sa!Y$sa'v$sav$sa!_$sa%i$sa!g$sa~P$'rO#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'y$ua(`$ua(q$ua!k$ua!Y$ua'v$uav$ua!_$ua%i$ua!g$ua~P$(eO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'y%Ta(`%Ta(q%Ta!k%Ta!Y%Ta'v%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/XOa#cq!]#cq'y#cq'v#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:aO![3dO!]'XX!k'XX~P%[O!].oO!k(ja~O!].oO!k(ja~P!:aO!Y3gO~O$O!na!^!na~PKaO$O!ja!]!ja!^!ja~P#B]O$O!ra!^!ra~P!<wO$O!ta!^!ta~P!?_Og'[X!]'[X~P!+xO!].zOg(oa~OSfO!_3{O$d3|O~O!^4QO~Ov4RO~P#/XOa$mq!]$mq'y$mq'v$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:aO!Y4TO~P!&oO!S4UO~O!Q)|O'x)}O(y%POn'ha(x'ha!]'ha#`'ha~Og'ha$O'ha~P%,XO!Q)|O'x)}On'ja(x'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P%,zO(q$YO~P#/XO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!/wO(S<xO~P!1jO!S%gO![4XO!_%hO(S%fO!]'dX!k'dX~O!]/kO!k(}a~O!]/kO!g#vO!k(}a~O!]/kO!g#vO(q'nO!k(}a~Og$|i!]$|i#`$|i$O$|i~P!0{O![4aO!Y'fX!]'fX~P!3iO!]/sO!Y)Oa~O!]/sO!Y)Oa~P#/XOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(`]X(q]X(x]X(y]X~Oj%YX!g%YX~P%0kOj4fO!g#vO~Oh%VO!g#vO!l%dO~Oh%VOr4kO!l%dO(q'nO~Or4pO!g#vO(q'nO~Os!nO!S4qO(UTO(XUO(d!mO~O(x$}On%ai!Q%ai'x%ai(y%ai!]%ai#`%ai~Og%ai$O%ai~P%4[O(y%POn%ci!Q%ci'x%ci(x%ci!]%ci#`%ci~Og%ci$O%ci~P%4}Og(^i!](^i~P!0{O#`4wOg(^i!](^i~P!0{O!k4zO~Oa$oq!]$oq'y$oq'v$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:aO!Y5QO~O!]5RO!_)PX~P#/XOa$zX!_$zX%^]X'y$zX!]$zX~P!/wO%^5UOaoXnoX!QoX!_oX'xoX'yoX(xoX(yoX!]oX~Op5VO(S#nO~O%^5UO~Ob5]O%j5^O(S+nO(UTO(XUO!]'sX!^'sX~O!]0}O!^)Wa~O[5bO~O`5cO~Oa%mO'y%mO~P#/XO!]5kO#`5mO!^)TX~O!^5nO~Or5tOs!nO!S*fO!b!yO!c!vO!d!vO!|;wO#T!pO#U!pO#V!pO#W!pO#X!pO#[5sO#]!zO(T!lO(UTO(XUO(d!mO(n!sO~O!^5rO~P%:YOn5yO!_1gO%i5xO~Oh%VOn5yO!_1gO%i5xO~Ob6QO(S#nO(UTO(XUO!]'rX!^'rX~O!]1rO!^)Ua~O(UTO(XUO(d6SO~O`6WO~Oj6ZO&Z6[O~PM|O!k6]O~P%[Oa6_O~Oa6_O~P%[Ob2YO!^6dO&i2XO~P`O!g6fO~O!g6hOh(ii!](ii!^(ii!g(ii!l(iir(ii(q(ii~O!]#hi!^#hi~P#B]O#`6iO!]#hi!^#hi~O!]!ai!^!ai~P#B]Oa%mO#`6rO'y%mO~Oa%mO!g#vO#`6rO'y%mO~O!](sq!k(sqa(sq'y(sq~P!:aO!](hO!k(rq~O!S%gO!_%hO#j6yO(S%fO~O!_'^O%i6|O~On7QO!_'^O%i6|O~O#k'haP'haR'ha['haa'haj'har'ha!S'ha!l'ha!p'ha#R'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#t'ha#u'ha#v'ha#x'ha#z'ha#{'ha'y'ha(`'ha(q'ha!k'ha!Y'ha'v'hav'ha!_'ha%i'ha!g'ha~P%,XO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'y'ja(`'ja(q'ja!k'ja!Y'ja'v'jav'ja!_'ja%i'ja!g'ja~P%,zO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'y$|i(`$|i(q$|i!k$|i!Y$|i'v$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/XO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'y%ai(`%ai(q%ai!k%ai!Y%ai'v%aiv%ai!_%ai%i%ai!g%ai~P%4[O#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'y%ci(`%ci(q%ci!k%ci!Y%ci'v%civ%ci!_%ci%i%ci!g%ci~P%4}O!]'Xa!k'Xa~P!:aO!].oO!k(ji~O$O#ci!]#ci!^#ci~P#B]OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(`VO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(q#mi(x#mi(y#mi!]#mi!^#mi~O#n#mi~P%MXO#n<PO~P%MXOP$[OR#zOr<]O!Q#yO!S#{O!l#xO!p$[O#n<PO#o<QO#p<QO#q<QO(`VO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(q#mi(x#mi(y#mi!]#mi!^#mi~O#r#mi~P& aO#r<RO~P& aOP$[OR#zO[<_Oj<SOr<]O!Q#yO!S#{O!l#xO!p$[O#R<SO#n<PO#o<QO#p<QO#q<QO#r<RO#s<SO#t<SO#u<^O(`VO#x#mi#z#mi#{#mi$O#mi(q#mi(x#mi(y#mi!]#mi!^#mi~O#v#mi~P&#iOP$[OR#zO[<_Oj<SOr<]O!Q#yO!S#{O!l#xO!p$[O#R<SO#n<PO#o<QO#p<QO#q<QO#r<RO#s<SO#t<SO#u<^O#v<TO(`VO(y#}O#z#mi#{#mi$O#mi(q#mi(x#mi!]#mi!^#mi~O#x<VO~P&%jO#x#mi~P&%jO#v<TO~P&#iOP$[OR#zO[<_Oj<SOr<]O!Q#yO!S#{O!l#xO!p$[O#R<SO#n<PO#o<QO#p<QO#q<QO#r<RO#s<SO#t<SO#u<^O#v<TO#x<VO(`VO(x#|O(y#}O#{#mi$O#mi(q#mi!]#mi!^#mi~O#z#mi~P&'yO#z<XO~P&'yOa#|y!]#|y'y#|y'v#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:aO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(q#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<PO#o<QO#p<QO#q<QO(`VO(x#mi(y#mi~P&*uOn=}O!Q)|O'x)}O(x$}O(y%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(`#mi~P&*uO#S$dOP(_XR(_X[(_Xj(_Xn(_Xr(_X!Q(_X!S(_X!l(_X!p(_X#R(_X#n(_X#o(_X#p(_X#q(_X#r(_X#s(_X#t(_X#u(_X#v(_X#x(_X#z(_X#{(_X$O(_X'x(_X(`(_X(q(_X(x(_X(y(_X!](_X!^(_X~O$O$Pi!]$Pi!^$Pi~P#B]O$O!ri!^!ri~P$*bOg'[a!]'[a~P!0{O!^7dO~O!]'ca!^'ca~P#B]O!Y7eO~P#/XO!g#vO(q'nO!]'da!k'da~O!]/kO!k(}i~O!]/kO!g#vO!k(}i~Og$|q!]$|q#`$|q$O$|q~P!0{O!Y'fa!]'fa~P#/XO!g7lO~O!]/sO!Y)Oi~P#/XO!]/sO!Y)Oi~O!Y7oO~Oh%VOr7tO!l%dO(q'nO~Oj7vO!g#vO~Or7yO!g#vO(q'nO~O!Q)|O'x)}O(y%POn'ia(x'ia!]'ia#`'ia~Og'ia$O'ia~P&3vO!Q)|O'x)}On'ka(x'ka(y'ka!]'ka#`'ka~Og'ka$O'ka~P&4iO!Y7{O~Og%Oq!]%Oq#`%Oq$O%Oq~P!0{Og(^q!](^q~P!0{O#`7|Og(^q!](^q~P!0{Oa$oy!]$oy'y$oy'v$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:aO!g6hO~O!]5RO!_)Pa~O!_'^OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(`$Ta(q$Ta(x$Ta(y$Ta~O%i6|O~P&7ZO%^8QOa%[i!_%[i'y%[i!]%[i~Oa#cy!]#cy'y#cy'v#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:aO[8SO~Ob8UO(S+nO(UTO(XUO~O!]0}O!^)Wi~O`8YO~O(d(zO!]'oX!^'oX~O!]5kO!^)Ta~O!^8cO~P%:YO(n!sO~P$${O#[8dO~O!_1gO~O!_1gO%i8fO~On8iO!_1gO%i8fO~O[8nO!]'ra!^'ra~O!]1rO!^)Ui~O!k8rO~O!k8sO~O!k8vO~O!k8vO~P%[Oa8xO~O!g8yO~O!k8zO~O!](vi!^(vi~P#B]Oa%mO#`9SO'y%mO~O!](sy!k(sya(sy'y(sy~P!:aO!](hO!k(ry~O%i9VO~P&7ZO!_'^O%i9VO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'y$|q(`$|q(q$|q!k$|q!Y$|q'v$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/XO#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'y'ia(`'ia(q'ia!k'ia!Y'ia'v'iav'ia!_'ia%i'ia!g'ia~P&3vO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'y'ka(`'ka(q'ka!k'ka!Y'ka'v'kav'ka!_'ka%i'ka!g'ka~P&4iO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'y%Oq(`%Oq(q%Oq!k%Oq!Y%Oq'v%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/XO!]'Xi!k'Xi~P!:aO$O#cq!]#cq!^#cq~P#B]O(x$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(`%aa(q%aa!]%aa!^%aa~On%aa!Q%aa'x%aa(y%aa~P&HnO(y%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(`%ca(q%ca!]%ca!^%ca~On%ca!Q%ca'x%ca(x%ca~P&JuOn=}O!Q)|O'x)}O(y%PO~P&HnOn=}O!Q)|O'x)}O(x$}O~P&JuOR0cO!Q0cO!S0dO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'x}a(`}a(q}a(x}a(y}a!]}a!^}a~O!Q)|O'x)}OP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(`$sa(q$sa(x$sa(y$sa!]$sa!^$sa~O!Q)|O'x)}OP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(`$ua(q$ua(x$ua(y$ua!]$ua!^$ua~On=}O!Q)|O'x)}O(x$}O(y%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(`%Ta(q%Ta!]%Ta!^%Ta~P'%zO$O$mq!]$mq!^$mq~P#B]O$O$oq!]$oq!^$oq~P#B]O!^9dO~O$O9eO~P!0{O!g#vO!]'di!k'di~O!g#vO(q'nO!]'di!k'di~O!]/kO!k(}q~O!Y'fi!]'fi~P#/XO!]/sO!Y)Oq~Or9lO!g#vO(q'nO~O[9nO!Y9mO~P#/XO!Y9mO~Oj9tO!g#vO~Og(^y!](^y~P!0{O!]'ma!_'ma~P#/XOa%[q!_%[q'y%[q!]%[q~P#/XO[9yO~O!]0}O!^)Wq~O#`9}O!]'oa!^'oa~O!]5kO!^)Ti~P#B]O!S:PO~O!_1gO%i:SO~O(UTO(XUO(d:XO~O!]1rO!^)Uq~O!k:[O~O!k:]O~O!k:^O~O!k:^O~P%[O#`:aO!]#hy!^#hy~O!]#hy!^#hy~P#B]O%i:fO~P&7ZO!_'^O%i:fO~O$O#|y!]#|y!^#|y~P#B]OP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(`$|i(q$|i!]$|i!^$|i~P'%zO!Q)|O'x)}O(y%POP'haR'ha['haj'han'har'ha!S'ha!l'ha!p'ha#R'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#t'ha#u'ha#v'ha#x'ha#z'ha#{'ha$O'ha(`'ha(q'ha(x'ha!]'ha!^'ha~O!Q)|O'x)}OP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(`'ja(q'ja(x'ja(y'ja!]'ja!^'ja~O(x$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'x%ai(`%ai(q%ai(y%ai!]%ai!^%ai~O(y%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'x%ci(`%ci(q%ci(x%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#B]O$O#cy!]#cy!^#cy~P#B]O!g#vO!]'dq!k'dq~O!]/kO!k(}y~O!Y'fq!]'fq~P#/XOr:pO!g#vO(q'nO~O[:tO!Y:sO~P#/XO!Y:sO~Og(^!R!](^!R~P!0{Oa%[y!_%[y'y%[y!]%[y~P#/XO!]0}O!^)Wy~O!]5kO!^)Tq~O(S:zO~O!_1gO%i:}O~O!k;QO~O%i;VO~P&7ZOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(`$|q(q$|q!]$|q!^$|q~P'%zO!Q)|O'x)}O(y%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(`'ia(q'ia(x'ia!]'ia!^'ia~O!Q)|O'x)}OP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(`'ka(q'ka(x'ka(y'ka!]'ka!^'ka~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(`%Oq(q%Oq!]%Oq!^%Oq~P'%zOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!0{O!Y;ZO~P#/XOr;[O!g#vO(q'nO~O[;^O!Y;ZO~P#/XO!]'oq!^'oq~P#B]O!]#h!Z!^#h!Z~P#B]O#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'y%e!Z(`%e!Z(q%e!Z!k%e!Z!Y%e!Z'v%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/XOr;fO!g#vO(q'nO~O!Y;gO~P#/XOr;nO!g#vO(q'nO~O!Y;oO~P#/XOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(`%e!Z(q%e!Z!]%e!Z!^%e!Z~P'%zOr;rO!g#vO(q'nO~Ov(eX~P1qO!Q%qO~P!)PO(T!lO~P!)PO!YfX!]fX#`fX~P%0kOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(`]X(q]X(x]X(y]X~O!gfX!k]X!kfX(qfX~P'JsOP;vOQ;vOSfOd=rOe!iOpkOr;vOskOtkOzkO|;vO!O;vO!SWO!WkO!XkO!_XO!i;yO!lZO!o;vO!p;vO!q;vO!s;zO!u;}O!x!hO$W!kO$n=pO(S)ZO(UTO(XUO(`VO(n[O~O!]<ZO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<fO!S${O!_$|O!i=wO!l$xO#j<lO$W%_O$t<hO$v<jO$y%`O(S(tO(UTO(XUO(`$uO(x$}O(y%PO~Ol)bO~P( iOr!eX(q!eX~P# }Or(iX(q(iX~P#!pO!^]X!^fX~P'JsO!YfX!Y$zX!]fX!]$zX#`fX~P!/wO#k<OO~O!g#vO#k<OO~O#`<`O~Oj<SO~O#`<pO!](vX!^(vX~O#`<`O!](tX!^(tX~O#k<qO~Og<sO~P!0{O#k<yO~O#k<zO~O!g#vO#k<{O~O!g#vO#k<qO~O$O<|O~P#B]O#k<}O~O#k=OO~O#k=TO~O#k=UO~O#k=VO~O#k=WO~O$O=XO~P!0{O$O=YO~P!0{Ok#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~'}T#o!X'{(T#ps#n#qr!Q'|$]'|(S$_(d~",goto:"$8g)[PPPPPP)]PP)`P)qP+R/WPPPP6bPP6xPP<pPPP@dP@zP@zPPP@zPCSP@zP@zP@zPCWPC]PCzPHtPPPHxPPPPHxK{PPPLRLsPHxPHxPP! RHxPPPHxPHxP!#YHxP!&p!'u!(OP!(r!(v!(r!,TPPPPPPP!,t!'uPP!-U!.vP!2SHxHx!2X!5e!:R!:R!>QPPP!>YHxPPPPPPPPP!AiP!BvPPHx!DXPHxPHxHxHxHxHxPHx!EkP!HuP!K{P!LP!LZ!L_!L_P!HrP!Lc!LcP# iP# mHxPHx# s#$xCW@zP@zP@z@zP#&V@z@z#(i@z#+a@z#-m@z@z#.]#0q#0q#0v#1P#0q#1[PP#0qP@z#1t@z#5s@z@z6bPPP#9xPPP#:c#:cP#:cP#:y#:cPP#;PP#:vP#:v#;d#:v#<O#<U#<X)`#<[)`P#<c#<c#<cP)`P)`P)`P)`PP)`P#<i#<lP#<l)`P#<pP#<sP)`P)`P)`P)`P)`P)`)`PP#<y#=P#=[#=b#=h#=n#=t#>S#>Y#>d#>j#>t#>z#?[#?b#@S#@f#@l#@r#AQ#Ag#C[#Cj#Cq#E]#Ek#G]#Gk#Gq#Gw#G}#HX#H_#He#Ho#IR#IXPPPPPPPPPPP#I_PPPPPPP#JS#MZ#Ns#Nz$ SPPP$&nP$&w$)p$0Z$0^$0a$1`$1c$1j$1rP$1x$1{P$2i$2m$3e$4s$4x$5`PP$5e$5k$5o$5r$5v$5z$6v$7_$7v$7z$7}$8Q$8W$8Z$8_$8cR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R<m;z%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y,k,n,s-d-l-z.Q.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3d4q5y6Z6[6_6r8i8x9SS#q];w!r)]$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sU*{%[<e<fQ+q&OQ,a&eQ,h&mQ0r+dQ0w+fQ1S+rQ1y,fQ3W.bQ5V0vQ5]0}Q6Q1rQ7O3[Q8U5^R9Y7Q'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s!S!nQ!r!v!y!z$|'U']'^'j'k'l*h*l*n*o-W-^-`-p0U0X1g5q5s%[$ti#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}Q&V|Q'S!eS'Y%h-ZQ+q&OQ,a&eQ0f+OQ1S+rQ1X+xQ1x,eQ1y,fQ5]0}Q5f1ZQ6Q1rQ6T1tQ6U1wQ8U5^Q8X5cQ8q6WQ9|8YQ:Y8nR<o*XrnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VR,c&i&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=r=s[#]WZ#W#Z'V(R!b%im#h#i#l$x%d%g([(f(g(h*W*[*_+W+X+Z,j-Q.O.U.V.W.Y/h/k2[3S3T4X6h6yQ%vxQ%zyS&P|&UQ&]!TQ'a!hQ'c!iQ(o#sS+k%{%|Q+o&OQ,Y&`Q,^&bS-g'd'eQ.d(pQ0{+lQ1R+rQ1T+sQ1W+wQ1l,ZS1p,_,`Q2t-hQ5[0}Q5`1QQ5e1YQ6P1qQ8T5^Q8W5bQ9x8SR:w9y!U$zi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y!^%xy!i!u%z%{%|'T'c'd'e'i's*g+k+l-T-g-h-o/{0O0{2m2t2{4i4j4m7s9pQ+e%vQ,O&YQ,R&ZQ,]&bQ.c(oQ1k,YU1o,^,_,`Q3].dQ5z1lS6O1p1qQ8m6P#f=t#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}o=u<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YW%Ti%V*v=pS&Y!Q&gQ&Z!RQ&[!SQ+S%cR+|&W%]%Si#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}T)x$u)yV*{%[<e<fW'Y!e%h*X-ZS({#y#zQ+`%qQ+v&RS.](k(lQ1b,SQ4x0cR8^5k'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s$i$^c#Y#e%p%r%t(Q(W(r(w)P)Q)R)S)T)U)V)W)X)Y)[)^)`)e)o+a+u-U-s-x-}.P.n.q.u.w.x.y/]0j2c2f2v2}3c3h3i3j3k3l3m3n3o3p3q3r3s3t3w3x4P5O5Y6k6q6v7V7W7a7b8`8|9Q9[9b9c:c:y;R;x=gT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ'W!eR2i-W!W!nQ!e!r!v!y!z$|'U']'^'j'k'l*X*h*l*n*o-W-^-`-p0U0X1g5q5sR1d,UnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&w!^Q't!xS(q#u<OQ+i%yQ,W&]Q,X&_Q-e'bQ-r'mS.m(v<qS0k+U<{Q0y+jQ1f,VQ2Z,uQ2],vQ2e-RQ2r-fQ2u-jS5P0l=VQ5W0zS5Z0|=WQ6j2gQ6n2sQ6s2zQ8R5XQ8}6lQ9O6oQ9R6tR:`8z$d$]c#Y#e%r%t(Q(W(r(w)P)Q)R)S)T)U)V)W)X)Y)[)^)`)e)o+a+u-U-s-x-}.P.n.q.u.x.y/]0j2c2f2v2}3c3h3i3j3k3l3m3n3o3p3q3r3s3t3w3x4P5O5Y6k6q6v7V7W7a7b8`8|9Q9[9b9c:c:y;R;x=gS(m#p'gQ(}#zS+_%p.wS.^(l(nR3U._'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sS#q];wQ&r!XQ&s!YQ&u![Q&v!]R2R,qQ'_!hQ+b%vQ-c'aS.`(o+eQ2p-bW3Y.c.d0q0sQ6m2qW6z3V3X3]5TU9U6{6}7PU:e9W9X9ZS;T:d:gQ;b;UR;j;cU!wQ'^-`T5o1g5q!Q_OXZ`st!V!Z#d#h%d%l&g&i&p&r&s&u(h,n,s.V2S2V]!pQ!r'^-`1g5qT#q];w%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SS({#y#zS.](k(l!s=^$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sU$fd)],hS(n#p'gU*s%R(u3vU0e*z.i7]Q5T0rQ6{3WQ9X7OR:g9Ym!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sQ'r!uS(d#g1|S-n'i'uQ/n*ZQ/{*gQ2|-qQ4]/oQ4i/}Q4j0OQ4o0WQ7h4WS7s4k4mS7w4p4rQ9g7iQ9k7oQ9p7tQ9u7yS:o9l9mS;Y:p:sS;e;Z;[S;m;f;gS;q;n;oR;t;rQ#wbQ'q!uS(c#g1|S(e#m+TQ+V%eQ+g%wQ+m%}U-m'i'r'uQ.R(dQ/m*ZQ/|*gQ0P*iQ0x+hQ1m,[S2y-n-qQ3R.ZS4[/n/oQ4e/yS4h/{0WQ4l0QQ5|1nQ6u2|Q7g4WQ7k4]U7r4i4o4rQ7u4nQ8k5}S9f7h7iQ9j7oQ9r7wQ9s7xQ:V8lQ:m9gS:n9k9mQ:v9uQ;P:WS;X:o:sS;d;Y;ZS;l;e;gS;p;m;oQ;s;qQ;u;tQ=a=[Q=l=eR=m=fV!wQ'^-`%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SS#wz!j!r=Z$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sR=a=r%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SQ%ej!^%wy!i!u%z%{%|'T'c'd'e'i's*g+k+l-T-g-h-o/{0O0{2m2t2{4i4j4m7s9pS%}z!jQ+h%xQ,[&bW1n,],^,_,`U5}1o1p1qS8l6O6PQ:W8m!r=[$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ=e=qR=f=r%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SY#bWZ#W#Z(R!b%im#h#i#l$x%d%g([(f(g(h*W*[*_+W+X+Z,j-Q.O.U.V.W.Y/h/k2[3S3T4X6h6yQ,i&m!p=]$Z$n)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sR=`'VU'Z!e%h*XR2k-Z%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y,k,n,s-d-l-z.Q.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3d4q5y6Z6[6_6r8i8x9S!r)]$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ,h&mQ0r+dQ3W.bQ7O3[R9Y7Q!b$Tc#Y%p(Q(W(r(w)X)Y)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;x!P<U)[)o-U.w2c2f3h3q3r3w4P6k7W7a7b8`8|9[9b9c:y;R=g!f$Vc#Y%p(Q(W(r(w)U)V)X)Y)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;x!T<W)[)o-U.w2c2f3h3n3o3q3r3w4P6k7W7a7b8`8|9[9b9c:y;R=g!^$Zc#Y%p(Q(W(r(w)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;xQ4V/fz=s)[)o-U.w2c2f3h3w4P6k7W7a7b8`8|9[9b9c:y;R=gQ=x=zR=y={'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sS$oh$pR3|/P'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/P/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sT$kf$qQ$ifS)h$l)lR)t$qT$jf$qT)j$l)l'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/P/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sT$oh$pQ$rhR)s$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9S!s=q$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s#glOPXZst!Z!`!o#S#d#o#{$n%l&i&l&m&p&r&s&u&y'R'`(|)q*f+Y+d,k,n,s-d.b/Q/i0V0d1j1z1{1}2P2S2V2X3[3{4q5y6Z6[6_7Q8i8x!U%Ri$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y#f(u#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}Q+P%`Q/^)|o3v<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!U$yi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=yQ*`$zU*i$|*X*lQ+Q%aQ0Q*j#f=c#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n=d<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YQ=h=tQ=i=uQ=j=vR=k=w!U%Ri$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y#f(u#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}o3v<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YnoOXst!Z#d%l&p&r&s&u,n,s2S2VS*c${*WQ,|&|Q,}'OR4`/s%[%Si#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}Q,P&ZQ1`,RQ5i1_R8]5jV*k$|*X*lU*k$|*X*lT5p1g5qS/y*f/iQ4n0VT7x4q:PQ+g%wQ0P*iQ0x+hQ1m,[Q5|1nQ8k5}Q:V8lR;P:W!U%Oi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=yx*P$v)c*Q*r+R/q0^0_3y4^4{4|4}7f7z9v:l=b=n=oS0Y*q0Z#f<a#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n<b<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!d<t(s)a*Y*b.e.h.l/Y/f/v0p1]3`4S4_4c5h7R7U7m7p7}8P9i9q9w:q:u;W;];h=z={`<u3u7X7[7`9]:h:k;kS=P.g3aT=Q7Z9`!U%Qi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y|*R$v)c*S*q+R/b/q0^0_3y4^4s4{4|4}7f7z9v:l=b=n=oS0[*r0]#f<c#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n<d<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!h<v(s)a*Y*b.f.g.l/Y/f/v0p1]3^3`4S4_4c5h7R7S7U7m7p7}8P9i9q9w:q:u;W;];h=z={d<w3u7Y7Z7`9]9^:h:i:k;kS=R.h3bT=S7[9arnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VQ&d!UR,k&mrnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VR&d!UQ,T&[R1[+|snOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VQ1h,YS5w1k1lU8e5u5v5zS:R8g8hS:{:Q:TQ;_:|R;i;`Q&k!VR,d&gR6T1tR:Y8nS&P|&UR1T+sQ&p!WR,n&qR,t&vT2T,s2VR,x&wQ,w&wR2^,xQ'w!{R-t'wSsOtQ#dXT%os#dQ#OTR'y#OQ#RUR'{#RQ)y$uR/Z)yQ#UVR(O#UQ#XWU(U#X(V-{Q(V#YR-{(WQ-X'WR2j-XQ.p(wS3e.p3fR3f.qQ-`'^R2n-`Y!rQ'^-`1g5qR'h!rQ.{)cR3z.{U#_W%g*WU(]#_(^-|Q(^#`R-|(XQ-['ZR2l-[t`OXst!V!Z#d%l&g&i&p&r&s&u,n,s2S2VS#hZ%dU#r`#h.VR.V(hQ(i#jQ.S(eW.[(i.S3P6wQ3P.TR6w3QQ)l$lR/R)lQ$phR)r$pQ$`cU)_$`-w<[Q-w;xR<[)oQ/l*ZW4Y/l4Z7j9hU4Z/m/n/oS7j4[4]R9h7k$e*O$v(s)a)c*Y*b*q*r*|*}+R.g.h.j.k.l/Y/b/d/f/q/v0^0_0p1]3^3_3`3u3y4S4^4_4c4s4u4{4|4}5h7R7S7T7U7Z7[7^7_7`7f7m7p7z7}8P9]9^9_9i9q9v9w:h:i:j:k:l:q:u;W;];h;k=b=n=o=z={Q/t*bU4b/t4d7nQ4d/vR7n4cS*l$|*XR0S*lx*Q$v)c*q*r+R/q0^0_3y4^4{4|4}7f7z9v:l=b=n=o!d.e(s)a*Y*b.g.h.l/Y/f/v0p1]3`4S4_4c5h7R7U7m7p7}8P9i9q9w:q:u;W;];h=z={U/c*Q.e7Xa7X3u7Z7[7`9]:h:k;kQ0Z*qQ3a.gU4t0Z3a9`R9`7Z|*S$v)c*q*r+R/b/q0^0_3y4^4s4{4|4}7f7z9v:l=b=n=o!h.f(s)a*Y*b.g.h.l/Y/f/v0p1]3^3`4S4_4c5h7R7S7U7m7p7}8P9i9q9w:q:u;W;];h=z={U/e*S.f7Ye7Y3u7Z7[7`9]9^:h:i:k;kQ0]*rQ3b.hU4v0]3b9aR9a7[Q*w%UR0a*wQ5S0pR8O5SQ+[%jR0o+[Q5l1bS8_5l:OR:O8`Q,V&]R1e,VQ5q1gR8b5qQ1s,aS6R1s8oR8o6TQ1O+oW5_1O5a8V9zQ5a1RQ8V5`R9z8WQ+t&PR1U+tQ2V,sR6c2VYrOXst#dQ&t!ZQ+^%lQ,m&pQ,o&rQ,p&sQ,r&uQ2Q,nS2T,s2VR6b2SQ%npQ&x!_Q&{!aQ&}!bQ'P!cQ'o!uQ+]%kQ+i%yQ+{&VQ,c&kQ,z&zW-k'i'q'r'uQ-r'mQ0R*kQ0y+jS1v,d,gQ2_,yQ2`,|Q2a,}Q2u-jW2w-m-n-q-sQ5W0zQ5d1XQ5g1]Q5{1mQ6V1xQ6a2RU6p2v2y2|Q6s2zQ8R5XQ8Z5fQ8[5hQ8a5pQ8j5|Q8p6US9P6q6uQ9R6tQ9{8XQ:U8kQ:Z8qQ:b9QQ:x9|Q;O:VQ;S:cR;a;PQ%yyQ'b!iQ'm!uU+j%z%{%|Q-R'TU-f'c'd'eS-j'i'sQ/z*gS0z+k+lQ2g-TS2s-g-hQ2z-oS4g/{0OQ5X0{Q6l2mQ6o2tQ6t2{U7q4i4j4mQ9o7sR:r9pS$wi=pR*x%VU%Ui%V=pR0`*vQ$viS(s#v+fS)a$b$cQ)c$dQ*Y$xS*b${*WQ*q%OQ*r%QQ*|%]Q*}%^Q+R%bQ.g<aQ.h<cQ.j<gQ.k<iQ.l<kQ/Y)wQ/b*PQ/d*RQ/f*TQ/q*^S/v*d/hQ0^*tQ0_*ul0p+c,Q.a1a1i3Z5x6|8f9V:S:f:};VQ1]+}Q3^<tQ3_<vQ3`<yS3u<^<_Q3y.zS4S/_4UQ4^/rQ4_/sQ4c/uQ4s0YQ4u0[Q4{0gQ4|0hQ4}0iQ5h1^Q7R<}Q7S=PQ7T=RQ7U=TQ7Z<bQ7[<dQ7^<hQ7_<jQ7`<lQ7f4VQ7m4aQ7p4fQ7z4wQ7}5RQ8P5UQ9]<zQ9^<uQ9_<wQ9i7lQ9q7vQ9v7|Q9w8QQ:h=OQ:i=QQ:j=SQ:k=UQ:l9eQ:q9nQ:u9tQ;W=XQ;]:tQ;h;^Q;k=YQ=b=pQ=n=xQ=o=yQ=z=|R={=}Q*z%[Q.i<eR7]<fnpOXst!Z#d%l&p&r&s&u,n,s2S2VQ!fPS#fZ#oQ&z!`W'f!o*f0V4qQ'}#SQ)O#{Q)p$nS,g&i&lQ,l&mQ,y&yS-O'R/iQ-b'`Q.s(|Q/V)qQ0m+YQ0s+dQ2O,kQ2q-dQ3X.bQ4O/QQ4y0dQ5v1jQ6X1zQ6Y1{Q6^1}Q6`2PQ6e2XQ7P3[Q7c3{Q8h5yQ8t6ZQ8u6[Q8w6_Q9Z7QQ:T8iR:_8x#[cOPXZst!Z!`!o#d#o#{%l&i&l&m&p&r&s&u&y'R'`(|*f+Y+d,k,n,s-d.b/i0V0d1j1z1{1}2P2S2V2X3[4q5y6Z6[6_7Q8i8xQ#YWQ#eYQ%puQ%rvS%tw!gS(Q#W(TQ(W#ZQ(r#uQ(w#xQ)P$OQ)Q$PQ)R$QQ)S$RQ)T$SQ)U$TQ)V$UQ)W$VQ)X$WQ)Y$XQ)[$ZQ)^$_Q)`$aQ)e$eW)o$n)q/Q3{Q+a%sQ+u&QS-U'V2hQ-s'pS-x(R-zQ-}(ZQ.P(bQ.n(vQ.q(xQ.u;vQ.w;yQ.x;zQ.y;}Q/]){Q0j+UQ2c-PQ2f-SQ2v-lQ2}.QQ3c.oQ3h<OQ3i<PQ3j<QQ3k<RQ3l<SQ3m<TQ3n<UQ3o<VQ3p<WQ3q<XQ3r<YQ3s.vQ3t<]Q3w<`Q3x<mQ4P<ZQ5O0lQ5Y0|Q6k<pQ6q2xQ6v3OQ7V3dQ7W<qQ7a<sQ7b<{Q8`5mQ8|6iQ9Q6rQ9[<|Q9b=VQ9c=WQ:c9SQ:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c&gtmOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:379,context:fz,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,236,242,244,246,248,251,257,263,265,267,269,271,273,274,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[bz],skippedNodes:[0,5,6,277],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(VpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(VpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Vp(Y!b'{0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(W#S$i&j'|0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Vp(Y!b'|0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(U':f$i&j(Y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Vp(Y!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Vp(Y!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Y!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Y!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(VpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(VpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Vp(Y!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(n%1l(Vp(Y!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Vp(Y!b$]#t(S,2j(d$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Vp(Y!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Vp(Y!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(y+JY$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(X';W$i&j(VpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(VpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(VpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(VpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(VpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Vp(Y!b(T%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Vp(Y!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Vp(Y!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Vp(Y!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Vp(Y!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Vp(Y!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Y!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Y!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Y!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Y!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Y!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Y!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Vp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Vp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Vp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Vp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(VpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(VpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Vp(Y!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Vp(Y!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Vp(Y!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Vp(Y!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Vp(Y!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Vp(Y!b'}0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Vp(Y!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Y!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Y!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(VpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(VpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Vp(Y!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Vp(Y!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Vp(Y!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Vp(Y!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Vp(Y!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(q(Ct$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Vp(Y!b(`+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Vp(Y!b(S,2j$_#t(d$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Vp(Y!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(x+JY$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Vp(Y!b'{0/l$]#t(S,2j(d$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Vp(Y!b'|0/l$]#t(S,2j(d$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[hz,mz,gz,vz,2,3,4,5,6,7,8,9,10,11,12,13,14,pz,new bp("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(b~~",141,339),new bp("j~RQYZXz{^~^O(P~~aP!P!Qd~iO(Q~~",25,322)],topRules:{Script:[0,7],SingleExpression:[1,275],SingleClassItem:[2,276]},dialects:{jsx:0,ts:15098},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:326,get:i=>Oz[i]||-1},{term:342,get:i=>Cz[i]||-1},{term:95,get:i=>yz[i]||-1}],tokenPrec:15124}),j1=[ns("function ${name}(${params}) {\n	${}\n}",{label:"function",detail:"definition",type:"keyword"}),ns("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n	${}\n}",{label:"for",detail:"loop",type:"keyword"}),ns("for (let ${name} of ${collection}) {\n	${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ns("do {\n	${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ns("while (${}) {\n	${}\n}",{label:"while",detail:"loop",type:"keyword"}),ns(`try {
	\${}
} catch (\${error}) {
	\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),ns("if (${}) {\n	${}\n}",{label:"if",detail:"block",type:"keyword"}),ns(`if (\${}) {
	\${}
} else {
	\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),ns(`class \${name} {
	constructor(\${params}) {
		\${}
	}
}`,{label:"class",detail:"definition",type:"keyword"}),ns('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ns('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],_z=j1.concat([ns("interface ${name} {\n	${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ns("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ns("enum ${name} {\n	${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),SO=new y5,V1=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ka(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const wz=["FunctionDeclaration"],kz={FunctionDeclaration:Ka("function"),ClassDeclaration:Ka("class"),ClassExpression:()=>!0,EnumDeclaration:Ka("constant"),TypeAliasDeclaration:Ka("type"),NamespaceDeclaration:Ka("namespace"),VariableDefinition(i,e){i.matchContext(wz)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function F1(i,e){let t=SO.get(e);if(t)return t;let n=[],s=!0;function o(a,l){let c=i.sliceString(a.from,a.to);n.push({label:c,type:l})}return e.cursor(Cn.IncludeAnonymous).iterate(a=>{if(s)s=!1;else if(a.name){let l=kz[a.name];if(l&&l(a,o)||V1.has(a.name))return!1}else if(a.to-a.from>8192){for(let l of F1(i,a.node))n.push(l);return!1}}),SO.set(e,n),n}const _O=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,W1=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function xz(i){let e=Sn(i.state).resolveInner(i.pos,-1);if(W1.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&_O.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)V1.has(s.name)&&(n=n.concat(F1(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:_O}}const To=Lc.define({name:"javascript",parser:Sz.configure({props:[_y.add({IfStatement:rf({except:/^\s*({|else\b)/}),TryStatement:rf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Z5,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:B5({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":rf({except:/^\s*{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),xy.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":j5,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Y1={test:i=>/^JSX/.test(i.name),facet:yy({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Pz=To.configure({dialect:"ts"},"typescript"),$z=To.configure({dialect:"jsx",props:[ch.add(i=>i.isTop?[Y1]:void 0)]}),Tz=To.configure({dialect:"jsx ts",props:[ch.add(i=>i.isTop?[Y1]:void 0)]},"typescript");let G1=i=>({label:i,type:"keyword"});const J1="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(G1),Rz=J1.concat(["declare","implements","private","protected","public"].map(G1));function Iz(i={}){let e=i.jsx?i.typescript?Tz:$z:i.typescript?Pz:To,t=i.typescript?_z.concat(Rz):j1.concat(J1);return new A5(e,[To.data.of({autocomplete:rB(W1,$1(t))}),To.data.of({autocomplete:xz}),i.jsx?Nz:[]])}function Qz(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function wO(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const Az=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Nz=Qe.inputHandler.of((i,e,t,n,s)=>{if((Az?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!To.isActiveAt(i.state,e,-1))return!1;let o=s(),{state:a}=o,l=a.changeByRange(c=>{var f;let{head:h}=c,g=Sn(a).resolveInner(h-1,-1),v;if(g.name=="JSXStartTag"&&(g=g.parent),!(a.doc.sliceString(h-1,h)!=n||g.name=="JSXAttributeValue"&&g.to>h)){if(n==">"&&g.name=="JSXFragmentTag")return{range:c,changes:{from:h,insert:"</>"}};if(n=="/"&&g.name=="JSXStartCloseTag"){let O=g.parent,y=O.parent;if(y&&O.from==h-2&&((v=wO(a.doc,y.firstChild,h))||((f=y.firstChild)===null||f===void 0?void 0:f.name)=="JSXFragmentTag")){let S=`${v}>`;return{range:me.cursor(h+S.length,-1),changes:{from:h,insert:S}}}}else if(n==">"){let O=Qz(g);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(h,h+2))&&(v=wO(a.doc,O,h)))return{range:c,changes:{from:h,insert:`</${v}>`}}}}return{range:c}});return l.changes.empty?!1:(i.dispatch([o,a.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Mz={key:2,class:"h-full overflow-y-auto p-2"},Lz=ae({name:"RequestScripts",__name:"request-scripts",setup(i){const e=qe("serverId",B("0")),t=wt(),n=B(!0),s=B(!1),o=J(()=>t.isMobile),a=J(()=>o.value?"top":"left"),l=B({isPrior:!1,isOn:!0,code:"",auditingCode:`console.log("Hello World");




`,auditingCodeMD5:""}),c=B({isPrior:!1,isOn:!0,code:`console.log("Hello World");




`,auditingCode:`console.log("Hello World");




`,auditingCodeMD5:""}),f=[fy(),Iz()],h=fe({requestScriptsConfig:{initGroup:{isOn:!1,isPrior:!1,scripts:[]},requestGroup:{isOn:!1,isPrior:!1,scripts:[]}},auditingStatus:[],featureIsOn:!1,webId:0}),g=LZ,v=async()=>{var A,R;const w="/servers/server/settings/requestScripts",{data:_,error:$}=await ht(w,{serverId:e.value});if(!$&&_){const{featureIsOn:k=!1,requestScriptsConfig:x,auditingStatus:T,webId:M=0}=_;Object.assign(h,{auditingStatus:T??h.auditingStatus,featureIsOn:k,requestScriptsConfig:{initGroup:(x==null?void 0:x.initGroup)??h.requestScriptsConfig.initGroup,requestGroup:(x==null?void 0:x.requestGroup)??h.requestScriptsConfig.requestGroup},webId:M})}l.value=((A=h.requestScriptsConfig.initGroup)==null?void 0:A.scripts[0])??l.value,c.value=((R=h.requestScriptsConfig.requestGroup)==null?void 0:R.scripts[0])??c.value},O=async()=>{var $;s.value=!0;const w=await Kt();h.requestScriptsConfig.initGroup.scripts[0]=l.value,h.requestScriptsConfig.requestGroup.scripts[0]=c.value;const{error:_}=await Ee({csrfToken:w,webId:h.webId,requestScriptsJSON:JSON.stringify(h.requestScriptsConfig)},"/servers/server/settings/requestScripts");_||($=window.$message)==null||$.success(u("common.msgSync")),s.value=!1},y=()=>{l.value.code=l.value.auditingCode},S=()=>{c.value.code=c.value.auditingCode};return vt(()=>{v().finally(()=>{n.value=!1})}),(w,_)=>{const $=jt,A=nn,R=en,k=ve,x=Re,T=ze,M=Te,N=re,I=nt;return n.value?(L(),W($,{key:0})):h.featureIsOn?(L(),te("div",Mz,[d(I,{show:s.value},{default:p(()=>[d(N,{vertical:""},{default:p(()=>[d(T,{title:C(u)("page.webSet.edgeScriptConfig.requestInitialization")},{default:p(()=>[d(x,null,{default:p(()=>[d(k,{label:C(u)("page.webSet.edgeScriptConfig.enableScriptSettings"),"label-placement":a.value},{default:p(()=>[d(R,{value:h.requestScriptsConfig.initGroup.isOn,"onUpdate:value":_[0]||(_[0]=q=>h.requestScriptsConfig.initGroup.isOn=q)},null,8,["value"])]),_:1},8,["label","label-placement"]),d(k,{label:C(u)("page.webSet.edgeScriptConfig.scriptCode"),"label-placement":a.value},{feedback:p(()=>[U("div",null,Q(C(u)("page.webSet.edgeScriptConfig.immediateCallTip")),1)]),default:p(()=>[d(C(rO),{modelValue:l.value.auditingCode,"onUpdate:modelValue":_[1]||(_[1]=q=>l.value.auditingCode=q),disabled:!h.requestScriptsConfig.initGroup.isOn,placeholder:C(u)("page.webSet.edgeScriptConfig.pleaseEnterCode"),extensions:f,theme:C(g),style:{height:"154px",width:"100%"},onUpdate:y},null,8,["modelValue","disabled","placeholder","theme"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),d(T,{title:C(u)("page.webSet.edgeScriptConfig.prepareSendRequest")},{default:p(()=>[d(x,null,{default:p(()=>[d(k,{label:C(u)("page.webSet.edgeScriptConfig.enableScriptSettings"),"label-placement":a.value},{default:p(()=>[d(R,{value:h.requestScriptsConfig.requestGroup.isOn,"onUpdate:value":_[2]||(_[2]=q=>h.requestScriptsConfig.requestGroup.isOn=q)},null,8,["value"])]),_:1},8,["label","label-placement"]),d(k,{label:C(u)("page.webSet.edgeScriptConfig.scriptCode"),"label-placement":a.value},{feedback:p(()=>[U("div",null,Q(C(u)("page.webSet.edgeScriptConfig.immediateCallTip")),1)]),default:p(()=>[d(C(rO),{modelValue:c.value.auditingCode,"onUpdate:modelValue":_[3]||(_[3]=q=>c.value.auditingCode=q),disabled:!h.requestScriptsConfig.requestGroup.isOn,placeholder:C(u)("page.webSet.edgeScriptConfig.pleaseEnterCode"),extensions:f,theme:C(g),style:{height:"154px",width:"100%"},onUpdate:S},null,8,["modelValue","disabled","placeholder","theme"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),d(N,null,{default:p(()=>[d(M,{type:"info",onClick:O},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["show"])])):(L(),W(A,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),Uz=ce(Lz,[["__scopeId","data-v-55b549c3"]]),Dz={key:2,class:"h-full overflow-y-auto p-2"},qz={class:"text-xs text-gray"},Ez={class:"text-xs text-gray"},Bz=ae({name:"MultimediaConfig",__name:"multimedia-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=B(!0),s=B(!1),o=J(()=>t.isMobile),a=J(()=>o.value?"top":"left"),l=fe({hlsConfig:{isPrior:!1,encrypting:{isOn:!1,onlyURLPatterns:[],exceptURLPatterns:[]}},featureIsOn:!1,webId:0}),c=B(!1),f=B(!1),h=async()=>{const _="/servers/server/settings/multimedia/hls",{data:$,error:A}=await ht(_,{serverId:e.value});if(!A&&$){const{featureIsOn:R=!0,hlsConfig:k,webId:x=0}=$;Object.assign(l,{featureIsOn:R,hlsConfig:{...k,encrypting:k.encrypting??l.hlsConfig.encrypting},webId:x})}},g=async()=>{var A;s.value=!0;const _=await Kt(),{error:$}=await Ee({csrfToken:_,webId:l.webId,hlsJSON:JSON.stringify(l.hlsConfig)},"/servers/server/settings/multimedia/hls");$||(A=window.$message)==null||A.success(u("common.msgSync")),s.value=!1},v=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),O=_=>{const{type:$,index:A,data:R}=_;$==="edit"&&A>=0&&A<l.hlsConfig.encrypting.exceptURLPatterns.length?l.hlsConfig.encrypting.exceptURLPatterns[A]={...R}:$!=="edit"&&l.hlsConfig.encrypting.exceptURLPatterns.push({...R}),g()},y=_=>{l.hlsConfig.encrypting.exceptURLPatterns.splice(_,1),g()},S=_=>{l.hlsConfig.encrypting.onlyURLPatterns.splice(_,1),g()},w=_=>{const{type:$,index:A,data:R}=_;$==="edit"&&A>=0&&A<l.hlsConfig.encrypting.onlyURLPatterns.length?l.hlsConfig.encrypting.onlyURLPatterns[A]={...R}:$!=="edit"&&l.hlsConfig.encrypting.onlyURLPatterns.push({...R}),g()};return vt(()=>{h().finally(()=>{n.value=!1})}),(_,$)=>{const A=jt,R=nn,k=en,x=ve,T=Re,M=ze,N=ss,I=re,q=nt;return n.value?(L(),W(A,{key:0})):l.featureIsOn?(L(),te("div",Dz,[d(q,{show:s.value},{default:p(()=>[d(I,{vertical:""},{default:p(()=>[d(M,{title:C(u)("page.webSet.mediaSettingsConfig.hlsEncryptionSettings")},{default:p(()=>[d(T,null,{default:p(()=>[d(x,{label:C(u)("page.webSet.mediaSettingsConfig.enableHLSEncryption"),"label-placement":a.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.mediaSettingsConfig.hlsEncryptionTip")),1)]),default:p(()=>[d(k,{value:l.hlsConfig.encrypting.isOn,"onUpdate:value":[$[0]||($[0]=z=>l.hlsConfig.encrypting.isOn=z),g]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),Zt(d(M,{title:C(u)("page.webSet.advancedOptions")},{default:p(()=>[d(T,null,{default:p(()=>[d(x,{label:C(u)("page.webSet.compressionConfig.excludedURLs")},{feedback:p(()=>[U("span",qz,Q(C(u)("page.webSet.compressionConfig.excludedURLsTip")),1)]),default:p(()=>[d(N,{visible:c.value,"onUpdate:visible":$[1]||($[1]=z=>c.value=z),options:v.value,"url-patterns":l.hlsConfig.encrypting.exceptURLPatterns,onDelete:y,onUpdate:O},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(x,{label:C(u)("page.webSet.compressionConfig.limitedURLs")},{feedback:p(()=>[U("span",Ez,Q(C(u)("page.webSet.compressionConfig.limitedURLsTip")),1)]),default:p(()=>[d(N,{visible:f.value,"onUpdate:visible":$[2]||($[2]=z=>f.value=z),options:v.value,"url-patterns":l.hlsConfig.encrypting.onlyURLPatterns,onDelete:S,onUpdate:w},null,8,["visible","options","url-patterns"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"]),[[zt,l.hlsConfig.encrypting.isOn]])]),_:1})]),_:1},8,["show"])])):(L(),W(R,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),Zz=ce(Bz,[["__scopeId","data-v-39d27d7b"]]),zz={key:2,class:"h-full overflow-y-auto p-2"},Hz={class:"text-xs text-gray"},Xz={class:"text-xs text-gray"},jz=ae({name:"ReferersConfig",__name:"referers-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=B(!0),s=B(!1),o=J(()=>t.isMobile),a=J(()=>o.value?"top":"left"),l=B(!1),c=B(!1),f=fe({referersConfig:{isPrior:!1,isOn:!1,allowEmpty:!0,allowSameDomain:!1,allowDomains:[],denyDomains:[],checkOrigin:!1,onlyURLPatterns:[],exceptURLPatterns:[]},featureIsOn:!1,webId:0}),h=async()=>{const _="/servers/server/settings/referers",{data:$,error:A}=await ht(_,{serverId:e.value});if(!A&&$){const{featureIsOn:R=!1,referersConfig:k,webId:x=0}=$;Object.assign(f,{featureIsOn:R,referersConfig:{...k,allowDomains:k.allowDomains??[],denyDomains:k.denyDomains??[],onlyURLPatterns:k.onlyURLPatterns??[],exceptURLPatterns:k.exceptURLPatterns??[]},webId:x})}},g=J(()=>[{type:"wildcard",value:u("page.webSet.securityConfig.fiveShield.options.wildcard")},{type:"regexp",value:u("page.webSet.securityConfig.fiveShield.options.regexp")},{type:"images",value:u("page.webSet.securityConfig.fiveShield.options.images")},{type:"audios",value:u("page.webSet.securityConfig.fiveShield.options.audios")},{type:"videos",value:u("page.webSet.securityConfig.fiveShield.options.videos")}]),v=_=>{const{type:$,index:A,data:R}=_;$==="edit"&&A>=0&&A<f.referersConfig.exceptURLPatterns.length?f.referersConfig.exceptURLPatterns[A]={...R}:$!=="edit"&&f.referersConfig.exceptURLPatterns.push({...R})},O=_=>{f.referersConfig.exceptURLPatterns.splice(_,1)},y=_=>{f.referersConfig.onlyURLPatterns.splice(_,1)},S=_=>{const{type:$,index:A,data:R}=_;$==="edit"&&A>=0&&A<f.referersConfig.onlyURLPatterns.length?f.referersConfig.onlyURLPatterns[A]={...R}:$!=="edit"&&f.referersConfig.onlyURLPatterns.push({...R})},w=async()=>{var k;s.value=!0;const _=await Kt(),$=new URLSearchParams,A={csrfToken:_,webId:f.webId,referersJSON:JSON.stringify(f.referersConfig)};Object.entries(A).forEach(([x,T])=>{$.append(x,T)}),$.append("domainsJSON",JSON.stringify(f.referersConfig.allowDomains)),$.append("domainsJSON",JSON.stringify(f.referersConfig.denyDomains));const{error:R}=await oo($.toString(),"/servers/server/settings/referers");R||(k=window.$message)==null||k.success(u("common.msgSync")),s.value=!1};return vt(()=>{h().finally(()=>{n.value=!1})}),(_,$)=>{const A=jt,R=nn,k=en,x=ve,T=Re,M=ze,N=et,I=Wt,q=ss,z=Te,H=re,F=nt;return n.value?(L(),W(A,{key:0})):f.featureIsOn?(L(),te("div",zz,[d(F,{show:s.value},{default:p(()=>[d(H,{vertical:""},{default:p(()=>[d(M,{title:C(u)("page.webSet.hotlinkProtectionConfig.hotlinkSettings")},{default:p(()=>[d(T,null,{default:p(()=>[d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.enableHotlink"),"label-placement":a.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.hotlinkProtectionConfig.enableHotlinkTip")),1)]),default:p(()=>[d(k,{value:f.referersConfig.isOn,"onUpdate:value":[$[0]||($[0]=V=>f.referersConfig.isOn=V),w]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),f.referersConfig.isOn?(L(),te(Ce,{key:0},[d(M,{title:C(u)("page.webSet.hotlinkProtectionConfig.refererDomainSettings")},{default:p(()=>[d(T,null,{default:p(()=>[d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.allowDirectAccess"),"label-placement":a.value},{default:p(()=>[d(N,{checked:f.referersConfig.allowEmpty,"onUpdate:checked":$[1]||($[1]=V=>f.referersConfig.allowEmpty=V),label:C(u)("page.webSet.hotlinkProtectionConfig.allowDirectAccessTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.allowRefererMatch"),"label-placement":a.value},{default:p(()=>[d(N,{checked:f.referersConfig.allowSameDomain,"onUpdate:checked":$[2]||($[2]=V=>f.referersConfig.allowSameDomain=V),label:C(u)("page.webSet.hotlinkProtectionConfig.allowRefererMatchTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.allowedRefererDomains"),"label-placement":a.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.hotlinkProtectionConfig.allowedRefererDomainsTip")),1)]),default:p(()=>[d(I,{value:f.referersConfig.allowDomains,"onUpdate:value":$[3]||($[3]=V=>f.referersConfig.allowDomains=V)},null,8,["value"])]),_:1},8,["label","label-placement"]),d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.blockedRefererDomains"),"label-placement":a.value},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.hotlinkProtectionConfig.blockedRefererDomainsTip")),1)]),default:p(()=>[d(I,{value:f.referersConfig.denyDomains,"onUpdate:value":$[4]||($[4]=V=>f.referersConfig.denyDomains=V)},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),d(M,{title:C(u)("page.webSet.advancedOptions")},{default:p(()=>[d(T,null,{default:p(()=>[d(x,{label:C(u)("page.webSet.hotlinkProtectionConfig.checkOriginToo"),"label-placement":a.value},{default:p(()=>[d(N,{checked:f.referersConfig.checkOrigin,"onUpdate:checked":$[5]||($[5]=V=>f.referersConfig.checkOrigin=V),label:C(u)("page.webSet.hotlinkProtectionConfig.checkOriginTooTip")},null,8,["checked","label"])]),_:1},8,["label","label-placement"]),d(x,{label:C(u)("page.webSet.compressionConfig.excludedURLs")},{feedback:p(()=>[U("span",Hz,Q(C(u)("page.webSet.compressionConfig.excludedURLsTip")),1)]),default:p(()=>[d(q,{visible:l.value,"onUpdate:visible":$[6]||($[6]=V=>l.value=V),options:g.value,"url-patterns":f.referersConfig.exceptURLPatterns,onDelete:O,onUpdate:v},null,8,["visible","options","url-patterns"])]),_:1},8,["label"]),d(x,{label:C(u)("page.webSet.compressionConfig.limitedURLs")},{feedback:p(()=>[U("span",Xz,Q(C(u)("page.webSet.compressionConfig.limitedURLsTip")),1)]),default:p(()=>[d(q,{visible:c.value,"onUpdate:visible":$[7]||($[7]=V=>c.value=V),options:g.value,"url-patterns":f.referersConfig.onlyURLPatterns,onDelete:y,onUpdate:S},null,8,["visible","options","url-patterns"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"]),d(H,null,{default:p(()=>[d(z,{type:"info",onClick:w},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1})]),_:1})],64)):Xe("",!0)]),_:1})]),_:1},8,["show"])])):(L(),W(R,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),Vz=ce(jz,[["__scopeId","data-v-3eeabd0e"]]),Fz=ae({name:"AccessMore",__name:"access-more",props:{exts:{default:[]},extsModifiers:{},domains:{default:[]},domainsModifiers:{}},emits:["update:exts","update:domains"],setup(i){const e=Ze(i,"exts"),t=Ze(i,"domains");return(n,s)=>{const o=un,a=_e,l=Wt,c=ve,f=Re,h=Xt,g=Ht;return L(),W(g,{"arrow-placement":"right"},{default:p(()=>[d(h,{name:"more"},{header:p(()=>[d(o,null,{default:p(()=>[X(Q(n.$t("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(a,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(f,null,{default:p(()=>[d(c,{label:n.$t("page.webSet.accessConfig.restrictFileExtensions")},{default:p(()=>[d(l,{value:e.value,"onUpdate:value":s[0]||(s[0]=v=>e.value=v)},null,8,["value"])]),_:1},8,["label"]),d(c,{label:n.$t("page.webSet.accessConfig.restrictDomains")},{default:p(()=>[d(l,{value:t.value,"onUpdate:value":s[1]||(s[1]=v=>t.value=v)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})}}}),$a=ce(Fz,[["__scopeId","data-v-fa58b562"]]),Wz={class:"flex gap-1"},Yz=["onClick"],Gz=["onClick"],Jz=ae({name:"UserDrawer",__name:"user-drawer",props:{value:{default:()=>[]},valueModifiers:{}},emits:["update:value"],setup(i){const e=B(!1),t=B({type:"add",index:0}),n=B({password:"",username:""}),s=Ze(i,"value"),o=()=>{t.value.type==="add"?s.value.push({...n.value}):s.value[t.value.index]={...n.value},e.value=!1,n.value={password:"",username:""}},a=f=>{s.value.splice(f,1)},l=f=>{t.value={type:"edit",index:f},n.value={...s.value[f]},e.value=!0},c=()=>{t.value.type="add",n.value={password:"",username:""},e.value=!0};return(f,h)=>{const g=_e,v=re,O=Te,y=Ne,S=Re,w=ze,_=Pt;return L(),te(Ce,null,[d(v,{vertical:""},{default:p(()=>[s.value.length!==0?(L(),W(v,{key:0},{default:p(()=>[(L(!0),te(Ce,null,Ot(s.value,($,A)=>(L(),te("div",{key:A,class:"flex items-center gap-2 border rounded-xl px-3 py-1 text-xs"},[U("div",null,[U("span",null,Q($.username),1)]),U("div",Wz,[U("div",{class:"cursor-pointer",onClick:R=>l(A)},[d(g,{"local-icon":"fluent--edit-20-regular"})],8,Yz),U("div",{class:"cursor-pointer",onClick:R=>a(A)},[d(g,{"local-icon":"material-symbols--delete-outline-rounded"})],8,Gz)])]))),128))]),_:1})):Xe("",!0),d(O,{dashed:"",size:"small",onClick:h[0]||(h[0]=()=>c())},{default:p(()=>h[5]||(h[5]=[X("+")])),_:1})]),_:1}),d(_,{show:e.value,"onUpdate:show":h[4]||(h[4]=$=>e.value=$),size:"small"},{default:p(()=>[d(w,{style:{width:"280px"},title:"用户",bordered:!1,size:"small",role:"dialog"},{footer:p(()=>[d(v,null,{default:p(()=>[d(O,{size:"small",type:"info",disabled:n.value.password===""||n.value.username==="",onClick:o},{default:p(()=>h[6]||(h[6]=[X(" 保存 ")])),_:1},8,["disabled"]),d(O,{size:"small",onClick:h[3]||(h[3]=()=>e.value=!1)},{default:p(()=>h[7]||(h[7]=[X("取消")])),_:1})]),_:1})]),default:p(()=>[d(S,{class:"space-y-sm"},{default:p(()=>[d(y,{value:n.value.username,"onUpdate:value":h[1]||(h[1]=$=>n.value.username=$),placeholder:"用户名",size:"small"},null,8,["value"]),d(y,{value:n.value.password,"onUpdate:value":h[2]||(h[2]=$=>n.value.password=$),placeholder:"密码",size:"small",type:"password"},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["show"])],64)}}}),Kz=ce(Jz,[["__scopeId","data-v-6db00b5d"]]),eH=ae({name:"BasicAuthPage",__name:"basic-auth-page",setup(i,{expose:e}){const t=B(null),n=fe({charset:"",domains:[],exts:[],realm:"",users:[]}),s={users:{validator:(c,f)=>f.length===0?Promise.reject(new Error("请添加至少一个用户")):Promise.resolve(),trigger:["input"],required:!0}};return e({model:n,verifyModel:async()=>{var c;await((c=t.value)==null?void 0:c.validate())},updatEdit:c=>{Object.assign(n,{...c})},initData:()=>{Object.assign(n,{charset:"",domains:[],exts:[],realm:"",users:[]})}}),(c,f)=>{const h=ve,g=un,v=_e,O=Ne,y=Xt,S=Ht,w=Re;return L(),W(w,{ref_key:"formRef",ref:t,model:n,rules:s},{default:p(()=>[d(h,{label:c.$t("page.webSet.accessConfig.user"),path:"users"},{default:p(()=>[d(Kz,{value:n.users,"onUpdate:value":f[0]||(f[0]=_=>n.users=_)},null,8,["value"])]),_:1},8,["label"]),d(S,{"arrow-placement":"right",class:"mb-1"},{default:p(()=>[d(y,{name:"more"},{header:p(()=>[d(g,null,{default:p(()=>[X(Q(c.$t("page.webSet.accessConfig.authOptions")),1)]),_:1})]),arrow:p(()=>[d(v,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d(h,{label:c.$t("page.webSet.accessConfig.authRealm")},{default:p(()=>[d(O,{value:n.realm,"onUpdate:value":f[1]||(f[1]=_=>n.realm=_)},null,8,["value"])]),_:1},8,["label"]),d(h,{label:c.$t("page.webSet.accessConfig.charset")},{feedback:p(()=>[U("span",null,Q(c.$t("page.webSet.accessConfig.charsetTip")),1)]),default:p(()=>[d(O,{value:n.charset,"onUpdate:value":f[2]||(f[2]=_=>n.charset=_),style:{width:"100px"},placeholder:"utf-8"},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1}),d($a,{domains:n.domains,"onUpdate:domains":f[3]||(f[3]=_=>n.domains=_),exts:n.exts,"onUpdate:exts":f[4]||(f[4]=_=>n.exts=_)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),tH=ce(eH,[["__scopeId","data-v-1dbd3dd2"]]),nH=Object.freeze(Object.defineProperty({__proto__:null,default:tH},Symbol.toStringTag,{value:"Module"})),sH=ae({name:"SubRequestPage",__name:"sub-request-page",setup(i,{expose:e}){const t=B(null),n=fe({domains:[],exts:[],method:"",url:""}),s={url:{required:!0,message:"请输入子请求URL ",trigger:["input"]}},o=async()=>{var f;await((f=t.value)==null?void 0:f.validate())},a=J(()=>[{label:"同当前请求一致",value:""},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"PUT",value:"PUT"},{label:"GEAD",value:"GEAD"}]);return e({model:n,verifyModel:o,updatEdit:f=>{Object.assign(n,{...f})},initData:()=>{Object.assign(n,{domains:[],exts:[],method:"",url:""})}}),(f,h)=>{const g=Ne,v=ve,O=ft,y=Re;return L(),W(y,{ref_key:"formRef",ref:t,model:n,rules:s},{default:p(()=>[d(v,{label:f.$t("page.webSet.accessConfig.subRequestUrl"),path:"url"},{feedback:p(()=>[U("span",null,Q(f.$t("page.webSet.accessConfig.subRequestUrlTip")),1)]),default:p(()=>[d(g,{value:n.url,"onUpdate:value":h[0]||(h[0]=S=>n.url=S)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.requestMethod")},{default:p(()=>[d(O,{value:n.method,"onUpdate:value":h[1]||(h[1]=S=>n.method=S),options:a.value,"default-value":""},null,8,["value","options"])]),_:1},8,["label"]),d($a,{domains:n.domains,"onUpdate:domains":h[2]||(h[2]=S=>n.domains=S),exts:n.exts,"onUpdate:exts":h[3]||(h[3]=S=>n.exts=S)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),iH=ce(sH,[["__scopeId","data-v-295f1fd3"]]),oH=Object.freeze(Object.defineProperty({__proto__:null,default:iH},Symbol.toStringTag,{value:"Module"})),aH=ae({name:"TypeAPage",__name:"type-a-page",setup(i,{expose:e}){const t=B(null),n=fe({algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign"});function s(){const f=new Uint8Array(16);crypto.getRandomValues(f),n.secret=Array.from(f,h=>h.toString(16).padStart(2,"0")).join("")}const o={secret:{required:!0,message:"请输入鉴权密钥",trigger:["input"]},signParamName:{required:!0,message:"请输入签名参数",trigger:["input"]}};return e({model:n,verifyModel:async()=>{var f;await((f=t.value)==null?void 0:f.validate())},updatEdit:f=>{Object.assign(n,{...f})},initData:()=>{Object.assign(n,{algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign"})}}),(f,h)=>{const g=Ne,v=ve,O=Ut,y=Ai,S=tn,w=Re;return L(),W(w,{ref_key:"formRef",ref:t,model:n,rules:o},{default:p(()=>[d(v,{label:f.$t("page.webSet.accessConfig.authKey"),path:"secret"},{feedback:p(()=>[U("span",null,[X(Q(f.$t("page.webSet.accessConfig.authKeyRule"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:s},Q(f.$t("page.webSet.accessConfig.randomGenerate")),1)])]),default:p(()=>[d(g,{value:n.secret,"onUpdate:value":h[0]||(h[0]=_=>n.secret=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.signParam"),path:"signParamName"},{default:p(()=>[d(g,{value:n.signParamName,"onUpdate:value":h[1]||(h[1]=_=>n.signParamName=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.validTime")},{feedback:p(()=>[U("span",null,Q(f.$t("page.webSet.accessConfig.linkValidTimeTip")),1)]),default:p(()=>[d(S,null,{default:p(()=>[d(O,{value:n.life,"onUpdate:value":h[2]||(h[2]=_=>n.life=_),style:{width:"90px"},"show-button":!1},null,8,["value"]),d(y,null,{default:p(()=>[X(Q(f.$t("page.webSet.accessConfig.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d($a,{domains:n.domains,"onUpdate:domains":h[3]||(h[3]=_=>n.domains=_),exts:n.exts,"onUpdate:exts":h[4]||(h[4]=_=>n.exts=_)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),lH=ce(aH,[["__scopeId","data-v-0f034179"]]),rH=Object.freeze(Object.defineProperty({__proto__:null,default:lH},Symbol.toStringTag,{value:"Module"})),cH=ae({name:"TypeBPage",__name:"type-b-page",setup(i,{expose:e}){const t=B(null),n=fe({algorithm:"",domains:[],exts:[],life:30,secret:""});function s(){const f=new Uint8Array(16);crypto.getRandomValues(f),n.secret=Array.from(f,h=>h.toString(16).padStart(2,"0")).join("")}const o={secret:{required:!0,message:"请输入鉴权密钥",trigger:["input"]}};return e({model:n,verifyModel:async()=>{var f;await((f=t.value)==null?void 0:f.validate())},updatEdit:f=>{Object.assign(n,{...f})},initData:()=>{Object.assign(n,{algorithm:"",domains:[],exts:[],life:30,secret:""})}}),(f,h)=>{const g=Ne,v=ve,O=Ut,y=Ai,S=tn,w=Re;return L(),W(w,{ref_key:"formRef",ref:t,model:n,rules:o},{default:p(()=>[d(v,{label:f.$t("page.webSet.accessConfig.authKey"),path:"secret"},{feedback:p(()=>[U("span",null,[X(Q(f.$t("page.webSet.accessConfig.authKeyRule"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:s},Q(f.$t("page.webSet.accessConfig.randomGenerate")),1)])]),default:p(()=>[d(g,{value:n.secret,"onUpdate:value":h[0]||(h[0]=_=>n.secret=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.validTime")},{feedback:p(()=>[U("span",null,Q(f.$t("page.webSet.accessConfig.linkValidTimeTip")),1)]),default:p(()=>[d(S,null,{default:p(()=>[d(O,{value:n.life,"onUpdate:value":h[1]||(h[1]=_=>n.life=_),style:{width:"90px"},"show-button":!1},null,8,["value"]),d(y,null,{default:p(()=>[X(Q(f.$t("page.webSet.accessConfig.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d($a,{domains:n.domains,"onUpdate:domains":h[2]||(h[2]=_=>n.domains=_),exts:n.exts,"onUpdate:exts":h[3]||(h[3]=_=>n.exts=_)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),dH=ce(cH,[["__scopeId","data-v-aea93fcd"]]),uH=Object.freeze(Object.defineProperty({__proto__:null,default:dH},Symbol.toStringTag,{value:"Module"})),fH=ae({name:"TypeCPage",__name:"type-c-page",setup(i,{expose:e}){const t=B(null),n=fe({algorithm:"",domains:[],exts:[],life:30,secret:""});function s(){const f=new Uint8Array(16);crypto.getRandomValues(f),n.secret=Array.from(f,h=>h.toString(16).padStart(2,"0")).join("")}const o={secret:{required:!0,message:"请输入鉴权密钥",trigger:["input"]}};return e({model:n,verifyModel:async()=>{var f;await((f=t.value)==null?void 0:f.validate())},updatEdit:f=>{Object.assign(n,{...f})},initData:()=>{Object.assign(n,{algorithm:"",domains:[],exts:[],life:30,secret:""})}}),(f,h)=>{const g=Ne,v=ve,O=Ut,y=Ai,S=tn,w=Re;return L(),W(w,{ref_key:"formRef",ref:t,model:n,rules:o},{default:p(()=>[d(v,{label:f.$t("page.webSet.accessConfig.authKey"),path:"secret"},{feedback:p(()=>[U("span",null,[X(Q(f.$t("page.webSet.accessConfig.authKeyRule"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:s},Q(f.$t("page.webSet.accessConfig.randomGenerate")),1)])]),default:p(()=>[d(g,{value:n.secret,"onUpdate:value":h[0]||(h[0]=_=>n.secret=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.validTime")},{feedback:p(()=>[U("span",null,Q(f.$t("page.webSet.accessConfig.linkValidTimeTip")),1)]),default:p(()=>[d(S,null,{default:p(()=>[d(O,{value:n.life,"onUpdate:value":h[1]||(h[1]=_=>n.life=_),style:{width:"90px"},"show-button":!1},null,8,["value"]),d(y,null,{default:p(()=>[X(Q(f.$t("page.webSet.accessConfig.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d($a,{domains:n.domains,"onUpdate:domains":h[2]||(h[2]=_=>n.domains=_),exts:n.exts,"onUpdate:exts":h[3]||(h[3]=_=>n.exts=_)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),pH=ce(fH,[["__scopeId","data-v-6587bd16"]]),hH=Object.freeze(Object.defineProperty({__proto__:null,default:pH},Symbol.toStringTag,{value:"Module"})),mH=ae({name:"TypeDPage",__name:"type-d-page",setup(i,{expose:e}){const t=B(null),n=fe({algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign",timestampParamName:"t"});function s(){const f=new Uint8Array(16);crypto.getRandomValues(f),n.secret=Array.from(f,h=>h.toString(16).padStart(2,"0")).join("")}const o={secret:{required:!0,message:"请输入鉴权密钥",trigger:["input"]},signParamName:{required:!0,message:"请输入签名参数",trigger:["input"]},timestampParamName:{required:!0,message:"请输入时间戳",trigger:["input"]}};return e({model:n,verifyModel:async()=>{var f;await((f=t.value)==null?void 0:f.validate())},updatEdit:f=>{Object.assign(n,{...f})},initData:()=>{Object.assign(n,{algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign",timestampParamName:"t"})}}),(f,h)=>{const g=Ne,v=ve,O=Ut,y=Ai,S=tn,w=Re;return L(),W(w,{ref_key:"formRef",ref:t,model:n,rules:o},{default:p(()=>[d(v,{label:f.$t("page.webSet.accessConfig.authKey"),path:"secret"},{feedback:p(()=>[U("span",null,[X(Q(f.$t("page.webSet.accessConfig.authKeyRule"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:s},Q(f.$t("page.webSet.accessConfig.randomGenerate")),1)])]),default:p(()=>[d(g,{value:n.secret,"onUpdate:value":h[0]||(h[0]=_=>n.secret=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.signParam"),path:"signParamName"},{default:p(()=>[d(g,{value:n.signParamName,"onUpdate:value":h[1]||(h[1]=_=>n.signParamName=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.timestampParam"),path:"timestampParamName"},{default:p(()=>[d(g,{value:n.timestampParamName,"onUpdate:value":h[2]||(h[2]=_=>n.timestampParamName=_)},null,8,["value"])]),_:1},8,["label"]),d(v,{label:f.$t("page.webSet.accessConfig.validTime")},{feedback:p(()=>[U("span",null,Q(f.$t("page.webSet.accessConfig.linkValidTimeTip")),1)]),default:p(()=>[d(S,null,{default:p(()=>[d(O,{value:n.life,"onUpdate:value":h[3]||(h[3]=_=>n.life=_),style:{width:"90px"},"show-button":!1},null,8,["value"]),d(y,null,{default:p(()=>[X(Q(f.$t("page.webSet.accessConfig.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),d($a,{domains:n.domains,"onUpdate:domains":h[4]||(h[4]=_=>n.domains=_),exts:n.exts,"onUpdate:exts":h[5]||(h[5]=_=>n.exts=_)},null,8,["domains","exts"])]),_:1},8,["model"])}}}),gH=ce(mH,[["__scopeId","data-v-769178fd"]]),vH=Object.freeze(Object.defineProperty({__proto__:null,default:gH},Symbol.toStringTag,{value:"Module"})),bH={class:"text-xs"},OH=ae({name:"AccessDrawer",__name:"access-drawer",props:Be({accessList:{},editData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["addAccess"],["update:visible"]),setup(i,{expose:e,emit:t}){var $;const n=Ze(i,"visible"),s=t,o=B(null),a=B(),l=i,c=J(()=>l.editData.type==="add"?u("page.webSet.accessConfig.createAuthMethod"):u("page.webSet.accessConfig.editAuthMethod")),f=B(!1),h=fe({isOn:!0,authPolicyId:0,authPolicy:{id:0,name:"",isOn:!0,type:"typeA",params:{algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign"}}}),g=Object.assign({"./accessType/basic-auth-page.vue":nH,"./accessType/sub-request-page.vue":oH,"./accessType/type-a-page.vue":rH,"./accessType/type-b-page.vue":uH,"./accessType/type-c-page.vue":hH,"./accessType/type-d-page.vue":vH}),v={};for(const A in g){const R=(($=A.split("/").pop())==null?void 0:$.replace(".vue",""))||"";v[R]=g[A].default}const O=J(()=>{const A=l.accessList.find(R=>R.value===h.authPolicy.type);return v[A.component??"type-a-page"]}),y={authPolicy:{name:{required:!0,message:"请输入名称",trigger:["input"]}}},S=()=>{f.value=!1,n.value=!1},w=async()=>{var q,z,H,F,V,j,se,G,K,de,Oe,we,pe,Se,xe,Me,Pe,st,Ye,it;await((q=o.value)==null?void 0:q.validate()),await await((z=a.value)==null?void 0:z.verifyModel());const A=l.editData.type;let R="/servers/server/settings/access/createPopup";h.authPolicy.params=(H=a.value)==null?void 0:H.model,f.value=!0;const k=new URLSearchParams,T={csrfToken:await Kt(),name:h.authPolicy.name,type:h.authPolicy.type,typeASecret:((F=h.authPolicy.params)==null?void 0:F.secret)??"",typeASignParamName:((V=h.authPolicy.params)==null?void 0:V.signParamName)??"",typeALife:((j=h.authPolicy.params)==null?void 0:j.life)??30,typeBSecret:((se=h.authPolicy.params)==null?void 0:se.secret)??"",typeBLife:((G=h.authPolicy.params)==null?void 0:G.life)??30,typeCSecret:((K=h.authPolicy.params)==null?void 0:K.secret)??"",typeCLife:((de=h.authPolicy.params)==null?void 0:de.life)??30,typeDSecret:((Oe=h.authPolicy.params)==null?void 0:Oe.secret)??"",typeDSignParamName:((we=h.authPolicy.params)==null?void 0:we.signParamName)??"",typeDTimestampParamName:((pe=h.authPolicy.params)==null?void 0:pe.timestampParamName)??"",typeDLife:((Se=h.authPolicy.params)==null?void 0:Se.life)??30,httpAuthBasicAuthUsersJSON:JSON.stringify(((xe=h.authPolicy.params)==null?void 0:xe.users)??[]),basicAuthRealm:((Me=h.authPolicy.params)==null?void 0:Me.realm)??"",basicAuthCharset:((Pe=h.authPolicy.params)==null?void 0:Pe.charset)??"",subRequestURL:((st=h.authPolicy.params)==null?void 0:st.url)??"",subRequestFollowRequest:((Ye=h.authPolicy.params)==null?void 0:Ye.method)??0,subRequestMethod:((it=h.authPolicy.params)==null?void 0:it.method)??"",domainsJSON:JSON.stringify(h.authPolicy.params.domains)};A==="edit"&&(T.policyId=h.authPolicyId,R="/servers/server/settings/access/updatePopup"),Object.entries(T).forEach(([Dt,sn])=>{k.append(Dt,sn)});const M=h.authPolicy.params.exts;if(M.length!==0)for(let Dt=0;Dt<M.length;Dt++)k.append("exts",M[Dt]);const{data:N,error:I}=await oo(k.toString(),R);I||s("addAccess",N.policyRef)},_=J(()=>l.accessList.find(A=>A.value===h.authPolicy.type));return je(()=>n.value,async A=>{var k,x;const R=l.editData.type;if(A&&R==="edit"){Object.assign(h,tt(l.editData.data)),await ia(),(k=a.value)==null||k.updatEdit(h.authPolicy.params);return}(x=a.value)==null||x.initData(),Object.assign(h,{isOn:!0,authPolicyId:0,authPolicy:{id:0,name:"",isOn:!0,type:"typeA",params:{algorithm:"",domains:[],exts:[],life:30,secret:"",signParamName:"sign"}}})}),e({closeIsLoading:S}),(A,R)=>{const k=_e,x=Ne,T=ve,M=ft,N=Re,I=Te,q=re,z=nt,H=ze,F=Pt;return L(),W(F,{show:n.value,"onUpdate:show":R[4]||(R[4]=V=>n.value=V)},{default:p(()=>[d(H,{style:{width:"460px"},title:c.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:R[0]||(R[0]=()=>n.value=!1)},[d(k,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(z,{show:f.value},{default:p(()=>[d(N,{ref_key:"formRef",ref:o,style:{"max-height":"260px",overflow:"auto"},model:h,rules:y},{default:p(()=>[d(T,{label:C(u)("page.webSet.accessConfig.name"),path:"authPolicy.name"},{default:p(()=>[d(x,{value:h.authPolicy.name,"onUpdate:value":R[1]||(R[1]=V=>h.authPolicy.name=V)},null,8,["value"])]),_:1},8,["label"]),d(T,{label:C(u)("page.webSet.accessConfig.authType"),class:"mb-3"},{feedback:p(()=>[U("span",bH,Q(_.value.description),1)]),default:p(()=>[d(M,{value:h.authPolicy.type,"onUpdate:value":R[2]||(R[2]=V=>h.authPolicy.type=V),options:l.accessList,disabled:l.editData.type==="edit"},null,8,["value","options","disabled"])]),_:1},8,["label"]),(L(),W(yn(O.value),{ref_key:"childRef",ref:a},null,512))]),_:1},8,["model"]),d(q,{justify:"center"},{default:p(()=>[d(I,{type:"info",class:"px-6",onClick:w},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1}),d(I,{class:"button-default px-6",onClick:R[3]||(R[3]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),CH=ce(OH,[["__scopeId","data-v-9a6dd9f4"]]),yH={key:2,class:"h-full overflow-y-auto p-2"},SH=ae({name:"AccessConfig",__name:"access-config",setup(i){const e=qe("serverId",B("0")),t=wt(),n=B(!0),s=B(!1),o=B(),a=J(()=>t.isMobile),l=J(()=>a.value?"top":"left"),c=B(!1),f=fe({type:"add"}),h=fe({authConfig:{isPrior:!1,isOn:!1,policyRefs:[]},featureIsOn:!1,webId:0}),g=J(()=>[{label:u("page.webSet.accessConfig.accessList.typeA.label"),value:"typeA",component:"type-a-page",description:u("page.webSet.accessConfig.accessList.typeA.description")},{label:u("page.webSet.accessConfig.accessList.typeB.label"),value:"typeB",component:"type-b-page",description:u("page.webSet.accessConfig.accessList.typeB.description")},{label:u("page.webSet.accessConfig.accessList.typeC.label"),value:"typeC",component:"type-c-page",description:u("page.webSet.accessConfig.accessList.typeC.description")},{label:u("page.webSet.accessConfig.accessList.typeD.label"),value:"typeD",component:"type-d-page",description:u("page.webSet.accessConfig.accessList.typeD.description")},{label:u("page.webSet.accessConfig.accessList.basicAuth.label"),value:"basicAuth",component:"basic-auth-page",description:u("page.webSet.accessConfig.accessList.basicAuth.description")},{label:u("page.webSet.accessConfig.accessList.subRequest.label"),value:"subRequest",component:"sub-request-page",description:u("page.webSet.accessConfig.accessList.subRequest.description")}]),v=R=>{var x,T;switch(R.authPolicy.type){case"typeA":return`${R.authPolicy.params.signParamName}/${u("page.webSet.accessConfig.columns.ttl")}${R.authPolicy.params.life}${u("page.webSet.accessConfig.columns.seconds")}`;case"typeD":return`${R.authPolicy.params.signParamName}/${R.authPolicy.params.timestampParamName}/${u("page.webSet.accessConfig.columns.ttl")}${R.authPolicy.params.life}${u("page.webSet.accessConfig.columns.seconds")}`;case"basicAuth":return`${(T=(x=R.authPolicy.params)==null?void 0:x.users)==null?void 0:T.length}${u("page.webSet.accessConfig.columns.user")}`;case"subRequest":return R.authPolicy.params.url;default:return`${u("page.webSet.accessConfig.columns.ttl")}${R.authPolicy.params.life}${R.authPolicy.params.life}${u("page.webSet.accessConfig.columns.seconds")}`}},O=async()=>{var k;s.value=!0;const{error:R}=await Ee({webId:h.webId,authJSON:JSON.stringify(h.authConfig)},"/servers/server/settings/access");R||(k=window.$message)==null||k.success(u("common.msgSync")),s.value=!1},y=R=>{h.authConfig.policyRefs.splice(R,1),O()},S=()=>{c.value=!0,f.type="add"},w=R=>{f.type="edit",f.data={...R},c.value=!0},_=J(()=>[{title:u("page.webSet.accessConfig.columns.name"),key:"authPolicy.name"},{title:u("page.webSet.accessConfig.columns.authMethod"),key:"authPolicy.type",render:R=>{const k=g.value.find(x=>x.value===R.authPolicy.type);return k==null?void 0:k.label}},{title:u("page.webSet.accessConfig.columns.parameters"),key:"authPolicy.params.life",render:R=>v(R)},{title:u("page.webSet.accessConfig.columns.status"),key:"isOn",align:"center",render:R=>d("span",{class:"text-green"},[R.isOn?u("page.webSet.accessConfig.columns.enabled"):u("page.webSet.accessConfig.columns.disabled")])},{title:u("page.webSet.securityConfig.fiveShield.actions"),align:"center",key:"actions",render:(R,k)=>d(re,{justify:"center",class:"text-xs"},{default:()=>[d("span",{class:"cursor-pointer",onClick:()=>w(R)},[u("common.edit")]),d("span",{class:"cursor-pointer",onClick:()=>y(k)},[u("common.delete")])]})}]),$=async()=>{const R="/servers/server/settings/access",{data:k,error:x}=await ht(R,{serverId:e.value});if(!x&&k){const{featureIsOn:T=!1,authConfig:M,webId:N=0}=k;Object.assign(h,{featureIsOn:T,authConfig:M??h.authConfig,webId:N})}},A=async R=>{var T,M,N,I;if(f.type==="edit"){const q=h.authConfig.policyRefs.findIndex(z=>z.authPolicyId===R.authPolicy.id);q!==-1?(h.authConfig.policyRefs[q].authPolicy={...R.authPolicy},(T=window.$message)==null||T.success(u("common.msgSync"))):console.warn("error"),(M=o.value)==null||M.closeIsLoading();return}const k=tt(h);k.authConfig.policyRefs.push({...R});const{error:x}=await Ee({webId:h.webId,authJSON:JSON.stringify(k.authConfig)},"/servers/server/settings/access");x||(h.authConfig={...k.authConfig},(N=window.$message)==null||N.success(u("common.msgSync"))),(I=o.value)==null||I.closeIsLoading()};return vt(()=>{$().finally(()=>{n.value=!1})}),(R,k)=>{const x=jt,T=nn,M=en,N=ve,I=Re,q=ze,z=Te,H=ws,F=nt;return n.value?(L(),W(x,{key:0})):h.featureIsOn?(L(),te("div",yH,[d(F,{show:s.value},{default:p(()=>[d(C(re),{vertical:""},{default:p(()=>[d(q,{title:C(u)("page.webSet.accessConfig.basicSettings")},{default:p(()=>[d(I,null,{default:p(()=>[d(N,{label:C(u)("page.webSet.accessConfig.enableAuth"),"label-placement":l.value},{default:p(()=>[d(M,{value:h.authConfig.isOn,"onUpdate:value":[k[0]||(k[0]=V=>h.authConfig.isOn=V),O]},null,8,["value"])]),_:1},8,["label","label-placement"])]),_:1})]),_:1},8,["title"]),h.authConfig.isOn?(L(),W(q,{key:0,title:C(u)("page.webSet.accessConfig.authMethod")},{default:p(()=>[d(C(re),{class:"mb-2"},{default:p(()=>[d(z,{type:"info",onClick:k[1]||(k[1]=()=>S())},{default:p(()=>[X(Q(C(u)("page.webSet.accessConfig.addAuthMethod")),1)]),_:1})]),_:1}),d(H,{columns:_.value,data:h.authConfig.policyRefs,pagination:{pageSize:10},size:"small","row-key":V=>V.index,"scroll-x":"max-content",class:"min-h-[280px] w-full text-xs sm:h-full lg:text-[14px] md:text-sm"},null,8,["columns","data","row-key"])]),_:1},8,["title"])):Xe("",!0)]),_:1}),d(CH,{ref_key:"modalRef",ref:o,visible:c.value,"onUpdate:visible":k[2]||(k[2]=V=>c.value=V),"access-list":g.value,"edit-data":f,onAddAccess:A},null,8,["visible","access-list","edit-data"])]),_:1},8,["show"])])):(L(),W(T,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),_H=ce(SH,[["__scopeId","data-v-d93d39dd"]]),wH=ae({name:"MoreConfig",__name:"more-config",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),{activeTab:s,changeMainTab:o}=_a("access"),a=B(null),l=B(0),c=()=>{if(a.value){const g=window.innerHeight-300;l.value=g}};return vt(()=>{c(),window.addEventListener("resize",c)}),Ca(()=>{c()}),(f,h)=>{const g=_s,v=Ss;return L(),W(v,{value:C(s),onActiveNameChange:C(o),ref_key:"tabsRef",ref:a,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:l.value+"px"}:void 0)},{default:p(()=>[d(g,{name:"base",tab:f.$t("page.webSet.accessAuth"),"display-directive":"show:lazy"},{default:p(()=>[d(_H)]),_:1},8,["tab"]),d(g,{name:"referers",tab:f.$t("page.webSet.hotlinkProtection"),"display-directive":"show:lazy"},{default:p(()=>[d(Vz)]),_:1},8,["tab"]),d(g,{name:"multimedia",tab:f.$t("page.webSet.mediaSettings"),"display-directive":"show:lazy"},{default:p(()=>[d(Zz)]),_:1},8,["tab"]),d(g,{name:"requestScripts",tab:f.$t("page.webSet.edgeScript"),"display-directive":"show:lazy"},{default:p(()=>[d(Uz)]),_:1},8,["tab"])]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),kH=ce(wH,[["__scopeId","data-v-391034cb"]]),xH={style:{"max-width":"100%","overflow-x":"auto"}},PH={style:{"min-width":"500px"}},$H={key:0,class:"drag-handle"},TH={key:1},RH=["colspan"],IH=ae({name:"RedirectsTable",__name:"redirects-table",props:Be({columns:{}},{data:{default:()=>[]},dataModifiers:{}}),emits:Be(["updateRedirects"],["update:data"]),setup(i,{emit:e}){const t=e,n=Ze(i,"data"),s=i,o=()=>{t("updateRedirects")};return(a,l)=>{const c=Kc,f=MO;return L(),te(Ce,null,[U("div",xH,[U("div",PH,[d(c,{bordered:!0,"single-line":!0},{default:p(()=>[U("thead",null,[U("tr",null,[(L(!0),te(Ce,null,Ot(s.columns,h=>(L(),te("th",{key:h.key,style:fi({textAlign:h.align||"left",width:h.width||"auto"})},Q(h.title),5))),128))])]),n.value.length>0?(L(),W(C(Sa),{key:0,modelValue:n.value,"onUpdate:modelValue":[l[0]||(l[0]=h=>n.value=h),o],tag:"tbody","item-key":"name",handle:".drag-handle"},{item:p(({element:h,index:g})=>[U("tr",null,[(L(!0),te(Ce,null,Ot(s.columns,v=>(L(),te("td",{key:v.key,style:fi({textAlign:v.align||"left",width:v.width||"auto"})},[v.key==="sort"?(L(),te("div",$H,[v.render?(L(),W(yn(v.render(h,g)),{key:0})):(L(),te(Ce,{key:1},[X(Q(h[v.key]),1)],64))])):(L(),te(Ce,{key:1},[v.render?(L(),W(yn(v.render(h,g)),{key:0})):(L(),te(Ce,{key:1},[X(Q(h[v.key]),1)],64))],64))],4))),128))])]),_:1},8,["modelValue"])):(L(),te("tbody",TH,[U("tr",null,[U("td",{colspan:s.columns.length,style:{"text-align":"center",padding:"20px",color:"#888"}},"暂无数据",8,RH)])]))]),_:1})])]),d(f,{class:"ml-1 text-xs"},{default:p(()=>[X(Q(a.$t("page.webSet.redirectsConfig.sortTip")),1)]),_:1})],64)}}}),K1=ce(IH,[["__scopeId","data-v-789cf84c"]]),QH=ae({name:"UrlConfig",__name:"url-config",props:{value:{default:{isOn:!0,status:0,type:"url",mode:"equal",beforeURL:"",afterURL:"",matchPrefix:!1,matchRegexp:!1,keepRequestURI:!1,keepArgs:!0,conds:{isOn:!1,connector:"and",groups:[]},domainsAll:!1,domainsBefore:[],domainBeforeIgnorePorts:!1,domainAfter:"",domainAfterScheme:"",portsAll:!1,portsBefore:void 0,portAfter:0,portAfterScheme:"",onlyDomains:[],exceptDomains:[]}},valueModifiers:{}},emits:["update:value"],setup(i,{expose:e}){const t=B(null),n=Ze(i,"value"),s=J(()=>[{label:u("page.webSet.redirectsConfig.urlConfig.exactMatch"),value:"equal",description:u("page.webSet.redirectsConfig.urlConfig.exactMatchTip")},{label:u("page.webSet.redirectsConfig.urlConfig.prefixMatch"),value:"matchPrefix",description:u("page.webSet.redirectsConfig.urlConfig.prefixMatchTip")},{label:u("page.webSet.redirectsConfig.urlConfig.regexMatch"),value:"matchRegexp",description:u("page.webSet.redirectsConfig.urlConfig.regexMatchTip",{value:"${1}、${2}"})}]),o=J(()=>[{label:"Default",value:0},{label:"301 - Moved Permanently",value:301},{label:"308 - Permanent Redirect",value:308},{label:"302 - Found",value:302},{label:"303 - See Other",value:303},{label:"307 - Temporary Redirect",value:307}]),a={beforeURL:{validator:(f,h)=>h?/^https?:\/\//.test(h)?Promise.resolve():Promise.reject(new Error("协议地址必须以 http:// 或 https:// 开头")):Promise.reject(new Error("请输入跳转协议地址")),trigger:["input"]},afterURL:{validator:(f,h)=>h?/^https?:\/\//.test(h)?Promise.resolve():Promise.reject(new Error("协议地址必须以 http:// 或 https:// 开头")):Promise.reject(new Error("请输入跳转协议地址")),trigger:["input"]}};e({model:n,verifyModel:async()=>{var f;await((f=t.value)==null?void 0:f.validate())}});const c=J(()=>s.value.find(f=>f.value===n.value.mode));return(f,h)=>{const g=Ne,v=ve,O=ft,y=et,S=Re;return L(),W(S,{ref_key:"formRef",ref:t,class:"px-1 space-y-sm",model:n.value,rules:a},{default:p(()=>[d(v,{label:C(u)("page.webSet.redirectsConfig.urlConfig.beforeUrl"),path:"beforeURL"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.redirectsConfig.urlConfig.beforeUrlTip")),1)]),default:p(()=>[d(g,{value:n.value.beforeURL,"onUpdate:value":h[0]||(h[0]=w=>n.value.beforeURL=w),placeholder:"比如 http://www.url1.com"},null,8,["value"])]),_:1},8,["label"]),d(v,{label:C(u)("page.webSet.redirectsConfig.urlConfig.matchMode")},{feedback:p(()=>{var w;return[U("span",null,Q((w=c.value)==null?void 0:w.description),1)]}),default:p(()=>[d(O,{value:n.value.mode,"onUpdate:value":h[1]||(h[1]=w=>n.value.mode=w),options:s.value},null,8,["value","options"])]),_:1},8,["label"]),d(v,{label:C(u)("page.webSet.redirectsConfig.urlConfig.afterUrl"),path:"afterURL"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.redirectsConfig.urlConfig.afterUrlTip")),1)]),default:p(()=>[d(g,{value:n.value.afterURL,"onUpdate:value":h[2]||(h[2]=w=>n.value.afterURL=w),placeholder:"比如 http://www.url2.com"},null,8,["value"])]),_:1},8,["label"]),n.value.mode==="matchPrefix"?(L(),W(v,{key:0,label:C(u)("page.webSet.redirectsConfig.urlConfig.keepPath")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.redirectsConfig.urlConfig.keepAllTip")),1)]),default:p(()=>[d(y,{checked:n.value.keepRequestURI,"onUpdate:checked":h[3]||(h[3]=w=>n.value.keepRequestURI=w)},null,8,["checked"])]),_:1},8,["label"])):(L(),W(v,{key:1,label:C(u)("page.webSet.redirectsConfig.urlConfig.keepParams")},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.redirectsConfig.urlConfig.keepParamsTip")),1)]),default:p(()=>[d(y,{checked:n.value.keepArgs,"onUpdate:checked":h[4]||(h[4]=w=>n.value.keepArgs=w)},null,8,["checked"])]),_:1},8,["label"])),d(v,{label:C(u)("page.webSet.redirectsConfig.urlConfig.redirectCode")},{default:p(()=>[d(O,{value:n.value.status,"onUpdate:value":h[5]||(h[5]=w=>n.value.status=w),options:o.value},null,8,["value","options"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),AH=ce(QH,[["__scopeId","data-v-d0f0a974"]]),NH=ae({name:"PortConfig",__name:"port-config",props:{value:{default:{isOn:!0,status:0,type:"port",mode:"equal",beforeURL:"",afterURL:"",matchPrefix:!1,matchRegexp:!1,keepRequestURI:!1,keepArgs:!0,conds:{isOn:!1,connector:"and",groups:[]},domainsAll:!1,domainsBefore:[],domainBeforeIgnorePorts:!1,domainAfter:"",domainAfterScheme:"",portsAll:!1,portsBefore:void 0,portAfter:0,portAfterScheme:"",onlyDomains:[],exceptDomains:[]}},valueModifiers:{}},emits:["update:value"],setup(i,{expose:e}){const t=B(null),n=Ze(i,"value"),s={portsBefore:{validator:(c,f)=>!n.value.portsAll&&(!f||f.length===0)?Promise.reject(new Error("请填写跳转前端口")):Promise.resolve(),trigger:["blur","change"]},portAfter:{validator:(c,f)=>f==null||f===0?Promise.reject(new Error("请输入有效的跳转端口")):Promise.resolve(),trigger:["blur","change"]}},o=J(()=>[{label:"Default",value:0},{label:"301 - Moved Permanently",value:301},{label:"308 - Permanent Redirect",value:308},{label:"302 - Found",value:302},{label:"303 - See Other",value:303},{label:"307 - Temporary Redirect",value:307}]),a=J(()=>[{label:"Keep",value:""},{label:"HTTPS",value:"https"},{label:"HTTP",value:"http"}]);return e({model:n,verifyModel:async()=>{var c;await((c=t.value)==null?void 0:c.validate())}}),(c,f)=>{const h=et,g=ve,v=Wt,O=Ut,y=ft,S=Re;return L(),W(S,{ref_key:"formRef",ref:t,class:"px-1",model:n.value,rules:s},{default:p(()=>[d(g,{label:c.$t("page.webSet.redirectsConfig.portConfig.allPorts")},{default:p(()=>[d(h,{checked:n.value.portsAll,"onUpdate:checked":f[0]||(f[0]=w=>n.value.portsAll=w),label:c.$t("page.webSet.redirectsConfig.portConfig.allPortsTip")},null,8,["checked","label"])]),_:1},8,["label"]),n.value.portsAll?Xe("",!0):(L(),W(g,{key:0,label:c.$t("page.webSet.redirectsConfig.portConfig.fromPort"),path:"portsBefore"},{default:p(()=>[d(v,{value:n.value.portsBefore,"onUpdate:value":f[1]||(f[1]=w=>n.value.portsBefore=w)},null,8,["value"])]),_:1},8,["label"])),d(g,{label:c.$t("page.webSet.redirectsConfig.portConfig.toPort"),path:"portAfter"},{default:p(()=>[d(O,{value:n.value.portAfter,"onUpdate:value":f[2]||(f[2]=w=>n.value.portAfter=w),"show-button":!1},null,8,["value"])]),_:1},8,["label"]),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.toProtocol")},{default:p(()=>[d(y,{value:n.value.domainAfterScheme,"onUpdate:value":f[3]||(f[3]=w=>n.value.domainAfterScheme=w),options:a.value},null,8,["value","options"])]),_:1},8,["label"]),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.redirectCode")},{default:p(()=>[d(y,{value:n.value.status,"onUpdate:value":f[4]||(f[4]=w=>n.value.status=w),options:o.value},null,8,["value","options"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),MH=ce(NH,[["__scopeId","data-v-047d453f"]]),LH=ae({name:"DomainConfig",__name:"domain-config",props:{value:{default:{isOn:!0,status:0,type:"domain",mode:"equal",beforeURL:"",afterURL:"",matchPrefix:!1,matchRegexp:!1,keepRequestURI:!1,keepArgs:!0,conds:{isOn:!1,connector:"and",groups:[]},domainsAll:!1,domainsBefore:[],domainBeforeIgnorePorts:!1,domainAfter:"",domainAfterScheme:"",portsAll:!1,portsBefore:void 0,portAfter:0,portAfterScheme:"",onlyDomains:[],exceptDomains:[]}},valueModifiers:{}},emits:["update:value"],setup(i,{expose:e}){const t=B(null),n=Ze(i,"value"),s=J(()=>[{label:"Default",value:0},{label:"301 - Moved Permanently",value:301},{label:"308 - Permanent Redirect",value:308},{label:"302 - Found",value:302},{label:"303 - See Other",value:303},{label:"307 - Temporary Redirect",value:307}]),o=J(()=>[{label:"Keep",value:""},{label:"HTTPS",value:"https"},{label:"HTTP",value:"http"}]),a={domainAfter:{validator:(c,f)=>f?/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/.test(f)?Promise.resolve():Promise.reject(new Error("请输入合法的域名，例如 example.com")):Promise.reject(new Error("这里填写的是网址中的域名部分，不需要添加https://部分。")),trigger:["input"]}};return e({model:n,verifyModel:async()=>{var c;await((c=t.value)==null?void 0:c.validate())}}),(c,f)=>{const h=et,g=ve,v=Wt,O=Ne,y=ft,S=Re;return L(),W(S,{ref_key:"formRef",ref:t,class:"px-1",model:n.value,rules:a},{default:p(()=>[d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.allDomains")},{default:p(()=>[d(h,{checked:n.value.domainsAll,"onUpdate:checked":f[0]||(f[0]=w=>n.value.domainsAll=w),label:c.$t("page.webSet.redirectsConfig.domainConfig.allDomainsTip")},null,8,["checked","label"])]),_:1},8,["label"]),n.value.domainsAll?Xe("",!0):(L(),W(g,{key:0,label:c.$t("page.webSet.redirectsConfig.domainConfig.fromDomain")},{default:p(()=>[d(v,{value:n.value.domainsBefore,"onUpdate:value":f[1]||(f[1]=w=>n.value.domainsBefore=w)},null,8,["value"])]),_:1},8,["label"])),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.ignorePort")},{default:p(()=>[d(h,{checked:n.value.domainBeforeIgnorePorts,"onUpdate:checked":f[2]||(f[2]=w=>n.value.domainBeforeIgnorePorts=w),label:c.$t("page.webSet.redirectsConfig.domainConfig.ignorePortTip")},null,8,["checked","label"])]),_:1},8,["label"]),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.toDomain"),class:"mt-3",path:"domainAfter"},{default:p(()=>[d(O,{value:n.value.domainAfter,"onUpdate:value":f[3]||(f[3]=w=>n.value.domainAfter=w),placeholder:"example.com"},null,8,["value"])]),_:1},8,["label"]),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.toProtocol")},{default:p(()=>[d(y,{value:n.value.domainAfterScheme,"onUpdate:value":f[4]||(f[4]=w=>n.value.domainAfterScheme=w),options:o.value},null,8,["value","options"])]),_:1},8,["label"]),d(g,{label:c.$t("page.webSet.redirectsConfig.domainConfig.redirectCode")},{default:p(()=>[d(y,{value:n.value.status,"onUpdate:value":f[5]||(f[5]=w=>n.value.status=w),options:s.value},null,8,["value","options"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),UH=ce(LH,[["__scopeId","data-v-81e7b5ce"]]),DH=ae({name:"RedirectsDrawer",__name:"redirects-drawer",props:Be({editData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["addRedirect"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=Ze(i,"visible"),s=i,o=B(!1),a=J(()=>s.editData.type==="add"?u("page.webSet.redirectsConfig.createCond"):u("page.webSet.redirectsConfig.editCond")),l=t,c=fe({isOn:!0,status:0,type:"url",mode:"equal",beforeURL:"",afterURL:"",matchPrefix:!1,matchRegexp:!1,keepRequestURI:!1,keepArgs:!1,conds:{isOn:!1,connector:"and",groups:[]},domainsAll:!1,domainsBefore:[],domainBeforeIgnorePorts:!1,domainAfter:"",domainAfterScheme:"",portsAll:!1,portsBefore:void 0,portAfter:0,portAfterScheme:"",onlyDomains:[],exceptDomains:[]}),f=B(),h=J(()=>[{label:u("page.webSet.redirectsConfig.urlRedirect"),value:"url"},{label:u("page.webSet.redirectsConfig.domainRedirect"),value:"domain"},{label:u("page.webSet.redirectsConfig.portRedirect"),value:"port"}]),g={url:AH,port:MH,domain:UH},v=J(()=>g[c.type]||null),O=async()=>{var S,w;await((S=f.value)==null?void 0:S.verifyModel()),o.value=!0,l("addRedirect",(w=f.value)==null?void 0:w.model)},y=()=>{o.value=!1,n.value=!1};return je(()=>s.editData.data,S=>{S&&Object.assign(c,tt(S))},{deep:!0,immediate:!0}),je(()=>n.value,S=>{S||Object.assign(c,{isOn:!0,status:0,type:"url",mode:"equal",beforeURL:"",afterURL:"",matchPrefix:!1,matchRegexp:!1,keepRequestURI:!1,keepArgs:!1,conds:{isOn:!1,connector:"and",groups:[]},domainsAll:!1,domainsBefore:[],domainBeforeIgnorePorts:!1,domainAfter:"",domainAfterScheme:"",portsAll:!1,portsBefore:void 0,portAfter:0,portAfterScheme:"",onlyDomains:[],exceptDomains:[]})}),e({closeLoading:y}),(S,w)=>{const _=_e,$=ft,A=ve,R=Re,k=Te,x=re,T=nt,M=ze,N=Pt;return L(),W(N,{show:n.value,"onUpdate:show":w[4]||(w[4]=I=>n.value=I)},{default:p(()=>[d(M,{style:{width:"460px"},title:a.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:w[0]||(w[0]=()=>n.value=!1)},[d(_,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),default:p(()=>[d(T,{show:o.value},{default:p(()=>[d(R,{style:{"max-height":"240px","overflow-y":"auto"}},{default:p(()=>[d(A,{label:C(u)("page.webSet.redirectsConfig.redirectType")},{default:p(()=>[d($,{value:c.type,"onUpdate:value":w[1]||(w[1]=I=>c.type=I),options:h.value},null,8,["value","options"])]),_:1},8,["label"]),(L(),W(yn(v.value),{ref_key:"childRef",ref:f,value:c,"onUpdate:value":w[2]||(w[2]=I=>c=I)},null,40,["value"]))]),_:1}),d(x,{justify:"center",class:"mt-4"},{default:p(()=>[d(k,{class:"px-6",type:"info",onClick:O},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1}),d(k,{class:"button-default px-6",onClick:w[3]||(w[3]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),qH=ce(DH,[["__scopeId","data-v-af20ef9d"]]),EH={class:"h-full overflow-y-auto p-2"},BH=ae({name:"RedirectsConfig",__name:"redirects-config",setup(i){const e=qe("serverId",B("0")),t=B(!0),n=B(!1),s=B(),o=fe({featureIsOn:!1,redirects:[],webId:0}),a=async()=>{const y="/servers/server/settings/redirects",{data:S,error:w}=await ht(y,{serverId:e.value});if(!w&&S){const{featureIsOn:_=!1,redirects:$=[],webId:A=0}=S;Object.assign(o,{featureIsOn:_,redirects:$??[],webId:A})}},l=async()=>{var w,_;const y="/servers/server/settings/redirects",{error:S}=await Ee({webId:o.webId,hostRedirectsJSON:JSON.stringify(o.redirects)},y);S||(w=window.$message)==null||w.success(u("common.msgSync")),(_=s.value)==null||_.closeLoading()},c=fe({type:"add"}),f=async y=>{o.redirects.splice(y,1),await l()},h=(y,S)=>{c.type="edit",c.data={...y,portsBefore:y.portsBefore??[]},c.index=S,n.value=!0},g=J(()=>[{title:u("page.webSet.redirectsConfig.columns.sort"),key:"sort",width:"20px",align:"center",render:y=>d("div",{class:"cursor-pointer"},[d(_e,{localIcon:"material-symbols--menu-rounded",class:"text-[20px]"},null)])},{title:u("page.webSet.redirectsConfig.columns.from"),align:"center",key:"beforeURL",render:y=>{const $={url:()=>d(Ce,null,[y.beforeURL]),domain:()=>{const R=y.domainsAll;return d(Ce,null,[R?u("page.webSet.redirectsConfig.columns.allDomain"):y.domainsBefore.map((k,x)=>d("div",{key:x},[k]))])},port:()=>{const R=y.portsAll;return d(Ce,null,[R?u("page.webSet.redirectsConfig.columns.allPort"):y.portsBefore.map((k,x)=>d("div",{key:x},[k]))])}},A=y.type;return d(Ce,null,[$[A]()])}},{title:u("page.webSet.redirectsConfig.columns.to"),align:"center",key:"afterURL",render:y=>{const $={url:()=>d(Ce,null,[y.afterURL]),domain:()=>d(Ce,null,[y.domainAfter]),port:()=>d(Ce,null,[y.portAfter])},A=y.type;return d(Ce,null,[$[A]()])}},{title:u("page.webSet.redirectsConfig.columns.status"),align:"center",key:"status",render:y=>d("span",{class:"text-green"},[u("page.webSet.redirectsConfig.columns.enabled")])},{title:u("page.webSet.redirectsConfig.columns.ops"),align:"center",width:"150px",key:"operate",render:(y,S)=>d(re,{justify:"center"},{default:()=>[d("div",{onClick:()=>h(y,S),class:"cursor-pointer text-xs"},[u("common.modify")]),d("div",{onClick:()=>f(S),class:"cursor-pointer text-xs"},[u("common.delete")])]})}]),v=()=>{c.type="add",c.data=null,n.value=!0},O=y=>{c.type==="add"?o.redirects.push({...y}):o.redirects[c.index??0]={...y},l()};return vt(()=>{a().finally(()=>{t.value=!1})}),(y,S)=>{const w=ao;return t.value?(L(),W(jt,{key:0})):o.featureIsOn?(L(),te(Ce,{key:2},[U("div",EH,[d(C(re),{vertical:""},{default:p(()=>[Zt(d(C(re),null,{default:p(()=>[d(C(Te),{type:"info",class:"px-6",onClick:S[0]||(S[0]=()=>v())},{default:p(()=>[X(Q(C(u)("page.webSet.redirectsConfig.create")),1)]),_:1})]),_:1},512),[[zt,o.redirects.length!==0]]),o.redirects.length===0?(L(),W(w,{key:0,type:"info"},{default:p(()=>[X(Q(C(u)("page.webSet.redirectsConfig.noRewrite"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:S[1]||(S[1]=()=>v())},Q(C(u)("page.webSet.redirectsConfig.createTip")),1)]),_:1})):(L(),W(K1,{key:1,data:o.redirects,"onUpdate:data":S[2]||(S[2]=_=>o.redirects=_),columns:g.value,onUpdateRedirects:l},null,8,["data","columns"]))]),_:1})]),d(qH,{ref_key:"modalRef",ref:s,visible:n.value,"onUpdate:visible":S[3]||(S[3]=_=>n.value=_),"edit-data":c,onAddRedirect:O},null,8,["visible","edit-data"])],64)):(L(),W(nn,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),ZH=ce(BH,[["__scopeId","data-v-2ccd9bdc"]]),zH=ae({name:"RewriteDrawer",__name:"rewrite-drawer",props:Be({webId:{},editData:{}},{visible:{default:!1},visibleModifiers:{}}),emits:Be(["getData"],["update:visible"]),setup(i,{expose:e,emit:t}){const n=Ze(i,"visible"),s=B(!1),o=t,a=i,l=J(()=>a.editData.type==="add"?u("page.webSet.rewriteConfig.createRewrite"):u("page.webSet.rewriteConfig.editRewrite")),c=B(null),f=fe({id:0,isOn:!0,conds:{isOn:!1,connector:"and",groups:[]},pattern:"",mode:"proxy",redirectStatus:307,proxyHost:"",replace:"",isBreak:!1,withQuery:!1}),h=J(()=>[{label:u("page.webSet.rewriteConfig.visible"),value:"proxy"},{label:u("page.webSet.rewriteConfig.hidden"),value:"redirect"}]),g={pattern:{required:!0,message:u("page.webSet.rewriteConfig.inputRule"),trigger:["input"]},replace:{required:!0,message:u("page.webSet.rewriteConfig.inputTarget"),trigger:["input"]}},v=async()=>{var _,$;await((_=c.value)==null?void 0:_.validate());let y="/servers/server/settings/rewrite/createPopup";s.value=!0;const S={webId:a.webId,pattern:f.pattern,replace:f.replace,mode:f.mode,condsJSON:JSON.stringify(f.conds),redirectStatus:307,proxyHost:f.proxyHost,isOn:f.isOn??1};f.withQuery===!0&&(S.withQuery=1),f.isBreak===!0&&(S.isBreak=1),a.editData.type==="edit"&&(S.rewriteRuleId=f.id,y="/servers/server/settings/rewrite/updatePopup");const{error:w}=await Ee(S,y);w||($=window.$message)==null||$.success(u("common.msgSync")),o("getData")},O=()=>{s.value=!1,n.value=!1};return je(()=>a.editData.data,y=>{y&&Object.assign(f,tt(y))},{deep:!0,immediate:!0}),je(()=>n.value,y=>{y||Object.assign(f,{id:0,isOn:!0,conds:{isOn:!1,connector:"and",groups:[]},pattern:"",mode:"proxy",redirectStatus:307,proxyHost:"",replace:"",isBreak:!1,withQuery:!1})}),e({closeLoading:O}),(y,S)=>{const w=_e,_=Ne,$=ve,A=ft,R=un,k=et,x=Xt,T=Ht,M=Re,N=nt,I=Te,q=re,z=ze,H=Pt;return L(),W(H,{show:n.value,"onUpdate:show":S[10]||(S[10]=F=>n.value=F)},{default:p(()=>[d(z,{style:{width:"460px"},title:l.value,bordered:!1,size:"huge",role:"dialog"},{"header-extra":p(()=>[U("span",{onClick:S[0]||(S[0]=()=>n.value=!1)},[d(w,{"local-icon":"material-symbols-light--close-rounded",class:"transform cursor-pointer text-2xl transition-transform duration-300 hover:rotate-90"})])]),footer:p(()=>[d(q,{justify:"center"},{default:p(()=>[d(I,{disabled:s.value,class:"px-6",type:"info",onClick:S[8]||(S[8]=()=>v())},{default:p(()=>[X(Q(C(u)("common.save")),1)]),_:1},8,["disabled"]),d(I,{class:"button-default px-6",onClick:S[9]||(S[9]=()=>n.value=!1)},{default:p(()=>[X(Q(C(u)("common.cancel")),1)]),_:1})]),_:1})]),default:p(()=>[d(N,{show:s.value},{default:p(()=>[d(M,{ref_key:"formRef",ref:c,class:"px-2",style:{"max-height":"240px","overflow-y":"auto"},model:f,rules:g},{default:p(()=>[d($,{label:C(u)("page.webSet.rewriteConfig.matchRule"),class:"mb-3",path:"pattern"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.rewriteConfig.matchRuleDesc")),1)]),default:p(()=>[d(_,{value:f.pattern,"onUpdate:value":S[1]||(S[1]=F=>f.pattern=F)},null,8,["value"])]),_:1},8,["label"]),d($,{label:C(u)("page.webSet.rewriteConfig.targetURL"),class:"mb-3",path:"replace"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.rewriteConfig.targetURLDesc")),1)]),default:p(()=>[d(_,{value:f.replace,"onUpdate:value":S[2]||(S[2]=F=>f.replace=F)},null,8,["value"])]),_:1},8,["label"]),d($,{label:C(u)("page.webSet.rewriteConfig.forwardMode"),class:"mb-3"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.rewriteConfig.forwardModeDesc")),1)]),default:p(()=>[d(A,{value:f.mode,"onUpdate:value":S[3]||(S[3]=F=>f.mode=F),options:h.value},null,8,["value","options"])]),_:1},8,["label"]),d(T,{"arrow-placement":"right"},{default:p(()=>[d(x,{name:"more"},{header:p(()=>[d(R,null,{default:p(()=>[X(Q(C(u)("page.webSet.httpConfig.moreSetting")),1)]),_:1})]),arrow:p(()=>[d(w,{"local-icon":"meteor-icons--angle-right"})]),default:p(()=>[d($,{label:C(u)("page.webSet.rewriteConfig.proxyHost"),class:"mb-3"},{feedback:p(()=>[U("span",null,Q(C(u)("page.webSet.rewriteConfig.proxyHostDesc")),1)]),default:p(()=>[d(_,{value:f.proxyHost,"onUpdate:value":S[4]||(S[4]=F=>f.proxyHost=F)},null,8,["value"])]),_:1},8,["label"]),d($,{label:C(u)("page.webSet.rewriteConfig.keepParams")},{default:p(()=>[d(k,{checked:f.withQuery,"onUpdate:checked":S[5]||(S[5]=F=>f.withQuery=F),label:C(u)("page.webSet.rewriteConfig.keepParamsDesc")},null,8,["checked","label"])]),_:1},8,["label"]),d($,{label:C(u)("page.webSet.rewriteConfig.stopMatch")},{default:p(()=>[d(k,{checked:f.isBreak,"onUpdate:checked":S[6]||(S[6]=F=>f.isBreak=F),label:C(u)("page.webSet.rewriteConfig.stopMatchDesc")},null,8,["checked","label"])]),_:1},8,["label"]),d($,{label:C(u)("page.webSet.rewriteConfig.enableRewrite")},{default:p(()=>[d(k,{checked:f.isOn,"onUpdate:checked":S[7]||(S[7]=F=>f.isOn=F),label:C(u)("page.webSet.rewriteConfig.enableRewriteDesc")},null,8,["checked","label"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["show"])]),_:1},8,["title"])]),_:1},8,["show"])}}}),HH=ce(zH,[["__scopeId","data-v-362cee19"]]),XH={key:2,class:"h-full overflow-y-auto p-2"},jH=ae({name:"RewriteConfig",__name:"rewrite-config",setup(i){const e=qe("serverId",B("0")),t=fe({type:"add"}),n=B(!0),s=B(!1),o=B(!1),a=B(),l=fe({rewriteRules:[],featureIsOn:!1,webId:0}),c=async()=>{var _;const y="/servers/server/settings/rewrite",{data:S,error:w}=await ht(y,{serverId:e.value});if(!w&&S){const{featureIsOn:$=!1,rewriteRules:A=[],webId:R=0}=S;Object.assign(l,{featureIsOn:$,rewriteRules:A??[],webId:R})}(_=a.value)==null||_.closeLoading(),s.value=!1},f=y=>{t.type="edit",t.data={...y},o.value=!0},h=async y=>{var w;s.value=!0;const{error:S}=await Ee({webId:l.webId,rewriteRuleId:y.id},"/servers/server/settings/rewrite/delete");S||(await c(),(w=window.$message)==null||w.success(u("common.msgSync")))},g=()=>{t.type="add",o.value=!0},v=J(()=>[{title:u("page.webSet.redirectsConfig.columns.sort"),key:"sort",width:"20px",align:"center",render:y=>d("div",{class:"cursor-pointer"},[d(_e,{localIcon:"material-symbols--menu-rounded",class:"text-[20px]"},null)])},{title:u("page.webSet.rewriteConfig.columns.matchRule"),align:"center",key:"pattern"},{title:u("page.webSet.rewriteConfig.columns.target"),align:"center",key:"replace"},{title:u("page.webSet.rewriteConfig.columns.forwardType"),align:"center",key:"mode"},{title:u("page.webSet.redirectsConfig.columns.status"),key:"isOn",align:"center",render:y=>d(Ce,null,[y.isOn?u("page.webSet.redirectsConfig.columns.enabled"):u("page.webSet.redirectsConfig.columns.disabled")])},{title:u("page.webSet.redirectsConfig.columns.ops"),key:"operate",align:"center",render:y=>d(re,{justify:"center"},{default:()=>[d("div",{onClick:()=>f(y),class:"cursor-pointer text-xs"},[u("common.modify")]),d("div",{onClick:()=>h(y),class:"cursor-pointer text-xs"},[u("common.delete")])]})}]),O=async()=>{var _;const y=l.rewriteRules.map($=>$.id),S=new URLSearchParams;S.append("webId",l.webId.toString()),y.forEach($=>{S.append("rewriteRuleIds",$.toString())});const{error:w}=await oo(S.toString(),"/servers/server/settings/rewrite/sort");w||(_=window.$message)==null||_.success(u("common.msgSync"))};return vt(()=>{c().finally(()=>{n.value=!1})}),(y,S)=>{const w=jt,_=nn,$=Te,A=ao,R=nt;return n.value?(L(),W(w,{key:0})):l.featureIsOn?(L(),te("div",XH,[d(C(re),{vertical:""},{default:p(()=>[d(R,{show:s.value},{default:p(()=>[Zt(d(C(re),{class:"mb-3"},{default:p(()=>[d($,{type:"info",class:"px-6",onClick:S[0]||(S[0]=()=>g())},{default:p(()=>[X(Q(C(u)("page.webSet.redirectsConfig.create")),1)]),_:1})]),_:1},512),[[zt,l.rewriteRules.length!==0]]),l.rewriteRules.length===0?(L(),W(A,{key:0,type:"info"},{default:p(()=>[X(Q(C(u)("page.webSet.rewriteConfig.noRewrite"))+" ",1),U("span",{class:"cursor-pointer text-[#36C677]",onClick:S[1]||(S[1]=()=>g())},Q(C(u)("page.webSet.rewriteConfig.createFirst")),1)]),_:1})):(L(),W(K1,{key:1,data:l.rewriteRules,"onUpdate:data":S[2]||(S[2]=k=>l.rewriteRules=k),columns:v.value,onUpdateRedirects:O},null,8,["data","columns"]))]),_:1},8,["show"])]),_:1}),d(HH,{ref_key:"modalRef",ref:a,visible:o.value,"onUpdate:visible":S[3]||(S[3]=k=>o.value=k),"web-id":l.webId,"edit-data":t,onGetData:c},null,8,["visible","web-id","edit-data"])])):(L(),W(_,{key:1,title:"系统提示",message:"当前网站绑定的套餐或当前用户未开通此功能。"}))}}}),VH=ce(jH,[["__scopeId","data-v-1d0ee384"]]),FH=ae({name:"RoutingConfig",__name:"routing-config",setup(i){const e=wt(),t=J(()=>e.isMobile),n=J(()=>t.value?"top":"left"),s=B(null),o=B(0),a=()=>{if(s.value){const g=window.innerHeight-300;o.value=g}},{activeTab:l,changeMainTab:c}=_a("URLRewrite");return vt(()=>{a(),window.addEventListener("resize",a)}),Ca(()=>{a()}),(f,h)=>{const g=_s,v=Ss;return L(),W(v,{value:C(l),onActiveNameChange:C(c),ref_key:"tabsRef",ref:s,placement:n.value,type:t.value?"bar":"line",style:fi(n.value==="left"?{height:o.value+"px"}:void 0)},{default:p(()=>[d(g,{name:"base",tab:f.$t("page.webSet.URLRewrite"),"display-directive":"show:lazy"},{default:p(()=>[d(ZH)]),_:1},8,["tab"]),d(g,{name:"rewrite",tab:f.$t("page.webSet.rewrite"),"display-directive":"show:lazy"},{default:p(()=>[d(VH)]),_:1},8,["tab"])]),_:1},8,["value","onActiveNameChange","placement","type","style"])}}}),WH=ce(FH,[["__scopeId","data-v-67baf084"]]),YH={class:"flex items-center gap-2"},w6=ae({name:"servers_server-set",__name:"index",setup(i){const e=Ws(),t=TO(),n=J(()=>e.query.serverId),s=B([]),o=B(e.query.tab||"config");function a(l){o.value=l;const c={...e.query,tab:l};delete c.panel;const f=t.resolve({query:c}).fullPath;window.history.replaceState({},"","#"+f),Object.assign(e.query,c)}return Nn("serverId",n),Nn("leftMenuItems",s),Nn("activeTab",o),Nn("changeMainTab",a),(l,c)=>{const f=_e,h=re,g=_s,v=Ss,O=ze;return L(),W(h,{vertical:"",size:16},{default:p(()=>[d(O,{style:{"margin-bottom":"16px"}},{header:p(()=>[d(h,{class:"items-center justify-center"},{default:p(()=>[U("div",YH,[U("span",{class:"cursor-pointer",onClick:c[0]||(c[0]=y=>C(t).back())},[d(f,{"local-icon":"material-symbols--arrow-back-rounded",class:"text-xl"})]),X(" "+Q(l.$t("page.webSet.title")),1)])]),_:1})]),default:p(()=>[d(v,{value:o.value,type:"line",animated:"",onActiveNameChange:a},{default:p(()=>[d(g,{name:"config",tab:l.$t("page.webSet.config"),"display-directive":"show:lazy"},{default:p(()=>[d(YT)]),_:1},8,["tab"]),d(g,{name:"security",tab:l.$t("page.webSet.security"),"display-directive":"show:lazy"},{default:p(()=>[d(qN)]),_:1},8,["tab"]),d(g,{name:"performanceOptimization",tab:l.$t("page.webSet.performanceOptimization"),"display-directive":"show:lazy"},{default:p(()=>[d(g3)]),_:1},8,["tab"]),d(g,{name:"pages",tab:l.$t("page.webSet.pages"),"display-directive":"show:lazy"},{default:p(()=>[d(sU)]),_:1},8,["tab"]),d(g,{name:"rout",tab:l.$t("page.webSet.rout"),"display-directive":"show:lazy"},{default:p(()=>[d(WH)]),_:1},8,["tab"]),d(g,{name:"statistics",tab:l.$t("page.webSet.accessStats"),"display-directive":"show:lazy"},{default:p(()=>[d(hU)]),_:1},8,["tab"]),d(g,{name:"advancedOptions",tab:l.$t("page.webSet.advancedOptions"),"display-directive":"show:lazy"},{default:p(()=>[d(kH)]),_:1},8,["tab"])]),_:1},8,["value"])]),_:1})]),_:1})}}});export{w6 as default};
