whistle 2.9.85-beta → 2.9.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,9 +73,9 @@ top:e.scrollTop,height:e.scrollHeight-Pt(this)-this.display.barHeight,width:e.sc
73
73
  rt.state.context=rt.state.context.prev}function T(e,t){var n=function(){var n=rt.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new u(r,rt.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function N(){var e=rt.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function C(e){function t(n){return n==e?g():";"==e||"}"==n||")"==n||"]"==n?h():g(t)}return t}function I(e,t){return"var"==e?g(T("vardef",t),pe,C(";"),N):"keyword a"==e?g(T("form"),L,I,N):"keyword b"==e?g(T("form"),I,N):"keyword d"==e?rt.stream.match(/^\s*$/,!1)?g():g(T("stat"),j,C(";"),N):"debugger"==e?g(C(";")):"{"==e?g(T("}"),v,q,N,x):";"==e?g():"if"==e?("else"==rt.state.lexical.info&&rt.state.cc[rt.state.cc.length-1]==N&&rt.state.cc.pop()(),g(T("form"),L,I,N,Me)):"function"==e?g(ve):"for"==e?g(T("form"),v,we,I,x,N):"class"==e||qe&&"interface"==t?(rt.marked="keyword",g(T("form","class"==e?e:t),Ie,N)):"variable"==e?qe&&"declare"==t?(rt.marked="keyword",g(I)):qe&&("module"==t||"enum"==t||"type"==t)&&rt.stream.match(/^\s*\w/,!1)?(rt.marked="keyword","enum"==t?g(Oe):"type"==t?g(Te,C("operator"),te,C(";")):g(T("form"),he,C("{"),T("}"),q,N,N)):qe&&"namespace"==t?(rt.marked="keyword",g(T("form"),D,I,N)):qe&&"abstract"==t?(rt.marked="keyword",g(I)):g(T("stat"),P):"switch"==e?g(T("form"),L,C("{"),T("}","switch"),v,q,N,N,x):"case"==e?g(D,C(":")):"default"==e?g(C(":")):"catch"==e?g(T("form"),b,E,I,N,x):"export"==e?g(T("stat"),Le,N):"import"==e?g(T("stat"),je,N):"async"==e?g(I):"@"==t?g(D,I):h(T("stat"),D,C(";"),N)}function E(e){return"("==e?g(Ne,C(")")):void 0}function D(e,t){return k(e,t,!1)}function S(e,t){return k(e,t,!0)}function L(e){return"("!=e?h():g(T(")"),j,C(")"),N)}function k(e,t,n){if(rt.state.fatArrowAt==rt.stream.start){var r=n?O:R;if("("==e)return g(b,T(")"),_(Ne,")"),N,C("=>"),r,x);if("variable"==e)return h(b,he,C("=>"),r,x)}var o=n?U:B;return nt.hasOwnProperty(e)?g(o):"function"==e?g(ve,o):"class"==e||qe&&"interface"==t?(rt.marked="keyword",g(T("form"),Ce,N)):"keyword c"==e||"async"==e?g(n?S:D):"("==e?g(T(")"),j,C(")"),N,o):"operator"==e||"spread"==e?g(n?S:D):"["==e?g(T("]"),Re,N,o):"{"==e?J(G,"}",null,o):"quasi"==e?h(z,o):"new"==e?g(H(n)):g()}function j(e){return e.match(/[;\}\)\],]/)?h():h(D)}function B(e,t){return","==e?g(j):U(e,t,!1)}function U(e,t,n){var r=0==n?B:U,o=0==n?D:S;return"=>"==e?g(b,n?O:R,x):"operator"==e?/\+\+|--/.test(t)||qe&&"!"==t?g(r):qe&&"<"==t&&rt.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?g(T(">"),_(te,">"),N,r):"?"==t?g(D,C(":"),o):g(o):"quasi"==e?h(z,r):";"!=e?"("==e?J(S,")","call",r):"."==e?g(Y,r):"["==e?g(T("]"),j,C("]"),N,r):qe&&"as"==t?(rt.marked="keyword",g(te,r)):"regexp"==e?(rt.state.lastType=rt.marked="operator",rt.stream.backUp(rt.stream.pos-rt.stream.start-1),g(o)):void 0:void 0}function z(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?g(z):g(j,Q)}function Q(e){return"}"==e?(rt.marked="string-2",rt.state.tokenize=l,g(z)):void 0}function R(e){return c(rt.stream,rt.state),h("{"==e?I:D)}function O(e){return c(rt.stream,rt.state),h("{"==e?I:S)}function H(e){return function(t){return"."==t?g(e?V:F):"variable"==t&&qe?g(ce,e?U:B):h(e?S:D)}}function F(e,t){return"target"==t?(rt.marked="keyword",g(B)):void 0}function V(e,t){return"target"==t?(rt.marked="keyword",g(U)):void 0}function P(e){return":"==e?g(N,I):h(B,C(";"),N)}function Y(e){return"variable"==e?(rt.marked="property",g()):void 0}function G(e,t){if("async"==e)return rt.marked="property",g(G);if("variable"==e||"keyword"==rt.style){if(rt.marked="property","get"==t||"set"==t)return g(W);var n;return qe&&rt.state.fatArrowAt==rt.stream.start&&(n=rt.stream.match(/^\s*:\s*/,!1))&&(rt.state.fatArrowAt=rt.stream.pos+n[0].length),g(X)}return"number"==e||"string"==e?(rt.marked=Xe?"property":rt.style+" property",g(X)):"jsonld-keyword"==e?g(X):qe&&M(t)?(rt.marked="keyword",g(G)):"["==e?g(D,K,C("]"),X):"spread"==e?g(S,X):"*"==t?(rt.marked="keyword",g(G)):":"==e?h(X):void 0}function W(e){return"variable"!=e?h(X):(rt.marked="property",g(ve))}function X(e){return":"==e?g(S):"("==e?h(ve):void 0}function _(e,t,n){function r(o,i){if(n?n.indexOf(o)>-1:","==o){var a=rt.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),g(function(n,r){return n==t||r==t?h():h(e)},r)}return o==t||i==t?g():n&&n.indexOf(";")>-1?h(e):g(C(t))}return function(n,o){return n==t||o==t?g():h(e,r)}}function J(e,t,n){for(var r=3;r<arguments.length;r++)rt.cc.push(arguments[r]);return g(T(t,n),_(e,t),N)}function q(e){return"}"==e?g():h(I,q)}function K(e,t){if(qe){if(":"==e)return g(te);if("?"==t)return g(K)}}function Z(e,t){return!qe||":"!=e&&"in"!=t?void 0:g(te)}function $(e){return qe&&":"==e?rt.stream.match(/^\s*\w+\s+is\b/,!1)?g(D,ee,te):g(te):void 0}function ee(e,t){return"is"==t?(rt.marked="keyword",g()):void 0}function te(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(rt.marked="keyword",g("typeof"==t?S:te)):"variable"==e||"void"==t?(rt.marked="type",g(le)):"|"==t||"&"==t?g(te):"string"==e||"number"==e||"atom"==e?g(le):"["==e?g(T("]"),_(te,"]",","),N,le):"{"==e?g(T("}"),re,N,le):"("==e?g(_(se,")"),ne,le):"<"==e?g(_(te,">"),te):"quasi"==e?h(ie,le):void 0}function ne(e){return"=>"==e?g(te):void 0}function re(e){return e.match(/[\}\)\]]/)?g():","==e||";"==e?g(re):h(oe,re)}function oe(e,t){return"variable"==e||"keyword"==rt.style?(rt.marked="property",g(oe)):"?"==t||"number"==e||"string"==e?g(oe):":"==e?g(te):"["==e?g(C("variable"),Z,C("]"),oe):"("==e?h(xe,oe):e.match(/[;\}\)\],]/)?void 0:g()}function ie(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?g(ie):g(te,ae)}function ae(e){return"}"==e?(rt.marked="string-2",rt.state.tokenize=l,g(ie)):void 0}function se(e,t){return"variable"==e&&rt.stream.match(/^\s*[?:]/,!1)||"?"==t?g(se):":"==e?g(te):"spread"==e?g(se):h(te)}function le(e,t){return"<"==t?g(T(">"),_(te,">"),N,le):"|"==t||"."==e||"&"==t?g(te):"["==e?g(te,C("]"),le):"extends"==t||"implements"==t?(rt.marked="keyword",g(te)):"?"==t?g(te,C(":"),te):void 0}function ce(e,t){return"<"==t?g(T(">"),_(te,">"),N,le):void 0}function ue(){return h(te,de)}function de(e,t){return"="==t?g(te):void 0}function pe(e,t){return"enum"==t?(rt.marked="keyword",g(Oe)):h(he,K,me,Ae)}function he(e,t){return qe&&M(t)?(rt.marked="keyword",g(he)):"variable"==e?(m(t),g()):"spread"==e?g(he):"["==e?J(fe,"]"):"{"==e?J(ge,"}"):void 0}function ge(e,t){return"variable"!=e||rt.stream.match(/^\s*:/,!1)?("variable"==e&&(rt.marked="property"),"spread"==e?g(he):"}"==e?h():"["==e?g(D,C("]"),C(":"),ge):g(C(":"),he,me)):(m(t),g(me))}function fe(){return h(he,me)}function me(e,t){return"="==t?g(S):void 0}function Ae(e){return","==e?g(pe):void 0}function Me(e,t){return"keyword b"==e&&"else"==t?g(T("form","else"),I,N):void 0}function we(e,t){return"await"==t?g(we):"("==e?g(T(")"),ye,N):void 0}function ye(e){return"var"==e?g(pe,be):"variable"==e?g(be):h(be)}function be(e,t){return")"==e?g():";"==e?g(be):"in"==t||"of"==t?(rt.marked="keyword",g(D,be)):h(D,be)}function ve(e,t){return"*"==t?(rt.marked="keyword",g(ve)):"variable"==e?(m(t),g(ve)):"("==e?g(b,T(")"),_(Ne,")"),N,$,I,x):qe&&"<"==t?g(T(">"),_(ue,">"),N,ve):void 0}function xe(e,t){return"*"==t?(rt.marked="keyword",g(xe)):"variable"==e?(m(t),g(xe)):"("==e?g(b,T(")"),_(Ne,")"),N,$,x):qe&&"<"==t?g(T(">"),_(ue,">"),N,xe):void 0}function Te(e,t){return"keyword"==e||"variable"==e?(rt.marked="type",g(Te)):"<"==t?g(T(">"),_(ue,">"),N):void 0}function Ne(e,t){return"@"==t&&g(D,Ne),"spread"==e?g(Ne):qe&&M(t)?(rt.marked="keyword",g(Ne)):qe&&"this"==e?g(K,me):h(he,K,me)}function Ce(e,t){return"variable"==e?Ie(e,t):Ee(e,t)}function Ie(e,t){return"variable"==e?(m(t),g(Ee)):void 0}function Ee(e,t){return"<"==t?g(T(">"),_(ue,">"),N,Ee):"extends"==t||"implements"==t||qe&&","==e?("implements"==t&&(rt.marked="keyword"),g(qe?te:D,Ee)):"{"==e?g(T("}"),De,N):void 0}function De(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||qe&&M(t))&&rt.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(rt.marked="keyword",g(De)):"variable"==e||"keyword"==rt.style?(rt.marked="property",g(Se,De)):"number"==e||"string"==e?g(Se,De):"["==e?g(D,K,C("]"),Se,De):"*"==t?(rt.marked="keyword",g(De)):qe&&"("==e?h(xe,De):";"==e||","==e?g(De):"}"==e?g():"@"==t?g(D,De):void 0}function Se(e,t){if("!"==t)return g(Se);if("?"==t)return g(Se);if(":"==e)return g(te,me);if("="==t)return g(S);var n=rt.state.lexical.prev,r=n&&"interface"==n.info;return h(r?xe:ve)}function Le(e,t){return"*"==t?(rt.marked="keyword",g(Qe,C(";"))):"default"==t?(rt.marked="keyword",g(D,C(";"))):"{"==e?g(_(ke,"}"),Qe,C(";")):h(I)}function ke(e,t){return"as"==t?(rt.marked="keyword",g(C("variable"))):"variable"==e?h(S,ke):void 0}function je(e){return"string"==e?g():"("==e?h(D):"."==e?h(B):h(Be,Ue,Qe)}function Be(e,t){return"{"==e?J(Be,"}"):("variable"==e&&m(t),"*"==t&&(rt.marked="keyword"),g(ze))}function Ue(e){return","==e?g(Be,Ue):void 0}function ze(e,t){return"as"==t?(rt.marked="keyword",g(Be)):void 0}function Qe(e,t){return"from"==t?(rt.marked="keyword",g(D)):void 0}function Re(e){return"]"==e?g():h(_(S,"]"))}function Oe(){return h(T("form"),he,C("{"),T("}"),_(He,"}"),N,N)}function He(){return h(he,me)}function Fe(e,t){return"operator"==e.lastType||","==e.lastType||$e.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ve(e,t,n){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}var Pe,Ye,Ge=t.indentUnit,We=n.statementIndent,Xe=n.jsonld,_e=n.json||Xe,Je=n.trackScope!==!1,qe=n.typescript,Ke=n.wordCharacters||/[\w$\xa1-\uffff]/,Ze=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":o,"break":o,"continue":o,"new":e("new"),"delete":r,"void":r,"throw":r,"debugger":e("debugger"),"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":a,"false":a,"null":a,undefined:a,NaN:a,Infinity:a,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r,await:r}}(),$e=/[+\-*&%=<>!?|~^@]/,et=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,tt="([{}])",nt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"import":!0,"jsonld-keyword":!0},rt={state:null,column:null,marked:null,cc:null},ot=new y("this",new y("arguments",null));return b.lex=v.lex=!0,x.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-Ge,0,"block",!1),localVars:n.localVars,context:n.localVars&&new w(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Pe?n:(t.lastType="operator"!=Pe||"++"!=Ye&&"--"!=Ye?Pe:"incdec",p(t,n,Pe,Ye,e))},indent:function(t,r){if(t.tokenize==s||t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var o,a=r&&r.charAt(0),c=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var d=t.cc[u];if(d==N)c=c.prev;else if(d!=Me&&d!=x)break}for(;("stat"==c.type||"form"==c.type)&&("}"==a||(o=t.cc[t.cc.length-1])&&(o==B||o==U)&&!/^[,\.=+\-*:?[\(]/.test(r));)c=c.prev;We&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var p=c.type,h=a==p;return"vardef"==p?c.indented+("operator"==t.lastType||","==t.lastType?c.info.length+1:0):"form"==p&&"{"==a?c.indented:"form"==p?c.indented+Ge:"stat"==p?c.indented+(Fe(t,r)?We||Ge:0):"switch"!=c.info||h||0==n.doubleIndentSwitch?c.align?c.column+(h?0:1):c.indented+(h?0:Ge):c.indented+(/^(?:case|default)\b/.test(r)?Ge:2*Ge)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:_e?null:"/*",blockCommentEnd:_e?null:"*/",blockCommentContinue:_e?null:" * ",lineComment:_e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:_e?"json":"javascript",jsonldMode:Xe,jsonMode:_e,expressionAllowed:Ve,skipExpression:function(t){p(t,"atom","atom","true",new e.StringStream("",2,null))}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}function n(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.defineMode("css",function(t,n){function r(e,t){return g=t,e}function o(e,t){var n=e.next();if(A[n]){var o=A[n](e,t);if(o!==!1)return o}return"@"==n?(e.eatWhile(/[\w\\\-]/),r("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?r(null,"compare"):'"'==n||"'"==n?(t.tokenize=i(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):"!"==n?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),r("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=a),r("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function i(e){return function(t,n){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(n.tokenize=null),r("string","string")}}function a(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),r(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(r===!1?0:m),e.context),n}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,n){return k[n.context.type](e,t,n)}function d(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return u(e,t,n)}function p(e){var t=e.current().toLowerCase();f=I.hasOwnProperty(t)?"atom":C.hasOwnProperty(t)?"keyword":"variable"}var h=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var g,f,m=t.indentUnit,A=n.tokenHooks,M=n.documentTypes||{},w=n.mediaTypes||{},y=n.mediaFeatures||{},b=n.mediaValueKeywords||{},v=n.propertyKeywords||{},x=n.nonStandardPropertyKeywords||{},T=n.fontProperties||{},N=n.counterDescriptors||{},C=n.colorKeywords||{},I=n.valueKeywords||{},E=n.allowNested,D=n.lineComment,S=n.supportsAtComponent===!0,L=t.highlightNonStandardPropertyKeywords!==!1,k={};return k.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return c(n);if(S&&/@component/i.test(e))return l(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return l(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return l(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)f="builtin";else if("word"==e)f="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(E&&"("==e)return l(n,t,"parens")}return n.context.type},k.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return v.hasOwnProperty(r)?(f="property","maybeprop"):x.hasOwnProperty(r)?(f=L?"string-2":"property","maybeprop"):E?(f=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(f+=" error","maybeprop")}return"meta"==e?"block":E||"hash"!=e&&"qualifier"!=e?k.top(e,t,n):(f="error","block")},k.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):u(e,t,n)},k.prop=function(e,t,n){if(";"==e)return c(n);if("{"==e&&E)return l(n,t,"propBlock");if("}"==e||"{"==e)return d(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return l(n,t,"interpolation")}else f+=" error";return"prop"},k.propBlock=function(e,t,n){return"}"==e?c(n):"word"==e?(f="property","maybeprop"):n.context.type},k.parens=function(e,t,n){return"{"==e||"}"==e?d(e,t,n):")"==e?c(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&p(t),"parens")},k.pseudo=function(e,t,n){return"meta"==e?"pseudo":"word"==e?(f="variable-3",n.context.type):u(e,t,n)},k.documentTypes=function(e,t,n){return"word"==e&&M.hasOwnProperty(t.current())?(f="tag",n.context.type):k.atBlock(e,t,n)},k.atBlock=function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,n);if("{"==e)return c(n)&&l(n,t,E?"block":"top");if("interpolation"==e)return l(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();f="only"==r||"not"==r||"and"==r||"or"==r?"keyword":w.hasOwnProperty(r)?"attribute":y.hasOwnProperty(r)?"property":b.hasOwnProperty(r)?"keyword":v.hasOwnProperty(r)?"property":x.hasOwnProperty(r)?L?"string-2":"property":I.hasOwnProperty(r)?"atom":C.hasOwnProperty(r)?"keyword":"error"}return n.context.type},k.atComponentBlock=function(e,t,n){return"}"==e?d(e,t,n):"{"==e?c(n)&&l(n,t,E?"block":"top",!1):("word"==e&&(f="error"),n.context.type)},k.atBlock_parens=function(e,t,n){return")"==e?c(n):"{"==e||"}"==e?d(e,t,n,2):k.atBlock(e,t,n)},k.restricted_atBlock_before=function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(f="variable","restricted_atBlock_before"):u(e,t,n)},k.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,c(n)):"word"==e?(f="@font-face"==n.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!N.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},k.keyframes=function(e,t,n){return"word"==e?(f="variable","keyframes"):"{"==e?l(n,t,"top"):u(e,t,n)},k.at=function(e,t,n){return";"==e?c(n):"{"==e||"}"==e?d(e,t,n):("word"==e?f="tag":"hash"==e&&(f="builtin"),"at")},k.interpolation=function(e,t,n){return"}"==e?c(n):"{"==e||";"==e?d(e,t,n):("word"==e?f="variable":"variable"!=e&&"("!=e&&")"!=e&&(f="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:h?"block":"top",stateArg:null,context:new s(h?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||o)(e,t);return n&&"object"==typeof n&&(g=n[1],n=n[0]),f=n,"comment"!=g&&(t.state=k[t.state](g,e,t)),f},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"==r&&("parens"==n.type||"atBlock_parens"==n.type)||"{"==r&&("at"==n.type||"atBlock"==n.type))&&(o=Math.max(0,n.indent-m)):(n=n.prev,o=n.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:D,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],o=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(s),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),h=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],g=t(h),f=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=t(f),A=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],M=t(A),w=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(w),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],v=t(b),x=r.concat(i).concat(s).concat(c).concat(d).concat(h).concat(w).concat(b);
74
74
  e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:o,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:g,fontProperties:m,counterDescriptors:M,colorKeywords:y,valueKeywords:v,tokenHooks:{"/":function(e,t){return e.eat("*")?(t.tokenize=n,n(e,t)):!1}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:g,colorKeywords:y,valueKeywords:v,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:g,colorKeywords:y,valueKeywords:v,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:a,mediaFeatures:l,propertyKeywords:p,nonStandardPropertyKeywords:g,fontProperties:m,counterDescriptors:M,colorKeywords:y,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat("*")?(t.tokenize=n,n(e,t)):!1}},name:"css",helperType:"gss"})})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(r,o){function i(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(I=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,I=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return I="equals",null;if("<"==n){t.tokenize=i,t.state=g,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=i;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e){return e&&e.toLowerCase()}function d(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(T.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function p(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!T.contextGrabbers.hasOwnProperty(u(n))||!T.contextGrabbers[u(n)].hasOwnProperty(u(t)))return;p(e)}}function g(e,t,n){return"openTag"==e?(n.tagStart=t.column(),f):"closeTag"==e?m:g}function f(e,t,n){return"word"==e?(n.tagName=t.current(),E="tag",w):T.allowMissingTagName&&"endTag"==e?(E="tag bracket",w(e,t,n)):(E="error",f)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&T.implicitlyClosed.hasOwnProperty(u(n.context.tagName))&&p(n),n.context&&n.context.tagName==r||T.matchClosing===!1?(E="tag",A):(E="tag error",M)}return T.allowMissingTagName&&"endTag"==e?(E="tag bracket",A(e,t,n)):(E="error",M)}function A(e,t,n){return"endTag"!=e?(E="error",A):(p(n),g)}function M(e,t,n){return E="error",A(e,t,n)}function w(e,t,n){if("word"==e)return E="attribute",y;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||T.autoSelfClosers.hasOwnProperty(u(r))?h(n,r):(h(n,r),n.context=new d(n,r,o==n.indented)),g}return E="error",w}function y(e,t,n){return"equals"==e?b:(T.allowMissing||(E="error"),w(e,t,n))}function b(e,t,n){return"string"==e?v:"word"==e&&T.allowUnquoted?(E="string",w):(E="error",w(e,t,n))}function v(e,t,n){return"string"==e?v:w(e,t,n)}var x=r.indentUnit,T={},N=o.htmlMode?t:n;for(var C in N)T[C]=N[C];for(var C in o)T[C]=o[C];var I,E;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;I=null;var n=t.tokenize(e,t);return(n||I)&&"comment"!=n&&(E=null,t.state=t.state(I||n,e,t),E&&(n="error"==E?n+" error":E)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=i)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return T.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+x*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;o;){if(o.tagName==s[2]){o=o.prev;break}if(!T.implicitlyClosed.hasOwnProperty(u(o.tagName)))break;o=o.prev}else if(s)for(;o;){var l=T.contextGrabbers[u(o.tagName)];if(!l||!l.hasOwnProperty(u(s[2])))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+x:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=w)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){!function(e){e(n(261),n(264),n(262),n(263))}(function(e){"use strict";function t(e,t,n){var r=e.current(),o=r.search(t);return o>-1?e.backUp(r.length-o):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}function n(e){var t=l[e];return t?t:l[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(e,t){var r=e.match(n(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function i(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),o=e[n],i=o.length-1;i>=0;i--)r.unshift(o[i])}function a(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(!o[0]||o[1].test(r(t,o[0])))return o[2]}}var s={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},l={};e.defineMode("htmlmixed",function(n,r){function l(r,i){var s,d=c.token(r,i.htmlState),p=/\btag\b/.test(d);if(p&&!/[<>\s\/]/.test(r.current())&&(s=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(s))i.inTag=s+" ";else if(i.inTag&&p&&/>$/.test(r.current())){var h=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var g=">"==r.current()&&a(u[h[1]],h[2]),f=e.getMode(n,g),m=o(h[1],!0),A=o(h[1],!1);i.token=function(e,n){return e.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):t(e,A,n.localMode.token(e,n.localState))},i.localMode=f,i.localState=e.startState(f,c.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=r.current(),r.eol()&&(i.inTag+=" "));return d}var c=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag,allowMissingTagName:r.allowMissingTagName}),u={},d=r&&r.tags,p=r&&r.scriptTypes;if(i(s,u),d&&i(d,u),p)for(var h=p.length-1;h>=0;h--)u.script.unshift(["type",p[h].matches,p[h].mode]);return{startState:function(){var t=e.startState(c);return{token:l,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?c.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},function(e,t,n){!function(e){e(n(261),n(264),n(267))}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var o=e.getMode(t,n);return"null"==o.name?null:o}function o(e,t,n){return t.f=t.inline=n,n(e,t)}function i(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function s(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==c){var n=b;if(!n){var r=e.innerMode(y,t.htmlState);n="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}n&&(t.f=h,t.block=l,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function l(t,i){var s=t.column()===i.indentation,l=a(i.prevLine.stream),c=i.indentedCode,p=i.prevLine.hr,h=i.list!==!1,g=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var f=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,h)){for(i.list=null;f<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;i.list!==!1&&(i.indentationDiff=f-i.listStack[i.listStack.length-1])}var m=!(l||p||i.prevLine.header||h&&c||i.prevLine.fencedCodeEnd),M=(i.list===!1||p||l)&&i.indentation<=g&&t.match(T),w=null;if(i.indentationDiff>=4&&(c||i.prevLine.fencedCodeEnd||i.prevLine.header||l))return t.skipToEnd(),i.indentedCode=!0,v.code;if(t.eatSpace())return null;if(s&&i.indentation<=g&&(w=t.match(I))&&w[1].length<=6)return i.quote=0,i.header=w[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,d(i);if(i.indentation<=g&&t.eat(">"))return i.quote=s?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),t.eatSpace(),d(i);if(!M&&!i.setext&&s&&i.indentation<=g&&(w=t.match(N))){var y=w[1]?"ol":"ul";return i.indentation=f+t.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&t.match(C,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+y]),d(i)}return s&&i.indentation<=g&&(w=t.match(S,!0))?(i.quote=0,i.fencedEndRE=new RegExp(w[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&r(w[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=u,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,d(i)):i.setext||!(m&&h||i.quote||i.list!==!1||i.code||M||L.test(t.string))&&(w=t.lookAhead(1))&&(w=w.match(E))?(i.setext?(i.header=i.setext,i.setext=0,t.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==w[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,d(i)):M?(t.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,v.hr):"["===t.peek()?o(t,i,A):o(t,i,i.inline)}function c(t,n){var r=y.token(t,n.htmlState);if(!b){var o=e.innerMode(y,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=h,n.block=l,n.htmlState=null)}return r}function u(e,t){var r=t.listStack[t.listStack.length-1]||0,o=t.indentation<r,a=r+3;if(t.fencedEndRE&&t.indentation<=a&&(o||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting="code-block");var s;return o||(s=d(t)),t.localMode=t.localState=null,t.block=l,t.f=h,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?i(e,t,t.block):s}return t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),v.code)}function d(e){var t=[];if(e.formatting){t.push(v.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(v.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(v.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(v.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(v.linkHref,"url"):(e.strong&&t.push(v.strong),e.em&&t.push(v.em),e.strikethrough&&t.push(v.strikethrough),e.emoji&&t.push(v.emoji),e.linkText&&t.push(v.linkText),e.code&&t.push(v.code),e.image&&t.push(v.image),e.imageAltText&&t.push(v.imageAltText,"link"),e.imageMarker&&t.push(v.imageMarker)),e.header&&t.push(v.header,v.header+"-"+e.header),e.quote&&(t.push(v.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(v.quote+"-"+e.quote):t.push(v.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var o=(e.listStack.length-1)%3;o?1===o?t.push(v.list2):t.push(v.list3):t.push(v.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function p(e,t){return e.match(D,!0)?d(t):void 0}function h(t,r){var o=r.text(t,r);if("undefined"!=typeof o)return o;if(r.list)return r.list=null,d(r);if(r.taskList){var a=" "===t.match(C,!0)[1];return a?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,d(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),d(r);var s=t.next();if(r.linkTitle){r.linkTitle=!1;var l=s;"("===s&&(l=")"),l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var u="^\\s*(?:[^"+l+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return v.linkHref}if("`"===s){var p=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var m=t.current().length;if(0!=r.code||r.quote&&1!=m){if(m==r.code){var A=d(r);return r.code=0,A}return r.formatting=p,d(r)}return r.code=m,d(r)}if(r.code)return d(r);if("\\"===s&&(t.next(),n.highlightFormatting)){var M=d(r),w=v.formatting+"-escape";return M?M+" "+w:w}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),d(r);if("["===s&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),d(r);if("]"===s&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var M=d(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=f,M}if("["===s&&!r.image)return r.linkText&&t.match(/^.*?\]/)?d(r):(r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),d(r));if("]"===s&&r.linkText){n.highlightFormatting&&(r.formatting="link");var M=d(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?f:h,M}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=g,n.highlightFormatting&&(r.formatting="link");var M=d(r);return M?M+=" ":M="",M+v.linkInline}if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=g,n.highlightFormatting&&(r.formatting="link");var M=d(r);return M?M+=" ":M="",M+v.linkEmail}if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var x=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(x)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(y),i(t,r,c)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===s||"_"===s){for(var T=1,N=1==t.pos?" ":t.string.charAt(t.pos-2);3>T&&t.eat(s);)T++;var I=t.peek()||" ",E=!/\s/.test(I)&&(!k.test(I)||/\s/.test(N)||k.test(N)),D=!/\s/.test(N)&&(!k.test(N)||/\s/.test(I)||k.test(I)),S=null,L=null;if(T%2&&(r.em||!E||"*"!==s&&D&&!k.test(N)?r.em!=s||!D||"*"!==s&&E&&!k.test(I)||(S=!1):S=!0),T>1&&(r.strong||!E||"*"!==s&&D&&!k.test(N)?r.strong!=s||!D||"*"!==s&&E&&!k.test(I)||(L=!1):L=!0),null!=L||null!=S){n.highlightFormatting&&(r.formatting=null==S?"strong":null==L?"em":"strong em"),S===!0&&(r.em=s),L===!0&&(r.strong=s);var A=d(r);return S===!1&&(r.em=!1),L===!1&&(r.strong=!1),A}}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return d(r);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var A=d(r);return r.strikethrough=!1,A}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),d(r)}else if(" "===s&&t.match("~~",!0)){if(" "===t.peek())return d(r);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var j=d(r);return r.emoji=!1,j}return" "===s&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),d(r)}function g(e,t){var r=e.next();if(">"===r){t.f=t.inline=h,n.highlightFormatting&&(t.formatting="link");var o=d(t);return o?o+=" ":o="",o+v.linkInline}return e.match(/^[^>]+/,!0),v.linkInline}function f(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=m("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,d(t)):"error"}function m(e){return function(t,r){var o=t.next();if(o===e){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link-string");var i=d(r);return r.linkHref=!1,i}return t.match(B[e]),r.linkHref=!0,d(r)}}function A(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=M,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,d(t)):o(e,t,h)}function M(e,t){if(e.match("]:",!0)){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var r=d(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),v.linkText}function w(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=h,v.linkHref+" url")}var y=e.getMode(t,"text/html"),b="null"==y.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var v={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var x in v)v.hasOwnProperty(x)&&n.tokenTypeOverrides[x]&&(v[x]=n.tokenTypeOverrides[x]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,N=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,C=/^\[(x| )\](?=\s)/i,I=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,E=/^ {0,3}(?:\={1,}|-{2,})\s*$/,D=/^[^#!\[\]*_\\<>` "'(~:]+/,S=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,L=/^\s*\[[^\]]+?\]:.*$/,k=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,j=" ",B={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/},U={startState:function(){return{f:l,prevLine:{stream:null},thisLine:{stream:null},block:l,htmlState:null,indentation:0,inline:h,text:p,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(y,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return s(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=c)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,j).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:y}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:U}},indent:function(t,n,r){return t.block==c&&y.indent?y.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},blankLine:s,getType:d,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return U},"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",
75
75
  mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var o=0;o<r.mimes.length;o++)if(r.mimes[o]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var o=0;o<r.ext.length;o++)if(r.ext[o]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var o=t.lastIndexOf("."),i=o>-1&&t.substring(o+1,t.length);return i?e.findModeByExtension(i):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var o=0;o<r.alias.length;o++)if(r.alias[o].toLowerCase()==t)return r}}})},function(e,t,n){!function(e){e(n(261))}(function(e){function t(t,n,r){var o,i=t.getWrapperElement();return o=i.appendChild(document.createElement("div")),r?o.className="CodeMirror-dialog CodeMirror-dialog-bottom":o.className="CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),e.addClass(i,"dialog-opened"),o}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(r,o,i){function a(t){if("string"==typeof t)d.value=t;else{if(c)return;c=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),n(this,null);var s,l=t(this,r,i.bottom),c=!1,u=this,d=l.getElementsByTagName("input")[0];return d?(d.focus(),i.value&&(d.value=i.value,i.selectValueOnOpen!==!1&&d.select()),i.onInput&&e.on(d,"input",function(e){i.onInput(e,d.value,a)}),i.onKeyUp&&e.on(d,"keyup",function(e){i.onKeyUp(e,d.value,a)}),e.on(d,"keydown",function(t){i&&i.onKeyDown&&i.onKeyDown(t,d.value,a)||((27==t.keyCode||i.closeOnEnter!==!1&&13==t.keyCode)&&(d.blur(),e.e_stop(t),a()),13==t.keyCode&&o(d.value,t))}),i.closeOnBlur!==!1&&e.on(l,"focusout",function(e){null!==e.relatedTarget&&a()})):(s=l.getElementsByTagName("button")[0])&&(e.on(s,"click",function(){a(),u.focus()}),i.closeOnBlur!==!1&&e.on(s,"blur",a),s.focus()),a}),e.defineExtension("openConfirm",function(r,o,i){function a(){c||(c=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),u.focus())}n(this,null);var s=t(this,r,i&&i.bottom),l=s.getElementsByTagName("button"),c=!1,u=this,d=1;l[0].focus();for(var p=0;p<l.length;++p){var h=l[p];!function(t){e.on(h,"click",function(n){e.e_preventDefault(n),a(),t&&t(u)})}(o[p]),e.on(h,"blur",function(){--d,setTimeout(function(){0>=d&&a()},200)}),e.on(h,"focus",function(){++d})}}),e.defineExtension("openNotification",function(r,o){function i(){l||(l=!0,clearTimeout(a),e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}n(this,i);var a,s=t(this,r,o&&o.bottom),l=!1,c=o&&"undefined"!=typeof o.duration?o.duration:5e3;return e.on(s,"click",function(t){e.e_preventDefault(t),i()}),c&&(a=setTimeout(i,c)),i})})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e,n){for(var r=t(e),o=r,i=0;i<n.length;i++)-1==o.indexOf(n.charAt(i))&&(o+=n.charAt(i));return r==o?e:new RegExp(e.source,o)}function r(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function o(e,t,r){t=n(t,"g");for(var o=r.line,i=r.ch,a=e.lastLine();a>=o;o++,i=0){t.lastIndex=i;var s=e.getLine(o),l=t.exec(s);if(l)return{from:f(o,l.index),to:f(o,l.index+l[0].length),match:l}}}function i(e,t,i){if(!r(t))return o(e,t,i);t=n(t,"gm");for(var a,s=1,l=i.line,c=e.lastLine();c>=l;){for(var u=0;s>u&&!(l>c);u++){var d=e.getLine(l++);a=null==a?d:a+"\n"+d}s=2*s,t.lastIndex=i.ch;var p=t.exec(a);if(p){var h=a.slice(0,p.index).split("\n"),g=p[0].split("\n"),m=i.line+h.length-1,A=h[h.length-1].length;return{from:f(m,A),to:f(m+g.length-1,1==g.length?A+g[0].length:g[g.length-1].length),match:p}}}}function a(e,t,n){for(var r,o=0;o<=e.length;){t.lastIndex=o;var i=t.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=i),o=i.index+1}return r}function s(e,t,r){t=n(t,"g");for(var o=r.line,i=r.ch,s=e.firstLine();o>=s;o--,i=-1){var l=e.getLine(o),c=a(l,t,0>i?0:l.length-i);if(c)return{from:f(o,c.index),to:f(o,c.index+c[0].length),match:c}}}function l(e,t,o){if(!r(t))return s(e,t,o);t=n(t,"gm");for(var i,l=1,c=e.getLine(o.line).length-o.ch,u=o.line,d=e.firstLine();u>=d;){for(var p=0;l>p&&u>=d;p++){var h=e.getLine(u--);i=null==i?h:h+"\n"+i}l*=2;var g=a(i,t,c);if(g){var m=i.slice(0,g.index).split("\n"),A=g[0].split("\n"),M=u+m.length,w=m[m.length-1].length;return{from:f(M,w),to:f(M+A.length-1,1==A.length?w+A[0].length:A[A.length-1].length),match:g}}}}function c(e,t,n,r){if(e.length==t.length)return n;for(var o=0,i=n+Math.max(0,e.length-t.length);;){if(o==i)return o;var a=o+i>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?i=a:o=a+1}}function u(e,t,n,r){if(!t.length)return null;var o=r?h:g,i=o(t).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,l=e.lastLine()+1-i.length;l>=a;a++,s=0){var u=e.getLine(a).slice(s),d=o(u);if(1==i.length){var p=d.indexOf(i[0]);if(-1==p)continue e;var n=c(u,d,p,o)+s;return{from:f(a,c(u,d,p,o)+s),to:f(a,c(u,d,p+i[0].length,o)+s)}}var m=d.length-i[0].length;if(d.slice(m)==i[0]){for(var A=1;A<i.length-1;A++)if(o(e.getLine(a+A))!=i[A])continue e;var M=e.getLine(a+i.length-1),w=o(M),y=i[i.length-1];if(w.slice(0,y.length)==y)return{from:f(a,c(u,d,m,o)+s),to:f(a+i.length-1,c(M,w,y.length,o))}}}}function d(e,t,n,r){if(!t.length)return null;var o=r?h:g,i=o(t).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,l=e.firstLine()-1+i.length;a>=l;a--,s=-1){var u=e.getLine(a);s>-1&&(u=u.slice(0,s));var d=o(u);if(1==i.length){var p=d.lastIndexOf(i[0]);if(-1==p)continue e;return{from:f(a,c(u,d,p,o)),to:f(a,c(u,d,p+i[0].length,o))}}var m=i[i.length-1];if(d.slice(0,m.length)==m){for(var A=1,n=a-i.length+1;A<i.length-1;A++)if(o(e.getLine(n+A))!=i[A])continue e;var M=e.getLine(a+1-i.length),w=o(M);if(w.slice(w.length-i[0].length)==i[0])return{from:f(a+1-i.length,c(M,w,M.length-i[0].length,o)),to:f(a,c(u,d,m.length,o))}}}}function p(e,t,r,a){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,r=r?e.clipPos(r):f(0,0),this.pos={from:r,to:r};var c;"object"==typeof a?c=a.caseFold:(c=a,a=null),"string"==typeof t?(null==c&&(c=!1),this.matches=function(n,r){return(n?d:u)(e,t,r,c)}):(t=n(t,"gm"),a&&a.multiline===!1?this.matches=function(n,r){return(n?s:o)(e,t,r)}:this.matches=function(n,r){return(n?l:i)(e,t,r)})}var h,g,f=e.Pos;String.prototype.normalize?(h=function(e){return e.normalize("NFD").toLowerCase()},g=function(e){return e.normalize("NFD")}):(h=function(e){return e.toLowerCase()},g=function(e){return e}),p.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=f(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var r=this.matches(t,n);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var o=f(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=f(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,t,n){return new p(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new p(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)})})},function(e,t,n){!function(e){e(n(261),n(269),n(268))}(function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);return n&&n.index==t.pos?(t.pos+=n[0].length||1,"searching"):void(n?t.pos=n.index:t.skipToEnd())}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:o(t),multiline:!0})}function a(e,t,n,r,o){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){g(e)},onKeyDown:o,bottom:e.options.search.bottom})}function s(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\([nrt\\])/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\"==t?"\\":e})}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(n){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,o(n.query)),n.overlay=t(n.query,o(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,o(n.query)))}function p(t,n,o,i){var l=r(t);if(l.query)return h(t,n);var c=t.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),o&&t.openDialog){var u=null,p=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(d(t,l,n),l.posFrom=l.posTo=t.getCursor()),u&&(u.style.opacity=1),h(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)}))};a(t,m(t),c,p,function(n,o){var i=e.keyName(n),a=t.getOption("extraKeys"),s=a&&a[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(n),d(t,r(t),o),t.execCommand(s)):("find"==s||"findPersistent"==s)&&(e.e_stop(n),p(o,n))}),i&&c&&(d(t,l,c),h(t,n))}else s(t,m(t),"Search for:",c,function(e){e&&!l.query&&t.operation(function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),h(t,n)})})}function h(t,n,o){t.operation(function(){var a=r(t),s=i(t,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=i(t,a.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),s.find(n)))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),o&&o(s.from(),s.to()))})}function g(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function f(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var o=2;o<arguments.length;o++){var i=arguments[o];n.appendChild("string"==typeof i?document.createTextNode(i):i)}return n}function m(e){var t=f("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),f("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),f("",null,t," ",f("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function A(e){return f("",null," ",f("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",f("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function M(e){return f("",null,f("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",f("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function w(e){return f("",null,f("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",f("button",{},e.phrase("Yes"))," ",f("button",{},e.phrase("No"))," ",f("button",{},e.phrase("All"))," ",f("button",{},e.phrase("Stop")))}function y(e,t,n){e.operation(function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else r.replace(n)})}function b(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),a=f("",null,f("span",{className:"CodeMirror-search-label"},o),A(e));s(e,a,o,n,function(n){n&&(n=u(n),s(e,M(e),e.phrase("Replace with:"),"",function(r){if(r=c(r),t)y(e,n,r);else{g(e);var o=i(e,n,e.getCursor("from")),a=function(){var t,c=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||c&&o.from().line==c.line&&o.from().ch==c.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),l(e,w(e),e.phrase("Replace?"),[function(){s(t)},a,function(){y(e,n,r)}]))},s=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),a()};a()}}))})}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){g(e),p(e)},e.commands.findPersistent=function(e){g(e),p(e,!1,!0)},e.commands.findPersistentNext=function(e){p(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){p(e,!0,!0,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=g,e.commands.replace=b,e.commands.replaceAll=function(e){b(e,!0)}})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(r.doRedraw),r.doRedraw=setTimeout(function(){r.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var r=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(r.doUpdate),r.doUpdate=setTimeout(function(){r.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),t.listenForChanges!==!1&&e.on("changes",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;return t!=this.hScale?(this.hScale=t,!0):void 0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){if(l!=e.line){l=e.line,c=n.getLineHandle(e.line);var r=n.getLineHandleVisualStart(c);r!=c&&(l=n.getLineNumber(r),c=r)}if(c.widgets&&c.widgets.length||a&&c.height>s)return n.charCoords(e,"local")[t?"top":"bottom"];var o=n.heightAtLine(c,"local");return o+(t?0:c.height)}e!==!1&&this.computeScale();var n=this.cm,r=this.hScale,o=document.createDocumentFragment(),i=this.annotations,a=n.getOption("lineWrapping"),s=a&&1.5*n.defaultTextHeight(),l=null,c=null,u=n.lastLine();if(n.display.barWidth)for(var d,p=0;p<i.length;p++){var h=i[p];if(!(h.to.line>u)){for(var g=d||t(h.from,!0)*r,f=t(h.to,!1)*r;p<i.length-1&&!(i[p+1].to.line>u)&&(d=t(i[p+1].from,!0)*r,!(d>f+.9));)h=i[++p],f=t(h.to,!1)*r;if(f!=g){var m=Math.max(f-g,3),A=o.appendChild(document.createElement("div"));A.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(g+this.buttonHeight)+"px; height: "+m+"px",A.className=this.options.className,h.id&&A.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(o)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}})},function(e,t,n){!function(e){e(n(261),n(269),n(271))}(function(e){"use strict";function t(e,t,n,r){this.cm=e,this.options=r;var o={listenForChanges:!1};for(var i in r)o[i]=r[i];o.className||(o.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(o),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return t>=e?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,r){return"string"==typeof r&&(r={className:r}),r||(r={}),new t(this,e,n,r)});var r=1e3;t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){var n=this.matches[t];if(n.from.line>=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var o=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||r;o.findNext();){var n={from:o.from(),to:o.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>i)break}this.gap=null}},t.prototype.onChange=function(t){var r=t.from.line,o=e.changeEnd(t).line,i=o-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,r,i),t.from.line),this.gap.to=Math.max(n(this.gap.to,r,i),t.from.line)):this.gap={from:t.from.line,to:o+1},i)for(var a=0;a<this.matches.length;a++){var s=this.matches[a],l=n(s.from.line,r,i);l!=s.from.line&&(s.from=e.Pos(l,s.from.ch));var c=n(s.to.line,r,i);c!=s.to.line&&(s.to=e.Pos(c,s.to.ch))}clearTimeout(this.update);var u=this;this.update=setTimeout(function(){u.updateAfterChange()},250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(t,o,i,a){function s(e){var n=l(t,o);if(!n||n.to.line-n.from.line<c)return null;if("fold"===a)return n;for(var r=t.findMarksAt(n.from),i=0;i<r.length;++i)if(r[i].__isFold){if(!e)return null;n.cleared=!0,r[i].clear()}return n}if(i&&i.call){var l=i;i=null}else var l=r(t,i,"rangeFinder");"number"==typeof o&&(o=e.Pos(o,0));var c=r(t,i,"minFoldSize"),u=s(!0);if(r(t,i,"scanUp"))for(;!u&&o.line>t.firstLine();)o=e.Pos(o.line-1,0),u=s(!1);if(u&&!u.cleared&&"unfold"!==a){var d=n(t,i,u);e.on(d,"mousedown",function(t){p.clear(),e.e_preventDefault(t)});var p=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});p.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)}),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t,n){var o=r(e,t,"widget");if("function"==typeof o&&(o=o(n.from,n.to)),"string"==typeof o){var i=document.createTextNode(o);o=document.createElement("span"),o.appendChild(i),o.className="CodeMirror-foldmarker"}else o&&(o=o.cloneNode(!0));return o}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:o[n]}e.newFoldFunction=function(e,n){return function(r,o){t(r,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var o=e[r](t,n);if(o)return o}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var o=n[r](e,t);if(o)return o}});var o={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return r(this,e,t)})})},function(e,t,n){!function(e){e(n(261),n(273))}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return e===!0&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function r(e,t){for(var n=e.findMarks(h(t,0),h(t+1,0)),r=0;r<n.length;++r)if(n[r].__isFold){var o=n[r].find(-1);if(o&&o.line===t)return n[r]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function i(e,t,n){var i=e.state.foldGutter.options,s=t-1,l=e.foldOption(i,"minFoldSize"),c=e.foldOption(i,"rangeFinder"),u="string"==typeof i.indicatorFolded&&a(i.indicatorFolded),d="string"==typeof i.indicatorOpen&&a(i.indicatorOpen);e.eachLine(t,n,function(t){++s;var n=null,a=t.gutterMarkers;if(a&&(a=a[i.gutter]),r(e,s)){if(u&&a&&u.test(a.className))return;n=o(i.indicatorFolded)}else{var p=h(s,0),g=c&&c(e,p);if(g&&g.to.line-g.from.line>=l){if(d&&a&&d.test(a.className))return;n=o(i.indicatorOpen)}}(n||a)&&e.setGutterMarker(t,i.gutter,n)})}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var o=e.state.foldGutter;if(o){var i=o.options;if(n==i.gutter){var a=r(e,t);a?a.clear():e.foldCode(h(t,0),i)}}}function c(e,t){"mode"==t&&u(e)}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){n.from<t.from&&(i(e,n.from,t.from),t.from=n.from),n.to>t.to&&(i(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&i(e,r,r+1)}}e.defineOption("foldGutter",!1,function(r,o,i){i&&i!=e.Init&&(r.clearGutter(r.state.foldGutter.options.gutter),r.state.foldGutter=null,r.off("gutterClick",l),r.off("changes",u),r.off("viewportChange",d),r.off("fold",p),r.off("unfold",p),r.off("swapDoc",u),r.off("optionChange",c)),o&&(r.state.foldGutter=new t(n(o)),s(r),r.on("gutterClick",l),r.on("changes",u),r.on("viewportChange",d),r.on("fold",p),r.on("unfold",p),r.on("swapDoc",u),r.on("optionChange",c))});var h=e.Pos})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(t){return function(n,r){function o(t){for(var o,i=r.ch,l=0;;){var c=0>=i?-1:s.lastIndexOf(t[0],i-1);if(-1!=c){if(1==l&&c<r.ch)break;if(o=n.getTokenTypeAt(e.Pos(a,c+1)),!/^(comment|string)/.test(o))return{ch:c+1,tokenType:o,pair:t};i=c-1}else{if(1==l)break;l=1,i=s.length}}}function i(t){var r,o,i=1,s=n.lastLine(),l=t.ch;e:for(var c=a;s>=c;++c)for(var u=n.getLine(c),d=c==a?l:0;;){var p=u.indexOf(t.pair[0],d),h=u.indexOf(t.pair[1],d);if(0>p&&(p=u.length),0>h&&(h=u.length),d=Math.min(p,h),d==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==p)++i;else if(!--i){r=c,o=d;break e}++d}return null==r||a==r?null:{from:e.Pos(a,l),to:e.Pos(r,o)}}for(var a=r.line,s=n.getLine(a),l=[],c=0;c<t.length;c++){var u=o(t[c]);u&&l.push(u)}l.sort(function(e,t){return e.ch-t.ch});for(var c=0;c<l.length;c++){var d=i(l[c]);if(d)return d}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var o=n,i=Math.min(t.lastLine(),n+10);i>=o;++o){var a=t.getLine(o),s=a.indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(o,s)}}}var o,i=n.line,a=r(i);if(!a||r(i-1)||(o=r(i-2))&&o.end.line==i-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(i,a.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var o=n.line,i=r(o);if(null==i||null!=r(o-1))return null;for(var a=o;;){var s=r(a+1);if(null==s)break;++a}return{from:e.Pos(o,i+1),to:t.clipPos(e.Pos(a))}})})},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),o=r.blockCommentStart,i=r.blockCommentEnd;if(o&&i){for(var a,s=n.line,l=t.getLine(s),c=n.ch,u=0;;){var d=0>=c?-1:l.lastIndexOf(o,c-1);if(-1!=d){if(1==u&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(s,d+1)))&&(0==d||l.slice(d-i.length,d)==i||!/comment/.test(t.getTokenTypeAt(e.Pos(s,d))))){a=d+o.length;break}c=d-1}else{if(1==u)return;u=1,c=l.length}}var p,h,g=1,f=t.lastLine();e:for(var m=s;f>=m;++m)for(var A=t.getLine(m),M=m==s?a:0;;){var w=A.indexOf(o,M),y=A.indexOf(i,M);if(0>w&&(w=A.length),0>y&&(y=A.length),M=Math.min(w,y),M==A.length)break;if(M==w)++g;else if(!--g){p=m,h=M;break e}++M}if(null!=p&&(s!=p||h!=a))return{from:e.Pos(s,a),to:e.Pos(p,h)}}})})},function(e,t,n){"use strict";function r(){var e=I.rulesModal,t=e&&e.getSelectedList(),n=e&&e.getActive();n&&(t?-1===t.indexOf(n)&&t.push(n):t=[n]);var r=t&&t.map(function(e){
76
- return e.value}).join("\n");return r?(J!==r&&(J=r,_=null,r.replace(Z,function(e,t,n){return _=_||[],-1===_.indexOf(n)&&_.push(n),""})),_):void 0}function o(e,t){var n=e.moduleName,r=t&&t.hintUrl||e.hintUrl||"",o="plugin."+E.getSimplePluginName(e);return 0!==r.indexOf(n)&&0!==r.indexOf(o)&&(r=o+"/"+r),b!==r&&(v&&(v.hasDestroyed=!0),b=r,v=I.createCgi(r,!0)),v}function i(e){if(D)return[];var t=C.getAllRules();if(!e)return t;e=e.toLowerCase();var n=t.filter(function(t){return"socks://"===t&&-1!=="proxy".indexOf(e)?!0:(t=t.toLowerCase(),-1!==t.indexOf(e))});return n.sort(function(t,n){var r=t.toLowerCase().indexOf(e),o=n.toLowerCase().indexOf(e);return r===o?0:0>r||r>o&&o>=0?1:-1}),"csp"===e?n.push("disable://csp"):-1!=="upstream".indexOf(e)?n.push("proxy://","xproxy://"):-1!=="xupstream".indexOf(e)?n.push("xproxy://"):-1!=="extend".indexOf(e)?n.push("reqMerge://","resMerge://"):e.length>2&&("redirect://".indexOf(e)?"locationHref://".indexOf(e)||n.push("redirect://"):n.push("locationHref://")),n}function a(e){e=e.substring(1);try{var t=window.parent.getAtValueListForWhistle;if("function"!=typeof t)return;var n=t(e);if(Array.isArray(n)){var r=[],o=60;return n.forEach(function(e){if(e&&!(1>o)){if("string"==typeof e)return--o,void r.push(e);var t=e.value;if(t&&"string"==typeof t){--o;var n=e.label;n&&"string"==typeof n?r.push({text:t,displayText:n}):r.push(t)}}}),r}}catch(i){}}function s(e,t){var n;return t?(e=e.substring(t.length+3),n=C.getAllPluginNameList().map(function(e){return t+"://"+e})):(e=e.substring(1),n=C.getPluginVarList()),e?(e=e.toLowerCase(),t&&(e=t+"://"+e),n.filter(function(t){return-1!==t.indexOf(e)})):n}function l(e,t){try{var n=window.parent.getAtHelpUrlForWhistle;if("function"==typeof n){var r=n(e,t);if(r===!1||"string"==typeof r)return r}}catch(o){}return"https://avwo.github.io/whistle/rules/@.html"}function c(e,t){return"string"!=typeof t&&(t=""),t||e.homepage||"https://avwo.github.io/whistle/plugins.html"}function u(e,t,n,r){return n?e+(r?".":"=")+t:e+"://"+t}function d(e,t,n,r,o,i,a){if(A=[],F={},w=null,y=0,!e||i.hasDestroyed||!Array.isArray(e)&&!Array.isArray(e.list))return void(m=g=null);m=o,g=r;var s=0;Array.isArray(e)||(w=e.position,y=parseInt(e.offset,10)||0,e=e.list);var l=a?j:k;e.forEach(function(e){if(!(s>=60))if("string"==typeof e)e=u(r,e.trim(),a),e.length<l&&!F[e]&&(++s,A.push(e),F[e]=c(n));else if(e){var t,o;"string"==typeof e.label&&(t=e.label.trim()),t||"string"!=typeof e.display||(t=e.display.trim()),"string"==typeof e.value&&(o=u(r,e.value.trim(),a,e.isKey)),o&&o.length<l&&!F[t||o]&&(++s,A.push(t&&t!==o?{displayText:t,text:o}:o),F[t||o]=c(n,e.help))}}),x&&s&&(t._byPlugin=!0,t.execCommand("autocomplete"))}function p(e,t){return(!t||t())&&setTimeout(function(){e.state.completionActive||e.showHint({hint:N.hint.rulesHint,completeSingle:!1})},100),N.Pass}function h(e){te=null;var t,n=T("li.CodeMirror-hint-active");if(n.is(":visible"))if(t=n.text(),q)t="@"+t;else if(K)t="%"+t;else{var r=t.indexOf(":");te=t,-1!==r&&(t=t.substring(0,r))}else{var o=e.getCursor(),i=o.ch,a=e.getLine(o.line).replace(/(#.*|\s+)$/,""),s=a.length;if(s>=i){for(var l=i;--l>=0&&!/\s/.test(a[l]););for(++l;++i<=s&&!/\s/.test(a[i]););a=a.slice(l,i),B.test(a)||U.test(a)?t=a:O.test(a)&&(t=RegExp.$1)}}return t}n(278),n(280);for(var g,f,m,A,M,w,y,b,v,x,T=n(8),N=n(261),C=n(281),I=n(282),E=n(204),D=-1!==window.location.href.indexOf("disabledEditor=1"),S=/[^:/]/,L=/^((?:whistle\.)?([a-z\d_-]+:))(\/?$|\/\/)/,k=512,j=100,B=/^@/,U=/^%/,z=/^%([a-z\d_-]+)([=.])/,Q=/^(pipe|sniCallback):/,R=/^([a-z\d_.-]+:\/\/)?(`)?\{([^\s]*?)(?:\}\1?)?$/i,O=/^([^\s:]+):\/\//,H=120,F={},V={"Alt-/":"autocomplete"},P=["-",'"_"',"Shift-2",".",",","Shift-,","Shift-.","Shift-;","/","Shift-/","Shift-1","Shift-4","Shift-5","Shift-6","Shift-7","Shift-8","=","Shift-=","'","Shift-'",";","Shift-;","\\","Shift-\\","Shift-`","[","]","Shift-[","Shift-]","Shift-9","Shift-0"],Y=0;10>Y;Y++)P.push("'"+Y+"'");for(var G="a".charCodeAt(),W="z".charCodeAt();W>=G;G++){var X=String.fromCharCode(G);P.push("'"+X.toUpperCase()+"'"),P.push("'"+X+"'")}T(window).on("hashchange",function(){var e=-1!==window.location.href.indexOf("disabledEditor=1");e!==D&&(D=e)});var _,J,q,K,Z=/^[^\n\r\S]*(```+)[^\n\r\S]*(\S+)[^\n\r\S]*[\r\n]([\s\S]*?)[\r\n][^\n\r\S]*\1\s*$/gm,$=/\S+/,ee=function(e,t){return t+"{"+e+"}"+t};N.registerHelper("hint","rulesHint",function(e,t){q=!1,K=!1,x=!1,f=null;var n=e._byDelete||e._byPlugin,l=e._byEnter;e._byDelete=e._byPlugin=e._byEnter=!1;var p,h=e.getCursor(),b=e.getLine(h.line),v=h.ch,T=v,C=b.indexOf("#");if(!(-1!==C&&T>C)){for(;T&&$.test(b.charAt(T-1));)--T;var E,D,O,V,P,Y=T!=v&&b.substring(T,v),G=B.test(Y),W=Q.test(Y)&&RegExp.$1,X=U.test(Y);if(X&&z.test(Y)){if(D=RegExp.$1,P=RegExp.$2,E=D&&I.getPlugin(D+":"),V=E&&E.pluginVars,!V)return;O=Y.substring(D.length+2),X=!1}if(G||W||X){if((!l||/^(?:pipe|sniCallback):\/\/$/.test(Y))&&(p=G?a(Y):s(Y,W)),!p||!p.length)return;return G?q=!0:X&&(K=!0),{list:p,from:N.Pos(h.line,T),to:N.Pos(h.line,v)}}if(Y){if(R.test(Y)){var _=RegExp.$1.length,J=RegExp.$2,Z=RegExp.$3,te=I.getValuesModal(),ne=te&&te.list,re=r();if(re&&(ne&&ne.forEach(function(e){-1===re.indexOf(e)&&re.push(e)}),ne=re),"}`"===Z.slice(-2)&&(Z=Z.slice(0,-2)),ne&&ne.length){if(Z){p=[];var oe=Z.toLowerCase();ne.forEach(function(e){-1!==e.toLowerCase().indexOf(oe)&&p.push(ee(e,J))})}else p=ne.map(function(e){return ee(e,J)});var ie=p&&p.length;if(ie){if(1===ie&&p[0]===Y.substring(_))return;return b=b.substring(T).split(/\s/,1)[0]||"",{list:p,from:N.Pos(h.line,T+_),to:N.Pos(h.line,T+b.length)}}}}if(E||L.test(Y)){E=E||I.getPlugin(RegExp.$2);var ae=V||E;if(E&&("string"==typeof ae.hintUrl||ae.hintList)){if(V){if(O&&(l||O.length>j))return}else if(O=RegExp.$3||"",O=2===O.length?Y.substring(Y.indexOf("//")+2):"",O&&(O.length>k||l))return;clearTimeout(M);var se=V?"%"+D:RegExp.$1.slice(0,-1);if(ae.hintList){if(O?(O=O.toLowerCase(),A=ae.hintList.filter(function(e){return"string"==typeof e?-1!==e.toLowerCase().indexOf(O):-1!==e.text.toLowerCase().indexOf(O)?!0:e.displayText&&-1!==e.displayText.toLowerCase().indexOf(O)})):A=ae.hintList,!A.length)return;F={},A=A.map(function(e){var t,n;return"string"==typeof e?n=u(se,e,V):(n=u(se,e.text,V,e.isKey),e.displayText&&(n=e.displayText,t={text:n,displayText:e.displayText})),F[n]=c(E,e.help),t||n}),w="",y=0,g=se,O=m}if(A&&A.length&&g===se&&O===m){-1!==C&&(b=b.substring(0,C)),b=b.substring(T).split(/\s/,1)[0]||"",f=se,v=T+b.trim().length;var le=N.Pos(h.line,T),ce=N.Pos(h.line,v),ue=A,de="cursor"===w;if((y||de)&&(ue=ue.map(function(e){var t={from:le,to:ce};return"string"==typeof e?(t.text=e,t.displayText=e):(t.text=e.text,t.displayText=e.displayText),t}),de&&(le=h)),"tail"===w){var pe=le;le=ce,ce=pe}return y&&(T=Math.max(T,le.ch+y),T>v&&(T=v),le=N.Pos(h.line,T)),{list:ue,from:le,to:ce}}x=!0,M=setTimeout(function(){var t=o(E,ae);e._bindedHintEvents||(e._bindedHintEvents=!0,e.on("blur",function(){x=!1}));var n={protocol:se,value:O};P&&(n.sep=P),t(n,function(n){d(n,e,E,se,O,t,V)})},H)}}if(O||-1!==Y.indexOf("//")||!S.test(Y))return}else if(n)return;if(p=i(Y),p.length){var he,ge=b.indexOf("://",T);if(-1!==ge)ge+=3,he=b.substring(T,ge),/\s/.test(he)||0===Y.indexOf("red")&&(he===Y+"http://"||he===Y+"https://")||(v=ge);else if(ge=b.indexOf(":",T),-1!==ge&&(++ge,he=b.substring(T,ge)+"//",-1!==p.indexOf(he))){v=ge;var fe=b[v];"/"===fe&&(v++,fe=b[v],"/"===fe&&v++)}return{list:p,from:N.Pos(h.line,T),to:N.Pos(h.line,v)}}}}),N.commands.autocomplete=function(e){e.showHint({hint:N.hint.rulesHint,completeSingle:!1})},P.forEach(function(e){V[e]=p});var te;t.getExtraKeys=function(){return V},t.getHelpUrl=function(e,t){var n,r=h(e);if(B.test(r)&&(n=l(r.substring(1),t)))return n;if(n===!1)return!1;if(te&&(r===g||f===g)&&(n=F[te]))return n;if(z.test(r)){r=r.substring(1,RegExp.$1.length+1);var o=r&&C.getPlugin(r);return o=o&&o.homepage,o||"https://avwo.github.io/whistle/plugins.html?plugin="+r}return C.getHelpUrl(r)}},function(e,t,n){var r=n(279);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}",""])},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}function n(e,t,n){var r=e.options.hintOptions,o={};for(var i in g)o[i]=g[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function r(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var o;o="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n,a[e]=o}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},o=/Mac/.test(navigator.platform);o&&(r["Ctrl-P"]=function(){t.moveFocus(-1)},r["Ctrl-N"]=function(){t.moveFocus(1)});var i=e.options.customKeys,a=i?{}:r;if(i)for(var s in i)i.hasOwnProperty(s)&&n(s,i[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return a}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=n,this.picked=!1;var a=this,s=t.cm,l=s.getInputField().ownerDocument,c=l.defaultView||l.parentWindow,p=this.hints=l.createElement("ul");p.setAttribute("role","listbox"),p.setAttribute("aria-expanded","true"),p.id=this.id;var h=t.cm.options.theme;p.className="CodeMirror-hints "+h,this.selectedHint=n.selectedHint||0;for(var g=n.list,f=0;f<g.length;++f){var m=p.appendChild(l.createElement("li")),A=g[f],M=u+(f!=this.selectedHint?"":" "+d);null!=A.className&&(M=A.className+" "+M),m.className=M,f==this.selectedHint&&m.setAttribute("aria-selected","true"),m.id=this.id+"-"+f,m.setAttribute("role","option"),A.render?A.render(m,n,A):m.appendChild(l.createTextNode(A.displayText||r(A))),m.hintId=f}var w=t.options.container||l.body,y=s.cursorCoords(t.options.alignWithWord?n.from:null),b=y.left,v=y.bottom,x=!0,T=0,N=0;if(w!==l.body){var C=-1!==["absolute","relative","fixed"].indexOf(c.getComputedStyle(w).position),I=C?w:w.offsetParent,E=I.getBoundingClientRect(),D=l.body.getBoundingClientRect();T=E.left-D.left-I.scrollLeft,N=E.top-D.top-I.scrollTop}p.style.left=b-T+"px",p.style.top=v-N+"px";var S=c.innerWidth||Math.max(l.body.offsetWidth,l.documentElement.offsetWidth),L=c.innerHeight||Math.max(l.body.offsetHeight,l.documentElement.offsetHeight);w.appendChild(p),s.getInputField().setAttribute("aria-autocomplete","list"),s.getInputField().setAttribute("aria-owns",this.id),s.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var k,j=t.options.moveOnOverlap?p.getBoundingClientRect():new DOMRect,B=t.options.paddingForScrollbar?p.scrollHeight>p.clientHeight+1:!1;setTimeout(function(){k=s.getScrollInfo()});var U=j.bottom-L;if(U>0){var z=j.bottom-j.top,Q=j.top-(y.bottom-y.top)-2;L-j.top<Q?(z>Q&&(p.style.height=(z=Q)+"px"),p.style.top=(v=y.top-z)+N+"px",x=!1):p.style.height=L-j.top-2+"px"}var R=j.right-S;if(B&&(R+=s.display.nativeBarWidth),R>0&&(j.right-j.left>S&&(p.style.width=S-5+"px",R-=j.right-j.left-S),p.style.left=(b=Math.max(y.left-R-T,0))+"px"),B)for(var O=p.firstChild;O;O=O.nextSibling)O.style.paddingRight=s.display.nativeBarWidth+"px";if(s.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:g.length,close:function(){t.close()},pick:function(){a.pick()},data:n})),t.options.closeOnUnfocus){var H;s.on("blur",this.onBlur=function(){H=setTimeout(function(){t.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(H)})}s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect();k||(k=s.getScrollInfo());var r=v+k.top-e.top,o=r-(c.pageYOffset||(l.documentElement||l.body).scrollTop);return x||(o+=p.offsetHeight),o<=n.top||o>=n.bottom?t.close():(p.style.top=r+"px",void(p.style.left=b+k.left-e.left+"px"))}),e.on(p,"dblclick",function(e){var t=i(p,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())}),e.on(p,"click",function(e){var n=i(p,e.target||e.srcElement);n&&null!=n.hintId&&(a.changeActive(n.hintId),t.options.completeOnSingleClick&&a.pick())}),e.on(p,"mousedown",function(){setTimeout(function(){s.focus()},20)});var F=this.getSelectedHintRange();return(0!==F.from||0!==F.to)&&this.scrollToActive(),e.signal(n,"select",g[this.selectedHint],p.childNodes[this.selectedHint]),!0}function s(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function l(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}function c(t,n){var r,o=t.getHelpers(n,"hint");if(o.length){var i=function(e,t,n){function r(o){return o==i.length?t(null):void l(i[o],e,n,function(e){e&&e.list.length>0?t(e):r(o+1)})}var i=s(e,o);r(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var u="CodeMirror-hint",d="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",function(r){r=n(this,this.getCursor("start"),r);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!r.hint.supportsSelection)return;for(var i=0;i<o.length;i++)if(o[i].head.line!=o[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var a=this.state.completionActive=new t(this,r);a.options.hint&&(e.signal(this,"startCompletion",this),a.update(!0))}}),e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var p=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},h=window.cancelAnimationFrame||clearTimeout;t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var o=t.list[n],i=this;this.cm.operation(function(){o.hint?o.hint(i.cm,t,o):i.cm.replaceRange(r(o),o.from||t.from,o.to||t.to,"complete"),e.signal(t,"pick",o),i.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(h(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=p(function(){r.update()}),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;l(this.options.hint,this.cm,this.options,function(r){t.tick==n&&t.finishUpdate(r,e)})}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" "+d,""),r.removeAttribute("aria-selected")),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+d,r.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",r.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:c}),e.registerHelper("hint","fromList",function(t,n){var r,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),s=o;i.start<o.ch&&/\w/.test(i.string.charAt(o.ch-i.start-1))?r=i.string.substr(0,o.ch-i.start):(r="",a=o);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}return l.length?{list:l,from:a,to:s}:void 0}),e.commands.autocomplete=e.showHint;var g={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)})},function(e,t,n){"use strict";function r(e){e=e.substring(e.indexOf(".")+1);for(var t=0,n=m.length;n>t;t++){var r=m[t];if(r.name===e)return r}}var o=n(208),i=["rule","style","pipe","plugin","host","xhost","proxy","xproxy","http-proxy","xhttp-proxy","https-proxy","xhttps-proxy","socks","xsocks","pac","weinre","log","filter","ignore","skip","enable","disable","delete","urlParams","pathReplace","method","replaceStatus","referer","auth","ua","cache","attachment","forwardedFor","responseFor","reqMerge","resMerge","reqScript","resScript","reqDelay","resDelay","reqSpeed","resSpeed","reqHeaders","resHeaders","trailers","reqType","resType","reqCharset","resCharset","reqCookies","resCookies","reqCors","resCors","reqPrepend","resPrepend","reqBody","resBody","reqAppend","resAppend","headerReplace","reqReplace","resReplace","htmlPrepend","htmlBody","htmlAppend","cssPrepend","cssBody","cssAppend","jsPrepend","jsBody","jsAppend","reqWrite","resWrite","reqWriteRaw","resWriteRaw","cipher","sniCallback"],a=["file","xfile","tpl","xtpl","rawfile","xrawfile","redirect","locationHref","statusCode"],s=[],l=[],c=[],u=[],d=a.slice(),p=["http","https","ws","wss","tunnel"],h=p.concat(a).concat(i.slice(1));h.splice(h.indexOf("plugin"),1),h.splice(h.indexOf("reqScript")+1,0,"reqRules"),h.splice(h.indexOf("resScript")+1,0,"resRules"),h=h.map(function(e){return e+"://"}),h.splice(h.indexOf("filter://"),1,"excludeFilter://","includeFilter://"),h.push("lineProps://");var g=h,f=[["Map Local",["file://","xfile://","tpl://","xtpl://","rawfile://","xrawfile://"]],["Map Remote",["https://","http://","wss://","ws://","tunnel://"]],["DNS Spoofing",["host://","xhost://","proxy://","xproxy://","http-proxy://","xhttp-proxy://","https-proxy://","xhttps-proxy://","socks://","xsocks://","pac://"]],["Rewrite Request",["urlParams://","pathReplace://","sniCallback://","method://","cipher://","reqHeaders://","forwardedFor://","referer://","auth://","ua://","cache://","attachment://","reqType://","reqCharset://","reqCookies://","reqCors://","reqMerge://","reqPrepend://","reqBody://","reqAppend://","reqReplace://","reqWrite://","reqWriteRaw://","trailers://"]],["Rewrite Response",["statusCode://","replaceStatus://","redirect://","locationHref://","resHeaders://","responseFor://","resType://","resCharset://","resCookies://","resCors://","resMerge://","resPrepend://","resBody://","resAppend://","resReplace://","htmlPrepend://","htmlBody://","htmlAppend://","cssPrepend://","cssBody://","cssAppend://","jsPrepend://","jsBody://","jsAppend://","resWrite://","resWriteRaw://"]],["Common",["pipe://","delete://","headerReplace://","reqScript://","resScript://","reqRules://","resRules://"]],["Throttle",["reqDelay://","resDelay://","reqSpeed://","resSpeed://"]],["Tools",["weinre://","log://"]],["Settings",["style://","lineProps://","enable://","disable://"]],["Filters",["ignore://","skip://","excludeFilter://","includeFilter://"]],["Plugins",[]]],m=[];t.setPlugins=function(e){var t=e.disabledPlugins;m=e.pluginsOptions,s=[],l=[],c=[],u=[],d=a.slice(),g=h.slice();var n=[];f[f.length-1][1]=n,e.disabledAllPlugins||m.forEach(function(e,r){if(r){var o=e.name;if(!t[o]){var i=e.pluginVars;if(i){l.push(o);var a=i.hintSuffix;a?a.forEach(function(e){c.push("%"+o+e)}):c.push("%"+o+"=")}u.push(o);var p;e.hideShortProtocol||-1!==o.indexOf("_")||(d.push(o),p=o+"://",g.push(p),n.push(p)),e.hideLongProtocol||(s.push("whistle."+o,"plugin."+o),p="whistle."+o+"://",g.push(p),n.push(p))}}}),o.trigger("updatePlugins")},t.PROTOCOLS=i,t.getGroupRules=function(){return f},t.getForwardRules=function(){return d},t.getPluginRules=function(){return s},t.getPluginNameList=function(){return l},t.getPluginVarList=function(){return c},t.getAllPluginNameList=function(){return u},t.getAllRules=function(){return g};var A="https://avwo.github.io/whistle/rules/";t.getHelpUrl=function(e){return e&&"rule"!==e?"includeFilter"===e||"excludeFilter"===e?A+"filter.html":"skip"===e?A+"ignore.html":"lineProps"===e?A+"lineProps.html":"reqRules"===e?A+"reqScript.html":"resRules"===e?A+"resScript.html":-1!==a.indexOf(e)?A+"rule/"+e.replace(/^x/,"")+".html":-1!==p.indexOf(e)?A+"rule/replace.html":-1!==i.indexOf(e)?A+e.replace(/^x/,"")+".html":(e=r(e),e&&e.homepage?e.homepage:A):A},t.getPlugin=r},function(e,t,n){"use strict";function r(e){return e!==G?!1:e?e.url!==G.url||e.ip!==G.ip?!1:e.name===G.name&&e.value===G.value:!0}function o(e){var n,o=location.hash.substring(1),i=o.indexOf("?");if(-1!==i){var a=te.parseQueryString(o.substring(i+1),null,null,decodeURIComponent),s=a.rulesName||a.ruleName,l=a.valuesName||a.valueName;s!==t.activeRulesName&&(t.activeRulesName=s,oe.trigger("activeRules")),l!==t.activeValuesName&&(t.activeValuesName=l,oe.trigger("activeValues")),a.url&&(n={},n.url=a.url);for(var c=0;6>c;c++){var u="name"+(c||""),d=a[u];if(d){n=n||{},n[u]=d;var p="value"+(c||"");n[p]=a[p]||""}}a.ip&&(n=n||{},n.ip=a.ip),n&&n.name&&"exact"===a.mtype&&(n.mtype=1),X||"true"!==a.clearNetwork||(W=!0)}t.hashFilterObj=n,e&&!r(n)&&oe.trigger("hashFilterChange"),G=n}function i(e){e=e||{},re.set("filterText",JSON.stringify({disabledFilterText:e.disabledFilterText,filterText:e.filterText,disabledExcludeText:e.disabledExcludeText,excludeText:e.excludeText}))}function a(){var e=te.parseJSON(re.get("filterText"));return e?{disabledFilterText:e.disabledFilterText,filterText:te.toString(e.filterText).substring(0,le),disabledExcludeText:e.disabledExcludeText,excludeText:te.toString(e.excludeText).substring(0,ce)}:{filterText:"",excludeText:""}}function s(e){e=e||{},re.set("networkColumns",JSON.stringify({columns:e.columns}))}function l(){return te.parseJSON(re.get("networkColumns"))||{}}function c(e){var t=Ge.length,n=t?te.findArray(Ge,function(t){return t.text===e}):null;return t-=10,t>2&&(Ge=Ge.slice(t),n&&-1===Ge.indexOf(n)&&Ge.push(n)),n&&n.filter}function u(e){if(e=e&&e.trim()){var t=c(e);if(t)return t;var n;return e.split(/\s+/).forEach(function(e){if(Pe.test(e)){var r=Ye[RegExp.$1],o="!"===e[2];e=e.substring(o?3:2),e&&(t=t||[],n=te.toRegExp(e),t.push({type:r,not:o,pattern:n,keyword:n?null:e.toLowerCase()}))}else e&&(t=t||[],n=te.toRegExp(e),t.push({pattern:n,keyword:n?null:e.toLowerCase()}))}),t&&Ge.push({text:e,filter:t}),t}}function d(e,t,n){if(!e)return!1;var r;if(t.pattern)r=t.pattern.test(e);else{if(n)try{var o=decodeURIComponent(e);o!==e&&(e+="\n"+o)}catch(i){}r=-1!==h(e).indexOf(t.keyword)}return t.not?!r:r}function p(e,t){for(var n=0,r=t.length;r>n;n++){var o=t[n];switch(o.type){case"method":if(d(e.req.method,o))return!0;break;case"ip":if(d(e.req.ip||"127.0.0.1",o))return!0;break;case"headers":if(d(te.objectToString(e.req.headers),o,!0))return!0;break;case"host":if(d(e.isHttps?e.url:te.getHost(e.url),o))return!0;break;case"body":if(d(te.getBody(e.req,!0),o))return!0;break;default:if(d((e.isHttps?"tunnel://":"")+e.url,o))return!0}}return!1}function h(e){return String(null==e?"":e).trim().toLowerCase()}function g(e){t.hasInvalidCerts!=e.hasInvalidCerts&&(t.hasInvalidCerts=e.hasInvalidCerts,oe.trigger("updateUI"))}function f(e,t,n){if(!e[n]||O.clientId===e[t])return!1;var r=e[t],o=e[n];return O[t]===r&&O[n]===o?!1:(O[t]=r,O[n]=o,!0)}function m(e){f(e,"mrulesClientId","mrulesTime")&&oe.trigger("rulesChanged")}function A(e){f(e,"mvaluesClientId","mvaluesTime")&&oe.trigger("valuesChanged")}function M(e,t,n){for(var r=0;n>r;r++){var o=e[r],i=t[r];if(o.name!==i.name||o.action!==i.action)return!0}}function w(e,t){var n=e.length;if(n!==t.length)return!0;for(var r=0;n>r;r++){var o=e[r],i=t[r];if(o.title!==i.title||o.key!==i.key||o.width!==i.width)return!0}}function y(e,t,n){var r=e.length,o=t.length;return r?1===r?void((!o||o>1||e[0].name!==t[0].name||e[0].action!==t[0].action)&&oe.trigger(n)):o&&1!==o?void((r!==o||M(e,t,r))&&oe.trigger(n)):oe.trigger(n):void(o&&oe.trigger(n))}function b(e){if(!e)return 0;var t=e.length;return"="===e[t-1]&&(t-=2,"="===e[t]&&--t),t}function v(e,t){Object.keys(t).forEach(function(n){var r=t[n];if("rules"===n||"rulesHeaders"===n||"url"===n)r=r||e[n];else if("req"===n||"res"===n){var o=e[n],i=o.base64;r.headers=r.headers||o.headers,r.rawHeaderNames=r.rawHeaderNames||o.rawHeaderNames,r.base64?r.preLen>0&&(r.base64=(i?i.substring(0,r.preLen):"")+r.base64):(r.base64=i,r[te.BODY_KEY]=o[te.BODY_KEY],r[te.HEX_KEY]=o[te.HEX_KEY],r[te.JSON_KEY]=o[te.JSON_KEY])}e[n]=r})}function x(e){var t=[""];return(!e.requestTime||te.hasRequestBody(e.req.method))&&(t[0]=b(e.req.base64)),e.endTime||(t[1]=b(e.res.base64)),t.join("-")}function T(){function e(){if(document.hidden){if(Date.now()-qe>Le)return setTimeout(e,100)}else qe=Date.now();be.clearNetwork&&(P=Y||P,be.clearNetwork=!1);var n=B(),r=Me.length,o=we.length,i=-1,s=-1,l=[],c=[],d=[];Ae.forEach(function(e){e.endTime||e.lost||(l.push(e.id),c.push(x(e))),e.reqPlugin>0&&e.reqPlugin<10&&(++e.reqPlugin,d.push(e.id))});var h=t.clearedLogs,f=t.clearedSvrLogs;t.clearedLogs=t.clearedSvrLogs=!1,!t.pauseConsoleRefresh&&Ce>r&&(i=h&&F||ve),!t.pauseServerLogRefresh&&Ce>o&&(s=f&&V||xe);var M,b,T=be.getActive(),N=T&&T.frames;N&&!T.pauseRecordFrames&&(T.stopRecordFrames?(b=T.id,M=-3):N.length<=ue&&(b=T.id,M=T.lastFrameId));var C=X?20:be.getDisplayCount(),I={startLogTime:t.stopConsoleRefresh?-3:i,startSvrLogTime:t.stopServerLogRefresh?-3:s,ids:l.join(),status:c.join(),startTime:n,dumpCount:Ee,lastRowId:X||!C?P:void 0,curReqId:b,lastFrameId:M,logId:_||"",count:C||20,tunnelIds:d};X=!0,$.extend(I,G),ke&&(I.ip="self"),_e.getData(I,function(n){var r=n&&n.data&&n.data.hasNew;if(setTimeout(e,r?100:900),U(n),n&&0===n.ec){var o=n.server;J=o&&o.port,K=o&&o.account,t.pluginsRoot=n.pluginsRoot,g(n),t.enablePluginMgr=n.epm,t.supportH2=n.supportH2,t.backRulesFirst=n.backRulesFirst,t.custom1=n.custom1,t.custom2=n.custom2,t.custom1Key=n.custom1Key,t.custom2Key=n.custom2Key,t.hasAccountRules!==n.hasARules&&(t.hasAccountRules=n.hasARules,oe.trigger("accountRulesChanged")),I.dumpCount>0&&(Ee=0),n.clientIp&&(t.clientIp=n.clientIp),m(n),A(n),me.forEach(function(e){e(n)});var i,s=n.log.length,l=n.svrLog.length,c=Ue,d=ze,h=Qe,f=Oe,M=Re,x=[],C=[],E=[];je=n.plugins||{},Be=n.disabledPlugins||{},Z||Object.keys(je).forEach(function(e){var t=e.slice(0,-1);if(!Be[t]){var n=je[e];E.push({mtime:n.mtime,priority:n.priority,_key:e,plugin:t,reqTab:n.reqTab,resTab:n.resTab,tab:n.tab,comTab:n.comTab,toolTab:n.toolTab,col:n.networkColumn});var r=n.webWorker;r&&-1===C.indexOf(r)&&(C.push(r),i=i||-1===Fe.indexOf(r))}}),E.sort(te.comparePlugin),Ue=[],ze=[],Qe=[],Oe=[],Re=[],Ie=[],E.forEach(function(e){var t=e.reqTab,n=e.resTab,r=e.tab,o=e.toolTab,i=e.comTab,a=e.plugin,s=e.col;t&&(t.plugin=a,Ue.push(t)),n&&(n.plugin=a,ze.push(n)),r&&(r.plugin=a,Qe.push(r)),i&&(i.plugin=a,Oe.push(i)),o&&(o.plugin=a,Re.push(o)),s&&(s.name=s.className="whistle."+e.plugin,s.isPlugin=!0,x.push(s),Ie.push(s.key))}),y(Ue,c,"reqTabsChange"),y(ze,d,"resTabsChange"),y(Qe,h,"tabsChange"),y(Oe,f,"comTabsChange"),y(Re,M,"toolTabsChange"),w(x,He)&&(He=x,oe.trigger("pluginColumnsChange")),(i||Fe.length!==C.length)&&(Fe=C,ae(Fe)),Z=n.disabledAllPlugins,(s||l)&&(s&&(Me.push.apply(Me,n.log),ve=n.log[s-1].id),l&&(we.push.apply(we,n.svrLog),xe=n.svrLog[l-1].id),fe.forEach(function(e){e(Me,we)})),n.lastLogId&&(ve=n.lastLogId),n.lastSvrLogId&&(xe=n.lastSvrLogId),n=n.data;var D,S=n.frames&&n.frames.length;if(S?(T.lastFrameId=n.frames[S-1].frameId,N.push.apply(N,n.frames)):n.lastFrameId&&(T.lastFrameId=n.lastFrameId),b){var k=n.socketStatus;k?(T.closed=void 0,k.sendStatus>-1&&(D=T.sendStatus!==k.sendStatus,T.sendStatus=k.sendStatus),k.receiveStatus>-1&&(D=D||T.receiveStatus!==k.receiveStatus,T.receiveStatus=k.receiveStatus)):T.closed||(D=!0,T.closed=!0)}n.lastId&&(P=n.lastId),n.endId&&(Y=n.endId);var j=n.tunnelIps||"";if(!n.ids.length&&!n.newIds.length||be.clearNetwork){if((D||S)&&ge.forEach(function(e){e()}),Object.keys(j).length){var B;Ae.forEach(function(e){var t=j[e.id];t&&(delete e.reqPlugin,e.realIp=t,B=!0)}),B&&oe.trigger("updateUI")}}else{var z=n.newIds;if(n=n.data,Ae.forEach(function(e){var t=n[e.id];t?(v(e,t),L(e),ie.postMessage(e)):(e.lost=!0,e.endTime||ie.postMessage(e));var r=j[e.id];r&&(delete e.reqPlugin,e.realIp=r)}),z.length){var Q=a(),R=Q.disabledExcludeText?null:u(Q.excludeText),O=Q.disabledFilterText?null:u(Q.filterText);t.curNewIdList=z.filter(function(e){var t=n[e];return!t||(ie.postMessage(t),R&&p(t,R)||O&&!p(t,O))?void 0:(L(t),Ae.push(t),!0)})}pe.forEach(function(e){e(be)})}}})}H||(H=!0,e())}function N(e,t){if(e&&t){var n={};return Object.keys(e).forEach(function(r){n[t[r]||r]=e[r]}),n}}function C(e){if(e.parent===window)for(var t=document.querySelectorAll("iframe"),n=0,r=t.length;r>n;n++){var o=t[n];if(o.contentWindow===e)return o}}function I(e){if(!e)return!1;if(e.useFrames)return!0;if(e.reqError||e.resError)return!1;var t=e.res.statusCode;return/^wss?:\/\//.test(e.url)?101==t:e.inspect&&200==t}function E(e){var t=e.indexOf("&");return-1!==t&&(e=e.substring(0,t)),t=e.indexOf("!"),
77
- -1!==t&&(e=e.substring(0,t)),"@"===e[0]&&(e="#"+e.substring(1)),e.length>32?void 0:e}function D(e,t){var n=e.lastIndexOf("&custom"+(t?"1=":"2="));if(-1!==n){if(e=e.substring(n+9),n=e.indexOf("&"),e=-1===n?e:e.substring(0,n),-1!==e.indexOf("%"))try{return decodeURIComponent(e)}catch(r){}return e}}function S(e){e.style=void 0;var n=e.rules&&e.rules.style;if(n=n&&n.list){n="&"+n.map(function(e){return e=e.value||e.matcher,e.substring(e.indexOf("://")+3)}).join("&");var r,o,i,a=n.lastIndexOf("&color=");-1!==a&&(r=E(n.substring(a+7)));var s=n.lastIndexOf("&fontStyle=");-1!==s&&(o=E(n.substring(s+11)));var l=n.lastIndexOf("&bgColor=");-1!==l&&(i=E(n.substring(l+9))),(r||o||i)&&(e.style={color:r,fontStyle:o,backgroundColor:i});var c=t.custom1Key,u=t.custom2Key;te.notEStr(c)||(e.custom1=D(n,!0)),te.notEStr(u)||(e.custom2=D(n))}}function L(e){var t=e.url,n=e.req,r=e.res;e.method=n.method;var o=e.endTime,i=o?"":"-",a=r.headers||"";e.hostIp=r.ip||i,e.clientIp=n.ip||"127.0.0.1",e.date=e.date||te.toLocaleString(new Date(e.startTime)),e.clientPort=n.port,e.serverPort=e.res.port,e.contentEncoding=(a["content-encoding"]||"")+(e.res.hasGzipError?" (Incorrect header)":"");var s=null==n.size?i:n.size,l=null==r.size?i:r.size,c=te.getDisplaySize(s,n.unzipSize),u=te.getDisplaySize(l,r.unzipSize);e.body=""===c&&""===u?"":c+", "+u,e.bodySize=(n.size||0)+(r.size||0);var d=null==r.statusCode?i:r.statusCode;if(e.result=/^[1-9]/.test(d)&&parseInt(d,10)||d,e.type=(a["content-type"]||"").split(";")[0].toLowerCase(),e.dns=e.request=e.response=e.download=e.time=i,e.dnsTime>0&&(e.dns=e.dnsTime-e.startTime+"ms",e.requestTime>0&&(e.request=e.requestTime-e.dnsTime+"ms"),e.responseTime>0&&(!e.requestTime||e.requestTime>e.responseTime?e.response=e.responseTime-e.dnsTime+"ms":e.response=e.responseTime-e.requestTime+"ms",o>0&&(e.download=o-e.responseTime+"ms",e.time=o-e.startTime+"ms"))),n._hasError=e.reqError,r._hasError=e.resError,n.rawHeaders=N(n.headers,n.rawHeaderNames),r.rawHeaders=N(r.headers,r.rawHeaderNames),r.rawTrailers=N(r.trailers,r.rawTrailerNames),S(e),e.rules&&e.pipe&&(e.rules.pipe=e.pipe),e.path)e.useH2?e.protocol="H2":"H2"===e.protocol&&(e.protocol=e.isHttps?"HTTP":te.getProtocol(t));else{e.isHttps?e.protocol=te.getTransProto(r)||te.getTransProto(n)||"HTTP":e.protocol=e.useH2?"H2":te.getProtocol(t),e.hostname=e.isHttps?"Tunnel to":te.getHost(t);var p=t.indexOf("://");-1!==p?(p=t.indexOf("/",p+3),e.path=-1===p?"/":t.substring(p)):e.path=t,e.path.length>Ne&&(e.shortPath=e.path.substring(0,Ne)+"...")}!e.useHttp||"HTTPS"!==e.protocol&&"WSS"!==e.protocol||(e.protocol=e.protocol+" > "+e.protocol.slice(0,-1)),!e.frames&&I(e)&&(e.frames=[])}function k(e){var t=e&&e.url;return t&&"string"==typeof t&&-1===t.indexOf("#")?e.isHttps?-1===t.indexOf("/")&&-1===t.indexOf("?"):Ke.test(t):!1}function j(){return Ae.length-ne.MAX_COUNT-1}function B(){return X?j()>0||t.stopRefresh?-1:P||"0":W?-2:""}function U(e){return he.length?(e=e&&e.server)?(De=0,t.setServerInfo&&t.setServerInfo(e),Q&&Q.strictMode!=e.strictMode&&(Q.strictMode=e.strictMode,oe.trigger("updateStrictMode")),Q&&Q.version==e.version&&Q.rulesMode===e.rulesMode&&Q.cmdName===e.cmdName&&Q.networkMode===e.networkMode&&Q.pluginsMode===e.pluginsMode&&Q.multiEnv===e.multiEnv&&Q.baseDir==e.baseDir&&Q.username==e.username&&Q.nodeVersion==e.nodeVersion&&Q.port==e.port&&Q.host==e.host&&Q.pid==e.pid&&Q.ipv4.sort().join()==e.ipv4.sort().join()&&Q.ipv6.sort().join()==e.ipv6.sort().join()?void(Q=e):(Q=e,void he.forEach(function(t){t(e)}))):(++De,void(De>=Se&&(Q=e,he.forEach(function(e){e(!1)})))):void(De=0)}function z(e){var t=K&&K[e];return Array.isArray(t)||(t=[]),Z?t:(Object.keys(je).forEach(function(n){var r=je[n],o=r[e];if(o){var i=n.slice(0,-1);Be[i]||o.forEach(function(e){e.title=i+" extension menu",e.mtime=r.mtime,e.priority=r.priority,e._key=n,e._urlPattern=te.toRegExp(e.urlPattern)||te.toRegExp(e.namePattern),t.push(e)})}}),t.length>1?t.sort(te.comparePlugin):t)}var Q,R,O,H,F,V,P,Y,G,W,X,_,J,q,K,Z,$=n(8),ee=n(283),te=n(204),ne=n(284),re=n(285),oe=n(208),ie=n(286),ae=ie.updateWorkers,se=ee.createCgi,le=5120,ce=5120,ue=t.MAX_FRAMES_LENGTH=256,de=2e4,pe=[],he=[],ge=[],fe=[],me=[],Ae=[],Me=[],we=[],ye=ne.setDataCenter,be=new ne(Ae),ve=-2,xe=-2,Te=1e6,Ne=1024,Ce=360,Ie=[],Ee=0,De=0,Se=4,Le=18e4,ke=1==re.get("onlyViewOwnData"),je={},Be={},Ue=[],ze=[],Qe=[],Re=[],Oe=[],He=[],Fe=[],Ve={timeout:de,xhrFields:{withCredentials:!0},data:{}};t.clientIp="127.0.0.1",t.MAX_INCLUDE_LEN=le,t.MAX_EXCLUDE_LEN=ce,t.MAX_LOG_LENGTH=Ce-20,t.changeLogId=function(e){_=e},t.getPort=function(){return J},t.setDumpCount=function(e){Ee=e>0?e:0},t.setOnlyViewOwnData=function(e){ke=e!==!1,re.set("onlyViewOwnData",ke?1:0)},t.isOnlyViewOwnData=function(){return ke},t.filterIsEnabled=function(){if(ke)return!0;var e=a();if(!(!e||e.disabledFilterText&&e.disabledExcludeText)){var t=!e.disabledFilterText&&e.filterText.trim();return t||!e.disabledExcludeText&&e.excludeText.trim()}},o(),$(window).on("hashchange",o),t.setFilterText=i,t.getFilterText=a,t.setNetworkColumns=s,t.getNetworkColumns=l;var Pe=/^(m|i|h|b|c|d|H):/,Ye={m:"method",i:"ip",h:"headers",b:"body",c:"body",d:"host",H:"host"},Ge=[],We=$.extend({type:"post"},Ve),Xe=$.extend({cache:!1},Ve),_e=ee({getData:"cgi-bin/get-data",getInitial:"cgi-bin/init"},Xe);t.createCgi=function(e,t){return se({url:e,mode:t?"cancel":null},Xe)},t.certs=ee({remove:"cgi-bin/certs/remove",upload:{url:"cgi-bin/certs/upload",contentType:"application/json"},all:{url:"cgi-bin/certs/all",type:"get"}},We),t.values=ee({recycleList:{type:"get",url:"cgi-bin/values/recycle/list"},recycleView:{type:"get",url:"cgi-bin/values/recycle/view"},recycleRemove:"cgi-bin/values/recycle/remove",moveTo:{mode:"chain",url:"cgi-bin/values/move-to"},list:{type:"get",url:"cgi-bin/values/list"},add:"cgi-bin/values/add",remove:"cgi-bin/values/remove",rename:"cgi-bin/values/rename"},We),t.plugins=ee({disablePlugin:"cgi-bin/plugins/disable-plugin",disableAllPlugins:"cgi-bin/plugins/disable-all-plugins",getRegistryList:"cgi-bin/plugins/registry-list",installPlugins:"cgi-bin/plugins/install",uninstallPlugins:"cgi-bin/plugins/uninstall"},We),t.rules=ee({disableAllRules:"cgi-bin/rules/disable-all-rules",accountRules:"cgi-bin/rules/account",recycleList:{type:"get",url:"cgi-bin/rules/recycle/list"},recycleView:{type:"get",url:"cgi-bin/rules/recycle/view"},recycleRemove:"cgi-bin/rules/recycle/remove",moveTo:{mode:"chain",url:"cgi-bin/rules/move-to"},list:{type:"get",url:"cgi-bin/rules/list"},add:"cgi-bin/rules/add",disableDefault:"cgi-bin/rules/disable-default",enableDefault:"cgi-bin/rules/enable-default",remove:"cgi-bin/rules/remove",rename:"cgi-bin/rules/rename",select:"cgi-bin/rules/select",unselect:"cgi-bin/rules/unselect",allowMultipleChoice:{mode:"ignore",url:"cgi-bin/rules/allow-multiple-choice"},enableBackRulesFirst:{mode:"ignore",url:"cgi-bin/rules/enable-back-rules-first"},setSysHosts:"cgi-bin/rules/set-sys-hosts"},We),t.log=ee({set:"cgi-bin/log/set"},We);var Je=ee({compose:"cgi-bin/composer"},$.extend({type:"post",contentType:"application/json",processData:!1},Ve)).compose;t.compose=function(e,t,n){return"string"!=typeof e&&(e=JSON.stringify(e)),Je(e,t,n)},window.compose=t.compose,$.extend(t,ee({composer:{url:"cgi-bin/composer",mode:"cancel"},compose2:"cgi-bin/composer",interceptHttpsConnects:"cgi-bin/intercept-https-connects",enableHttp2:"cgi-bin/enable-http2",abort:"cgi-bin/abort",setCustomColumn:"cgi-bin/set-custom-column",addRulesAndValues:{url:"cgi-bin/add-rules-values",contentType:"application/json"},setIPv6Only:"cgi-bin/set-ipv6-only",createTempFile:{url:"cgi-bin/sessions/create-temp-file",contentType:"application/json"},setDnsOrder:"cgi-bin/set-dns-order"},We)),$.extend(t,ee({donotShowAgain:"cgi-bin/do-not-show-again",checkUpdate:"cgi-bin/check-update",importRemote:"cgi-bin/import-remote",getHistory:"cgi-bin/history",getCookies:"cgi-bin/sessions/cookies",getTempFile:"cgi-bin/sessions/get-temp-file"},Xe)),t.socket=$.extend(ee({changeStatus:{mode:"cancel",url:"cgi-bin/socket/change-status"},abort:{mode:"ignore",url:"cgi-bin/socket/abort"},send:{mode:"ignore",url:"cgi-bin/socket/data"}},We)),t.getReqTabs=function(){return Ue},t.getResTabs=function(){return ze},t.getTabs=function(){return Qe},t.getToolTabs=function(){return Re},t.getComTabs=function(){return Oe},t.getAccount=function(){return K},t.getInitialData=function(e){if(!R){R=$.Deferred();var n=function r(){_e.getInitial(function(e){if(!e)return setTimeout(r,1e3);var n=e.server;J=n&&n.port,K=n&&n.account,g(e),t.enablePluginMgr=e.epm,t.supportH2=e.supportH2,t.backRulesFirst=e.rules.backRulesFirst,t.custom1=e.custom1,t.custom2=e.custom2,t.custom1Key=e.custom1Key,t.custom2Key=e.custom2Key,t.hasAccountRules=e.hasARules,O=e,q=e.clientId,Ve.data.clientId=q,e.lastLogId&&(ve=e.lastLogId),e.lastSvrLogId&&(xe=e.lastSvrLogId),F=e.curLogId,V=e.curSvrLogId,e.lastDataId&&(P=e.lastDataId),t.pluginsRoot=e.pluginsRoot,t.upload=ee({importSessions:"cgi-bin/sessions/import?clientId="+q,importRules:"cgi-bin/rules/import?clientId="+q,importValues:"cgi-bin/values/import?clientId="+q},$.extend({type:"post"},Ve,{contentType:!1,processData:!1,timeout:36e3})),R.resolve(e),e.clientIp&&(t.clientIp=e.clientIp)})};n()}R.done(e)};var qe=Date.now();t.getRawHeaders=N,window.getWhistlePageId=function(){return q},window.disableWhistleDarkModeIframe=function(e){var t=C(e);t&&t.setAttribute("disabledDarkMode","1")},window.enableWhistleDarkModeIframe=function(e){var t=C(e);t&&t.removeAttribute("disabledDarkMode")},t.getPageId=function(){return q},t.isFrames=I;var Ke=/^(?:https?|wss?):\/\//;t.addNetworkList=function(e){if(Array.isArray(e)&&e.length){var n,r=[];e.forEach(function(e){if(e&&e.startTime>=0&&e.req&&e.req.headers&&e.res&&k(e)){var t=e.req;delete e.active,delete e.selected,delete e.hide,delete e.order,delete t.json,delete e.res.json,delete e.data,delete e.stopRecordFrames,delete e.pauseRecordFrames,te.isString(e.fwdHost)||delete e.fwdHost,Array.isArray(e.frames)&&(e.frames=e.frames.filter(function(e){return e&&(delete e.json,delete e.data),e})),e.lost=!0,e.id=e.startTime+"-"+ ++Te,L(e),Ae.push(e),r.push(e.id),n=!0,ie.postMessage(e)}}),n&&(t.curNewIdList=r,pe.forEach(function(e){e(be)}))}},t.overflowCount=j,t.networkModal=be,t.isDiableCustomCerts=function(){return Q&&Q.dcc},t.isMutilEnv=function(){return Q&&Q.multiEnv},t.isStrictMode=function(){return Q&&Q.strictMode||!1},t.getServerInfo=function(){return Q||""},t.on=function(e,t){T(),"data"==e?"function"==typeof t&&(pe.push(t),t(be)):"serverInfo"==e?"function"==typeof t&&he.push(t):"log"==e?"function"==typeof t&&(fe.push(t),t(Me,we)):"plugins"===e||"settings"===e||"rules"===e?"function"==typeof t&&me.push(t):"framesUpdate"==e&&"function"==typeof t&&ge.push(t)},t.networkModal=be,t.stopNetworkRecord=function(e){!e&&t.pauseRefresh?be.clearNetwork=!1:be.clearNetwork=!e,t.pauseRefresh=!1,t.stopRefresh=e},t.pauseNetworkRecord=function(){be.clearNetwork=!1,t.pauseRefresh=!0,t.stopRefresh=!0},t.pauseConsoleRecord=function(){t.stopConsoleRefresh=!1,t.pauseConsoleRefresh=!0},t.stopConsoleRecord=function(e){t.pauseConsoleRefresh=!1,t.stopConsoleRefresh=e},t.pauseServerLogRecord=function(){t.stopServerLogRefresh=!1,t.pauseServerLogRefresh=!0},t.stopServerLogRecord=function(e){t.pauseServerLogRefresh=!1,t.stopServerLogRefresh=e},t.getPlugin=function(e){return Z||Be[e.slice(0,-1)]?void 0:je[e]},t.setDisabledPlugins=function(e){Be=e},t.getNetworkMenus=function(){return z("networkMenus")},t.getRulesMenus=function(){return z("rulesMenus")},t.getValuesMenus=function(){return z("valuesMenus")},t.getPluginsMenus=function(){return z("pluginsMenus")},t.getPluginColumns=function(){return He},t.getPluginRegistry=function(){var e=[];return Object.keys(je).forEach(function(t){var n=je[t].registry;n&&-1===e.indexOf(n)&&e.push(n)}),e};var Ze;t.setValuesModal=function(e){Ze=e},t.getValuesModal=function(){return Ze},t.getRulesModal=function(){return t.rulesModal},t.getDataKeys=function(){var e=[];return t.custom1Key&&e.push("custom1"),t.custom2Key&&e.push("custom2"),e.concat(Ie)},ye(t),ie.setup(be)},function(e,t,n){"use strict";function r(e,t){function n(l,c,u){var d={url:"function"==typeof e?e():e};if("function"==typeof l?(u=c,c=l,l=null):d.data=l,u=i.extend(!0,{},t,u,d),o){var p=u.mode;if("ignore"==p)return;if("cancel"==p)o.abort();else if("chain"==p)return a.push([l,c,u])}var h=function(e,t,i){o=null,c&&c.call(this,e,t,i);var s=a.shift();s&&n.apply(r,s)};return u.success=function(e,t,n){h.call(this,e,n)},u.error=function(e,t){h.call(this,!1,e,t)},d=u,s&&"string"==typeof d.url&&(d=i.extend({},d),d.url+=(-1===d.url.indexOf("?")?"?":"&")+"authorization="+s),o=i.ajax(d)}var r=this;"string"==typeof e&&(e={url:e}),t=i.extend({dataType:"json"},t,e),e=e.url;var o,a=[];return n}function o(e,t){var n={};return Object.keys(e).forEach(function(o){n[o]=r(e[o],t)}),n}var i=n(8),a=n(204),s=a.getQuery().authorization;e.exports=o,e.exports.createCgi=r},function(e,t,n){"use strict";function r(e){this.list=x(e),this.isTreeView="1"===I.get("isTreeView"),this.clearRoot()}function o(e){if(e="string"!=typeof e?"":e.trim()){var t="!"===e[0];t&&(e=e.substring(1));var n="url";if(B.test(e)&&(n=RegExp.$1.toLowerCase(),e=RegExp.$2.trim(),"!"===e[0]&&(t=!0,e=e.substring(1))),e||n)return{not:t,type:n,keyword:e.toLowerCase(),regexp:C.toRegExp(e)}}}function i(e){if(e="string"!=typeof e?"":e.trim()){var t,n=function(e){e&&(t=t||[],t.push(e))};if(U.test(e)){var r=RegExp.$1,i=RegExp.$2,a=RegExp.$3;n(o(r)),n(o(i)),n(o(a))}else n(o(e));return t}}function a(e,t){return e?t.keyword?t.regexp?t.regexp.test(e):-1!==e.toLowerCase().indexOf(t.keyword):!0:!1}function s(e,t){if(a((e.isHttps?"tunnel://":"")+e.url,t))return!0;var n=C.getRawUrl(e);return a(n,t)}function l(e,t){if(c(s(e,t),t.not))return!1;var n=T&&T.getDataKeys(),r=n&&n.length;if(r)for(var o=0;r>o;o++){var i=C.getProperty(e,n[o]);if(null!=i&&c(a(String(i),t),t.not))return!1}return!0}function c(e,t){return t?!e:e}function u(e,t){switch(t.type){case"mark":return!e.mark||l(e,t);case"c":case"content":case"b":case"body":var n=C.getBody(e.req,!0),r=C.getBody(e.res);return c(!a(n,t)&&!a(r,t),t.not);case"headers":case"h":return c(!g(e.req.headers,t)&&!g(e.res.headers,t),t.not);case"type":case"t":var o=e.res.headers;return o=o&&o["content-type"],c(!("string"==typeof o&&a(o,t)),t.not);case"ip":case"i":return c(!a(e.req.ip,t)&&!a(e.res.ip,t),t.not);case"status":case"s":case"result":case"r":var i=e.res.statusCode;return c(!a(null==i?"-":String(i),t),t.not);case"method":case"m":return c(!a(e.req.method,t),t.not);case"e":case"error":var s=e.res&&e.res.statusCode,u=e.reqError||e.resError||e.customData&&e.customData.error||s&&(!/^\d+$/.test(s)||s>=400);return!u||l(e,t);case"style":return!e.style||l(e,t);default:return l(e,t)}}function d(e){return null==e?"":e+""}function p(e,t,n,r){return e==t?0:"-"==e?1:"-"==t?-1:"asc"==n?h(e,t,r):-h(e,t,r)}function h(e,t,n){var r=null==t||""==t;if(null==e||""==e)return r?0:-1;if(r)return 1;var o=-1!=="dns,request,response,download,time".indexOf(n);if(!o&&e>t)return 1;var i="undefined"==typeof e?"undefined":N(e),a="undefined"==typeof t?"undefined":N(t);return o&&"string"===i&&"string"===a?e.replace("ms","")-t.replace("ms","")>0?1:-1:i!=a&&"number"==i?1:-1}function g(e,t){for(var n in e){if(a(n,t))return!0;var r=e[n];if("string"==typeof r&&a(r,t))return!0}return!1}function f(e,t){var n=e.children;return n?(n.forEach(function(e){f(e,t)}),t):(t[e.data.id]=1,t)}function m(e,t,n){if(t>0){var r=A(e);if(n){for(var o=0,i=e.length;t>0&&i>o;)e[o].hide?(--i,--t,e.splice(o,1)):++o;t=e.length-k-2}t>0&&e.splice(0,t),r&&-1===e.indexOf(r)&&(e[0]=r)}}function A(e){for(var t=0,n=e.length;n>t;t++){var r=e[t];if(r.active)return r}}function M(e,t){for(;e>=0;e--){var n=t[e-1];if(!n||!n.selected&&!n.active)return e}return e}function w(e,t){for(var n=t.length;n>e;e++){var r=t[e+1];if(r&&r.data&&(r=r.data),!r||!r.selected&&!r.active)return e}return e}function y(e){var t=e.indexOf("?"),n="";if(-1!==t&&(n=e.substring(t),e=e.substring(0,t)),t=e.indexOf("://"),-1===t)return["tunnel://"+e,"/"];if(t=e.indexOf("/",t+3),-1===t)return[e,"/"];var r=e.substring(t).split("/");r[0]=e.substring(0,t);var o=r.length-1;return r[o]="/"+r[o]+n,r}function b(e){var t=e.children;if(!t||e.hide)return e.hide;for(var n=!0,r=0,o=t.length;o>r;r++){var i=t[r];b(i)?i.hide=!0:(n=!1,i.hide=!1)}return e.hide=n,n}function v(e,t){for(var n=e.children,r=0,o=n.length;o>r;r++){var i=n[r];i.hide||(t.push(i),i.children&&v(i,t))}return e}function x(e,t){var n=e.length;if(n&&(t||!e[n-1].order)){var r=e[0].order||1;e.forEach(function(e,t){e.order=r+t})}return e}var T,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C=n(204),I=n(285),E=n(208),D=[500,1e3,1500,2e3,2500,3e3],S=parseInt(I.get("maxNetworkRows"),10)||1500,L=-1===D.indexOf(S)?1500:S,k=L+100,j="__whistle_"+location.href.replace(/\/[^/]*([#?].*)?$/,"/")+"__",B=/^(e|error|style|url|u|content|c|b|body|headers|h|ip|i|status|result|s|r|method|m|mark|type|t):(.*)$/i,U=/([^\s]+)(?:\s+([^\s]+)(?:\s+([\S\s]+))?)?/;r.MAX_COUNT=k,r.setMaxRows=function(e){e=parseInt(e,10),-1!==D.indexOf(e)&&(L=e,k=L+100,r.MAX_COUNT=k,I.set("maxNetworkRows",e))},r.getMaxRows=function(){return L};var z=r.prototype;z.search=function(e){return this._keyword=i(e),this.filter(),e},z.hasKeyword=function(){return this._keyword},z.setSortColumns=function(e){this._columns=e,this.filter(!1)},z.hasUnmarked=function(){for(var e=this.list,t=e.length-1;t>=0;--t)if(!e[t].mark)return!0},z.getList=function(){return this._list||this.list},z.getTreeLeafs=function(e){if(e){var t=!e.indexOf("tunnel://");t?e=e.substring(9):e+="/";var n=this.list.filter(function(n){return t?n.url===e:!n.url.indexOf(e)});return n.length?n:void 0}},z.filter=function(){var e=this,t=e.list,n=e._keyword;t.forEach(function(e){n?e.hide=u(e,n[0])||n[1]&&u(e,n[1])||n[2]&&u(e,n[2]):e.hide=!1});var r=e._columns;if(r&&r.length){var o=r.length;e._list=e.list.slice().sort(function(e,t){for(var n=0;o>n;n++){var i=r[n],a="body"===i.name,s=a?e.bodySize:C.getCellValue(e,i),l=a?t.bodySize:C.getCellValue(t,i);if(a){if(s===l)return 0;var c=s>l?1:-1;return"asc"==i.order?c:-c}i.key&&(s=d(s),l=d(l));var u=p(s,l,i.order,i.name);if(u)return u}return e.order>t.order?-1:1})}else e._list=null;return this.updateTree(),this.updateDisplayCount(),t};var Q=60;z.updateDisplayCount=function(){window.name=j+this.list.length},z.getDisplayCount=function(){var e=window.name;if("string"!=typeof e||0!==e.indexOf(j))return 0;var t=parseInt(e.substring(j.length));return t>=0&&Q>=t?t:Q},z.clear=function(){var e=this.list.length;return this.clearNetwork=!0,this.list.splice(0,e),this._list=null,this.updateTree(),this.updateDisplayCount(),e&&E.trigger("selectedSessionChange"),this},z.removeByHostList=function(e){for(var t=this.list,n=t.length-1;n>=0;--n){var r=t[n];-1!==e.indexOf(r.isHttps?r.path:r.hostname)&&t.splice(n,1)}this.update(),this.updateDisplayCount()},z.removeTreeNode=function(e,t){var n=this.getTreeNode(e);if(n){for(var r=f(n,{}),o=this.list,i=o.length-1;i>=0;--i)(t?!r[o[i].id]:r[o[i].id])&&o.splice(i,1);return this.update(),this.updateDisplayCount(),!0}},z.removeByUrlList=function(e){for(var t=this.list,n=t.length-1;n>=0;--n)-1!==e.indexOf(t[n].url.replace(/\?.*$/,"").substring(0,1024))&&t.splice(n,1);this.update(),this.updateDisplayCount()},z.removeSelectedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.selected&&!o.hide?(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1)):-1!=t&&(n.splice(r+1,t-r),t=-1)}return e?(this.update(!1,!0),!0):void 0},z.remove=function(e){var t=this.list,n=t.indexOf(e);-1!==n&&(t.splice(n,1),this.update(!1,!0))},z.removeOthers=function(e){var t=this.list,n=t.indexOf(e);-1!==n&&(t.splice(n+1,t.length-n),0!==n&&t.splice(0,n),this.update(!1,!0))},z.removeUnselectedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.selected?-1!=t&&(n.splice(r+1,t-r),t=-1):(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1))}return e?(this.update(!1,!0),!0):void 0},z.removeUnmarkedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.mark?-1!=t&&(n.splice(r+1,t-r),t=-1):(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1))}return e?(this.update(!1,!0),!0):void 0},z.prev=function(){var e=this.getList(),t=e.length;if(t){var n,r,o=this.getActive(),i=o?e.indexOf(o):t-1;for(n=i-1;n>=0;n--)if(r=e[n],!r.hide)return r;for(n=t-1;n>i;n--)if(r=e[n],!r.hide)return r}},z.next=function(){var e=this.getList(),t=e.length;if(t){var n,r,o=this.getActive(),i=o?e.indexOf(o):0;for(n=i+1;t>n;n++)if(r=e[n],!r.hide)return r;for(n=0;i>n;n++)if(r=e[n],!r.hide)return r}},z.update=function(e,t){if(x(this.list,t),e&&!this.isTreeView){var n=Math.min(this.list.length-L,100);m(this.list,n,this.hasKeyword())}return this.filter(),!this.isTreeView&&this.list.length>L},z.hasSelected=function(){for(var e=this.list,t=0,n=e.length;n>t;t++){var r=e[t];if(!r.hide&&r.selected)return!0}return!1},z.hasUnselected=function(){for(var e=this.list,t=0,n=e.length;n>t;t++){var r=e[t];if(!r.hide&&!r.selected)return!0}return!1},z.getSelected=function(){return this.getActive()},z.getActive=function(){return A(this.list)||this.getSelectedList()[0]},z.getItem=function(e){if(e)for(var t=this.list,n=0,r=t.length;r>n;n++){var o=t[n];if(o.id===e)return o}},z.setSelected=function(e,t){e.selected=t!==!1},z.getSelectedList=function(){return this.list.filter(function(e){return!e.hide&&e.selected})},z.setSelectedList=function(e,t,n){var r=this.getList();if(this.isTreeView&&(r=this.root.list,e=this.getTreeNode(e.id),t=this.getTreeNode(t.id)),e=r.indexOf(e),t=r.indexOf(t),e>t){var o=w(e,r);e=t,t=o}else e=M(e,r);for(var i=0,a=r.length;a>i;i++){var s=r[i];s=s.data||s,i>=e&&t>=i?(s.selected=!0,n(s,!0)):s.selected=!1}},z.clearSelection=function(){this.list.forEach(function(e){e.selected=!1})},z.clearActive=function(){this.list.forEach(function(e){e.active=!1})},z.clearRoot=function(){var e={children:[],map:{},list:[]};return this.root=e,e},z.getListByPath=function(e){var t=0===e.indexOf("tunnel://");return t?e=e.substring(9):e+="/",this.list.filter(function(n){return!n.hide&&(t?n.url===e:!n.url.indexOf(e))})},z.updateTree=function(){if(!this.isTreeView)return this._updateOnTreeView=!0,this.root;this._updateOnTreeView=!1;var e=this.list,t=e.length;if(!t)return this.clearRoot();for(var n=this.root,r=this.clearRoot(),o=0;t>o;o++){for(var i,a,s=e[o],l=y(s.url),c=l.length-1,u=r,d=n,p=0;c>p;p++){var h=l[p],g=u.map[h],f=d&&d.map[h];i=p?i+"/"+h:h,g||(g={depth:p,path:i,value:h,children:[],map:{}},f&&(g.expand=f.expand,g.pExpand=f.pExpand),u.map[h]=g,u.children.push(g)),p?g.parent=u:a=g,u=g,d=f}var m={depth:c,parent:u,value:l[c],hide:s.hide,data:s};a.map[s.id]=m,u.children.push(m)}return r.children.forEach(b),v(r,r.list),r},z.setTreeView=function(e,t){e=e!==!1,this.isTreeView!==e&&(this.isTreeView=e,!t&&I.set("isTreeView",e?"1":""),e&&this._updateOnTreeView&&this.updateTree())},z.getTree=function(){return this.root},z.getTreeNode=function(e){for(var t=this.root.list,n=0,r=t.length;r>n;n++){var o=t[n];if(o.data?o.data.id===e:o.path===e)return o}},r.setDataCenter=function(e){T=e},e.exports=r},function(e,t){"use strict";function n(e){return r+"?"+e}var r=location.href.replace(/[?#].*$/,"").replace(/\/index.html$/i,"/"),o={};t.set=function(e,t){e=n(e),null==t?t="":t+="",o[e]=t;try{localStorage[e]=t}catch(r){}},t.get=function(e,t){e=n(e);try{return t?localStorage[e]:o[e]||localStorage[e]}catch(r){}return o[e]}},function(e,t,n){"use strict";function r(e){return e.endTime||e.lost}function o(e,t){"function"==typeof Object.assign?Object.assign(e,t):Object.keys(t).forEach(function(n){e[n]=t[n]})}function i(e){return e&&"string"==typeof e?e:void 0}function a(e,t){var n=e.customData||{};e.customData=n,o(n,t);var r=n.style;if(r){var a=i(r.color),s=i(r.fontStyle),l=i(r.backgroundColor||r.bgColor);(a||s||l)&&(r=e.style||{},e.style=r,r.color=r.color||a,r.fontStyle=r.fontStyle||s,r.backgroundColor=r.backgroundColor||l)}}function s(e){if(!p[e]&&window.Worker){var t=new Worker("web-worker.js?id="+e),n=function(){o&&(clearTimeout(o),o=null,l(t))},o=setTimeout(n,16e3);t.onerror=n,t.onmessage=function(n){var i=n.data;if(i===!0)return void(o&&(clearTimeout(o),o=null,u.list.forEach(function(e){r(e)&&t.postMessage(e)}),p[e]=t));if(i&&i.id&&i.data){var s=u.getItem(i.id);s&&(a(s,i.data),d.trigger("updateUIThrottle"))}}}}function l(e){e.terminate(),e.onmessage=null,e.onerror=null,e.onmessageerror=null}function c(e){var t=p[e];t&&(delete p[e],l(t))}var u,d=n(208),p={};t.updateWorkers=function(e){Object.keys(p).forEach(function(t){-1===e.indexOf(t)&&c(t)}),e.forEach(s)},t.postMessage=function(e){r(e)&&Object.keys(p).forEach(function(t){p[t].postMessage(e)})},t.setup=function(e){u=e}},function(e,t,n){"use strict";function r(e){return e&&(0==e||e>65535)}var o=n(261),i=n(208),a=n(281),s=a.getForwardRules(),l=a.getPluginRules(),c=a.getPluginNameList(),u=/^\.[\w-]+(?:[?$]|$)/,d=/^\.[^./?]+\.[^/?]/,p=/^(?:::(?:ffff:)?)?(?:(?: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)(?:\:(\d+))?$/,h=/^[\da-f]{1,4}(?::[\da-f]{1,4}){7}$/,g=/^[\da-f]{1,4}(?::[\da-f]{1,4}){0,6}$/,f=/^\[([:\da-f.]+)\](?::(\d+))?$/i,m=/^%([a-z\d_\-]+)[=.]/;i.on("updatePlugins",function(){s=a.getForwardRules(),l=a.getPluginRules(),c=a.getPluginNameList()}),o.defineMode("rules",function(){function e(e){var t;if(f.test(e)&&(e=RegExp.$1,t=RegExp.$2,r(t)))return!1;if(p.test(e))return!t&&r(RegExp.$1)?!1:!0;var n=e.indexOf("::");return-1!==n?"::"===e||-1!==e.indexOf("::",n+1)?!1:(e=e.split("::",2),e=e[0]&&e[1]?e.join(":"):e[0]||e[1],g.test(e)):h.test(e)}function t(e){return/^x?hosts?:\/\//.test(e)}function n(e){return/^head:\/\//.test(e)}function o(e){return/^weinre:\/\//.test(e)}function i(e){return/^(?:referer|auth|ua|forwardedFor|reqCookies|reqDelay|reqSpeed|reqCors|reqHeaders|method|reqType|reqCharset|reqBody|reqPrepend|reqAppend|reqReplace|reqWrite|reqWriteRaw):\/\//.test(e)}function a(e){return/^(?:resScript|resRules|responseFor|resCookies|resHeaders|trailers|replaceStatus|resDelay|resSpeed|resCors|resType|resCharset|cache|attachment|download|resBody|resPrepend|resAppend|css(?:Append|Prepend|Body)?|html(?:Append|Prepend|Body)?|js(?:Append|Prepend|Body)?|resReplace|resMerge|resWrite|resWriteRaw):\/\//.test(e)}function A(e){return/^(?:https?|wss?|tunnel):\/\//i.test(e)}function M(e){return/^[\w\.-]+:\/\//i.test(e)}function w(e){return e=e.substring(0,e.indexOf(":")),-1==s.indexOf(e)&&"status"!==e}function y(e){return e=e.substring(0,e.indexOf(":")),-1==l.indexOf(e)}function b(e){return/^\/[^/](.*)\/i?$/.test(e)||/^\$/.test(e)}function v(e){return/^(?:urlParams|params|reqMerge|urlReplace|pathReplace):\/\//.test(e)}function x(e){return/^log:\/\//.test(e)}function T(e){return/^style:\/\//.test(e)}function N(e){return/^(?:excludeFilter|filter):\/\//.test(e)}function C(e){return/^lineProps:\/\//.test(e)}function I(e){return/^(?:pipe|sniCallback):\/\//.test(e)||/^(?:plugin|whistle)\.[a-z\d_\-]+:\/\//.test(e)&&!y(e)}function E(e){return/^(?:rules?(?:File|Script)|reqScript|reqRules):\/\//.test(e)}function D(e){return/^disable:\/\//.test(e)}function S(e){return/^cipher:\/\//.test(e)}function L(e){return/^(?:ignore|skip):\/\//.test(e)}function k(e){return/^(?:includeFilter|enable):\/\//.test(e)}function j(e){return/^delete:\/\//.test(e)}function B(e){return/^headerReplace:\/\//.test(e)}function U(e){return/^x?(?:proxy|https?-proxy|http2https-proxy|https2http-proxy|internal-proxy|internal-https?-proxy):\/\//.test(e)}function z(e){return/^x?socks:\/\//.test(e)}function Q(e){return/^pac:\/\//.test(e)}function R(e){return/^[a-z]:(?:\\|\/(?!\/))/i.test(e)||/^\/[^/]/.test(e)}function O(e){return/^:\d{1,5}$/.test(e)}function H(e){if(!/^(?:\$?(?:https?:|wss?:|tunnel:)?\/\/)?([^/?]+)/.test(e))return!1;var t=RegExp.$1;return-1!==t.indexOf("*")||-1!==t.indexOf("~")||d.test(t)}function F(e){return m.test(e)&&RegExp.$1}function V(e){return/^\^/.test(e)||u.test(e)}return{token:function(r,s){if(r.eatSpace())return null;var l=r.next();if("#"==l)return r.eatWhile(function(e){return!0}),"comment";var u,d,p="!"===l,h=p?r.next():l,g="";if(r.eatWhile(function(e){return/\s/.test(e)||"#"==e?!1:"line"===h&&"`"===e?(g="keyword js-keyword",!1):(h+=e,g||"/"!=e||"/"!=u||(t(h)?g="number js-number js-type":n(h)?g="header js-head js-type":o(h)?g="atom js-weinre js-type":U(h)?g="tag js-proxy js-type":i(h)?g="variable-2 js-req js-type":a(h)?g="positive js-res js-type":v(h)?g="meta js-params js-type":x(h)?g="atom js-log js-type":T(h)?g="atom js-style js-type":I(h)?g="variable-2 js-plugin js-type":B(h)?g="variable-2 js-headerReplace js-type":N(h)?g="negative js-filter js-type":C(h)?g="negative js-line-props js-type":L(h)?g="negative js-ignore js-type":k(h)?g="atom js-enable js-type":D(h)?g="negative js-disable js-type":S(h)?g="atom js-cipher js-type":j(h)?g="negative js-delete js-type":U(h)?g="variable-2 js-proxy js-type":z(h)?g="variable-2 js-socks js-type":Q(h)?g="variable-2 js-pac js-type":E(h)?g="variable-2 js-rulesFile js-type":A(h)?(d=!0,g="string-2 js-url js-type"+("h"===h[0]?" js-http-url":"")):H(h)?g="attribute js-attribute":M(h)&&(g="builtin js-rule js-type"+(w(h)?" error-rule":""))),u=e,!0)}),h){if(g){if(d&&H(h))return"attribute js-attribute"}else{if(b(h)||V(h)||O(h))return"attribute js-attribute";var f;/^@/.test(h)?g="atom js-at js-type":(f=F(h))?(g="variable-2 js-plugin-var js-type",-1===c.indexOf(f)&&(g+=" error-rule")):H(h)?g="attribute js-attribute":e(h)?g="number js-number":/^\{.*\}$/.test(h)||/^<.*>$/.test(h)||/^\(.*\)$/.test(h)?g="builtin js-rule js-type":R(h)&&(g="builtin js-rule js-type")}return p?g+" error-rule":g||"js-http-url"}}}})},function(e,t,n){"use strict";n(190),n(289);var r=n(204),o=n(9),i=n(42),a=n(8),s=n(285),l=n(212),c=128,u=o.createClass({displayName:"FilterInput",getInitialState:function(){var e=this.props.hintKey;if(this.allHintList=[],e)try{var t=JSON.parse(s.get(e));if(Array.isArray(t)){var n={};this.allHintList=t.map(function(e){return"string"==typeof e?e.substring(0,c):null}).filter(function(e){return!e||n[e]?!1:(n[e]=1,!0)}).slice(0,c)}}catch(r){}return{hintList:[]}},componentDidMount:function(){var e=this;e.hintElem=a(i.findDOMNode(this.refs.hints)),a(document.body).on("mousedown",function(t){null===e.state.hintList||a(t.target).closest(".w-filter-con").length||e.hideHints()})},focus:function(){var e=i.findDOMNode(this.refs.input);e.select(),e.focus()},addHint:function(){var e=this.state.filterText;if(e=e&&e.trim()){var t=this.allHintList,n=t.indexOf(e);-1!==n&&t.splice(n,1),t.length>c&&t.splice(0,1),t.push(e);try{s.set(this.props.hintKey,JSON.stringify(t))}catch(r){}}},filterHints:function(e){e=e&&e.trim();var t=12;if(!e)return this.allHintList.slice(-t);var n=[],r=this.allHintList.indexOf(e);e=e.toLowerCase();for(var o=this.allHintList.length-1;o>=0;o--){var i=this.allHintList[o];if(r!==o&&-1!==i.toLowerCase().indexOf(e)&&(n.unshift(i),n.length>=t))return n}return n},onFilterChange:function(e){this.changeInput(e?e.target.value:"")},changeInput:function(e){var t=this;t.props.onChange&&t.props.onChange(e);var n=t.props.hintKey;n&&clearTimeout(t.timer),this.state.filterText=e,t.setState({hintList:this.filterHints(e)},function(){n&&(t.timer=setTimeout(this.addHint,1e4))})},onClick:function(e){this.changeInput(e.target.title),this.hideHints()},hideHints:function(){this.setState({hintList:null}),this.addHint()},showHints:function(){this.setState({hintList:this.filterHints(this.state.filterText)})},onFilterKeyDown:function(e){var t;if(27===e.keyCode){var n=this.state.hintList;null===n?this.showHints():this.hideHints()}else if(38===e.keyCode)t=this.hintElem.find(".w-active"),null===this.state.hintList&&this.showHints(),t.length&&(t.removeClass("w-active"),t=t.prev("li").addClass("w-active")),t.length||(t=this.hintElem.find("li:last"),t.addClass("w-active")),r.ensureVisible(t,this.hintElem),e.preventDefault();else if(40===e.keyCode)t=this.hintElem.find(".w-active"),
78
- null===this.state.hintList&&this.showHints(),t.length&&(t.removeClass("w-active"),t=t.next("li").addClass("w-active")),t.length||(t=this.hintElem.find("li:first"),t.addClass("w-active")),r.ensureVisible(t,this.hintElem),e.preventDefault();else if(13===e.keyCode){t=this.hintElem.find(".w-active");var o=t.attr("title");o&&(this.changeInput(o),this.hideHints())}else(e.ctrlKey||e.metaKey)&&(68==e.keyCode?(this.clearFilterText(),e.preventDefault(),e.stopPropagation()):88==e.keyCode&&e.stopPropagation());"function"==typeof this.props.onKeyDown&&this.props.onKeyDown(e)},clear:function(){var e=this;l.confirm("Confirm to clear history?",function(t){t&&(s.set(e.props.hintKey,""),e.allHintList=[],e.hideHints())})},clearFilterText:function(){this.props.onChange&&this.props.onChange("");var e=null;document.activeElement===i.findDOMNode(this.refs.input)&&(e=this.filterHints());var t=this.state.filterText,n=this;this.setState({filterText:"",hintList:e},function(){t&&n.onFilterChange()})},render:function(){var e=this,t=e.state.filterText||"",n=e.props.hintKey,i=e.state.hintList;return o.createElement("div",{className:"w-filter-con",style:e.props.wStyle},n?o.createElement("div",{className:"w-filter-hint",style:{display:i&&i.length?"":"none"},onMouseDown:r.preventBlur},o.createElement("div",{className:"w-filter-bar"},o.createElement("a",{onClick:this.clear},o.createElement("span",{className:"glyphicon glyphicon-trash"}),"Clear history"),o.createElement("span",{onClick:e.hideHints,"aria-hidden":"true"},"×")),o.createElement("ul",{ref:"hints"},i&&i.map(function(t){return o.createElement("li",{key:t,onClick:e.onClick,title:t},t)}))):void 0,o.createElement("input",{type:"text",ref:"input",value:t,onChange:e.onFilterChange,onKeyDown:e.onFilterKeyDown,onFocus:e.showHints,onDoubleClick:e.showHints,onBlur:e.hideHints,style:{background:t.trim()?"#000":void 0},className:"w-filter-input",maxLength:c,placeholder:"Type filter text"+(this.props.placeholder||"")}),o.createElement("button",{onMouseDown:r.preventBlur,onClick:e.clearFilterText,style:{display:e.state.filterText?"block":"none"},type:"button",className:"close",title:"Ctrl[Command]+D"},o.createElement("span",{"aria-hidden":"true"},"×")))}});e.exports=u},function(e,t,n){var r=n(290);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-filter-con{position:relative}.w-filter-con .close{position:absolute;right:5px;top:5px;color:#fff;line-height:1pc;display:none}.w-filter-hint,.w-layer{background-color:#fff;border-radius:3px;box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 1pc 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05)}.w-filter-hint{margin:0 3px;bottom:35px;width:99%;padding-bottom:3px;color:rgba(0,0,0,.65);line-height:1.5;position:absolute;overflow:hidden;font-size:14px}.w-filter-hint li,.w-filter-hint ul{list-style:none;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-filter-hint li{line-height:24px;font-size:9pt;border-radius:3px;padding:0 5px}.w-filter-bar{text-align:right;height:20px;position:relative}.w-filter-bar span{line-height:18px;width:28px;text-align:center;display:inline-block;font-size:1pc;cursor:pointer}.w-filter-bar a{left:-5px;transform:scale(0.9);position:absolute;font-size:9pt}.w-filter-bar a span{font-size:9pt;width:22px}.w-filter-hint .w-active,.w-filter-hint li:hover{background-color:#f5f5f5!important}",""])},function(e,t,n){"use strict";n(190),n(292);var r=n(8),o=n(9),i=n(42),a=n(204),s=n(294),l=o.createClass({displayName:"ContextMenu",getInitialState:function(){return{}},componentDidMount:function(){var e=this;e.container=document.createElement("div"),document.body.appendChild(e.container),e.componentDidUpdate(),r(document).on("mousedown click",function(t){return r(t.target).closest(".w-context-menu").length?void("INPUT"!==t.target.nodeName&&t.preventDefault()):void e.hide()}).on("keydown",function(t){9===t.keyCode&&e.hide()}),r(window).on("resize blur",function(){e.hide()})},componentDidUpdate:function(){i.unstable_renderSubtreeIntoContainer(this,this.getDialogElement(),this.container)},preventDefault:function(e){e.preventDefault()},isVisible:function(){return this.state.visible},onClick:function(e){var t=r(e.target).closest("li");if(e.preventDefault(),!t.hasClass("w-ctx-sub-menu-list")&&!t.hasClass("w-ctx-item-disabled")){var n=this.state;!t.hasClass("w-ctx-item-multi")&&!n.radio&&this.hide();var o=t.attr("data-menu-action");this.props.onClick&&this.props.onClick(o,e,t.attr("data-parent-action"),t.attr("data-name")),(e.shiftKey||e.ctrlKey||e.metaKey)&&t.attr("data-shift-to-edit")&&this.refs.editorDialog.show({value:t.attr("data-clipboard-text")}),n.radio&&(n.list.forEach(function(e){e.selected=e.action==o}),this.setState({}))}},getDialogElement:function(){var e=this,t=e.state,n=t.list||[],r=t.radio;return o.createElement("div",{onClick:e.onClick,className:"w-context-menu "+(t.className||""),onContextMenu:e.onClick,style:{left:t.left,top:t.top,display:t.visible?"":"none"}},o.createElement("ul",{className:"w-ctx-menu-list"},n.map(function(e){var t=e.list,n=e.shiftToEdit?1:void 0,i=!t&&e.multiple;return o.createElement("li",{"data-menu-action":e.action||e.name,key:e.name,className:"w-ctx-menu-item "+(e.sep?"w-ctx-item-sep":"")+(e.disabled?" w-ctx-item-disabled":"")+(t?" w-ctx-sub-menu-list":"")+(e.copyText?" w-copy-text":""),"data-clipboard-text":e.copyText,style:{display:e.hide?"none":void 0},onClick:e.onClick},o.createElement("label",{className:"w-ctx-item-tt"+(e.selected?" w-ctx-selected":"")},r?o.createElement("span",{className:"w-ctx-checked"+(e.selected?" visible":"")},"✔️"):void 0,e.icon?o.createElement("span",{style:{marginRight:"5px"},className:"glyphicon glyphicon-"+e.icon}):null,i?o.createElement("input",{type:"checkbox",checked:e.checked}):null,e.name),t?o.createElement("span",{className:"glyphicon glyphicon-play"}):void 0,t?o.createElement("div",{className:"w-ctx-menu-gap"}):void 0,t?o.createElement("ul",{className:"w-ctx-menu-list",style:e.top>0?{top:30*-e.top-1,maxHeight:e.maxHeight}:void 0},t.map(function(t,r){return o.createElement("li",{title:t.title,"data-parent-action":e.action,"data-name":t.name,"data-menu-action":t.action||t.name,key:r,onClick:t.onClick,className:"w-ctx-menu-item "+(t.sep?"w-ctx-item-sep":"")+(t.disabled?" w-ctx-item-disabled":"")+(t.copyText?" w-copy-text":""),"data-clipboard-text":t.copyText,"data-shift-to-edit":n},o.createElement("label",{className:"w-ctx-item-tt"},t.multiple?o.createElement("input",{type:"checkbox",checked:t.checked}):null,t.name))})):void 0)})))},show:function(e){e.visible=!0,this.setState(e)},hide:function(){this.setState({visible:!1})},update:function(){this.state.visible&&this.setState({})},render:function(){return o.createElement(s,{ref:"editorDialog"})}});l.util=a,l.$=r,e.exports=l},function(e,t,n){var r=n(293);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-context-menu{position:absolute;z-index:99999999}.w-ctx-menu-list{list-style:none outside none;margin:0;padding:0;width:100%;box-sizing:border-box;border:1px solid #ccc;box-shadow:2px 2px 2px rgba(0,0,0,.15);background:#fff;min-width:110px;border-radius:4px}.w-ctx-menu-list .w-ctx-item-tt input{margin-right:5px;vertical-align:text-top}.w-ctx-menu-list .glyphicon-play{line-height:28px;font-size:10px;margin-left:10px;transform:scale(.8)}.w-ctx-menu-list label{margin:0!important;font-weight:400!important;display:block}.w-ctx-menu-list .w-ctx-selected{font-weight:700!important}.w-ctx-menu-list .w-ctx-checked{display:inline-block;width:20px;visibility:hidden}body .w-ctx-menu-list .w-ctx-menu-list{margin-left:3px;display:none;top:-1px;z-index:100000001}body .w-ctx-menu-list .w-ctx-menu-gap{position:absolute;margin-left:-2px;height:35px;top:-1px;left:100%;width:6px;display:none;z-index:100000000}.w-ctx-menu-item:hover .w-ctx-menu-gap,.w-ctx-menu-item:hover .w-ctx-menu-list{display:block}.w-ctx-menu-item:hover .w-ctx-menu-list{width:auto}.w-ctx-menu-item{display:flex;line-height:30px;padding:0 15px;justify-content:space-between;position:relative;cursor:default;white-space:nowrap}.w-ctx-menu-item:hover{background:#f1f3f4}.w-ctx-menu-item.item-disabled .w-ctx-menu-item-tt{color:#999}.w-ctx-item-sep{border-top:1px solid #ccc;margin-top:5px}.w-ctx-item-disabled{color:#999}.w-ctx-item-disabled:hover{background:#fff!important}.w-ctx-menu-item .w-ctx-menu-item-tt{margin:0}.w-ctx-menu-item .w-ctx-menu-item-des{color:#999}.w-ctx-menu-item .w-ctx-menu-list{position:absolute;left:100%;top:0}.w-ctx-menu-left .w-ctx-menu-item .w-ctx-menu-list{right:102%;left:unset}.w-ctx-menu-left .w-ctx-menu-list .w-ctx-menu-gap{left:-3px}.w-ctx-radio-list{min-width:165px}",""])},function(e,t,n){"use strict";function r(e,t){return"blank"===e?t(""):void l.getTempFile({filename:e},function(e,n){return e?void(e.em&&(u.error(e.em),e.ec)||t(e.value||"")):c.showSystemError(n)})}n(190);var o=n(9),i=n(42),a=n(295),s=n(208),l=n(282),c=n(204),u=n(209),d=11534336,p='javascript:"<style>html,body{padding:0;margin:0}</style><textarea></textarea>"',h={padding:0,border:"none",width:1040,height:600,margin:0,verticalAlign:"top"},g=o.createClass({displayName:"EditorDialog",getInitialState:function(){return{}},show:function(e){this._hideDialog=!1,this.setState(e),this.props.textEditor&&this._textarea&&(this._textarea.value=e&&e.value||""),this.refs.editorDialog.show()},hide:function(){this.refs.editorDialog.hide(),this._hideDialog=!0},onChange:function(e){this.setState({value:e.target.value})},shouldComponentUpdate:function(){return this._hideDialog===!1},componentDidMount:function(){var e=this;if(e.props.textEditor){var t=i.findDOMNode(e.refs.iframe),n=function(){var n=t.contentWindow.document.querySelector("textarea"),r=n&&n.style;e._textarea=n,r&&(r.resize="none",r.width=h.width+"px",r.height=h.height+"px",r.padding="5px",r.border="1px solid #ccc",r.borderRadius="3px",n.maxLength=d,n.placeholder="Input the text",n.onkeydown=function(t){(t.ctrlKey||t.metaKey)&&83===t.keyCode&&(t.preventDefault(),e.props.textEditor&&e.onSave())})};t.onload=n,n(),s.on("showEditorDialog",function(t,n,o){if(n.name){var i=l.valuesModal.get(n.name),a=i&&i.value||"";e._keyName=n.name,e.show({value:a,title:(i?"Modify the":"Create a")+" key `"+n.name+"` of Values",isTempFile:!1})}else{var s=o&&l.rulesModal.get(n.ruleName);if(s){var c=n.tempFile;e._tempFile=c,e._fileElem=o,e._rulesItem=s,r(c,function(t){e.show({value:t,title:"Create a temp file",isTempFile:!0})})}}})}},getValue:function(){var e=this._textarea?this._textarea.value:this.state.value;return e||""},onSave:function(){var e=this,t=e.getValue();return e.state.isTempFile?void l.createTempFile(JSON.stringify({clientId:l.getPageId(),value:t}),function(t,n){if(!t||0!==t.ec)return c.showSystemError(n);for(var r=e._fileElem,o=r.closest(".CodeMirror-line")[0],i=r.closest(".CodeMirror-code").find(".CodeMirror-line"),a=0,u=0,d=i.length;d>u;u++)if(i[u]===o){a=u;break}var p=r.text(),h=p.replace("temp/"+e._tempFile,t.filepath),g=e._rulesItem.value.split(/\r\n|\r|\n/).map(function(e,t){return t===a&&(e=e.trim().split(/\s+/).map(function(e){return e===p?h:e}).join(" ")),e}).join("\n"),f=e._rulesItem.name;l.rules.add({name:f,value:g,selected:e._rulesItem.selected?"1":""},function(t,n){t&&0===t.ec?(s.trigger("addNewRulesFile",{filename:f,data:g,update:!0}),e.hide()):c.showSystemError(n)})}):void l.values.add({name:e._keyName,value:t},function(n,r){n&&0===n.ec?(s.trigger("addNewValuesFile",{filename:e._keyName,data:t,update:!0}),e.hide()):c.showSystemError(r)})},formatValue:function(){var e=this._textarea;try{var t=e.value.trim();if("{"===t[0]||"["===t[0]){var n=JSON.stringify(JSON.parse(t),null," ");e.value!==n&&(e.value=n)}}catch(r){u.error(r.message)}},clearValue:function(){this._textarea.value=""},render:function(){var e=this.state,t=e.value,n=e.title,r=this.props.textEditor;return o.createElement(a,{ref:"editorDialog",wstyle:"w-editor-dialog"+(r?" w-big-editor-dialog":"")},o.createElement("div",{className:"modal-header"},n||"Edit the copied text",o.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},o.createElement("span",{"aria-hidden":"true"},"×"))),o.createElement("div",{className:"modal-body"},r?o.createElement("div",{className:"w-mock-inline-action"},o.createElement("a",{onClick:this.formatValue},"Format"),o.createElement("a",{onClick:this.clearValue},"Clear")):null,r?o.createElement("iframe",{ref:"iframe",src:p,style:h}):o.createElement("textarea",{onChange:this.onChange,value:t})),r?o.createElement("div",{className:"modal-footer"},o.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Cancel"),o.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.onSave},"Save")):o.createElement("div",{className:"modal-footer"},o.createElement("button",{type:"button","data-dismiss":"modal",className:"btn btn-primary w-copy-text-with-tips","data-clipboard-text":e.value,disabled:!t},"Copy"),o.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close")))}});e.exports=g},function(e,t,n){"use strict";var r=window.jQuery=n(8),o=n(9),i=n(42),a=o.createClass({displayName:"Dialog",getInitialState:function(){return{}},componentDidMount:function(){var e=this;this.container=r(document.createElement("div"));var t=this.props.fullCustom?" w-custom-dialog":"";this.container.addClass("modal fade"+t+(this.props.wstyle?" "+this.props.wstyle:"")),document.body.appendChild(this.container[0]),this.componentDidUpdate(),"function"==typeof this.props.customRef&&this.props.customRef(this),"function"==typeof this.props.onClose&&this.container.on("hidden.bs.modal",this.props.onClose),"function"==typeof e.props.onShow&&this.container.on("shown.bs.modal",function(){e.props.onShow(e)})},componentDidUpdate:function(){i.unstable_renderSubtreeIntoContainer(this,this.getDialogElement(),this.container[0])},getDialogElement:function(){var e,t=this.props,n=t.wclassName;return t.width&&(e=e||{},e.width=t.width),t.fullCustom&&t.height&&(e=e||{},e.height=t.height),o.createElement("div",{style:e,className:"modal-dialog"+(n?" "+n:"")},o.createElement("div",{className:"modal-content"},this.props.children))},componentWillUnmount:function(){i.unmountComponentAtNode(this.container[0]),document.body.removeChild(this.container[0])},show:function(){this.isVisible()||this.container.modal(this.props.disableBackdrop?{show:!0,backdrop:!1}:"show")},isVisible:function(){return this.container.is(":visible")},hide:function(){this.container.modal("hide")},destroy:function(){this.hide(),this.container&&this.componentWillUnmount()},render:function(){return null}});e.exports=a},function(e,t,n){"use strict";function r(e){if(e!==s)try{document.body.removeChild(e.iframe),e.destroyed=!0,e.dialogs.forEach(function(e){e.hide(!0)}),e.dialogs=[],delete g[e.page]}catch(t){}}function o(e){try{var t=e.location.pathname.substring(1)+e.location.search,n=t.lastIndexOf("?");if(-1!==n){++n;var r=parseInt(t.substring(n),10);r>0&&(t=t.substring(n-r,n))}return g[t]}catch(o){}}function i(e){function t(t){try{"function"==typeof e.onWhistleContextMenuClick&&e.onWhistleContextMenuClick(t)}catch(n){}}var n=o(e);if(n&&!n.emit){try{var r=u(e);r.createModal=function(e){var t=c.create(e),r=t.hide;return t.hide=function(e){if(e){var o=n.dialogs.indexOf(t);-1!==o&&n.dialogs.splice(o,1)}r(e)},n.dialogs.push(t),t},e.initWhistleBridge(r)}catch(i){}n.list.forEach(t),n.emit=t,n.list=null}}function a(){var e=Object.keys(g),t=e.length;if(!(d>t)){for(var n=g[e[0]],o=1;t>o;o++){var i=g[e[o]];n.mtime>i.mtime&&(n=i)}r(n)}}var s,l=n(204),c=n(297),u=n(300),d=6,p=18e4,h=6e4,g={},f=function(){f=l.noop,setInterval(function(){var e=Date.now();Object.keys(g).forEach(function(t){var n=g[t];e-n.mtime>p&&r(n)})},h)};t.fork=function(e,t){e+="???_WHISTLE_PLUGIN_EXT_CONTEXT_MENU_"+t.port+"???";var n=s=g[e];if(n)return n.mtime=Date.now(),void(n.emit?n.emit(t):(n.list.push(t),n.list.length>10&&(n.list=n.list.slice(-10))));a(),f(),window.onPluginContextMenuReady=i;var o=document.createElement("iframe");o.style.display="none",g[e]=s=n={page:e,list:[t],mtime:Date.now(),iframe:o,dialogs:[]},document.body.appendChild(o),o.src=e+e.length,setTimeout(function(){!n.emit&&r(n)},h)}},function(e,t,n){"use strict";function r(){return++h>100&&(h=0),h}function o(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e,t,n){var r=document.createElement("div");document.body.appendChild(r),e.methods&&(window[n]=e.methods),u.render(c.createElement(d,{width:e.width,height:e.height,fullCustom:e.fullCustom,wclassName:"w-dialog-for-plguin",customRef:function(o){document.body.removeChild(r),l(o,e,n),t(o)},onClose:e.onClose,onShow:e.onShow},e.fullCustom?c.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},c.createElement("span",{"aria-hidden":"true"},"×")):c.createElement("div",{className:"modal-header"},c.createElement("h4",null),c.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},c.createElement("span",{"aria-hidden":"true"},"×"))),c.createElement("div",{className:"modal-body"}),e.fullCustom?void 0:c.createElement("div",{className:"modal-footer"},c.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),r)}function a(e,t){return e&&"string"==typeof e?e.replace(/\s(on[a-z]+=)"([^"]+)"/g,function(e,n,r){var o,i=r.indexOf("(");return-1===i?o="(event)":(o=r.substring(i),r=r.substring(0,i)),r=t+"['"+r+"']"+o," "+n+'"'+r+'"'}):e}function s(e,t,n){var r=e.find(".modal-content>.modal-"+n+":first");null!=t?r.html(t):(t===!1||null===t)&&r.hide()}function l(e,t,n){t=t||"";var r=t.title,o=a(t.body,n),i=a(t.footer,n),l=e.container,c=l.find(".modal-content>.modal-header:first");r&&"string"==typeof r?c.show().find("h4").html(r):(r===!1||""===r)&&c.hide(),s(l,o,"body"),s(l,i,"footer")}var c=n(9),u=n(42),d=n(295);n(298);var p="__WHISTLE_MODAL_"+Date.now()+"_"+Math.floor(1e3*Math.random())+"_",h=0;t.show=function(e){var t,n,a=e.onClose,s=p+r();return e.onClose=function(){o(s),n&&n.destroy(),n=null,"function"==typeof a&&a.call(e)},i(e,function(e){n=e,t?e.hide():e.show()},s),function(){!t&&n&&(t=!0,n.hide())}},t.create=function(e){var t,n,a=e.onClose,s=p+r();return e.onClose=function(){o(s),t&&(n&&n.destroy(),n=null),"function"==typeof a&&a.call(e)},i(e,function(e){n=e,t&&e.destroy()},s),{show:function(e){n&&(e&&e.methods&&(window[s]=e.methods),n.show(),l(n,e,s))},hide:function(e){t=e,n&&(n.container.is(":visible")?n.hide():t&&n.destroy())}}}},function(e,t,n){var r=n(299);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-dialog-for-plguin .modal-header h4{font-size:14px;font-weight:700}.w-dialog-for-plguin .modal-header{padding:5px 10px;position:relative;display:none}.w-dialog-for-plguin .modal-header button{position:absolute;top:10px;right:10px}.w-context-menu li[data-menu-action=Actions] ul,.w-context-menu li[data-menu-action=Remove] ul{top:-31px!important}",""])},function(e,t,n){"use strict";function r(e){return"string"!=typeof e&&(e.type=e.type||e.method),e}function o(e){if(e)try{for(var t=e.location.pathname.split("/"),n=t.length-1;n>=0;n--){var r=t[n];if(/^plugin\.([a-z\d_\-]+)$/.test(r)){var o=u.getPlugin(RegExp.$1+":");if(o)return o}}}catch(i){}}function i(e){var t=o(e);return{updateUI:function(){h.trigger("updateUIThrottle")},pageId:u.getPageId(),escapeHtml:d.escape,compose:u.compose,importSessions:u.importAnySessions,exportSessions:u.exportSessions,msgBox:l,qrCode:a,qrcode:a,decodeBase64:d.decodeBase64,alert:g.alert,confirm:g.confirm,getActiveSession:function(){return f.getActive()},getSelectedSessionList:function(){return f.getSelectedList()},importMockData:function(e){return d.handleImportData(e)},download:function(e){h.trigger("download",e)},showOption:function(){h.trigger("showPluginOption",t)},hideOption:function(){h.trigger("hidePluginOption",t)},setNetworkSettings:function(e){h.trigger("setNetworkSettings",e)},setComposerData:function(e){h.trigger("setComposerData",e)},copyText:d.copyText,syncData:function(e){t&&u.syncData(t,e)},syncRules:function(){t&&u.syncRules(t)},syncValues:function(){t&&u.syncValues(t)},request:function n(e,t){var n=c(r(e));return n(e.data,t)},createRequest:function(e){return c(r(e))},showModal:p.show,getServerInfo:function(){var e=u.getServerInfo();return e&&s.extend(!0,{},e)},importRules:function(e){if(e){var t=d.parseImportData(e,u.rulesModal),n=function(n){n&&(e={},t.forEach(function(t){e[t.name]=t.value}),h.trigger("uploadRules",e))};return t.hasConflict?void g.confirm("Conflict with existing content, whether to continue to overwrite them?",n):n(!0)}},importValues:function(e){if(e){var t=d.parseImportData(e,u.valuesModal,!0),n=function(n){n&&(e={},t.forEach(function(t){e[t.name]=t.value}),h.trigger("uploadValues",e))};return t.hasConflict?void g.confirm("Conflict with existing content, whether to continue to overwrite them?",n):n(!0)}}}}var a=n(301),s=n(8),l=n(209),c=n(283).createCgi,u=n(282),d=n(204),p=n(297),h=n(208),g=n(212),f=u.networkModal;e.exports=i},function(e,t,n){function r(e,t,n,r,a){var s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!o())throw new Error("Callback required as last argument");if(!c){if(1>l)throw new Error("Too few arguments provided");return 1===l?(n=t,t=r=void 0):2!==l||t.getContext||(r=n,n=t,t=void 0),new Promise(function(o,a){try{var s=i.create(n,r);o(e(s,t,r))}catch(l){a(l)}})}if(2>l)throw new Error("Too few arguments provided");2===l?(a=n,n=t,t=r=void 0):3===l&&(t.getContext&&"undefined"==typeof a?(a=r,r=void 0):(a=r,r=n,n=t,t=void 0));try{var u=i.create(n,r);a(null,e(u,t,r))}catch(d){a(d)}}var o=n(302),i=n(304),a=n(331),s=n(333);t.create=i.create,t.toCanvas=r.bind(null,a.render),t.toDataURL=r.bind(null,a.renderToDataURL),t.toString=r.bind(null,function(e,t,n){return s.render(e,n)})},function(e,t,n){"use strict";var r=n(303);e.exports=function(){return"function"==typeof r.Promise&&"function"==typeof r.Promise.prototype.then}},function(e,t){(function(t){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this}).call(t,function(){return this}())},function(e,t,n){function r(e,t){for(var n=e.size,r=M.getPositions(t),o=0;o<r.length;o++)for(var i=r[o][0],a=r[o][1],s=-1;7>=s;s++)if(!(-1>=i+s||i+s>=n))for(var l=-1;7>=l;l++)-1>=a+l||a+l>=n||(s>=0&&6>=s&&(0===l||6===l)||l>=0&&6>=l&&(0===s||6===s)||s>=2&&4>=s&&l>=2&&4>=l?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0))}function o(e){for(var t=e.size,n=8;t-8>n;n++){var r=n%2===0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}function i(e,t){for(var n=A.getPositions(t),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],a=-2;2>=a;a++)for(var s=-2;2>=s;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?e.set(o+a,i+s,!0,!0):e.set(o+a,i+s,!1,!0)}function a(e,t){for(var n,r,o,i=e.size,a=v.getEncodedBits(t),s=0;18>s;s++)n=Math.floor(s/3),r=s%3+i-8-3,o=1===(a>>s&1),e.set(n,r,o,!0),e.set(r,n,o,!0)}function s(e,t,n){var r,o,i=e.size,a=x.getEncodedBits(t,n);for(r=0;15>r;r++)o=1===(a>>r&1),6>r?e.set(r,8,o,!0):8>r?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),8>r?e.set(8,i-r-1,o,!0):9>r?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function l(e,t){for(var n=e.size,r=-1,o=n-1,i=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var l=0;2>l;l++)if(!e.isReserved(o,s-l)){var c=!1;a<t.length&&(c=1===(t[a]>>>i&1)),e.set(o,s-l,c),i--,-1===i&&(a++,i=7)}if(o+=r,0>o||o>=n){o-=r,r=-r;break}}}function c(e,t,n){var r=new f;n.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),T.getCharCountIndicator(t.mode,e)),t.write(r)});var o=h.getSymbolTotalCodewords(e),i=y.getTotalCodewordsCount(e,t),a=8*(o-i);for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var s=(a-r.getLengthInBits())/8,l=0;s>l;l++)r.put(l%2?17:236,8);return u(r,e,t)}function u(e,t,n){for(var r=h.getSymbolTotalCodewords(t),o=y.getTotalCodewordsCount(t,n),i=r-o,a=y.getBlocksCount(t,n),s=r%a,l=a-s,c=Math.floor(r/a),u=Math.floor(i/a),d=u+1,g=c-u,f=new b(g),m=0,A=new Array(a),M=new Array(a),w=0,v=new p(e.buffer),x=0;a>x;x++){var T=l>x?u:d;A[x]=v.slice(m,m+T),M[x]=f.encode(A[x]),m+=T,w=Math.max(w,T)}var N,C,I=new p(r),E=0;for(N=0;w>N;N++)for(C=0;a>C;C++)N<A[C].length&&(I[E++]=A[C][N]);for(N=0;g>N;N++)for(C=0;a>C;C++)I[E++]=M[C][N];return I}function d(e,t,n,u){var d;if(C(e))d=N.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");var p=t;if(!p){var g=N.rawSplit(e);p=v.getBestVersionForData(g,n)}d=N.fromString(e,p||40)}var f=v.getBestVersionForData(d,n);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(f>t)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else t=f;var A=c(t,n,d),M=h.getSymbolSize(t),y=new m(M);return r(y,t),o(y),i(y,t),s(y,n,0),t>=7&&a(y,t),l(y,A),u||(u=w.getBestMask(y,s.bind(null,y,n))),w.applyMask(u,y),s(y,n,u),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:u,segments:d}}var p=n(305),h=n(310),g=n(311),f=n(312),m=n(313),A=n(314),M=n(315),w=n(316),y=n(317),b=n(318),v=n(321),x=n(324),T=n(322),N=n(325),C=n(309);t.create=function(e,t){if("undefined"==typeof e||""===e)throw new Error("No input text");var n,r,o=g.M;return"undefined"!=typeof t&&(o=g.from(t.errorCorrectionLevel,g.M),n=v.from(t.version),r=w.from(t.maskPattern),t.toSJISFunc&&h.setToSJISFunction(t.toSJISFunc)),d(e,n,o,r)}},function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}function t(e,n,r){return t.TYPED_ARRAY_SUPPORT||this instanceof t?"number"==typeof e?s(this,e):m(this,e,n,r):new t(e,n,r)}function o(e){if(e>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|e}function i(e){return e!==e}function a(e,n){var r;return t.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(n),r.__proto__=t.prototype):(r=e,null===r&&(r=new t(n)),r.length=n),r}function s(e,n){var r=a(e,0>n?0:0|o(n));if(!t.TYPED_ARRAY_SUPPORT)for(var i=0;n>i;++i)r[i]=0;return r}function l(e,t){var n=0|h(t),r=a(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function c(e,t){for(var n=t.length<0?0:0|o(t.length),r=a(e,n),i=0;n>i;i+=1)r[i]=255&t[i];return r}function u(e,n,r,o){if(0>r||n.byteLength<r)throw new RangeError("'offset' is out of bounds");if(n.byteLength<r+(o||0))throw new RangeError("'length' is out of bounds");var i;return i=void 0===r&&void 0===o?new Uint8Array(n):void 0===o?new Uint8Array(n,r):new Uint8Array(n,r,o),t.TYPED_ARRAY_SUPPORT?i.__proto__=t.prototype:i=c(e,i),i}function d(e,n){if(t.isBuffer(n)){var r=0|o(n.length),s=a(e,r);return 0===s.length?s:(n.copy(s,0,0,r),s)}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||i(n.length)?a(e,0):c(e,n);if("Buffer"===n.type&&Array.isArray(n.data))return c(e,n.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function h(e){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;return 0===n?0:p(e).length}function g(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function f(e,t,n,r){return g(p(t,e.length-n),e,n,r)}function m(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?u(e,t,n,r):"string"==typeof t?l(e,t,n):d(e,t)}var A=n(309);t.TYPED_ARRAY_SUPPORT=r();var M=t.TYPED_ARRAY_SUPPORT?2147483647:1073741823;t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),t.prototype.write=function(e,t,n){void 0===t?(n=this.length,t=0):void 0===n&&"string"==typeof t?(n=this.length,t=0):isFinite(t)&&(t=0|t,n=isFinite(n)?0|n:void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return f(this,e,t,n)},t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var o;if(t.TYPED_ARRAY_SUPPORT)o=this.subarray(e,n),o.__proto__=t.prototype;else{var i=n-e;o=new t(i,void 0);for(var a=0;i>a;++a)o[a]=this[a+e]}return o},t.prototype.copy=function(e,n,r,o){if(r||(r=0),o||0===o||(o=this.length),n>=e.length&&(n=e.length),n||(n=0),o>0&&r>o&&(o=r),o===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>o)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n<o-r&&(o=e.length-n+r);var i,a=o-r;if(this===e&&n>r&&o>n)for(i=a-1;i>=0;--i)e[i+n]=this[i+r];else if(1e3>a||!t.TYPED_ARRAY_SUPPORT)for(i=0;a>i;++i)e[i+n]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),n);return a},t.prototype.fill=function(e,n,r){if("string"==typeof e){if("string"==typeof n?(n=0,r=this.length):"string"==typeof r&&(r=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}}else"number"==typeof e&&(e=255&e);if(0>n||this.length<n||this.length<r)throw new RangeError("Out of range index");if(n>=r)return this;n>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=n;r>i;++i)this[i]=e;else{var a=t.isBuffer(e)?e:new t(e),s=a.length;for(i=0;r-n>i;++i)this[i+n]=a[i%s]}return this},t.concat=function(e,n){if(!A(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a(null,0);var r;if(void 0===n)for(n=0,r=0;r<e.length;++r)n+=e[r].length;var o=s(null,n),i=0;for(r=0;r<e.length;++r){var l=e[r];if(!t.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,i),i+=l.length}return o},t.byteLength=h,t.prototype._isBuffer=!0,t.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.exports=t}).call(t,n(306).Buffer)},function(e,t,n){(function(e,r){/*!
76
+ return e.value}).join("\n");return r?(J!==r&&(J=r,_=null,r.replace(Z,function(e,t,n){return _=_||[],-1===_.indexOf(n)&&_.push(n),""})),_):void 0}function o(e,t){var n=e.moduleName,r=t&&t.hintUrl||e.hintUrl||"",o="plugin."+E.getSimplePluginName(e);return 0!==r.indexOf(n)&&0!==r.indexOf(o)&&(r=o+"/"+r),b!==r&&(v&&(v.hasDestroyed=!0),b=r,v=I.createCgi(r,!0)),v}function i(e){if(D)return[];var t=C.getAllRules();if(!e)return t;e=e.toLowerCase();var n=t.filter(function(t){return"socks://"===t&&-1!=="proxy".indexOf(e)?!0:(t=t.toLowerCase(),-1!==t.indexOf(e))});return n.sort(function(t,n){var r=t.toLowerCase().indexOf(e),o=n.toLowerCase().indexOf(e);return r===o?0:0>r||r>o&&o>=0?1:-1}),"csp"===e?n.push("disable://csp"):-1!=="upstream".indexOf(e)?n.push("proxy://","xproxy://"):-1!=="xupstream".indexOf(e)?n.push("xproxy://"):-1!=="extend".indexOf(e)?n.push("reqMerge://","resMerge://"):e.length>2&&("redirect://".indexOf(e)?"locationHref://".indexOf(e)||n.push("redirect://"):n.push("locationHref://")),n}function a(e){e=e.substring(1);try{var t=window.parent.getAtValueListForWhistle;if("function"!=typeof t)return;var n=t(e);if(Array.isArray(n)){var r=[],o=60;return n.forEach(function(e){if(e&&!(1>o)){if("string"==typeof e)return--o,void r.push(e);var t=e.value;if(t&&"string"==typeof t){--o;var n=e.label;n&&"string"==typeof n?r.push({text:t,displayText:n}):r.push(t)}}}),r}}catch(i){}}function s(e,t){var n;return t?(e=e.substring(t.length+3),n=C.getAllPluginNameList().map(function(e){return t+"://"+e})):(e=e.substring(1),n=C.getPluginVarList()),e?(e=e.toLowerCase(),t&&(e=t+"://"+e),n.filter(function(t){return-1!==t.indexOf(e)})):n}function l(e,t){try{var n=window.parent.getAtHelpUrlForWhistle;if("function"==typeof n){var r=n(e,t);if(r===!1||"string"==typeof r)return r}}catch(o){}return"https://avwo.github.io/whistle/rules/@.html"}function c(e,t){return"string"!=typeof t&&(t=""),t||e.homepage||"https://avwo.github.io/whistle/plugins.html"}function u(e,t,n,r){return n?e+(r?".":"=")+t:e+"://"+t}function d(e,t,n,r,o,i,a){if(A=[],F={},w=null,y=0,!e||i.hasDestroyed||!Array.isArray(e)&&!Array.isArray(e.list))return void(m=g=null);m=o,g=r;var s=0;Array.isArray(e)||(w=e.position,y=parseInt(e.offset,10)||0,e=e.list);var l=a?j:k;e.forEach(function(e){if(!(s>=60))if("string"==typeof e)e=u(r,e.trim(),a),e.length<l&&!F[e]&&(++s,A.push(e),F[e]=c(n));else if(e){var t,o;"string"==typeof e.label&&(t=e.label.trim()),t||"string"!=typeof e.display||(t=e.display.trim()),"string"==typeof e.value&&(o=u(r,e.value.trim(),a,e.isKey)),o&&o.length<l&&!F[t||o]&&(++s,A.push(t&&t!==o?{displayText:t,text:o}:o),F[t||o]=c(n,e.help))}}),x&&s&&(t._byPlugin=!0,t.execCommand("autocomplete"))}function p(e,t){return(!t||t())&&setTimeout(function(){e.state.completionActive||e.showHint({hint:N.hint.rulesHint,completeSingle:!1})},100),N.Pass}function h(e){te=null;var t,n=T("li.CodeMirror-hint-active");if(n.is(":visible"))if(t=n.text(),q)t="@"+t;else if(K)t="%"+t;else{var r=t.indexOf(":");te=t,-1!==r&&(t=t.substring(0,r))}else{var o=e.getCursor(),i=o.ch,a=e.getLine(o.line).replace(/(#.*|\s+)$/,""),s=a.length;if(s>=i){for(var l=i;--l>=0&&!/\s/.test(a[l]););for(++l;++i<=s&&!/\s/.test(a[i]););a=a.slice(l,i),B.test(a)||U.test(a)?t=a:O.test(a)&&(t=RegExp.$1)}}return t}n(278),n(280);for(var g,f,m,A,M,w,y,b,v,x,T=n(8),N=n(261),C=n(281),I=n(282),E=n(204),D=-1!==window.location.href.indexOf("disabledEditor=1"),S=/[^:/]/,L=/^((?:whistle\.)?([a-z\d_-]+:))(\/?$|\/\/)/,k=512,j=100,B=/^@/,U=/^%/,z=/^%([a-z\d_-]+)([=.])/,Q=/^(pipe|sniCallback):/,R=/^([a-z\d_.-]+:\/\/)?(`)?\{([^\s]*?)(?:\}\1?)?$/i,O=/^([^\s:]+):\/\//,H=120,F={},V={"Alt-/":"autocomplete"},P=["-",'"_"',"Shift-2",".",",","Shift-,","Shift-.","Shift-;","/","Shift-/","Shift-1","Shift-4","Shift-5","Shift-6","Shift-7","Shift-8","=","Shift-=","'","Shift-'",";","Shift-;","\\","Shift-\\","Shift-`","[","]","Shift-[","Shift-]","Shift-9","Shift-0"],Y=0;10>Y;Y++)P.push("'"+Y+"'");for(var G="a".charCodeAt(),W="z".charCodeAt();W>=G;G++){var X=String.fromCharCode(G);P.push("'"+X.toUpperCase()+"'"),P.push("'"+X+"'")}T(window).on("hashchange",function(){var e=-1!==window.location.href.indexOf("disabledEditor=1");e!==D&&(D=e)});var _,J,q,K,Z=/^[^\n\r\S]*(```+)[^\n\r\S]*(\S+)[^\n\r\S]*[\r\n]([\s\S]*?)[\r\n][^\n\r\S]*\1\s*$/gm,$=/\S+/,ee=function(e,t){return t+"{"+e+"}"+t};N.registerHelper("hint","rulesHint",function(e,t){q=!1,K=!1,x=!1,f=null;var n=e._byDelete||e._byPlugin,l=e._byEnter;e._byDelete=e._byPlugin=e._byEnter=!1;var p,h=e.getCursor(),b=e.getLine(h.line),v=h.ch,T=v,C=b.indexOf("#");if(!(-1!==C&&T>C)){for(;T&&$.test(b.charAt(T-1));)--T;var E,D,O,V,P,Y=T!=v&&b.substring(T,v),G=B.test(Y),W=Q.test(Y)&&RegExp.$1,X=U.test(Y);if(X&&z.test(Y)){if(D=RegExp.$1,P=RegExp.$2,E=D&&I.getPlugin(D+":"),V=E&&E.pluginVars,!V)return;O=Y.substring(D.length+2),X=!1}if(G||W||X){if((!l||/^(?:pipe|sniCallback):\/\/$/.test(Y))&&(p=G?a(Y):s(Y,W)),!p||!p.length)return;return G?q=!0:X&&(K=!0),{list:p,from:N.Pos(h.line,T),to:N.Pos(h.line,v)}}if(Y){if(R.test(Y)){var _=RegExp.$1.length,J=RegExp.$2,Z=RegExp.$3,te=I.getValuesModal(),ne=te&&te.list,re=r();if(re&&(ne&&ne.forEach(function(e){-1===re.indexOf(e)&&re.push(e)}),ne=re),"}`"===Z.slice(-2)&&(Z=Z.slice(0,-2)),ne&&ne.length){if(Z){p=[];var oe=Z.toLowerCase();ne.forEach(function(e){-1!==e.toLowerCase().indexOf(oe)&&p.push(ee(e,J))})}else p=ne.map(function(e){return ee(e,J)});var ie=p&&p.length;if(ie){if(1===ie&&p[0]===Y.substring(_))return;return b=b.substring(T).split(/\s/,1)[0]||"",{list:p,from:N.Pos(h.line,T+_),to:N.Pos(h.line,T+b.length)}}}}if(E||L.test(Y)){E=E||I.getPlugin(RegExp.$2);var ae=V||E;if(E&&("string"==typeof ae.hintUrl||ae.hintList)){if(V){if(O&&(l||O.length>j))return}else if(O=RegExp.$3||"",O=2===O.length?Y.substring(Y.indexOf("//")+2):"",O&&(O.length>k||l))return;clearTimeout(M);var se=V?"%"+D:RegExp.$1.slice(0,-1);if(ae.hintList){if(O?(O=O.toLowerCase(),A=ae.hintList.filter(function(e){return"string"==typeof e?-1!==e.toLowerCase().indexOf(O):-1!==e.text.toLowerCase().indexOf(O)?!0:e.displayText&&-1!==e.displayText.toLowerCase().indexOf(O)})):A=ae.hintList,!A.length)return;F={},A=A.map(function(e){var t,n;return"string"==typeof e?n=u(se,e,V):(n=u(se,e.text,V,e.isKey),e.displayText&&(n=e.displayText,t={text:n,displayText:e.displayText})),F[n]=c(E,e.help),t||n}),w="",y=0,g=se,O=m}if(A&&A.length&&g===se&&O===m){-1!==C&&(b=b.substring(0,C)),b=b.substring(T).split(/\s/,1)[0]||"",f=se,v=T+b.trim().length;var le=N.Pos(h.line,T),ce=N.Pos(h.line,v),ue=A,de="cursor"===w;if((y||de)&&(ue=ue.map(function(e){var t={from:le,to:ce};return"string"==typeof e?(t.text=e,t.displayText=e):(t.text=e.text,t.displayText=e.displayText),t}),de&&(le=h)),"tail"===w){var pe=le;le=ce,ce=pe}return y&&(T=Math.max(T,le.ch+y),T>v&&(T=v),le=N.Pos(h.line,T)),{list:ue,from:le,to:ce}}x=!0,M=setTimeout(function(){var t=o(E,ae);e._bindedHintEvents||(e._bindedHintEvents=!0,e.on("blur",function(){x=!1}));var n={protocol:se,value:O};P&&(n.sep=P),t(n,function(n){d(n,e,E,se,O,t,V)})},H)}}if(O||-1!==Y.indexOf("//")||!S.test(Y))return}else if(n)return;if(p=i(Y),p.length){var he,ge=b.indexOf("://",T);if(-1!==ge)ge+=3,he=b.substring(T,ge),/\s/.test(he)||0===Y.indexOf("red")&&(he===Y+"http://"||he===Y+"https://")||(v=ge);else if(ge=b.indexOf(":",T),-1!==ge&&(++ge,he=b.substring(T,ge)+"//",-1!==p.indexOf(he))){v=ge;var fe=b[v];"/"===fe&&(v++,fe=b[v],"/"===fe&&v++)}return{list:p,from:N.Pos(h.line,T),to:N.Pos(h.line,v)}}}}),N.commands.autocomplete=function(e){e.showHint({hint:N.hint.rulesHint,completeSingle:!1})},P.forEach(function(e){V[e]=p});var te;t.getExtraKeys=function(){return V},t.getHelpUrl=function(e,t){var n,r=h(e);if(B.test(r)&&(n=l(r.substring(1),t)))return n;if(n===!1)return!1;if(te&&(r===g||f===g)&&(n=F[te]))return n;if(z.test(r)){r=r.substring(1,RegExp.$1.length+1);var o=r&&C.getPlugin(r);return o=o&&o.homepage,o||"https://avwo.github.io/whistle/plugins.html?plugin="+r}return C.getHelpUrl(r)}},function(e,t,n){var r=n(279);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}",""])},function(e,t,n){!function(e){e(n(261))}(function(e){"use strict";function t(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}function n(e,t,n){var r=e.options.hintOptions,o={};for(var i in g)o[i]=g[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function r(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var o;o="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n,a[e]=o}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},o=/Mac/.test(navigator.platform);o&&(r["Ctrl-P"]=function(){t.moveFocus(-1)},r["Ctrl-N"]=function(){t.moveFocus(1)});var i=e.options.customKeys,a=i?{}:r;if(i)for(var s in i)i.hasOwnProperty(s)&&n(s,i[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return a}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=n,this.picked=!1;var a=this,s=t.cm,l=s.getInputField().ownerDocument,c=l.defaultView||l.parentWindow,p=this.hints=l.createElement("ul");p.setAttribute("role","listbox"),p.setAttribute("aria-expanded","true"),p.id=this.id;var h=t.cm.options.theme;p.className="CodeMirror-hints "+h,this.selectedHint=n.selectedHint||0;for(var g=n.list,f=0;f<g.length;++f){var m=p.appendChild(l.createElement("li")),A=g[f],M=u+(f!=this.selectedHint?"":" "+d);null!=A.className&&(M=A.className+" "+M),m.className=M,f==this.selectedHint&&m.setAttribute("aria-selected","true"),m.id=this.id+"-"+f,m.setAttribute("role","option"),A.render?A.render(m,n,A):m.appendChild(l.createTextNode(A.displayText||r(A))),m.hintId=f}var w=t.options.container||l.body,y=s.cursorCoords(t.options.alignWithWord?n.from:null),b=y.left,v=y.bottom,x=!0,T=0,N=0;if(w!==l.body){var C=-1!==["absolute","relative","fixed"].indexOf(c.getComputedStyle(w).position),I=C?w:w.offsetParent,E=I.getBoundingClientRect(),D=l.body.getBoundingClientRect();T=E.left-D.left-I.scrollLeft,N=E.top-D.top-I.scrollTop}p.style.left=b-T+"px",p.style.top=v-N+"px";var S=c.innerWidth||Math.max(l.body.offsetWidth,l.documentElement.offsetWidth),L=c.innerHeight||Math.max(l.body.offsetHeight,l.documentElement.offsetHeight);w.appendChild(p),s.getInputField().setAttribute("aria-autocomplete","list"),s.getInputField().setAttribute("aria-owns",this.id),s.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var k,j=t.options.moveOnOverlap?p.getBoundingClientRect():new DOMRect,B=t.options.paddingForScrollbar?p.scrollHeight>p.clientHeight+1:!1;setTimeout(function(){k=s.getScrollInfo()});var U=j.bottom-L;if(U>0){var z=j.bottom-j.top,Q=j.top-(y.bottom-y.top)-2;L-j.top<Q?(z>Q&&(p.style.height=(z=Q)+"px"),p.style.top=(v=y.top-z)+N+"px",x=!1):p.style.height=L-j.top-2+"px"}var R=j.right-S;if(B&&(R+=s.display.nativeBarWidth),R>0&&(j.right-j.left>S&&(p.style.width=S-5+"px",R-=j.right-j.left-S),p.style.left=(b=Math.max(y.left-R-T,0))+"px"),B)for(var O=p.firstChild;O;O=O.nextSibling)O.style.paddingRight=s.display.nativeBarWidth+"px";if(s.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:g.length,close:function(){t.close()},pick:function(){a.pick()},data:n})),t.options.closeOnUnfocus){var H;s.on("blur",this.onBlur=function(){H=setTimeout(function(){t.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(H)})}s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect();k||(k=s.getScrollInfo());var r=v+k.top-e.top,o=r-(c.pageYOffset||(l.documentElement||l.body).scrollTop);return x||(o+=p.offsetHeight),o<=n.top||o>=n.bottom?t.close():(p.style.top=r+"px",void(p.style.left=b+k.left-e.left+"px"))}),e.on(p,"dblclick",function(e){var t=i(p,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())}),e.on(p,"click",function(e){var n=i(p,e.target||e.srcElement);n&&null!=n.hintId&&(a.changeActive(n.hintId),t.options.completeOnSingleClick&&a.pick())}),e.on(p,"mousedown",function(){setTimeout(function(){s.focus()},20)});var F=this.getSelectedHintRange();return(0!==F.from||0!==F.to)&&this.scrollToActive(),e.signal(n,"select",g[this.selectedHint],p.childNodes[this.selectedHint]),!0}function s(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function l(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}function c(t,n){var r,o=t.getHelpers(n,"hint");if(o.length){var i=function(e,t,n){function r(o){return o==i.length?t(null):void l(i[o],e,n,function(e){e&&e.list.length>0?t(e):r(o+1)})}var i=s(e,o);r(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var u="CodeMirror-hint",d="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",function(r){r=n(this,this.getCursor("start"),r);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!r.hint.supportsSelection)return;for(var i=0;i<o.length;i++)if(o[i].head.line!=o[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var a=this.state.completionActive=new t(this,r);a.options.hint&&(e.signal(this,"startCompletion",this),a.update(!0))}}),e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var p=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},h=window.cancelAnimationFrame||clearTimeout;t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var o=t.list[n],i=this;this.cm.operation(function(){o.hint?o.hint(i.cm,t,o):i.cm.replaceRange(r(o),o.from||t.from,o.to||t.to,"complete"),e.signal(t,"pick",o),i.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(h(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=p(function(){r.update()}),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;l(this.options.hint,this.cm,this.options,function(r){t.tick==n&&t.finishUpdate(r,e)})}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" "+d,""),r.removeAttribute("aria-selected")),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+d,r.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",r.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:c}),e.registerHelper("hint","fromList",function(t,n){var r,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),s=o;i.start<o.ch&&/\w/.test(i.string.charAt(o.ch-i.start-1))?r=i.string.substr(0,o.ch-i.start):(r="",a=o);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}return l.length?{list:l,from:a,to:s}:void 0}),e.commands.autocomplete=e.showHint;var g={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)})},function(e,t,n){"use strict";function r(e){e=e.substring(e.indexOf(".")+1);for(var t=0,n=m.length;n>t;t++){var r=m[t];if(r.name===e)return r}}var o=n(208),i=["rule","style","pipe","plugin","host","xhost","proxy","xproxy","http-proxy","xhttp-proxy","https-proxy","xhttps-proxy","socks","xsocks","pac","weinre","log","filter","ignore","skip","enable","disable","delete","urlParams","pathReplace","method","replaceStatus","referer","auth","ua","cache","attachment","forwardedFor","responseFor","reqMerge","resMerge","reqScript","resScript","reqDelay","resDelay","reqSpeed","resSpeed","reqHeaders","resHeaders","trailers","reqType","resType","reqCharset","resCharset","reqCookies","resCookies","reqCors","resCors","reqPrepend","resPrepend","reqBody","resBody","reqAppend","resAppend","headerReplace","reqReplace","resReplace","htmlPrepend","htmlBody","htmlAppend","cssPrepend","cssBody","cssAppend","jsPrepend","jsBody","jsAppend","reqWrite","resWrite","reqWriteRaw","resWriteRaw","cipher","sniCallback"],a=["file","xfile","tpl","xtpl","rawfile","xrawfile","redirect","locationHref","statusCode"],s=[],l=[],c=[],u=[],d=a.slice(),p=["http","https","ws","wss","tunnel"],h=p.concat(a).concat(i.slice(1));h.splice(h.indexOf("plugin"),1),h.splice(h.indexOf("reqScript")+1,0,"reqRules"),h.splice(h.indexOf("resScript")+1,0,"resRules"),h=h.map(function(e){return e+"://"}),h.splice(h.indexOf("filter://"),1,"excludeFilter://","includeFilter://"),h.push("lineProps://");var g=h,f=[["Map Local",["file://","xfile://","tpl://","xtpl://","rawfile://","xrawfile://"]],["Map Remote",["https://","http://","wss://","ws://","tunnel://"]],["DNS Spoofing",["host://","xhost://","proxy://","xproxy://","http-proxy://","xhttp-proxy://","https-proxy://","xhttps-proxy://","socks://","xsocks://","pac://"]],["Rewrite Request",["urlParams://","pathReplace://","sniCallback://","method://","cipher://","reqHeaders://","forwardedFor://","referer://","auth://","ua://","cache://","attachment://","reqType://","reqCharset://","reqCookies://","reqCors://","reqMerge://","reqPrepend://","reqBody://","reqAppend://","reqReplace://","reqWrite://","reqWriteRaw://","trailers://"]],["Rewrite Response",["statusCode://","replaceStatus://","redirect://","locationHref://","resHeaders://","responseFor://","resType://","resCharset://","resCookies://","resCors://","resMerge://","resPrepend://","resBody://","resAppend://","resReplace://","htmlPrepend://","htmlBody://","htmlAppend://","cssPrepend://","cssBody://","cssAppend://","jsPrepend://","jsBody://","jsAppend://","resWrite://","resWriteRaw://"]],["Common",["pipe://","delete://","headerReplace://","reqScript://","resScript://","reqRules://","resRules://"]],["Throttle",["reqDelay://","resDelay://","reqSpeed://","resSpeed://"]],["Tools",["weinre://","log://"]],["Settings",["style://","lineProps://","enable://","disable://"]],["Filters",["ignore://","skip://","excludeFilter://","includeFilter://"]],["Plugins",[]]],m=[];t.setPlugins=function(e){var t=e.disabledPlugins;m=e.pluginsOptions,s=[],l=[],c=[],u=[],d=a.slice(),g=h.slice();var n=[];f[f.length-1][1]=n,e.disabledAllPlugins||m.forEach(function(e,r){if(r){var o=e.name;if(!t[o]){var i=e.pluginVars;if(i){l.push(o);var a=i.hintSuffix;a?a.forEach(function(e){c.push("%"+o+e)}):c.push("%"+o+"=")}u.push(o);var p;e.hideShortProtocol||-1!==o.indexOf("_")||(d.push(o),p=o+"://",g.push(p),n.push(p)),e.hideLongProtocol||(s.push("whistle."+o,"plugin."+o),p="whistle."+o+"://",g.push(p),n.push(p))}}}),o.trigger("updatePlugins")},t.PROTOCOLS=i,t.getGroupRules=function(){return f},t.getForwardRules=function(){return d},t.getPluginRules=function(){return s},t.getPluginNameList=function(){return l},t.getPluginVarList=function(){return c},t.getAllPluginNameList=function(){return u},t.getAllRules=function(){return g};var A="https://avwo.github.io/whistle/rules/";t.getHelpUrl=function(e){return e&&"rule"!==e?"includeFilter"===e||"excludeFilter"===e?A+"filter.html":"skip"===e?A+"ignore.html":"lineProps"===e?A+"lineProps.html":"reqRules"===e?A+"reqScript.html":"resRules"===e?A+"resScript.html":-1!==a.indexOf(e)?A+"rule/"+e.replace(/^x/,"")+".html":-1!==p.indexOf(e)?A+"rule/replace.html":-1!==i.indexOf(e)?A+e.replace(/^x/,"")+".html":(e=r(e),e&&e.homepage?e.homepage:A):A},t.getPlugin=r},function(e,t,n){"use strict";function r(e){return e!==G?!1:e?e.url!==G.url||e.ip!==G.ip?!1:e.name===G.name&&e.value===G.value:!0}function o(e){var n,o=location.hash.substring(1),i=o.indexOf("?");if(-1!==i){var a=te.parseQueryString(o.substring(i+1),null,null,decodeURIComponent),s=a.rulesName||a.ruleName,l=a.valuesName||a.valueName;s!==t.activeRulesName&&(t.activeRulesName=s,oe.trigger("activeRules")),l!==t.activeValuesName&&(t.activeValuesName=l,oe.trigger("activeValues")),a.url&&(n={},n.url=a.url);for(var c=0;6>c;c++){var u="name"+(c||""),d=a[u];if(d){n=n||{},n[u]=d;var p="value"+(c||"");n[p]=a[p]||""}}a.ip&&(n=n||{},n.ip=a.ip),n&&n.name&&"exact"===a.mtype&&(n.mtype=1),X||"true"!==a.clearNetwork||(W=!0)}t.hashFilterObj=n,e&&!r(n)&&oe.trigger("hashFilterChange"),G=n}function i(e){e=e||{},re.set("filterText",JSON.stringify({disabledFilterText:e.disabledFilterText,filterText:e.filterText,disabledExcludeText:e.disabledExcludeText,excludeText:e.excludeText}))}function a(){var e=te.parseJSON(re.get("filterText"));return e?{disabledFilterText:e.disabledFilterText,filterText:te.toString(e.filterText).substring(0,le),disabledExcludeText:e.disabledExcludeText,excludeText:te.toString(e.excludeText).substring(0,ce)}:{filterText:"",excludeText:""}}function s(e){e=e||{},re.set("networkColumns",JSON.stringify({columns:e.columns}))}function l(){return te.parseJSON(re.get("networkColumns"))||{}}function c(e){var t=Ge.length,n=t?te.findArray(Ge,function(t){return t.text===e}):null;return t-=10,t>2&&(Ge=Ge.slice(t),n&&-1===Ge.indexOf(n)&&Ge.push(n)),n&&n.filter}function u(e){if(e=e&&e.trim()){var t=c(e);if(t)return t;var n;return e.split(/\s+/).forEach(function(e){if(Pe.test(e)){var r=Ye[RegExp.$1],o="!"===e[2];e=e.substring(o?3:2),e&&(t=t||[],n=te.toRegExp(e),t.push({type:r,not:o,pattern:n,keyword:n?null:e.toLowerCase()}))}else e&&(t=t||[],n=te.toRegExp(e),t.push({pattern:n,keyword:n?null:e.toLowerCase()}))}),t&&Ge.push({text:e,filter:t}),t}}function d(e,t,n){if(!e)return!1;var r;if(t.pattern)r=t.pattern.test(e);else{if(n)try{var o=decodeURIComponent(e);o!==e&&(e+="\n"+o)}catch(i){}r=-1!==h(e).indexOf(t.keyword)}return t.not?!r:r}function p(e,t){for(var n=0,r=t.length;r>n;n++){var o=t[n];switch(o.type){case"method":if(d(e.req.method,o))return!0;break;case"ip":if(d(e.req.ip||"127.0.0.1",o))return!0;break;case"headers":if(d(te.objectToString(e.req.headers),o,!0))return!0;break;case"host":if(d(e.isHttps?e.url:te.getHost(e.url),o))return!0;break;case"body":if(d(te.getBody(e.req,!0),o))return!0;break;default:if(d((e.isHttps?"tunnel://":"")+e.url,o))return!0}}return!1}function h(e){return String(null==e?"":e).trim().toLowerCase()}function g(e){t.hasInvalidCerts!=e.hasInvalidCerts&&(t.hasInvalidCerts=e.hasInvalidCerts,oe.trigger("updateUI"))}function f(e,t,n){if(!e[n]||O.clientId===e[t])return!1;var r=e[t],o=e[n];return O[t]===r&&O[n]===o?!1:(O[t]=r,O[n]=o,!0)}function m(e){f(e,"mrulesClientId","mrulesTime")&&oe.trigger("rulesChanged")}function A(e){f(e,"mvaluesClientId","mvaluesTime")&&oe.trigger("valuesChanged")}function M(e,t,n){for(var r=0;n>r;r++){var o=e[r],i=t[r];if(o.name!==i.name||o.action!==i.action)return!0}}function w(e,t){var n=e.length;if(n!==t.length)return!0;for(var r=0;n>r;r++){var o=e[r],i=t[r];if(o.title!==i.title||o.key!==i.key||o.width!==i.width)return!0}}function y(e,t,n){var r=e.length,o=t.length;return r?1===r?void((!o||o>1||e[0].name!==t[0].name||e[0].action!==t[0].action)&&oe.trigger(n)):o&&1!==o?void((r!==o||M(e,t,r))&&oe.trigger(n)):oe.trigger(n):void(o&&oe.trigger(n))}function b(e){if(!e)return 0;var t=e.length;return"="===e[t-1]&&(t-=2,"="===e[t]&&--t),t}function v(e,t){Object.keys(t).forEach(function(n){var r=t[n];if("rules"===n||"rulesHeaders"===n||"url"===n)r=r||e[n];else if("req"===n||"res"===n){var o=e[n],i=o.base64;r.headers=r.headers||o.headers,r.rawHeaderNames=r.rawHeaderNames||o.rawHeaderNames,r.base64?r.preLen>0&&(r.base64=(i?i.substring(0,r.preLen):"")+r.base64):(r.base64=i,r[te.BODY_KEY]=o[te.BODY_KEY],r[te.HEX_KEY]=o[te.HEX_KEY],r[te.JSON_KEY]=o[te.JSON_KEY])}e[n]=r})}function x(e){var t=[""];return e.requestTime||(t[0]=b(e.req.base64)),e.endTime||(t[1]=b(e.res.base64)),t.join("-")}function T(){function e(){if(document.hidden){if(Date.now()-qe>Le)return setTimeout(e,100)}else qe=Date.now();be.clearNetwork&&(P=Y||P,be.clearNetwork=!1);var n=B(),r=Me.length,o=we.length,i=-1,s=-1,l=[],c=[],d=[];Ae.forEach(function(e){e.endTime||e.lost||(l.push(e.id),c.push(x(e))),e.reqPlugin>0&&e.reqPlugin<10&&(++e.reqPlugin,d.push(e.id))});var h=t.clearedLogs,f=t.clearedSvrLogs;t.clearedLogs=t.clearedSvrLogs=!1,!t.pauseConsoleRefresh&&Ce>r&&(i=h&&F||ve),!t.pauseServerLogRefresh&&Ce>o&&(s=f&&V||xe);var M,b,T=be.getActive(),N=T&&T.frames;N&&!T.pauseRecordFrames&&(T.stopRecordFrames?(b=T.id,M=-3):N.length<=ue&&(b=T.id,M=T.lastFrameId));var C=X?20:be.getDisplayCount(),I={startLogTime:t.stopConsoleRefresh?-3:i,startSvrLogTime:t.stopServerLogRefresh?-3:s,ids:l.join(),status:c.join(),startTime:n,dumpCount:Ee,lastRowId:X||!C?P:void 0,curReqId:b,lastFrameId:M,logId:_||"",count:C||20,tunnelIds:d};X=!0,$.extend(I,G),ke&&(I.ip="self"),_e.getData(I,function(n){var r=n&&n.data&&n.data.hasNew;if(setTimeout(e,r?100:900),U(n),n&&0===n.ec){var o=n.server;J=o&&o.port,K=o&&o.account,t.pluginsRoot=n.pluginsRoot,g(n),t.enablePluginMgr=n.epm,t.supportH2=n.supportH2,t.backRulesFirst=n.backRulesFirst,t.custom1=n.custom1,t.custom2=n.custom2,t.custom1Key=n.custom1Key,t.custom2Key=n.custom2Key,t.hasAccountRules!==n.hasARules&&(t.hasAccountRules=n.hasARules,oe.trigger("accountRulesChanged")),I.dumpCount>0&&(Ee=0),n.clientIp&&(t.clientIp=n.clientIp),m(n),A(n),me.forEach(function(e){e(n)});var i,s=n.log.length,l=n.svrLog.length,c=Ue,d=ze,h=Qe,f=Oe,M=Re,x=[],C=[],E=[];je=n.plugins||{},Be=n.disabledPlugins||{},Z||Object.keys(je).forEach(function(e){var t=e.slice(0,-1);if(!Be[t]){var n=je[e];E.push({mtime:n.mtime,priority:n.priority,_key:e,plugin:t,reqTab:n.reqTab,resTab:n.resTab,tab:n.tab,comTab:n.comTab,toolTab:n.toolTab,col:n.networkColumn});var r=n.webWorker;r&&-1===C.indexOf(r)&&(C.push(r),i=i||-1===Fe.indexOf(r))}}),E.sort(te.comparePlugin),Ue=[],ze=[],Qe=[],Oe=[],Re=[],Ie=[],E.forEach(function(e){var t=e.reqTab,n=e.resTab,r=e.tab,o=e.toolTab,i=e.comTab,a=e.plugin,s=e.col;t&&(t.plugin=a,Ue.push(t)),n&&(n.plugin=a,ze.push(n)),r&&(r.plugin=a,Qe.push(r)),i&&(i.plugin=a,Oe.push(i)),o&&(o.plugin=a,Re.push(o)),s&&(s.name=s.className="whistle."+e.plugin,s.isPlugin=!0,x.push(s),Ie.push(s.key))}),y(Ue,c,"reqTabsChange"),y(ze,d,"resTabsChange"),y(Qe,h,"tabsChange"),y(Oe,f,"comTabsChange"),y(Re,M,"toolTabsChange"),w(x,He)&&(He=x,oe.trigger("pluginColumnsChange")),(i||Fe.length!==C.length)&&(Fe=C,ae(Fe)),Z=n.disabledAllPlugins,(s||l)&&(s&&(Me.push.apply(Me,n.log),ve=n.log[s-1].id),l&&(we.push.apply(we,n.svrLog),xe=n.svrLog[l-1].id),fe.forEach(function(e){e(Me,we)})),n.lastLogId&&(ve=n.lastLogId),n.lastSvrLogId&&(xe=n.lastSvrLogId),n=n.data;var D,S=n.frames&&n.frames.length;if(S?(T.lastFrameId=n.frames[S-1].frameId,N.push.apply(N,n.frames)):n.lastFrameId&&(T.lastFrameId=n.lastFrameId),b){var k=n.socketStatus;k?(T.closed=void 0,k.sendStatus>-1&&(D=T.sendStatus!==k.sendStatus,T.sendStatus=k.sendStatus),k.receiveStatus>-1&&(D=D||T.receiveStatus!==k.receiveStatus,T.receiveStatus=k.receiveStatus)):T.closed||(D=!0,T.closed=!0)}n.lastId&&(P=n.lastId),n.endId&&(Y=n.endId);var j=n.tunnelIps||"";if(!n.ids.length&&!n.newIds.length||be.clearNetwork){if((D||S)&&ge.forEach(function(e){e()}),Object.keys(j).length){var B;Ae.forEach(function(e){var t=j[e.id];t&&(delete e.reqPlugin,e.realIp=t,B=!0)}),B&&oe.trigger("updateUI")}}else{var z=n.newIds;if(n=n.data,Ae.forEach(function(e){var t=n[e.id];t?(v(e,t),L(e),ie.postMessage(e)):(e.lost=!0,e.endTime||ie.postMessage(e));var r=j[e.id];r&&(delete e.reqPlugin,e.realIp=r)}),z.length){var Q=a(),R=Q.disabledExcludeText?null:u(Q.excludeText),O=Q.disabledFilterText?null:u(Q.filterText);t.curNewIdList=z.filter(function(e){var t=n[e];return!t||(ie.postMessage(t),R&&p(t,R)||O&&!p(t,O))?void 0:(L(t),Ae.push(t),!0)})}pe.forEach(function(e){e(be)})}}})}H||(H=!0,e())}function N(e,t){if(e&&t){var n={};return Object.keys(e).forEach(function(r){n[t[r]||r]=e[r]}),n}}function C(e){if(e.parent===window)for(var t=document.querySelectorAll("iframe"),n=0,r=t.length;r>n;n++){var o=t[n];if(o.contentWindow===e)return o}}function I(e){if(!e)return!1;if(e.useFrames)return!0;if(e.reqError||e.resError)return!1;var t=e.res.statusCode;return/^wss?:\/\//.test(e.url)?101==t:e.inspect&&200==t}function E(e){var t=e.indexOf("&");return-1!==t&&(e=e.substring(0,t)),t=e.indexOf("!"),-1!==t&&(e=e.substring(0,t)),
77
+ "@"===e[0]&&(e="#"+e.substring(1)),e.length>32?void 0:e}function D(e,t){var n=e.lastIndexOf("&custom"+(t?"1=":"2="));if(-1!==n){if(e=e.substring(n+9),n=e.indexOf("&"),e=-1===n?e:e.substring(0,n),-1!==e.indexOf("%"))try{return decodeURIComponent(e)}catch(r){}return e}}function S(e){e.style=void 0;var n=e.rules&&e.rules.style;if(n=n&&n.list){n="&"+n.map(function(e){return e=e.value||e.matcher,e.substring(e.indexOf("://")+3)}).join("&");var r,o,i,a=n.lastIndexOf("&color=");-1!==a&&(r=E(n.substring(a+7)));var s=n.lastIndexOf("&fontStyle=");-1!==s&&(o=E(n.substring(s+11)));var l=n.lastIndexOf("&bgColor=");-1!==l&&(i=E(n.substring(l+9))),(r||o||i)&&(e.style={color:r,fontStyle:o,backgroundColor:i});var c=t.custom1Key,u=t.custom2Key;te.notEStr(c)||(e.custom1=D(n,!0)),te.notEStr(u)||(e.custom2=D(n))}}function L(e){var t=e.url,n=e.req,r=e.res;e.method=n.method;var o=e.endTime,i=o?"":"-",a=r.headers||"";e.hostIp=r.ip||i,e.clientIp=n.ip||"127.0.0.1",e.date=e.date||te.toLocaleString(new Date(e.startTime)),e.clientPort=n.port,e.serverPort=e.res.port,e.contentEncoding=(a["content-encoding"]||"")+(e.res.hasGzipError?" (Incorrect header)":"");var s=null==n.size?i:n.size,l=null==r.size?i:r.size,c=te.getDisplaySize(s,n.unzipSize),u=te.getDisplaySize(l,r.unzipSize);e.body=""===c&&""===u?"":c+", "+u,e.bodySize=(n.size||0)+(r.size||0);var d=null==r.statusCode?i:r.statusCode;if(e.result=/^[1-9]/.test(d)&&parseInt(d,10)||d,e.type=(a["content-type"]||"").split(";")[0].toLowerCase(),e.dns=e.request=e.response=e.download=e.time=i,e.dnsTime>0&&(e.dns=e.dnsTime-e.startTime+"ms",e.requestTime>0&&(e.request=e.requestTime-e.dnsTime+"ms"),e.responseTime>0&&(!e.requestTime||e.requestTime>e.responseTime?e.response=e.responseTime-e.dnsTime+"ms":e.response=e.responseTime-e.requestTime+"ms",o>0&&(e.download=o-e.responseTime+"ms",e.time=o-e.startTime+"ms"))),n._hasError=e.reqError,r._hasError=e.resError,n.rawHeaders=N(n.headers,n.rawHeaderNames),r.rawHeaders=N(r.headers,r.rawHeaderNames),r.rawTrailers=N(r.trailers,r.rawTrailerNames),S(e),e.rules&&e.pipe&&(e.rules.pipe=e.pipe),e.path)e.useH2?e.protocol="H2":"H2"===e.protocol&&(e.protocol=e.isHttps?"HTTP":te.getProtocol(t));else{e.isHttps?e.protocol=te.getTransProto(r)||te.getTransProto(n)||"HTTP":e.protocol=e.useH2?"H2":te.getProtocol(t),e.hostname=e.isHttps?"Tunnel to":te.getHost(t);var p=t.indexOf("://");-1!==p?(p=t.indexOf("/",p+3),e.path=-1===p?"/":t.substring(p)):e.path=t,e.path.length>Ne&&(e.shortPath=e.path.substring(0,Ne)+"...")}!e.useHttp||"HTTPS"!==e.protocol&&"WSS"!==e.protocol||(e.protocol=e.protocol+" > "+e.protocol.slice(0,-1)),!e.frames&&I(e)&&(e.frames=[])}function k(e){var t=e&&e.url;return t&&"string"==typeof t&&-1===t.indexOf("#")?e.isHttps?-1===t.indexOf("/")&&-1===t.indexOf("?"):Ke.test(t):!1}function j(){return Ae.length-ne.MAX_COUNT-1}function B(){return X?j()>0||t.stopRefresh?-1:P||"0":W?-2:""}function U(e){return he.length?(e=e&&e.server)?(De=0,t.setServerInfo&&t.setServerInfo(e),Q&&Q.strictMode!=e.strictMode&&(Q.strictMode=e.strictMode,oe.trigger("updateStrictMode")),Q&&Q.version==e.version&&Q.rulesMode===e.rulesMode&&Q.cmdName===e.cmdName&&Q.networkMode===e.networkMode&&Q.pluginsMode===e.pluginsMode&&Q.multiEnv===e.multiEnv&&Q.baseDir==e.baseDir&&Q.username==e.username&&Q.nodeVersion==e.nodeVersion&&Q.port==e.port&&Q.host==e.host&&Q.pid==e.pid&&Q.ipv4.sort().join()==e.ipv4.sort().join()&&Q.ipv6.sort().join()==e.ipv6.sort().join()?void(Q=e):(Q=e,void he.forEach(function(t){t(e)}))):(++De,void(De>=Se&&(Q=e,he.forEach(function(e){e(!1)})))):void(De=0)}function z(e){var t=K&&K[e];return Array.isArray(t)||(t=[]),Z?t:(Object.keys(je).forEach(function(n){var r=je[n],o=r[e];if(o){var i=n.slice(0,-1);Be[i]||o.forEach(function(e){e.title=i+" extension menu",e.mtime=r.mtime,e.priority=r.priority,e._key=n,e._urlPattern=te.toRegExp(e.urlPattern)||te.toRegExp(e.namePattern),t.push(e)})}}),t.length>1?t.sort(te.comparePlugin):t)}var Q,R,O,H,F,V,P,Y,G,W,X,_,J,q,K,Z,$=n(8),ee=n(283),te=n(204),ne=n(284),re=n(285),oe=n(208),ie=n(286),ae=ie.updateWorkers,se=ee.createCgi,le=5120,ce=5120,ue=t.MAX_FRAMES_LENGTH=256,de=2e4,pe=[],he=[],ge=[],fe=[],me=[],Ae=[],Me=[],we=[],ye=ne.setDataCenter,be=new ne(Ae),ve=-2,xe=-2,Te=1e6,Ne=1024,Ce=360,Ie=[],Ee=0,De=0,Se=4,Le=18e4,ke=1==re.get("onlyViewOwnData"),je={},Be={},Ue=[],ze=[],Qe=[],Re=[],Oe=[],He=[],Fe=[],Ve={timeout:de,xhrFields:{withCredentials:!0},data:{}};t.clientIp="127.0.0.1",t.MAX_INCLUDE_LEN=le,t.MAX_EXCLUDE_LEN=ce,t.MAX_LOG_LENGTH=Ce-20,t.changeLogId=function(e){_=e},t.getPort=function(){return J},t.setDumpCount=function(e){Ee=e>0?e:0},t.setOnlyViewOwnData=function(e){ke=e!==!1,re.set("onlyViewOwnData",ke?1:0)},t.isOnlyViewOwnData=function(){return ke},t.filterIsEnabled=function(){if(ke)return!0;var e=a();if(!(!e||e.disabledFilterText&&e.disabledExcludeText)){var t=!e.disabledFilterText&&e.filterText.trim();return t||!e.disabledExcludeText&&e.excludeText.trim()}},o(),$(window).on("hashchange",o),t.setFilterText=i,t.getFilterText=a,t.setNetworkColumns=s,t.getNetworkColumns=l;var Pe=/^(m|i|h|b|c|d|H):/,Ye={m:"method",i:"ip",h:"headers",b:"body",c:"body",d:"host",H:"host"},Ge=[],We=$.extend({type:"post"},Ve),Xe=$.extend({cache:!1},Ve),_e=ee({getData:"cgi-bin/get-data",getInitial:"cgi-bin/init"},Xe);t.createCgi=function(e,t){return se({url:e,mode:t?"cancel":null},Xe)},t.certs=ee({remove:"cgi-bin/certs/remove",upload:{url:"cgi-bin/certs/upload",contentType:"application/json"},all:{url:"cgi-bin/certs/all",type:"get"}},We),t.values=ee({recycleList:{type:"get",url:"cgi-bin/values/recycle/list"},recycleView:{type:"get",url:"cgi-bin/values/recycle/view"},recycleRemove:"cgi-bin/values/recycle/remove",moveTo:{mode:"chain",url:"cgi-bin/values/move-to"},list:{type:"get",url:"cgi-bin/values/list"},add:"cgi-bin/values/add",remove:"cgi-bin/values/remove",rename:"cgi-bin/values/rename"},We),t.plugins=ee({disablePlugin:"cgi-bin/plugins/disable-plugin",disableAllPlugins:"cgi-bin/plugins/disable-all-plugins",getRegistryList:"cgi-bin/plugins/registry-list",installPlugins:"cgi-bin/plugins/install",uninstallPlugins:"cgi-bin/plugins/uninstall"},We),t.rules=ee({disableAllRules:"cgi-bin/rules/disable-all-rules",accountRules:"cgi-bin/rules/account",recycleList:{type:"get",url:"cgi-bin/rules/recycle/list"},recycleView:{type:"get",url:"cgi-bin/rules/recycle/view"},recycleRemove:"cgi-bin/rules/recycle/remove",moveTo:{mode:"chain",url:"cgi-bin/rules/move-to"},list:{type:"get",url:"cgi-bin/rules/list"},add:"cgi-bin/rules/add",disableDefault:"cgi-bin/rules/disable-default",enableDefault:"cgi-bin/rules/enable-default",remove:"cgi-bin/rules/remove",rename:"cgi-bin/rules/rename",select:"cgi-bin/rules/select",unselect:"cgi-bin/rules/unselect",allowMultipleChoice:{mode:"ignore",url:"cgi-bin/rules/allow-multiple-choice"},enableBackRulesFirst:{mode:"ignore",url:"cgi-bin/rules/enable-back-rules-first"},setSysHosts:"cgi-bin/rules/set-sys-hosts"},We),t.log=ee({set:"cgi-bin/log/set"},We);var Je=ee({compose:"cgi-bin/composer"},$.extend({type:"post",contentType:"application/json",processData:!1},Ve)).compose;t.compose=function(e,t,n){return"string"!=typeof e&&(e=JSON.stringify(e)),Je(e,t,n)},window.compose=t.compose,$.extend(t,ee({composer:{url:"cgi-bin/composer",mode:"cancel"},compose2:"cgi-bin/composer",interceptHttpsConnects:"cgi-bin/intercept-https-connects",enableHttp2:"cgi-bin/enable-http2",abort:"cgi-bin/abort",setCustomColumn:"cgi-bin/set-custom-column",addRulesAndValues:{url:"cgi-bin/add-rules-values",contentType:"application/json"},setIPv6Only:"cgi-bin/set-ipv6-only",createTempFile:{url:"cgi-bin/sessions/create-temp-file",contentType:"application/json"},setDnsOrder:"cgi-bin/set-dns-order"},We)),$.extend(t,ee({donotShowAgain:"cgi-bin/do-not-show-again",checkUpdate:"cgi-bin/check-update",importRemote:"cgi-bin/import-remote",getHistory:"cgi-bin/history",getCookies:"cgi-bin/sessions/cookies",getTempFile:"cgi-bin/sessions/get-temp-file"},Xe)),t.socket=$.extend(ee({changeStatus:{mode:"cancel",url:"cgi-bin/socket/change-status"},abort:{mode:"ignore",url:"cgi-bin/socket/abort"},send:{mode:"ignore",url:"cgi-bin/socket/data"}},We)),t.getReqTabs=function(){return Ue},t.getResTabs=function(){return ze},t.getTabs=function(){return Qe},t.getToolTabs=function(){return Re},t.getComTabs=function(){return Oe},t.getAccount=function(){return K},t.getInitialData=function(e){if(!R){R=$.Deferred();var n=function r(){_e.getInitial(function(e){if(!e)return setTimeout(r,1e3);var n=e.server;J=n&&n.port,K=n&&n.account,g(e),t.enablePluginMgr=e.epm,t.supportH2=e.supportH2,t.backRulesFirst=e.rules.backRulesFirst,t.custom1=e.custom1,t.custom2=e.custom2,t.custom1Key=e.custom1Key,t.custom2Key=e.custom2Key,t.hasAccountRules=e.hasARules,O=e,q=e.clientId,Ve.data.clientId=q,e.lastLogId&&(ve=e.lastLogId),e.lastSvrLogId&&(xe=e.lastSvrLogId),F=e.curLogId,V=e.curSvrLogId,e.lastDataId&&(P=e.lastDataId),t.pluginsRoot=e.pluginsRoot,t.upload=ee({importSessions:"cgi-bin/sessions/import?clientId="+q,importRules:"cgi-bin/rules/import?clientId="+q,importValues:"cgi-bin/values/import?clientId="+q},$.extend({type:"post"},Ve,{contentType:!1,processData:!1,timeout:36e3})),R.resolve(e),e.clientIp&&(t.clientIp=e.clientIp)})};n()}R.done(e)};var qe=Date.now();t.getRawHeaders=N,window.getWhistlePageId=function(){return q},window.disableWhistleDarkModeIframe=function(e){var t=C(e);t&&t.setAttribute("disabledDarkMode","1")},window.enableWhistleDarkModeIframe=function(e){var t=C(e);t&&t.removeAttribute("disabledDarkMode")},t.getPageId=function(){return q},t.isFrames=I;var Ke=/^(?:https?|wss?):\/\//;t.addNetworkList=function(e){if(Array.isArray(e)&&e.length){var n,r=[];e.forEach(function(e){if(e&&e.startTime>=0&&e.req&&e.req.headers&&e.res&&k(e)){var t=e.req;delete e.active,delete e.selected,delete e.hide,delete e.order,delete t.json,delete e.res.json,delete e.data,delete e.stopRecordFrames,delete e.pauseRecordFrames,te.isString(e.fwdHost)||delete e.fwdHost,Array.isArray(e.frames)&&(e.frames=e.frames.filter(function(e){return e&&(delete e.json,delete e.data),e})),e.lost=!0,e.id=e.startTime+"-"+ ++Te,L(e),Ae.push(e),r.push(e.id),n=!0,ie.postMessage(e)}}),n&&(t.curNewIdList=r,pe.forEach(function(e){e(be)}))}},t.overflowCount=j,t.networkModal=be,t.isDiableCustomCerts=function(){return Q&&Q.dcc},t.isMutilEnv=function(){return Q&&Q.multiEnv},t.isStrictMode=function(){return Q&&Q.strictMode||!1},t.getServerInfo=function(){return Q||""},t.on=function(e,t){T(),"data"==e?"function"==typeof t&&(pe.push(t),t(be)):"serverInfo"==e?"function"==typeof t&&he.push(t):"log"==e?"function"==typeof t&&(fe.push(t),t(Me,we)):"plugins"===e||"settings"===e||"rules"===e?"function"==typeof t&&me.push(t):"framesUpdate"==e&&"function"==typeof t&&ge.push(t)},t.networkModal=be,t.stopNetworkRecord=function(e){!e&&t.pauseRefresh?be.clearNetwork=!1:be.clearNetwork=!e,t.pauseRefresh=!1,t.stopRefresh=e},t.pauseNetworkRecord=function(){be.clearNetwork=!1,t.pauseRefresh=!0,t.stopRefresh=!0},t.pauseConsoleRecord=function(){t.stopConsoleRefresh=!1,t.pauseConsoleRefresh=!0},t.stopConsoleRecord=function(e){t.pauseConsoleRefresh=!1,t.stopConsoleRefresh=e},t.pauseServerLogRecord=function(){t.stopServerLogRefresh=!1,t.pauseServerLogRefresh=!0},t.stopServerLogRecord=function(e){t.pauseServerLogRefresh=!1,t.stopServerLogRefresh=e},t.getPlugin=function(e){return Z||Be[e.slice(0,-1)]?void 0:je[e]},t.setDisabledPlugins=function(e){Be=e},t.getNetworkMenus=function(){return z("networkMenus")},t.getRulesMenus=function(){return z("rulesMenus")},t.getValuesMenus=function(){return z("valuesMenus")},t.getPluginsMenus=function(){return z("pluginsMenus")},t.getPluginColumns=function(){return He},t.getPluginRegistry=function(){var e=[];return Object.keys(je).forEach(function(t){var n=je[t].registry;n&&-1===e.indexOf(n)&&e.push(n)}),e};var Ze;t.setValuesModal=function(e){Ze=e},t.getValuesModal=function(){return Ze},t.getRulesModal=function(){return t.rulesModal},t.getDataKeys=function(){var e=[];return t.custom1Key&&e.push("custom1"),t.custom2Key&&e.push("custom2"),e.concat(Ie)},ye(t),ie.setup(be)},function(e,t,n){"use strict";function r(e,t){function n(l,c,u){var d={url:"function"==typeof e?e():e};if("function"==typeof l?(u=c,c=l,l=null):d.data=l,u=i.extend(!0,{},t,u,d),o){var p=u.mode;if("ignore"==p)return;if("cancel"==p)o.abort();else if("chain"==p)return a.push([l,c,u])}var h=function(e,t,i){o=null,c&&c.call(this,e,t,i);var s=a.shift();s&&n.apply(r,s)};return u.success=function(e,t,n){h.call(this,e,n)},u.error=function(e,t){h.call(this,!1,e,t)},d=u,s&&"string"==typeof d.url&&(d=i.extend({},d),d.url+=(-1===d.url.indexOf("?")?"?":"&")+"authorization="+s),o=i.ajax(d)}var r=this;"string"==typeof e&&(e={url:e}),t=i.extend({dataType:"json"},t,e),e=e.url;var o,a=[];return n}function o(e,t){var n={};return Object.keys(e).forEach(function(o){n[o]=r(e[o],t)}),n}var i=n(8),a=n(204),s=a.getQuery().authorization;e.exports=o,e.exports.createCgi=r},function(e,t,n){"use strict";function r(e){this.list=x(e),this.isTreeView="1"===I.get("isTreeView"),this.clearRoot()}function o(e){if(e="string"!=typeof e?"":e.trim()){var t="!"===e[0];t&&(e=e.substring(1));var n="url";if(B.test(e)&&(n=RegExp.$1.toLowerCase(),e=RegExp.$2.trim(),"!"===e[0]&&(t=!0,e=e.substring(1))),e||n)return{not:t,type:n,keyword:e.toLowerCase(),regexp:C.toRegExp(e)}}}function i(e){if(e="string"!=typeof e?"":e.trim()){var t,n=function(e){e&&(t=t||[],t.push(e))};if(U.test(e)){var r=RegExp.$1,i=RegExp.$2,a=RegExp.$3;n(o(r)),n(o(i)),n(o(a))}else n(o(e));return t}}function a(e,t){return e?t.keyword?t.regexp?t.regexp.test(e):-1!==e.toLowerCase().indexOf(t.keyword):!0:!1}function s(e,t){if(a((e.isHttps?"tunnel://":"")+e.url,t))return!0;var n=C.getRawUrl(e);return a(n,t)}function l(e,t){if(c(s(e,t),t.not))return!1;var n=T&&T.getDataKeys(),r=n&&n.length;if(r)for(var o=0;r>o;o++){var i=C.getProperty(e,n[o]);if(null!=i&&c(a(String(i),t),t.not))return!1}return!0}function c(e,t){return t?!e:e}function u(e,t){switch(t.type){case"mark":return!e.mark||l(e,t);case"c":case"content":case"b":case"body":var n=C.getBody(e.req,!0),r=C.getBody(e.res);return c(!a(n,t)&&!a(r,t),t.not);case"headers":case"h":return c(!g(e.req.headers,t)&&!g(e.res.headers,t),t.not);case"type":case"t":var o=e.res.headers;return o=o&&o["content-type"],c(!("string"==typeof o&&a(o,t)),t.not);case"ip":case"i":return c(!a(e.req.ip,t)&&!a(e.res.ip,t),t.not);case"status":case"s":case"result":case"r":var i=e.res.statusCode;return c(!a(null==i?"-":String(i),t),t.not);case"method":case"m":return c(!a(e.req.method,t),t.not);case"e":case"error":var s=e.res&&e.res.statusCode,u=e.reqError||e.resError||e.customData&&e.customData.error||s&&(!/^\d+$/.test(s)||s>=400);return!u||l(e,t);case"style":return!e.style||l(e,t);default:return l(e,t)}}function d(e){return null==e?"":e+""}function p(e,t,n,r){return e==t?0:"-"==e?1:"-"==t?-1:"asc"==n?h(e,t,r):-h(e,t,r)}function h(e,t,n){var r=null==t||""==t;if(null==e||""==e)return r?0:-1;if(r)return 1;var o=-1!=="dns,request,response,download,time".indexOf(n);if(!o&&e>t)return 1;var i="undefined"==typeof e?"undefined":N(e),a="undefined"==typeof t?"undefined":N(t);return o&&"string"===i&&"string"===a?e.replace("ms","")-t.replace("ms","")>0?1:-1:i!=a&&"number"==i?1:-1}function g(e,t){for(var n in e){if(a(n,t))return!0;var r=e[n];if("string"==typeof r&&a(r,t))return!0}return!1}function f(e,t){var n=e.children;return n?(n.forEach(function(e){f(e,t)}),t):(t[e.data.id]=1,t)}function m(e,t,n){if(t>0){var r=A(e);if(n){for(var o=0,i=e.length;t>0&&i>o;)e[o].hide?(--i,--t,e.splice(o,1)):++o;t=e.length-k-2}t>0&&e.splice(0,t),r&&-1===e.indexOf(r)&&(e[0]=r)}}function A(e){for(var t=0,n=e.length;n>t;t++){var r=e[t];if(r.active)return r}}function M(e,t){for(;e>=0;e--){var n=t[e-1];if(!n||!n.selected&&!n.active)return e}return e}function w(e,t){for(var n=t.length;n>e;e++){var r=t[e+1];if(r&&r.data&&(r=r.data),!r||!r.selected&&!r.active)return e}return e}function y(e){var t=e.indexOf("?"),n="";if(-1!==t&&(n=e.substring(t),e=e.substring(0,t)),t=e.indexOf("://"),-1===t)return["tunnel://"+e,"/"];if(t=e.indexOf("/",t+3),-1===t)return[e,"/"];var r=e.substring(t).split("/");r[0]=e.substring(0,t);var o=r.length-1;return r[o]="/"+r[o]+n,r}function b(e){var t=e.children;if(!t||e.hide)return e.hide;for(var n=!0,r=0,o=t.length;o>r;r++){var i=t[r];b(i)?i.hide=!0:(n=!1,i.hide=!1)}return e.hide=n,n}function v(e,t){for(var n=e.children,r=0,o=n.length;o>r;r++){var i=n[r];i.hide||(t.push(i),i.children&&v(i,t))}return e}function x(e,t){var n=e.length;if(n&&(t||!e[n-1].order)){var r=e[0].order||1;e.forEach(function(e,t){e.order=r+t})}return e}var T,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C=n(204),I=n(285),E=n(208),D=[500,1e3,1500,2e3,2500,3e3],S=parseInt(I.get("maxNetworkRows"),10)||1500,L=-1===D.indexOf(S)?1500:S,k=L+100,j="__whistle_"+location.href.replace(/\/[^/]*([#?].*)?$/,"/")+"__",B=/^(e|error|style|url|u|content|c|b|body|headers|h|ip|i|status|result|s|r|method|m|mark|type|t):(.*)$/i,U=/([^\s]+)(?:\s+([^\s]+)(?:\s+([\S\s]+))?)?/;r.MAX_COUNT=k,r.setMaxRows=function(e){e=parseInt(e,10),-1!==D.indexOf(e)&&(L=e,k=L+100,r.MAX_COUNT=k,I.set("maxNetworkRows",e))},r.getMaxRows=function(){return L};var z=r.prototype;z.search=function(e){return this._keyword=i(e),this.filter(),e},z.hasKeyword=function(){return this._keyword},z.setSortColumns=function(e){this._columns=e,this.filter(!1)},z.hasUnmarked=function(){for(var e=this.list,t=e.length-1;t>=0;--t)if(!e[t].mark)return!0},z.getList=function(){return this._list||this.list},z.getTreeLeafs=function(e){if(e){var t=!e.indexOf("tunnel://");t?e=e.substring(9):e+="/";var n=this.list.filter(function(n){return t?n.url===e:!n.url.indexOf(e)});return n.length?n:void 0}},z.filter=function(){var e=this,t=e.list,n=e._keyword;t.forEach(function(e){n?e.hide=u(e,n[0])||n[1]&&u(e,n[1])||n[2]&&u(e,n[2]):e.hide=!1});var r=e._columns;if(r&&r.length){var o=r.length;e._list=e.list.slice().sort(function(e,t){for(var n=0;o>n;n++){var i=r[n],a="body"===i.name,s=a?e.bodySize:C.getCellValue(e,i),l=a?t.bodySize:C.getCellValue(t,i);if(a){if(s===l)return 0;var c=s>l?1:-1;return"asc"==i.order?c:-c}i.key&&(s=d(s),l=d(l));var u=p(s,l,i.order,i.name);if(u)return u}return e.order>t.order?-1:1})}else e._list=null;return this.updateTree(),this.updateDisplayCount(),t};var Q=60;z.updateDisplayCount=function(){window.name=j+this.list.length},z.getDisplayCount=function(){var e=window.name;if("string"!=typeof e||0!==e.indexOf(j))return 0;var t=parseInt(e.substring(j.length));return t>=0&&Q>=t?t:Q},z.clear=function(){var e=this.list.length;return this.clearNetwork=!0,this.list.splice(0,e),this._list=null,this.updateTree(),this.updateDisplayCount(),e&&E.trigger("selectedSessionChange"),this},z.removeByHostList=function(e){for(var t=this.list,n=t.length-1;n>=0;--n){var r=t[n];-1!==e.indexOf(r.isHttps?r.path:r.hostname)&&t.splice(n,1)}this.update(),this.updateDisplayCount()},z.removeTreeNode=function(e,t){var n=this.getTreeNode(e);if(n){for(var r=f(n,{}),o=this.list,i=o.length-1;i>=0;--i)(t?!r[o[i].id]:r[o[i].id])&&o.splice(i,1);return this.update(),this.updateDisplayCount(),!0}},z.removeByUrlList=function(e){for(var t=this.list,n=t.length-1;n>=0;--n)-1!==e.indexOf(t[n].url.replace(/\?.*$/,"").substring(0,1024))&&t.splice(n,1);this.update(),this.updateDisplayCount()},z.removeSelectedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.selected&&!o.hide?(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1)):-1!=t&&(n.splice(r+1,t-r),t=-1)}return e?(this.update(!1,!0),!0):void 0},z.remove=function(e){var t=this.list,n=t.indexOf(e);-1!==n&&(t.splice(n,1),this.update(!1,!0))},z.removeOthers=function(e){var t=this.list,n=t.indexOf(e);-1!==n&&(t.splice(n+1,t.length-n),0!==n&&t.splice(0,n),this.update(!1,!0))},z.removeUnselectedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.selected?-1!=t&&(n.splice(r+1,t-r),t=-1):(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1))}return e?(this.update(!1,!0),!0):void 0},z.removeUnmarkedItems=function(){for(var e,t=-1,n=this.list,r=n.length-1;r>=0;r--){var o=n[r];o.mark?-1!=t&&(n.splice(r+1,t-r),t=-1):(e=!0,-1==t&&(t=r),r||n.splice(r,t-r+1))}return e?(this.update(!1,!0),!0):void 0},z.prev=function(){var e=this.getList(),t=e.length;if(t){var n,r,o=this.getActive(),i=o?e.indexOf(o):t-1;for(n=i-1;n>=0;n--)if(r=e[n],!r.hide)return r;for(n=t-1;n>i;n--)if(r=e[n],!r.hide)return r}},z.next=function(){var e=this.getList(),t=e.length;if(t){var n,r,o=this.getActive(),i=o?e.indexOf(o):0;for(n=i+1;t>n;n++)if(r=e[n],!r.hide)return r;for(n=0;i>n;n++)if(r=e[n],!r.hide)return r}},z.update=function(e,t){if(x(this.list,t),e&&!this.isTreeView){var n=Math.min(this.list.length-L,100);m(this.list,n,this.hasKeyword())}return this.filter(),!this.isTreeView&&this.list.length>L},z.hasSelected=function(){for(var e=this.list,t=0,n=e.length;n>t;t++){var r=e[t];if(!r.hide&&r.selected)return!0}return!1},z.hasUnselected=function(){for(var e=this.list,t=0,n=e.length;n>t;t++){var r=e[t];if(!r.hide&&!r.selected)return!0}return!1},z.getSelected=function(){return this.getActive()},z.getActive=function(){return A(this.list)||this.getSelectedList()[0]},z.getItem=function(e){if(e)for(var t=this.list,n=0,r=t.length;r>n;n++){var o=t[n];if(o.id===e)return o}},z.setSelected=function(e,t){e.selected=t!==!1},z.getSelectedList=function(){return this.list.filter(function(e){return!e.hide&&e.selected})},z.setSelectedList=function(e,t,n){var r=this.getList();if(this.isTreeView&&(r=this.root.list,e=this.getTreeNode(e.id),t=this.getTreeNode(t.id)),e=r.indexOf(e),t=r.indexOf(t),e>t){var o=w(e,r);e=t,t=o}else e=M(e,r);for(var i=0,a=r.length;a>i;i++){var s=r[i];s=s.data||s,i>=e&&t>=i?(s.selected=!0,n(s,!0)):s.selected=!1}},z.clearSelection=function(){this.list.forEach(function(e){e.selected=!1})},z.clearActive=function(){this.list.forEach(function(e){e.active=!1})},z.clearRoot=function(){var e={children:[],map:{},list:[]};return this.root=e,e},z.getListByPath=function(e){var t=0===e.indexOf("tunnel://");return t?e=e.substring(9):e+="/",this.list.filter(function(n){return!n.hide&&(t?n.url===e:!n.url.indexOf(e))})},z.updateTree=function(){if(!this.isTreeView)return this._updateOnTreeView=!0,this.root;this._updateOnTreeView=!1;var e=this.list,t=e.length;if(!t)return this.clearRoot();for(var n=this.root,r=this.clearRoot(),o=0;t>o;o++){for(var i,a,s=e[o],l=y(s.url),c=l.length-1,u=r,d=n,p=0;c>p;p++){var h=l[p],g=u.map[h],f=d&&d.map[h];i=p?i+"/"+h:h,g||(g={depth:p,path:i,value:h,children:[],map:{}},f&&(g.expand=f.expand,g.pExpand=f.pExpand),u.map[h]=g,u.children.push(g)),p?g.parent=u:a=g,u=g,d=f}var m={depth:c,parent:u,value:l[c],hide:s.hide,data:s};a.map[s.id]=m,u.children.push(m)}return r.children.forEach(b),v(r,r.list),r},z.setTreeView=function(e,t){e=e!==!1,this.isTreeView!==e&&(this.isTreeView=e,!t&&I.set("isTreeView",e?"1":""),e&&this._updateOnTreeView&&this.updateTree())},z.getTree=function(){return this.root},z.getTreeNode=function(e){for(var t=this.root.list,n=0,r=t.length;r>n;n++){var o=t[n];if(o.data?o.data.id===e:o.path===e)return o}},r.setDataCenter=function(e){T=e},e.exports=r},function(e,t){"use strict";function n(e){return r+"?"+e}var r=location.href.replace(/[?#].*$/,"").replace(/\/index.html$/i,"/"),o={};t.set=function(e,t){e=n(e),null==t?t="":t+="",o[e]=t;try{localStorage[e]=t}catch(r){}},t.get=function(e,t){e=n(e);try{return t?localStorage[e]:o[e]||localStorage[e]}catch(r){}return o[e]}},function(e,t,n){"use strict";function r(e){return e.endTime||e.lost}function o(e,t){"function"==typeof Object.assign?Object.assign(e,t):Object.keys(t).forEach(function(n){e[n]=t[n]})}function i(e){return e&&"string"==typeof e?e:void 0}function a(e,t){var n=e.customData||{};e.customData=n,o(n,t);var r=n.style;if(r){var a=i(r.color),s=i(r.fontStyle),l=i(r.backgroundColor||r.bgColor);(a||s||l)&&(r=e.style||{},e.style=r,r.color=r.color||a,r.fontStyle=r.fontStyle||s,r.backgroundColor=r.backgroundColor||l)}}function s(e){if(!p[e]&&window.Worker){var t=new Worker("web-worker.js?id="+e),n=function(){o&&(clearTimeout(o),o=null,l(t))},o=setTimeout(n,16e3);t.onerror=n,t.onmessage=function(n){var i=n.data;if(i===!0)return void(o&&(clearTimeout(o),o=null,u.list.forEach(function(e){r(e)&&t.postMessage(e)}),p[e]=t));if(i&&i.id&&i.data){var s=u.getItem(i.id);s&&(a(s,i.data),d.trigger("updateUIThrottle"))}}}}function l(e){e.terminate(),e.onmessage=null,e.onerror=null,e.onmessageerror=null}function c(e){var t=p[e];t&&(delete p[e],l(t))}var u,d=n(208),p={};t.updateWorkers=function(e){Object.keys(p).forEach(function(t){-1===e.indexOf(t)&&c(t)}),e.forEach(s)},t.postMessage=function(e){r(e)&&Object.keys(p).forEach(function(t){p[t].postMessage(e)})},t.setup=function(e){u=e}},function(e,t,n){"use strict";function r(e){return e&&(0==e||e>65535)}var o=n(261),i=n(208),a=n(281),s=a.getForwardRules(),l=a.getPluginRules(),c=a.getPluginNameList(),u=/^\.[\w-]+(?:[?$]|$)/,d=/^\.[^./?]+\.[^/?]/,p=/^(?:::(?:ffff:)?)?(?:(?: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)(?:\:(\d+))?$/,h=/^[\da-f]{1,4}(?::[\da-f]{1,4}){7}$/,g=/^[\da-f]{1,4}(?::[\da-f]{1,4}){0,6}$/,f=/^\[([:\da-f.]+)\](?::(\d+))?$/i,m=/^%([a-z\d_\-]+)[=.]/;i.on("updatePlugins",function(){s=a.getForwardRules(),l=a.getPluginRules(),c=a.getPluginNameList()}),o.defineMode("rules",function(){function e(e){var t;if(f.test(e)&&(e=RegExp.$1,t=RegExp.$2,r(t)))return!1;if(p.test(e))return!t&&r(RegExp.$1)?!1:!0;var n=e.indexOf("::");return-1!==n?"::"===e||-1!==e.indexOf("::",n+1)?!1:(e=e.split("::",2),e=e[0]&&e[1]?e.join(":"):e[0]||e[1],g.test(e)):h.test(e)}function t(e){return/^x?hosts?:\/\//.test(e)}function n(e){return/^head:\/\//.test(e)}function o(e){return/^weinre:\/\//.test(e)}function i(e){return/^(?:referer|auth|ua|forwardedFor|reqCookies|reqDelay|reqSpeed|reqCors|reqHeaders|method|reqType|reqCharset|reqBody|reqPrepend|reqAppend|reqReplace|reqWrite|reqWriteRaw):\/\//.test(e)}function a(e){return/^(?:resScript|resRules|responseFor|resCookies|resHeaders|trailers|replaceStatus|resDelay|resSpeed|resCors|resType|resCharset|cache|attachment|download|resBody|resPrepend|resAppend|css(?:Append|Prepend|Body)?|html(?:Append|Prepend|Body)?|js(?:Append|Prepend|Body)?|resReplace|resMerge|resWrite|resWriteRaw):\/\//.test(e)}function A(e){return/^(?:https?|wss?|tunnel):\/\//i.test(e)}function M(e){return/^[\w\.-]+:\/\//i.test(e)}function w(e){return e=e.substring(0,e.indexOf(":")),-1==s.indexOf(e)&&"status"!==e}function y(e){return e=e.substring(0,e.indexOf(":")),-1==l.indexOf(e)}function b(e){return/^\/[^/](.*)\/i?$/.test(e)||/^\$/.test(e)}function v(e){return/^(?:urlParams|params|reqMerge|urlReplace|pathReplace):\/\//.test(e)}function x(e){return/^log:\/\//.test(e)}function T(e){return/^style:\/\//.test(e)}function N(e){return/^(?:excludeFilter|filter):\/\//.test(e)}function C(e){return/^lineProps:\/\//.test(e)}function I(e){return/^(?:pipe|sniCallback):\/\//.test(e)||/^(?:plugin|whistle)\.[a-z\d_\-]+:\/\//.test(e)&&!y(e)}function E(e){return/^(?:rules?(?:File|Script)|reqScript|reqRules):\/\//.test(e)}function D(e){return/^disable:\/\//.test(e)}function S(e){return/^cipher:\/\//.test(e)}function L(e){return/^(?:ignore|skip):\/\//.test(e)}function k(e){return/^(?:includeFilter|enable):\/\//.test(e)}function j(e){return/^delete:\/\//.test(e)}function B(e){return/^headerReplace:\/\//.test(e)}function U(e){return/^x?(?:proxy|https?-proxy|http2https-proxy|https2http-proxy|internal-proxy|internal-https?-proxy):\/\//.test(e)}function z(e){return/^x?socks:\/\//.test(e)}function Q(e){return/^pac:\/\//.test(e)}function R(e){return/^[a-z]:(?:\\|\/(?!\/))/i.test(e)||/^\/[^/]/.test(e)}function O(e){return/^:\d{1,5}$/.test(e)}function H(e){if(!/^(?:\$?(?:https?:|wss?:|tunnel:)?\/\/)?([^/?]+)/.test(e))return!1;var t=RegExp.$1;return-1!==t.indexOf("*")||-1!==t.indexOf("~")||d.test(t)}function F(e){return m.test(e)&&RegExp.$1}function V(e){return/^\^/.test(e)||u.test(e)}return{token:function(r,s){if(r.eatSpace())return null;var l=r.next();if("#"==l)return r.eatWhile(function(e){return!0}),"comment";var u,d,p="!"===l,h=p?r.next():l,g="";if(r.eatWhile(function(e){return/\s/.test(e)||"#"==e?!1:"line"===h&&"`"===e?(g="keyword js-keyword",!1):(h+=e,g||"/"!=e||"/"!=u||(t(h)?g="number js-number js-type":n(h)?g="header js-head js-type":o(h)?g="atom js-weinre js-type":U(h)?g="tag js-proxy js-type":i(h)?g="variable-2 js-req js-type":a(h)?g="positive js-res js-type":v(h)?g="meta js-params js-type":x(h)?g="atom js-log js-type":T(h)?g="atom js-style js-type":I(h)?g="variable-2 js-plugin js-type":B(h)?g="variable-2 js-headerReplace js-type":N(h)?g="negative js-filter js-type":C(h)?g="negative js-line-props js-type":L(h)?g="negative js-ignore js-type":k(h)?g="atom js-enable js-type":D(h)?g="negative js-disable js-type":S(h)?g="atom js-cipher js-type":j(h)?g="negative js-delete js-type":U(h)?g="variable-2 js-proxy js-type":z(h)?g="variable-2 js-socks js-type":Q(h)?g="variable-2 js-pac js-type":E(h)?g="variable-2 js-rulesFile js-type":A(h)?(d=!0,g="string-2 js-url js-type"+("h"===h[0]?" js-http-url":"")):H(h)?g="attribute js-attribute":M(h)&&(g="builtin js-rule js-type"+(w(h)?" error-rule":""))),u=e,!0)}),h){if(g){if(d&&H(h))return"attribute js-attribute"}else{if(b(h)||V(h)||O(h))return"attribute js-attribute";var f;/^@/.test(h)?g="atom js-at js-type":(f=F(h))?(g="variable-2 js-plugin-var js-type",-1===c.indexOf(f)&&(g+=" error-rule")):H(h)?g="attribute js-attribute":e(h)?g="number js-number":/^\{.*\}$/.test(h)||/^<.*>$/.test(h)||/^\(.*\)$/.test(h)?g="builtin js-rule js-type":R(h)&&(g="builtin js-rule js-type")}return p?g+" error-rule":g||"js-http-url"}}}})},function(e,t,n){"use strict";n(190),n(289);var r=n(204),o=n(9),i=n(42),a=n(8),s=n(285),l=n(212),c=128,u=o.createClass({displayName:"FilterInput",getInitialState:function(){var e=this.props.hintKey;if(this.allHintList=[],e)try{var t=JSON.parse(s.get(e));if(Array.isArray(t)){var n={};this.allHintList=t.map(function(e){return"string"==typeof e?e.substring(0,c):null}).filter(function(e){return!e||n[e]?!1:(n[e]=1,!0)}).slice(0,c)}}catch(r){}return{hintList:[]}},componentDidMount:function(){var e=this;e.hintElem=a(i.findDOMNode(this.refs.hints)),a(document.body).on("mousedown",function(t){null===e.state.hintList||a(t.target).closest(".w-filter-con").length||e.hideHints()})},focus:function(){var e=i.findDOMNode(this.refs.input);e.select(),e.focus()},addHint:function(){var e=this.state.filterText;if(e=e&&e.trim()){var t=this.allHintList,n=t.indexOf(e);-1!==n&&t.splice(n,1),t.length>c&&t.splice(0,1),t.push(e);try{s.set(this.props.hintKey,JSON.stringify(t))}catch(r){}}},filterHints:function(e){e=e&&e.trim();var t=12;if(!e)return this.allHintList.slice(-t);var n=[],r=this.allHintList.indexOf(e);e=e.toLowerCase();for(var o=this.allHintList.length-1;o>=0;o--){var i=this.allHintList[o];if(r!==o&&-1!==i.toLowerCase().indexOf(e)&&(n.unshift(i),n.length>=t))return n}return n},onFilterChange:function(e){this.changeInput(e?e.target.value:"")},changeInput:function(e){var t=this;t.props.onChange&&t.props.onChange(e);var n=t.props.hintKey;n&&clearTimeout(t.timer),this.state.filterText=e,t.setState({hintList:this.filterHints(e)},function(){n&&(t.timer=setTimeout(this.addHint,1e4))})},onClick:function(e){this.changeInput(e.target.title),this.hideHints()},hideHints:function(){this.setState({hintList:null}),this.addHint()},showHints:function(){this.setState({hintList:this.filterHints(this.state.filterText)})},onFilterKeyDown:function(e){var t;if(27===e.keyCode){var n=this.state.hintList;null===n?this.showHints():this.hideHints()}else if(38===e.keyCode)t=this.hintElem.find(".w-active"),null===this.state.hintList&&this.showHints(),t.length&&(t.removeClass("w-active"),t=t.prev("li").addClass("w-active")),t.length||(t=this.hintElem.find("li:last"),t.addClass("w-active")),r.ensureVisible(t,this.hintElem),e.preventDefault();else if(40===e.keyCode)t=this.hintElem.find(".w-active"),null===this.state.hintList&&this.showHints(),
78
+ t.length&&(t.removeClass("w-active"),t=t.next("li").addClass("w-active")),t.length||(t=this.hintElem.find("li:first"),t.addClass("w-active")),r.ensureVisible(t,this.hintElem),e.preventDefault();else if(13===e.keyCode){t=this.hintElem.find(".w-active");var o=t.attr("title");o&&(this.changeInput(o),this.hideHints())}else(e.ctrlKey||e.metaKey)&&(68==e.keyCode?(this.clearFilterText(),e.preventDefault(),e.stopPropagation()):88==e.keyCode&&e.stopPropagation());"function"==typeof this.props.onKeyDown&&this.props.onKeyDown(e)},clear:function(){var e=this;l.confirm("Confirm to clear history?",function(t){t&&(s.set(e.props.hintKey,""),e.allHintList=[],e.hideHints())})},clearFilterText:function(){this.props.onChange&&this.props.onChange("");var e=null;document.activeElement===i.findDOMNode(this.refs.input)&&(e=this.filterHints());var t=this.state.filterText,n=this;this.setState({filterText:"",hintList:e},function(){t&&n.onFilterChange()})},render:function(){var e=this,t=e.state.filterText||"",n=e.props.hintKey,i=e.state.hintList;return o.createElement("div",{className:"w-filter-con",style:e.props.wStyle},n?o.createElement("div",{className:"w-filter-hint",style:{display:i&&i.length?"":"none"},onMouseDown:r.preventBlur},o.createElement("div",{className:"w-filter-bar"},o.createElement("a",{onClick:this.clear},o.createElement("span",{className:"glyphicon glyphicon-trash"}),"Clear history"),o.createElement("span",{onClick:e.hideHints,"aria-hidden":"true"},"×")),o.createElement("ul",{ref:"hints"},i&&i.map(function(t){return o.createElement("li",{key:t,onClick:e.onClick,title:t},t)}))):void 0,o.createElement("input",{type:"text",ref:"input",value:t,onChange:e.onFilterChange,onKeyDown:e.onFilterKeyDown,onFocus:e.showHints,onDoubleClick:e.showHints,onBlur:e.hideHints,style:{background:t.trim()?"#000":void 0},className:"w-filter-input",maxLength:c,placeholder:"Type filter text"+(this.props.placeholder||"")}),o.createElement("button",{onMouseDown:r.preventBlur,onClick:e.clearFilterText,style:{display:e.state.filterText?"block":"none"},type:"button",className:"close",title:"Ctrl[Command]+D"},o.createElement("span",{"aria-hidden":"true"},"×")))}});e.exports=u},function(e,t,n){var r=n(290);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-filter-con{position:relative}.w-filter-con .close{position:absolute;right:5px;top:5px;color:#fff;line-height:1pc;display:none}.w-filter-hint,.w-layer{background-color:#fff;border-radius:3px;box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 1pc 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05)}.w-filter-hint{margin:0 3px;bottom:35px;width:99%;padding-bottom:3px;color:rgba(0,0,0,.65);line-height:1.5;position:absolute;overflow:hidden;font-size:14px}.w-filter-hint li,.w-filter-hint ul{list-style:none;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-filter-hint li{line-height:24px;font-size:9pt;border-radius:3px;padding:0 5px}.w-filter-bar{text-align:right;height:20px;position:relative}.w-filter-bar span{line-height:18px;width:28px;text-align:center;display:inline-block;font-size:1pc;cursor:pointer}.w-filter-bar a{left:-5px;transform:scale(0.9);position:absolute;font-size:9pt}.w-filter-bar a span{font-size:9pt;width:22px}.w-filter-hint .w-active,.w-filter-hint li:hover{background-color:#f5f5f5!important}",""])},function(e,t,n){"use strict";n(190),n(292);var r=n(8),o=n(9),i=n(42),a=n(204),s=n(294),l=o.createClass({displayName:"ContextMenu",getInitialState:function(){return{}},componentDidMount:function(){var e=this;e.container=document.createElement("div"),document.body.appendChild(e.container),e.componentDidUpdate(),r(document).on("mousedown click",function(t){return r(t.target).closest(".w-context-menu").length?void("INPUT"!==t.target.nodeName&&t.preventDefault()):void e.hide()}).on("keydown",function(t){9===t.keyCode&&e.hide()}),r(window).on("resize blur",function(){e.hide()})},componentDidUpdate:function(){i.unstable_renderSubtreeIntoContainer(this,this.getDialogElement(),this.container)},preventDefault:function(e){e.preventDefault()},isVisible:function(){return this.state.visible},onClick:function(e){var t=r(e.target).closest("li");if(e.preventDefault(),!t.hasClass("w-ctx-sub-menu-list")&&!t.hasClass("w-ctx-item-disabled")){var n=this.state;!t.hasClass("w-ctx-item-multi")&&!n.radio&&this.hide();var o=t.attr("data-menu-action");this.props.onClick&&this.props.onClick(o,e,t.attr("data-parent-action"),t.attr("data-name")),(e.shiftKey||e.ctrlKey||e.metaKey)&&t.attr("data-shift-to-edit")&&this.refs.editorDialog.show({value:t.attr("data-clipboard-text")}),n.radio&&(n.list.forEach(function(e){e.selected=e.action==o}),this.setState({}))}},getDialogElement:function(){var e=this,t=e.state,n=t.list||[],r=t.radio;return o.createElement("div",{onClick:e.onClick,className:"w-context-menu "+(t.className||""),onContextMenu:e.onClick,style:{left:t.left,top:t.top,display:t.visible?"":"none"}},o.createElement("ul",{className:"w-ctx-menu-list"},n.map(function(e){var t=e.list,n=e.shiftToEdit?1:void 0,i=!t&&e.multiple;return o.createElement("li",{"data-menu-action":e.action||e.name,key:e.name,className:"w-ctx-menu-item "+(e.sep?"w-ctx-item-sep":"")+(e.disabled?" w-ctx-item-disabled":"")+(t?" w-ctx-sub-menu-list":"")+(e.copyText?" w-copy-text":""),"data-clipboard-text":e.copyText,style:{display:e.hide?"none":void 0},onClick:e.onClick},o.createElement("label",{className:"w-ctx-item-tt"+(e.selected?" w-ctx-selected":"")},r?o.createElement("span",{className:"w-ctx-checked"+(e.selected?" visible":"")},"✔️"):void 0,e.icon?o.createElement("span",{style:{marginRight:"5px"},className:"glyphicon glyphicon-"+e.icon}):null,i?o.createElement("input",{type:"checkbox",checked:e.checked}):null,e.name),t?o.createElement("span",{className:"glyphicon glyphicon-play"}):void 0,t?o.createElement("div",{className:"w-ctx-menu-gap"}):void 0,t?o.createElement("ul",{className:"w-ctx-menu-list",style:e.top>0?{top:30*-e.top-1,maxHeight:e.maxHeight}:void 0},t.map(function(t,r){return o.createElement("li",{title:t.title,"data-parent-action":e.action,"data-name":t.name,"data-menu-action":t.action||t.name,key:r,onClick:t.onClick,className:"w-ctx-menu-item "+(t.sep?"w-ctx-item-sep":"")+(t.disabled?" w-ctx-item-disabled":"")+(t.copyText?" w-copy-text":""),"data-clipboard-text":t.copyText,"data-shift-to-edit":n},o.createElement("label",{className:"w-ctx-item-tt"},t.multiple?o.createElement("input",{type:"checkbox",checked:t.checked}):null,t.name))})):void 0)})))},show:function(e){e.visible=!0,this.setState(e)},hide:function(){this.setState({visible:!1})},update:function(){this.state.visible&&this.setState({})},render:function(){return o.createElement(s,{ref:"editorDialog"})}});l.util=a,l.$=r,e.exports=l},function(e,t,n){var r=n(293);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-context-menu{position:absolute;z-index:99999999}.w-ctx-menu-list{list-style:none outside none;margin:0;padding:0;width:100%;box-sizing:border-box;border:1px solid #ccc;box-shadow:2px 2px 2px rgba(0,0,0,.15);background:#fff;min-width:110px;border-radius:4px}.w-ctx-menu-list .w-ctx-item-tt input{margin-right:5px;vertical-align:text-top}.w-ctx-menu-list .glyphicon-play{line-height:28px;font-size:10px;margin-left:10px;transform:scale(.8)}.w-ctx-menu-list label{margin:0!important;font-weight:400!important;display:block}.w-ctx-menu-list .w-ctx-selected{font-weight:700!important}.w-ctx-menu-list .w-ctx-checked{display:inline-block;width:20px;visibility:hidden}body .w-ctx-menu-list .w-ctx-menu-list{margin-left:3px;display:none;top:-1px;z-index:100000001}body .w-ctx-menu-list .w-ctx-menu-gap{position:absolute;margin-left:-2px;height:35px;top:-1px;left:100%;width:6px;display:none;z-index:100000000}.w-ctx-menu-item:hover .w-ctx-menu-gap,.w-ctx-menu-item:hover .w-ctx-menu-list{display:block}.w-ctx-menu-item:hover .w-ctx-menu-list{width:auto}.w-ctx-menu-item{display:flex;line-height:30px;padding:0 15px;justify-content:space-between;position:relative;cursor:default;white-space:nowrap}.w-ctx-menu-item:hover{background:#f1f3f4}.w-ctx-menu-item.item-disabled .w-ctx-menu-item-tt{color:#999}.w-ctx-item-sep{border-top:1px solid #ccc;margin-top:5px}.w-ctx-item-disabled{color:#999}.w-ctx-item-disabled:hover{background:#fff!important}.w-ctx-menu-item .w-ctx-menu-item-tt{margin:0}.w-ctx-menu-item .w-ctx-menu-item-des{color:#999}.w-ctx-menu-item .w-ctx-menu-list{position:absolute;left:100%;top:0}.w-ctx-menu-left .w-ctx-menu-item .w-ctx-menu-list{right:102%;left:unset}.w-ctx-menu-left .w-ctx-menu-list .w-ctx-menu-gap{left:-3px}.w-ctx-radio-list{min-width:165px}",""])},function(e,t,n){"use strict";function r(e,t){return"blank"===e?t(""):void l.getTempFile({filename:e},function(e,n){return e?void(e.em&&(u.error(e.em),e.ec)||t(e.value||"")):c.showSystemError(n)})}n(190);var o=n(9),i=n(42),a=n(295),s=n(208),l=n(282),c=n(204),u=n(209),d=11534336,p='javascript:"<style>html,body{padding:0;margin:0}</style><textarea></textarea>"',h={padding:0,border:"none",width:1040,height:600,margin:0,verticalAlign:"top"},g=o.createClass({displayName:"EditorDialog",getInitialState:function(){return{}},show:function(e){this._hideDialog=!1,this.setState(e),this.props.textEditor&&this._textarea&&(this._textarea.value=e&&e.value||""),this.refs.editorDialog.show()},hide:function(){this.refs.editorDialog.hide(),this._hideDialog=!0},onChange:function(e){this.setState({value:e.target.value})},shouldComponentUpdate:function(){return this._hideDialog===!1},componentDidMount:function(){var e=this;if(e.props.textEditor){var t=i.findDOMNode(e.refs.iframe),n=function(){var n=t.contentWindow.document.querySelector("textarea"),r=n&&n.style;e._textarea=n,r&&(r.resize="none",r.width=h.width+"px",r.height=h.height+"px",r.padding="5px",r.border="1px solid #ccc",r.borderRadius="3px",n.maxLength=d,n.placeholder="Input the text",n.onkeydown=function(t){(t.ctrlKey||t.metaKey)&&83===t.keyCode&&(t.preventDefault(),e.props.textEditor&&e.onSave())})};t.onload=n,n(),s.on("showEditorDialog",function(t,n,o){if(n.name){var i=l.valuesModal.get(n.name),a=i&&i.value||"";e._keyName=n.name,e.show({value:a,title:(i?"Modify the":"Create a")+" key `"+n.name+"` of Values",isTempFile:!1})}else{var s=o&&l.rulesModal.get(n.ruleName);if(s){var c=n.tempFile;e._tempFile=c,e._fileElem=o,e._rulesItem=s,r(c,function(t){e.show({value:t,title:"Create a temp file",isTempFile:!0})})}}})}},getValue:function(){var e=this._textarea?this._textarea.value:this.state.value;return e||""},onSave:function(){var e=this,t=e.getValue();return e.state.isTempFile?void l.createTempFile(JSON.stringify({clientId:l.getPageId(),value:t}),function(t,n){if(!t||0!==t.ec)return c.showSystemError(n);for(var r=e._fileElem,o=r.closest(".CodeMirror-line")[0],i=r.closest(".CodeMirror-code").find(".CodeMirror-line"),a=0,u=0,d=i.length;d>u;u++)if(i[u]===o){a=u;break}var p=r.text(),h=p.replace("temp/"+e._tempFile,t.filepath),g=e._rulesItem.value.split(/\r\n|\r|\n/).map(function(e,t){return t===a&&(e=e.trim().split(/\s+/).map(function(e){return e===p?h:e}).join(" ")),e}).join("\n"),f=e._rulesItem.name;l.rules.add({name:f,value:g,selected:e._rulesItem.selected?"1":""},function(t,n){t&&0===t.ec?(s.trigger("addNewRulesFile",{filename:f,data:g,update:!0}),e.hide()):c.showSystemError(n)})}):void l.values.add({name:e._keyName,value:t},function(n,r){n&&0===n.ec?(s.trigger("addNewValuesFile",{filename:e._keyName,data:t,update:!0}),e.hide()):c.showSystemError(r)})},formatValue:function(){var e=this._textarea;try{var t=e.value.trim();if("{"===t[0]||"["===t[0]){var n=JSON.stringify(JSON.parse(t),null," ");e.value!==n&&(e.value=n)}}catch(r){u.error(r.message)}},clearValue:function(){this._textarea.value=""},render:function(){var e=this.state,t=e.value,n=e.title,r=this.props.textEditor;return o.createElement(a,{ref:"editorDialog",wstyle:"w-editor-dialog"+(r?" w-big-editor-dialog":"")},o.createElement("div",{className:"modal-header"},n||"Edit the copied text",o.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},o.createElement("span",{"aria-hidden":"true"},"×"))),o.createElement("div",{className:"modal-body"},r?o.createElement("div",{className:"w-mock-inline-action"},o.createElement("a",{onClick:this.formatValue},"Format"),o.createElement("a",{onClick:this.clearValue},"Clear")):null,r?o.createElement("iframe",{ref:"iframe",src:p,style:h}):o.createElement("textarea",{onChange:this.onChange,value:t})),r?o.createElement("div",{className:"modal-footer"},o.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Cancel"),o.createElement("button",{type:"button",className:"btn btn-primary",onClick:this.onSave},"Save")):o.createElement("div",{className:"modal-footer"},o.createElement("button",{type:"button","data-dismiss":"modal",className:"btn btn-primary w-copy-text-with-tips","data-clipboard-text":e.value,disabled:!t},"Copy"),o.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close")))}});e.exports=g},function(e,t,n){"use strict";var r=window.jQuery=n(8),o=n(9),i=n(42),a=o.createClass({displayName:"Dialog",getInitialState:function(){return{}},componentDidMount:function(){var e=this;this.container=r(document.createElement("div"));var t=this.props.fullCustom?" w-custom-dialog":"";this.container.addClass("modal fade"+t+(this.props.wstyle?" "+this.props.wstyle:"")),document.body.appendChild(this.container[0]),this.componentDidUpdate(),"function"==typeof this.props.customRef&&this.props.customRef(this),"function"==typeof this.props.onClose&&this.container.on("hidden.bs.modal",this.props.onClose),"function"==typeof e.props.onShow&&this.container.on("shown.bs.modal",function(){e.props.onShow(e)})},componentDidUpdate:function(){i.unstable_renderSubtreeIntoContainer(this,this.getDialogElement(),this.container[0])},getDialogElement:function(){var e,t=this.props,n=t.wclassName;return t.width&&(e=e||{},e.width=t.width),t.fullCustom&&t.height&&(e=e||{},e.height=t.height),o.createElement("div",{style:e,className:"modal-dialog"+(n?" "+n:"")},o.createElement("div",{className:"modal-content"},this.props.children))},componentWillUnmount:function(){i.unmountComponentAtNode(this.container[0]),document.body.removeChild(this.container[0])},show:function(){this.isVisible()||this.container.modal(this.props.disableBackdrop?{show:!0,backdrop:!1}:"show")},isVisible:function(){return this.container.is(":visible")},hide:function(){this.container.modal("hide")},destroy:function(){this.hide(),this.container&&this.componentWillUnmount()},render:function(){return null}});e.exports=a},function(e,t,n){"use strict";function r(e){if(e!==s)try{document.body.removeChild(e.iframe),e.destroyed=!0,e.dialogs.forEach(function(e){e.hide(!0)}),e.dialogs=[],delete g[e.page]}catch(t){}}function o(e){try{var t=e.location.pathname.substring(1)+e.location.search,n=t.lastIndexOf("?");if(-1!==n){++n;var r=parseInt(t.substring(n),10);r>0&&(t=t.substring(n-r,n))}return g[t]}catch(o){}}function i(e){function t(t){try{"function"==typeof e.onWhistleContextMenuClick&&e.onWhistleContextMenuClick(t)}catch(n){}}var n=o(e);if(n&&!n.emit){try{var r=u(e);r.createModal=function(e){var t=c.create(e),r=t.hide;return t.hide=function(e){if(e){var o=n.dialogs.indexOf(t);-1!==o&&n.dialogs.splice(o,1)}r(e)},n.dialogs.push(t),t},e.initWhistleBridge(r)}catch(i){}n.list.forEach(t),n.emit=t,n.list=null}}function a(){var e=Object.keys(g),t=e.length;if(!(d>t)){for(var n=g[e[0]],o=1;t>o;o++){var i=g[e[o]];n.mtime>i.mtime&&(n=i)}r(n)}}var s,l=n(204),c=n(297),u=n(300),d=6,p=18e4,h=6e4,g={},f=function(){f=l.noop,setInterval(function(){var e=Date.now();Object.keys(g).forEach(function(t){var n=g[t];e-n.mtime>p&&r(n)})},h)};t.fork=function(e,t){e+="???_WHISTLE_PLUGIN_EXT_CONTEXT_MENU_"+t.port+"???";var n=s=g[e];if(n)return n.mtime=Date.now(),void(n.emit?n.emit(t):(n.list.push(t),n.list.length>10&&(n.list=n.list.slice(-10))));a(),f(),window.onPluginContextMenuReady=i;var o=document.createElement("iframe");o.style.display="none",g[e]=s=n={page:e,list:[t],mtime:Date.now(),iframe:o,dialogs:[]},document.body.appendChild(o),o.src=e+e.length,setTimeout(function(){!n.emit&&r(n)},h)}},function(e,t,n){"use strict";function r(){return++h>100&&(h=0),h}function o(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e,t,n){var r=document.createElement("div");document.body.appendChild(r),e.methods&&(window[n]=e.methods),u.render(c.createElement(d,{width:e.width,height:e.height,fullCustom:e.fullCustom,wclassName:"w-dialog-for-plguin",customRef:function(o){document.body.removeChild(r),l(o,e,n),t(o)},onClose:e.onClose,onShow:e.onShow},e.fullCustom?c.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},c.createElement("span",{"aria-hidden":"true"},"×")):c.createElement("div",{className:"modal-header"},c.createElement("h4",null),c.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},c.createElement("span",{"aria-hidden":"true"},"×"))),c.createElement("div",{className:"modal-body"}),e.fullCustom?void 0:c.createElement("div",{className:"modal-footer"},c.createElement("button",{type:"button",className:"btn btn-default","data-dismiss":"modal"},"Close"))),r)}function a(e,t){return e&&"string"==typeof e?e.replace(/\s(on[a-z]+=)"([^"]+)"/g,function(e,n,r){var o,i=r.indexOf("(");return-1===i?o="(event)":(o=r.substring(i),r=r.substring(0,i)),r=t+"['"+r+"']"+o," "+n+'"'+r+'"'}):e}function s(e,t,n){var r=e.find(".modal-content>.modal-"+n+":first");null!=t?r.html(t):(t===!1||null===t)&&r.hide()}function l(e,t,n){t=t||"";var r=t.title,o=a(t.body,n),i=a(t.footer,n),l=e.container,c=l.find(".modal-content>.modal-header:first");r&&"string"==typeof r?c.show().find("h4").html(r):(r===!1||""===r)&&c.hide(),s(l,o,"body"),s(l,i,"footer")}var c=n(9),u=n(42),d=n(295);n(298);var p="__WHISTLE_MODAL_"+Date.now()+"_"+Math.floor(1e3*Math.random())+"_",h=0;t.show=function(e){var t,n,a=e.onClose,s=p+r();return e.onClose=function(){o(s),n&&n.destroy(),n=null,"function"==typeof a&&a.call(e)},i(e,function(e){n=e,t?e.hide():e.show()},s),function(){!t&&n&&(t=!0,n.hide())}},t.create=function(e){var t,n,a=e.onClose,s=p+r();return e.onClose=function(){o(s),t&&(n&&n.destroy(),n=null),"function"==typeof a&&a.call(e)},i(e,function(e){n=e,t&&e.destroy()},s),{show:function(e){n&&(e&&e.methods&&(window[s]=e.methods),n.show(),l(n,e,s))},hide:function(e){t=e,n&&(n.container.is(":visible")?n.hide():t&&n.destroy())}}}},function(e,t,n){var r=n(299);"string"==typeof r&&(r=[[e.id,r,""]]);n(7)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,".w-dialog-for-plguin .modal-header h4{font-size:14px;font-weight:700}.w-dialog-for-plguin .modal-header{padding:5px 10px;position:relative;display:none}.w-dialog-for-plguin .modal-header button{position:absolute;top:10px;right:10px}.w-context-menu li[data-menu-action=Actions] ul,.w-context-menu li[data-menu-action=Remove] ul{top:-31px!important}",""])},function(e,t,n){"use strict";function r(e){return"string"!=typeof e&&(e.type=e.type||e.method),e}function o(e){if(e)try{for(var t=e.location.pathname.split("/"),n=t.length-1;n>=0;n--){var r=t[n];if(/^plugin\.([a-z\d_\-]+)$/.test(r)){var o=u.getPlugin(RegExp.$1+":");if(o)return o}}}catch(i){}}function i(e){var t=o(e);return{updateUI:function(){h.trigger("updateUIThrottle")},pageId:u.getPageId(),escapeHtml:d.escape,compose:u.compose,importSessions:u.importAnySessions,exportSessions:u.exportSessions,msgBox:l,qrCode:a,qrcode:a,decodeBase64:d.decodeBase64,alert:g.alert,confirm:g.confirm,getActiveSession:function(){return f.getActive()},getSelectedSessionList:function(){return f.getSelectedList()},importMockData:function(e){return d.handleImportData(e)},download:function(e){h.trigger("download",e)},showOption:function(){h.trigger("showPluginOption",t)},hideOption:function(){h.trigger("hidePluginOption",t)},setNetworkSettings:function(e){h.trigger("setNetworkSettings",e)},setComposerData:function(e){h.trigger("setComposerData",e)},copyText:d.copyText,syncData:function(e){t&&u.syncData(t,e)},syncRules:function(){t&&u.syncRules(t)},syncValues:function(){t&&u.syncValues(t)},request:function n(e,t){var n=c(r(e));return n(e.data,t)},createRequest:function(e){return c(r(e))},showModal:p.show,getServerInfo:function(){var e=u.getServerInfo();return e&&s.extend(!0,{},e)},importRules:function(e){if(e){var t=d.parseImportData(e,u.rulesModal),n=function(n){n&&(e={},t.forEach(function(t){e[t.name]=t.value}),h.trigger("uploadRules",e))};return t.hasConflict?void g.confirm("Conflict with existing content, whether to continue to overwrite them?",n):n(!0)}},importValues:function(e){if(e){var t=d.parseImportData(e,u.valuesModal,!0),n=function(n){n&&(e={},t.forEach(function(t){e[t.name]=t.value}),h.trigger("uploadValues",e))};return t.hasConflict?void g.confirm("Conflict with existing content, whether to continue to overwrite them?",n):n(!0)}}}}var a=n(301),s=n(8),l=n(209),c=n(283).createCgi,u=n(282),d=n(204),p=n(297),h=n(208),g=n(212),f=u.networkModal;e.exports=i},function(e,t,n){function r(e,t,n,r,a){var s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!o())throw new Error("Callback required as last argument");if(!c){if(1>l)throw new Error("Too few arguments provided");return 1===l?(n=t,t=r=void 0):2!==l||t.getContext||(r=n,n=t,t=void 0),new Promise(function(o,a){try{var s=i.create(n,r);o(e(s,t,r))}catch(l){a(l)}})}if(2>l)throw new Error("Too few arguments provided");2===l?(a=n,n=t,t=r=void 0):3===l&&(t.getContext&&"undefined"==typeof a?(a=r,r=void 0):(a=r,r=n,n=t,t=void 0));try{var u=i.create(n,r);a(null,e(u,t,r))}catch(d){a(d)}}var o=n(302),i=n(304),a=n(331),s=n(333);t.create=i.create,t.toCanvas=r.bind(null,a.render),t.toDataURL=r.bind(null,a.renderToDataURL),t.toString=r.bind(null,function(e,t,n){return s.render(e,n)})},function(e,t,n){"use strict";var r=n(303);e.exports=function(){return"function"==typeof r.Promise&&"function"==typeof r.Promise.prototype.then}},function(e,t){(function(t){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this}).call(t,function(){return this}())},function(e,t,n){function r(e,t){for(var n=e.size,r=M.getPositions(t),o=0;o<r.length;o++)for(var i=r[o][0],a=r[o][1],s=-1;7>=s;s++)if(!(-1>=i+s||i+s>=n))for(var l=-1;7>=l;l++)-1>=a+l||a+l>=n||(s>=0&&6>=s&&(0===l||6===l)||l>=0&&6>=l&&(0===s||6===s)||s>=2&&4>=s&&l>=2&&4>=l?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0))}function o(e){for(var t=e.size,n=8;t-8>n;n++){var r=n%2===0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}function i(e,t){for(var n=A.getPositions(t),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],a=-2;2>=a;a++)for(var s=-2;2>=s;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?e.set(o+a,i+s,!0,!0):e.set(o+a,i+s,!1,!0)}function a(e,t){for(var n,r,o,i=e.size,a=v.getEncodedBits(t),s=0;18>s;s++)n=Math.floor(s/3),r=s%3+i-8-3,o=1===(a>>s&1),e.set(n,r,o,!0),e.set(r,n,o,!0)}function s(e,t,n){var r,o,i=e.size,a=x.getEncodedBits(t,n);for(r=0;15>r;r++)o=1===(a>>r&1),6>r?e.set(r,8,o,!0):8>r?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),8>r?e.set(8,i-r-1,o,!0):9>r?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function l(e,t){for(var n=e.size,r=-1,o=n-1,i=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var l=0;2>l;l++)if(!e.isReserved(o,s-l)){var c=!1;a<t.length&&(c=1===(t[a]>>>i&1)),e.set(o,s-l,c),i--,-1===i&&(a++,i=7)}if(o+=r,0>o||o>=n){o-=r,r=-r;break}}}function c(e,t,n){var r=new f;n.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),T.getCharCountIndicator(t.mode,e)),t.write(r)});var o=h.getSymbolTotalCodewords(e),i=y.getTotalCodewordsCount(e,t),a=8*(o-i);for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var s=(a-r.getLengthInBits())/8,l=0;s>l;l++)r.put(l%2?17:236,8);return u(r,e,t)}function u(e,t,n){for(var r=h.getSymbolTotalCodewords(t),o=y.getTotalCodewordsCount(t,n),i=r-o,a=y.getBlocksCount(t,n),s=r%a,l=a-s,c=Math.floor(r/a),u=Math.floor(i/a),d=u+1,g=c-u,f=new b(g),m=0,A=new Array(a),M=new Array(a),w=0,v=new p(e.buffer),x=0;a>x;x++){var T=l>x?u:d;A[x]=v.slice(m,m+T),M[x]=f.encode(A[x]),m+=T,w=Math.max(w,T)}var N,C,I=new p(r),E=0;for(N=0;w>N;N++)for(C=0;a>C;C++)N<A[C].length&&(I[E++]=A[C][N]);for(N=0;g>N;N++)for(C=0;a>C;C++)I[E++]=M[C][N];return I}function d(e,t,n,u){var d;if(C(e))d=N.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");var p=t;if(!p){var g=N.rawSplit(e);p=v.getBestVersionForData(g,n)}d=N.fromString(e,p||40)}var f=v.getBestVersionForData(d,n);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(f>t)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else t=f;var A=c(t,n,d),M=h.getSymbolSize(t),y=new m(M);return r(y,t),o(y),i(y,t),s(y,n,0),t>=7&&a(y,t),l(y,A),u||(u=w.getBestMask(y,s.bind(null,y,n))),w.applyMask(u,y),s(y,n,u),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:u,segments:d}}var p=n(305),h=n(310),g=n(311),f=n(312),m=n(313),A=n(314),M=n(315),w=n(316),y=n(317),b=n(318),v=n(321),x=n(324),T=n(322),N=n(325),C=n(309);t.create=function(e,t){if("undefined"==typeof e||""===e)throw new Error("No input text");var n,r,o=g.M;return"undefined"!=typeof t&&(o=g.from(t.errorCorrectionLevel,g.M),n=v.from(t.version),r=w.from(t.maskPattern),t.toSJISFunc&&h.setToSJISFunction(t.toSJISFunc)),d(e,n,o,r)}},function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}function t(e,n,r){return t.TYPED_ARRAY_SUPPORT||this instanceof t?"number"==typeof e?s(this,e):m(this,e,n,r):new t(e,n,r)}function o(e){if(e>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|e}function i(e){return e!==e}function a(e,n){var r;return t.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(n),r.__proto__=t.prototype):(r=e,null===r&&(r=new t(n)),r.length=n),r}function s(e,n){var r=a(e,0>n?0:0|o(n));if(!t.TYPED_ARRAY_SUPPORT)for(var i=0;n>i;++i)r[i]=0;return r}function l(e,t){var n=0|h(t),r=a(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function c(e,t){for(var n=t.length<0?0:0|o(t.length),r=a(e,n),i=0;n>i;i+=1)r[i]=255&t[i];return r}function u(e,n,r,o){if(0>r||n.byteLength<r)throw new RangeError("'offset' is out of bounds");if(n.byteLength<r+(o||0))throw new RangeError("'length' is out of bounds");var i;return i=void 0===r&&void 0===o?new Uint8Array(n):void 0===o?new Uint8Array(n,r):new Uint8Array(n,r,o),t.TYPED_ARRAY_SUPPORT?i.__proto__=t.prototype:i=c(e,i),i}function d(e,n){if(t.isBuffer(n)){var r=0|o(n.length),s=a(e,r);return 0===s.length?s:(n.copy(s,0,0,r),s)}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||i(n.length)?a(e,0):c(e,n);if("Buffer"===n.type&&Array.isArray(n.data))return c(e,n.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function h(e){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;return 0===n?0:p(e).length}function g(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function f(e,t,n,r){return g(p(t,e.length-n),e,n,r)}function m(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?u(e,t,n,r):"string"==typeof t?l(e,t,n):d(e,t)}var A=n(309);t.TYPED_ARRAY_SUPPORT=r();var M=t.TYPED_ARRAY_SUPPORT?2147483647:1073741823;t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),t.prototype.write=function(e,t,n){void 0===t?(n=this.length,t=0):void 0===n&&"string"==typeof t?(n=this.length,t=0):isFinite(t)&&(t=0|t,n=isFinite(n)?0|n:void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return f(this,e,t,n)},t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var o;if(t.TYPED_ARRAY_SUPPORT)o=this.subarray(e,n),o.__proto__=t.prototype;else{var i=n-e;o=new t(i,void 0);for(var a=0;i>a;++a)o[a]=this[a+e]}return o},t.prototype.copy=function(e,n,r,o){if(r||(r=0),o||0===o||(o=this.length),n>=e.length&&(n=e.length),n||(n=0),o>0&&r>o&&(o=r),o===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>o)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n<o-r&&(o=e.length-n+r);var i,a=o-r;if(this===e&&n>r&&o>n)for(i=a-1;i>=0;--i)e[i+n]=this[i+r];else if(1e3>a||!t.TYPED_ARRAY_SUPPORT)for(i=0;a>i;++i)e[i+n]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),n);return a},t.prototype.fill=function(e,n,r){if("string"==typeof e){if("string"==typeof n?(n=0,r=this.length):"string"==typeof r&&(r=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}}else"number"==typeof e&&(e=255&e);if(0>n||this.length<n||this.length<r)throw new RangeError("Out of range index");if(n>=r)return this;n>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=n;r>i;++i)this[i]=e;else{var a=t.isBuffer(e)?e:new t(e),s=a.length;for(i=0;r-n>i;++i)this[i+n]=a[i%s]}return this},t.concat=function(e,n){if(!A(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a(null,0);var r;if(void 0===n)for(n=0,r=0;r<e.length;++r)n+=e[r].length;var o=s(null,n),i=0;for(r=0;r<e.length;++r){var l=e[r];if(!t.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,i),i+=l.length}return o},t.byteLength=h,t.prototype._isBuffer=!0,t.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.exports=t}).call(t,n(306).Buffer)},function(e,t,n){(function(e,r){/*!
79
79
  * The buffer module from node.js, for the browser.
80
80
  *
81
81
  * @author Feross Aboukhadijeh <http://feross.org>
@@ -19,10 +19,6 @@ function unzipBody(options, body, callback) {
19
19
  return zlib.unzip(getZipType(options), body, callback);
20
20
  }
21
21
 
22
- function getChunkLen(chunk) {
23
- return (chunk && chunk.length) || 0;
24
- }
25
-
26
22
  function checkType(res) {
27
23
  if (!config.strict) {
28
24
  return true;
@@ -196,7 +192,10 @@ function emitDataEvents(req, res, proxy) {
196
192
  return write.apply(this, arguments);
197
193
  };
198
194
  stream.end = function (chunk) {
199
- reqData.size += getChunkLen(chunk);
195
+ if (chunk) {
196
+ reqData.size += chunk.length;
197
+ reqBody = reqBody ? Buffer.concat([reqBody, chunk]) : chunk;
198
+ }
200
199
  requestTime = Date.now();
201
200
  if (useFrames) {
202
201
  reqBody = '';
@@ -260,7 +259,10 @@ function emitDataEvents(req, res, proxy) {
260
259
  return write.apply(this, arguments);
261
260
  };
262
261
  stream.end = function (chunk) {
263
- resData.size += getChunkLen(chunk);
262
+ if (chunk) {
263
+ resData.size += chunk.length;
264
+ resBody = resBody ? Buffer.concat([resBody, chunk]) : chunk;
265
+ }
264
266
  endTime = Date.now();
265
267
  delete data.abort;
266
268
  if (useFrames) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "whistle",
3
3
  "description": "HTTP, HTTP2, HTTPS, Websocket debugging proxy",
4
- "version": "2.9.85-beta",
4
+ "version": "2.9.85",
5
5
  "dataDirname": ".whistle",
6
6
  "localUIHost": "local.whistlejs.com",
7
7
  "port": 8899,