You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-mitmproxy/addon/web/client/build/static/js/main.ecc665a4.chunk.js

2 lines
23 KiB
JavaScript

3 years ago
(this["webpackJsonpmitmproxy-client"]=this["webpackJsonpmitmproxy-client"]||[]).push([[0],{52:function(e,t,s){},58:function(e,t,s){"use strict";s.r(t);var n,i=s(0),r=s.n(i),o=s(20),a=s.n(o),c=(s(51),s(8)),l=s(9),h=s(17),d=s(16),u=s(45),p=s(7),j=s(10),b=s(41),f=s.n(b),v=(s(52),s(21)),O=s(18),y=s(12),w=s(33),x=s(23),S=s(1),m=function(e){Object(h.a)(s,e);var t=Object(d.a)(s);function s(e){var n;return Object(c.a)(this,s),(n=t.call(this,e)).state={show:!1,rule:{method:"ALL",url:"",action:1},haveRules:!1},n.handleClose=n.handleClose.bind(Object(O.a)(n)),n.handleShow=n.handleShow.bind(Object(O.a)(n)),n.handleSave=n.handleSave.bind(Object(O.a)(n)),n}return Object(l.a)(s,[{key:"handleClose",value:function(){this.setState({show:!1})}},{key:"handleShow",value:function(){this.setState({show:!0})}},{key:"handleSave",value:function(){var e=this.state.rule,t=[];e.url&&t.push({method:"ALL"===e.method?"":e.method,url:e.url,action:e.action}),this.props.onSave(t),this.handleClose(),this.setState({haveRules:!!t.length})}},{key:"render",value:function(){var e=this,t=this.state,s=t.rule,n=t.haveRules?"success":"primary";return Object(S.jsxs)("div",{children:[Object(S.jsx)(j.a,{variant:n,size:"sm",onClick:this.handleShow,children:"BreakPoint"}),Object(S.jsxs)(y.a,{show:this.state.show,onHide:this.handleClose,children:[Object(S.jsx)(y.a.Header,{closeButton:!0,children:Object(S.jsx)(y.a.Title,{children:"Set BreakPoint"})}),Object(S.jsxs)(y.a.Body,{children:[Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"Method"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsxs)(p.a.Control,{as:"select",value:s.method,onChange:function(t){e.setState({rule:Object(v.a)(Object(v.a)({},s),{},{method:t.target.value})})},children:[Object(S.jsx)("option",{children:"ALL"}),Object(S.jsx)("option",{children:"GET"}),Object(S.jsx)("option",{children:"POST"}),Object(S.jsx)("option",{children:"PUT"}),Object(S.jsx)("option",{children:"DELETE"})]})})]}),Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"URL"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsx)(p.a.Control,{value:s.url,onChange:function(t){e.setState({rule:Object(v.a)(Object(v.a)({},s),{},{url:t.target.value})})}})})]}),Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"Action"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsxs)(p.a.Control,{as:"select",value:s.action,onChange:function(t){e.setState({rule:Object(v.a)(Object(v.a)({},s),{},{action:parseInt(t.target.value)})})},children:[Object(S.jsx)("option",{value:"1",children:"Request"}),Object(S.jsx)("option",{value:"2",children:"Response"}),Object(S.jsx)("option",{value:"3",children:"Both"})]})})]})]}),Object(S.jsxs)(y.a.Footer,{children:[Object(S.jsx)(j.a,{variant:"secondary",onClick:this.handleClose,children:"Close"}),Object(S.jsx)(j.a,{variant:"primary",onClick:this.handleSave,children:"Save"})]})]})]})}}]),s}(r.a.Component),E=function(e){return!!e&&(!!e.header&&(!!e.header["Content-Type"]&&/text|javascript|json|x-www-form-urlencoded|xml/.test(e.header["Content-Type"].join(""))))},R=function(e){return e?isNaN(e)||e<=0?"0":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB"):"0"},g=function(e){for(var t="",s=new Uint8Array(e),n=s.byteLength,i=0;i<n;i++)t+=String.fromCharCode(s[i]);return btoa(t)},T=function(e){Object(h.a)(s,e);var t=Object(d.a)(s);function s(){return Object(c.a)(this,s),t.apply(this,arguments)}return Object(l.a)(s,[{key:"shouldComponentUpdate",value:function(e){return e.isSelected!==this.props.isSelected||!function(e,t){if(e===t)return!0;var s=Object.keys(e),n=Object.keys(t);if(s.length!==n.length)return!1;for(var i=0;i<s.length;i++){var r=s[i];if(void 0===t[r]||e[r]!==t[r])return!1}return!0}(e.flow,this.props.flow)}},{key:"render",value:function(){var e=this,t=this.props.flow,s=[];return this.props.isSelected&&s.push("tr-selected"),t.waitIntercept&&s.push("tr-wait-intercept"),Object(S.jsxs)("tr",{className:s.length?s.join(" "):void 0,onClick:function(){e.pr
//# sourceMappingURL=main.ecc665a4.chunk.js.map