You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fms/plugin/popup/_next/static/chunks/pages/index-e05dda18f04fa62a.js

1 line
19 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(3238)}])},3238:function(e,t,s){"use strict";s.r(t),s.d(t,{TabEnum:function(){return u},default:function(){return eW}});var n,a,l,r,i,o,c,u,d=s(5893),m=s(9008),h=s.n(m),p=s(1502),x=s.n(p),j=s(7294),g=s(4148),y=s(5405),Z=s(4945),b=s(9602),f=s(6865),P=s(8037),k=s(2141),C=s(3257),v=s(2810),w=s(6851),S=s(7758),T=s(3845),_=s(3340),E=s(7357),A=s(8456),O=s(447),R=s(2474),I=s(2882),N=s(7906),U=s(3184),L=s(3816),F=s(3252),K=s(295),H=s(1458),M=s(3946),D=s(8896),G=s(3321),B=s(657),V=s(1425),W=s(6514),z=s(7645),J=s(7632);function X(e){let{open:t,title:s,agreeCallback:n,modifyCallback:a,closeCallback:l,children:r}=e,i=(0,J.Z)();return(0,d.jsxs)(B.Z,{open:t,onClose:l,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,d.jsx)(z.Z,{children:s}),(0,d.jsx)(W.Z,{children:r}),(0,d.jsxs)(V.Z,{children:[n&&(0,d.jsx)(G.Z,{onClick:()=>n(i),autoFocus:!0,children:"Agree"}),a&&(0,d.jsx)(G.Z,{onClick:a,children:"Modify"}),l&&(0,d.jsx)(G.Z,{onClick:l,children:"Disagree"})]})]})}(n=i||(i={})).Wait="wait",n.Running="running",n.Cancelled="cancelled",n.Error="error",n.Success="success";let q=j.createContext({}),Q=q.Provider;function Y(e){let{optionList:t,setOptionList:s}=(0,j.useContext)(q),n=n=>{let a={...t};a[e.name]=n.target.value,s(a)};return(0,d.jsxs)("span",{children:[e.shortcut?"-":"--",e.acceptValue?"":e.shortcut||e.name,e.acceptValue&&(0,d.jsx)(R.Z,{label:e.shortcut||e.name,onInput:n,size:"small",variant:"outlined"}),"\xa0"]})}var $=s(5201),ee=s(7709),et=s(9840),es=s(5071),en=s(9334);function ea(e){let{optionList:t}=e,{optionList:s,setOptionList:n}=(0,j.useContext)(q),[a,l]=(0,j.useState)([]),[r,i]=(0,j.useState)(Object.keys(s)||[]);if((0,j.useEffect)(()=>{let e=[];t.forEach((t,s,n)=>{r.find(e=>e===t.name)&&e.push(t)}),l(e);let s={};t.forEach((e,t,n)=>{r.find(t=>t===e.name)&&(s[e.name]=!e.acceptValue||"")}),n(s)},[r]),!t.length)return(0,d.jsx)(d.Fragment,{});let o=e=>{let{target:{value:t}}=e;i("string"==typeof t?t.split(","):t)};return(0,d.jsxs)(d.Fragment,{children:[t.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)($.Z,{value:r,label:"Options",multiple:!0,displayEmpty:!0,onChange:o,input:(0,d.jsx)(ee.Z,{}),renderValue:e=>"Options",size:"small",children:t.map((e,t)=>(0,d.jsxs)(et.Z,{value:e.name,children:[(0,d.jsx)(es.Z,{checked:r.indexOf(e.name)>-1}),(0,d.jsx)(en.Z,{primary:e.name})]},t))}),"\xa0"]}),a.map((e,t)=>(0,d.jsx)(Y,{...e},t))]})}function el(e){let{argumentList:t,setArgumentList:s}=(0,j.useContext)(q),[n,a]=(0,j.useState)(t[e.name]||"");(0,j.useEffect)(()=>{let a={...t};a[e.name]=n,s(a)},[n]);let l=e=>{a(e.target.value)};return(0,d.jsxs)("span",{children:[(0,d.jsx)(R.Z,{onInput:l,label:e.name,value:n,size:"small",variant:"outlined"}),"\xa0"]})}function er(e){let{argumentList:t}=e,{argumentList:s}=(0,j.useContext)(q),[n,a]=(0,j.useState)(t);return((0,j.useEffect)(()=>{let e=[];for(let n of t)if(e.push(n),!s[n.name])break;a(e)},[s]),t.length)?(0,d.jsxs)(d.Fragment,{children:["--\xa0",n.map((e,t)=>(0,d.jsx)(el,{...e},t))]}):(0,d.jsx)(d.Fragment,{})}function ei(e){let{command:t,callback:s,optionsParams:n,argumentsParams:a}=e,[l,r]=(0,j.useState)(n||{}),[i,o]=(0,j.useState)(a||{});return(0,j.useEffect)(()=>{s&&s(t.name,l,i)},[l,i]),(0,d.jsx)(Q,{value:{optionList:l,setOptionList:r,argumentList:i,setArgumentList:o},children:(0,d.jsx)("div",{children:(0,d.jsxs)("div",{title:t.description,children:[(0,d.jsx)(ea,{optionList:t.options}),(0,d.jsx)(er,{argumentList:t.arguments})]})})})}var eo=s(6886);(a=o||(o={})).GET="GET",a.POST="POST",a.PUT="PUT",a.PATCH="PATCH";let ec=e=>o.GET===e;class eu{}class ed{debouncing(e){return this.grabContext().debouncing=e,this}useMemory(e){let t=this.grabContext();return t.useMemory=!0,t.memoryKey=e,this}async send(e,t){var s;if(null===this.baseUrl)throw Error("Base url not defined!");let n=this.context;if(this.context=null,null==n?void 0:n.useMemory){let a=(null==n?void 0:n.memoryKey)||e.url;if(void 0!==this.memor