import{o as d,c as y,w as a,u as o,g as _,h as p,b as l,a as e,f as s,d as m,e as r}from"./app-DnroACXc.js";import{P as x}from"./app-CyTk3GnO.js";import{i as v,c as V}from"./app-DckefXYL.js";import{_ as $}from"./app-COct4tsy.js";import{_ as h}from"./app-DPkDcD7h.js";import{_ as u}from"./app-BbRQPmFH.js";import{_ as N}from"./app-MnSDCF4P.js";import{C as f}from"./app-Do8DhyKT.js";import{_ as b}from"./app-DgnBmb6X.js";import{_ as w}from"./app-BdF_-Hag.js";import{_ as C}from"./app-CK7oTdUW.js";import{_ as R}from"./app-opw5m6VV.js";import{_ as S}from"./app-DopjFQfo.js";import{_ as k}from"./app-MU2_eMWn.js";import{D as P}from"./app-Cx7ENVlu.js";import"./app-CUqfl6on.js";import"./app-LqsmzyUT.js";import"./app-CF0qXH5Q.js";import"./app-B4bUdtyo.js";import"./app-CYYQ_Zep.js";import"./app-B8VsrFxM.js";import"./app-B09rlSqG.js";import"./app-xbpVC8gr.js";import"./app-DFWP-E91.js";import"./app-DntYVxd7.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-xECxwo4T.js";import"./app-z7Z_Uo-k.js";function B(){v(this),this.shouldReplace=!1,this.headerName="",this.selectHeader=function(c){this.headerName=c}}const g={key:0},D={key:1},T=["value"],X=["value"],H=e("td",{class:"title"},[s("报头名称"),e("em",null,"（Name）"),s(" *")],-1),I={class:"comment"},L=e("td",null,[s("值"),e("em",null,"（Value）")],-1),U=e("p",{class:"comment"},"可以包含请求变量。",-1),q={colspan:"2"},A=e("td",null,"支持的状态码",-1),E=e("p",{class:"comment"},"不填表示支持所有的状态码。",-1),O=e("td",null,"支持的请求方法",-1),Y=e("td",null,"支持的域名",-1),j=e("td",null,"只附加不替换",-1),z=e("p",{class:"comment"},"选中后表示如果已经存在同名的报头，则只会附加在原有的报头之后，不会覆盖。",-1),F=e("td",null,"不在跳转时启用",-1),G=e("p",{class:"comment"},"选中后表示在30X跳转时不启用当前报头。",-1),J=e("td",{class:"color-border"},"启用内容替换",-1),K=e("p",{class:"comment"},"可以替换原有报头中的内容。",-1),M=e("td",{class:"color-border"},"替换内容",-1),Be={__name:"createSetPopup",setup(c){const t=V(new B);return(Q,n)=>(d(),y(x,null,{default:a(()=>[o(t).type=="request"?(d(),_("header",g,"添加自定义请求报头")):p("",!0),o(t).type=="response"?(d(),_("header",D,"添加自定义响应报头")):p("",!0),l(N,{action:"$",onSuccess:o(t).success},{default:a(()=>[e("input",{type:"hidden",name:"headerPolicyId",value:o(t).headerPolicyId},null,8,T),e("input",{type:"hidden",name:"type",value:o(t).type},null,8,X),l(P,null,{default:a(()=>[e("tbody",null,[e("tr",null,[H,e("td",null,[l(h,{type:"text",name:"name",value:"",maxlength:"200",placeholder:"类似于Server、Content-Type之类",autofocus:"",modelValue:o(t).headerName,"onUpdate:modelValue":n[0]||(n[0]=i=>o(t).headerName=i),autocomplete:"off",class:"w-full"},null,8,["modelValue"]),e("p",I,[l(b,{"v-type":o(t).type,"v-value":o(t).headerName,onSelect:o(t).selectHeader,class:"my-1"},null,8,["v-type","v-value","onSelect"]),s("请注意报头名称的大小写，如无特殊需求，报头名称的格式通常为"),l(f,null,{default:a(()=>[s("Xxx")]),_:1}),s("或者"),l(f,null,{default:a(()=>[s("Xxx-Yyy")]),_:1}),s("。")])])]),e("tr",null,[L,e("td",null,[l(h,{type:"text",name:"value",maxlength:"500",class:"w-full"}),U])]),e("tr",null,[e("td",q,[l(w,null,{default:a(()=>[s("更多选项")]),_:1})])])]),m(e("tbody",null,[m(e("tr",null,[A,e("td",null,[l(R),E])],512),[[r,o(t).type=="response"]]),e("tr",null,[O,e("td",null,[l(S)])]),e("tr",null,[Y,e("td",null,[l(C)])]),e("tr",null,[j,e("td",null,[l(u,{name:"shouldAppend"}),z])]),m(e("tr",null,[F,e("td",null,[l(u,{name:"disableRedirect"}),G])],512),[[r,o(t).type=="response"]]),e("tr",null,[J,e("td",null,[l(u,{name:"shouldReplace",modelValue:o(t).shouldReplace,"onUpdate:modelValue":n[1]||(n[1]=i=>o(t).shouldReplace=i)},null,8,["modelValue"]),K])]),m(e("tr",null,[M,e("td",null,[l(k)])],512),[[r,o(t).shouldReplace]])],512),[[r,o(t).moreOptionsVisible]])]),_:1}),l($)]),_:1},8,["onSuccess"])]),_:1}))}};export{Be as default};
