import{l as w,B as Vt,C as Ht,D as jt,u,E as q,g as U,_ as Gt,G as Wt,d as Oe,a as Ne,b as Kt,c as Pe,e as Jt,f as zt,i as $t,m as X,H as Ue,r as me,o as b,j as G,w as m,k as P,n as le,q as R,I as Qt,p as k,t as W,s as E,F as Se,S as Yt,J as Xt,K as Zt,L as ea,M as ta,x as aa,y as ra,N as na,O as ia,z as oa,A as la,R as sa,P as ua,Q as fa,U as da,W as ca,T as pa,X as ha,Y as ma,Z as ya}from"./doc-30bb18f4.js";var ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"};const va=ga;function ot(t){for(var e=1;e"u"||!O?F:O(Uint8Array),ie={"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":se&&O?O([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":ue,"%AsyncGenerator%":ue,"%AsyncGeneratorFunction%":ue,"%AsyncIteratorPrototype%":ue,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":Et,"%GeneratorFunction%":ue,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":se&&O?O(O([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!se||!O?F:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!se||!O?F:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":se&&O?O(""[Symbol.iterator]()):F,"%Symbol%":se?Symbol:F,"%SyntaxError%":de,"%ThrowTypeError%":Pa,"%TypedArray%":Aa,"%TypeError%":fe,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(O)try{null.error}catch(t){var Ia=O(O(t));ie["%Error.prototype%"]=Ia}var Ba=function t(e){var a;if(e==="%AsyncFunction%")a=Ie("async function () {}");else if(e==="%GeneratorFunction%")a=Ie("function* () {}");else if(e==="%AsyncGeneratorFunction%")a=Ie("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(a=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&O&&(a=O(n.prototype))}return ie[e]=a,a},ut={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},be=Xe,xe=Na,Ma=be.call(Function.call,Array.prototype.concat),La=be.call(Function.apply,Array.prototype.splice),ft=be.call(Function.call,String.prototype.replace),De=be.call(Function.call,String.prototype.slice),qa=be.call(Function.call,RegExp.prototype.exec),Va=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ha=/\\(\\)?/g,ja=function(e){var a=De(e,0,1),r=De(e,-1);if(a==="%"&&r!=="%")throw new de("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&a!=="%")throw new de("invalid intrinsic syntax, expected opening `%`");var n=[];return ft(e,Va,function(i,s,l,o){n[n.length]=l?ft(o,Ha,"$1"):s||i}),n},Ga=function(e,a){var r=e,n;if(xe(ut,r)&&(n=ut[r],r="%"+n[0]+"%"),xe(ie,r)){var i=ie[r];if(i===ue&&(i=Ba(r)),typeof i>"u"&&!a)throw new fe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new de("intrinsic "+e+" does not exist!")},Ze=function(e,a){if(typeof e!="string"||e.length===0)throw new fe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof a!="boolean")throw new fe('"allowMissing" argument must be a boolean');if(qa(/^%?[^%]*%?$/,e)===null)throw new de("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ja(e),n=r.length>0?r[0]:"",i=Ga("%"+n+"%",a),s=i.name,l=i.value,o=!1,f=i.alias;f&&(n=f[0],La(r,Ma([0,1],f)));for(var d=1,y=!0;d=r.length){var S=ne(l,c);y=!!S,y&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[c]}else y=xe(l,c),l=l[c];y&&!o&&(ie[s]=l)}}return l},xt={exports:{}};(function(t){var e=Xe,a=Ze,r=a("%Function.prototype.apply%"),n=a("%Function.prototype.call%"),i=a("%Reflect.apply%",!0)||e.call(n,r),s=a("%Object.getOwnPropertyDescriptor%",!0),l=a("%Object.defineProperty%",!0),o=a("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(y){var c=i(e,n,arguments);if(s&&l){var p=s(c,"length");p.configurable&&l(c,"length",{value:1+o(0,y.length-(arguments.length-1))})}return c};var f=function(){return i(e,r,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f})(xt);var Wa=xt.exports,Dt=Ze,_t=Wa,Ka=_t(Dt("String.prototype.indexOf")),Ja=function(e,a){var r=Dt(e,!!a);return typeof r=="function"&&Ka(e,".prototype.")>-1?_t(r):r};const za={},$a=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),Qa=Ht($a);var et=typeof Map=="function"&&Map.prototype,Me=Object.getOwnPropertyDescriptor&&et?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,_e=et&&Me&&typeof Me.get=="function"?Me.get:null,dt=et&&Map.prototype.forEach,tt=typeof Set=="function"&&Set.prototype,Le=Object.getOwnPropertyDescriptor&&tt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Re=tt&&Le&&typeof Le.get=="function"?Le.get:null,ct=tt&&Set.prototype.forEach,Ya=typeof WeakMap=="function"&&WeakMap.prototype,ge=Ya?WeakMap.prototype.has:null,Xa=typeof WeakSet=="function"&&WeakSet.prototype,ve=Xa?WeakSet.prototype.has:null,Za=typeof WeakRef=="function"&&WeakRef.prototype,pt=Za?WeakRef.prototype.deref:null,er=Boolean.prototype.valueOf,tr=Object.prototype.toString,ar=Function.prototype.toString,rr=String.prototype.match,at=String.prototype.slice,ee=String.prototype.replace,nr=String.prototype.toUpperCase,ht=String.prototype.toLowerCase,Rt=RegExp.prototype.test,mt=Array.prototype.concat,J=Array.prototype.join,ir=Array.prototype.slice,yt=Math.floor,We=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qe=Object.getOwnPropertySymbols,Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ce=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ce||"symbol")?Symbol.toStringTag:null,Tt=Object.prototype.propertyIsEnumerable,gt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function vt(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Rt.call(/e/,e))return e;var a=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-yt(-t):yt(t);if(r!==t){var n=String(r),i=at.call(e,n.length+1);return ee.call(n,a,"$&_")+"."+ee.call(ee.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ee.call(e,a,"$&_")}var Je=Qa,wt=Je.custom,bt=Nt(wt)?wt:null,or=function t(e,a,r,n){var i=a||{};if(Z(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Z(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Z(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Z(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Z(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ut(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var o=String(e);return l?vt(e,o):o}if(typeof e=="bigint"){var f=String(e)+"n";return l?vt(e,f):f}var d=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof e=="object")return ze(e)?"[Array]":"[Object]";var y=kr(i,r);if(typeof n>"u")n=[];else if(Pt(n,e)>=0)return"[Circular]";function c(C,h,B){if(h&&(n=ir.call(n),n.push(h)),B){var oe={depth:i.depth};return Z(i,"quoteStyle")&&(oe.quoteStyle=i.quoteStyle),t(C,oe,r+1,n)}return t(C,i,r+1,n)}if(typeof e=="function"&&!St(e)){var p=mr(e),g=Fe(e,c);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(g.length>0?" { "+J.call(g,", ")+" }":"")}if(Nt(e)){var S=ce?ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ke.call(e);return typeof e=="object"&&!ce?ye(S):S}if(Sr(e)){for(var x="<"+ht.call(String(e.nodeName)),v=e.attributes||[],D=0;D",x}if(ze(e)){if(e.length===0)return"[]";var A=Fe(e,c);return y&&!Cr(A)?"["+$e(A,y)+"]":"[ "+J.call(A,", ")+" ]"}if(ur(e)){var N=Fe(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!Tt.call(e,"cause")?"{ ["+String(e)+"] "+J.call(mt.call("[cause]: "+c(e.cause),N),", ")+" }":N.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+J.call(N,", ")+" }"}if(typeof e=="object"&&s){if(bt&&typeof e[bt]=="function"&&Je)return Je(e,{depth:d-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(yr(e)){var _=[];return dt&&dt.call(e,function(C,h){_.push(c(h,e,!0)+" => "+c(C,e))}),Ft("Map",_e.call(e),_,y)}if(wr(e)){var I=[];return ct&&ct.call(e,function(C){I.push(c(C,e))}),Ft("Set",Re.call(e),I,y)}if(gr(e))return Ve("WeakMap");if(br(e))return Ve("WeakSet");if(vr(e))return Ve("WeakRef");if(dr(e))return ye(c(Number(e)));if(pr(e))return ye(c(We.call(e)));if(cr(e))return ye(er.call(e));if(fr(e))return ye(c(String(e)));if(!sr(e)&&!St(e)){var j=Fe(e,c),H=gt?gt(e)===Object.prototype:e instanceof Object||e.constructor===Object,Q=e instanceof Object?"":"null prototype",Y=!H&&L&&Object(e)===e&&L in e?at.call(te(e),8,-1):Q?"Object":"",ae=H||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=ae+(Y||Q?"["+J.call(mt.call([],Y||[],Q||[]),": ")+"] ":"");return j.length===0?V+"{}":y?V+"{"+$e(j,y)+"}":V+"{ "+J.call(j,", ")+" }"}return String(e)};function Ot(t,e,a){var r=(a.quoteStyle||e)==="double"?'"':"'";return r+t+r}function lr(t){return ee.call(String(t),/"/g,""")}function ze(t){return te(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function sr(t){return te(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function St(t){return te(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function ur(t){return te(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function fr(t){return te(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function dr(t){return te(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function cr(t){return te(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function Nt(t){if(ce)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Ke)return!1;try{return Ke.call(t),!0}catch{}return!1}function pr(t){if(!t||typeof t!="object"||!We)return!1;try{return We.call(t),!0}catch{}return!1}var hr=Object.prototype.hasOwnProperty||function(t){return t in this};function Z(t,e){return hr.call(t,e)}function te(t){return tr.call(t)}function mr(t){if(t.name)return t.name;var e=rr.call(ar.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Pt(t,e){if(t.indexOf)return t.indexOf(e);for(var a=0,r=t.length;ae.maxStringLength){var a=t.length-e.maxStringLength,r="... "+a+" more character"+(a>1?"s":"");return Ut(at.call(t,0,e.maxStringLength),e)+r}var n=ee.call(ee.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Fr);return Ot(n,"single",e)}function Fr(t){var e=t.charCodeAt(0),a={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return a?"\\"+a:"\\x"+(e<16?"0":"")+nr.call(e.toString(16))}function ye(t){return"Object("+t+")"}function Ve(t){return t+" { ? }"}function Ft(t,e,a,r){var n=r?$e(a,r):J.call(a,", ");return t+" ("+e+") {"+n+"}"}function Cr(t){for(var e=0;e=0)return!1;return!0}function kr(t,e){var a;if(t.indent===" ")a=" ";else if(typeof t.indent=="number"&&t.indent>0)a=J.call(Array(t.indent+1)," ");else return null;return{base:a,prev:J.call(Array(e+1),a)}}function $e(t,e){if(t.length===0)return"";var a=` `+e.prev+e.base;return a+J.call(t,","+a)+` `+e.prev}function Fe(t,e){var a=ze(t),r=[];if(a){r.length=t.length;for(var n=0;n1;){var a=e.pop(),r=a.obj[a.prop];if(re(r)){for(var n=[],i=0;i=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===Lr.RFC1738&&(f===40||f===41)){l+=s.charAt(o);continue}if(f<128){l=l+K[f];continue}if(f<2048){l=l+(K[192|f>>6]+K[128|f&63]);continue}if(f<55296||f>=57344){l=l+(K[224|f>>12]+K[128|f>>6&63]+K[128|f&63]);continue}o+=1,f=65536+((f&1023)<<10|s.charCodeAt(o)&1023),l+=K[240|f>>18]+K[128|f>>12&63]+K[128|f>>6&63]+K[128|f&63]}return l},Wr=function(e){for(var a=[{obj:{o:e},prop:"o"}],r=[],n=0;n"u"&&(A=0)}if(typeof o=="function"?v=o(a,v):v instanceof Date?v=y(v):r==="comma"&&z(v)&&(v=Ee.maybeMap(v,function(oe){return oe instanceof Date?y(oe):oe})),v===null){if(i)return l&&!g?l(a,M.encoder,S,"key",c):a;v=""}if(Zr(v)||Ee.isBuffer(v)){if(l){var I=g?a:l(a,M.encoder,S,"key",c);return[p(I)+"="+p(l(v,M.encoder,S,"value",c))]}return[p(a)+"="+p(String(v))]}var j=[];if(typeof v>"u")return j;var H;if(r==="comma"&&z(v))g&&l&&(v=Ee.maybeMap(v,l)),H=[{value:v.length>0?v.join(",")||null:void 0}];else if(z(o))H=o;else{var Q=Object.keys(v);H=f?Q.sort(f):Q}for(var Y=n&&z(v)&&v.length===1?a+"[]":a,ae=0;ae"u"?M.allowDots:!!e.allowDots,charset:a,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:M.charsetSentinel,delimiter:typeof e.delimiter>"u"?M.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:M.encode,encoder:typeof e.encoder=="function"?e.encoder:M.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:M.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:M.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:M.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:M.strictNullHandling}},an=function(t,e){var a=t,r=tn(e),n,i;typeof r.filter=="function"?(i=r.filter,a=i("",a)):z(r.filter)&&(i=r.filter,n=i);var s=[];if(typeof a!="object"||a===null)return"";var l;e&&e.arrayFormat in Ct?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var o=Ct[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=o==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(a)),r.sort&&n.sort(r.sort);for(var d=Bt(),y=0;y0?g+p:""},pe=It,Qe=Object.prototype.hasOwnProperty,rn=Array.isArray,T={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:pe.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},nn=function(t){return t.replace(/&#(\d+);/g,function(e,a){return String.fromCharCode(parseInt(a,10))})},Lt=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},on="utf8=%26%2310003%3B",ln="utf8=%E2%9C%93",sn=function(e,a){var r={__proto__:null},n=a.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=a.parameterLimit===1/0?void 0:a.parameterLimit,s=n.split(a.delimiter,i),l=-1,o,f=a.charset;if(a.charsetSentinel)for(o=0;o-1&&(g=rn(g)?[g]:g),Qe.call(r,p)?r[p]=pe.combine(r[p],g):r[p]=g}return r},un=function(t,e,a,r){for(var n=r?e:Lt(e,a),i=t.length-1;i>=0;--i){var s,l=t[i];if(l==="[]"&&a.parseArrays)s=[].concat(n);else{s=a.plainObjects?Object.create(null):{};var o=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,f=parseInt(o,10);!a.parseArrays&&o===""?s={0:n}:!isNaN(f)&&l!==o&&String(f)===o&&f>=0&&a.parseArrays&&f<=a.arrayLimit?(s=[],s[f]=n):o!=="__proto__"&&(s[o]=n)}n=s}return n},fn=function(e,a,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,o=r.depth>0&&s.exec(i),f=o?i.slice(0,o.index):i,d=[];if(f){if(!r.plainObjects&&Qe.call(Object.prototype,f)&&!r.allowPrototypes)return;d.push(f)}for(var y=0;r.depth>0&&(o=l.exec(i))!==null&&y"u"?T.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?T.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:T.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:T.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:T.arrayLimit,charset:a,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:T.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:T.comma,decoder:typeof e.decoder=="function"?e.decoder:T.decoder,delimiter:typeof e.delimiter=="string"||pe.isRegExp(e.delimiter)?e.delimiter:T.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:T.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:T.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:T.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:T.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:T.strictNullHandling}},cn=function(t,e){var a=dn(e);if(t===""||t===null||typeof t>"u")return a.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?sn(t,a):t,n=a.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s{this.addValue(t.name,t.value,t.type,t.all)})},addValue(t,e,a,r){r?this.allGroups.forEach(n=>{this.addCurrentGroup(t,e,a,n)}):this.addCurrentGroup(t,e,a,this.groupId)},addCurrentGroup(t,e,a,r){let n=t+a,i=this.targetValue[r];u.arrNotEmpty(i)?i.filter(l=>l.pkid==n&&l.in==a).length>0?i.forEach(l=>{l.pkid==n&&l.in==a&&(l.value=e)}):i.push({name:t,value:e,in:a,pkid:n}):(i=[],i.push({name:t,value:e,in:a,pkid:n})),this.targetValue[r]=i},save(){q.setItem(this.cacheKey,this.targetValue)}};var vn=function(t){this.groupid=t.groupid||"afterScriptGroup",this.commands=[],this.allgroupids=t.allgroupids||[],this.response=t.response||{data:{},headers:{}},this.global={setHeader:(e,a)=>{this.global.setCommon(e,a,"header",!1)},setAllHeader:(e,a)=>{this.global.setCommon(e,a,"header",!0)},setParameter:(e,a)=>{this.global.setCommon(e,a,"query",!1)},setAllParameter:(e,a)=>{this.global.setCommon(e,a,"query",!0)},setCommon:(e,a,r,n)=>{this.global.cacheCommand(e,a,r,n)},cacheCommand:(e,a,r,n)=>{this.commands.push({name:e,value:a,type:r,all:n})},action:()=>{if(this.commands!=null&&this.commands.length>0){let e=this.commands,a=this.groupid,r=this.allgroupids;q.getItem(U.globalParameter).then(n=>{new qt(U.globalParameter,n,r,e,a).save()})}},executeAsyncCommon:(e,a,r,n)=>{var i=this.groupid,s=e+r;if(n){var l=this.allgroupids;q.getItem(U.globalParameter).then(o=>{if(u.checkUndefined(o)){var f={};l.forEach(c=>{var p=o[c];if(u.checkUndefined(p)||u.arrEmpty(p))p=[],p.push({name:e,value:a,in:r,pkid:s}),f[c]=p;else{var g=p.filter(S=>S.pkid==s&&S.in==r).length;g==0?p.push({name:e,value:a,in:r,pkid:s}):p.forEach(S=>{S.in==r&&S.pkid==s&&(S.value=a)}),f[c]=p}window.console.log("更新value"),window.console.log(f)}),q.setItem(U.globalParameter,f)}else{var d=[];d.push({name:e,value:a,in:r,pkid:s});var y={};l.forEach(c=>{y[c]=d}),q.setItem(U.globalParameter,y)}})}else q.getItem(U.globalParameter).then(o=>{var f=[],d={};if(u.checkUndefined(o)){for(var y in o)y==i?f=o[y]:d[y]=o[y];var c=f.filter(p=>p.pkid==s&&p.in==r).length;c==0?f.push({name:e,value:a,in:r,pkid:s}):f.forEach(p=>{p.in==r&&p.pkid==s&&(p.value=a)}),d[i]=f,q.setItem(U.globalParameter,d)}else f.push({name:e,value:a,in:r,pkid:s});d[i]=f,q.setItem(U.globalParameter,d)})}}};function Te(t){var e=" ";if(isNaN(parseInt(t)))e=t;else switch(t){case 1:e=" ";break;case 2:e=" ";break;case 3:e=" ";break;case 4:e=" ";break;case 5:e=" ";break;case 6:e=" ";break;case 7:e=" ";break;case 8:e=" ";break;case 9:e=" ";break;case 10:e=" ";break;case 11:e=" ";break;case 12:e=" ";break}for(var a=[` `],r=0;r<100;r++)a.push(a[r]+e);return a}function $(){this.step=" ",this.shift=Te(this.step)}$.prototype.xml=function(t,e){var a=t.replace(/>\s{0,}<").replace(/-1?(s+=o[i]+a[l],n=!0,(a[l].search(/-->/)>-1||a[l].search(/\]>/)>-1||a[l].search(/!DOCTYPE/)>-1)&&(n=!1)):a[l].search(/-->/)>-1||a[l].search(/\]>/)>-1?(s+=a[l],n=!1):/^<\w/.exec(a[l-1])&&/^<\/\w/.exec(a[l])&&/^<[\w:\-\.\,]+/.exec(a[l-1])==/^<\/[\w:\-\.\,]+/.exec(a[l])[0].replace("/","")?(s+=a[l],n||i--):a[l].search(/<\w/)>-1&&a[l].search(/<\//)==-1&&a[l].search(/\/>/)==-1?s=n?s+=a[l]:s+=o[i++]+a[l]:a[l].search(/<\w/)>-1&&a[l].search(/<\//)>-1?s=n?s+=a[l]:s+=o[i]+a[l]:a[l].search(/<\//)>-1?s=n?s+=a[l]:s+=o[--i]+a[l]:a[l].search(/\/>/)>-1?s=n?s+=a[l]:s+=o[i]+a[l]:a[l].search(/<\?/)>-1||a[l].search(/xmlns\:/)>-1||a[l].search(/xmlns\=/)>-1?s+=o[i]+a[l]:s+=a[l];return s[0]==` `?s.slice(1):s};$.prototype.json=function(t,a){var a=a||this.step;return typeof JSON>"u"?t:typeof t=="string"?JSON.stringify(JSON.parse(t),null,a):typeof t=="object"?JSON.stringify(t,null,a):t};$.prototype.css=function(t,e){var a=t.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),r=a.length,n=0,i="",s=0,l=e?Te(e):this.shift;for(s=0;s/g,"").replace(/[ \r\n\t]{1,}xmlns/g," xmlns");return a.replace(/>\s{0,}<")};$.prototype.jsonmin=function(t){return typeof JSON>"u"?t:JSON.stringify(JSON.parse(t),null,0)};$.prototype.cssmin=function(t,e){var a=e?t:t.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"");return a.replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")};$.prototype.sqlmin=function(t){return t.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")};const Sn={name:"Debug",components:{UnlockOutlined:ba,DownOutlined:Wt,EditorScript:Oe(()=>Ne(()=>import("./EditorScript-009497d3.js"),["./EditorScript-009497d3.js","./doc-30bb18f4.js","..\\css\\doc-e469198e.css","./ext-language_tools-66adbdd7.js"],import.meta.url)),EditorDebugShow:Oe(()=>Ne(()=>import("./EditorDebugShow-471644d2.js"),["./EditorDebugShow-471644d2.js","./doc-30bb18f4.js","..\\css\\doc-e469198e.css","./ext-language_tools-66adbdd7.js"],import.meta.url)),DebugResponse:Oe(()=>Ne(()=>import("./DebugResponse-a12658ee.js"),["./DebugResponse-a12658ee.js","./doc-30bb18f4.js","..\\css\\doc-e469198e.css","./clipboard-cedf2745.js","./CopyOutlined-bc9c8f52.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const t=Kt(),e=Pe(()=>t.language),a=Pe(()=>t.enableAfterScript),r=Pe(()=>t.enableReloadCacheParameter),n=Jt(),{messages:i}=zt();return{language:e,enableAfterScript:a,enableReloadCacheParameter:r,knife4jModels:n,messages:i}},data(){return{oldApi:{},i18n:null,bigFlag:!1,bigBlobFlag:!1,debugUrlStyle:"width: 80%",enableRequestCache:!1,enableDynamicParameter:!1,enableHost:!1,enableHostText:"",authorizeQueryParameters:[],headerColumn:[],formColumn:[],urlFormColumn:[],allowClear:!0,pagination:!1,headerAutoOptions:U.debugRequestHeaders,headerOptions:U.debugRequestHeaderOptions,headerCount:0,headerCountFlag:!1,headerSelectName:"",selectedRowKeys:[],requestParameterAllow:!0,rowSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowSelection.selectedRowKeys=t}},rowFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowFormSelection.selectedRowKeys=t}},rowRawFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowRawFormSelection.selectedRowKeys=t}},rowUrlFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowUrlFormSelection.selectedRowKeys=t}},headerData:[],headerTableFlag:!0,globalParameters:[],debugUrl:"",debugMethodType:"",debugPathFlag:!1,debugPathParams:[],debugLoading:!1,oAuthApi:!1,debugSend:!1,formData:[],formFlag:!1,formTableFlag:!0,urlFormData:[],urlFormFlag:!1,urlFormTableFlag:!0,rawFormData:[],rawFormFlag:!1,rawFormTableFlag:!0,rawDefaultText:"Auto",rawFlag:!1,rawTypeFlag:!1,formatFlag:!1,rawText:"",rawScript:"",rawScriptMode:"javascript",rawMode:"text",rawRequestType:"application/json",requestContentType:"x-www-form-urlencoded",responseHeaders:[],responseRawText:"",responseCurlText:"",responseStatus:null,responseContent:null,responseFieldDescriptionChecked:!0,routeHeader:null,oas2:!0}},created(){this.routeHeader=this.swaggerInstance.header,this.oas2=this.swaggerInstance.oas2(),this.initI18n(),this.initLocalGlobalParameters(),this.initDebugUrl(),this.oldApi=$t(this.api),this.enableReloadCacheParameter?this.debugUrlStyle="width: 70%;":this.debugUrlStyle="width: 80%;"},watch:{language:function(t,e){this.initI18n()}},methods:{resetCacheParameter(){this.headerData=[],this.formData=[],this.urlFormData=[],this.rawFormData=[],this.rawText=u.toString(this.oldApi.requestValue,""),this.rawScript="",this.storeApiParams(),this.initLocalGlobalParameters(),this.initDebugUrl()},reloadCacheParameter(){var t=[];const e=this.api.instanceId;q.getItem(U.globalParameter).then(a=>{a!=null&&a[e]!=null&&a[e]!=null&&(t=a[e]),u.arrNotEmpty(t)&&(this.reloadUpdateHeader(t),this.rawFlag?this.reloadUpdateRawForm(t):this.formFlag?this.reloadUpdateForm(t):this.urlFormFlag&&this.reloadUpdateUrlForm(t))})},reloadUpdateCommons(t,e,a){var r=[],n=!1,i=!1;u.arrNotEmpty(e)&&e.forEach(l=>{var o=l.name+a,f=t.filter(c=>c.pkid==o);if(u.arrNotEmpty(f)){var d=f[0],y=u.getValue(d,"value","",!0);l.content=y,n=!0}r.push(l)});var s=t.filter(l=>l.in==a);return u.arrNotEmpty(s)&&s.forEach(l=>{var o=r.filter(d=>d.name==l.name);if(!u.arrNotEmpty(o)){var f={id:u.randomMd5(),name:l.name,content:l.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};r.push(f),n=!0,i=!0}}),console.log(r),{update:n,data:r,add:i}},reloadUpdateHeader(t){var e=this.reloadUpdateCommons(t,this.headerData,"header");e.update&&(this.headerData=[],setTimeout(()=>{this.headerData=e.data,e.add&&(this.initSelectionHeaders(),this.headerResetCalc())},10))},reloadUpdateUrlForm(t){var e=this.reloadUpdateCommons(t,this.urlFormData,"query");e.update&&(this.urlFormData=[],setTimeout(()=>{this.urlFormData=e.data,e.add&&this.initUrlFormSelections()},10))},reloadUpdateForm(t){var e=this.reloadUpdateCommons(t,this.formData,"query");e.update&&(this.formData=[],setTimeout(()=>{this.formData=e.data,e.add&&this.initFormSelections()},10))},reloadUpdateRawForm(t){var e=this.reloadUpdateCommons(t,this.rawFormData,"query");e.update&&(this.rawFormData=[],setTimeout(()=>{this.rawFormData=e.data,e.add&&(this.rawFormFlag=!0,this.rawFormTableFlag=!0,this.initRawFormSelections())},10))},getCurrentI18nInstance(){return this.messages[this.language]},initI18n(){const t=this.getCurrentI18nInstance();this.i18n=t,this.headerColumn=t.table.debugRequestHeaderColumns,this.formColumn=t.table.debugFormDataRequestColumns,this.urlFormColumn=t.table.debugUrlFormRequestColumns,console.log(this.headerColumn,this.formColumn,this.urlFormColumn)},debugUrlChange(t){this.debugUrl=t.target.value},initDebugUrl(){this.debugUrl=this.api.url,this.debugMethodType=this.api.methodType;var t=new RegExp("{(.*?)}","ig");if(t.test(this.debugUrl)){this.debugPathFlag=!0;for(var e=null,a=new RegExp("{(.*?)}","ig");e=a.exec(this.debugUrl);)this.debugPathParams.push(e[1])}},initLocalGlobalParameters(){const t=this.api.instanceId;q.getItem(U.globalSettingsKey).then(e=>{if(u.checkUndefined(e)&&(this.enableRequestCache=e.enableRequestCache,u.checkUndefined(e.enableDynamicParameter)&&(this.enableDynamicParameter=e.enableDynamicParameter),u.checkUndefined(e.enableHost))){this.enableHost=e.enableHost;var a=e.enableHostText;u.checkUndefined(a)?(a.startsWith("http")||(a="http://"+a),this.enableHostText=a):this.enableHost=!1}q.getItem(U.globalParameter).then(r=>{r!=null&&r[t]!=null&&r[t]!=null&&(this.globalParameters=r[t]);var n=U.debugCacheApiId+this.api.id;q.getItem(n).then(i=>{this.initHeaderParameter(i);var s=U.globalSecurityParamPrefix+this.api.instanceId;q.getItem(s).then(l=>{u.arrNotEmpty(l)&&l.forEach(o=>{if(o.in=="query"){var f={id:u.randomMd5(),name:o.name,content:o.value,value:o.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.api.securityFlag&&this.api.securityKeys.includes(o.key)&&this.authorizeQueryParameters.push(f)}}),this.initBodyParameter(i)})})})})},initHeaderParameter(t){var e=this.syncFromOAuth2();if(u.checkUndefined(e)){this.oAuthApi=!0;var a={id:u.randomMd5(),name:e.name,content:e.accessToken,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(a)}this.globalParameters.forEach(n=>{if(console.log(n),n.in=="header"){var i={id:u.randomMd5(),name:n.name,content:n.value,require:!1,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(i)}});var r=U.globalSecurityParamPrefix+this.api.instanceId;q.getItem(r).then(n=>{u.arrNotEmpty(n)&&n.forEach(i=>{let s=u.getOAuth2BearerValue(i.schema,i.value);var l={id:u.randomMd5(),name:i.name,content:s,require:!0,description:"",enums:null,enumsMode:"default",new:!1};i.in=="header"&&this.api.securityFlag&&this.api.securityKeys.includes(i.key)&&this.addDebugHeader(l)}),this.updateHeaderFromCacheApi(t),this.addNewLineHeader(),this.initSelectionHeaders(),this.headerResetCalc()})},updateHeaderFromCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.headerData;this.headerData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(this.oAuthApi?a.name!="Authorization"&&(a.content=r[0].content):a.content=r[0].content)}})}},updateUrlFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.urlFormData;this.urlFormData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}})}},updateRawFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.rawFormData;this.rawFormData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}}),this.rawText=t.rawText}},syncFromOAuth2(){var t=this.swaggerInstance.id,e="SELFOAuth"+t;if(window.localStorage){var a=window.localStorage.getItem(e);if(u.strNotBlank(a)){var r=u.json5parse(a);return r}}return null},updateFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.formData;this.formData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}})}},initBodyParameter(t){var e=this.globalParameters.filter(o=>o.in!="header"),a=this.api.parameters,r=[],n=[];if(e.length>0&&e.forEach(o=>{if(u.arrNotEmpty(a)){var f=!0;a.forEach(d=>{o.name==d.name&&o.in==d.in&&u.strNotBlank(d.txtValue)&&(f=!1)}),f&&r.push(o)}else r.push(o)}),u.arrNotEmpty(a)&&a.forEach(o=>{if(u.arrNotEmpty(e)){var f=!0;e.forEach(d=>{d.name==o.name&&d.in==o.in&&(u.strNotBlank(o.txtValue)||(f=!1))}),f&&n.push(o)}else n.push(o)}),u.arrNotEmpty(this.authorizeQueryParameters)&&this.authorizeQueryParameters.forEach(o=>{r.push(o)}),r.length+n.length,u.arrNotEmpty(n)){var i=n.filter(o=>o.in=="body").length;if(i==1){var s=n.filter(o=>o.in!="body"&&o.in!="header");this.addGlobalParameterToRawForm(r),s.length>0&&(this.rawFormFlag=!0,this.addApiParameterToRawForm(s)),u.arrNotEmpty(this.rawFormData)&&(this.rawFormFlag=!0),this.showTabRaw(),this.addApiParameterToRaw(n),this.updateRawFormCacheApi(t),this.rawFormFlag&&this.initFirstRawFormValue()}else{var l=n.filter(o=>o.schemaValue=="MultipartFile"||o.schemaValue=="file"||o.type=="file"||o.in=="formData"||o.in=="formdata").length;l>0?(this.showTabForm(),this.addGlobalParameterToForm(r),this.addApiParameterToForm(n),this.updateFormCacheApi(t),this.initFirstFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(t),this.initUrlFormValue())}}else this.api.contentValue=="raw"?(this.showTabRaw(),this.initFirstRawFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(t),this.initUrlFormValue());this.updateScriptFromCache(t),this.updateHeaderFromCacheApi(t),this.hideDynamicParameterTable()},updateScriptFromCache(t){u.checkUndefined(t)&&u.strNotBlank(t.rawScript)&&(this.rawScript=t.rawScript)},hideDynamicParameterTable(){this.enableDynamicParameter||(this.headerData.length==0?this.headerTableFlag=!1:this.headerTableFlag=!0,this.urlFormData.length==0?this.urlFormTableFlag=!1:this.urlFormTableFlag=!0,this.formData.length==0?this.formTableFlag=!1:this.formTableFlag=!0,this.rawFormData.length==0?this.rawFormTableFlag=!1:this.rawFormTableFlag=!0),this.initSelectionHeaders(),this.headerResetCalc()},addNewLineHeader(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",content:"",require:!1,description:"",enums:null,enumsMode:"default",new:!0};setTimeout(()=>this.addDebugHeader(t),100)}this.hideDynamicParameterTable()},addDebugHeader(t){if(u.strNotBlank(t.name)){var e=this.headerData.filter(a=>a.name==t.name);u.strBlank(t.content)?e.length==0&&this.headerData.push(t):this.headerData.push(t)}else this.headerData.push(t)},initFirstFormValue(){this.addNewLineFormValue(),this.initFormSelections()},initFormSelections(t){if(u.strNotBlank(t)){var e=this.rowFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowFormSelection.selectedRowKeys.push(t)}else this.formData.forEach(a=>{a.require&&this.rowFormSelection.selectedRowKeys.push(a.id)})},initRawFormSelections(t){if(u.strNotBlank(t)){var e=this.rowRawFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowRawFormSelection.selectedRowKeys.push(t)}else this.rawFormData.forEach(a=>{a.require&&this.rowRawFormSelection.selectedRowKeys.push(a.id)})},initUrlFormSelections(t){if(u.strNotBlank(t)){var e=this.rowUrlFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowUrlFormSelection.selectedRowKeys.push(t)}else this.urlFormData.forEach(a=>{a.require&&this.rowUrlFormSelection.selectedRowKeys.push(a.id)})},showTabForm(){this.formFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formatFlag=!1,this.urlFormFlag=!1,this.requestContentType="form-data",this.toggleBeautifyButtonStatus()},showTabUrlForm(){this.urlFormFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formFlag=!1,this.requestContentType="x-www-form-urlencoded",this.toggleBeautifyButtonStatus()},showTabRaw(){this.rawFlag=!0,this.rawMode=this.api.contentMode,this.rawDefaultText=this.api.contentShowValue,this.rawTypeFlag=!0,this.formFlag=!1,this.urlFormFlag=!1,this.rawText=u.toString(this.api.requestValue,""),this.api.xmlRequest&&(this.rawRequestType="application/xml"),this.requestContentType="raw",this.toggleBeautifyButtonStatus()},getEnumOptions(t){var e=u.propValue("enum",t,null),a=null;if(u.checkUndefined(e)){var r=[];e.forEach(n=>{r.push({value:n,label:n})}),a=r}return a},addNewLineFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,multipart:!1,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.formData.push(t)}else this.hideDynamicParameterTable()},addGlobalParameterToRawForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.rawFormData.push(a)})},addGlobalParameterToForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.formData.push(a)})},addApiParameterToRaw(t){if(u.arrNotEmpty(t)){var e=t.filter(a=>a.in=="header");e.length>0&&e.forEach(a=>{var r={id:u.randomMd5(),name:a.name,require:a.require,content:a.txtValue,description:u.propValue("description",a,""),enums:this.getEnumOptions(a),enumsMode:"default",new:!1};r.enums!=null&&(u.strNotBlank(r.content)||(r.content=r.enums[0].value)),this.addDebugHeader(r)})}},addApiParameterToForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r="text",n=!1;(e.schemaValue=="MultipartFile"||e.schemaValue=="file"||e.type=="file")&&(r="file",e.type=="array"&&(n=!0));var i={id:u.randomMd5(),name:e.name,type:r,require:e.require,target:null,multipart:n,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};i.enums!=null&&(u.strNotBlank(i.content)||(i.content=i.enums[0].value)),this.formData.push(i)}})},addGlobalParameterToUrlForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.urlFormData.push(a)})},addApiParameterToRawForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r={id:u.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};r.enums!=null&&(u.strNotBlank(r.content)||(r.content=r.enums[0].value)),this.rawFormData.push(r)}})},addApiParameterToUrlForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r="default";u.arrNotEmpty(e.enum)&&e.type=="array"&&(r="multiple");var n={id:u.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:r,new:!1};n.enums!=null&&(u.strNotBlank(n.content)||(n.content=n.enums[0].value)),this.urlFormData.push(n)}})},addNewLineUrlFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.urlFormData.push(t)}else this.hideDynamicParameterTable()},addNewLineRawFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.rawFormData.push(t)}else this.hideDynamicParameterTable()},initFirstRawFormValue(){this.addNewLineRawFormValue(),this.initRawFormSelections()},initUrlFormValue(){this.addNewLineUrlFormValue(),this.initUrlFormSelections()},initShowFormTable(){this.requestContentType=="x-www-form-urlencoded"?(this.urlFormFlag=!0,this.formFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):this.requestContentType=="form-data"?(this.formFlag=!0,this.urlFormFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):this.requestContentType=="raw"&&(this.rawFlag=!0,this.rawTypeFlag=!0,this.urlFormFlag=!1,this.formFlag=!1),this.toggleBeautifyButtonStatus()},initSelectionHeaders(t){if(u.strNotBlank(t)){var e=this.rowSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowSelection.selectedRowKeys.push(t)}else this.headerData.forEach(a=>{a.require&&this.rowSelection.selectedRowKeys.push(a.id)})},headerContentEnumChnage(t,e){var a=e.context.$attrs["data-key"];this.headerContentChnageUpdate(t,a)},headerCookieValue(t){t.name.toLowerCase()=="cookie"&&(document.cookie=t.content)},headerContentChnage(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.headerContentChnageUpdate(e,a)},headerContentChnageUpdate(t,e){var a=this.headerData.filter(r=>r.id==e)[0];a.new?(this.headerData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1,this.headerCookieValue(r))}),this.addNewLineHeader()):this.headerData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1,this.headerCookieValue(r))}),this.initSelectionHeaders(a.id),this.headerResetCalc()},headerNameFilterOption(t,e){return e?e.key.toUpperCase().indexOf(t.toUpperCase())>=0:!1},headerSelect(t,e){this.headerSelectName=t,e.name=t,e.new=!1},headerSearch(t){this.headerSelectName=t},headerNameChange(t){t.new?(this.headerData.forEach(e=>{e.id==t.id&&(e.name=this.headerSelectName,e.new=!1)}),this.addNewLineHeader()):this.headerData.forEach(e=>{e.id==t.id&&(e.name=this.headerSelectName,e.new=!1)}),this.initSelectionHeaders(t.id),this.headerResetCalc()},headerDelete(t){var e=[];this.headerData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.headerData=e,this.headerResetCalc()},headerResetCalc(){var t=this.headerData.filter(e=>e.new==!1);t.length>0?(this.headerCountFlag=!0,this.headerCount=t.length):(this.headerCountFlag=!1,this.headerCount=0)},requestContentTypeChange(t){this.requestContentType=t.target.value,this.initShowFormTable()},formDelete(t){var e=[];this.formData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.formData=e},formFileUploadClick(t){document.getElementById("file"+t.id).click()},formNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.formData.filter(n=>n.id==a)[0];r.new?(this.formData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initFormSelections(r.id)},formTypeChange(t,e){var a=t.split("-"),r=a[0],n=a[1];this.formData.forEach(i=>{i.id==n&&(i.content="",i.type=r)})},formFileChange(t){for(var e=t.target.files,a=[],r=0;ro.id==s)[0];l.new?(this.formData.forEach(o=>{o.id==l.id&&(o.content=n,o.target=i,o.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(o=>{o.id==l.id&&(o.content=n,o.target=i,o.new=!1)}),this.initFormSelections(l.id)},formContentUpdate(t,e){var a=this.formData.filter(r=>r.id==e)[0];a.new?(this.formData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initFormSelections(a.id)},formContentEnumChange(t,e){var a=e.context.$attrs["data-key"];this.formContentUpdate(t,a)},formContentChange(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.formContentUpdate(e,a)},rawFormDelete(t){var e=[];this.rawFormData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.rawFormData=e},urlFormDelete(t){var e=[];this.urlFormData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.urlFormData=e},rawFormNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.rawFormData.filter(n=>n.id==a)[0];r.new?(this.rawFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineRawFormValue()):this.rawFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initRawFormSelections(r.id)},urlFormNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.urlFormData.filter(n=>n.id==a)[0];r.new?(this.urlFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineUrlFormValue()):this.urlFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initUrlFormSelections(r.id)},rawFormContentUpdate(t,e){var a=this.rawFormData.filter(r=>r.id==e)[0];a.new?(this.rawFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineRawFormValue()):this.rawFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initRawFormSelections(a.id)},rawFormContentEnumChange(t,e){var a=e.context.$attrs["data-key"];this.rawFormContentUpdate(t,a)},rawFormContentChange(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.rawFormContentUpdate(e,a)},urlFormContentUpdate(t,e){var a=this.urlFormData.filter(r=>r.id==e)[0];a.new?(this.urlFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineUrlFormValue()):this.urlFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initUrlFormSelections(a.id)},urlFormContentEnumChange(t,e){if(u.checkUndefined(e)){var a="";Array.isArray(e)?a=e[0].context.$attrs["data-key"]:a=e.context.$attrs["data-key"],this.urlFormContentUpdate(t,a)}},urlFormContentChange(t){const e=t.target.value,a=t.target.getAttribute("data-key");this.urlFormContentUpdate(e,a)},rawMenuClick({item:t,key:e,keyPath:a}){this.rawMode=t["data-mode"],this.rawRequestType=t["data-mode-type"],this.rawDefaultText=e,this.toggleBeautifyButtonStatus()},beautifyJson(){let t=this.rawText;if(u.strNotBlank(t))try{let e=u.json5stringify(u.json5parse(t));this.rawText=e}catch(e){console.error(e)}},toggleBeautifyButtonStatus(){let t=!1;this.rawFlag&&this.rawMode=="json"&&(t=!0),this.formatFlag=t},sendRestfulApi(t){t.preventDefault();var e=this.validateCommonHeaders();e.validate?this.rawFlag?this.debugSendRawRequest():this.formFlag?this.debugSendFormRequest():this.urlFormFlag&&this.debugSendUrlFormRequest():X.info(e.message)},callChildEditorShow(){this.bigFlag||this.$refs.childDebugResponse.showEditorFieldDescription()},debugHeaders(){var t={},e=this.api;if(e.produces!=null&&e.produces!=null&&e.produces.length>0){var a=e.produces[0];t.Accept=a}return this.headerData.forEach(r=>{if(!r.new){var n=this.rowSelection.selectedRowKeys.filter(i=>i==r.id);n.length>0&&u.strNotBlank(r.name)&&r.name.toLowerCase()!="cookie"&&(u.isChinese(r.content)?t[r.name]=encodeURIComponent(r.content):t[r.name]=u.toString(r.content,""))}}),t["Request-Origion"]="Knife4j",u.checkUndefined(t["Content-Type"])||(this.rawFlag?t["Content-Type"]=this.rawRequestType:this.urlFormFlag?t["Content-Type"]="application/x-www-form-urlencoded":this.formFlag&&(this.validateFormDataContaintsFile()?t["Content-Type"]="multipart/form-data":t["Content-Type"]="application/x-www-form-urlencoded")),u.checkUndefined(this.routeHeader)&&(t["knfie4j-gateway-request"]=this.routeHeader),this.swaggerInstance.desktop&&(t["knife4j-gateway-code"]=this.swaggerInstance.desktopCode),t},debugRawFormParams(){var t={};return this.rawFormData.forEach(e=>{if(!e.new){var a=this.rowRawFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},debugUrlFormParams(){var t={};return this.urlFormData.forEach(e=>{if(!e.new){var a=this.rowUrlFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},debugFormDataParams(t){var e={url:"",params:{}},a=this.debugUrl;if(t){var r=new FormData;this.formData.forEach(i=>{if(!i.new){var s=this.rowFormSelection.selectedRowKeys.filter(d=>d==i.id);if(s.length>0&&u.strNotBlank(i.name)){if(i.type=="text")if(this.debugPathFlag)if(this.debugPathParams.indexOf(i.name)==-1)u.strNotBlank(i.content)&&r.append(i.name,i.content);else{var l="{"+i.name+"}";a=a.replace(l,i.content)}else u.strNotBlank(i.content)&&r.append(i.name,i.content);else if(u.checkUndefined(i.target)){var o=i.target.files;if(o.length>0)for(var f=0;f{if(!i.new){var s=this.rowFormSelection.selectedRowKeys.filter(o=>o==i.id);if(s.length>0&&u.strNotBlank(i.name))if(this.debugPathFlag)if(this.debugPathParams.indexOf(i.name)==-1)n[i.name]=i.content;else{var l="{"+i.name+"}";a=a.replace(l,i.content)}else n[i.name]=i.content}}),e.params=n}return e.url=a,e},debugStreamFlag(){var t=!1,e=this.api;if(e.produces!=null&&e.produces!=null&&e.produces.length>0){e.produces[0];var a=u.binaryContentType(e.produces,null);t=a.binary}return t},validateCommonHeaders(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=this.i18n.validate.header+r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateFormData(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require){if(r.type=="text"){if(!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}else if(r.target==null){t=!1,e=r.name+this.i18n.validate.fileNotEmpty;break}}}}return{validate:t,message:e}},validateRawForm(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateUrlForm(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateFormDataContaintsFile(){var t=!1;return this.formData.forEach(e=>{if(!e.new){var a=this.rowFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&e.type=="file"&&(t=!0)}}),t},checkUrlParams(t){var e=t.indexOf("?"),a={result:!1,params:{},url:t};if(e>-1){var r=t.substring(e+1);if(a.url=t.substring(0,e),a.result=!0,u.strNotBlank(r)){var n=r.split("&");n.forEach(i=>{if(u.strNotBlank(i)){var s=i.split("=");s.length==2&&(a.params[s[0]]=s[1])}})}}return a},debugSendHasCookie(t){var e=!1;if(u.checkUndefined(t)){var a=Object.keys(t);if(u.arrNotEmpty(a)){var r=a.filter(i=>i.toLocaleLowerCase()==="cookie").length;if(r>0){var n=t.Cookie;u.strNotBlank(n)&&(document.cookie=n,e=!0)}}}return e},applyRequestParams(t,e){var a=null,r=null;return["post","put","patch"].includes(e.toLowerCase())?u.checkUndefined(t)&&(a=gn.stringify(t)):r=t,{data:a,params:r}},debugCheckUrl(t){var e=t;try{var a=new RegExp(".*?({.*?})$","ig");if(a.test(t)){var r=RegExp.$1;e=t.replace(r,"")}}catch(n){window.console&&console.error(n)}return e},debugSendUrlFormRequest(){var t=this.validateUrlForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.debugUrlFormParams();if(this.debugPathFlag){const c={};this.debugPathParams.forEach(p=>{var g="{"+p+"}",S=u.getValue(n,p,"",!0);a=a.replace(g,S)});for(var i in n)this.debugPathParams.indexOf(i)==-1&&(c[i]=n[i]);n=c}var s=this.checkUrlParams(a);s.result&&(a=s.url,n=Object.assign(n,s.params));let d="/";this.enableHost&&(d=this.enableHostText);var l=this.applyRequestParams(n,r),o={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,params:l.params,timeout:0,withCredentials:this.debugSendHasCookie(e),data:l.data};this.oas2?this.debugStreamFlag()&&(o={...o,responseType:"blob"}):o={...o,responseType:"blob"};const y=Ue.create();y.interceptors.request.use(c=>{let p=c.url;if(c.method==="get"&&c.params){p+="?";let g=Object.keys(c.params);for(let S of g)u.strNotBlank(c.params[S])&&(p+=`${encodeURIComponent(S)}=${encodeURIComponent(c.params[S])}&`);p=p.substring(0,p.length-1),c.params={}}return c.url=p,c});var f=new Date;y.request(o).then(c=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,c)}).catch(c=>{this.debugLoading=!1,c.response?this.handleDebugError(f,new Date,c.response):X.error(c.message)})}else X.info(t.message)},debugSendFormRequest(){var t=this.validateFormData();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.validateFormDataContaintsFile(),i=this.debugFormDataParams(n);a=i.url;var s=i.params;let d="/";this.enableHost&&(d=this.enableHostText);var l={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,timeout:0,withCredentials:this.debugSendHasCookie(e),data:null};if(n)l={...l,data:s};else{var o=this.checkUrlParams(a);o.result&&(a=o.url,s=Object.assign(s,o.params)),l={...l,params:s}}this.debugStreamFlag()&&(l={...l,responseType:"blob"});let y=Ue.create();var f=new Date;y.request(l).then(c=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,c)}).catch(c=>{this.debugLoading=!1,c.response?this.handleDebugError(f,new Date,c.response):X.error(c.message)})}else X.info(t.message)},debugSendRawRequest(){var t=this.validateRawForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.rawText,i=this.debugRawFormParams();if(this.debugPathFlag){const y={};this.debugPathParams.forEach(c=>{var p="{"+c+"}",g=u.getValue(i,c,"",!0);a=a.replace(p,g)});for(var s in i)this.debugPathParams.indexOf(s)==-1&&(y[s]=i[s]);i=y}var l=this.checkUrlParams(a);l.result&&(a=l.url,i=Object.assign(i,l.params));let d="/";this.enableHost&&(d=this.enableHostText);var o={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,params:i,data:n,withCredentials:this.debugSendHasCookie(e),timeout:0};this.debugStreamFlag()&&(o={...o,responseType:"blob"});var f=new Date;Ue.create().request(o).then(y=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,y)}).catch(y=>{this.debugLoading=!1,y.response?this.handleDebugError(f,new Date,y.response):X.error(y.message)})}else X.info(t.message)},executeAfterScript(t){if(u.strNotBlank(this.rawScript)){var e=this.swaggerInstance.id,a=this.swaggerInstance.allGroupIds,r={allgroupids:a,groupid:e,response:{data:t.data,headers:t.headers}},n=new vn(r);try{var i=new Function("ke",this.rawScript);i(n),setTimeout(()=>{n.global.action()},1e3)}catch(s){console.error(s)}}},handleDebugSuccess(t,e,a){this.bigFlag=!1,this.bigBlobFlag=!1,this.setResponseBody(a),this.setResponseHeaders(a.headers),this.setResponseRaw(a),this.setResponseStatus(t,e,a),this.setResponseCurl(a.request),this.callChildEditorShow(),this.executeAfterScript(a),this.storeApiParams()},handleDebugError(t,e,a){this.bigFlag=!1,this.bigBlobFlag=!1,this.setResponseBody(a),this.setResponseHeaders(a.headers),this.setResponseRaw(a),this.setResponseStatus(t,e,a),this.setResponseCurl(a.request),this.callChildEditorShow(),this.storeApiParams()},storeApiParams(){if(this.enableRequestCache){var t={headerData:[],formData:[],urlFormData:[],rawFormData:[],rawText:""},e=U.debugCacheApiId+this.api.id;t.headerData=this.headerData.filter(a=>a.new==!1),t.formData=this.formData.filter(a=>a.new==!1),t.urlFormData=this.urlFormData.filter(a=>a.new==!1),t.rawFormData=this.rawFormData.filter(a=>a.new==!1),t.rawText=this.rawText,t.rawScript=this.rawScript,q.setItem(e,t)}},setResponseHeaders(t){var e=[];if(u.checkUndefined(t))for(var a in t){var r={id:u.randomMd5(),name:a,value:t[a]};e.push(r)}this.responseHeaders=e},setResponseRaw(t){if(u.checkUndefined(t)){var e=t.request;if(t.headers,u.checkUndefined(e)&&e.responseType!="blob"){var a=u.toString(e.responseText,"");this.responseRawText=a}}},setResponseStatus(t,e,a){if(u.checkUndefined(a)){var r=a.request;if(u.checkUndefined(r)){var n="",i=e.getTime()-t.getTime(),s=r.status;if(i>1e3){var l=Math.floor(i/1e3).toFixed(1);n=l+"s"}else n=i+"ms";var o=0;r.responseType=="blob"?o=r.response.size:u.checkUndefined(r.responseText)&&(o=r.responseText.gblen()),this.responseStatus={code:s,cost:n,size:o}}}},setResponseCurl(t){var e=this,a=this.debugCheckUrl(this.debugUrl),r=new Array,n="http",i=window.location.href,s=new RegExp("^https.*","ig");s.test(i)&&(n="https");var l=new RegExp("^(http|https):.*","ig"),o="";l.test(this.api.host)?o=this.api.host:o=n+":// "+this.api.host,this.enableHost&&(o=this.enableHostText),a.startsWith("/")||(o+="/"),o+=a,r.push("curl"),r.push("-X",this.debugMethodType.toUpperCase());var f=this.debugHeaders(),d=[];if(d.push("knfie4j-gateway-request"),d.push("knife4j-gateway-code"),d.push("Request-Origion"),u.checkUndefined(f))for(var y in f)d.includes(y)||(r.push("-H "),r.push('"'+y+":"+f[y]+'"'));if(this.rawFlag){var c=this.debugRawFormParams(),p=[];if(u.checkUndefined(c))for(var g in c)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(c[g],""));else{var S="{"+g+"}",x=u.toString(c[g],"");o=o.replace(S,x)}else p.push(g+"="+u.toString(c[g],""));var v=p.join("&");if(u.strNotBlank(v)&&(o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v),u.strNotBlank(this.rawText))try{var D=JSON.parse(this.rawText),A=JSON.stringify(D).replace(/\\n/g,"").replace(/"/g,'\\"');r.push("-d"),r.push('"'+A+'"')}catch{var A=this.rawText.replace(/\\n/g,"").replace(/"/g,'\\"');r.push("-d"),r.push('"'+A+'"')}}else if(this.urlFormFlag){var N=this.debugUrlFormParams();if(u.checkUndefined(N)){var p=[];for(var g in N)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(N[g],""));else{var S="{"+g+"}",x=u.toString(N[g],"");o=o.replace(S,x)}else p.push(g+"="+u.toString(N[g],""));var v=p.join("&");u.strNotBlank(v)&&(this.debugMethodType.toLowerCase()=="get"||this.debugMethodType.toLowerCase()=="delete"?o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v:(r.push("--data-urlencode "),r.push('"'+v+'"')))}}else if(this.formFlag){var _=this.debugFormCurlParams();if(u.checkUndefined(_))if(this.validateFormDataContaintsFile())this.formData.forEach(I=>{if(!I.new){var j=this.rowFormSelection.selectedRowKeys.filter(H=>H==I.id);j.length>0&&u.strNotBlank(I.name)&&(r.push("-F "),I.type=="text"?r.push('"'+I.name+"="+u.toString(I.content,"")+'"'):r.push('"'+I.name+"=@"+I.content+'"'))}});else{var p=[];for(var g in _)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(_[g],""));else{var S="{"+g+"}",x=u.toString(_[g],"");o=o.replace(S,x)}else p.push(g+"="+u.toString(_[g],""));var v=p.join("&");u.strNotBlank(v)&&(this.debugMethodType.toLowerCase()=="get"||this.debugMethodType.toLowerCase()=="delete"?o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v:(r.push("--data-urlencode "),r.push('"'+v+'"')))}}r.push('"'+encodeURI(o)+'"'),this.responseCurlText=r.join(" ")},debugFormCurlParams(){var t={};return this.formData.forEach(e=>{if(!e.new){var a=this.rowFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},setResponseBody(t){let e=this;if(u.checkUndefined(t)){var a=t.request,r=t.headers;if(u.checkUndefined(a)){var n=u.propValue("content-type",r,""),i=u.propValue("content-disposition",r,"");if(a.responseType=="blob"||u.strNotBlank(i))if(t.data.type=="application/json"||t.data.type=="application/xml"||t.data.type=="text/html"||t.data.type=="text/plain"){const x=new FileReader;x.onload=v=>{let D={responseText:v.target.result,response:v.target.result,responseType:"",status:a.status,statusText:a.statusText,readyState:a.readyState,timeout:a.timeout,withCredentials:a.withCredentials};e.setResponseJsonBody(D,r)},x.readAsText(t.data)}else if(n=="text/html"||n=="text/plain"||n=="application/xml")this.setResponseJsonBody(a,r);else{let x=!1;var s="Knife4j.txt";if(u.strNotBlank(i)||(i=u.propValue("content-disposition",r,"")),u.strNotBlank(i))for(var l=i.split(";"),o=0;o-1&&(x=!0);var d=f.split("=");if(d!=null&&d.length>0){var y=d[0];if(y!=null&&y!=null&&y!=""&&(y.toLowerCase()=="filename*"||y.toLowerCase()=="filename")){let v=d[1].replace(/\"/g,"");s=decodeURIComponent(v)}}}}var c=!1;if(n.indexOf("image")!=-1)c=!0;else{var p=["bmp","jpg","png","tif","gif","pcx","tga","exif","fpx","svg","psd","cdr","pcd","dxf","ufo","eps","ai","raw","WMF","webp"];p.forEach(v=>{s.endsWith(v)&&(c=!0)})}var g=this.api.produces,S=!1;if(u.arrNotEmpty(g)&&g.forEach(v=>{v.indexOf("image")!=-1&&(S=!0)}),c||(c=S),x)this.setResponseJsonBody(a,r);else{let v="";try{v=window.URL?window.URL.createObjectURL(t.data):window.webkitURL.createObjectURL(t.data)}catch(D){window.console&&window.console.error(D);let A=[].concat(t.data),N=new Blob(A);v=window.URL?window.URL.createObjectURL(N):window.webkitURL.createObjectURL(N)}this.responseContent={text:"",mode:"blob",blobFlag:!0,imageFlag:c,blobFileName:s,blobUrl:v,base64:""}}}else this.setResponseJsonBody(a,r)}}},setResponseJsonBody(t,e){var a="",r="",n=this.getContentTypeByHeaders(e);if(n=="json"){var i=t.responseText.gblen(),s=(i/1024).toFixed(1),l=150;if(this.bigBlobFlag=s>300,s>l){this.bigFlag=!0;var o=this.i18n.message.debug.contentToBig;X.info(o),n="text"}else if(u.strNotBlank(t.responseText))try{a=u.json5stringify(u.json5parse(t.responseText))}catch{a=t.responseText,n="text"}if(u.strNotBlank(t.responseText)&&!this.bigFlag&&t.responseText.indexOf("data:image")>-1){var f=new RegExp('.*?"(data:image.*?base64.*?)".*',"ig");if(f.test(t.responseText)){var d=RegExp.$1;r=d}}}else if(n=="xml"){var y=t.responseText;u.strNotBlank(y)?a=new $().xml(y):a=y}else a=t.responseText;this.responseContent={text:a,mode:n,blobFlag:!1,imageFlag:!1,blobFileName:"",blobUrl:"",base64:r}},debugEditorChange(t){u.checkUndefined(this.responseContent)&&(this.responseContent.text=t)},getContentTypeByHeaders(t){var e="json",a=u.propValue("Content-Type",t,"");return u.strNotBlank(a)||(a=u.propValue("content-type",t,"")),u.strNotBlank(a)&&(a.indexOf("json")>=0?e="json":a.indexOf("xml")>=0?e="xml":a.indexOf("text/html")>=0?e="html":e="text"),e},debugShowFieldDescriptionChange(t){this.responseFieldDescriptionChecked=t}}},Fn=t=>(ma("data-v-2ed131ca"),t=t(),ya(),t),Cn={class:"knife4j-debug"},kn={class:"spin-content"},En={key:0,class:"knife4j-api-summary-method"},xn={class:"knife4j-debug-request-type"},Dn={class:"knife4j-debug-request-content-type-float"},_n={class:"knife4j-debug-request-content-type-float"},Rn={class:"knife4j-debug-request-content-type-raw"},Tn={class:"knife4j-debug-raw-span"},On={key:0,class:"knife4j-debug-request-content-type-beautify"},Nn={key:0},Pn={key:1},Un={key:0,style:{display:"none"}},An=["id","data-key"],In={key:1,style:{display:"none"}},Bn=["id","data-key"],Mn=Fn(()=>P("a",{href:"https://gitee.com/xiaoym/knife4j/wikis/AfterScript",target:"_blank"},"参考文档",-1));function Ln(t,e,a,r,n,i){const s=me("UnlockOutlined"),l=Yt,o=Xt,f=Zt,d=ea,y=ta,c=aa,p=ra,g=na,S=ia,x=oa,v=la,D=sa,A=ua,N=me("DownOutlined"),_=fa,I=da,j=ca,H=me("editor-debug-show"),Q=me("editor-script"),Y=pa,ae=me("DebugResponse"),V=ha;return b(),G("div",Cn,[w(V,{tip:"Loading...",spinning:n.debugLoading},{default:m(()=>[P("div",kn,[w(p,null,{default:m(()=>[w(c,{class:le("knife4j-debug-api-"+n.debugMethodType.toLowerCase()),span:24},{default:m(()=>[w(y,{compact:""},{default:m(()=>[a.api.securityFlag?(b(),G("span",En,[w(s,{style:{"font-size":"16px"}})])):R("",!0),w(f,{style:Qt(n.debugUrlStyle),value:n.debugUrl,onChange:i.debugUrlChange},{addonBefore:m(()=>[w(o,{value:n.debugMethodType,"onUpdate:value":e[0]||(e[0]=C=>n.debugMethodType=C),style:{width:"110px"}},{default:m(()=>[w(l,{value:"GET"},{default:m(()=>[k("GET")]),_:1}),w(l,{value:"POST"},{default:m(()=>[k("POST")]),_:1}),w(l,{value:"PUT"},{default:m(()=>[k("PUT")]),_:1}),w(l,{value:"PATCH"},{default:m(()=>[k("PATCH")]),_:1}),w(l,{value:"DELETE"},{default:m(()=>[k("DELETE")]),_:1}),w(l,{value:"COPY"},{default:m(()=>[k("COPY")]),_:1}),w(l,{value:"HEAD"},{default:m(()=>[k("HEAD")]),_:1}),w(l,{value:"OPTIONS"},{default:m(()=>[k("OPTIONS")]),_:1}),w(l,{value:"LINK"},{default:m(()=>[k("LINK")]),_:1}),w(l,{value:"UNLINK"},{default:m(()=>[k("UNLINK")]),_:1}),w(l,{value:"PURGE"},{default:m(()=>[k("PURGE")]),_:1})]),_:1},8,["value"])]),_:1},8,["style","value","onChange"]),w(d,{class:"knife4j-api-send",type:"primary",onClick:i.sendRestfulApi},{default:m(()=>[k(W(t.$t("debug.send")),1)]),_:1},8,["onClick"]),r.enableReloadCacheParameter?(b(),E(d,{key:1,onClick:i.reloadCacheParameter},{default:m(()=>[k("刷新变量")]),_:1},8,["onClick"])):R("",!0),w(d,{onClick:i.resetCacheParameter},{default:m(()=>[k("重置")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["class"])]),_:1}),w(p,{class:"knife4j-debug-tabs"},{default:m(()=>[w(Y,{defaultActiveKey:"2"},{default:m(()=>[w(v,{key:"1"},{tab:m(()=>[P("span",null,[n.headerCountFlag?(b(),E(g,{key:0,color:"red",class:"knife4j-debug-param-count"},{default:m(()=>[k(W(n.headerCount),1)]),_:1})):R("",!0),P("span",null,W(t.$t("debug.headers")),1)])]),default:m(()=>[n.headerTableFlag?(b(),E(x,{key:0,bordered:"",size:"small",rowSelection:n.rowSelection,columns:n.headerColumn,pagination:n.pagination,dataSource:n.headerData,rowKey:"id"},{bodyCell:m(({column:C,record:h})=>[C.dataIndex==="name"?(b(),E(S,{key:0,onSelect:B=>i.headerSelect(B,h),"data-id":h.id,onSearch:i.headerSearch,onChange:B=>i.headerNameChange(h),value:h.name,filterOption:i.headerNameFilterOption,allowClear:n.allowClear,dataSource:n.headerAutoOptions,style:{width:"100%"},placeholder:t.$t("debug.tableHeader.holderName")},null,8,["onSelect","data-id","onSearch","onChange","value","filterOption","allowClear","dataSource","placeholder"])):C.dataIndex==="content"?(b(),G(Se,{key:1},[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.text,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.headerContentEnumChnage},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:t.$t("debug.tableHeader.holderValue"),class:le("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.headerContentChnage},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))],64)):(b(),E(p,{key:2},{default:m(()=>[h.new?R("",!0):(b(),E(d,{key:0,type:"link",onClick:B=>i.headerDelete(h)},{default:m(()=>[k(W(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):R("",!0)]),_:1}),w(v,{tab:t.$t("debug.params"),key:"2",forceRender:""},{default:m(()=>[P("div",xn,[P("div",Dn,[w(A,{onChange:i.requestContentTypeChange,class:"knife4j-debug-request-content-type",value:n.requestContentType,"onUpdate:value":e[1]||(e[1]=C=>n.requestContentType=C)},{default:m(()=>[w(D,{value:"x-www-form-urlencoded"},{default:m(()=>[k("x-www-form-urlencoded")]),_:1}),w(D,{value:"form-data"},{default:m(()=>[k("form-data")]),_:1}),w(D,{value:"raw"},{default:m(()=>[k("raw")]),_:1})]),_:1},8,["onChange","value"])]),P("div",_n,[P("div",Rn,[n.rawTypeFlag?(b(),E(j,{key:0},{overlay:m(()=>[w(I,{onClick:i.rawMenuClick},{default:m(()=>[w(_,{"data-mode-type":"application/json","data-mode":"text",key:"Auto"},{default:m(()=>[k("Auto")]),_:1}),w(_,{"data-mode-type":"text/plain","data-mode":"text",key:"Text(text/plain)"},{default:m(()=>[k(" Text(text/plain)")]),_:1}),w(_,{"data-mode-type":"application/json","data-mode":"json",key:"JSON(application/json)"},{default:m(()=>[k(" JSON(application/json)")]),_:1}),w(_,{"data-mode-type":"application/javascript","data-mode":"javascript",key:"Javascript(application/Javascript)"},{default:m(()=>[k("Javascript(application/Javascript)")]),_:1}),w(_,{"data-mode-type":"application/xml","data-mode":"xml",key:"XML(application/xml)"},{default:m(()=>[k(" XML(application/xml)")]),_:1}),w(_,{"data-mode-type":"text/xml","data-mode":"xml",key:"XML(text/xml)"},{default:m(()=>[k("XML(text/xml) ")]),_:1}),w(_,{"data-mode-type":"text/html","data-mode":"html",key:"HTML(text/html)"},{default:m(()=>[k("HTML(text/html) ")]),_:1})]),_:1},8,["onClick"])]),default:m(()=>[P("span",Tn,[P("span",null,W(n.rawDefaultText),1),w(N)])]),_:1})):R("",!0)])]),n.formatFlag?(b(),G("div",On,[P("a",{onClick:e[2]||(e[2]=(...C)=>i.beautifyJson&&i.beautifyJson(...C))},"Beautify")])):R("",!0)]),n.formFlag?(b(),E(p,{key:0},{default:m(()=>[n.formTableFlag?(b(),E(x,{key:0,bordered:"",size:"small",rowSelection:n.rowFormSelection,columns:n.formColumn,pagination:n.pagination,dataSource:n.formData,rowKey:"id"},{bodyCell:m(({column:C,record:h})=>[C.dataIndex=="name"?(b(),E(f,{key:0,placeholder:h.description,"data-key":h.id,defaultValue:h.name,onChange:i.formNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])):C.dataIndex=="type"?(b(),E(o,{key:1,defaultValue:h.name+"-"+h.id,onChange:i.formTypeChange,style:{width:"100%"}},{default:m(()=>[w(l,{value:"text-"+h.id},{default:m(()=>[P("span",null,W(t.$t("debug.form.itemText")),1)]),_:2},1032,["value"]),w(l,{value:"file-"+h.id},{default:m(()=>[P("span",null,W(t.$t("debug.form.itemFile")),1)]),_:2},1032,["value"])]),_:2},1032,["defaultValue","onChange"])):C.dataIndex=="content"?(b(),G(Se,{key:2},[h.type=="text"?(b(),G("div",Nn,[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.content,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.formContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:le("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.formContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))])):(b(),G("div",Pn,[P("div",null,[h.multipart?(b(),G("div",Un,[P("input",{id:"file"+h.id,multiple:"",style:{display:"none"},type:"file","data-key":h.id,onChange:e[3]||(e[3]=(...B)=>i.formFileChange&&i.formFileChange(...B))},null,40,An)])):(b(),G("div",In,[P("input",{id:"file"+h.id,style:{display:"none"},type:"file","data-key":h.id,onChange:e[4]||(e[4]=(...B)=>i.formFileChange&&i.formFileChange(...B))},null,40,Bn)])),w(y,{compact:""},{default:m(()=>[w(f,{style:{width:"80%"},class:le("knife4j-debug-param-require"+h.require),value:h.content,disabled:""},null,8,["class","value"]),w(d,{onClick:B=>i.formFileUploadClick(h),class:"knife4j-api-send",style:{width:"80px"},type:"primary"},{default:m(()=>[k(W(t.$t("debug.form.upload")),1)]),_:2},1032,["onClick"])]),_:2},1024)])]))],64)):(b(),G(Se,{key:3},[h.new?R("",!0):(b(),E(d,{key:0,type:"link",onClick:B=>i.formDelete(h)},{default:m(()=>[k(W(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))],64))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):R("",!0)]),_:1})):R("",!0),n.urlFormFlag?(b(),E(p,{key:1},{default:m(()=>[n.urlFormTableFlag?(b(),E(x,{key:0,bordered:"",size:"small",rowSelection:n.rowUrlFormSelection,columns:n.urlFormColumn,pagination:n.pagination,dataSource:n.urlFormData,rowKey:"id"},{bodyCell:m(({column:C,record:h})=>[C.dataIndex=="name"?(b(),E(f,{key:0,placeholder:h.description,"data-key":h.id,defaultValue:h.name,onChange:i.urlFormNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])):C.dataIndex=="content"?(b(),G(Se,{key:1},[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.type,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.urlFormContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:le("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.urlFormContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))],64)):(b(),E(p,{key:2},{default:m(()=>[h.new?R("",!0):(b(),E(d,{key:0,type:"link",onClick:B=>i.urlFormDelete(h)},{default:m(()=>[k(W(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):R("",!0)]),_:1})):R("",!0),n.rawFlag?(b(),E(p,{key:2},{default:m(()=>[n.rawFormFlag?(b(),E(p,{key:0},{default:m(()=>[n.rawFormTableFlag?(b(),E(x,{key:0,bordered:"",size:"small",rowSelection:n.rowRawFormSelection,columns:n.urlFormColumn,pagination:n.pagination,dataSource:n.rawFormData,rowKey:"id"},{urlFormName:m(({text:C,record:h})=>[w(f,{placeholder:h.description,"data-key":h.id,defaultValue:C,onChange:i.rawFormNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])]),urlFormValue:m(({text:C,record:h})=>[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:C,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.rawFormContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:le("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:C,onChange:i.rawFormContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))]),operation:m(({text:C,record:h})=>[w(p,null,{default:m(()=>[h.new?R("",!0):(b(),E(d,{key:0,type:"link",onClick:B=>i.rawFormDelete(h)},{default:m(()=>[k(W(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024)]),_:1},8,["rowSelection","columns","pagination","dataSource"])):R("",!0)]),_:1})):R("",!0),w(H,{style:{"margin-top":"5px"},value:n.rawText,"onUpdate:value":e[5]||(e[5]=C=>n.rawText=C),mode:n.rawMode},null,8,["value","mode"])]),_:1})):R("",!0)]),_:1},8,["tab"]),r.enableAfterScript?(b(),E(v,{key:"3",tab:"AfterScript"},{default:m(()=>[w(p,{style:{height:"25px","line-height":"25px"}},{default:m(()=>[k(" 关于AfterScript更详细的使用方法及介绍,请"),Mn]),_:1}),w(p,null,{default:m(()=>[w(Q,{style:{"margin-top":"5px"},value:n.rawScript,"onUpdate:value":e[6]||(e[6]=C=>n.rawScript=C)},null,8,["value"])]),_:1})]),_:1})):R("",!0)]),_:1})]),_:1}),P("div",null,[w(ae,{ref:"childDebugResponse",responseFieldDescriptionChecked:n.responseFieldDescriptionChecked,swaggerInstance:a.swaggerInstance,api:a.api,onDebugShowFieldDescriptionChange:i.debugShowFieldDescriptionChange,onDebugEditorChange:i.debugEditorChange,debugSend:n.debugSend,responseContent:n.responseContent,responseCurlText:n.responseCurlText,responseStatus:n.responseStatus,responseRawText:n.responseRawText,responseHeaders:n.responseHeaders},null,8,["responseFieldDescriptionChecked","swaggerInstance","api","onDebugShowFieldDescriptionChange","onDebugEditorChange","debugSend","responseContent","responseCurlText","responseStatus","responseRawText","responseHeaders"])])])]),_:1},8,["spinning"])])}const Vn=Gt(Sn,[["render",Ln],["__scopeId","data-v-2ed131ca"]]);export{Vn as default};