(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[808],{4173:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage-element",function(){return t(8938)}])},4594:function(e,n,t){"use strict";var r=t(5893),o=t(6514),i=t(5113),a=t(4656),u=t(482),c=t(2994),s=t(7357),l=t(9890),d=t(7169),f=t(1363),p=t(6284);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function h(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var b=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,y=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==y&&void 0!==y?y:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},k=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(l.Z,h({PaperComponent:b},j,{componentsProps:x,renderInput:w,sx:k})),(0,r.jsx)(f.Z,h({},i))]})}},4629:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(7294),a=t(4188),u=t(4825),c=t(4690),s=t(7504),l=t(4069),d=t(7869),f=t(6284),p=t(2152),m=t(2027),h=t(8859),v=t(2749);function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||k(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){if(e){if("string"===typeof e)return b(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}var O={width:"100%"},I="gate-input",P="".concat(I,"-credential-id"),Z="".concat(I,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,b,y=e.formContainer,k=void 0===y||y,I=e.gridProps,A=void 0===I?{}:I,F=A.columns,M=void 0===F?{xs:1,sm:2}:F,T=(A.layout,A.spacing),C=void 0===T?"1em":T,U=e.identifierId,N=void 0===U?P:U,E=e.identifierInputTestBatchBuilder,R=void 0===E?m.Gn:E,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,q=void 0===D?{}:D,L=q.formControlProps,_=void 0===L?{}:L,H=q.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,Y=e.passphraseOutlinedInputWithLabelProps,J=void 0===Y?{}:Y,K=J.formControlProps,X=void 0===K?{}:K,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?k:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),se=X.sx,le=j(X,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],be=(0,h.Z)([P,Z],pe),ye=be.buildFinishInputTestBatchFunction,ge=be.buildInputFirstRenderFunction,je=be.buildInputUnmountFunction,xe=be.isFormInvalid,we=be.setMessage,ke=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},l=t(7504),d=t(1770),f=t(8750),p=t(2029),m=t(7357),h=t(4594),v=t(1496),b=t(4386),y=t(4188),g=t(4690),j=t(4069),x=t(6284),w=t(3679),k=t(2519),O=t(480),I=t(2852),P=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tN(n,1)[0]?1:-1})).reduce((function(e,o){var a=N(o,2),u=a[0],c=a[1],s=c.content_type,l=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var y,g,j=e.optional,x=e.required,w=null!==(y=D[s])&&void 0!==y?y:D.string,k=q(n,u),O=null!==(g=f[k])&&void 0!==g?g:l,I="1"===String(v),P=/passw/i.test(u),S=w({formUtils:i,id:k,isChecked:E.includes(O),isRequired:I,isSensitive:P,label:u,selectOptions:h,value:O}),A=(0,r.jsx)(b.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(L,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:y,label:k,name:y,value:u}),inputTestBatch:(0,T.Gn)(k,(function(){d(y)}),{onFinishBatch:s(y)},(function(e){d(y,{children:e})})),onFirstRender:l(y),required:!0},"".concat(y,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(L,{children:h})})]})}return e}),[s,l,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),l(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:s})}),[d,s,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===s||void 0===s?void 0:s.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===s||void 0===s?void 0:s.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==s)}),[s,u,i]),(0,r.jsx)(r.Fragment,{children:v})},Y=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,s=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:s})},K=t(2545),X=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?ln(a)?"":void 0:u,s=e.networkNumber,l=void 0===s?b(a)+1:s;return{network:{networkGateway:c,networkMinIp:t,networkNumber:l,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[b]),w=(0,a.useCallback)((function(e,n){return f((0,Ke.ZP)(e,n))}),[f]),k=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,s=t.reduce((function(e,n){var t=tn(n,2),i=t[0],s=t[1],l=s.networkNumber,d=s.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?l=c:d===o&&(l-=1),e[i]=nn({},s,{networkNumber:l,networkType:d})):e[i]=s,e}),{});f(s)}),[t,v,f]),O=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),I=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,s=a.networkNumber,l=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===s,m=ln(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:s,networkType:d,networkTypeOptions:y,onClose:O,onNetworkTypeChange:k,previous:{gateway:u,minIp:c,subnetMask:l},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,y,O,k]);return(0,r.jsx)(l.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},I,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,T.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,T.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:s}),inputTestBatch:(0,T.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,s=u.networkConfig,l=void 0===s?{}:s,d=fn(e.previous,["hostConfig","networkConfig"]),f=l.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],b=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(Le,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:b,previous:l,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:b,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return bt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,s=e.radioItems,l=e.radioProps,d=(void 0===l?{}:l).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(s).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,s="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(O.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(yt({},"&.".concat(pt.Z.root),{color:P.s7}),d)})),value:c,label:s},t),"".concat(i,"-").concat(o))}))}),[t,i,s,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},kt=t(3144);function Ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Vt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||Gt(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e){return function(e){if(Array.isArray(e))return qt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(e,n){if(e){if("string"===typeof e)return qt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qt(e,n):void 0}}var zt="prepare-network-host-name-input",Wt="prepare-network-netconf-input-group",Qt="Host name",Yt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var rr=function(e){var n=e.label,t=tr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return sr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return sr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pr="1.8em",mr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=dr(e,["orientation","variant"]),s=(0,ir.Z)(),l=(0,a.useCallback)((function(e){return s.breakpoints.up(e)}),[s]),d=(0,ar.Z)(l("xs")),f=(0,ar.Z)(l("sm")),p=(0,ar.Z)(l("md")),m=(0,ar.Z)(l("lg")),h=(0,ar.Z)(l("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),b=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=fr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ur.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t