"use strict";(self.webpackChunkweb_toolbox=self.webpackChunkweb_toolbox||[]).push([[774],{32376:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(9950),o=a(69935),l=a(10226),r=a(67243),c=a.n(r),s=a(77671);const i=e=>{let{data:t,isDisabled:a,hoverMessage:r,feedbackMessage:i,Icon:d=o.A,...m}=e;const{setToasterState:u}=(0,s.dq)();return n.createElement(l.A,Object.assign({disabled:!t||a,title:null!==r&&void 0!==r?r:"Copy to clipboard",variant:"contained","data-testid":"copy-to-clipboard",color:"primary"},m,{onClick:()=>{if(!t)return;const e=null!==i&&void 0!==i?i:"Content copied into clipboard: ".concat(t.substring(0,25)," \u2026");c()(t,{format:"text/plain"}),u({open:!0,message:e,type:"success",autoHideDuration:2e3})}}),n.createElement(d,null))}},50057:(e,t,a)=>{a.d(t,{n:()=>s});var n=a(9950),o=a(25131),l=a(72772),r=a(73931);const c=(0,o.A)((e=>({root:{margin:e.spacing(1)}}))),s=e=>{let{title:t,iconType:a,children:o}=e;const s=c();return n.createElement(n.Fragment,null,n.createElement(l.m,{titleTemplate:"Web Toolbox - %s",defaultTitle:"Web Toolbox",title:t}),n.createElement("div",{className:s.root},n.createElement(r.A,{iconType:a,title:t}),o))}},73931:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9950),o=a(82053);const l=(0,a(25131).A)((e=>({title:{wordBreak:"break-word"},titleWithIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:e.spacing(1)},icon:{height:"40px",width:"40px",marginRight:e.spacing(1)}}))),r=e=>{let{title:t,iconType:a}=e;const r=l();return n.createElement("div",{className:r.titleWithIcon},n.createElement(a,{className:r.icon}),n.createElement(o.A,{variant:"h5",className:r.title},t))}},11029:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9950),o=a(8145);const l=(0,a(25131).A)((()=>({result:{fontFamily:"monospace",height:"auto"}}))),r=e=>{let{label:t,testID:a,result:r,rows:c=10,maxRows:s=15}=e;const i=l();return n.createElement(o.A,{multiline:!0,"data-testid":a,minRows:c,maxRows:s,label:t,variant:"outlined",margin:"normal",fullWidth:!0,value:r,InputProps:{classes:{input:i.result}}})}},72393:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C,mapDispatchToProps:()=>x,mapStateToProps:()=>g});var n=a(9950),o=a(7626),l=a(80529),r=a(68244),c=a(8145),s=a(83239),i=a(10226),d=a(16491),m=a(25131),u=a(10300),p=a(33602),h=a(32376),A=a(50057),v=a(11029),f=a(1810);function b(e,t){return e?t?decodeURIComponent(e):encodeURIComponent(e):""}const E=(0,m.A)((()=>({toolbar:{margin:0,padding:0}})));function g(e){return{inputText:e.textInputs.lastUrlEncoderValue}}function x(e){return{storeInputText:(t,a)=>e((0,p.s)(t,a))}}const C=(0,u.Ng)(g,x)((e=>{let{inputText:t,storeInputText:a}=e;const m=E(),u=(0,f.Pb)("md"),[p,g]=n.useState(b(t,!1));return n.createElement(A.n,{iconType:l.A,title:"URL Encoder / decoder"},n.createElement(c.A,{autoFocus:u,label:"Content to encode/decode",placeholder:"Paste or type the content here",multiline:!0,minRows:4,maxRows:u?20:4,variant:"outlined",margin:"normal",fullWidth:!0,value:t,onChange:e=>{const t=e.target.value;a("lastUrlEncoderValue",t),t||g("")}}),n.createElement(s.A,{className:m.toolbar},n.createElement(i.A,{variant:"contained","data-testid":"switch-content-action",component:"span",color:"primary",disabled:!p,onClick:()=>{a("lastUrlEncoderValue",p),g("")},title:"Switch data content"},n.createElement(r.A,null)),n.createElement(d.A,{component:"div",flexGrow:1}),n.createElement(h.A,{data:p,sx:{mr:1}}),n.createElement(i.A,{sx:{mr:1},variant:"contained",endIcon:n.createElement(o.A,null),title:"Encode the content",color:"primary",disabled:!t,onClick:()=>g(b(t,!1))},"Enc."),n.createElement(i.A,{variant:"contained",endIcon:n.createElement(l.A,null),title:"Decode the content",color:"primary",disabled:!t,onClick:()=>g(b(t,!0))},"Dec.")),n.createElement(v.A,{testID:"parsed-result",label:"Result",result:p}))}))},7626:(e,t,a)=>{var n=a(24994);t.A=void 0;var o=n(a(79526)),l=a(44414);t.A=(0,o.default)((0,l.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code")},80529:(e,t,a)=>{var n=a(24994);t.A=void 0;var o=n(a(79526)),l=a(44414);t.A=(0,o.default)((0,l.jsx)("path",{d:"m19.17 12-4.58-4.59L16 6l6 6-3.59 3.59L17 14.17zM1.39 4.22l4.19 4.19L2 12l6 6 1.41-1.41L4.83 12 7 9.83l12.78 12.78 1.41-1.41L2.81 2.81z"}),"CodeOff")},68244:(e,t,a)=>{var n=a(24994);t.A=void 0;var o=n(a(79526)),l=a(44414);t.A=(0,o.default)((0,l.jsx)("path",{d:"M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z"}),"ImportExport")},16491:(e,t,a)=>{a.d(t,{A:()=>E});var n=a(58168),o=a(98587),l=a(9950),r=a(72004),c=a(10116),s=a(70505),i=a(80237),d=a(7148),m=a(44414);const u=["className","component"];var p=a(41681),h=a(58258),A=a(67550);const v=(0,a(80863).A)("MuiBox",["root"]),f=(0,h.A)(),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:a,defaultClassName:p="MuiBox-root",generateClassName:h}=e,A=(0,c.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.A);return l.forwardRef((function(e,l){const c=(0,d.A)(a),s=(0,i.A)(e),{className:v,component:f="div"}=s,b=(0,o.A)(s,u);return(0,m.jsx)(A,(0,n.A)({as:f,ref:l,className:(0,r.A)(v,h?h(p):p),theme:t&&c[t]||c},b))}))}({themeId:A.A,defaultTheme:f,defaultClassName:v.root,generateClassName:p.A.generate}),E=b}}]);