Changeset 3187966
- Timestamp:
- 11/13/2024 06:07:15 PM (17 months ago)
- Location:
- surferseo
- Files:
-
- 117 added
- 1 deleted
- 15 edited
-
tags/1.6.0.523 (added)
-
tags/1.6.0.523/assets (added)
-
tags/1.6.0.523/assets/css (added)
-
tags/1.6.0.523/assets/css/admin.css (added)
-
tags/1.6.0.523/assets/css/components.css (added)
-
tags/1.6.0.523/assets/css/surfer-elementor-integration.css (added)
-
tags/1.6.0.523/assets/css/surfer-sidebar.css (added)
-
tags/1.6.0.523/assets/css/surferseo.css (added)
-
tags/1.6.0.523/assets/fonts (added)
-
tags/1.6.0.523/assets/fonts/Inter-Black.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-Black.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-BlackItalic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-BlackItalic.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-Bold.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-Bold.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-BoldItalic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-BoldItalic.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-ExtraBold.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-ExtraBold.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-ExtraBoldItalic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-ExtraBoldItalic.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-Italic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-Italic.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-Medium.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-Medium.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-MediumItalic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-MediumItalic.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-Regular.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-Regular.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-SemiBold.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-SemiBold.woff2 (added)
-
tags/1.6.0.523/assets/fonts/Inter-SemiBoldItalic.woff (added)
-
tags/1.6.0.523/assets/fonts/Inter-SemiBoldItalic.woff2 (added)
-
tags/1.6.0.523/assets/images (added)
-
tags/1.6.0.523/assets/images/admin_menu_logo.svg (added)
-
tags/1.6.0.523/assets/images/emails (added)
-
tags/1.6.0.523/assets/images/emails/cursor-arrow-rays.png (added)
-
tags/1.6.0.523/assets/images/emails/eye.png (added)
-
tags/1.6.0.523/assets/images/emails/surfer_logo.png (added)
-
tags/1.6.0.523/assets/images/sad_surfy.svg (added)
-
tags/1.6.0.523/assets/images/surfer_logo.svg (added)
-
tags/1.6.0.523/assets/js (added)
-
tags/1.6.0.523/assets/js/surfer-analytics.js (added)
-
tags/1.6.0.523/assets/js/surfer-connector.js (added)
-
tags/1.6.0.523/assets/js/surfer-general.js (added)
-
tags/1.6.0.523/assets/js/surfer-general.js.LICENSE.txt (added)
-
tags/1.6.0.523/assets/js/surfer-gsc-checker.js (added)
-
tags/1.6.0.523/assets/js/surfer-guidelines-debug.js (added)
-
tags/1.6.0.523/assets/mix-manifest.json (added)
-
tags/1.6.0.523/includes (added)
-
tags/1.6.0.523/includes/admin (added)
-
tags/1.6.0.523/includes/admin/class-surfer-admin.php (added)
-
tags/1.6.0.523/includes/admin/class-surfer-settings.php (added)
-
tags/1.6.0.523/includes/class-autoloader.php (added)
-
tags/1.6.0.523/includes/class-seo-manager.php (added)
-
tags/1.6.0.523/includes/class-surfer-installer.php (added)
-
tags/1.6.0.523/includes/class-surferseo.php (added)
-
tags/1.6.0.523/includes/forms (added)
-
tags/1.6.0.523/includes/forms/class-surfer-form-config-ci.php (added)
-
tags/1.6.0.523/includes/forms/class-surfer-form.php (added)
-
tags/1.6.0.523/includes/forms/fields (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-checkbox.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-header.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-hidden.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-label.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-multichoice.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-select.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-text.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element-textarea.php (added)
-
tags/1.6.0.523/includes/forms/fields/class-surfer-form-element.php (added)
-
tags/1.6.0.523/includes/forms/validators (added)
-
tags/1.6.0.523/includes/forms/validators/class-validator-is-required.php (added)
-
tags/1.6.0.523/includes/forms/validators/interface-surfer-validator.php (added)
-
tags/1.6.0.523/includes/functions.php (added)
-
tags/1.6.0.523/includes/surfer (added)
-
tags/1.6.0.523/includes/surfer/class-content-exporter.php (added)
-
tags/1.6.0.523/includes/surfer/class-content-importer.php (added)
-
tags/1.6.0.523/includes/surfer/class-json-schema.php (added)
-
tags/1.6.0.523/includes/surfer/class-keyword-surfer.php (added)
-
tags/1.6.0.523/includes/surfer/class-surfer-general-endpoints.php (added)
-
tags/1.6.0.523/includes/surfer/class-surfer-gsc.php (added)
-
tags/1.6.0.523/includes/surfer/class-surfer-sidebar.php (added)
-
tags/1.6.0.523/includes/surfer/class-surfer-tracking.php (added)
-
tags/1.6.0.523/includes/surfer/class-surfer.php (added)
-
tags/1.6.0.523/includes/surfer/content-parsers (added)
-
tags/1.6.0.523/includes/surfer/content-parsers/class-classic-editor-parser.php (added)
-
tags/1.6.0.523/includes/surfer/content-parsers/class-content-parser.php (added)
-
tags/1.6.0.523/includes/surfer/content-parsers/class-elementor-parser.php (added)
-
tags/1.6.0.523/includes/surfer/content-parsers/class-gutenberg-parser.php (added)
-
tags/1.6.0.523/includes/surfer/content-parsers/class-parsers-controller.php (added)
-
tags/1.6.0.523/includes/surfer/gsc (added)
-
tags/1.6.0.523/includes/surfer/gsc/class-surfer-gsc-common.php (added)
-
tags/1.6.0.523/includes/surfer/gsc/class-surfer-gsc-data-migration.php (added)
-
tags/1.6.0.523/includes/surfer/gsc/class-surfer-gsc-drop-monitor.php (added)
-
tags/1.6.0.523/includes/surfer/gsc/class-surfer-gsc-notifications.php (added)
-
tags/1.6.0.523/includes/surfer/gsc/class-surfer-gsc-posts-list.php (added)
-
tags/1.6.0.523/includes/surfer/integrations (added)
-
tags/1.6.0.523/includes/surfer/integrations/class-elementor.php (added)
-
tags/1.6.0.523/includes/surfer/integrations/class-integrations.php (added)
-
tags/1.6.0.523/includes/upgrade (added)
-
tags/1.6.0.523/includes/upgrade/class-database-upgrade.php (added)
-
tags/1.6.0.523/includes/upgrade/sql (added)
-
tags/1.6.0.523/includes/upgrade/sql/class-upgrade-130.php (added)
-
tags/1.6.0.523/info.json (added)
-
tags/1.6.0.523/info.json-e (added)
-
tags/1.6.0.523/readme.txt (added)
-
tags/1.6.0.523/readme.txt-e (added)
-
tags/1.6.0.523/surferseo.php (added)
-
tags/1.6.0.523/surferseo.php-e (added)
-
tags/1.6.0.523/templates (added)
-
tags/1.6.0.523/templates/admin (added)
-
tags/1.6.0.523/templates/admin/performance-report.php (added)
-
tags/1.6.0.523/templates/admin/posts-list-gsc-column.php (added)
-
tags/1.6.0.523/templates/admin/settings.php (added)
-
tags/1.6.0.523/templates/admin/wizard.php (added)
-
tags/1.6.0.523/templates/emails (added)
-
tags/1.6.0.523/templates/emails/performance-report.php (added)
-
trunk/assets/js/surfer-general.js (modified) (1 diff)
-
trunk/includes/admin/class-surfer-admin.php (modified) (4 diffs)
-
trunk/includes/admin/class-surfer-settings.php (modified) (1 diff)
-
trunk/includes/forms/class-surfer-form-config-ci.php (modified) (3 diffs)
-
trunk/includes/forms/class-surfer-form.php (modified) (4 diffs)
-
trunk/includes/surfer/class-content-exporter.php (modified) (6 diffs)
-
trunk/includes/surfer/class-content-importer.php (modified) (7 diffs)
-
trunk/includes/surfer/class-surfer-general-endpoints.php (modified) (1 diff)
-
trunk/includes/surfer/class-surfer.php (modified) (8 diffs)
-
trunk/includes/surfer/content-parsers/class-content-parser.php (modified) (3 diffs)
-
trunk/includes/surfer/content-parsers/class-elementor-parser.php (modified) (1 diff)
-
trunk/includes/surfer/content-parsers/elementor_parser-new.txt (deleted)
-
trunk/includes/surfer/gsc/class-surfer-gsc-drop-monitor.php (modified) (3 diffs)
-
trunk/includes/surfer/integrations/class-elementor.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/surferseo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
surferseo/trunk/assets/js/surfer-general.js
r3123849 r3187966 73 73 animation-delay: 200ms; 74 74 } 75 `),bN.rippleVisible,kN,550,(({theme:e})=>e.transitions.easing.easeInOut),bN.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),bN.child,bN.childLeaving,EN,550,(({theme:e})=>e.transitions.easing.easeInOut),bN.childPulsate,CN,(({theme:e})=>e.transitions.easing.easeInOut)),IN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=n,c=(0,az.A)(n,wN),[l,u]=s.useState([]),f=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=s.useRef(!1),h=JM(),m=s.useRef(null),v=s.useRef(null),g=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:o,rippleSize:a,cb:s}=e;u((e=>[...e,(0,r.jsx)(PN,{classes:{ripple:cz(i.ripple,bN.ripple),rippleVisible:cz(i.rippleVisible,bN.rippleVisible),ripplePulsate:cz(i.ripplePulsate,bN.ripplePulsate),child:cz(i.child,bN.child),childLeaving:cz(i.childLeaving,bN.childLeaving),childPulsate:cz(i.childPulsate,bN.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:o,rippleSize:a},f.current)])),f.current+=1,d.current=s}),[i]),y=s.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:v.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let l,u,f;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),u=Math.round(n-c.top)}if(i)f=Math.sqrt((2*c.width**2+c.height**2)/3),f%2==0&&(f+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-l),l)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;f=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===m.current&&(m.current=()=>{g({pulsate:r,rippleX:l,rippleY:u,rippleSize:f,cb:n})},h.start(80,(()=>{m.current&&(m.current(),m.current=null)}))):g({pulsate:r,rippleX:l,rippleY:u,rippleSize:f,cb:n})}),[o,g,h]),b=s.useCallback((()=>{y({},{pulsate:!0})}),[y]),w=s.useCallback(((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&m.current)return m.current(),m.current=null,void h.start(0,(()=>{w(e,t)}));m.current=null,u((e=>e.length>0?e.slice(1):e)),d.current=t}),[h]);return s.useImperativeHandle(t,(()=>({pulsate:b,start:y,stop:w})),[b,y,w]),(0,r.jsx)(AN,(0,ns.A)({className:cz(bN.root,i.root,a),ref:v},c,{children:(0,r.jsx)(vN,{component:null,exit:!0,children:l})}))})),RN=IN;function TN(e){return gz("MuiButtonBase",e)}const LN=MM("MuiButtonBase",["root","disabled","focusVisible"]),zN=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],MN=OM("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${LN.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),NN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:c,component:l="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:h="a",onBlur:m,onClick:v,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:j,onMouseDown:O,onMouseLeave:S,onMouseUp:_,onTouchEnd:k,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:I,type:R}=n,T=(0,az.A)(n,zN),L=s.useRef(null),z=s.useRef(null),M=ZM(z,I),{isFocusVisibleRef:N,onFocus:D,onBlur:$,ref:F}=sN(),[B,W]=s.useState(!1);u&&B&&W(!1),s.useImperativeHandle(o,(()=>({focusVisible:()=>{W(!0),L.current.focus()}})),[]);const[U,H]=s.useState(!1);s.useEffect((()=>{H(!0)}),[]);const V=U&&!f&&!u;function G(e,t,n=d){return KM((r=>{t&&t(r);return!n&&z.current&&z.current[e](r),!0}))}s.useEffect((()=>{B&&p&&!f&&U&&z.current.pulsate()}),[f,p,B,U]);const Z=G("start",O),K=G("stop",g),q=G("stop",y),Y=G("stop",_),X=G("stop",(e=>{B&&e.preventDefault(),S&&S(e)})),J=G("start",C),Q=G("stop",k),ee=G("stop",E),te=G("stop",(e=>{$(e),!1===N.current&&W(!1),m&&m(e)}),!1),ne=KM((e=>{L.current||(L.current=e.currentTarget),D(e),!0===N.current&&(W(!0),w&&w(e)),b&&b(e)})),re=()=>{const e=L.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},oe=s.useRef(!1),ie=KM((e=>{p&&!oe.current&&B&&z.current&&" "===e.key&&(oe.current=!0,z.current.stop(e,(()=>{z.current.start(e)}))),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),v&&v(e))})),ae=KM((e=>{p&&" "===e.key&&z.current&&B&&!e.defaultPrevented&&(oe.current=!1,z.current.stop(e,(()=>{z.current.pulsate(e)}))),j&&j(e),v&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&v(e)}));let se=l;"button"===se&&(T.href||T.to)&&(se=h);const ce={};"button"===se?(ce.type=void 0===R?"button":R,ce.disabled=u):(T.href||T.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const le=ZM(t,F,L);const ue=(0,ns.A)({},n,{centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:d,focusRipple:p,tabIndex:A,focusVisible:B}),fe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=lz({root:["root",t&&"disabled",n&&"focusVisible"]},TN,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return(0,r.jsxs)(MN,(0,ns.A)({as:se,className:cz(fe.root,c),ownerState:ue,onBlur:te,onClick:v,onContextMenu:K,onFocus:ne,onKeyDown:ie,onKeyUp:ae,onMouseDown:Z,onMouseLeave:X,onMouseUp:Y,onDragLeave:q,onTouchEnd:Q,onTouchMove:ee,onTouchStart:J,ref:le,tabIndex:u?-1:A,type:R},ce,T,{children:[a,V?(0,r.jsx)(RN,(0,ns.A)({ref:M,center:i},P)):null]}))})),DN=NN;function $N(e){return gz("MuiIconButton",e)}const FN=MM("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),BN=["edge","children","className","color","disabled","disableFocusRipple","size"],WN=OM(DN,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${zM(n.color)}`],n.edge&&t[`edge${zM(n.edge)}`],t[`size${zM(n.size)}`]]}})((({theme:e,ownerState:t})=>(0,ns.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return(0,ns.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,ns.A)({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":(0,ns.A)({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${FN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),UN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:c=!1,disableFocusRipple:l=!1,size:u="medium"}=n,f=(0,az.A)(n,BN),d=(0,ns.A)({},n,{edge:o,color:s,disabled:c,disableFocusRipple:l,size:u}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return lz({root:["root",n&&"disabled","default"!==r&&`color${zM(r)}`,o&&`edge${zM(o)}`,`size${zM(i)}`]},$N,t)})(d);return(0,r.jsx)(WN,(0,ns.A)({className:cz(p.root,a),centerRipple:!0,focusRipple:!l,disabled:c,ref:t},f,{ownerState:d,children:i}))})),HN=UN;function VN(e){return gz("MuiSvgIcon",e)}MM("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const GN=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ZN=OM("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${zM(n.color)}`],t[`fontSize${zM(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,s,c,l,u,f,d,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(c=s.pxToRem)?void 0:c.call(s,24))||"1.5rem",large:(null==(l=e.typography)||null==(u=l.pxToRem)?void 0:u.call(l,35))||"2.1875rem"}[t.fontSize],color:null!=(f=null==(d=(e.vars||e).palette)||null==(d=d[t.color])?void 0:d.main)?f:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}})),KN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:c="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24"}=n,h=(0,az.A)(n,GN),m=s.isValidElement(o)&&"svg"===o.type,v=(0,ns.A)({},n,{color:a,component:c,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:m}),g={};f||(g.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return lz({root:["root","inherit"!==t&&`color${zM(t)}`,`fontSize${zM(n)}`]},VN,r)})(v);return(0,r.jsxs)(ZN,(0,ns.A)({as:c,className:cz(y.root,i),focusable:"false",color:u,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t},g,h,m&&o.props,{ownerState:v,children:[m?o.props.children:o,d?(0,r.jsx)("title",{children:d}):null]}))}));KN.muiName="SvgIcon";const qN=KN;function YN(e,t){function n(n,o){return(0,r.jsx)(qN,(0,ns.A)({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return n.muiName=qN.muiName,s.memo(s.forwardRef(n))}const XN=YN((0,r.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function JN(e){return gz("MuiChip",e)}const QN=MM("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),eD=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],tD=OM("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:c}=n;return[{[`& .${QN.avatar}`]:t.avatar},{[`& .${QN.avatar}`]:t[`avatar${zM(s)}`]},{[`& .${QN.avatar}`]:t[`avatarColor${zM(r)}`]},{[`& .${QN.icon}`]:t.icon},{[`& .${QN.icon}`]:t[`icon${zM(s)}`]},{[`& .${QN.icon}`]:t[`iconColor${zM(o)}`]},{[`& .${QN.deleteIcon}`]:t.deleteIcon},{[`& .${QN.deleteIcon}`]:t[`deleteIcon${zM(s)}`]},{[`& .${QN.deleteIcon}`]:t[`deleteIconColor${zM(r)}`]},{[`& .${QN.deleteIcon}`]:t[`deleteIcon${zM(c)}Color${zM(r)}`]},t.root,t[`size${zM(s)}`],t[`color${zM(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${zM(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${zM(r)}`],t[c],t[`${c}${zM(r)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,ns.A)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${QN.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${QN.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${QN.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${QN.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${QN.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${QN.icon}`]:(0,ns.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,ns.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},"default"!==t.color&&{color:"inherit"})),[`& .${QN.deleteIcon}`]:(0,ns.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,uz.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,uz.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>(0,ns.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>(0,ns.A)({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${QN.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${QN.avatar}`]:{marginLeft:4},[`& .${QN.avatarSmall}`]:{marginLeft:2},[`& .${QN.icon}`]:{marginLeft:4},[`& .${QN.iconSmall}`]:{marginLeft:2},[`& .${QN.deleteIcon}`]:{marginRight:5},[`& .${QN.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].main,.7)}`,[`&.${QN.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,uz.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${QN.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),nD=OM("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${zM(r)}`]]}})((({ownerState:e})=>(0,ns.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7})));function rD(e){return"Backspace"===e.key||"Delete"===e.key}const oD=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:c="default",component:l,deleteIcon:u,disabled:f=!1,icon:d,label:p,onClick:h,onDelete:m,onKeyDown:v,onKeyUp:g,size:y="medium",variant:b="filled",tabIndex:w,skipFocusWhenDisabled:x=!1}=n,j=(0,az.A)(n,eD),O=s.useRef(null),S=ZM(O,t),_=e=>{e.stopPropagation(),m&&m(e)},k=!(!1===a||!h)||a,E=k||m?DN:l||"div",C=(0,ns.A)({},n,{component:E,disabled:f,size:y,color:c,iconColor:s.isValidElement(d)&&d.props.color||c,onDelete:!!m,clickable:k,variant:b}),A=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:c}=e;return lz({root:["root",c,n&&"disabled",`size${zM(r)}`,`color${zM(o)}`,s&&"clickable",s&&`clickableColor${zM(o)}`,a&&"deletable",a&&`deletableColor${zM(o)}`,`${c}${zM(o)}`],label:["label",`label${zM(r)}`],avatar:["avatar",`avatar${zM(r)}`,`avatarColor${zM(o)}`],icon:["icon",`icon${zM(r)}`,`iconColor${zM(i)}`],deleteIcon:["deleteIcon",`deleteIcon${zM(r)}`,`deleteIconColor${zM(o)}`,`deleteIcon${zM(c)}Color${zM(o)}`]},JN,t)})(C),P=E===DN?(0,ns.A)({component:l||"div",focusVisibleClassName:A.focusVisible},m&&{disableRipple:!0}):{};let I=null;m&&(I=u&&s.isValidElement(u)?s.cloneElement(u,{className:cz(u.props.className,A.deleteIcon),onClick:_}):(0,r.jsx)(XN,{className:cz(A.deleteIcon),onClick:_}));let R=null;o&&s.isValidElement(o)&&(R=s.cloneElement(o,{className:cz(A.avatar,o.props.className)}));let T=null;return d&&s.isValidElement(d)&&(T=s.cloneElement(d,{className:cz(A.icon,d.props.className)})),(0,r.jsxs)(tD,(0,ns.A)({as:E,className:cz(A.root,i),disabled:!(!k||!f)||void 0,onClick:h,onKeyDown:e=>{e.currentTarget===e.target&&rD(e)&&e.preventDefault(),v&&v(e)},onKeyUp:e=>{e.currentTarget===e.target&&(m&&rD(e)?m(e):"Escape"===e.key&&O.current&&O.current.blur()),g&&g(e)},ref:S,tabIndex:x&&f?-1:w,ownerState:C},P,j,{children:[R||T,(0,r.jsx)(nD,{className:cz(A.label),ownerState:C,children:p}),I]}))})),iD=oD;function aD(e){return gz("MuiInputBase",e)}const sD=MM("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);function cD(e){return gz("MuiInput",e)}const lD=(0,ns.A)({},sD,MM("MuiInput",["root","underline","input"]));function uD(e){return gz("MuiOutlinedInput",e)}const fD=(0,ns.A)({},sD,MM("MuiOutlinedInput",["root","notchedOutline","input"]));function dD(e){return gz("MuiFilledInput",e)}const pD=(0,ns.A)({},sD,MM("MuiFilledInput",["root","underline","input"])),hD=YN((0,r.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),mD=YN((0,r.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function vD(e){return gz("MuiAutocomplete",e)}const gD=MM("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var yD,bD;const wD=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],xD=["ref"],jD=PM,OD=OM("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${gD.tag}`]:t.tag},{[`& .${gD.tag}`]:t[`tagSize${zM(s)}`]},{[`& .${gD.inputRoot}`]:t.inputRoot},{[`& .${gD.input}`]:t.input},{[`& .${gD.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${gD.focused} .${gD.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${gD.clearIndicator}`]:{visibility:"visible"}},[`& .${gD.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${gD.inputRoot}`]:{flexWrap:"wrap",[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:30},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:56},[`& .${gD.input}`]:{width:0,minWidth:30}},[`& .${lD.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${lD.root}.${sD.sizeSmall}`]:{[`& .${lD.input}`]:{padding:"2px 4px 3px 0"}},[`& .${fD.root}`]:{padding:9,[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:39},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:65},[`& .${gD.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${gD.endAdornment}`]:{right:9}},[`& .${fD.root}.${sD.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${gD.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${pD.root}`]:{paddingTop:19,paddingLeft:8,[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:39},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:65},[`& .${pD.input}`]:{padding:"7px 4px"},[`& .${gD.endAdornment}`]:{right:9}},[`& .${pD.root}.${sD.sizeSmall}`]:{paddingBottom:1,[`& .${pD.input}`]:{padding:"2.5px 4px"}},[`& .${sD.hiddenLabel}`]:{paddingTop:8},[`& .${pD.root}.${sD.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${gD.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${pD.root}.${sD.hiddenLabel}.${sD.sizeSmall}`]:{[`& .${gD.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${gD.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${gD.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${gD.input}`]:{opacity:1}}}]}),SD=OM("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),_D=OM(HN,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),kD=OM(HN,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),ED=OM(LM,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gD.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),CD=OM(GM,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>(0,ns.A)({},e.typography.body1,{overflow:"auto"}))),AD=OM("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),PD=OM("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),ID=OM("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${gD.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${gD.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${gD.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${gD.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${gD.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),RD=OM(BM,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),TD=OM("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${gD.option}`]:{paddingLeft:24}}),LD=s.forwardRef((function(e,t){var n,o,i,a;const c=jD({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:f=!1,blurOnSelect:d=!1,ChipProps:p,className:h,clearIcon:m=yD||(yD=(0,r.jsx)(hD,{fontSize:"small"})),clearOnBlur:v=!c.freeSolo,clearOnEscape:g=!1,clearText:y="Clear",closeText:b="Close",componentsProps:w={},defaultValue:x=(c.multiple?[]:null),disableClearable:j=!1,disableCloseOnSelect:O=!1,disabled:S=!1,disabledItemsFocusable:_=!1,disableListWrap:k=!1,disablePortal:E=!1,filterSelectedOptions:C=!1,forcePopupIcon:A="auto",freeSolo:P=!1,fullWidth:I=!1,getLimitTagsText:R=(e=>`+${e}`),getOptionLabel:T,groupBy:L,handleHomeEndKeys:z=!c.freeSolo,includeInputInList:M=!1,limitTags:N=-1,ListboxComponent:D="ul",ListboxProps:$,loading:F=!1,loadingText:B="Loading…",multiple:W=!1,noOptionsText:U="No options",openOnFocus:H=!1,openText:V="Open",PaperComponent:G=GM,PopperComponent:Z=LM,popupIcon:K=bD||(bD=(0,r.jsx)(mD,{})),readOnly:q=!1,renderGroup:Y,renderInput:X,renderOption:J,renderTags:Q,selectOnFocus:ee=!c.freeSolo,size:te="medium",slotProps:ne={}}=c,re=(0,az.A)(c,wD),{getRootProps:oe,getInputProps:ie,getInputLabelProps:ae,getPopupIndicatorProps:se,getClearProps:ce,getTagProps:le,getListboxProps:ue,getOptionProps:fe,value:de,dirty:pe,expanded:he,id:me,popupOpen:ve,focused:ge,focusedTag:ye,anchorEl:be,setAnchorEl:we,inputValue:xe,groupedOptions:je}=iz((0,ns.A)({},c,{componentName:"Autocomplete"})),Oe=!j&&!S&&pe&&!q,Se=(!P||!0===A)&&!1!==A,{onMouseDown:_e}=ie(),{ref:ke}=null!=$?$:{},Ee=ue(),{ref:Ce}=Ee,Ae=(0,az.A)(Ee,xD),Pe=ZM(Ce,ke),Ie=T||(e=>{var t;return null!=(t=e.label)?t:e}),Re=(0,ns.A)({},c,{disablePortal:E,expanded:he,focused:ge,fullWidth:I,getOptionLabel:Ie,hasClearIcon:Oe,hasPopupIcon:Se,inputFocused:-1===ye,popupOpen:ve,size:te}),Te=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return lz({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag",`tagSize${zM(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",l&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},vD,t)})(Re);let Le;if(W&&de.length>0){const e=e=>(0,ns.A)({className:Te.tag,disabled:S},le(e));Le=Q?Q(de,e,Re):de.map(((t,n)=>(0,r.jsx)(iD,(0,ns.A)({label:Ie(t),size:te},e({index:n}),p))))}if(N>-1&&Array.isArray(Le)){const e=Le.length-N;!ge&&e>0&&(Le=Le.splice(0,N),Le.push((0,r.jsx)("span",{className:Te.tag,children:R(e)},Le.length)))}const ze=Y||(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)(RD,{className:Te.groupLabel,ownerState:Re,component:"div",children:e.group}),(0,r.jsx)(TD,{className:Te.groupUl,ownerState:Re,children:e.children})]},e.key)),Me=J||((e,t)=>(0,s.createElement)("li",(0,ns.A)({},e,{key:e.key}),Ie(t))),Ne=(e,t)=>{const n=fe({option:e,index:t});return Me((0,ns.A)({},n,{className:Te.option}),e,{selected:n["aria-selected"],index:t,inputValue:xe},Re)},De=null!=(n=ne.clearIndicator)?n:w.clearIndicator,$e=null!=(o=ne.paper)?o:w.paper,Fe=null!=(i=ne.popper)?i:w.popper,Be=null!=(a=ne.popupIndicator)?a:w.popupIndicator,We=e=>(0,r.jsx)(ED,(0,ns.A)({as:Z,disablePortal:E,style:{width:be?be.clientWidth:null},ownerState:Re,role:"presentation",anchorEl:be,open:ve},Fe,{className:cz(Te.popper,null==Fe?void 0:Fe.className),children:(0,r.jsx)(CD,(0,ns.A)({ownerState:Re,as:G},$e,{className:cz(Te.paper,null==$e?void 0:$e.className),children:e}))}));let Ue=null;return je.length>0?Ue=We((0,r.jsx)(ID,(0,ns.A)({as:D,className:Te.listbox,ownerState:Re},Ae,$,{ref:Pe,children:je.map(((e,t)=>L?ze({key:e.key,group:e.group,children:e.options.map(((t,n)=>Ne(t,e.index+n)))}):Ne(e,t)))}))):F&&0===je.length?Ue=We((0,r.jsx)(AD,{className:Te.loading,ownerState:Re,children:B})):0!==je.length||P||F||(Ue=We((0,r.jsx)(PD,{className:Te.noOptions,ownerState:Re,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:U}))),(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(OD,(0,ns.A)({ref:t,className:cz(Te.root,h),ownerState:Re},oe(re),{children:X({id:me,disabled:S,fullWidth:!0,size:"small"===te?"small":void 0,InputLabelProps:ae(),InputProps:(0,ns.A)({ref:we,className:Te.inputRoot,startAdornment:Le,onClick:e=>{e.target===e.currentTarget&&_e(e)}},(Oe||Se)&&{endAdornment:(0,r.jsxs)(SD,{className:Te.endAdornment,ownerState:Re,children:[Oe?(0,r.jsx)(_D,(0,ns.A)({},ce(),{"aria-label":y,title:y,ownerState:Re},De,{className:cz(Te.clearIndicator,null==De?void 0:De.className),children:m})):null,Se?(0,r.jsx)(kD,(0,ns.A)({},se(),{disabled:S,"aria-label":ve?b:V,title:ve?b:V,ownerState:Re},Be,{className:cz(Te.popupIndicator,null==Be?void 0:Be.className),children:K})):null]})}),inputProps:(0,ns.A)({className:Te.input,disabled:S,readOnly:q},ie())})})),be?Ue:null]})})),zD=LD;function MD(e){return dz(e).defaultView||window}function ND(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}const DD=["onChange","maxRows","minRows","style","value"];function $D(e){return parseInt(e,10)||0}const FD={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const BD=s.forwardRef((function(e,t){const{onChange:n,maxRows:o,minRows:i=1,style:a,value:c}=e,l=(0,az.A)(e,DD),{current:u}=s.useRef(null!=c),f=s.useRef(null),d=fz(t,f),p=s.useRef(null),h=s.useCallback((()=>{const t=f.current,n=MD(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};const r=p.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const a=n.boxSizing,s=$D(n.paddingBottom)+$D(n.paddingTop),c=$D(n.borderBottomWidth)+$D(n.borderTopWidth),l=r.scrollHeight;r.value="x";const u=r.scrollHeight;let d=l;i&&(d=Math.max(Number(i)*u,d)),o&&(d=Math.min(Number(o)*u,d)),d=Math.max(d,u);return{outerHeightStyle:d+("border-box"===a?s+c:0),overflowing:Math.abs(d-l)<=1}}),[o,i,e.placeholder]),m=s.useCallback((()=>{const e=h();if(function(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflowing}(e))return;const t=f.current;t.style.height=`${e.outerHeightStyle}px`,t.style.overflow=e.overflowing?"hidden":""}),[h]);XL((()=>{const e=()=>{m()};let t;const n=ND(e),r=f.current,o=MD(r);let i;return o.addEventListener("resize",n),"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(e),i.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),o.removeEventListener("resize",n),i&&i.disconnect()}}),[h,m]),XL((()=>{m()}));return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("textarea",(0,ns.A)({value:c,onChange:e=>{u||m(),n&&n(e)},ref:d,rows:i,style:a},l)),(0,r.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,ns.A)({},FD,a,{paddingTop:0,paddingBottom:0})})]})}));function WD({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}const UD=s.createContext(void 0);function HD(){return s.useContext(UD)}const VD=XL;var GD=n(9940);const ZD=function({styles:e,themeId:t,defaultTheme:n={}}){const o=AM(n),i="function"==typeof e?e(t&&o[t]||o):e;return(0,r.jsx)(GD.A,{styles:i})};const KD=function(e){return(0,r.jsx)(ZD,(0,ns.A)({},e,{defaultTheme:bM,themeId:wM}))};function qD(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function YD(e,t=!1){return e&&(qD(e.value)&&""!==e.value||t&&qD(e.defaultValue)&&""!==e.defaultValue)}const XD=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],JD=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${zM(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},QD=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},e$=OM("div",{name:"MuiInputBase",slot:"Root",overridesResolver:JD})((({theme:e,ownerState:t})=>(0,ns.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${sD.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,ns.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),t$=OM("input",{name:"MuiInputBase",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=(0,ns.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,ns.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${sD.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${sD.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),n$=(0,r.jsx)(KD,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),r$=s.forwardRef((function(e,t){var n;const o=PM({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:c,className:l,components:u={},componentsProps:f={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:h,endAdornment:m,fullWidth:v=!1,id:g,inputComponent:y="input",inputProps:b={},inputRef:w,maxRows:x,minRows:j,multiline:O=!1,name:S,onBlur:_,onChange:k,onClick:E,onFocus:C,onKeyDown:A,onKeyUp:P,placeholder:I,readOnly:R,renderSuffix:T,rows:L,slotProps:z={},slots:M={},startAdornment:N,type:D="text",value:$}=o,F=(0,az.A)(o,XD),B=null!=b.value?b.value:$,{current:W}=s.useRef(null!=B),U=s.useRef(),H=s.useCallback((e=>{0}),[]),V=ZM(U,w,b.ref,H),[G,Z]=s.useState(!1),K=HD();const q=WD({props:o,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=K?K.focused:G,s.useEffect((()=>{!K&&p&&G&&(Z(!1),_&&_())}),[K,p,G,_]);const Y=K&&K.onFilled,X=K&&K.onEmpty,J=s.useCallback((e=>{YD(e)?Y&&Y():X&&X()}),[Y,X]);VD((()=>{W&&J({value:B})}),[B,J,W]);s.useEffect((()=>{J(U.current)}),[]);let Q=y,ee=b;O&&"input"===Q&&(ee=L?(0,ns.A)({type:void 0,minRows:L,maxRows:L},ee):(0,ns.A)({type:void 0,maxRows:x,minRows:j},ee),Q=BD);s.useEffect((()=>{K&&K.setAdornedStart(Boolean(N))}),[K,N]);const te=(0,ns.A)({},o,{color:q.color||"primary",disabled:q.disabled,endAdornment:m,error:q.error,focused:q.focused,formControl:K,fullWidth:v,hiddenLabel:q.hiddenLabel,multiline:O,size:q.size,startAdornment:N,type:D}),ne=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:f,size:d,startAdornment:p,type:h}=e;return lz({root:["root",`color${zM(n)}`,r&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",s&&"formControl",d&&"medium"!==d&&`size${zM(d)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",l&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===d&&"inputSizeSmall",l&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]},aD,t)})(te),re=M.root||u.Root||e$,oe=z.root||f.root||{},ie=M.input||u.Input||t$;return ee=(0,ns.A)({},ee,null!=(n=z.input)?n:f.input),(0,r.jsxs)(s.Fragment,{children:[!h&&n$,(0,r.jsxs)(re,(0,ns.A)({},oe,!jz(re)&&{ownerState:(0,ns.A)({},te,oe.ownerState)},{ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),E&&E(e)}},F,{className:cz(ne.root,oe.className,l,R&&"MuiInputBase-readOnly"),children:[N,(0,r.jsx)(UD.Provider,{value:null,children:(0,r.jsx)(ie,(0,ns.A)({ownerState:te,"aria-invalid":q.error,"aria-describedby":i,autoComplete:a,autoFocus:c,defaultValue:d,disabled:q.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:S,placeholder:I,readOnly:R,required:q.required,rows:L,value:B,onKeyDown:A,onKeyUp:P,type:D},ee,!jz(ie)&&{as:Q,ownerState:(0,ns.A)({},te,ee.ownerState)},{ref:V,className:cz(ne.input,ee.className,R&&"MuiInputBase-readOnly"),onBlur:e=>{_&&_(e),b.onBlur&&b.onBlur(e),K&&K.onBlur?K.onBlur(e):Z(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||U.current;if(null==t)throw new Error((0,$z.A)(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),k&&k(e,...t)},onFocus:e=>{q.disabled?e.stopPropagation():(C&&C(e),b.onFocus&&b.onFocus(e),K&&K.onFocus?K.onFocus(e):Z(!0))}}))}),m,T?T((0,ns.A)({},q,{startAdornment:N})):null]}))]})})),o$=r$,i$=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],a$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JD(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,ns.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${lD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lD.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${lD.disabled}, .${lD.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${lD.disabled}:before`]:{borderBottomStyle:"dotted"}})})),s$=OM(t$,{name:"MuiInput",slot:"Input",overridesResolver:QD})({}),c$=s.forwardRef((function(e,t){var n,o,i,a;const s=PM({props:e,name:"MuiInput"}),{disableUnderline:c,components:l={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:p=!1,slotProps:h,slots:m={},type:v="text"}=s,g=(0,az.A)(s,i$),y=(e=>{const{classes:t,disableUnderline:n}=e,r=lz({root:["root",!n&&"underline"],input:["input"]},cD,t);return(0,ns.A)({},t,r)})(s),b={root:{ownerState:{disableUnderline:c}}},w=(null!=h?h:u)?(0,Fz.A)(null!=h?h:u,b):b,x=null!=(n=null!=(o=m.root)?o:l.Root)?n:a$,j=null!=(i=null!=(a=m.input)?a:l.Input)?i:s$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:x,input:j},slotProps:w,fullWidth:f,inputComponent:d,multiline:p,ref:t,type:v},g,{classes:y}))}));c$.muiName="Input";const l$=c$,u$=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],f$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JD(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,ns.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${pD.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${pD.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pD.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pD.disabled}, .${pD.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pD.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,ns.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),d$=OM(t$,{name:"MuiFilledInput",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>(0,ns.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),p$=s.forwardRef((function(e,t){var n,o,i,a;const s=PM({props:e,name:"MuiFilledInput"}),{components:c={},componentsProps:l,fullWidth:u=!1,inputComponent:f="input",multiline:d=!1,slotProps:p,slots:h={},type:m="text"}=s,v=(0,az.A)(s,u$),g=(0,ns.A)({},s,{fullWidth:u,inputComponent:f,multiline:d,type:m}),y=(e=>{const{classes:t,disableUnderline:n}=e,r=lz({root:["root",!n&&"underline"],input:["input"]},dD,t);return(0,ns.A)({},t,r)})(s),b={root:{ownerState:g},input:{ownerState:g}},w=(null!=p?p:l)?(0,Fz.A)(b,null!=p?p:l):b,x=null!=(n=null!=(o=h.root)?o:c.Root)?n:f$,j=null!=(i=null!=(a=h.input)?a:c.Input)?i:d$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:x,input:j},componentsProps:w,fullWidth:u,inputComponent:f,multiline:d,ref:t,type:m},v,{classes:y}))}));p$.muiName="Input";const h$=p$;var m$;const v$=["children","classes","className","label","notched"],g$=OM("fieldset",{shouldForwardProp:jM})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),y$=OM("legend",{shouldForwardProp:jM})((({ownerState:e,theme:t})=>(0,ns.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,ns.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const b$=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],w$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:JD})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,ns.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${fD.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${fD.focused} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${fD.error} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${fD.disabled} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,ns.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),x$=OM((function(e){const{className:t,label:n,notched:o}=e,i=(0,az.A)(e,v$),a=null!=n&&""!==n,s=(0,ns.A)({},e,{notched:o,withLabel:a});return(0,r.jsx)(g$,(0,ns.A)({"aria-hidden":!0,className:t,ownerState:s},i,{children:(0,r.jsx)(y$,{ownerState:s,children:a?(0,r.jsx)("span",{children:n}):m$||(m$=(0,r.jsx)("span",{className:"notranslate",children:""}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),j$=OM(t$,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>(0,ns.A)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),O$=s.forwardRef((function(e,t){var n,o,i,a,c;const l=PM({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:f=!1,inputComponent:d="input",label:p,multiline:h=!1,notched:m,slots:v={},type:g="text"}=l,y=(0,az.A)(l,b$),b=(e=>{const{classes:t}=e,n=lz({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},uD,t);return(0,ns.A)({},t,n)})(l),w=HD(),x=WD({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),j=(0,ns.A)({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:w,fullWidth:f,hiddenLabel:x.hiddenLabel,multiline:h,size:x.size,type:g}),O=null!=(n=null!=(o=v.root)?o:u.Root)?n:w$,S=null!=(i=null!=(a=v.input)?a:u.Input)?i:j$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:O,input:S},renderSuffix:e=>(0,r.jsx)(x$,{ownerState:j,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?c||(c=(0,r.jsxs)(s.Fragment,{children:[p," ","*"]})):p,notched:void 0!==m?m:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:f,inputComponent:d,multiline:h,ref:t,type:g},y,{classes:(0,ns.A)({},b,{notchedOutline:null})}))}));O$.muiName="Input";const S$=O$;function _$(e){return gz("MuiFormLabel",e)}const k$=MM("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),E$=["children","className","color","component","disabled","error","filled","focused","required"],C$=OM("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})((({theme:e,ownerState:t})=>(0,ns.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${k$.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${k$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${k$.error}`]:{color:(e.vars||e).palette.error.main}}))),A$=OM("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${k$.error}`]:{color:(e.vars||e).palette.error.main}}))),P$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormLabel"}),{children:o,className:i,component:a="label"}=n,s=(0,az.A)(n,E$),c=WD({props:n,muiFormControl:HD(),states:["color","required","focused","disabled","error","filled"]}),l=(0,ns.A)({},n,{color:c.color||"primary",component:a,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),u=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return lz({root:["root",`color${zM(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},_$,t)})(l);return(0,r.jsxs)(C$,(0,ns.A)({as:a,ownerState:l,className:cz(u.root,i),ref:t},s,{children:[o,c.required&&(0,r.jsxs)(A$,{ownerState:l,"aria-hidden":!0,className:u.asterisk,children:[" ","*"]})]}))})),I$=P$;function R$(e){return gz("MuiInputLabel",e)}MM("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const T$=["disableAnimation","margin","shrink","variant","className"],L$=OM(I$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${k$.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((({theme:e,ownerState:t})=>(0,ns.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,ns.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,ns.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,ns.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"})))),z$=s.forwardRef((function(e,t){const n=PM({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,shrink:i,className:a}=n,s=(0,az.A)(n,T$),c=HD();let l=i;void 0===l&&c&&(l=c.filled||c.focused||c.adornedStart);const u=WD({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),f=(0,ns.A)({},n,{disableAnimation:o,formControl:c,shrink:l,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,c=lz({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"normal"!==r&&`size${zM(r)}`,a],asterisk:[s&&"asterisk"]},R$,t);return(0,ns.A)({},t,c)})(f);return(0,r.jsx)(L$,(0,ns.A)({"data-shrink":l,ownerState:f,ref:t,className:cz(d.root,a)},s,{classes:d}))})),M$=z$;const N$=function(e,t){var n,r;return s.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)};function D$(e){return gz("MuiFormControl",e)}MM("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const $$=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],F$=OM("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.root,t[`margin${zM(e.margin)}`],e.fullWidth&&t.fullWidth)})((({ownerState:e})=>(0,ns.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"}))),B$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:c="div",disabled:l=!1,error:u=!1,focused:f,fullWidth:d=!1,hiddenLabel:p=!1,margin:h="none",required:m=!1,size:v="medium",variant:g="outlined"}=n,y=(0,az.A)(n,$$),b=(0,ns.A)({},n,{color:a,component:c,disabled:l,error:u,fullWidth:d,hiddenLabel:p,margin:h,required:m,size:v,variant:g}),w=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return lz({root:["root","none"!==n&&`margin${zM(n)}`,r&&"fullWidth"]},D$,t)})(b),[x,j]=s.useState((()=>{let e=!1;return o&&s.Children.forEach(o,(t=>{if(!N$(t,["Input","Select"]))return;const n=N$(t,["Select"])?t.props.input:t;n&&function(e){return e.startAdornment}(n.props)&&(e=!0)})),e})),[O,S]=s.useState((()=>{let e=!1;return o&&s.Children.forEach(o,(t=>{N$(t,["Input","Select"])&&(YD(t.props,!0)||YD(t.props.inputProps,!0))&&(e=!0)})),e})),[_,k]=s.useState(!1);l&&_&&k(!1);const E=void 0===f||l?_:f;let C;const A=s.useMemo((()=>({adornedStart:x,setAdornedStart:j,color:a,disabled:l,error:u,filled:O,focused:E,fullWidth:d,hiddenLabel:p,size:v,onBlur:()=>{k(!1)},onEmpty:()=>{S(!1)},onFilled:()=>{S(!0)},onFocus:()=>{k(!0)},registerEffect:C,required:m,variant:g})),[x,a,l,u,O,E,d,p,C,m,v,g]);return(0,r.jsx)(UD.Provider,{value:A,children:(0,r.jsx)(F$,(0,ns.A)({as:c,ownerState:b,className:cz(w.root,i),ref:t},y,{children:o}))})})),W$=B$;function U$(e){return gz("MuiFormHelperText",e)}const H$=MM("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var V$;const G$=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Z$=OM("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${zM(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((({theme:e,ownerState:t})=>(0,ns.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${H$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${H$.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14}))),K$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p"}=n,s=(0,az.A)(n,G$),c=WD({props:n,muiFormControl:HD(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,ns.A)({},n,{component:a,contained:"filled"===c.variant||"outlined"===c.variant,variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),u=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:c}=e;return lz({root:["root",o&&"disabled",i&&"error",r&&`size${zM(r)}`,n&&"contained",s&&"focused",a&&"filled",c&&"required"]},U$,t)})(l);return(0,r.jsx)(Z$,(0,ns.A)({as:a,ownerState:l,className:cz(u.root,i),ref:t},s,{children:" "===o?V$||(V$=(0,r.jsx)("span",{className:"notranslate",children:""})):o}))})),q$=K$,Y$=dz,X$=s.createContext();const J$=s.createContext({});function Q$(e){return gz("MuiList",e)}MM("MuiList",["root","padding","dense","subheader"]);const eF=["children","className","component","dense","disablePadding","subheader"],tF=OM("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>(0,ns.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),nF=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:c=!1,disablePadding:l=!1,subheader:u}=n,f=(0,az.A)(n,eF),d=s.useMemo((()=>({dense:c})),[c]),p=(0,ns.A)({},n,{component:a,dense:c,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return lz({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Q$,t)})(p);return(0,r.jsx)(J$.Provider,{value:d,children:(0,r.jsxs)(tF,(0,ns.A)({as:a,className:cz(h.root,i),ref:t,ownerState:p},f,{children:[u,o]}))})}));function rF(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const oF=rF,iF=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function aF(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sF(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function cF(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function lF(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&cF(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const uF=s.forwardRef((function(e,t){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:c,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:f,variant:d="selectedMenu"}=e,p=(0,az.A)(e,iF),h=s.useRef(null),m=s.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});VD((()=>{o&&h.current.focus()}),[o]),s.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${oF(Y$(e))}px`;h.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}})),[]);const v=ZM(h,t);let g=-1;s.Children.forEach(a,((e,t)=>{s.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))}));const y=s.Children.map(a,((e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),s.cloneElement(e,t)}return e}));return(0,r.jsx)(nF,(0,ns.A)({role:"menu",ref:v,className:c,onKeyDown:e=>{const t=h.current,n=e.key,r=Y$(t).activeElement;if("ArrowDown"===n)e.preventDefault(),lF(t,r,u,l,aF);else if("ArrowUp"===n)e.preventDefault(),lF(t,r,u,l,sF);else if("Home"===n)e.preventDefault(),lF(t,null,u,l,aF);else if("End"===n)e.preventDefault(),lF(t,null,u,l,sF);else if(1===n.length){const o=m.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&cF(r,o);o.previousKeyMatched&&(s||lF(t,r,!1,l,aF,o))?e.preventDefault():o.previousKeyMatched=!1}f&&f(e)},tabIndex:o?0:-1},p,{children:y}))})),fF=uF,dF=ND,pF=MD,hF=!1;var mF="unmounted",vF="exited",gF="entering",yF="entered",bF="exiting",wF=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=vF,r.appearStatus=gF):o=yF:o=t.unmountOnExit||t.mountOnEnter?mF:vF,r.state={status:o},r.nextCallback=null,r}lN(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===mF?{status:vF}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==gF&&n!==yF&&(t=gF):n!==gF&&n!==yF||(t=bF)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===gF){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:i().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vF&&this.setState({status:mF})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[i().findDOMNode(this),r],a=o[0],s=o[1],c=this.getTimeouts(),l=r?c.appear:c.enter;!e&&!n||hF?this.safeSetState({status:yF},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:gF},(function(){t.props.onEntering(a,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:yF},(function(){t.props.onEntered(a,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i().findDOMNode(this);t&&!hF?(this.props.onExit(r),this.safeSetState({status:bF},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:vF},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:vF},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===mF)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,az.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l().createElement(uN.Provider,{value:null},"function"==typeof n?n(e,r):l().cloneElement(l().Children.only(n),r))},t}(l().Component);function xF(){}wF.contextType=uN,wF.propTypes={},wF.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xF,onEntering:xF,onEntered:xF,onExit:xF,onExiting:xF,onExited:xF},wF.UNMOUNTED=mF,wF.EXITED=vF,wF.ENTERING=gF,wF.ENTERED=yF,wF.EXITING=bF;const jF=wF;function OF(){const e=AM(bM);return e[wM]||e}const SF=e=>e.scrollTop;function _F(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}const kF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function EF(e){return`scale(${e}, ${e**2})`}const CF={entering:{opacity:1,transform:EF(1)},entered:{opacity:1,transform:"none"}},AF="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),PF=s.forwardRef((function(e,t){const{addEndListener:n,appear:o=!0,children:i,easing:a,in:c,onEnter:l,onEntered:u,onEntering:f,onExit:d,onExited:p,onExiting:h,style:m,timeout:v="auto",TransitionComponent:g=jF}=e,y=(0,az.A)(e,kF),b=JM(),w=s.useRef(),x=OF(),j=s.useRef(null),O=ZM(j,i.ref,t),S=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},_=S(f),k=S(((e,t)=>{SF(e);const{duration:n,delay:r,easing:o}=_F({style:m,timeout:v,easing:a},{mode:"enter"});let i;"auto"===v?(i=x.transitions.getAutoHeightDuration(e.clientHeight),w.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:AF?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)})),E=S(u),C=S(h),A=S((e=>{const{duration:t,delay:n,easing:r}=_F({style:m,timeout:v,easing:a},{mode:"exit"});let o;"auto"===v?(o=x.transitions.getAutoHeightDuration(e.clientHeight),w.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:AF?o:.666*o,delay:AF?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=EF(.75),d&&d(e)})),P=S(p);return(0,r.jsx)(g,(0,ns.A)({appear:o,in:c,nodeRef:j,onEnter:k,onEntered:E,onEntering:_,onExit:A,onExited:P,onExiting:C,addEndListener:e=>{"auto"===v&&b.start(w.current||0,e),n&&n(j.current,e)},timeout:"auto"===v?null:v},y,{children:(e,t)=>s.cloneElement(i,(0,ns.A)({style:(0,ns.A)({opacity:0,transform:EF(.75),visibility:"exited"!==e||c?void 0:"hidden"},CF[e],m,i.props.style),ref:O},t))}))}));PF.muiSupportAuto=!0;const IF=PF;function RF(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function TF(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function LF(e){return parseInt(MD(e).getComputedStyle(e).paddingRight,10)||0}function zF(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&TF(e,o)}))}function MF(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function NF(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=dz(e);return t.body===e?MD(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=rF(dz(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${LF(r)+e}px`;const t=dz(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${LF(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=dz(r).body;else{const t=r.parentElement,n=MD(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const DF=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&TF(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);zF(t,e.mount,e.modalRef,r,!0);const o=MF(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=MF(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=NF(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=MF(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&TF(e.modalRef,t),zF(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&TF(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function $F(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=DF,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:c,children:l,onClose:u,open:f,rootRef:d}=e,p=s.useRef({}),h=s.useRef(null),m=s.useRef(null),v=fz(m,d),[g,y]=s.useState(!f),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let w=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(w=!1);const x=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),j=()=>{o.mount(x(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},O=JL((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||dz(h.current).body;o.add(x(),e),m.current&&j()})),S=s.useCallback((()=>o.isTopModal(x())),[o]),_=JL((e=>{h.current=e,e&&(f&&S()?j():m.current&&TF(m.current,w))})),k=s.useCallback((()=>{o.remove(x(),w)}),[w,o]);s.useEffect((()=>()=>{k()}),[k]),s.useEffect((()=>{f?O():b&&i||k()}),[f,k,b,i,O]);const E=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},C=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Oz(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,ns.A)({},n,t);return(0,ns.A)({role:"presentation"},r,{onKeyDown:E(r),ref:v})},getBackdropProps:(e={})=>{const t=e;return(0,ns.A)({"aria-hidden":!0},t,{onClick:C(t),open:f})},getTransitionProps:()=>({onEnter:RF((()=>{y(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:RF((()=>{y(!0),c&&c(),i&&k()}),null==l?void 0:l.props.onExited)}),rootRef:v,portalRef:_,isTopModal:S,exited:g,hasTransition:b}}const FF=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function BF(e){const t=[],n=[];return Array.from(e.querySelectorAll(FF)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function WF(){return!0}function UF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:a=BF,isEnabled:c=WF,open:l}=e,u=s.useRef(!1),f=s.useRef(null),d=s.useRef(null),p=s.useRef(null),h=s.useRef(null),m=s.useRef(!1),v=s.useRef(null),g=fz(t.ref,v),y=s.useRef(null);s.useEffect((()=>{l&&v.current&&(m.current=!n)}),[n,l]),s.useEffect((()=>{if(!l||!v.current)return;const e=dz(v.current);return v.current.contains(e.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}}),[l]),s.useEffect((()=>{if(!l||!v.current)return;const e=dz(v.current),t=t=>{y.current=t,!o&&c()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(u.current=!0,d.current&&d.current.focus())},n=()=>{const t=v.current;if(null===t)return;if(!e.hasFocus()||!c()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(o&&e.activeElement!==f.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!m.current)return;let n=[];if(e.activeElement!==f.current&&e.activeElement!==d.current||(n=a(v.current)),n.length>0){var r,i;const e=Boolean((null==(r=y.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=y.current)?void 0:i.key)),t=n[0],o=n[n.length-1];"string"!=typeof t&&"string"!=typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,o,i,c,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0};return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelStart"}),s.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,r.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const HF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],VF={entering:{opacity:1},entered:{opacity:1}},GF=s.forwardRef((function(e,t){const n=OF(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:c,easing:l,in:u,onEnter:f,onEntered:d,onEntering:p,onExit:h,onExited:m,onExiting:v,style:g,timeout:y=o,TransitionComponent:b=jF}=e,w=(0,az.A)(e,HF),x=s.useRef(null),j=ZM(x,c.ref,t),O=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=O(p),_=O(((e,t)=>{SF(e);const r=_F({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),f&&f(e,t)})),k=O(d),E=O(v),C=O((e=>{const t=_F({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)})),A=O(m);return(0,r.jsx)(b,(0,ns.A)({appear:a,in:u,nodeRef:x,onEnter:_,onEntered:k,onEntering:S,onExit:C,onExited:A,onExiting:E,addEndListener:e=>{i&&i(x.current,e)},timeout:y},w,{children:(e,t)=>s.cloneElement(c,(0,ns.A)({style:(0,ns.A)({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},VF[e],g,c.props.style),ref:j},t))}))})),ZF=GF;function KF(e){return gz("MuiBackdrop",e)}MM("MuiBackdrop",["root","invisible"]);const qF=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],YF=OM("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>(0,ns.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),XF=s.forwardRef((function(e,t){var n,o,i;const a=PM({props:e,name:"MuiBackdrop"}),{children:s,className:c,component:l="div",components:u={},componentsProps:f={},invisible:d=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:v=ZF,transitionDuration:g}=a,y=(0,az.A)(a,qF),b=(0,ns.A)({},a,{component:l,invisible:d}),w=(e=>{const{classes:t,invisible:n}=e;return lz({root:["root",n&&"invisible"]},KF,t)})(b),x=null!=(n=h.root)?n:f.root;return(0,r.jsx)(v,(0,ns.A)({in:p,timeout:g},y,{children:(0,r.jsx)(YF,(0,ns.A)({"aria-hidden":!0},x,{as:null!=(o=null!=(i=m.root)?i:u.Root)?o:l,className:cz(w.root,c,null==x?void 0:x.className),ownerState:(0,ns.A)({},b,null==x?void 0:x.ownerState),classes:w,ref:t,children:s}))}))}));function JF(e){return gz("MuiModal",e)}MM("MuiModal",["root","hidden","backdrop"]);const QF=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],eB=OM("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>(0,ns.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),tB=OM(XF,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),nB=s.forwardRef((function(e,t){var n,o,i,a,c,l;const u=PM({name:"MuiModal",props:e}),{BackdropComponent:f=tB,BackdropProps:d,className:p,closeAfterTransition:h=!1,children:m,container:v,component:g,components:y={},componentsProps:b={},disableAutoFocus:w=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:j=!1,disablePortal:O=!1,disableRestoreFocus:S=!1,disableScrollLock:_=!1,hideBackdrop:k=!1,keepMounted:E=!1,onBackdropClick:C,open:A,slotProps:P,slots:I}=u,R=(0,az.A)(u,QF),T=(0,ns.A)({},u,{closeAfterTransition:h,disableAutoFocus:w,disableEnforceFocus:x,disableEscapeKeyDown:j,disablePortal:O,disableRestoreFocus:S,disableScrollLock:_,hideBackdrop:k,keepMounted:E}),{getRootProps:L,getBackdropProps:z,getTransitionProps:M,portalRef:N,isTopModal:D,exited:$,hasTransition:F}=$F((0,ns.A)({},T,{rootRef:t})),B=(0,ns.A)({},T,{exited:$}),W=(e=>{const{open:t,exited:n,classes:r}=e;return lz({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},JF,r)})(B),U={};if(void 0===m.props.tabIndex&&(U.tabIndex="-1"),F){const{onEnter:e,onExited:t}=M();U.onEnter=e,U.onExited=t}const H=null!=(n=null!=(o=null==I?void 0:I.root)?o:y.Root)?n:eB,V=null!=(i=null!=(a=null==I?void 0:I.backdrop)?a:y.Backdrop)?i:f,G=null!=(c=null==P?void 0:P.root)?c:b.root,Z=null!=(l=null==P?void 0:P.backdrop)?l:b.backdrop,K=kz({elementType:H,externalSlotProps:G,externalForwardedProps:R,getSlotProps:L,additionalProps:{ref:t,as:g},ownerState:B,className:cz(p,null==G?void 0:G.className,null==W?void 0:W.root,!B.open&&B.exited&&(null==W?void 0:W.hidden))}),q=kz({elementType:V,externalSlotProps:Z,additionalProps:d,getSlotProps:e=>z((0,ns.A)({},e,{onClick:t=>{C&&C(t),null!=e&&e.onClick&&e.onClick(t)}})),className:cz(null==Z?void 0:Z.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:B});return E||A||F&&!$?(0,r.jsx)(pz,{ref:N,container:v,disablePortal:O,children:(0,r.jsxs)(H,(0,ns.A)({},K,{children:[!k&&f?(0,r.jsx)(V,(0,ns.A)({},q)):null,(0,r.jsx)(UF,{disableEnforceFocus:x,disableAutoFocus:w,disableRestoreFocus:S,isEnabled:D,open:A,children:s.cloneElement(m,U)})]}))}):null})),rB=nB;function oB(e){return gz("MuiPopover",e)}MM("MuiPopover",["root","paper"]);const iB=["onEntering"],aB=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],sB=["slotProps"];function cB(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function lB(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function uB(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function fB(e){return"function"==typeof e?e():e}const dB=OM(rB,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),pB=OM(GM,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),hB=s.forwardRef((function(e,t){var n,o,i;const a=PM({props:e,name:"MuiPopover"}),{action:c,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:p,className:h,container:m,elevation:v=8,marginThreshold:g=16,open:y,PaperProps:b={},slots:w,slotProps:x,transformOrigin:j={vertical:"top",horizontal:"left"},TransitionComponent:O=IF,transitionDuration:S="auto",TransitionProps:{onEntering:_}={},disableScrollLock:k=!1}=a,E=(0,az.A)(a.TransitionProps,iB),C=(0,az.A)(a,aB),A=null!=(n=null==x?void 0:x.paper)?n:b,P=s.useRef(),I=ZM(P,A.ref),R=(0,ns.A)({},a,{anchorOrigin:u,anchorReference:d,elevation:v,marginThreshold:g,externalPaperSlotProps:A,transformOrigin:j,TransitionComponent:O,transitionDuration:S,TransitionProps:E}),T=(e=>{const{classes:t}=e;return lz({root:["root"],paper:["paper"]},oB,t)})(R),L=s.useCallback((()=>{if("anchorPosition"===d)return f;const e=fB(l),t=(e&&1===e.nodeType?e:Y$(P.current).body).getBoundingClientRect();return{top:t.top+cB(t,u.vertical),left:t.left+lB(t,u.horizontal)}}),[l,u.horizontal,u.vertical,f,d]),z=s.useCallback((e=>({vertical:cB(e,j.vertical),horizontal:lB(e,j.horizontal)})),[j.horizontal,j.vertical]),M=s.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=z(t);if("none"===d)return{top:null,left:null,transformOrigin:uB(n)};const r=L();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=pF(fB(l)),u=c.innerHeight-g,f=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>f){const e=s-f;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:uB(n)}}),[l,d,L,z,g]),[N,D]=s.useState(y),$=s.useCallback((()=>{const e=P.current;if(!e)return;const t=M(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,D(!0)}),[M]);s.useEffect((()=>(k&&window.addEventListener("scroll",$),()=>window.removeEventListener("scroll",$))),[l,k,$]);s.useEffect((()=>{y&&$()})),s.useImperativeHandle(c,(()=>y?{updatePosition:()=>{$()}}:null),[y,$]),s.useEffect((()=>{if(!y)return;const e=dF((()=>{$()})),t=pF(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,$]);let F=S;"auto"!==S||O.muiSupportAuto||(F=void 0);const B=m||(l?Y$(fB(l)).body:void 0),W=null!=(o=null==w?void 0:w.root)?o:dB,U=null!=(i=null==w?void 0:w.paper)?i:pB,H=kz({elementType:U,externalSlotProps:(0,ns.A)({},A,{style:N?A.style:(0,ns.A)({},A.style,{opacity:0})}),additionalProps:{elevation:v,ref:I},ownerState:R,className:cz(T.paper,null==A?void 0:A.className)}),V=kz({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:C,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:B,open:y},ownerState:R,className:cz(T.root,h)}),{slotProps:G}=V,Z=(0,az.A)(V,sB);return(0,r.jsx)(W,(0,ns.A)({},Z,!jz(W)&&{slotProps:G,disableScrollLock:k},{children:(0,r.jsx)(O,(0,ns.A)({appear:!0,in:y,onEntering:(e,t)=>{_&&_(e,t),$()},onExited:()=>{D(!1)},timeout:F},E,{children:(0,r.jsx)(U,(0,ns.A)({},H,{children:p}))}))}))})),mB=hB;function vB(e){return gz("MuiMenu",e)}MM("MuiMenu",["root","paper","list"]);const gB=["onEntering"],yB=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],bB={vertical:"top",horizontal:"right"},wB={vertical:"top",horizontal:"left"},xB=OM(mB,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jB=OM(pB,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),OB=OM(fF,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),SB=s.forwardRef((function(e,t){var n,o;const i=PM({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:c,className:l,disableAutoFocusItem:u=!1,MenuListProps:f={},onClose:d,open:p,PaperProps:h={},PopoverClasses:m,transitionDuration:v="auto",TransitionProps:{onEntering:g}={},variant:y="selectedMenu",slots:b={},slotProps:w={}}=i,x=(0,az.A)(i.TransitionProps,gB),j=(0,az.A)(i,yB),O=(()=>{const e=s.useContext(X$);return null!=e&&e})(),S=(0,ns.A)({},i,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:f,onEntering:g,PaperProps:h,transitionDuration:v,TransitionProps:x,variant:y}),_=(e=>{const{classes:t}=e;return lz({root:["root"],paper:["paper"],list:["list"]},vB,t)})(S),k=a&&!u&&p,E=s.useRef(null);let C=-1;s.Children.map(c,((e,t)=>{s.isValidElement(e)&&(e.props.disabled||("selectedMenu"===y&&e.props.selected||-1===C)&&(C=t))}));const A=null!=(n=b.paper)?n:jB,P=null!=(o=w.paper)?o:h,I=kz({elementType:b.root,externalSlotProps:w.root,ownerState:S,className:[_.root,l]}),R=kz({elementType:A,externalSlotProps:P,ownerState:S,className:_.paper});return(0,r.jsx)(xB,(0,ns.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:O?"right":"left"},transformOrigin:O?bB:wB,slots:{paper:A,root:b.root},slotProps:{root:I,paper:R},open:p,ref:t,transitionDuration:v,TransitionProps:(0,ns.A)({onEntering:(e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:O?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:S},j,{classes:m,children:(0,r.jsx)(OB,(0,ns.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:E,autoFocus:a&&(-1===C||u),autoFocusItem:k,variant:y},f,{className:cz(_.list,f.className),children:c}))}))})),_B=SB;function kB(e){return gz("MuiNativeSelect",e)}const EB=MM("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),CB=["className","disabled","error","IconComponent","inputRef","variant"],AB=({ownerState:e,theme:t})=>(0,ns.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,ns.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${EB.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),PB=OM("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:jM,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${EB.multiple}`]:t.multiple}]}})(AB),IB=({ownerState:e,theme:t})=>(0,ns.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${EB.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),RB=OM("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${zM(n.variant)}`],n.open&&t.iconOpen]}})(IB),TB=s.forwardRef((function(e,t){const{className:n,disabled:o,error:i,IconComponent:a,inputRef:c,variant:l="standard"}=e,u=(0,az.A)(e,CB),f=(0,ns.A)({},e,{disabled:o,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return lz({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${zM(n)}`,i&&"iconOpen",r&&"disabled"]},kB,t)})(f);return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(PB,(0,ns.A)({ownerState:f,className:cz(d.select,n),disabled:o,ref:c||t},u)),e.multiple?null:(0,r.jsx)(RB,{as:a,ownerState:f,className:d.icon})]})})),LB=qL;function zB(e){return gz("MuiSelect",e)}const MB=MM("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var NB;const DB=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$B=OM("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${MB.select}`]:t.select},{[`&.${MB.select}`]:t[n.variant]},{[`&.${MB.error}`]:t.error},{[`&.${MB.multiple}`]:t.multiple}]}})(AB,{[`&.${MB.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),FB=OM("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${zM(n.variant)}`],n.open&&t.iconOpen]}})(IB),BB=OM("input",{shouldForwardProp:e=>xM(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function WB(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function UB(e){return null==e||"string"==typeof e&&!e.trim()}const HB=s.forwardRef((function(e,t){var n;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:c,children:l,className:u,defaultOpen:f,defaultValue:d,disabled:p,displayEmpty:h,error:m=!1,IconComponent:v,inputRef:g,labelId:y,MenuProps:b={},multiple:w,name:x,onBlur:j,onChange:O,onClose:S,onFocus:_,onOpen:k,open:E,readOnly:C,renderValue:A,SelectDisplayProps:P={},tabIndex:I,value:R,variant:T="standard"}=e,L=(0,az.A)(e,DB),[z,M]=LB({controlled:R,default:d,name:"Select"}),[N,D]=LB({controlled:E,default:f,name:"Select"}),$=s.useRef(null),F=s.useRef(null),[B,W]=s.useState(null),{current:U}=s.useRef(null!=E),[H,V]=s.useState(),G=ZM(t,g),Z=s.useCallback((e=>{F.current=e,e&&W(e)}),[]),K=null==B?void 0:B.parentNode;s.useImperativeHandle(G,(()=>({focus:()=>{F.current.focus()},node:$.current,value:z})),[z]),s.useEffect((()=>{f&&N&&B&&!U&&(V(c?null:K.clientWidth),F.current.focus())}),[B,c]),s.useEffect((()=>{a&&F.current.focus()}),[a]),s.useEffect((()=>{if(!y)return;const e=Y$(F.current).getElementById(y);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[y]);const q=(e,t)=>{e?k&&k(t):S&&S(t),U||(V(c?null:K.clientWidth),D(e))},Y=s.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(w){n=Array.isArray(z)?z.slice():[];const t=z.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),z!==n&&(M(n),O)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),O(o,e)}w||q(!1,t)}},J=null!==B&&N;let Q,ee;delete L["aria-invalid"];const te=[];let ne=!1,re=!1;(YD({value:z})||h)&&(A?Q=A(z):ne=!0);const oe=Y.map((e=>{if(!s.isValidElement(e))return null;let t;if(w){if(!Array.isArray(z))throw new Error((0,$z.A)(2));t=z.some((t=>WB(t,e.props.value))),t&&ne&&te.push(e.props.children)}else t=WB(z,e.props.value),t&&ne&&(ee=e.props.children);return t&&(re=!0),s.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(Q=w?0===te.length?null:te.reduce(((e,t,n)=>(e.push(t),n<te.length-1&&e.push(", "),e)),[]):ee);let ie,ae=H;!c&&U&&B&&(ae=K.clientWidth),ie=void 0!==I?I:p?null:0;const se=P.id||(x?`mui-component-select-${x}`:void 0),ce=(0,ns.A)({},e,{variant:T,value:z,open:J,error:m}),le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return lz({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${zM(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},zB,t)})(ce),ue=(0,ns.A)({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),fe=KL();return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)($B,(0,ns.A)({ref:Z,tabIndex:ie,role:"combobox","aria-controls":fe,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[y,se].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:e=>{if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),q(!0,e))}},onMouseDown:p||C?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),q(!0,e))},onBlur:e=>{!J&&j&&(Object.defineProperty(e,"target",{writable:!0,value:{value:z,name:x}}),j(e))},onFocus:_},P,{ownerState:ce,className:cz(P.className,le.select,u),id:se,children:UB(Q)?NB||(NB=(0,r.jsx)("span",{className:"notranslate",children:""})):Q})),(0,r.jsx)(BB,(0,ns.A)({"aria-invalid":m,value:Array.isArray(z)?z.join(","):z,name:x,ref:$,"aria-hidden":!0,onChange:e=>{const t=Y.find((t=>t.props.value===e.target.value));void 0!==t&&(M(t.props.value),O&&O(e,t))},tabIndex:-1,disabled:p,className:le.nativeInput,autoFocus:a,ownerState:ce},L)),(0,r.jsx)(FB,{as:v,className:le.icon,ownerState:ce}),(0,r.jsx)(_B,(0,ns.A)({id:`menu-${x||""}`,anchorEl:K,open:J,onClose:e=>{q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:(0,ns.A)({"aria-labelledby":y,role:"listbox","aria-multiselectable":w?"true":void 0,disableListWrap:!0,id:fe},b.MenuListProps),slotProps:(0,ns.A)({},b.slotProps,{paper:(0,ns.A)({},ue,{style:(0,ns.A)({minWidth:ae},null!=ue?ue.style:null)})}),children:oe}))]})})),VB=HB,GB=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],ZB=["root"],KB={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>jM(e)&&"variant"!==e,slot:"Root"},qB=OM(l$,KB)(""),YB=OM(S$,KB)(""),XB=OM(h$,KB)(""),JB=s.forwardRef((function(e,t){const n=PM({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:a={},className:c,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:f=mD,id:d,input:p,inputProps:h,label:m,labelId:v,MenuProps:g,multiple:y=!1,native:b=!1,onClose:w,onOpen:x,open:j,renderValue:O,SelectDisplayProps:S,variant:_="outlined"}=n,k=(0,az.A)(n,GB),E=b?TB:VB,C=WD({props:n,muiFormControl:HD(),states:["variant","error"]}),A=C.variant||_,P=(0,ns.A)({},n,{variant:A,classes:a}),I=(e=>{const{classes:t}=e;return t})(P),R=(0,az.A)(I,ZB),T=p||{standard:(0,r.jsx)(qB,{ownerState:P}),outlined:(0,r.jsx)(YB,{label:m,ownerState:P}),filled:(0,r.jsx)(XB,{ownerState:P})}[A],L=ZM(t,T.ref);return(0,r.jsx)(s.Fragment,{children:s.cloneElement(T,(0,ns.A)({inputComponent:E,inputProps:(0,ns.A)({children:i,error:C.error,IconComponent:f,variant:A,type:void 0,multiple:y},b?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:v,MenuProps:g,onClose:w,onOpen:x,open:j,renderValue:O,SelectDisplayProps:(0,ns.A)({id:d},S)},h,{classes:h?(0,Fz.A)(R,h.classes):R},p?p.props.inputProps:{})},(y&&b||u)&&"outlined"===A?{notched:!0}:{},{ref:L,className:cz(T.props.className,c,I.root)},!p&&{variant:A},k))})}));JB.muiName="Select";const QB=JB;function eW(e){return gz("MuiTextField",e)}MM("MuiTextField",["root"]);const tW=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],nW={standard:l$,filled:h$,outlined:S$},rW=OM(W$,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:c="primary",defaultValue:l,disabled:u=!1,error:f=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:v,inputProps:g,InputProps:y,inputRef:b,label:w,maxRows:x,minRows:j,multiline:O=!1,name:S,onBlur:_,onChange:k,onFocus:E,placeholder:C,required:A=!1,rows:P,select:I=!1,SelectProps:R,type:T,value:L,variant:z="outlined"}=n,M=(0,az.A)(n,tW),N=(0,ns.A)({},n,{autoFocus:i,color:c,disabled:u,error:f,fullWidth:p,multiline:O,required:A,select:I,variant:z}),D=(e=>{const{classes:t}=e;return lz({root:["root"]},eW,t)})(N);const $={};"outlined"===z&&(v&&void 0!==v.shrink&&($.notched=v.shrink),$.label=w),I&&(R&&R.native||($.id=void 0),$["aria-describedby"]=void 0);const F=KL(m),B=h&&F?`${F}-helper-text`:void 0,W=w&&F?`${F}-label`:void 0,U=nW[z],H=(0,r.jsx)(U,(0,ns.A)({"aria-describedby":B,autoComplete:o,autoFocus:i,defaultValue:l,fullWidth:p,multiline:O,name:S,rows:P,maxRows:x,minRows:j,type:T,value:L,id:F,inputRef:b,onBlur:_,onChange:k,onFocus:E,placeholder:C,inputProps:g},$,y));return(0,r.jsxs)(rW,(0,ns.A)({className:cz(D.root,s),disabled:u,error:f,fullWidth:p,ref:t,required:A,color:c,variant:z,ownerState:N},M,{children:[null!=w&&""!==w&&(0,r.jsx)(M$,(0,ns.A)({htmlFor:F,id:W},v,{children:w})),I?(0,r.jsx)(QB,(0,ns.A)({"aria-describedby":B,id:F,labelId:W,value:L,input:H},R,{children:a})):H,h&&(0,r.jsx)(q$,(0,ns.A)({id:B},d,{children:h}))]}))})),iW=oW;var aW=n(9599);function sW(e){return gz("MuiTypography",e)}MM("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const cW=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],lW=OM("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${zM(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>(0,ns.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),uW={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},fW={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},dW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTypography"}),o=(e=>fW[e]||e)(n.color),i=(0,aW.A)((0,ns.A)({},n,{color:o})),{align:a="inherit",className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:f=!1,variant:d="body1",variantMapping:p=uW}=i,h=(0,az.A)(i,cW),m=(0,ns.A)({},i,{align:a,color:o,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:f,variant:d,variantMapping:p}),v=c||(f?"p":p[d]||uW[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return lz({root:["root",i,"inherit"!==e.align&&`align${zM(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},sW,a)})(m);return(0,r.jsx)(lW,(0,ns.A)({as:v,ref:t,ownerState:m,className:cz(g.root,s)},h))})),pW=dW;function hW(e){return gz("MuiInputAdornment",e)}const mW=MM("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var vW;const gW=["children","className","component","disablePointerEvents","disableTypography","position","variant"],yW=OM("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${zM(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>(0,ns.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${mW.positionStart}&:not(.${mW.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),bW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:c=!1,disableTypography:l=!1,position:u,variant:f}=n,d=(0,az.A)(n,gW),p=HD()||{};let h=f;f&&p.variant,p&&!h&&(h=p.variant);const m=(0,ns.A)({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:c,position:u,variant:h}),v=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return lz({root:["root",n&&"disablePointerEvents",o&&`position${zM(o)}`,a,r&&"hiddenLabel",i&&`size${zM(i)}`]},hW,t)})(m);return(0,r.jsx)(UD.Provider,{value:null,children:(0,r.jsx)(yW,(0,ns.A)({as:a,ownerState:m,className:cz(v.root,i),ref:t},d,{children:"string"!=typeof o||l?(0,r.jsxs)(s.Fragment,{children:["start"===u?vW||(vW=(0,r.jsx)("span",{className:"notranslate",children:""})):null,o]}):(0,r.jsx)(pW,{color:"text.secondary",children:o})}))})})),wW=bW;function xW(e){return xW="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},xW(e)}function jW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jW(Object(n),!0).forEach((function(t){SW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=xW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xW(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _W=function(e){var t=e.onLocationChange,n=e.id,o=e.isError,i=tz({matchFrom:"any",limit:500}),a=oT.filter((function(e){return rT.includes(e.code.toLowerCase())}));return(0,r.jsx)(zD,{id:n,sx:{width:"100%",zIndex:"1000"},classes:{inputRoot:"surfer-sidebar-box__location-input-wraper"},options:a,getOptionLabel:function(e){return e.label},isOptionEqualToValue:function(e,t){return(null==e?void 0:e.code)===t.code},defaultValue:{code:"US",label:"United States"},filterOptions:i,onChange:function(e,n){var r=null!=n?null==n?void 0:n.code.toLowerCase():"";t(r)},disablePortal:!0,PopperComponent:function(e){return(0,r.jsx)(LM,OW(OW({},e),{},{placement:"top"}))},renderOption:function(e,t){var n,o=(null==t||null===(n=t.code)||void 0===n?void 0:n.toLowerCase())||"";if(""!=o)return(0,r.jsxs)("li",OW(OW({},e),{},{children:[(0,r.jsx)("img",{loading:"lazy",src:"https://flagcdn.com/24x18/".concat(o,".png"),srcSet:"https://flagcdn.com/24x18/".concat(o,".png"),alt:"",style:{marginRight:"10px"}}),t.label]}))},renderInput:function(e){var t=function(e){var t=oT.find((function(t){return t.label===e}));return t?t.code.toLowerCase():""}(e.inputProps.value);return(0,r.jsx)(iW,OW(OW({},e),{},{id:"surfer-country-select-input",placeholder:"Choose a country",error:o,InputProps:OW(OW({},e.InputProps),{},{className:"surfer-sidebar-box__location-input",startAdornment:(0,r.jsx)(wW,{position:"start",children:""!=t&&(0,r.jsx)("img",{loading:"lazy",src:"https://flagcdn.com/24x18/".concat(t,".png"),srcSet:"https://flagcdn.com/48x36/".concat(t,".png 2x"),alt:""})})}),sx:{"& .MuiOutlinedInput-root":{padding:"5px 0px",paddingLeft:"10px",borderRadius:"8px",color:"#222a3a;",fontSize:"16px",fontWeight:"400",borderColor:"#cbd5e0",marginTop:"4px","& fieldset":{borderColor:"#cbd5e0"},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"#fc8181"},"&:hover fieldset":{borderColor:"#7934cb"},"&.Mui-focused fieldset":{borderColor:"#7934cb",outlineColor:"#7934cb",borderWidth:"3px"}},"& .MuiAutocomplete-listbox":{position:"absolute",zIndex:"1000"},"& .MuiOutlinedInput-root .MuiAutocomplete-input":{outline:"none",border:"0px",padding:"0px"},"& .MuiOutlinedInput-root input::placeholder":{color:"#718096;",opacity:"1"},"& .MuiOutlinedInput-root input::-ms-input-placeholder":{color:"#718096;"},"& .MuiOutlinedInput-root input:-ms-input-placeholder":{color:"#718096;"},"& .MuiOutlinedInput-root input:focus":{outline:"none !important",border:"0px",boxShadow:"none"}}}))}})};function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kW.apply(this,arguments)}const EW=function(e){return s.createElement("svg",kW({viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625zM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5m0 9a1 1 0 1 0 0-2a1 1 0 0 0 0 2",clipRule:"evenodd"}))};function CW(){return CW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CW.apply(this,arguments)}const AW=function(e){return s.createElement("svg",CW({width:"1.2em",height:"1.2em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.24337 1.59998C9.62402 1.59998 9.9326 1.90856 9.9326 2.28921C9.9326 2.66986 9.62402 2.97844 9.24337 2.97844H3.88203C2.95742 2.94398 2.16978 3.7366 2.16978 4.70153L2.16778 11.9375L2.16878 11.9385L2.16979 11.9395C2.17033 12.9039 2.95774 13.6616 3.88203 13.6616H11.1077C11.7554 13.6616 12.3323 13.2999 12.6385 12.7783C12.8136 12.4801 13.0974 12.2208 13.4432 12.2208C13.8635 12.2208 14.1984 12.5885 14.0526 12.9827C13.6129 14.1716 12.4501 15.04 11.1077 15.04H3.88203C2.20403 15.04 0.799988 13.6616 0.799988 11.9385L0.835978 4.70153C0.835978 3.0129 2.20403 1.59998 3.91628 1.59998H9.24337ZM14.4051 8.19994C13.4063 9.64906 11.6265 10.808 8.58773 10.9121C8.49106 11.2653 8.41978 11.5934 8.37161 11.8825C8.31713 12.2094 8.008 12.4302 7.68113 12.3757C7.35427 12.3212 7.13346 12.0121 7.18793 11.6852C7.26409 11.2283 7.38797 10.7009 7.56416 10.14C7.99479 8.7689 8.75353 7.1483 9.94267 5.85998C11.1423 4.56031 12.792 3.58982 14.9577 3.58982H15.5577V4.18982C15.5577 4.67286 15.5149 5.42072 15.2926 6.24713L13.1104 6.83187C12.897 6.88904 12.7703 7.10838 12.8275 7.32176C12.8847 7.53515 13.104 7.66178 13.3174 7.60461L14.9771 7.1599C14.8272 7.50882 14.6396 7.85967 14.4051 8.19994Z",fill:"currentColor"}))};function PW(e){return PW="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},PW(e)}function IW(){IW=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==PW(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(PW(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function RW(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function TW(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){RW(i,r,o,a,s,"next",e)}function s(e){RW(i,r,o,a,s,"throw",e)}a(void 0)}))}}function LW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zW(e,t)}(e,t)||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 zW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var MW=function(){var e=_T(),t=e.setCurrentStep,n=e.setSurferDraft,o=e.wpPostId,i=e.content,a=LW((0,s.useState)(""),2),c=a[0],l=a[1],u=LW((0,s.useState)("us"),2),f=u[0],d=u[1],p=LW((0,s.useState)(!1),2),h=p[0],m=p[1],v=LW((0,s.useState)(!1),2),g=v[0],y=v[1],b=LW((0,s.useState)(!0),2),w=b[0],x=b[1],j=LW((0,s.useState)(!0),2),O=j[0],S=j[1],_=LW((0,s.useState)(""),2),k=_[0],E=_[1],C=function(){var e=TW(IW().mark((function e(){var r,a,s,l;return IW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x(!0),S(!0),E(""),r=!0,(c.length<1||""===c)&&(x(!1),r=!1),(f.length<1||""===f)&&(S(!1),r=!1),r){e.next=8;break}return e.abrupt("return");case 8:return y(!0),e.next=11,fetch(wpsurfer.ajaxurl+"?action=surfer_create_content_editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,keywords:c,location:f,word_count:!1,content:i,post_id:o})});case 11:return a=e.sent,e.next=14,a.json();case 14:(s=e.sent)&&s.id&&s.id>0?(n({draftId:s.id,permalinkHash:s.permalink_hash,folderName:"",keyword:c.split(",")[0],keywords:c.split(","),location:f,title:"",tags:[],editedInSurferDate:"",editedInWordPressDate:"",contentScore:0,is_ai_generated:!1,is_wp_connected:[]}),wpsurfer.default_permalink_hash=s.permalink_hash,wpsurfer.default_draft_id=s.id,y(!1),t("done")):(l="",s&&s.errors?s.errors.map((function(e){l+=e.detail+" "})):l=s&&s.message?s.message:"Unknown error",y(!1),E(l));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=TW(IW().mark((function e(){var t,n,r;return IW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(wpsurfer.ajaxurl+"?action=surfer_get_user_credits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 2:return t=e.sent,e.next=5,t.json();case 5:(n=e.sent)&&n.subscription_credits&&(r=(null==n?void 0:n.overage_balance)||0,m(n.subscription_credits+r));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){A()}),[]),(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{contentEditorCredits:h,showContentEditorCredits:!0}),(0,r.jsx)(Vn,{size:"base",margin:["lg","vertical"],children:Mk("Create a Content Editor (CE) and easily write articles that read well and rank high!","surferseo")}),(0,r.jsxs)($t,{gap:"lg",direction:"column",children:[(0,r.jsxs)(Tg,{htmlFor:"keyword-surfer-keyword-input",children:[Mk("Keyword(s)","surferseo"),(0,r.jsx)(ey,{id:"keyword-surfer-keyword-input",placeholder:Mk("e.g. best SEO tool","surferseo"),onValueChange:function(e){return l(e)},invalid:!w,errorMessage:Mk("Keyword is required","surferseo"),style:{marginTop:"8px"}})]}),(0,r.jsxs)(Tg,{children:[Mk("Location / Languages","surferseo"),(0,r.jsx)(_W,{id:"ks-locations",onLocationChange:d,isError:!O}),!O&&(0,r.jsxs)($t,{gap:"2xs",padding:["xs","top"],children:[(0,r.jsx)(Wn,{color:"red-base",Component:EW}),(0,r.jsx)(Vn,{color:"red-base",size:"sm",children:Mk("Location is required","surferseo")})]})]}),k.length>0&&(0,r.jsx)(cw,{closeIcon:!0,color:"danger",title:Mk("Error"),description:k})]})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){t("start")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:AW,onClick:function(){return C()},loading:g,disabled:!h||g,children:Mk("Create CE for 1 credit","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})},NW=function(){var e=_T(),t=e.surferDraft,n=e.scrapeIsReady;return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Synced with Surfer","surferseo")})})}),(0,r.jsx)(vb,{children:(0,r.jsxs)($t,{direction:"row",gap:"md",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:tL,size:"xlarge"}),(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"regular",children:Mk("Your Content Editor has been updated and synced with WordPress!","surferseo")})]})}),(0,r.jsx)(gb,{children:(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(Ao,{href:"".concat(wpsurfer.surferurl,"/drafts/").concat(t.draftId),target:"_blank",variant:"primary",icon:CT,rightIcon:!0,disabled:!n,loading:!n,children:Mk(n?"Continue in Surfer":"Scrape in progress...","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Back to work","surferseo")})]})})]})};function DW(){return DW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DW.apply(this,arguments)}const $W=function(e){return s.createElement("svg",DW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))};function FW(){return FW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FW.apply(this,arguments)}const BW=function(e){return s.createElement("svg",FW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))};function WW(){return WW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WW.apply(this,arguments)}const UW=function(e){return s.createElement("svg",WW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75"}))};function HW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return VW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VW(e,t)}(e,t)||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 VW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var GW=function(){var e=_T().setCurrentStep,t=HW((0,s.useState)(null),2),n=t[0],o=t[1];return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsxs)($t,{gap:"sm",direction:"column",margin:["lg","top"],className:"surfer-picker",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("What do you want to do?","surferseo")}),(0,r.jsxs)(ts,{type:"radio",checked:"create_new"===n,onChange:function(){return o("create_new")},inputRight:!0,children:[(0,r.jsx)(Wn,{Component:$W}),Mk("Create new Content Editor","surferseo")]},"create_new"),(0,r.jsxs)(ts,{type:"radio",checked:"update_existing"===n,onChange:function(){return o("update_existing")},inputRight:!0,children:[(0,r.jsx)(Wn,{Component:BW}),Mk("Overwrite existing Content Editor","surferseo")]},"update_existing")]})]}),(0,r.jsx)(gb,{children:(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:UW,rightIcon:!0,onClick:function(){n&&e(n)},disabled:!n,children:Mk("Next","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})})]})};function ZW(e){return ZW="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},ZW(e)}function KW(){KW=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==ZW(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(ZW(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function qW(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function YW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return XW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XW(e,t)}(e,t)||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 XW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JW=function(e){var t=_T(),n=t.setCurrentStep,o=t.setSurferDraft,i=t.surferTempDraft,a=t.wpPostId,c=t.content,l=YW((0,s.useState)(!1),2),u=l[0],f=l[1],d=YW((0,s.useState)(""),2),p=d[0],h=d[1],m="";m=Array.isArray(i.keywords)&&i.keywords.length>1?i.keywords.join(", "):i.keyword;var v=function(){var e,t=(e=KW().mark((function e(){var t,r,s;return KW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),h(""),e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_update_content_editor",{method:"POST",headers:{"Content-Type":"application/json","api-key":wpsurfer.api_key},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,draft_id:i.draftId,content:c,post_id:a,permalink_hash:i.permalinkHash,keywords:i.keywords,location:i.location})});case 4:return t=e.sent,e.next=7,t.json();case 7:r=e.sent,f(!1),r&&"Draft updated"==r.message?(wpsurfer.default_permalink_hash=i.permalinkHash,wpsurfer.default_draft_id=i.draftId,wpsurfer.post_is_scraped=!0,o(i),n("done")):(s="",r.errors?r.errors.map((function(e){s+=e.detail+" "})):s=r.message?r.message:"Unknown error",h(s));case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){qW(i,r,o,a,s,"next",e)}function s(e){qW(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsxs)($t,{gap:"lg",direction:"column",margin:["lg","top"],children:[(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(Rn,{style:{maxWidth:"40px"},children:(0,r.jsx)(F_,{score:{value:i.contentScore},mode:"compact",children:(0,r.jsx)(B_,{})})}),(0,r.jsx)(go,{href:"".concat(wpsurfer.surferurl,"/drafts/").concat(i.draftId),target:"_blank",variant:"standalone",icon:CT,children:Mk("Open in a new tab","surferseo")})]}),i.folderName&&(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Folder","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.folderName})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Keyword(s)","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:m})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Location","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.location})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Title","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.title?i.title:Mk("(no title)","surferseo")})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Tags","surferseo")}),(0,r.jsx)($t,{direction:"row",gap:"sm",alignItems:"flex-start",children:i.tags?i.tags.map((function(e){return(0,r.jsx)(sg,{color:"secondary",children:e},e)})):Mk("No tags","surferseo")})]}),(0,r.jsxs)($t,{gap:"5xl",children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",children:Mk("Last edit in Surfer","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:vL(i.editedInWordPressDate,i.editedInSurferDate)?"black":"orange-base",weight:"medium",children:i.editedInSurferDate})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",children:Mk("Last edit in WordPress","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:vL(i.editedInWordPressDate,i.editedInSurferDate)?"green-base":"black",weight:"medium",children:i.editedInWordPressDate})]})]}),!vL(i.editedInWordPressDate,i.editedInSurferDate)&&(0,r.jsx)(cw,{color:"warning",title:Mk("There is the newer version of the article in Surfer","surferseo"),description:Mk("You can overwrite it with this one","surferseo")}),""!==p&&(0,r.jsx)(cw,{color:"danger",description:p,title:Mk("There was an error during export!","surferseo")})]})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){n("update_existing")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:bL,onClick:function(){v()},loading:u,disabled:u,children:Mk("Overwrite the CE","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})};function QW(){return QW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW.apply(this,arguments)}const eU=function(e){return s.createElement("svg",QW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09m8.445-7.188L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456m-1.365 11.852L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183l.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394l-1.183.394a2.25 2.25 0 0 0-1.423 1.423"}))};function tU(){return tU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tU.apply(this,arguments)}const nU=function(e){return s.createElement("svg",tU({width:"1.2em",height:"1.2em",id:"icon-wordpress",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{d:"M10 0C4.48889 0 0 4.48444 0 10C0 15.5111 4.48889 20 10 20C15.5111 20 20 15.5111 20 10C20 4.48444 15.5111 0 10 0ZM1.00889 10C1.00889 8.69778 1.28889 7.45778 1.78667 6.34222L6.07556 18.0933C3.07556 16.6311 1.00889 13.5556 1.00889 10ZM10 18.9911C9.11556 18.9911 8.26667 18.8622 7.45778 18.6222L10.1556 10.7822L12.9156 18.3556C12.9378 18.4 12.9556 18.44 12.9822 18.48C12.0533 18.8089 11.0489 18.9911 10 18.9911ZM11.24 5.78667C11.7822 5.76 12.2667 5.70222 12.2667 5.70222C12.7511 5.64444 12.6933 4.93333 12.2089 4.96C12.2089 4.96 10.7511 5.07111 9.81333 5.07111C8.92889 5.07111 7.44444 4.96 7.44444 4.96C6.96 4.93333 6.90222 5.67556 7.38667 5.70222C7.38667 5.70222 7.84444 5.76 8.32889 5.78667L9.72889 9.62667L7.76 15.5244L4.48444 5.78667C5.02667 5.76 5.51111 5.70222 5.51111 5.70222C5.99556 5.64444 5.93778 4.93333 5.45333 4.96C5.45333 4.96 3.99556 5.07111 3.05778 5.07111C2.88889 5.07111 2.68889 5.06667 2.47556 5.05778C4.08444 2.61778 6.84444 1.00444 9.98667 1.00444C12.3244 1.00444 14.4578 1.89778 16.0578 3.36444C16.0178 3.36 15.9822 3.35556 15.9422 3.35556C15.0578 3.35556 14.4356 4.12444 14.4356 4.95111C14.4356 5.69333 14.8622 6.32 15.32 7.05778C15.6622 7.65333 16.0622 8.42667 16.0622 9.53778C16.0622 10.3067 15.7689 11.2 15.3778 12.4444L14.4844 15.44L11.24 5.78667ZM14.52 17.7689L17.2667 9.83111C17.7778 8.54667 17.9511 7.52444 17.9511 6.60889C17.9511 6.28 17.9289 5.97333 17.8889 5.68444C18.5911 6.96889 18.9911 8.43556 18.9911 10C18.9911 13.32 17.1956 16.2133 14.52 17.7689Z",fill:"currentColor"}))};var rU=function(e){var t=e.selectedDraftId,n=e.draftDetails,o=e.setSurferDraft;return(0,r.jsx)(ts,{type:"radio",checked:n.draftId===t,onChange:function(){o(n)},inputRight:!0,children:(0,r.jsxs)($t,{direction:"row",gap:"base",alignItems:"center",style:{maxWidth:"calc(100% - 36px)"},children:[(0,r.jsx)(Rn,{style:{maxWidth:"40px"},children:(0,r.jsx)(F_,{score:{value:n.contentScore},mode:"compact",children:(0,r.jsx)(B_,{})})}),(0,r.jsxs)($t,{direction:"column",children:[(0,r.jsx)(Vn,{size:"sm",color:"gray-100",weight:"semibold",children:n.folderName&&n.folderName}),(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"semibold",children:n.keyword&&n.keyword}),(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"regular",children:n.keywords&&n.keywords.length>1?"+".concat(n.keywords.length-1," more"):""}),n.is_ai_generated&&(0,r.jsx)(Wn,{Component:eU,size:"small"}),n.is_wp_connected&&(0,r.jsx)(Wn,{Component:nU,size:"small"})]}),(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:n.title?n.title:" "})]})]})},"create_new")};function oU(e){return oU="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},oU(e)}function iU(){iU=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==oU(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(oU(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function aU(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function sU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cU(e,t)}(e,t)||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 cU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lU=function(){var e=_T(),t=e.setCurrentStep,n=e.surferTempDraft,o=e.setSurferTempDraft,i=sU((0,s.useState)(""),2),a=i[0],c=i[1],l=sU((0,s.useState)(""),2),u=l[0],f=l[1],d=sU((0,s.useState)([]),2),p=d[0],h=d[1],m=sU((0,s.useState)(!1),2),v=m[0],g=m[1],y=(0,s.useRef)(null),b=nT(function(){var e,t=(e=iU().mark((function e(t){var n,r,o,i;return iU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y.current&&y.current.abort(),n=new AbortController,y.current=n,r=t||"",g(!0),e.next=7,fetch(wpsurfer.ajaxurl+"?action=surfer_get_user_drafts",{method:"POST",headers:{"Content-Type":"application/json","api-key":wpsurfer.api_key},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,query:r}),signal:n.signal});case 7:return o=e.sent,e.next=10,o.json();case 10:i=e.sent,g(!1),h(i.drafts);case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){aU(i,r,o,a,s,"next",e)}function s(e){aU(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),400);return(0,s.useEffect)((function(){b()}),[]),(0,s.useEffect)((function(){var e=a.trim().length>=1?a:void 0;u!==e&&b(e),f(e)}),[a]),(0,r.jsxs)(db,{size:"base",fullWidth:!0,scrollBody:!0,zIndex:1e3,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsx)(Rn,{margin:["md","vertical"],children:(0,r.jsx)(ey,{id:"surfer-search-by-keyword",icon:fL,placeholder:Mk("Search by keyword","surferseo"),value:a,size:"base",onValueChange:function(e){c(e)}})}),v?(0,r.jsx)($t,{justifyContent:"center",alignItems:"center",fullWidth:!0,style:{height:"200px"},children:(0,r.jsx)(or,{size:"large"})}):(0,r.jsx)($t,{gap:"md",direction:"column",className:"surfer-picker",style:{minHeight:"200px"},children:p&&p.length>0?p.map((function(e){return(0,r.jsx)(rU,{selectedDraftId:n.draftId,draftDetails:e,setSurferDraft:o},e.draftId)})):(0,r.jsx)($t,{justifyContent:"center",alignItems:"center",fullWidth:!0,style:{minHeight:"200px"},children:Mk("No drafts found","surferseo")})})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){t("start")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:UW,rightIcon:!0,onClick:function(){t("update_confirm")},disabled:0===n.draftId,children:Mk("Next","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})},uU=function(e){var t=e.mode,n=e.BeforeButtonText,o=e.buttonSize,i=e.SyncWithLabel||Mk("Optimize with Surfer","surferseo"),a=e.EditInSurferLabel||Mk("Edit in Surfer","surferseo"),s=_T(),c=s.currentStep,l=s.setCurrentStep,u=s.surferDraft,f=s.handleDisconnect,d=s.disconectionLoading,p=s.scrapeIsReady;return u.draftId>0&&-1==p?(0,r.jsx)(cw,{color:"warning",title:Mk("Content Editor Failed","surferseo"),description:Mk("There was some error during Content Editor processing.","surferseo"),children:(0,r.jsx)(sw,{children:(0,r.jsx)(hr,{onClick:f,fullWidth:!0,loading:d,disabled:d,size:"full"==t?"small":"xsmall",children:Mk("Disconnect","surferseo")})})}):u.draftId>0&&(!u.permalinkHash||""===u.permalinkHash)?(0,r.jsx)(cw,{color:"warning",title:Mk("Your post needs attention","surferseo"),description:Mk("This post was connected to our previous plugin version. Please disconnect and reconnect it to make sure it continues to work properly.","surferseo"),children:(0,r.jsx)(sw,{children:(0,r.jsx)(hr,{onClick:f,fullWidth:!0,loading:d,disabled:d,size:"full"==t?"small":"xsmall",children:Mk("Disconnect","surferseo")})})}):u.draftId>0&&p&&"done"!==c?"button"===t?(0,r.jsxs)(Ao,{variant:"primary",target:"_blank",size:null!=o?o:"base",href:"".concat(wpsurfer.surferurl,"/drafts/").concat(u.draftId),fullWidth:!0,style:{maxWidth:"100%",boxSizing:"border-box"},onClick:function(e){return Wk("drop_monitor","edit_in_surfer: DRAFT ID: "+u.draftId)},children:[a,(0,r.jsx)(Wn,{Component:CT})]}):"full"===t?(0,r.jsx)(VL,{}):(0,r.jsx)(cw,{color:"danger",title:Mk("Something went wrong...","surferseo"),description:Mk("Scrape process is still in progress...","surferseo")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(qR,{}),(0,r.jsxs)(fb,{onOpenChange:function(e){e||l("start")},children:[!(u.draftId>0)&&n&&(0,r.jsx)(Vn,{color:"gray-140",size:"base",weight:"regular",padding:["md","bottom"],children:n}),!(u.draftId>0)&&(0,r.jsx)(pb,{children:(0,r.jsx)(hr,{variant:"primary",fullWidth:!0,size:null!=o?o:"base",children:i})}),"start"===c&&(0,r.jsx)(GW,{}),"create_new"===c&&(0,r.jsx)(MW,{}),"update_existing"===c&&(0,r.jsx)(lU,{}),"update_confirm"===c&&(0,r.jsx)(JW,{}),"done"===c&&(0,r.jsx)(NW,{})]}),u.draftId>0&&!p&&(0,r.jsx)($t,{direction:"column",gap:"sm",children:"full"==t?(0,r.jsx)(cw,{title:Mk("Just a few seconds","surferseo"),description:Mk("We analyze search results to give you the best recommendations.","surferseo")}):(0,r.jsx)(hr,{variant:"primary",loading:!0,disabled:!0,fullWidth:!0,size:null!=o?o:"base",children:i})})]})},fU=n(8287).hp;const dU="function"==typeof fU,pU="function"==typeof TextDecoder?new TextDecoder:void 0,hU=("function"==typeof TextEncoder&&new TextEncoder,Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")),mU=(e=>{let t={};return e.forEach(((e,n)=>t[e]=n)),t})(hU),vU=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,gU=String.fromCharCode.bind(String),yU="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),bU=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),wU=e=>{let t,n,r,o,i="";const a=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=hU[t>>18&63]+hU[t>>12&63]+hU[t>>6&63]+hU[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},xU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jU=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return gU(55296+(t>>>10))+gU(56320+(1023&t));case 3:return gU((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return gU((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},OU=e=>e.replace(xU,jU),SU=e=>{if(e=e.replace(/\s+/g,""),!vU.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,o="";for(let i=0;i<e.length;)t=mU[e.charAt(i++)]<<18|mU[e.charAt(i++)]<<12|(n=mU[e.charAt(i++)])<<6|(r=mU[e.charAt(i++)]),o+=64===n?gU(t>>16&255):64===r?gU(t>>16&255,t>>8&255):gU(t>>16&255,t>>8&255,255&t);return o},_U="function"==typeof atob?e=>atob(bU(e)):dU?e=>fU.from(e,"base64").toString("binary"):SU,kU=dU?e=>yU(fU.from(e,"base64")):e=>yU(_U(e).split("").map((e=>e.charCodeAt(0)))),EU=dU?e=>fU.from(e,"base64").toString("utf8"):pU?e=>pU.decode(kU(e)):e=>OU(_U(e)),CU=e=>bU(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),AU=e=>EU(CU(e)),PU=AU;function IU(){return IU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IU.apply(this,arguments)}const RU=function(e){return s.createElement("svg",IU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"currentColor",d:"M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875zM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 0 1-1.875-1.875zM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 0 1 3 19.875z"}))};function TU(){return TU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TU.apply(this,arguments)}const LU=function(e){return s.createElement("svg",TU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.042 21.672L13.684 16.6m0 0l-2.51 2.225l.569-9.47l5.227 7.917zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59"}))};function zU(){return zU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zU.apply(this,arguments)}const MU=function(e){return s.createElement("svg",zU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("path",{d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178"}),s.createElement("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"})))};function NU(){return NU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NU.apply(this,arguments)}const DU=function(e){return s.createElement("svg",NU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875zm6.75-4.5c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125zm6.75-4.5c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125z"}))};var $U=function(e){var t=e.postId,n=e.draftId,o=e.scrapeStatus,i=e.content,a=e.stats,s=e.currentPeriod,c=e.previousPeriod,l=e.permalinkHash,u=JSON.parse(a);return(0,r.jsxs)($t,{direction:"column",gap:"md",children:[(0,r.jsx)(cu,{content:(0,r.jsx)(FU,{previousClicks:u.clicksPrev,previousImpressions:u.impressionsPrev,previousPosition:u.positionPrev,currentPeriod:s,previousPeriod:c}),children:(0,r.jsxs)(Rn,{children:[(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:RU,size:"small",color:u.position<u.positionPrev?"green-base":"red-base"}),(0,r.jsx)(Vn,{color:u.position<u.positionPrev?"green-base":"red-base",children:"".concat(u.positionWithSufix," ").concat(Mk(" position","surferseo"))})]}),(0,r.jsx)(Wn,{Component:u.position<u.positionPrev?QT:rL,size:"small",color:u.position<u.positionPrev?"green-base":"red-base"})]}),(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:LU,size:"small"}),u.clicks]}),(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:MU,size:"small"}),u.impressions]})]})]})}),(0,r.jsx)(kT,{wpPostId:t,content:PU(i),draftId:n,scrapeStatus:o,permalinkHash:l,children:(0,r.jsx)(uU,{mode:"button",buttonSize:"xsmall"})})]})},FU=function(e){var t=e.currentPeriod,n=e.previousPeriod,o=e.previousPosition,i=e.previousClicks,a=e.previousImpressions;return(0,r.jsxs)($t,{direction:"column",gap:"base",padding:["sm","all"],children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",color:"white-base",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("7 days ago:","surferseo")}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:DU,size:"small",style:{marginRight:"4px"}}),"".concat(o," ").concat(Mk("position","surferseo"))]}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:MU,size:"small",style:{marginRight:"4px"}}),"".concat(a," ").concat(Mk("impressions","surferseo"))]}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:LU,size:"small",style:{marginRight:"4px"}}),"".concat(i," ").concat(Mk("clicks","surferseo"))]})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("Current Period:","surferseo")}),(0,r.jsx)(Vn,{color:"white-base",children:t})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("Previous Period:","surferseo")}),(0,r.jsx)(Vn,{color:"white-base",children:n})]})]})};function BU(e){return BU="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},BU(e)}function WU(){WU=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==BU(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(BU(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function UU(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function HU(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){UU(i,r,o,a,s,"next",e)}function s(e){UU(i,r,o,a,s,"throw",e)}a(void 0)}))}}function VU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return GU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GU(e,t)}(e,t)||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 GU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ZU=function(){var e=VU((0,s.useState)(!1),2),t=e[0],n=e[1],o=VU((0,s.useState)(!1),2),i=o[0],a=o[1],c=VU((0,s.useState)(""),2),l=c[0],u=c[1],f=_T().wpPostId,d=function(){var e=HU(WU().mark((function e(){var t,n;return WU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a(!0),!f){e.next=9;break}return e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_get_post_json_schema",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,post_id:f})});case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,u(n.data.schema);case 9:a(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=HU(WU().mark((function e(){return WU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n(!0),!f){e.next=4;break}return e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_save_post_json_schema",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,post_id:f,json_schema:l})});case 4:n(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){d()}),[]),i?(0,r.jsx)($t,{fullWidth:!0,justifyContent:"center",children:(0,r.jsx)(or,{})}):(0,r.jsx)("section",{className:"surfer-json-schema",children:(0,r.jsxs)($t,{direction:"column",gap:"sm",children:[(0,r.jsxs)(Vn,{children:["JSON Schema is a vocabulary that allows you to annotate and validate JSON. Read more ",(0,r.jsx)("a",{href:"https://json-schema.org/",children:"here"}),"."]}),(0,r.jsx)(wx,{value:l,onValueChange:function(e){return u(e)}}),(0,r.jsx)(hr,{variant:"primary",fullWidth:!0,onClick:function(){return p()},loading:t,disabled:t,children:Mk("Save schema","surferseo")})]})})},KU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M11.5 5H2.5C2.22386 5 2 5.22386 2 5.5V12.5C2 12.7761 2.22386 13 2.5 13H11.5C11.7761 13 12 12.7761 12 12.5V5.5C12 5.22386 11.7761 5 11.5 5Z",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M4 5V3.5C4 3.36739 4.05268 3.24021 4.14645 3.14645C4.24021 3.05268 4.36739 3 4.5 3H13.5C13.6326 3 13.7598 3.05268 13.8536 3.14645C13.9473 3.24021 14 3.36739 14 3.5V10.5C14 10.6326 13.9473 10.7598 13.8536 10.8536C13.7598 10.9473 13.6326 11 13.5 11H12",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M2 7H12",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},qU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M8 1.5V14.5",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M11.5 5.5C11.5 5.1717 11.4353 4.84661 11.3097 4.54329C11.1841 4.23998 10.9999 3.96438 10.7678 3.73223C10.5356 3.50009 10.26 3.31594 9.95671 3.1903C9.65339 3.06466 9.3283 3 9 3H6.75C6.08696 3 5.45107 3.26339 4.98223 3.73223C4.51339 4.20107 4.25 4.83696 4.25 5.5C4.25 6.16304 4.51339 6.79893 4.98223 7.26777C5.45107 7.73661 6.08696 8 6.75 8H9.5C10.163 8 10.7989 8.26339 11.2678 8.73223C11.7366 9.20107 12 9.83696 12 10.5C12 11.163 11.7366 11.7989 11.2678 12.2678C10.7989 12.7366 10.163 13 9.5 13H6.5C5.83696 13 5.20107 12.7366 4.73223 12.2678C4.26339 11.7989 4 11.163 4 10.5",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},YU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M7.9998 8H13.4998C13.5011 9.27417 13.0605 10.5094 12.2531 11.495C11.4457 12.4807 10.3214 13.1559 9.07193 13.4054C7.82244 13.6549 6.52508 13.4634 5.40099 12.8635C4.2769 12.2636 3.39566 11.2924 2.90748 10.1154C2.4193 8.9385 2.3544 7.62868 2.72384 6.40926C3.09328 5.18983 3.87419 4.13627 4.93346 3.42815C5.99274 2.72004 7.2648 2.4012 8.53284 2.52599C9.80088 2.65079 10.9864 3.21148 11.8873 4.1125",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},XU=function(e){var t=e.size,n=void 0===t?"36":t;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4702 4.44598C6.58699 4.44598 3.439 7.59398 3.439 11.4772V20.0048H1.95282L4.83744 24.1875L7.72205 20.0048H6.2515V11.4772C6.2515 9.14728 8.14029 7.25848 10.4702 7.25848H25.0434C27.1488 7.25848 28.8555 8.96521 28.8555 11.0706H31.668C31.668 7.41191 28.7021 4.44598 25.0434 4.44598H10.4702ZM19.9817 25.0529H22.5057C22.8663 25.0529 23.0826 24.7644 23.0826 24.4759V12.7211C23.0826 12.3606 22.7942 12.1442 22.5057 12.1442H19.9817C19.6211 12.1442 19.4047 12.4327 19.4047 12.7211V24.4759C19.4047 24.7644 19.6932 25.0529 19.9817 25.0529ZM12.4817 25.0529H15.0057C15.3663 25.0529 15.5827 24.7644 15.5827 24.4759V16.9759C15.5827 16.6154 15.2942 16.399 15.0057 16.399H12.4817C12.1211 16.399 11.9048 16.6875 11.9048 16.9759V24.4038C11.9048 24.7644 12.1932 25.0529 12.4817 25.0529ZM27.3849 17.1112H28.8555V25.6388C28.8555 27.9687 26.9667 29.8575 24.6367 29.8575H10.0636C7.95822 29.8575 6.2515 28.1508 6.2515 26.0454H3.439C3.439 29.7041 6.40492 32.67 10.0636 32.67H24.6367C28.52 32.67 31.668 29.522 31.668 25.6388V17.1112H33.1542L30.2696 12.9285L27.3849 17.1112Z"}))},JU=function(e){var t=e.overlapping_pages,n=e.search_volume,o=e.cpc,i=e.className;return(0,r.jsxs)("div",{className:i,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(KU,{tip:Mk("Overlapping Pages","surferseo")}),(0,r.jsxs)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Overlapping Pages","surferseo"),children:[5*t,"%"]})]}),(0,r.jsxs)("div",{className:"align-baseline",children:[(0,r.jsx)(YU,{tip:Mk("Search Volume","surferseo")}),(0,r.jsx)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Search Volume","surferseo"),children:n})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(qU,{tip:Mk("Cost per Click","surferseo")}),(0,r.jsx)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Cost per Click","surferseo"),children:Math.round(100*o)/100})]})]})},QU=n(3790),eH=n.n(QU),tH=n(4987),nH=n.n(tH);function rH(e){return rH="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},rH(e)}function oH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oH(Object(n),!0).forEach((function(t){aH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=rH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rH(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sH(e){return function(e){if(Array.isArray(e))return pH(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dH(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 cH(){cH=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==rH(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(rH(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function lH(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function uH(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){lH(i,r,o,a,s,"next",e)}function s(e){lH(i,r,o,a,s,"throw",e)}a(void 0)}))}}function fH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||dH(e,t)||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 dH(e,t){if(e){if("string"==typeof e)return pH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pH(e,t):void 0}}function pH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hH=function(e){return{keywords:function(e,t,n){var r=new URL("https://db3.keywordsur.fr/api/ks/keywords");return r.searchParams.set("country",e.country.toUpperCase()),r.searchParams.set("keywords",JSON.stringify(t)),[r.toString(),{method:"GET"}]},domainsOffPage:function(e,t,n){var r=new URL("https://db3.keywordsur.fr/api/ks/domains");return r.searchParams.set("country",e.country.toUpperCase()),r.searchParams.set("domains",JSON.stringify(t)),[r.toString(),{method:"GET"}]},urlsOnPage:function(e,t,n){var r=new URL("https://db.keywordsur.fr/urlsOnPage");return Object.entries(e).forEach((function(e){var t=fH(e,2),n=t[0],o=t[1];r.searchParams.set(n,o.toString())})),[r.toString(),{method:"POST",headers:{"x-recaptcha-token":n[0]},body:JSON.stringify(t)}]}}[e]},mH={keywords:5,domainsOffPage:5,urlsOnPage:1},vH=function(e,t){var n=window.performance.now();return fetch(e,t).then((function(t){var r=window.performance.now()-n;return Math.random()<.05&&fetch("https://db2.keywordsur.fr/timing",{headers:{"x-timing-request-duration-ms":r.toString(),"x-timing-request-category":new URL(e).pathname,"x-timing-client-version":"1.0.0"}}),t}))},gH=function(){var e=uH(cH().mark((function e(t,n,r,o){var i,a,s,c,l,u,f,d=arguments;return cH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>4&&void 0!==d[4]?d[4]:null,a={},s=[],c=function(e){return"surfer-db-cache-".concat(t,"-v11:").concat(e,"-").concat(JSON.stringify(r))},e.next=6,Promise.all(n.map(function(){var e=uH(cH().mark((function e(t){var n;return cH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eH().getItem(c(t));case 2:(n=e.sent)?a[t]=n:s.push(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(!(s.length>0)){e.next=12;break}return e.next=9,Promise.all((0,gt.chunk)(s,mH[t]).map((function(e){var n=fH(hH(t)(r,e,o),2),a=n[0],s=n[1],c=vH(a,s).then((function(e){return e.json()})).catch((function(){return Object.fromEntries(e.map((function(e){return[e,"failed"]})))})),l=new Promise(null==i?function(){return null}:function(t){return setTimeout((function(){return t(Object.fromEntries(e.map((function(e){return[e,"failed"]}))))}),i)});return Promise.race([c,l])})));case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=[{}];case 13:return l=e.t0,u=Object.assign.apply(Object,[{}].concat(sH(l))),Object.entries(u).forEach((function(e){var t=fH(e,2),n=t[0],r=t[1];"failed"!==r&&eH().setItem(c(n),r)})),f=Object.fromEntries(Object.entries(u).map((function(e){var t=fH(e,2),n=t[0],r=t[1];return[n,"failed"===r?{}:r]}))),e.abrupt("return",iH(iH({},a),f));case 18:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),yH=nH()(gH);function bH(e){return bH="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},bH(e)}function wH(){wH=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==bH(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bH(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xH(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function jH(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xH(i,r,o,a,s,"next",e)}function s(e){xH(i,r,o,a,s,"throw",e)}a(void 0)}))}}var OH=function(){var e=jH(wH().mark((function e(t){var n,r,o,i,a,s,c;return wH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.mainKeyword,r=t.location,o=t.setIsLoading,i=t.setIsError,a=t.setResearchDetails,s=t.setHasResults,o(!0),s(!1),e.next=5,SH(2e3);case 5:return e.next=7,fetch(wpsurfer.ajaxurl+"?action=surfer_track_keyword_research_usage",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:n,location:r,_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 7:return e.sent,e.prev=8,e.next=11,_H(n.trim().toLocaleLowerCase(),r);case 11:c=e.sent,a(c[0]),o(!1),s(!0),e.next=22;break;case 17:e.prev=17,e.t0=e.catch(8),o(!1),i(!0),console.error(e.t0);case 22:case"end":return e.stop()}}),e,null,[[8,17]])})));return function(t){return e.apply(this,arguments)}}(),SH=function(e){return new Promise((function(t){return setTimeout(t,e)}))},_H=function(){var e=jH(wH().mark((function e(t,n){var r,o;return wH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=["",""],e.next=3,yH("keywords",[t.trim().toLocaleLowerCase()],{country:n},r);case 3:return o=e.sent,e.abrupt("return",[{el:null,keyword:t}].map((function(e){return{keyword:e.keyword,el:e.el,data:o[e.keyword]}})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),kH=function(e){var t=e.keyword,n=e.newResearchParams,o=e.setKeywordInputValue,i=Mk("Copy to clipboard","surferseo"),a=q_(Mk("Generate Keyword Ideas for: %s","surferseo"),t);return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[(0,r.jsx)(cu,{content:a,children:(0,r.jsx)(hr,{onClick:function(e){e.preventDefault,OH(n),o(t)},type:"button",variant:"secondary",size:"xsmall",icon:fL,"aria-label":a})}),(0,r.jsx)(cu,{content:i,children:(0,r.jsx)(hr,{onClick:function(e){e.preventDefault(),navigator.clipboard.writeText(t)},type:"button",variant:"secondary",size:"xsmall","aria-label":i,children:Mk("Copy","surferseo")})})]})};function EH(e){return EH="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},EH(e)}function CH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CH(Object(n),!0).forEach((function(t){PH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=EH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=EH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==EH(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var IH=function(e){var t=e.keyword,n=e.overlapping_pages,o=e.search_volume,i=e.cpc,a=e.newResearchParams,s=e.setKeywordInputValue;return(0,r.jsxs)("div",{className:"keyword-surfer-grid__row",children:[(0,r.jsxs)("div",{className:"keyword-surfer-grid__row-major",children:[(0,r.jsx)("div",{children:t}),(0,r.jsxs)("div",{className:"keyword-surfer-grid__row-actions",children:[(0,r.jsx)(JU,{overlapping_pages:n,search_volume:o,cpc:i,className:"keyword-surfer-small surfer-hide-in-sidebar"}),(0,r.jsx)("div",{className:"surfer-hide-in-sidebar",children:"·"}),(0,r.jsx)(kH,{keyword:t,setKeywordInputValue:s,newResearchParams:AH(AH({},a),{},{mainKeyword:t})})]})]}),(0,r.jsx)(JU,{overlapping_pages:n,search_volume:o,cpc:i,className:"keyword-surfer-fullw surfer-hide-in-postbox"})]})},RH=function(e){var t,n,o=e.data,i=e.keyword,a=e.newResearchParams,s=e.setKeywordInputValue,c=0|(null==o||null===(t=o.similar_keywords)||void 0===t?void 0:t.length);return 0===i.length?null:(0,r.jsxs)("div",{className:"keyword-surfer-grid",children:[c>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:Mk("Keyword Ideas","surferseo")}),(0,r.jsx)("div",{children:null==o||null===(n=o.similar_keywords)||void 0===n?void 0:n.map((function(e,t){return(0,r.jsx)(IH,{keyword:e.keyword,cpc:e.cpc,overlapping_pages:e.overlapping_pages,search_volume:e.search_volume,newResearchParams:a,setKeywordInputValue:s},t)}))})]}),c<1&&(0,r.jsxs)("div",{className:"keyword-surfer-grid__no-results",children:[(0,r.jsx)("img",{src:wpsurfer.baseurl+"assets/images/sad_surfy.svg",alt:"Sad Surfy",style:{marginBottom:"2rem"}}),(0,r.jsx)("p",{children:Mk("Sorry, we do not have results for this keyword. Please try different one","surferseo")})]})]})};function TH(){return TH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TH.apply(this,arguments)}const LH=function(e){return s.createElement("svg",TH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25"}))};function zH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return MH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MH(e,t)}(e,t)||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 MH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NH=function(){var e,t=(e=wpsurfer.wp_language,rT.includes(e)?e:"us"),n=zH((0,s.useState)(""),2),o=n[0],i=n[1],a=zH((0,s.useState)(t),2),c=a[0],l=a[1],u=zH((0,s.useState)({el:null,data:null,keyword:""}),2),f=u[0],d=u[1],p=zH((0,s.useState)(!1),2),h=p[0],m=p[1],v=zH((0,s.useState)(!1),2),g=v[0],y=v[1],b=zH((0,s.useState)(!1),2),w=b[0],x=b[1],j=(0,s.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:"keyword-surfer",children:[(0,r.jsxs)("form",{id:"surfer-keyword-research-from",className:"keyword-surfer__form",style:{opacity:h?"0.64":"1.0"},onSubmit:function(e){e.preventDefault(),0!==o.length&&c?OH({mainKeyword:o,location:c,setIsLoading:m,setIsError:x,setResearchDetails:d,setHasResults:y}):y(!0)},children:[(0,r.jsxs)("p",{className:"keyword-surfer__tool-instruction",children:[Mk("Generate keyword ideas and get data on monthly traffic and cost per click. ","surferseo"),(0,r.jsx)("a",{href:wpsurfer.learnmore_url,className:"no-underline",target:"_blank",children:Mk("Learn more","surferseo")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Tg,{htmlFor:"keyword-surfer-keyword-input",children:Mk("Keyword(s)","surferseo")}),(0,r.jsx)(ey,{id:"keyword-surfer-keyword-input",ref:j,icon:LH,placeholder:Mk("e.g. best seo tool","surferseo"),size:"base",onValueChange:i,style:{width:"100%"},invalid:g&&0===o.length,errorMessage:Mk("Please provide keyword.","surferseo")})]}),(0,r.jsx)("div",{children:(0,r.jsxs)(Tg,{children:[Mk("Location / Languages","surferseo"),(0,r.jsx)(_W,{id:"ks-locations",onLocationChange:l,className:w&&(!c||c.length<1)?"surfer-sidebar-box--surfer-field-error":""})]})}),(0,r.jsx)(hr,{variant:"primary",icon:h?void 0:fL,fullWidth:!0,type:"submit",loading:h,disabled:h,children:Mk("Generate Keywords","surferseo")})]}),w&&(0,r.jsx)("div",{className:"surfer-message surfer-message__error",children:Mk("There was an error during search... Please try again.","surferseo")})]}),g&&c?(0,r.jsx)(RH,{data:f.data,el:f.el,keyword:f.keyword,setKeywordInputValue:function(e){j&&j.current&&(j.current.value=e)},newResearchParams:{mainKeyword:o,location:c,setIsLoading:m,setIsError:x,setResearchDetails:d,setHasResults:y}}):""]})},DH=function(e){var t=e.header,n=e.sortingField,o=e.sortingDirection,i=void 0===o?"desc":o;return(0,r.jsxs)(r.Fragment,{children:[t.icon&&(0,r.jsx)(t.icon,{}),t.headerName,t.sortable&&n==t.sortingFieldName&&"asc"==i&&(0,r.jsx)(Wn,{Component:ga,size:"xsmall"}),t.sortable&&n==t.sortingFieldName&&"desc"==i&&(0,r.jsx)(Wn,{Component:UT,size:"xsmall"})]})},$H=function(e){var t=e.headers,n=e.sortingDirection,o=e.sortingField,i=e.setSortingField,a=e.setSortingDirection;return(0,r.jsx)(r.Fragment,{children:["thead","tfoot"].map((function(e){return(0,r.jsx)(e,{children:(0,r.jsx)("tr",{className:"surfer-posts-table__header",children:t.map((function(t){return(0,r.jsx)("th",{className:"surfer-posts-table__header-cell",children:t.sortable&&i&&a?(0,r.jsx)(hr,{size:"small",variant:"text",color:t.sortingFieldName==o?"primary":"secondary",onClick:function(){i(t.sortingFieldName),function(e,t,n,r){var o="asc";e===n&&"asc"==r&&(o="desc"),t(o)}(t.sortingFieldName,a,o,n)},children:(0,r.jsx)(DH,{header:t,sortingDirection:n,sortingField:o},e+"_"+t.field+"_cell")},e+"_"+t.field+"_button"):(0,r.jsx)(DH,{header:t},e+"_"+t.field+"_cell")},e+"_"+t.field)}))},"tr_"+e)},e)}))})},FH=function(e){var t=e.post,n=e.headers;return(0,r.jsx)("tr",{className:"surfer-posts-table__row",children:n.map((function(e){return(0,r.jsx)("td",{className:"surfer-posts-table__row-cell",children:e.valueGetter?e.valueGetter(t):(0,r.jsx)("span",{children:t[e.field]})},t.id+"_"+e.field)}))},t.id)};function BH(){return BH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BH.apply(this,arguments)}const WH=function(e){return s.createElement("svg",BH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m18.75 4.5l-7.5 7.5l7.5 7.5m-6-15L5.25 12l7.5 7.5"}))};function UH(){return UH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UH.apply(this,arguments)}const HH=function(e){return s.createElement("svg",UH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m5.25 4.5l7.5 7.5l-7.5 7.5m6-15l7.5 7.5l-7.5 7.5"}))};var VH=function(e){var t=e.currentPage,n=void 0===t?1:t,o=e.perPage,i=void 0===o?20:o,a=e.setCurrentPage,s=e.itemsNumber;if(!s||s<i)return null;var c=Math.ceil(s/i);if(!a)return null;for(var l=[],u=function(e){l.push((0,r.jsx)(hr,{variant:"secondary",onClick:function(){return a(e)},children:e},"page_".concat(e)))},f=1;f<=c;f++)u(f);return(0,r.jsxs)($t,{direction:"row",justifyContent:"flex-end",margin:["base","vertical"],gap:"sm",fullWidth:!0,alignItems:"center",children:[(0,r.jsxs)("span",{children:[s," ",Mk("items","surferseo")]}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(1)},disabled:1==n,children:(0,r.jsx)(Wn,{Component:WH})}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(n-1)},disabled:1==n,children:(0,r.jsx)(Wn,{Component:$x})}),(0,r.jsx)("input",{id:"surfer-page-selector",type:"number",min:"1",max:c,value:n,onChange:function(e){return a(parseInt(e.target.value))}}),(0,r.jsxs)("span",{children:[Mk("from","surferseo")," ",c]}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(n+1)},disabled:n==c,children:(0,r.jsx)(Wn,{Component:pp})}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(c)},disabled:n==c,children:(0,r.jsx)(Wn,{Component:HH})})]})},GH=function(e){var t=e.filters,n=e.setFilter,o=e.currentFilter;return t&&n?(0,r.jsx)($t,{direction:"row",gap:"base",margin:["base","vertical"],children:t.map((function(e){return(0,r.jsxs)(hr,{variant:"text",color:e.value==o?"primary":"secondary",size:"small",onClick:function(){return n(e.value)},children:[e.label," ",!1!==e.count&&(0,r.jsx)("span",{className:"surfer-table-filter__button-count",children:"("+e.count+")"})]},e.value)}))}):null},ZH=n(7420),KH=n.n(ZH),qH=function(e){var t=e.posts,n=e.headers,o=e.currentFilter,i=e.filters,a=e.currentPage,s=void 0===a?1:a,c=e.itemsNumber,l=void 0===c?0:c,u=e.itemsPerPage,f=void 0===u?20:u,d=e.setFilter,p=e.setCurrentPage,h=e.sortingField,m=e.setSortingField,v=e.sortingDirection,g=e.setSortingDirection,y=e.isLoading,b=void 0!==y&&y;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(GH,{filters:i,setFilter:d,currentFilter:o}),(0,r.jsx)(VH,{setCurrentPage:p,currentPage:s,itemsNumber:l,perPage:f}),(0,r.jsxs)("table",{className:"surfer-posts-table",cellPadding:0,cellSpacing:0,children:[(0,r.jsx)($H,{headers:n,sortingDirection:v,sortingField:h,setSortingField:m,setSortingDirection:g}),(0,r.jsx)("tbody",{children:b?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:n.length,style:{textAlign:"center",padding:"8px"},children:(0,r.jsx)(KH(),{})})}):l>0?(0,r.jsx)(r.Fragment,{children:t.map((function(e){return(0,r.jsx)(FH,{post:e,headers:n},"post_"+e.id)}))}):(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:n.length,style:{textAlign:"center",padding:"8px"},children:Mk("No posts found for this criteria...","surferseo")})})})]}),(0,r.jsx)(VH,{setCurrentPage:p,currentPage:s,itemsNumber:l,perPage:f})]})};const YH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875h-.75ZM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 0 1-1.875-1.875V8.625ZM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 0 1 3 19.875v-6.75Z"}))}));const XH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 1.5a.75.75 0 0 1 .75.75V4.5a.75.75 0 0 1-1.5 0V2.25A.75.75 0 0 1 12 1.5ZM5.636 4.136a.75.75 0 0 1 1.06 0l1.592 1.591a.75.75 0 0 1-1.061 1.06l-1.591-1.59a.75.75 0 0 1 0-1.061Zm12.728 0a.75.75 0 0 1 0 1.06l-1.591 1.592a.75.75 0 0 1-1.06-1.061l1.59-1.591a.75.75 0 0 1 1.061 0Zm-6.816 4.496a.75.75 0 0 1 .82.311l5.228 7.917a.75.75 0 0 1-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 0 1-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 0 1-1.247-.606l.569-9.47a.75.75 0 0 1 .554-.68ZM3 10.5a.75.75 0 0 1 .75-.75H6a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 10.5Zm14.25 0a.75.75 0 0 1 .75-.75h2.25a.75.75 0 0 1 0 1.5H18a.75.75 0 0 1-.75-.75Zm-8.962 3.712a.75.75 0 0 1 0 1.061l-1.591 1.591a.75.75 0 1 1-1.061-1.06l1.591-1.592a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}));const JH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}));function QH(e){return QH="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},QH(e)}function eV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tV(r.key),r)}}function tV(e){var t=function(e,t){if("object"!=QH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=QH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==QH(t)?t:t+""}function nV(e,t,n){return t=oV(t),function(e,t){if(t&&("object"===QH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rV()?Reflect.construct(t,n||[],oV(e).constructor):t.apply(e,n))}function rV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rV=function(){return!!e})()}function oV(e){return oV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oV(e)}function iV(e,t){return iV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iV(e,t)}var aV=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=nV(this,t,[e])).state={hasError:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iV(e,t)}(t,e),n=t,i=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}],(o=[{key:"componentDidCatch",value:function(e,t){console.log(e,t)}},{key:"render",value:function(){return this.state.hasError?(0,r.jsx)(cw,{color:"danger",title:Mk("Something went wrong...","surferseo"),description:Mk("There was an unknown error. Please reach our Support Team for help.","surferseo")}):this.props.children}}])&&eV(n.prototype,o),i&&eV(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,i}(l().Component);function sV(e){return sV="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},sV(e)}function cV(){cV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==sV(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(sV(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function lV(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function uV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fV(e,t)}(e,t)||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 fV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dV=function(e){var t=e.value,n=e.prevValue;return(0,r.jsxs)("div",{className:" ".concat(t>n?"surfer-domain-report__single-data--up":"surfer-domain-report__single-data--down"),children:[t,function(e,t){return e>t?(0,r.jsxs)("span",{children:["+",e-t]}):e<t?(0,r.jsx)("span",{children:e-t}):(0,r.jsx)(r.Fragment,{})}(t,n)]})},pV=function(e){var t=e.value,n=e.prevValue;return(0,r.jsxs)("div",{className:" ".concat(t<n?"surfer-domain-report__single-data--up":"surfer-domain-report__single-data--down"),children:[t,function(e,t){return e>t?(0,r.jsxs)("span",{children:["+",e-t]}):e<t?(0,r.jsx)("span",{children:e-t}):(0,r.jsx)(r.Fragment,{})}(t,n)]})},hV=function(){var e=uV((0,s.useState)(!1),2),t=e[0],n=e[1],o=uV((0,s.useState)({totalImporessions:0,prevTotalImporessions:0,totalClicks:0,prevTotalClicks:0,fallInPosition:0,prevFallInPosition:0,growthInPosition:0,prevGrowthInPosition:0}),2),i=o[0],a=o[1],c=function(){var e,t=(e=cV().mark((function e(){var t,r;return cV().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,fetch(wpsurfer.ajaxurl+"?action=surfer_get_domain_performance_report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 3:return t=e.sent,e.next=6,t.json();case 6:r=e.sent,a(r),n(!1);case 9:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){lV(i,r,o,a,s,"next",e)}function s(e){lV(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,s.useEffect)((function(){c()}),[]),(0,r.jsx)("div",{className:"surfer-domain-report",children:t?(0,r.jsx)("div",{className:"surfer-domain-report__loader",children:(0,r.jsx)(KH(),{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsxs)("h3",{children:[(0,r.jsx)(Wn,{Component:MU}),Mk("Total Impressions","surferseo")]}),(0,r.jsx)(dV,{value:0|i.totalImporessions,prevValue:i.prevTotalImporessions})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsxs)("h3",{children:[(0,r.jsx)(Wn,{Component:LU}),Mk("Total Clicks","surferseo")]}),(0,r.jsx)(dV,{value:0|i.totalClicks,prevValue:i.prevTotalClicks})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsx)("h3",{children:Mk("Drop in Position","surferseo")}),(0,r.jsx)(pV,{value:i.fallInPosition,prevValue:i.prevFallInPosition})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsx)("h3",{children:Mk("Increased in Position","surferseo")}),(0,r.jsx)(dV,{value:i.growthInPosition,prevValue:i.prevGrowthInPosition})]})]})})};function mV(){return mV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mV.apply(this,arguments)}const vV=function(e){return s.createElement("svg",mV({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 19.5v-15m0 0l-6.75 6.75M12 4.5l6.75 6.75"}))};function gV(){return gV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gV.apply(this,arguments)}const yV=function(e){return s.createElement("svg",gV({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"}))};function bV(e){return bV="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},bV(e)}function wV(){wV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==bV(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bV(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xV(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function jV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return OV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OV(e,t)}(e,t)||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 OV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SV=function(e,t,n,o){return!1===t?(0,r.jsxs)(r.Fragment,{children:[Mk("For this post we have data from one period.","surferseo"),(0,r.jsxs)("p",{style:{marginBottom:"0px"},children:[Mk("Current Period:","surferseo"),(0,r.jsx)("br",{}),n]})]}):(0,r.jsxs)($t,{direction:"column",gap:"base",children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[Mk("7 days ago:","surferseo"),(0,r.jsxs)($t,{direction:"row",gap:"2xs",style:{marginTop:"0px"},children:["position"==e&&(0,r.jsx)(Wn,{Component:DU,size:"small"}),"impressions"==e&&(0,r.jsx)(Wn,{Component:MU,size:"small"}),"clicks"==e&&(0,r.jsx)(Wn,{Component:LU,size:"small"}),"".concat(t," ").concat(e)]})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{children:Mk("Current Period:","surferseo")}),(0,r.jsx)(Vn,{children:n})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{children:Mk("Previous Period:","surferseo")}),(0,r.jsx)(Vn,{children:o})]})]})},_V=function(e){var t=e.param,n=e.value,o=e.previousValue,i=e.previousPeriod;return!1===n||!1===o||"No data gathered yet."===i||"position"==t&&0===o?(0,r.jsx)("span",{style:{width:"16px",display:"inline-block"}}):n==o?(0,r.jsx)(Wn,{Component:zT}):"position"!=t&&n>o||"position"==t&&n<o?(0,r.jsx)(Wn,{Component:vV}):(0,r.jsx)(Wn,{Component:yV})},kV=function(e,t,n,o,i){var a=function(e,t,n){return!1===t||!1===n||0===n?"black":"position"==e?t>n?"red":"black":t<n?"red":"black"}(n,e,t);return(0,r.jsx)(cu,{content:SV(n,t,o,i),portalled:!0,children:(0,r.jsxs)("span",{className:"number number--".concat(a),children:[e," ",(0,r.jsx)(_V,{param:n,value:e,previousValue:t,previousPeriod:i})]})})},EV=function(){var e=jV((0,s.useState)(!1),2),t=e[0],n=e[1],o=jV((0,s.useState)(""),2),i=o[0],a=o[1],c=jV((0,s.useState)({all:0,fall:0,growth:0}),2),l=c[0],u=c[1],f=jV((0,s.useState)([]),2),d=f[0],p=f[1],h=jV((0,s.useState)(0),2),m=h[0],v=h[1],g=jV((0,s.useState)(""),2),y=g[0],b=(g[1],jV((0,s.useState)("all"),2)),w=b[0],x=b[1],j=jV((0,s.useState)(1),2),O=j[0],S=j[1],_=jV((0,s.useState)("ID"),2),k=_[0],E=_[1],C=jV((0,s.useState)("desc"),2),A=C[0],P=C[1],I=function(){var e,t=(e=wV().mark((function e(){var t,r,o,i,s,c,l,f,d=arguments;return wV().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:"",r=d.length>1&&void 0!==d[1]?d[1]:1,o=d.length>2&&void 0!==d[2]?d[2]:20,i=d.length>3&&void 0!==d[3]?d[3]:"ID",s=d.length>4&&void 0!==d[4]?d[4]:"desc",c=d.length>5&&void 0!==d[5]?d[5]:"all",n(!0),e.next=9,fetch(wpsurfer.ajaxurl+"?action=surfer_get_posts_for_performance_report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,query:t,page:r,perPage:o,filter:c,sorting:i+" "+s})});case 9:return l=e.sent,e.next=12,l.json();case 12:f=e.sent,p(f.posts),v(f.counts[c]),u(f.counts),a(f.current_period),n(!1);case 18:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xV(i,r,o,a,s,"next",e)}function s(e){xV(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();(0,s.useEffect)((function(){1!=O?S(1):I(y,O,20,k,A,w)}),[y,w,k,A]),(0,s.useEffect)((function(){I(y,O,20,k,A,w)}),[O]);var R=[{field:"postTitle",headerName:"Title",sortable:!1,valueGetter:function(e){return function(e){return(0,r.jsxs)("div",{className:"post-title-box",children:[(0,r.jsx)("a",{href:e.postEditURL,className:"post-title",children:e.postTitle||Mk("(no title)","surferseo")}),(0,r.jsxs)("div",{className:"post-title-box__hidden-links",children:[(0,r.jsx)("a",{href:e.postEditURL,children:Mk("Edit","surferseo")}),(0,r.jsx)("a",{href:e.postURL,target:"_blank",children:Mk("View","surferseo")})]})]})}(e)}},{field:"position",headerName:"Position",icon:YH,sortable:!0,sortingFieldName:"position",valueGetter:function(e){return kV(e.position,e.previousPosition,"position",e.currentPeriod,e.previousPeriod)}},{field:"clicks",headerName:"Clicks",icon:XH,sortable:!0,sortingFieldName:"clicks",valueGetter:function(e){return kV(e.clicks,e.previousClicks,"clicks",e.currentPeriod,e.previousPeriod)}},{field:"impressions",headerName:"Impressions",icon:JH,sortable:!0,sortingFieldName:"impressions",valueGetter:function(e){return kV(e.impressions,e.previousImpressions,"impressions",e.currentPeriod,e.previousPeriod)}},{field:"actions",headerName:"",valueGetter:function(e){return function(e){return(0,r.jsx)(kT,{wpPostId:e.id,draftId:e.draftId,scrapeStatus:e.scrapeStatus||0,content:e.postContent,children:(0,r.jsx)(uU,{mode:"button",buttonSize:"xsmall"})})}(e)}}],T=[{value:"all",label:"All posts",count:l.all},{value:"fall",label:"Drop in Position",count:l.fall},{value:"growth",label:"Increased in Position",count:l.growth}];return(0,r.jsxs)("div",{className:"performance-report",children:[(0,r.jsxs)("div",{className:"performance-report__header",children:[(0,r.jsxs)("p",{className:"performance-report__date",children:[Mk("Date:","surferseo")," ",i]}),!wpsurfer.emails_enabled&&(0,r.jsx)("a",{href:wpsurfer.wp_admin_url+"?page=surfer&surfer_enable_email_notification=1",className:"surfer-button surfer-button--primary",children:Mk("Turn on a weekly report","surferseo")})]}),(0,r.jsx)("h3",{children:Mk("Domain","surferseo")}),(0,r.jsx)(aV,{children:(0,r.jsx)(hV,{})}),(0,r.jsx)("h3",{children:Mk("Posts","surferseo")}),(0,r.jsx)(aV,{children:(0,r.jsx)(qH,{posts:d,headers:R,currentFilter:w,filters:T,setFilter:x,currentPage:O,setCurrentPage:S,itemsNumber:m,itemsPerPage:20,isLoading:t,sortingField:k,setSortingField:E,sortingDirection:A,setSortingDirection:P})})]})},CV=wp.i18n.__,AV=wp.editPost,PV=AV.PluginSidebarMoreMenuItem,IV=AV.PluginSidebar,RV=wp.components.PanelBody;const TV=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(PV,{target:"surferseo-sidebar",icon:"editor-customchar",children:CV("Surfer","surferseo")}),(0,r.jsxs)(IV,{name:"surferseo-sidebar",title:CV("Surfer","surferseo"),children:[(0,r.jsx)(aV,{children:(0,r.jsx)(RV,{title:CV("Optimize","surferseo"),initialOpen:!0,children:(0,r.jsx)(kT,{children:(0,r.jsx)(uU,{mode:"full",BeforeButtonText:CV("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})})})}),(0,r.jsx)(aV,{children:(0,r.jsx)(RV,{title:CV("Keyword Research","surferseo"),initialOpen:!0,children:(0,r.jsx)(NH,{})})})]},"surfer-sidebar")]})};var LV,zV;function MV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var NV=We.div.attrs({className:"ui-draggable-handle"})(LV||(LV=MV(["\n&&& {\n display: flex;\n flex-direction: row;\n gap: 8px;\n color: #1e1e1e;\n font-size: 13px;\n font-weight: 600;\n padding: 16px;\n line-height: 26px;\n}\n\n &&& button {\n display: flex;\n background: #fff;\n border: 1px solid #e5e5e5;\n border-radius: 4px;\n padding: 4px;\n color: #000;\n cursor: pointer;\n }\n"]))),DV=We.div.attrs({})(zV||(zV=MV(["\n&&& h2 {\n color: #1e1e1e;\n font-size: 13px;\n font-weight: 600;\n padding: 16px 0;\n }\n &&& > div {\n border-top: 1px solid #e5e5e5;\n padding: 0 16px;\n padding-bottom: 16px;\n }\n &&& input {\n background-color: transparent;\n }\n"])));function $V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return FV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FV(e,t)}(e,t)||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 FV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BV=function(){var e=$V((0,s.useState)(!0),2),t=e[0],n=e[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(NV,{children:[(0,r.jsx)("button",{onClick:function(){return n(!t)},children:t?(0,r.jsx)(pp,{}):(0,r.jsx)($x,{})}),t&&"Surfer"]}),(0,r.jsxs)(DV,{style:{visibility:t?"visible":"hidden",width:t?"100%":"0",overflow:t?"scroll":"hidden"},children:[(0,r.jsxs)("div",{className:"surfer-sidebar-box",children:[(0,r.jsx)("h2",{children:"Optimize"}),(0,r.jsx)(uU,{mode:"full",BeforeButtonText:Mk("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})]}),(0,r.jsxs)("div",{className:"surfer-sidebar-box",children:[(0,r.jsx)("h2",{children:"Keyword Research"}),(0,r.jsx)(NH,{})]})]})]})},WV=wp.plugins.registerPlugin;(function(){var e=!1;if("undefined"!=typeof _&&"function"==typeof _.forEach){e=!0,["get","set","at","cloneDeep"].forEach((function(t){e="function"==typeof _[t]&&e}))}return e})()&&_.noConflict(),function(e){addEventListener("DOMContentLoaded",(function(){var e=document.createElement("div");document.head.appendChild(e),i().render((0,r.jsx)(ht,{}),e)}));var t=document.getElementById("surfer-keyword-surfer");null!==t&&i().render((0,r.jsx)(NH,{}),t);var n=document.getElementById("surfer-json-schema");null!==n&&i().render((0,r.jsx)(kT,{children:(0,r.jsx)(ZU,{})}),n);var o=document.getElementById("surfer-performance-report");null!==o&&i().render((0,r.jsx)(EV,{}),o);var a=document.getElementById("surfer-content-export-box");null!==a&&i().render((0,r.jsx)(kT,{children:(0,r.jsx)(uU,{mode:"full",BeforeButtonText:Mk("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})}),a);var s=document.getElementById("elementor-editor-wrapper");if(null!==s ){var c=document.createElement("aside");c.id="surfer-elementor-modal-holder",s.appendChild(c),i().render((0,r.jsx)(kT,{children:(0,r.jsx)(BV,{})}),c)}var l=document.getElementsByClassName("surfer-traffic-details-box");if(null!==l)for(var u=0;u<l.length;u++){var f=l[u];if(f){var d,p,h,m,v,g=f.getAttribute("data-post-id"),y=f.getAttribute("data-draft-id"),b=null!==(d=f.getAttribute("data-content"))&&void 0!==d?d:"",w=f.getAttribute("data-scrape-status"),x=null!==(p=f.getAttribute("data-permalink-hash"))&&void 0!==p?p:"",j=null!==(h=f.getAttribute("data-stats"))&&void 0!==h?h:"",O=null!==(m=f.getAttribute("data-current-period"))&&void 0!==m?m:"",S=null!==(v=f.getAttribute("data-previous-period"))&&void 0!==v?v:"",_=g?parseInt(g,10):0,k=y?parseInt(y,10):0,E=null!=w?parseInt(w,10):0;null!==g&&i().render((0,r.jsx)($U,{postId:_,draftId:k,content:b,scrapeStatus:E,stats:j,currentPeriod:O,previousPeriod:S,permalinkHash:x}),f)}}WV("surferseo",{icon:XU,render:TV})}(window.wp)},1594:e=>{"use strict";e.exports=React},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](n[c])))?n.splice(c--,1):(s=!1,o<a&&(a=o));if(s){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var a={};t=t||[null,n({}),n([]),n(n)];for(var s=2&r&&e;"object"==typeof s&&!~t.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={44:0,507:0,859:0,364:0,461:0,165:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)var u=c(i)}for(t&&t(n);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},n=self.webpackChunkSurferSEO=self.webpackChunkSurferSEO||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i.O(void 0,[507,859,364,461,165],(()=>i(1796))),i.O(void 0,[507,859,364,461,165],(()=>i(8619))),i.O(void 0,[507,859,364,461,165],(()=>i(2123))),i.O(void 0,[507,859,364,461,165],(()=>i(6132))),i.O(void 0,[507,859,364,461,165],(()=>i(1458)));var a=i.O(void 0,[507,859,364,461,165],(()=>i(2329)));a=i.O(a)})();75 `),bN.rippleVisible,kN,550,(({theme:e})=>e.transitions.easing.easeInOut),bN.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),bN.child,bN.childLeaving,EN,550,(({theme:e})=>e.transitions.easing.easeInOut),bN.childPulsate,CN,(({theme:e})=>e.transitions.easing.easeInOut)),IN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=n,c=(0,az.A)(n,wN),[l,u]=s.useState([]),f=s.useRef(0),d=s.useRef(null);s.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=s.useRef(!1),h=JM(),m=s.useRef(null),v=s.useRef(null),g=s.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:o,rippleSize:a,cb:s}=e;u((e=>[...e,(0,r.jsx)(PN,{classes:{ripple:cz(i.ripple,bN.ripple),rippleVisible:cz(i.rippleVisible,bN.rippleVisible),ripplePulsate:cz(i.ripplePulsate,bN.ripplePulsate),child:cz(i.child,bN.child),childLeaving:cz(i.childLeaving,bN.childLeaving),childPulsate:cz(i.childPulsate,bN.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:o,rippleSize:a},f.current)])),f.current+=1,d.current=s}),[i]),y=s.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:v.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let l,u,f;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),u=Math.round(n-c.top)}if(i)f=Math.sqrt((2*c.width**2+c.height**2)/3),f%2==0&&(f+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-l),l)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;f=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===m.current&&(m.current=()=>{g({pulsate:r,rippleX:l,rippleY:u,rippleSize:f,cb:n})},h.start(80,(()=>{m.current&&(m.current(),m.current=null)}))):g({pulsate:r,rippleX:l,rippleY:u,rippleSize:f,cb:n})}),[o,g,h]),b=s.useCallback((()=>{y({},{pulsate:!0})}),[y]),w=s.useCallback(((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&m.current)return m.current(),m.current=null,void h.start(0,(()=>{w(e,t)}));m.current=null,u((e=>e.length>0?e.slice(1):e)),d.current=t}),[h]);return s.useImperativeHandle(t,(()=>({pulsate:b,start:y,stop:w})),[b,y,w]),(0,r.jsx)(AN,(0,ns.A)({className:cz(bN.root,i.root,a),ref:v},c,{children:(0,r.jsx)(vN,{component:null,exit:!0,children:l})}))})),RN=IN;function TN(e){return gz("MuiButtonBase",e)}const LN=MM("MuiButtonBase",["root","disabled","focusVisible"]),zN=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],MN=OM("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${LN.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),NN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:c,component:l="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:h="a",onBlur:m,onClick:v,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:j,onMouseDown:O,onMouseLeave:S,onMouseUp:_,onTouchEnd:k,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:I,type:R}=n,T=(0,az.A)(n,zN),L=s.useRef(null),z=s.useRef(null),M=ZM(z,I),{isFocusVisibleRef:N,onFocus:D,onBlur:$,ref:F}=sN(),[B,W]=s.useState(!1);u&&B&&W(!1),s.useImperativeHandle(o,(()=>({focusVisible:()=>{W(!0),L.current.focus()}})),[]);const[U,H]=s.useState(!1);s.useEffect((()=>{H(!0)}),[]);const V=U&&!f&&!u;function G(e,t,n=d){return KM((r=>{t&&t(r);return!n&&z.current&&z.current[e](r),!0}))}s.useEffect((()=>{B&&p&&!f&&U&&z.current.pulsate()}),[f,p,B,U]);const Z=G("start",O),K=G("stop",g),q=G("stop",y),Y=G("stop",_),X=G("stop",(e=>{B&&e.preventDefault(),S&&S(e)})),J=G("start",C),Q=G("stop",k),ee=G("stop",E),te=G("stop",(e=>{$(e),!1===N.current&&W(!1),m&&m(e)}),!1),ne=KM((e=>{L.current||(L.current=e.currentTarget),D(e),!0===N.current&&(W(!0),w&&w(e)),b&&b(e)})),re=()=>{const e=L.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},oe=s.useRef(!1),ie=KM((e=>{p&&!oe.current&&B&&z.current&&" "===e.key&&(oe.current=!0,z.current.stop(e,(()=>{z.current.start(e)}))),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),v&&v(e))})),ae=KM((e=>{p&&" "===e.key&&z.current&&B&&!e.defaultPrevented&&(oe.current=!1,z.current.stop(e,(()=>{z.current.pulsate(e)}))),j&&j(e),v&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&v(e)}));let se=l;"button"===se&&(T.href||T.to)&&(se=h);const ce={};"button"===se?(ce.type=void 0===R?"button":R,ce.disabled=u):(T.href||T.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const le=ZM(t,F,L);const ue=(0,ns.A)({},n,{centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:d,focusRipple:p,tabIndex:A,focusVisible:B}),fe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=lz({root:["root",t&&"disabled",n&&"focusVisible"]},TN,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return(0,r.jsxs)(MN,(0,ns.A)({as:se,className:cz(fe.root,c),ownerState:ue,onBlur:te,onClick:v,onContextMenu:K,onFocus:ne,onKeyDown:ie,onKeyUp:ae,onMouseDown:Z,onMouseLeave:X,onMouseUp:Y,onDragLeave:q,onTouchEnd:Q,onTouchMove:ee,onTouchStart:J,ref:le,tabIndex:u?-1:A,type:R},ce,T,{children:[a,V?(0,r.jsx)(RN,(0,ns.A)({ref:M,center:i},P)):null]}))})),DN=NN;function $N(e){return gz("MuiIconButton",e)}const FN=MM("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),BN=["edge","children","className","color","disabled","disableFocusRipple","size"],WN=OM(DN,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${zM(n.color)}`],n.edge&&t[`edge${zM(n.edge)}`],t[`size${zM(n.size)}`]]}})((({theme:e,ownerState:t})=>(0,ns.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return(0,ns.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,ns.A)({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":(0,ns.A)({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${FN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),UN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:c=!1,disableFocusRipple:l=!1,size:u="medium"}=n,f=(0,az.A)(n,BN),d=(0,ns.A)({},n,{edge:o,color:s,disabled:c,disableFocusRipple:l,size:u}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return lz({root:["root",n&&"disabled","default"!==r&&`color${zM(r)}`,o&&`edge${zM(o)}`,`size${zM(i)}`]},$N,t)})(d);return(0,r.jsx)(WN,(0,ns.A)({className:cz(p.root,a),centerRipple:!0,focusRipple:!l,disabled:c,ref:t},f,{ownerState:d,children:i}))})),HN=UN;function VN(e){return gz("MuiSvgIcon",e)}MM("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const GN=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ZN=OM("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${zM(n.color)}`],t[`fontSize${zM(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,s,c,l,u,f,d,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(c=s.pxToRem)?void 0:c.call(s,24))||"1.5rem",large:(null==(l=e.typography)||null==(u=l.pxToRem)?void 0:u.call(l,35))||"2.1875rem"}[t.fontSize],color:null!=(f=null==(d=(e.vars||e).palette)||null==(d=d[t.color])?void 0:d.main)?f:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}})),KN=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:c="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24"}=n,h=(0,az.A)(n,GN),m=s.isValidElement(o)&&"svg"===o.type,v=(0,ns.A)({},n,{color:a,component:c,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:m}),g={};f||(g.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return lz({root:["root","inherit"!==t&&`color${zM(t)}`,`fontSize${zM(n)}`]},VN,r)})(v);return(0,r.jsxs)(ZN,(0,ns.A)({as:c,className:cz(y.root,i),focusable:"false",color:u,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t},g,h,m&&o.props,{ownerState:v,children:[m?o.props.children:o,d?(0,r.jsx)("title",{children:d}):null]}))}));KN.muiName="SvgIcon";const qN=KN;function YN(e,t){function n(n,o){return(0,r.jsx)(qN,(0,ns.A)({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return n.muiName=qN.muiName,s.memo(s.forwardRef(n))}const XN=YN((0,r.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function JN(e){return gz("MuiChip",e)}const QN=MM("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),eD=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],tD=OM("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:c}=n;return[{[`& .${QN.avatar}`]:t.avatar},{[`& .${QN.avatar}`]:t[`avatar${zM(s)}`]},{[`& .${QN.avatar}`]:t[`avatarColor${zM(r)}`]},{[`& .${QN.icon}`]:t.icon},{[`& .${QN.icon}`]:t[`icon${zM(s)}`]},{[`& .${QN.icon}`]:t[`iconColor${zM(o)}`]},{[`& .${QN.deleteIcon}`]:t.deleteIcon},{[`& .${QN.deleteIcon}`]:t[`deleteIcon${zM(s)}`]},{[`& .${QN.deleteIcon}`]:t[`deleteIconColor${zM(r)}`]},{[`& .${QN.deleteIcon}`]:t[`deleteIcon${zM(c)}Color${zM(r)}`]},t.root,t[`size${zM(s)}`],t[`color${zM(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${zM(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${zM(r)}`],t[c],t[`${c}${zM(r)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,ns.A)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${QN.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${QN.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${QN.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${QN.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${QN.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${QN.icon}`]:(0,ns.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,ns.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},"default"!==t.color&&{color:"inherit"})),[`& .${QN.deleteIcon}`]:(0,ns.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,uz.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,uz.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>(0,ns.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>(0,ns.A)({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${QN.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${QN.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${QN.avatar}`]:{marginLeft:4},[`& .${QN.avatarSmall}`]:{marginLeft:2},[`& .${QN.icon}`]:{marginLeft:4},[`& .${QN.iconSmall}`]:{marginLeft:2},[`& .${QN.deleteIcon}`]:{marginRight:5},[`& .${QN.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].main,.7)}`,[`&.${QN.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,uz.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${QN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,uz.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${QN.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,uz.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),nD=OM("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${zM(r)}`]]}})((({ownerState:e})=>(0,ns.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7})));function rD(e){return"Backspace"===e.key||"Delete"===e.key}const oD=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:c="default",component:l,deleteIcon:u,disabled:f=!1,icon:d,label:p,onClick:h,onDelete:m,onKeyDown:v,onKeyUp:g,size:y="medium",variant:b="filled",tabIndex:w,skipFocusWhenDisabled:x=!1}=n,j=(0,az.A)(n,eD),O=s.useRef(null),S=ZM(O,t),_=e=>{e.stopPropagation(),m&&m(e)},k=!(!1===a||!h)||a,E=k||m?DN:l||"div",C=(0,ns.A)({},n,{component:E,disabled:f,size:y,color:c,iconColor:s.isValidElement(d)&&d.props.color||c,onDelete:!!m,clickable:k,variant:b}),A=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:c}=e;return lz({root:["root",c,n&&"disabled",`size${zM(r)}`,`color${zM(o)}`,s&&"clickable",s&&`clickableColor${zM(o)}`,a&&"deletable",a&&`deletableColor${zM(o)}`,`${c}${zM(o)}`],label:["label",`label${zM(r)}`],avatar:["avatar",`avatar${zM(r)}`,`avatarColor${zM(o)}`],icon:["icon",`icon${zM(r)}`,`iconColor${zM(i)}`],deleteIcon:["deleteIcon",`deleteIcon${zM(r)}`,`deleteIconColor${zM(o)}`,`deleteIcon${zM(c)}Color${zM(o)}`]},JN,t)})(C),P=E===DN?(0,ns.A)({component:l||"div",focusVisibleClassName:A.focusVisible},m&&{disableRipple:!0}):{};let I=null;m&&(I=u&&s.isValidElement(u)?s.cloneElement(u,{className:cz(u.props.className,A.deleteIcon),onClick:_}):(0,r.jsx)(XN,{className:cz(A.deleteIcon),onClick:_}));let R=null;o&&s.isValidElement(o)&&(R=s.cloneElement(o,{className:cz(A.avatar,o.props.className)}));let T=null;return d&&s.isValidElement(d)&&(T=s.cloneElement(d,{className:cz(A.icon,d.props.className)})),(0,r.jsxs)(tD,(0,ns.A)({as:E,className:cz(A.root,i),disabled:!(!k||!f)||void 0,onClick:h,onKeyDown:e=>{e.currentTarget===e.target&&rD(e)&&e.preventDefault(),v&&v(e)},onKeyUp:e=>{e.currentTarget===e.target&&(m&&rD(e)?m(e):"Escape"===e.key&&O.current&&O.current.blur()),g&&g(e)},ref:S,tabIndex:x&&f?-1:w,ownerState:C},P,j,{children:[R||T,(0,r.jsx)(nD,{className:cz(A.label),ownerState:C,children:p}),I]}))})),iD=oD;function aD(e){return gz("MuiInputBase",e)}const sD=MM("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);function cD(e){return gz("MuiInput",e)}const lD=(0,ns.A)({},sD,MM("MuiInput",["root","underline","input"]));function uD(e){return gz("MuiOutlinedInput",e)}const fD=(0,ns.A)({},sD,MM("MuiOutlinedInput",["root","notchedOutline","input"]));function dD(e){return gz("MuiFilledInput",e)}const pD=(0,ns.A)({},sD,MM("MuiFilledInput",["root","underline","input"])),hD=YN((0,r.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),mD=YN((0,r.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function vD(e){return gz("MuiAutocomplete",e)}const gD=MM("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var yD,bD;const wD=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],xD=["ref"],jD=PM,OD=OM("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${gD.tag}`]:t.tag},{[`& .${gD.tag}`]:t[`tagSize${zM(s)}`]},{[`& .${gD.inputRoot}`]:t.inputRoot},{[`& .${gD.input}`]:t.input},{[`& .${gD.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${gD.focused} .${gD.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${gD.clearIndicator}`]:{visibility:"visible"}},[`& .${gD.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${gD.inputRoot}`]:{flexWrap:"wrap",[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:30},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:56},[`& .${gD.input}`]:{width:0,minWidth:30}},[`& .${lD.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${lD.root}.${sD.sizeSmall}`]:{[`& .${lD.input}`]:{padding:"2px 4px 3px 0"}},[`& .${fD.root}`]:{padding:9,[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:39},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:65},[`& .${gD.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${gD.endAdornment}`]:{right:9}},[`& .${fD.root}.${sD.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${gD.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${pD.root}`]:{paddingTop:19,paddingLeft:8,[`.${gD.hasPopupIcon}&, .${gD.hasClearIcon}&`]:{paddingRight:39},[`.${gD.hasPopupIcon}.${gD.hasClearIcon}&`]:{paddingRight:65},[`& .${pD.input}`]:{padding:"7px 4px"},[`& .${gD.endAdornment}`]:{right:9}},[`& .${pD.root}.${sD.sizeSmall}`]:{paddingBottom:1,[`& .${pD.input}`]:{padding:"2.5px 4px"}},[`& .${sD.hiddenLabel}`]:{paddingTop:8},[`& .${pD.root}.${sD.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${gD.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${pD.root}.${sD.hiddenLabel}.${sD.sizeSmall}`]:{[`& .${gD.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${gD.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${gD.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${gD.input}`]:{opacity:1}}}]}),SD=OM("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),_D=OM(HN,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),kD=OM(HN,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),ED=OM(LM,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gD.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),CD=OM(GM,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>(0,ns.A)({},e.typography.body1,{overflow:"auto"}))),AD=OM("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),PD=OM("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),ID=OM("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${gD.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${gD.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${gD.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${gD.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${gD.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,uz.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),RD=OM(BM,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),TD=OM("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${gD.option}`]:{paddingLeft:24}}),LD=s.forwardRef((function(e,t){var n,o,i,a;const c=jD({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:f=!1,blurOnSelect:d=!1,ChipProps:p,className:h,clearIcon:m=yD||(yD=(0,r.jsx)(hD,{fontSize:"small"})),clearOnBlur:v=!c.freeSolo,clearOnEscape:g=!1,clearText:y="Clear",closeText:b="Close",componentsProps:w={},defaultValue:x=(c.multiple?[]:null),disableClearable:j=!1,disableCloseOnSelect:O=!1,disabled:S=!1,disabledItemsFocusable:_=!1,disableListWrap:k=!1,disablePortal:E=!1,filterSelectedOptions:C=!1,forcePopupIcon:A="auto",freeSolo:P=!1,fullWidth:I=!1,getLimitTagsText:R=(e=>`+${e}`),getOptionLabel:T,groupBy:L,handleHomeEndKeys:z=!c.freeSolo,includeInputInList:M=!1,limitTags:N=-1,ListboxComponent:D="ul",ListboxProps:$,loading:F=!1,loadingText:B="Loading…",multiple:W=!1,noOptionsText:U="No options",openOnFocus:H=!1,openText:V="Open",PaperComponent:G=GM,PopperComponent:Z=LM,popupIcon:K=bD||(bD=(0,r.jsx)(mD,{})),readOnly:q=!1,renderGroup:Y,renderInput:X,renderOption:J,renderTags:Q,selectOnFocus:ee=!c.freeSolo,size:te="medium",slotProps:ne={}}=c,re=(0,az.A)(c,wD),{getRootProps:oe,getInputProps:ie,getInputLabelProps:ae,getPopupIndicatorProps:se,getClearProps:ce,getTagProps:le,getListboxProps:ue,getOptionProps:fe,value:de,dirty:pe,expanded:he,id:me,popupOpen:ve,focused:ge,focusedTag:ye,anchorEl:be,setAnchorEl:we,inputValue:xe,groupedOptions:je}=iz((0,ns.A)({},c,{componentName:"Autocomplete"})),Oe=!j&&!S&&pe&&!q,Se=(!P||!0===A)&&!1!==A,{onMouseDown:_e}=ie(),{ref:ke}=null!=$?$:{},Ee=ue(),{ref:Ce}=Ee,Ae=(0,az.A)(Ee,xD),Pe=ZM(Ce,ke),Ie=T||(e=>{var t;return null!=(t=e.label)?t:e}),Re=(0,ns.A)({},c,{disablePortal:E,expanded:he,focused:ge,fullWidth:I,getOptionLabel:Ie,hasClearIcon:Oe,hasPopupIcon:Se,inputFocused:-1===ye,popupOpen:ve,size:te}),Te=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return lz({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag",`tagSize${zM(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",l&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},vD,t)})(Re);let Le;if(W&&de.length>0){const e=e=>(0,ns.A)({className:Te.tag,disabled:S},le(e));Le=Q?Q(de,e,Re):de.map(((t,n)=>(0,r.jsx)(iD,(0,ns.A)({label:Ie(t),size:te},e({index:n}),p))))}if(N>-1&&Array.isArray(Le)){const e=Le.length-N;!ge&&e>0&&(Le=Le.splice(0,N),Le.push((0,r.jsx)("span",{className:Te.tag,children:R(e)},Le.length)))}const ze=Y||(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)(RD,{className:Te.groupLabel,ownerState:Re,component:"div",children:e.group}),(0,r.jsx)(TD,{className:Te.groupUl,ownerState:Re,children:e.children})]},e.key)),Me=J||((e,t)=>(0,s.createElement)("li",(0,ns.A)({},e,{key:e.key}),Ie(t))),Ne=(e,t)=>{const n=fe({option:e,index:t});return Me((0,ns.A)({},n,{className:Te.option}),e,{selected:n["aria-selected"],index:t,inputValue:xe},Re)},De=null!=(n=ne.clearIndicator)?n:w.clearIndicator,$e=null!=(o=ne.paper)?o:w.paper,Fe=null!=(i=ne.popper)?i:w.popper,Be=null!=(a=ne.popupIndicator)?a:w.popupIndicator,We=e=>(0,r.jsx)(ED,(0,ns.A)({as:Z,disablePortal:E,style:{width:be?be.clientWidth:null},ownerState:Re,role:"presentation",anchorEl:be,open:ve},Fe,{className:cz(Te.popper,null==Fe?void 0:Fe.className),children:(0,r.jsx)(CD,(0,ns.A)({ownerState:Re,as:G},$e,{className:cz(Te.paper,null==$e?void 0:$e.className),children:e}))}));let Ue=null;return je.length>0?Ue=We((0,r.jsx)(ID,(0,ns.A)({as:D,className:Te.listbox,ownerState:Re},Ae,$,{ref:Pe,children:je.map(((e,t)=>L?ze({key:e.key,group:e.group,children:e.options.map(((t,n)=>Ne(t,e.index+n)))}):Ne(e,t)))}))):F&&0===je.length?Ue=We((0,r.jsx)(AD,{className:Te.loading,ownerState:Re,children:B})):0!==je.length||P||F||(Ue=We((0,r.jsx)(PD,{className:Te.noOptions,ownerState:Re,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:U}))),(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(OD,(0,ns.A)({ref:t,className:cz(Te.root,h),ownerState:Re},oe(re),{children:X({id:me,disabled:S,fullWidth:!0,size:"small"===te?"small":void 0,InputLabelProps:ae(),InputProps:(0,ns.A)({ref:we,className:Te.inputRoot,startAdornment:Le,onClick:e=>{e.target===e.currentTarget&&_e(e)}},(Oe||Se)&&{endAdornment:(0,r.jsxs)(SD,{className:Te.endAdornment,ownerState:Re,children:[Oe?(0,r.jsx)(_D,(0,ns.A)({},ce(),{"aria-label":y,title:y,ownerState:Re},De,{className:cz(Te.clearIndicator,null==De?void 0:De.className),children:m})):null,Se?(0,r.jsx)(kD,(0,ns.A)({},se(),{disabled:S,"aria-label":ve?b:V,title:ve?b:V,ownerState:Re},Be,{className:cz(Te.popupIndicator,null==Be?void 0:Be.className),children:K})):null]})}),inputProps:(0,ns.A)({className:Te.input,disabled:S,readOnly:q},ie())})})),be?Ue:null]})})),zD=LD;function MD(e){return dz(e).defaultView||window}function ND(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}const DD=["onChange","maxRows","minRows","style","value"];function $D(e){return parseInt(e,10)||0}const FD={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const BD=s.forwardRef((function(e,t){const{onChange:n,maxRows:o,minRows:i=1,style:a,value:c}=e,l=(0,az.A)(e,DD),{current:u}=s.useRef(null!=c),f=s.useRef(null),d=fz(t,f),p=s.useRef(null),h=s.useCallback((()=>{const t=f.current,n=MD(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};const r=p.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const a=n.boxSizing,s=$D(n.paddingBottom)+$D(n.paddingTop),c=$D(n.borderBottomWidth)+$D(n.borderTopWidth),l=r.scrollHeight;r.value="x";const u=r.scrollHeight;let d=l;i&&(d=Math.max(Number(i)*u,d)),o&&(d=Math.min(Number(o)*u,d)),d=Math.max(d,u);return{outerHeightStyle:d+("border-box"===a?s+c:0),overflowing:Math.abs(d-l)<=1}}),[o,i,e.placeholder]),m=s.useCallback((()=>{const e=h();if(function(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflowing}(e))return;const t=f.current;t.style.height=`${e.outerHeightStyle}px`,t.style.overflow=e.overflowing?"hidden":""}),[h]);XL((()=>{const e=()=>{m()};let t;const n=ND(e),r=f.current,o=MD(r);let i;return o.addEventListener("resize",n),"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(e),i.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),o.removeEventListener("resize",n),i&&i.disconnect()}}),[h,m]),XL((()=>{m()}));return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("textarea",(0,ns.A)({value:c,onChange:e=>{u||m(),n&&n(e)},ref:d,rows:i,style:a},l)),(0,r.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,ns.A)({},FD,a,{paddingTop:0,paddingBottom:0})})]})}));function WD({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}const UD=s.createContext(void 0);function HD(){return s.useContext(UD)}const VD=XL;var GD=n(9940);const ZD=function({styles:e,themeId:t,defaultTheme:n={}}){const o=AM(n),i="function"==typeof e?e(t&&o[t]||o):e;return(0,r.jsx)(GD.A,{styles:i})};const KD=function(e){return(0,r.jsx)(ZD,(0,ns.A)({},e,{defaultTheme:bM,themeId:wM}))};function qD(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function YD(e,t=!1){return e&&(qD(e.value)&&""!==e.value||t&&qD(e.defaultValue)&&""!==e.defaultValue)}const XD=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],JD=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${zM(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},QD=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},e$=OM("div",{name:"MuiInputBase",slot:"Root",overridesResolver:JD})((({theme:e,ownerState:t})=>(0,ns.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${sD.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,ns.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),t$=OM("input",{name:"MuiInputBase",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=(0,ns.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,ns.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${sD.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${sD.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),n$=(0,r.jsx)(KD,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),r$=s.forwardRef((function(e,t){var n;const o=PM({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:c,className:l,components:u={},componentsProps:f={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:h,endAdornment:m,fullWidth:v=!1,id:g,inputComponent:y="input",inputProps:b={},inputRef:w,maxRows:x,minRows:j,multiline:O=!1,name:S,onBlur:_,onChange:k,onClick:E,onFocus:C,onKeyDown:A,onKeyUp:P,placeholder:I,readOnly:R,renderSuffix:T,rows:L,slotProps:z={},slots:M={},startAdornment:N,type:D="text",value:$}=o,F=(0,az.A)(o,XD),B=null!=b.value?b.value:$,{current:W}=s.useRef(null!=B),U=s.useRef(),H=s.useCallback((e=>{0}),[]),V=ZM(U,w,b.ref,H),[G,Z]=s.useState(!1),K=HD();const q=WD({props:o,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=K?K.focused:G,s.useEffect((()=>{!K&&p&&G&&(Z(!1),_&&_())}),[K,p,G,_]);const Y=K&&K.onFilled,X=K&&K.onEmpty,J=s.useCallback((e=>{YD(e)?Y&&Y():X&&X()}),[Y,X]);VD((()=>{W&&J({value:B})}),[B,J,W]);s.useEffect((()=>{J(U.current)}),[]);let Q=y,ee=b;O&&"input"===Q&&(ee=L?(0,ns.A)({type:void 0,minRows:L,maxRows:L},ee):(0,ns.A)({type:void 0,maxRows:x,minRows:j},ee),Q=BD);s.useEffect((()=>{K&&K.setAdornedStart(Boolean(N))}),[K,N]);const te=(0,ns.A)({},o,{color:q.color||"primary",disabled:q.disabled,endAdornment:m,error:q.error,focused:q.focused,formControl:K,fullWidth:v,hiddenLabel:q.hiddenLabel,multiline:O,size:q.size,startAdornment:N,type:D}),ne=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:f,size:d,startAdornment:p,type:h}=e;return lz({root:["root",`color${zM(n)}`,r&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",s&&"formControl",d&&"medium"!==d&&`size${zM(d)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",l&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===d&&"inputSizeSmall",l&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]},aD,t)})(te),re=M.root||u.Root||e$,oe=z.root||f.root||{},ie=M.input||u.Input||t$;return ee=(0,ns.A)({},ee,null!=(n=z.input)?n:f.input),(0,r.jsxs)(s.Fragment,{children:[!h&&n$,(0,r.jsxs)(re,(0,ns.A)({},oe,!jz(re)&&{ownerState:(0,ns.A)({},te,oe.ownerState)},{ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),E&&E(e)}},F,{className:cz(ne.root,oe.className,l,R&&"MuiInputBase-readOnly"),children:[N,(0,r.jsx)(UD.Provider,{value:null,children:(0,r.jsx)(ie,(0,ns.A)({ownerState:te,"aria-invalid":q.error,"aria-describedby":i,autoComplete:a,autoFocus:c,defaultValue:d,disabled:q.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:S,placeholder:I,readOnly:R,required:q.required,rows:L,value:B,onKeyDown:A,onKeyUp:P,type:D},ee,!jz(ie)&&{as:Q,ownerState:(0,ns.A)({},te,ee.ownerState)},{ref:V,className:cz(ne.input,ee.className,R&&"MuiInputBase-readOnly"),onBlur:e=>{_&&_(e),b.onBlur&&b.onBlur(e),K&&K.onBlur?K.onBlur(e):Z(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||U.current;if(null==t)throw new Error((0,$z.A)(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),k&&k(e,...t)},onFocus:e=>{q.disabled?e.stopPropagation():(C&&C(e),b.onFocus&&b.onFocus(e),K&&K.onFocus?K.onFocus(e):Z(!0))}}))}),m,T?T((0,ns.A)({},q,{startAdornment:N})):null]}))]})})),o$=r$,i$=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],a$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JD(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,ns.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${lD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lD.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${lD.disabled}, .${lD.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${lD.disabled}:before`]:{borderBottomStyle:"dotted"}})})),s$=OM(t$,{name:"MuiInput",slot:"Input",overridesResolver:QD})({}),c$=s.forwardRef((function(e,t){var n,o,i,a;const s=PM({props:e,name:"MuiInput"}),{disableUnderline:c,components:l={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:p=!1,slotProps:h,slots:m={},type:v="text"}=s,g=(0,az.A)(s,i$),y=(e=>{const{classes:t,disableUnderline:n}=e,r=lz({root:["root",!n&&"underline"],input:["input"]},cD,t);return(0,ns.A)({},t,r)})(s),b={root:{ownerState:{disableUnderline:c}}},w=(null!=h?h:u)?(0,Fz.A)(null!=h?h:u,b):b,x=null!=(n=null!=(o=m.root)?o:l.Root)?n:a$,j=null!=(i=null!=(a=m.input)?a:l.Input)?i:s$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:x,input:j},slotProps:w,fullWidth:f,inputComponent:d,multiline:p,ref:t,type:v},g,{classes:y}))}));c$.muiName="Input";const l$=c$,u$=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],f$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JD(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,ns.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${pD.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${pD.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pD.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pD.disabled}, .${pD.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pD.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,ns.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),d$=OM(t$,{name:"MuiFilledInput",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>(0,ns.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),p$=s.forwardRef((function(e,t){var n,o,i,a;const s=PM({props:e,name:"MuiFilledInput"}),{components:c={},componentsProps:l,fullWidth:u=!1,inputComponent:f="input",multiline:d=!1,slotProps:p,slots:h={},type:m="text"}=s,v=(0,az.A)(s,u$),g=(0,ns.A)({},s,{fullWidth:u,inputComponent:f,multiline:d,type:m}),y=(e=>{const{classes:t,disableUnderline:n}=e,r=lz({root:["root",!n&&"underline"],input:["input"]},dD,t);return(0,ns.A)({},t,r)})(s),b={root:{ownerState:g},input:{ownerState:g}},w=(null!=p?p:l)?(0,Fz.A)(b,null!=p?p:l):b,x=null!=(n=null!=(o=h.root)?o:c.Root)?n:f$,j=null!=(i=null!=(a=h.input)?a:c.Input)?i:d$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:x,input:j},componentsProps:w,fullWidth:u,inputComponent:f,multiline:d,ref:t,type:m},v,{classes:y}))}));p$.muiName="Input";const h$=p$;var m$;const v$=["children","classes","className","label","notched"],g$=OM("fieldset",{shouldForwardProp:jM})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),y$=OM("legend",{shouldForwardProp:jM})((({ownerState:e,theme:t})=>(0,ns.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,ns.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const b$=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],w$=OM(e$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:JD})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,ns.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${fD.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${fD.focused} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${fD.error} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${fD.disabled} .${fD.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,ns.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),x$=OM((function(e){const{className:t,label:n,notched:o}=e,i=(0,az.A)(e,v$),a=null!=n&&""!==n,s=(0,ns.A)({},e,{notched:o,withLabel:a});return(0,r.jsx)(g$,(0,ns.A)({"aria-hidden":!0,className:t,ownerState:s},i,{children:(0,r.jsx)(y$,{ownerState:s,children:a?(0,r.jsx)("span",{children:n}):m$||(m$=(0,r.jsx)("span",{className:"notranslate",children:""}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),j$=OM(t$,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:QD})((({theme:e,ownerState:t})=>(0,ns.A)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),O$=s.forwardRef((function(e,t){var n,o,i,a,c;const l=PM({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:f=!1,inputComponent:d="input",label:p,multiline:h=!1,notched:m,slots:v={},type:g="text"}=l,y=(0,az.A)(l,b$),b=(e=>{const{classes:t}=e,n=lz({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},uD,t);return(0,ns.A)({},t,n)})(l),w=HD(),x=WD({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),j=(0,ns.A)({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:w,fullWidth:f,hiddenLabel:x.hiddenLabel,multiline:h,size:x.size,type:g}),O=null!=(n=null!=(o=v.root)?o:u.Root)?n:w$,S=null!=(i=null!=(a=v.input)?a:u.Input)?i:j$;return(0,r.jsx)(o$,(0,ns.A)({slots:{root:O,input:S},renderSuffix:e=>(0,r.jsx)(x$,{ownerState:j,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?c||(c=(0,r.jsxs)(s.Fragment,{children:[p," ","*"]})):p,notched:void 0!==m?m:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:f,inputComponent:d,multiline:h,ref:t,type:g},y,{classes:(0,ns.A)({},b,{notchedOutline:null})}))}));O$.muiName="Input";const S$=O$;function _$(e){return gz("MuiFormLabel",e)}const k$=MM("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),E$=["children","className","color","component","disabled","error","filled","focused","required"],C$=OM("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})((({theme:e,ownerState:t})=>(0,ns.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${k$.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${k$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${k$.error}`]:{color:(e.vars||e).palette.error.main}}))),A$=OM("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${k$.error}`]:{color:(e.vars||e).palette.error.main}}))),P$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormLabel"}),{children:o,className:i,component:a="label"}=n,s=(0,az.A)(n,E$),c=WD({props:n,muiFormControl:HD(),states:["color","required","focused","disabled","error","filled"]}),l=(0,ns.A)({},n,{color:c.color||"primary",component:a,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),u=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return lz({root:["root",`color${zM(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},_$,t)})(l);return(0,r.jsxs)(C$,(0,ns.A)({as:a,ownerState:l,className:cz(u.root,i),ref:t},s,{children:[o,c.required&&(0,r.jsxs)(A$,{ownerState:l,"aria-hidden":!0,className:u.asterisk,children:[" ","*"]})]}))})),I$=P$;function R$(e){return gz("MuiInputLabel",e)}MM("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const T$=["disableAnimation","margin","shrink","variant","className"],L$=OM(I$,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${k$.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((({theme:e,ownerState:t})=>(0,ns.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,ns.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,ns.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,ns.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"})))),z$=s.forwardRef((function(e,t){const n=PM({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,shrink:i,className:a}=n,s=(0,az.A)(n,T$),c=HD();let l=i;void 0===l&&c&&(l=c.filled||c.focused||c.adornedStart);const u=WD({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),f=(0,ns.A)({},n,{disableAnimation:o,formControl:c,shrink:l,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,c=lz({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"normal"!==r&&`size${zM(r)}`,a],asterisk:[s&&"asterisk"]},R$,t);return(0,ns.A)({},t,c)})(f);return(0,r.jsx)(L$,(0,ns.A)({"data-shrink":l,ownerState:f,ref:t,className:cz(d.root,a)},s,{classes:d}))})),M$=z$;const N$=function(e,t){var n,r;return s.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)};function D$(e){return gz("MuiFormControl",e)}MM("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const $$=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],F$=OM("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,ns.A)({},t.root,t[`margin${zM(e.margin)}`],e.fullWidth&&t.fullWidth)})((({ownerState:e})=>(0,ns.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"}))),B$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:c="div",disabled:l=!1,error:u=!1,focused:f,fullWidth:d=!1,hiddenLabel:p=!1,margin:h="none",required:m=!1,size:v="medium",variant:g="outlined"}=n,y=(0,az.A)(n,$$),b=(0,ns.A)({},n,{color:a,component:c,disabled:l,error:u,fullWidth:d,hiddenLabel:p,margin:h,required:m,size:v,variant:g}),w=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return lz({root:["root","none"!==n&&`margin${zM(n)}`,r&&"fullWidth"]},D$,t)})(b),[x,j]=s.useState((()=>{let e=!1;return o&&s.Children.forEach(o,(t=>{if(!N$(t,["Input","Select"]))return;const n=N$(t,["Select"])?t.props.input:t;n&&function(e){return e.startAdornment}(n.props)&&(e=!0)})),e})),[O,S]=s.useState((()=>{let e=!1;return o&&s.Children.forEach(o,(t=>{N$(t,["Input","Select"])&&(YD(t.props,!0)||YD(t.props.inputProps,!0))&&(e=!0)})),e})),[_,k]=s.useState(!1);l&&_&&k(!1);const E=void 0===f||l?_:f;let C;const A=s.useMemo((()=>({adornedStart:x,setAdornedStart:j,color:a,disabled:l,error:u,filled:O,focused:E,fullWidth:d,hiddenLabel:p,size:v,onBlur:()=>{k(!1)},onEmpty:()=>{S(!1)},onFilled:()=>{S(!0)},onFocus:()=>{k(!0)},registerEffect:C,required:m,variant:g})),[x,a,l,u,O,E,d,p,C,m,v,g]);return(0,r.jsx)(UD.Provider,{value:A,children:(0,r.jsx)(F$,(0,ns.A)({as:c,ownerState:b,className:cz(w.root,i),ref:t},y,{children:o}))})})),W$=B$;function U$(e){return gz("MuiFormHelperText",e)}const H$=MM("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var V$;const G$=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Z$=OM("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${zM(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((({theme:e,ownerState:t})=>(0,ns.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${H$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${H$.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14}))),K$=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p"}=n,s=(0,az.A)(n,G$),c=WD({props:n,muiFormControl:HD(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,ns.A)({},n,{component:a,contained:"filled"===c.variant||"outlined"===c.variant,variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),u=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:c}=e;return lz({root:["root",o&&"disabled",i&&"error",r&&`size${zM(r)}`,n&&"contained",s&&"focused",a&&"filled",c&&"required"]},U$,t)})(l);return(0,r.jsx)(Z$,(0,ns.A)({as:a,ownerState:l,className:cz(u.root,i),ref:t},s,{children:" "===o?V$||(V$=(0,r.jsx)("span",{className:"notranslate",children:""})):o}))})),q$=K$,Y$=dz,X$=s.createContext();const J$=s.createContext({});function Q$(e){return gz("MuiList",e)}MM("MuiList",["root","padding","dense","subheader"]);const eF=["children","className","component","dense","disablePadding","subheader"],tF=OM("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>(0,ns.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),nF=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:c=!1,disablePadding:l=!1,subheader:u}=n,f=(0,az.A)(n,eF),d=s.useMemo((()=>({dense:c})),[c]),p=(0,ns.A)({},n,{component:a,dense:c,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return lz({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Q$,t)})(p);return(0,r.jsx)(J$.Provider,{value:d,children:(0,r.jsxs)(tF,(0,ns.A)({as:a,className:cz(h.root,i),ref:t,ownerState:p},f,{children:[u,o]}))})}));function rF(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const oF=rF,iF=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function aF(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sF(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function cF(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function lF(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&cF(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const uF=s.forwardRef((function(e,t){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:c,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:f,variant:d="selectedMenu"}=e,p=(0,az.A)(e,iF),h=s.useRef(null),m=s.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});VD((()=>{o&&h.current.focus()}),[o]),s.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${oF(Y$(e))}px`;h.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}})),[]);const v=ZM(h,t);let g=-1;s.Children.forEach(a,((e,t)=>{s.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))}));const y=s.Children.map(a,((e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),s.cloneElement(e,t)}return e}));return(0,r.jsx)(nF,(0,ns.A)({role:"menu",ref:v,className:c,onKeyDown:e=>{const t=h.current,n=e.key,r=Y$(t).activeElement;if("ArrowDown"===n)e.preventDefault(),lF(t,r,u,l,aF);else if("ArrowUp"===n)e.preventDefault(),lF(t,r,u,l,sF);else if("Home"===n)e.preventDefault(),lF(t,null,u,l,aF);else if("End"===n)e.preventDefault(),lF(t,null,u,l,sF);else if(1===n.length){const o=m.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&cF(r,o);o.previousKeyMatched&&(s||lF(t,r,!1,l,aF,o))?e.preventDefault():o.previousKeyMatched=!1}f&&f(e)},tabIndex:o?0:-1},p,{children:y}))})),fF=uF,dF=ND,pF=MD,hF=!1;var mF="unmounted",vF="exited",gF="entering",yF="entered",bF="exiting",wF=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=vF,r.appearStatus=gF):o=yF:o=t.unmountOnExit||t.mountOnEnter?mF:vF,r.state={status:o},r.nextCallback=null,r}lN(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===mF?{status:vF}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==gF&&n!==yF&&(t=gF):n!==gF&&n!==yF||(t=bF)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===gF){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:i().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vF&&this.setState({status:mF})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[i().findDOMNode(this),r],a=o[0],s=o[1],c=this.getTimeouts(),l=r?c.appear:c.enter;!e&&!n||hF?this.safeSetState({status:yF},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:gF},(function(){t.props.onEntering(a,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:yF},(function(){t.props.onEntered(a,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i().findDOMNode(this);t&&!hF?(this.props.onExit(r),this.safeSetState({status:bF},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:vF},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:vF},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===mF)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,az.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l().createElement(uN.Provider,{value:null},"function"==typeof n?n(e,r):l().cloneElement(l().Children.only(n),r))},t}(l().Component);function xF(){}wF.contextType=uN,wF.propTypes={},wF.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xF,onEntering:xF,onEntered:xF,onExit:xF,onExiting:xF,onExited:xF},wF.UNMOUNTED=mF,wF.EXITED=vF,wF.ENTERING=gF,wF.ENTERED=yF,wF.EXITING=bF;const jF=wF;function OF(){const e=AM(bM);return e[wM]||e}const SF=e=>e.scrollTop;function _F(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}const kF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function EF(e){return`scale(${e}, ${e**2})`}const CF={entering:{opacity:1,transform:EF(1)},entered:{opacity:1,transform:"none"}},AF="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),PF=s.forwardRef((function(e,t){const{addEndListener:n,appear:o=!0,children:i,easing:a,in:c,onEnter:l,onEntered:u,onEntering:f,onExit:d,onExited:p,onExiting:h,style:m,timeout:v="auto",TransitionComponent:g=jF}=e,y=(0,az.A)(e,kF),b=JM(),w=s.useRef(),x=OF(),j=s.useRef(null),O=ZM(j,i.ref,t),S=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},_=S(f),k=S(((e,t)=>{SF(e);const{duration:n,delay:r,easing:o}=_F({style:m,timeout:v,easing:a},{mode:"enter"});let i;"auto"===v?(i=x.transitions.getAutoHeightDuration(e.clientHeight),w.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:AF?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)})),E=S(u),C=S(h),A=S((e=>{const{duration:t,delay:n,easing:r}=_F({style:m,timeout:v,easing:a},{mode:"exit"});let o;"auto"===v?(o=x.transitions.getAutoHeightDuration(e.clientHeight),w.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:AF?o:.666*o,delay:AF?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=EF(.75),d&&d(e)})),P=S(p);return(0,r.jsx)(g,(0,ns.A)({appear:o,in:c,nodeRef:j,onEnter:k,onEntered:E,onEntering:_,onExit:A,onExited:P,onExiting:C,addEndListener:e=>{"auto"===v&&b.start(w.current||0,e),n&&n(j.current,e)},timeout:"auto"===v?null:v},y,{children:(e,t)=>s.cloneElement(i,(0,ns.A)({style:(0,ns.A)({opacity:0,transform:EF(.75),visibility:"exited"!==e||c?void 0:"hidden"},CF[e],m,i.props.style),ref:O},t))}))}));PF.muiSupportAuto=!0;const IF=PF;function RF(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function TF(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function LF(e){return parseInt(MD(e).getComputedStyle(e).paddingRight,10)||0}function zF(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&TF(e,o)}))}function MF(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function NF(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=dz(e);return t.body===e?MD(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=rF(dz(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${LF(r)+e}px`;const t=dz(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${LF(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=dz(r).body;else{const t=r.parentElement,n=MD(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const DF=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&TF(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);zF(t,e.mount,e.modalRef,r,!0);const o=MF(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=MF(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=NF(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=MF(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&TF(e.modalRef,t),zF(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&TF(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function $F(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=DF,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:c,children:l,onClose:u,open:f,rootRef:d}=e,p=s.useRef({}),h=s.useRef(null),m=s.useRef(null),v=fz(m,d),[g,y]=s.useState(!f),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let w=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(w=!1);const x=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),j=()=>{o.mount(x(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},O=JL((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||dz(h.current).body;o.add(x(),e),m.current&&j()})),S=s.useCallback((()=>o.isTopModal(x())),[o]),_=JL((e=>{h.current=e,e&&(f&&S()?j():m.current&&TF(m.current,w))})),k=s.useCallback((()=>{o.remove(x(),w)}),[w,o]);s.useEffect((()=>()=>{k()}),[k]),s.useEffect((()=>{f?O():b&&i||k()}),[f,k,b,i,O]);const E=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},C=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Oz(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,ns.A)({},n,t);return(0,ns.A)({role:"presentation"},r,{onKeyDown:E(r),ref:v})},getBackdropProps:(e={})=>{const t=e;return(0,ns.A)({"aria-hidden":!0},t,{onClick:C(t),open:f})},getTransitionProps:()=>({onEnter:RF((()=>{y(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:RF((()=>{y(!0),c&&c(),i&&k()}),null==l?void 0:l.props.onExited)}),rootRef:v,portalRef:_,isTopModal:S,exited:g,hasTransition:b}}const FF=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function BF(e){const t=[],n=[];return Array.from(e.querySelectorAll(FF)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function WF(){return!0}function UF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:a=BF,isEnabled:c=WF,open:l}=e,u=s.useRef(!1),f=s.useRef(null),d=s.useRef(null),p=s.useRef(null),h=s.useRef(null),m=s.useRef(!1),v=s.useRef(null),g=fz(t.ref,v),y=s.useRef(null);s.useEffect((()=>{l&&v.current&&(m.current=!n)}),[n,l]),s.useEffect((()=>{if(!l||!v.current)return;const e=dz(v.current);return v.current.contains(e.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}}),[l]),s.useEffect((()=>{if(!l||!v.current)return;const e=dz(v.current),t=t=>{y.current=t,!o&&c()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(u.current=!0,d.current&&d.current.focus())},n=()=>{const t=v.current;if(null===t)return;if(!e.hasFocus()||!c()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(o&&e.activeElement!==f.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!m.current)return;let n=[];if(e.activeElement!==f.current&&e.activeElement!==d.current||(n=a(v.current)),n.length>0){var r,i;const e=Boolean((null==(r=y.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=y.current)?void 0:i.key)),t=n[0],o=n[n.length-1];"string"!=typeof t&&"string"!=typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,o,i,c,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0};return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelStart"}),s.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,r.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const HF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],VF={entering:{opacity:1},entered:{opacity:1}},GF=s.forwardRef((function(e,t){const n=OF(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:c,easing:l,in:u,onEnter:f,onEntered:d,onEntering:p,onExit:h,onExited:m,onExiting:v,style:g,timeout:y=o,TransitionComponent:b=jF}=e,w=(0,az.A)(e,HF),x=s.useRef(null),j=ZM(x,c.ref,t),O=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=O(p),_=O(((e,t)=>{SF(e);const r=_F({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),f&&f(e,t)})),k=O(d),E=O(v),C=O((e=>{const t=_F({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)})),A=O(m);return(0,r.jsx)(b,(0,ns.A)({appear:a,in:u,nodeRef:x,onEnter:_,onEntered:k,onEntering:S,onExit:C,onExited:A,onExiting:E,addEndListener:e=>{i&&i(x.current,e)},timeout:y},w,{children:(e,t)=>s.cloneElement(c,(0,ns.A)({style:(0,ns.A)({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},VF[e],g,c.props.style),ref:j},t))}))})),ZF=GF;function KF(e){return gz("MuiBackdrop",e)}MM("MuiBackdrop",["root","invisible"]);const qF=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],YF=OM("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>(0,ns.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),XF=s.forwardRef((function(e,t){var n,o,i;const a=PM({props:e,name:"MuiBackdrop"}),{children:s,className:c,component:l="div",components:u={},componentsProps:f={},invisible:d=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:v=ZF,transitionDuration:g}=a,y=(0,az.A)(a,qF),b=(0,ns.A)({},a,{component:l,invisible:d}),w=(e=>{const{classes:t,invisible:n}=e;return lz({root:["root",n&&"invisible"]},KF,t)})(b),x=null!=(n=h.root)?n:f.root;return(0,r.jsx)(v,(0,ns.A)({in:p,timeout:g},y,{children:(0,r.jsx)(YF,(0,ns.A)({"aria-hidden":!0},x,{as:null!=(o=null!=(i=m.root)?i:u.Root)?o:l,className:cz(w.root,c,null==x?void 0:x.className),ownerState:(0,ns.A)({},b,null==x?void 0:x.ownerState),classes:w,ref:t,children:s}))}))}));function JF(e){return gz("MuiModal",e)}MM("MuiModal",["root","hidden","backdrop"]);const QF=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],eB=OM("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>(0,ns.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),tB=OM(XF,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),nB=s.forwardRef((function(e,t){var n,o,i,a,c,l;const u=PM({name:"MuiModal",props:e}),{BackdropComponent:f=tB,BackdropProps:d,className:p,closeAfterTransition:h=!1,children:m,container:v,component:g,components:y={},componentsProps:b={},disableAutoFocus:w=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:j=!1,disablePortal:O=!1,disableRestoreFocus:S=!1,disableScrollLock:_=!1,hideBackdrop:k=!1,keepMounted:E=!1,onBackdropClick:C,open:A,slotProps:P,slots:I}=u,R=(0,az.A)(u,QF),T=(0,ns.A)({},u,{closeAfterTransition:h,disableAutoFocus:w,disableEnforceFocus:x,disableEscapeKeyDown:j,disablePortal:O,disableRestoreFocus:S,disableScrollLock:_,hideBackdrop:k,keepMounted:E}),{getRootProps:L,getBackdropProps:z,getTransitionProps:M,portalRef:N,isTopModal:D,exited:$,hasTransition:F}=$F((0,ns.A)({},T,{rootRef:t})),B=(0,ns.A)({},T,{exited:$}),W=(e=>{const{open:t,exited:n,classes:r}=e;return lz({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},JF,r)})(B),U={};if(void 0===m.props.tabIndex&&(U.tabIndex="-1"),F){const{onEnter:e,onExited:t}=M();U.onEnter=e,U.onExited=t}const H=null!=(n=null!=(o=null==I?void 0:I.root)?o:y.Root)?n:eB,V=null!=(i=null!=(a=null==I?void 0:I.backdrop)?a:y.Backdrop)?i:f,G=null!=(c=null==P?void 0:P.root)?c:b.root,Z=null!=(l=null==P?void 0:P.backdrop)?l:b.backdrop,K=kz({elementType:H,externalSlotProps:G,externalForwardedProps:R,getSlotProps:L,additionalProps:{ref:t,as:g},ownerState:B,className:cz(p,null==G?void 0:G.className,null==W?void 0:W.root,!B.open&&B.exited&&(null==W?void 0:W.hidden))}),q=kz({elementType:V,externalSlotProps:Z,additionalProps:d,getSlotProps:e=>z((0,ns.A)({},e,{onClick:t=>{C&&C(t),null!=e&&e.onClick&&e.onClick(t)}})),className:cz(null==Z?void 0:Z.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:B});return E||A||F&&!$?(0,r.jsx)(pz,{ref:N,container:v,disablePortal:O,children:(0,r.jsxs)(H,(0,ns.A)({},K,{children:[!k&&f?(0,r.jsx)(V,(0,ns.A)({},q)):null,(0,r.jsx)(UF,{disableEnforceFocus:x,disableAutoFocus:w,disableRestoreFocus:S,isEnabled:D,open:A,children:s.cloneElement(m,U)})]}))}):null})),rB=nB;function oB(e){return gz("MuiPopover",e)}MM("MuiPopover",["root","paper"]);const iB=["onEntering"],aB=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],sB=["slotProps"];function cB(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function lB(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function uB(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function fB(e){return"function"==typeof e?e():e}const dB=OM(rB,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),pB=OM(GM,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),hB=s.forwardRef((function(e,t){var n,o,i;const a=PM({props:e,name:"MuiPopover"}),{action:c,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:p,className:h,container:m,elevation:v=8,marginThreshold:g=16,open:y,PaperProps:b={},slots:w,slotProps:x,transformOrigin:j={vertical:"top",horizontal:"left"},TransitionComponent:O=IF,transitionDuration:S="auto",TransitionProps:{onEntering:_}={},disableScrollLock:k=!1}=a,E=(0,az.A)(a.TransitionProps,iB),C=(0,az.A)(a,aB),A=null!=(n=null==x?void 0:x.paper)?n:b,P=s.useRef(),I=ZM(P,A.ref),R=(0,ns.A)({},a,{anchorOrigin:u,anchorReference:d,elevation:v,marginThreshold:g,externalPaperSlotProps:A,transformOrigin:j,TransitionComponent:O,transitionDuration:S,TransitionProps:E}),T=(e=>{const{classes:t}=e;return lz({root:["root"],paper:["paper"]},oB,t)})(R),L=s.useCallback((()=>{if("anchorPosition"===d)return f;const e=fB(l),t=(e&&1===e.nodeType?e:Y$(P.current).body).getBoundingClientRect();return{top:t.top+cB(t,u.vertical),left:t.left+lB(t,u.horizontal)}}),[l,u.horizontal,u.vertical,f,d]),z=s.useCallback((e=>({vertical:cB(e,j.vertical),horizontal:lB(e,j.horizontal)})),[j.horizontal,j.vertical]),M=s.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=z(t);if("none"===d)return{top:null,left:null,transformOrigin:uB(n)};const r=L();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=pF(fB(l)),u=c.innerHeight-g,f=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>f){const e=s-f;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:uB(n)}}),[l,d,L,z,g]),[N,D]=s.useState(y),$=s.useCallback((()=>{const e=P.current;if(!e)return;const t=M(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,D(!0)}),[M]);s.useEffect((()=>(k&&window.addEventListener("scroll",$),()=>window.removeEventListener("scroll",$))),[l,k,$]);s.useEffect((()=>{y&&$()})),s.useImperativeHandle(c,(()=>y?{updatePosition:()=>{$()}}:null),[y,$]),s.useEffect((()=>{if(!y)return;const e=dF((()=>{$()})),t=pF(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,$]);let F=S;"auto"!==S||O.muiSupportAuto||(F=void 0);const B=m||(l?Y$(fB(l)).body:void 0),W=null!=(o=null==w?void 0:w.root)?o:dB,U=null!=(i=null==w?void 0:w.paper)?i:pB,H=kz({elementType:U,externalSlotProps:(0,ns.A)({},A,{style:N?A.style:(0,ns.A)({},A.style,{opacity:0})}),additionalProps:{elevation:v,ref:I},ownerState:R,className:cz(T.paper,null==A?void 0:A.className)}),V=kz({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:C,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:B,open:y},ownerState:R,className:cz(T.root,h)}),{slotProps:G}=V,Z=(0,az.A)(V,sB);return(0,r.jsx)(W,(0,ns.A)({},Z,!jz(W)&&{slotProps:G,disableScrollLock:k},{children:(0,r.jsx)(O,(0,ns.A)({appear:!0,in:y,onEntering:(e,t)=>{_&&_(e,t),$()},onExited:()=>{D(!1)},timeout:F},E,{children:(0,r.jsx)(U,(0,ns.A)({},H,{children:p}))}))}))})),mB=hB;function vB(e){return gz("MuiMenu",e)}MM("MuiMenu",["root","paper","list"]);const gB=["onEntering"],yB=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],bB={vertical:"top",horizontal:"right"},wB={vertical:"top",horizontal:"left"},xB=OM(mB,{shouldForwardProp:e=>jM(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jB=OM(pB,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),OB=OM(fF,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),SB=s.forwardRef((function(e,t){var n,o;const i=PM({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:c,className:l,disableAutoFocusItem:u=!1,MenuListProps:f={},onClose:d,open:p,PaperProps:h={},PopoverClasses:m,transitionDuration:v="auto",TransitionProps:{onEntering:g}={},variant:y="selectedMenu",slots:b={},slotProps:w={}}=i,x=(0,az.A)(i.TransitionProps,gB),j=(0,az.A)(i,yB),O=(()=>{const e=s.useContext(X$);return null!=e&&e})(),S=(0,ns.A)({},i,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:f,onEntering:g,PaperProps:h,transitionDuration:v,TransitionProps:x,variant:y}),_=(e=>{const{classes:t}=e;return lz({root:["root"],paper:["paper"],list:["list"]},vB,t)})(S),k=a&&!u&&p,E=s.useRef(null);let C=-1;s.Children.map(c,((e,t)=>{s.isValidElement(e)&&(e.props.disabled||("selectedMenu"===y&&e.props.selected||-1===C)&&(C=t))}));const A=null!=(n=b.paper)?n:jB,P=null!=(o=w.paper)?o:h,I=kz({elementType:b.root,externalSlotProps:w.root,ownerState:S,className:[_.root,l]}),R=kz({elementType:A,externalSlotProps:P,ownerState:S,className:_.paper});return(0,r.jsx)(xB,(0,ns.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:O?"right":"left"},transformOrigin:O?bB:wB,slots:{paper:A,root:b.root},slotProps:{root:I,paper:R},open:p,ref:t,transitionDuration:v,TransitionProps:(0,ns.A)({onEntering:(e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:O?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:S},j,{classes:m,children:(0,r.jsx)(OB,(0,ns.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:E,autoFocus:a&&(-1===C||u),autoFocusItem:k,variant:y},f,{className:cz(_.list,f.className),children:c}))}))})),_B=SB;function kB(e){return gz("MuiNativeSelect",e)}const EB=MM("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),CB=["className","disabled","error","IconComponent","inputRef","variant"],AB=({ownerState:e,theme:t})=>(0,ns.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,ns.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${EB.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),PB=OM("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:jM,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${EB.multiple}`]:t.multiple}]}})(AB),IB=({ownerState:e,theme:t})=>(0,ns.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${EB.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),RB=OM("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${zM(n.variant)}`],n.open&&t.iconOpen]}})(IB),TB=s.forwardRef((function(e,t){const{className:n,disabled:o,error:i,IconComponent:a,inputRef:c,variant:l="standard"}=e,u=(0,az.A)(e,CB),f=(0,ns.A)({},e,{disabled:o,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return lz({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${zM(n)}`,i&&"iconOpen",r&&"disabled"]},kB,t)})(f);return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(PB,(0,ns.A)({ownerState:f,className:cz(d.select,n),disabled:o,ref:c||t},u)),e.multiple?null:(0,r.jsx)(RB,{as:a,ownerState:f,className:d.icon})]})})),LB=qL;function zB(e){return gz("MuiSelect",e)}const MB=MM("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var NB;const DB=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$B=OM("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${MB.select}`]:t.select},{[`&.${MB.select}`]:t[n.variant]},{[`&.${MB.error}`]:t.error},{[`&.${MB.multiple}`]:t.multiple}]}})(AB,{[`&.${MB.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),FB=OM("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${zM(n.variant)}`],n.open&&t.iconOpen]}})(IB),BB=OM("input",{shouldForwardProp:e=>xM(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function WB(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function UB(e){return null==e||"string"==typeof e&&!e.trim()}const HB=s.forwardRef((function(e,t){var n;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:c,children:l,className:u,defaultOpen:f,defaultValue:d,disabled:p,displayEmpty:h,error:m=!1,IconComponent:v,inputRef:g,labelId:y,MenuProps:b={},multiple:w,name:x,onBlur:j,onChange:O,onClose:S,onFocus:_,onOpen:k,open:E,readOnly:C,renderValue:A,SelectDisplayProps:P={},tabIndex:I,value:R,variant:T="standard"}=e,L=(0,az.A)(e,DB),[z,M]=LB({controlled:R,default:d,name:"Select"}),[N,D]=LB({controlled:E,default:f,name:"Select"}),$=s.useRef(null),F=s.useRef(null),[B,W]=s.useState(null),{current:U}=s.useRef(null!=E),[H,V]=s.useState(),G=ZM(t,g),Z=s.useCallback((e=>{F.current=e,e&&W(e)}),[]),K=null==B?void 0:B.parentNode;s.useImperativeHandle(G,(()=>({focus:()=>{F.current.focus()},node:$.current,value:z})),[z]),s.useEffect((()=>{f&&N&&B&&!U&&(V(c?null:K.clientWidth),F.current.focus())}),[B,c]),s.useEffect((()=>{a&&F.current.focus()}),[a]),s.useEffect((()=>{if(!y)return;const e=Y$(F.current).getElementById(y);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[y]);const q=(e,t)=>{e?k&&k(t):S&&S(t),U||(V(c?null:K.clientWidth),D(e))},Y=s.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(w){n=Array.isArray(z)?z.slice():[];const t=z.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),z!==n&&(M(n),O)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),O(o,e)}w||q(!1,t)}},J=null!==B&&N;let Q,ee;delete L["aria-invalid"];const te=[];let ne=!1,re=!1;(YD({value:z})||h)&&(A?Q=A(z):ne=!0);const oe=Y.map((e=>{if(!s.isValidElement(e))return null;let t;if(w){if(!Array.isArray(z))throw new Error((0,$z.A)(2));t=z.some((t=>WB(t,e.props.value))),t&&ne&&te.push(e.props.children)}else t=WB(z,e.props.value),t&&ne&&(ee=e.props.children);return t&&(re=!0),s.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(Q=w?0===te.length?null:te.reduce(((e,t,n)=>(e.push(t),n<te.length-1&&e.push(", "),e)),[]):ee);let ie,ae=H;!c&&U&&B&&(ae=K.clientWidth),ie=void 0!==I?I:p?null:0;const se=P.id||(x?`mui-component-select-${x}`:void 0),ce=(0,ns.A)({},e,{variant:T,value:z,open:J,error:m}),le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return lz({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${zM(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},zB,t)})(ce),ue=(0,ns.A)({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),fe=KL();return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)($B,(0,ns.A)({ref:Z,tabIndex:ie,role:"combobox","aria-controls":fe,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[y,se].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:e=>{if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),q(!0,e))}},onMouseDown:p||C?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),q(!0,e))},onBlur:e=>{!J&&j&&(Object.defineProperty(e,"target",{writable:!0,value:{value:z,name:x}}),j(e))},onFocus:_},P,{ownerState:ce,className:cz(P.className,le.select,u),id:se,children:UB(Q)?NB||(NB=(0,r.jsx)("span",{className:"notranslate",children:""})):Q})),(0,r.jsx)(BB,(0,ns.A)({"aria-invalid":m,value:Array.isArray(z)?z.join(","):z,name:x,ref:$,"aria-hidden":!0,onChange:e=>{const t=Y.find((t=>t.props.value===e.target.value));void 0!==t&&(M(t.props.value),O&&O(e,t))},tabIndex:-1,disabled:p,className:le.nativeInput,autoFocus:a,ownerState:ce},L)),(0,r.jsx)(FB,{as:v,className:le.icon,ownerState:ce}),(0,r.jsx)(_B,(0,ns.A)({id:`menu-${x||""}`,anchorEl:K,open:J,onClose:e=>{q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:(0,ns.A)({"aria-labelledby":y,role:"listbox","aria-multiselectable":w?"true":void 0,disableListWrap:!0,id:fe},b.MenuListProps),slotProps:(0,ns.A)({},b.slotProps,{paper:(0,ns.A)({},ue,{style:(0,ns.A)({minWidth:ae},null!=ue?ue.style:null)})}),children:oe}))]})})),VB=HB,GB=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],ZB=["root"],KB={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>jM(e)&&"variant"!==e,slot:"Root"},qB=OM(l$,KB)(""),YB=OM(S$,KB)(""),XB=OM(h$,KB)(""),JB=s.forwardRef((function(e,t){const n=PM({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:a={},className:c,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:f=mD,id:d,input:p,inputProps:h,label:m,labelId:v,MenuProps:g,multiple:y=!1,native:b=!1,onClose:w,onOpen:x,open:j,renderValue:O,SelectDisplayProps:S,variant:_="outlined"}=n,k=(0,az.A)(n,GB),E=b?TB:VB,C=WD({props:n,muiFormControl:HD(),states:["variant","error"]}),A=C.variant||_,P=(0,ns.A)({},n,{variant:A,classes:a}),I=(e=>{const{classes:t}=e;return t})(P),R=(0,az.A)(I,ZB),T=p||{standard:(0,r.jsx)(qB,{ownerState:P}),outlined:(0,r.jsx)(YB,{label:m,ownerState:P}),filled:(0,r.jsx)(XB,{ownerState:P})}[A],L=ZM(t,T.ref);return(0,r.jsx)(s.Fragment,{children:s.cloneElement(T,(0,ns.A)({inputComponent:E,inputProps:(0,ns.A)({children:i,error:C.error,IconComponent:f,variant:A,type:void 0,multiple:y},b?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:v,MenuProps:g,onClose:w,onOpen:x,open:j,renderValue:O,SelectDisplayProps:(0,ns.A)({id:d},S)},h,{classes:h?(0,Fz.A)(R,h.classes):R},p?p.props.inputProps:{})},(y&&b||u)&&"outlined"===A?{notched:!0}:{},{ref:L,className:cz(T.props.className,c,I.root)},!p&&{variant:A},k))})}));JB.muiName="Select";const QB=JB;function eW(e){return gz("MuiTextField",e)}MM("MuiTextField",["root"]);const tW=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],nW={standard:l$,filled:h$,outlined:S$},rW=OM(W$,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:c="primary",defaultValue:l,disabled:u=!1,error:f=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:v,inputProps:g,InputProps:y,inputRef:b,label:w,maxRows:x,minRows:j,multiline:O=!1,name:S,onBlur:_,onChange:k,onFocus:E,placeholder:C,required:A=!1,rows:P,select:I=!1,SelectProps:R,type:T,value:L,variant:z="outlined"}=n,M=(0,az.A)(n,tW),N=(0,ns.A)({},n,{autoFocus:i,color:c,disabled:u,error:f,fullWidth:p,multiline:O,required:A,select:I,variant:z}),D=(e=>{const{classes:t}=e;return lz({root:["root"]},eW,t)})(N);const $={};"outlined"===z&&(v&&void 0!==v.shrink&&($.notched=v.shrink),$.label=w),I&&(R&&R.native||($.id=void 0),$["aria-describedby"]=void 0);const F=KL(m),B=h&&F?`${F}-helper-text`:void 0,W=w&&F?`${F}-label`:void 0,U=nW[z],H=(0,r.jsx)(U,(0,ns.A)({"aria-describedby":B,autoComplete:o,autoFocus:i,defaultValue:l,fullWidth:p,multiline:O,name:S,rows:P,maxRows:x,minRows:j,type:T,value:L,id:F,inputRef:b,onBlur:_,onChange:k,onFocus:E,placeholder:C,inputProps:g},$,y));return(0,r.jsxs)(rW,(0,ns.A)({className:cz(D.root,s),disabled:u,error:f,fullWidth:p,ref:t,required:A,color:c,variant:z,ownerState:N},M,{children:[null!=w&&""!==w&&(0,r.jsx)(M$,(0,ns.A)({htmlFor:F,id:W},v,{children:w})),I?(0,r.jsx)(QB,(0,ns.A)({"aria-describedby":B,id:F,labelId:W,value:L,input:H},R,{children:a})):H,h&&(0,r.jsx)(q$,(0,ns.A)({id:B},d,{children:h}))]}))})),iW=oW;var aW=n(9599);function sW(e){return gz("MuiTypography",e)}MM("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const cW=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],lW=OM("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${zM(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>(0,ns.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),uW={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},fW={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},dW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiTypography"}),o=(e=>fW[e]||e)(n.color),i=(0,aW.A)((0,ns.A)({},n,{color:o})),{align:a="inherit",className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:f=!1,variant:d="body1",variantMapping:p=uW}=i,h=(0,az.A)(i,cW),m=(0,ns.A)({},i,{align:a,color:o,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:f,variant:d,variantMapping:p}),v=c||(f?"p":p[d]||uW[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return lz({root:["root",i,"inherit"!==e.align&&`align${zM(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},sW,a)})(m);return(0,r.jsx)(lW,(0,ns.A)({as:v,ref:t,ownerState:m,className:cz(g.root,s)},h))})),pW=dW;function hW(e){return gz("MuiInputAdornment",e)}const mW=MM("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var vW;const gW=["children","className","component","disablePointerEvents","disableTypography","position","variant"],yW=OM("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${zM(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>(0,ns.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${mW.positionStart}&:not(.${mW.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),bW=s.forwardRef((function(e,t){const n=PM({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:c=!1,disableTypography:l=!1,position:u,variant:f}=n,d=(0,az.A)(n,gW),p=HD()||{};let h=f;f&&p.variant,p&&!h&&(h=p.variant);const m=(0,ns.A)({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:c,position:u,variant:h}),v=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return lz({root:["root",n&&"disablePointerEvents",o&&`position${zM(o)}`,a,r&&"hiddenLabel",i&&`size${zM(i)}`]},hW,t)})(m);return(0,r.jsx)(UD.Provider,{value:null,children:(0,r.jsx)(yW,(0,ns.A)({as:a,ownerState:m,className:cz(v.root,i),ref:t},d,{children:"string"!=typeof o||l?(0,r.jsxs)(s.Fragment,{children:["start"===u?vW||(vW=(0,r.jsx)("span",{className:"notranslate",children:""})):null,o]}):(0,r.jsx)(pW,{color:"text.secondary",children:o})}))})})),wW=bW;function xW(e){return xW="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},xW(e)}function jW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jW(Object(n),!0).forEach((function(t){SW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=xW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xW(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _W=function(e){var t=e.onLocationChange,n=e.id,o=e.isError,i=tz({matchFrom:"any",limit:500}),a=oT.filter((function(e){return rT.includes(e.code.toLowerCase())}));return(0,r.jsx)(zD,{id:n,sx:{width:"100%",zIndex:"1000"},classes:{inputRoot:"surfer-sidebar-box__location-input-wraper"},options:a,getOptionLabel:function(e){return e.label},isOptionEqualToValue:function(e,t){return(null==e?void 0:e.code)===t.code},defaultValue:{code:"US",label:"United States"},filterOptions:i,onChange:function(e,n){var r=null!=n?null==n?void 0:n.code.toLowerCase():"";t(r)},disablePortal:!0,PopperComponent:function(e){return(0,r.jsx)(LM,OW(OW({},e),{},{placement:"top"}))},renderOption:function(e,t){var n,o=(null==t||null===(n=t.code)||void 0===n?void 0:n.toLowerCase())||"";if(""!=o)return(0,r.jsxs)("li",OW(OW({},e),{},{children:[(0,r.jsx)("img",{loading:"lazy",src:"https://flagcdn.com/24x18/".concat(o,".png"),srcSet:"https://flagcdn.com/24x18/".concat(o,".png"),alt:"",style:{marginRight:"10px"}}),t.label]}))},renderInput:function(e){var t=function(e){var t=oT.find((function(t){return t.label===e}));return t?t.code.toLowerCase():""}(e.inputProps.value);return(0,r.jsx)(iW,OW(OW({},e),{},{id:"surfer-country-select-input",placeholder:"Choose a country",error:o,InputProps:OW(OW({},e.InputProps),{},{className:"surfer-sidebar-box__location-input",startAdornment:(0,r.jsx)(wW,{position:"start",children:""!=t&&(0,r.jsx)("img",{loading:"lazy",src:"https://flagcdn.com/24x18/".concat(t,".png"),srcSet:"https://flagcdn.com/48x36/".concat(t,".png 2x"),alt:""})})}),sx:{"& .MuiOutlinedInput-root":{padding:"5px 0px",paddingLeft:"10px",borderRadius:"8px",color:"#222a3a;",fontSize:"16px",fontWeight:"400",borderColor:"#cbd5e0",marginTop:"4px","& fieldset":{borderColor:"#cbd5e0"},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"#fc8181"},"&:hover fieldset":{borderColor:"#7934cb"},"&.Mui-focused fieldset":{borderColor:"#7934cb",outlineColor:"#7934cb",borderWidth:"3px"}},"& .MuiAutocomplete-listbox":{position:"absolute",zIndex:"1000"},"& .MuiOutlinedInput-root .MuiAutocomplete-input":{outline:"none",border:"0px",padding:"0px"},"& .MuiOutlinedInput-root input::placeholder":{color:"#718096;",opacity:"1"},"& .MuiOutlinedInput-root input::-ms-input-placeholder":{color:"#718096;"},"& .MuiOutlinedInput-root input:-ms-input-placeholder":{color:"#718096;"},"& .MuiOutlinedInput-root input:focus":{outline:"none !important",border:"0px",boxShadow:"none"}}}))}})};function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kW.apply(this,arguments)}const EW=function(e){return s.createElement("svg",kW({viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625zM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5m0 9a1 1 0 1 0 0-2a1 1 0 0 0 0 2",clipRule:"evenodd"}))};function CW(){return CW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CW.apply(this,arguments)}const AW=function(e){return s.createElement("svg",CW({width:"1.2em",height:"1.2em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.24337 1.59998C9.62402 1.59998 9.9326 1.90856 9.9326 2.28921C9.9326 2.66986 9.62402 2.97844 9.24337 2.97844H3.88203C2.95742 2.94398 2.16978 3.7366 2.16978 4.70153L2.16778 11.9375L2.16878 11.9385L2.16979 11.9395C2.17033 12.9039 2.95774 13.6616 3.88203 13.6616H11.1077C11.7554 13.6616 12.3323 13.2999 12.6385 12.7783C12.8136 12.4801 13.0974 12.2208 13.4432 12.2208C13.8635 12.2208 14.1984 12.5885 14.0526 12.9827C13.6129 14.1716 12.4501 15.04 11.1077 15.04H3.88203C2.20403 15.04 0.799988 13.6616 0.799988 11.9385L0.835978 4.70153C0.835978 3.0129 2.20403 1.59998 3.91628 1.59998H9.24337ZM14.4051 8.19994C13.4063 9.64906 11.6265 10.808 8.58773 10.9121C8.49106 11.2653 8.41978 11.5934 8.37161 11.8825C8.31713 12.2094 8.008 12.4302 7.68113 12.3757C7.35427 12.3212 7.13346 12.0121 7.18793 11.6852C7.26409 11.2283 7.38797 10.7009 7.56416 10.14C7.99479 8.7689 8.75353 7.1483 9.94267 5.85998C11.1423 4.56031 12.792 3.58982 14.9577 3.58982H15.5577V4.18982C15.5577 4.67286 15.5149 5.42072 15.2926 6.24713L13.1104 6.83187C12.897 6.88904 12.7703 7.10838 12.8275 7.32176C12.8847 7.53515 13.104 7.66178 13.3174 7.60461L14.9771 7.1599C14.8272 7.50882 14.6396 7.85967 14.4051 8.19994Z",fill:"currentColor"}))};function PW(e){return PW="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},PW(e)}function IW(){IW=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==PW(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(PW(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function RW(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function TW(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){RW(i,r,o,a,s,"next",e)}function s(e){RW(i,r,o,a,s,"throw",e)}a(void 0)}))}}function LW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zW(e,t)}(e,t)||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 zW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var MW=function(){var e=_T(),t=e.setCurrentStep,n=e.setSurferDraft,o=e.wpPostId,i=e.content,a=LW((0,s.useState)(""),2),c=a[0],l=a[1],u=LW((0,s.useState)("us"),2),f=u[0],d=u[1],p=LW((0,s.useState)(!1),2),h=p[0],m=p[1],v=LW((0,s.useState)(!1),2),g=v[0],y=v[1],b=LW((0,s.useState)(!0),2),w=b[0],x=b[1],j=LW((0,s.useState)(!0),2),O=j[0],S=j[1],_=LW((0,s.useState)(""),2),k=_[0],E=_[1],C=function(){var e=TW(IW().mark((function e(){var r,a,s,l;return IW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x(!0),S(!0),E(""),r=!0,(c.length<1||""===c)&&(x(!1),r=!1),(f.length<1||""===f)&&(S(!1),r=!1),r){e.next=8;break}return e.abrupt("return");case 8:return y(!0),e.next=11,fetch(wpsurfer.ajaxurl+"?action=surfer_create_content_editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,keywords:c,location:f,word_count:!1,content:i,post_id:o})});case 11:return a=e.sent,e.next=14,a.json();case 14:(s=e.sent)&&s.id&&s.id>0?(n({draftId:s.id,permalinkHash:s.permalink_hash,folderName:"",keyword:c.split(",")[0],keywords:c.split(","),location:f,title:"",tags:[],editedInSurferDate:"",editedInWordPressDate:"",contentScore:0,is_ai_generated:!1,is_wp_connected:[]}),wpsurfer.default_permalink_hash=s.permalink_hash,wpsurfer.default_draft_id=s.id,y(!1),t("done")):(l="",s&&s.errors?s.errors.map((function(e){l+=e.detail+" "})):l=s&&s.message?s.message:"Unknown error",y(!1),E(l));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=TW(IW().mark((function e(){var t,n,r;return IW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(wpsurfer.ajaxurl+"?action=surfer_get_user_credits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 2:return t=e.sent,e.next=5,t.json();case 5:(n=e.sent)&&n.subscription_credits&&(r=(null==n?void 0:n.overage_balance)||0,m(n.subscription_credits+r));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){A()}),[]),(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{contentEditorCredits:h,showContentEditorCredits:!0}),(0,r.jsx)(Vn,{size:"base",margin:["lg","vertical"],children:Mk("Create a Content Editor (CE) and easily write articles that read well and rank high!","surferseo")}),(0,r.jsxs)($t,{gap:"lg",direction:"column",children:[(0,r.jsxs)(Tg,{htmlFor:"keyword-surfer-keyword-input",children:[Mk("Keyword(s)","surferseo"),(0,r.jsx)(ey,{id:"keyword-surfer-keyword-input",placeholder:Mk("e.g. best SEO tool","surferseo"),onValueChange:function(e){return l(e)},invalid:!w,errorMessage:Mk("Keyword is required","surferseo"),style:{marginTop:"8px"}})]}),(0,r.jsxs)(Tg,{children:[Mk("Location / Languages","surferseo"),(0,r.jsx)(_W,{id:"ks-locations",onLocationChange:d,isError:!O}),!O&&(0,r.jsxs)($t,{gap:"2xs",padding:["xs","top"],children:[(0,r.jsx)(Wn,{color:"red-base",Component:EW}),(0,r.jsx)(Vn,{color:"red-base",size:"sm",children:Mk("Location is required","surferseo")})]})]}),k.length>0&&(0,r.jsx)(cw,{closeIcon:!0,color:"danger",title:Mk("Error"),description:k})]})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){t("start")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:AW,onClick:function(){return C()},loading:g,disabled:!h||g,children:Mk("Create CE for 1 credit","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})},NW=function(){var e=_T(),t=e.surferDraft,n=e.scrapeIsReady;return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Synced with Surfer","surferseo")})})}),(0,r.jsx)(vb,{children:(0,r.jsxs)($t,{direction:"row",gap:"md",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:tL,size:"xlarge"}),(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"regular",children:Mk("Your Content Editor has been updated and synced with WordPress!","surferseo")})]})}),(0,r.jsx)(gb,{children:(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(Ao,{href:"".concat(wpsurfer.surferurl,"/drafts/").concat(t.draftId),target:"_blank",variant:"primary",icon:CT,rightIcon:!0,disabled:!n,loading:!n,children:Mk(n?"Continue in Surfer":"Scrape in progress...","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Back to work","surferseo")})]})})]})};function DW(){return DW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DW.apply(this,arguments)}const $W=function(e){return s.createElement("svg",DW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))};function FW(){return FW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FW.apply(this,arguments)}const BW=function(e){return s.createElement("svg",FW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))};function WW(){return WW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WW.apply(this,arguments)}const UW=function(e){return s.createElement("svg",WW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75"}))};function HW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return VW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VW(e,t)}(e,t)||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 VW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var GW=function(){var e=_T().setCurrentStep,t=HW((0,s.useState)(null),2),n=t[0],o=t[1];return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsxs)($t,{gap:"sm",direction:"column",margin:["lg","top"],className:"surfer-picker",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("What do you want to do?","surferseo")}),(0,r.jsxs)(ts,{type:"radio",checked:"create_new"===n,onChange:function(){return o("create_new")},inputRight:!0,children:[(0,r.jsx)(Wn,{Component:$W}),Mk("Create new Content Editor","surferseo")]},"create_new"),(0,r.jsxs)(ts,{type:"radio",checked:"update_existing"===n,onChange:function(){return o("update_existing")},inputRight:!0,children:[(0,r.jsx)(Wn,{Component:BW}),Mk("Overwrite existing Content Editor","surferseo")]},"update_existing")]})]}),(0,r.jsx)(gb,{children:(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:UW,rightIcon:!0,onClick:function(){n&&e(n)},disabled:!n,children:Mk("Next","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})})]})};function ZW(e){return ZW="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},ZW(e)}function KW(){KW=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==ZW(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(ZW(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function qW(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function YW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return XW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XW(e,t)}(e,t)||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 XW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JW=function(e){var t=_T(),n=t.setCurrentStep,o=t.setSurferDraft,i=t.surferTempDraft,a=t.wpPostId,c=t.content,l=YW((0,s.useState)(!1),2),u=l[0],f=l[1],d=YW((0,s.useState)(""),2),p=d[0],h=d[1],m="";m=Array.isArray(i.keywords)&&i.keywords.length>1?i.keywords.join(", "):i.keyword;var v=function(){var e,t=(e=KW().mark((function e(){var t,r,s;return KW().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),h(""),e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_update_content_editor",{method:"POST",headers:{"Content-Type":"application/json","api-key":wpsurfer.api_key},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,draft_id:i.draftId,content:c,post_id:a,permalink_hash:i.permalinkHash,keywords:i.keywords,location:i.location})});case 4:return t=e.sent,e.next=7,t.json();case 7:r=e.sent,f(!1),r&&"Draft updated"==r.message?(wpsurfer.default_permalink_hash=i.permalinkHash,wpsurfer.default_draft_id=i.draftId,wpsurfer.post_is_scraped=!0,o(i),n("done")):(s="",r.errors?r.errors.map((function(e){s+=e.detail+" "})):s=r.message?r.message:"Unknown error",h(s));case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){qW(i,r,o,a,s,"next",e)}function s(e){qW(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,r.jsxs)(db,{size:"base",fullWidth:!0,zIndex:1e3,scrollBody:!0,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsxs)($t,{gap:"lg",direction:"column",margin:["lg","top"],children:[(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(Rn,{style:{maxWidth:"40px"},children:(0,r.jsx)(F_,{score:{value:i.contentScore},mode:"compact",children:(0,r.jsx)(B_,{})})}),(0,r.jsx)(go,{href:"".concat(wpsurfer.surferurl,"/drafts/").concat(i.draftId),target:"_blank",variant:"standalone",icon:CT,children:Mk("Open in a new tab","surferseo")})]}),i.folderName&&(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Folder","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.folderName})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Keyword(s)","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:m})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Location","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.location})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Title","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:"gray-140",weight:"semibold",children:i.title?i.title:Mk("(no title)","surferseo")})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:Mk("Tags","surferseo")}),(0,r.jsx)($t,{direction:"row",gap:"sm",alignItems:"flex-start",children:i.tags?i.tags.map((function(e){return(0,r.jsx)(sg,{color:"secondary",children:e},e)})):Mk("No tags","surferseo")})]}),(0,r.jsxs)($t,{gap:"5xl",children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",children:Mk("Last edit in Surfer","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:vL(i.editedInWordPressDate,i.editedInSurferDate)?"black":"orange-base",weight:"medium",children:i.editedInSurferDate})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{size:"md",color:"gray-100",children:Mk("Last edit in WordPress","surferseo")}),(0,r.jsx)(Vn,{size:"md",color:vL(i.editedInWordPressDate,i.editedInSurferDate)?"green-base":"black",weight:"medium",children:i.editedInWordPressDate})]})]}),!vL(i.editedInWordPressDate,i.editedInSurferDate)&&(0,r.jsx)(cw,{color:"warning",title:Mk("There is the newer version of the article in Surfer","surferseo"),description:Mk("You can overwrite it with this one","surferseo")}),""!==p&&(0,r.jsx)(cw,{color:"danger",description:p,title:Mk("There was an error during export!","surferseo")})]})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){n("update_existing")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:bL,onClick:function(){v()},loading:u,disabled:u,children:Mk("Overwrite the CE","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})};function QW(){return QW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW.apply(this,arguments)}const eU=function(e){return s.createElement("svg",QW({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09m8.445-7.188L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456m-1.365 11.852L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183l.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394l-1.183.394a2.25 2.25 0 0 0-1.423 1.423"}))};function tU(){return tU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tU.apply(this,arguments)}const nU=function(e){return s.createElement("svg",tU({width:"1.2em",height:"1.2em",id:"icon-wordpress",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{d:"M10 0C4.48889 0 0 4.48444 0 10C0 15.5111 4.48889 20 10 20C15.5111 20 20 15.5111 20 10C20 4.48444 15.5111 0 10 0ZM1.00889 10C1.00889 8.69778 1.28889 7.45778 1.78667 6.34222L6.07556 18.0933C3.07556 16.6311 1.00889 13.5556 1.00889 10ZM10 18.9911C9.11556 18.9911 8.26667 18.8622 7.45778 18.6222L10.1556 10.7822L12.9156 18.3556C12.9378 18.4 12.9556 18.44 12.9822 18.48C12.0533 18.8089 11.0489 18.9911 10 18.9911ZM11.24 5.78667C11.7822 5.76 12.2667 5.70222 12.2667 5.70222C12.7511 5.64444 12.6933 4.93333 12.2089 4.96C12.2089 4.96 10.7511 5.07111 9.81333 5.07111C8.92889 5.07111 7.44444 4.96 7.44444 4.96C6.96 4.93333 6.90222 5.67556 7.38667 5.70222C7.38667 5.70222 7.84444 5.76 8.32889 5.78667L9.72889 9.62667L7.76 15.5244L4.48444 5.78667C5.02667 5.76 5.51111 5.70222 5.51111 5.70222C5.99556 5.64444 5.93778 4.93333 5.45333 4.96C5.45333 4.96 3.99556 5.07111 3.05778 5.07111C2.88889 5.07111 2.68889 5.06667 2.47556 5.05778C4.08444 2.61778 6.84444 1.00444 9.98667 1.00444C12.3244 1.00444 14.4578 1.89778 16.0578 3.36444C16.0178 3.36 15.9822 3.35556 15.9422 3.35556C15.0578 3.35556 14.4356 4.12444 14.4356 4.95111C14.4356 5.69333 14.8622 6.32 15.32 7.05778C15.6622 7.65333 16.0622 8.42667 16.0622 9.53778C16.0622 10.3067 15.7689 11.2 15.3778 12.4444L14.4844 15.44L11.24 5.78667ZM14.52 17.7689L17.2667 9.83111C17.7778 8.54667 17.9511 7.52444 17.9511 6.60889C17.9511 6.28 17.9289 5.97333 17.8889 5.68444C18.5911 6.96889 18.9911 8.43556 18.9911 10C18.9911 13.32 17.1956 16.2133 14.52 17.7689Z",fill:"currentColor"}))};var rU=function(e){var t=e.selectedDraftId,n=e.draftDetails,o=e.setSurferDraft;return(0,r.jsx)(ts,{type:"radio",checked:n.draftId===t,onChange:function(){o(n)},inputRight:!0,children:(0,r.jsxs)($t,{direction:"row",gap:"base",alignItems:"center",style:{maxWidth:"calc(100% - 36px)"},children:[(0,r.jsx)(Rn,{style:{maxWidth:"40px"},children:(0,r.jsx)(F_,{score:{value:n.contentScore},mode:"compact",children:(0,r.jsx)(B_,{})})}),(0,r.jsxs)($t,{direction:"column",children:[(0,r.jsx)(Vn,{size:"sm",color:"gray-100",weight:"semibold",children:n.folderName&&n.folderName}),(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"semibold",children:n.keyword&&n.keyword}),(0,r.jsx)(Vn,{size:"base",color:"gray-140",weight:"regular",children:n.keywords&&n.keywords.length>1?"+".concat(n.keywords.length-1," more"):""}),n.is_ai_generated&&(0,r.jsx)(Wn,{Component:eU,size:"small"}),n.is_wp_connected&&(0,r.jsx)(Wn,{Component:nU,size:"small"})]}),(0,r.jsx)(Vn,{size:"md",color:"gray-100",weight:"regular",children:n.title?n.title:" "})]})]})},"create_new")};function oU(e){return oU="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},oU(e)}function iU(){iU=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==oU(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(oU(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function aU(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function sU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cU(e,t)}(e,t)||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 cU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lU=function(){var e=_T(),t=e.setCurrentStep,n=e.surferTempDraft,o=e.setSurferTempDraft,i=sU((0,s.useState)(""),2),a=i[0],c=i[1],l=sU((0,s.useState)(""),2),u=l[0],f=l[1],d=sU((0,s.useState)([]),2),p=d[0],h=d[1],m=sU((0,s.useState)(!1),2),v=m[0],g=m[1],y=(0,s.useRef)(null),b=nT(function(){var e,t=(e=iU().mark((function e(t){var n,r,o,i;return iU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y.current&&y.current.abort(),n=new AbortController,y.current=n,r=t||"",g(!0),e.next=7,fetch(wpsurfer.ajaxurl+"?action=surfer_get_user_drafts",{method:"POST",headers:{"Content-Type":"application/json","api-key":wpsurfer.api_key},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,query:r}),signal:n.signal});case 7:return o=e.sent,e.next=10,o.json();case 10:i=e.sent,g(!1),h(i.drafts);case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){aU(i,r,o,a,s,"next",e)}function s(e){aU(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),400);return(0,s.useEffect)((function(){b()}),[]),(0,s.useEffect)((function(){var e=a.trim().length>=1?a:void 0;u!==e&&b(e),f(e)}),[a]),(0,r.jsxs)(db,{size:"base",fullWidth:!0,scrollBody:!0,zIndex:1e3,children:[(0,r.jsx)(hb,{children:(0,r.jsx)(mb,{children:(0,r.jsx)(Vn,{color:"gray-160",size:"lg",weight:"medium",children:Mk("Optimize with Surfer","surferseo")})})}),(0,r.jsxs)(vb,{direction:"column",children:[(0,r.jsx)(gL,{}),(0,r.jsx)(Rn,{margin:["md","vertical"],children:(0,r.jsx)(ey,{id:"surfer-search-by-keyword",icon:fL,placeholder:Mk("Search by keyword","surferseo"),value:a,size:"base",onValueChange:function(e){c(e)}})}),v?(0,r.jsx)($t,{justifyContent:"center",alignItems:"center",fullWidth:!0,style:{height:"200px"},children:(0,r.jsx)(or,{size:"large"})}):(0,r.jsx)($t,{gap:"md",direction:"column",className:"surfer-picker",style:{minHeight:"200px"},children:p&&p.length>0?p.map((function(e){return(0,r.jsx)(rU,{selectedDraftId:n.draftId,draftDetails:e,setSurferDraft:o},e.draftId)})):(0,r.jsx)($t,{justifyContent:"center",alignItems:"center",fullWidth:!0,style:{minHeight:"200px"},children:Mk("No drafts found","surferseo")})})]}),(0,r.jsxs)(gb,{justifyContent:"space-between",children:[(0,r.jsx)(yb,{children:(0,r.jsx)(hr,{variant:"text",onClick:function(){t("start")},icon:tA,children:Mk("Back","surferseo")})}),(0,r.jsxs)(bb,{hideClose:!0,children:[(0,r.jsx)(hr,{variant:"primary",icon:UW,rightIcon:!0,onClick:function(){t("update_confirm")},disabled:0===n.draftId,children:Mk("Next","surferseo")}),(0,r.jsx)(wb,{variant:"secondary",children:Mk("Close","surferseo")})]})]})]})},uU=function(e){var t=e.mode,n=e.BeforeButtonText,o=e.buttonSize,i=e.SyncWithLabel||Mk("Optimize with Surfer","surferseo"),a=e.EditInSurferLabel||Mk("Edit in Surfer","surferseo"),s=_T(),c=s.currentStep,l=s.setCurrentStep,u=s.surferDraft,f=s.handleDisconnect,d=s.disconectionLoading,p=s.scrapeIsReady;return u.draftId>0&&-1==p?(0,r.jsx)(cw,{color:"warning",title:Mk("Content Editor Failed","surferseo"),description:Mk("There was some error during Content Editor processing.","surferseo"),children:(0,r.jsx)(sw,{children:(0,r.jsx)(hr,{onClick:f,fullWidth:!0,loading:d,disabled:d,size:"full"==t?"small":"xsmall",children:Mk("Disconnect","surferseo")})})}):u.draftId>0&&(!u.permalinkHash||""===u.permalinkHash)?(0,r.jsx)(cw,{color:"warning",title:Mk("Your post needs attention","surferseo"),description:Mk("This post was connected to our previous plugin version. Please disconnect and reconnect it to make sure it continues to work properly.","surferseo"),children:(0,r.jsx)(sw,{children:(0,r.jsx)(hr,{onClick:f,fullWidth:!0,loading:d,disabled:d,size:"full"==t?"small":"xsmall",children:Mk("Disconnect","surferseo")})})}):u.draftId>0&&p&&"done"!==c?"button"===t?(0,r.jsxs)(Ao,{variant:"primary",target:"_blank",size:null!=o?o:"base",href:"".concat(wpsurfer.surferurl,"/drafts/").concat(u.draftId),fullWidth:!0,style:{maxWidth:"100%",boxSizing:"border-box"},onClick:function(e){return Wk("drop_monitor","edit_in_surfer: DRAFT ID: "+u.draftId)},children:[a,(0,r.jsx)(Wn,{Component:CT})]}):"full"===t?(0,r.jsx)(VL,{}):(0,r.jsx)(cw,{color:"danger",title:Mk("Something went wrong...","surferseo"),description:Mk("Scrape process is still in progress...","surferseo")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(qR,{}),(0,r.jsxs)(fb,{onOpenChange:function(e){e||l("start")},children:[!(u.draftId>0)&&n&&(0,r.jsx)(Vn,{color:"gray-140",size:"base",weight:"regular",padding:["md","bottom"],children:n}),!(u.draftId>0)&&(0,r.jsx)(pb,{children:(0,r.jsx)(hr,{variant:"primary",fullWidth:!0,size:null!=o?o:"base",children:i})}),"start"===c&&(0,r.jsx)(GW,{}),"create_new"===c&&(0,r.jsx)(MW,{}),"update_existing"===c&&(0,r.jsx)(lU,{}),"update_confirm"===c&&(0,r.jsx)(JW,{}),"done"===c&&(0,r.jsx)(NW,{})]}),u.draftId>0&&!p&&(0,r.jsx)($t,{direction:"column",gap:"sm",children:"full"==t?(0,r.jsx)(cw,{title:Mk("Just a few seconds","surferseo"),description:Mk("We analyze search results to give you the best recommendations.","surferseo")}):(0,r.jsx)(hr,{variant:"primary",loading:!0,disabled:!0,fullWidth:!0,size:null!=o?o:"base",children:i})})]})},fU=n(8287).hp;const dU="function"==typeof fU,pU="function"==typeof TextDecoder?new TextDecoder:void 0,hU=("function"==typeof TextEncoder&&new TextEncoder,Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")),mU=(e=>{let t={};return e.forEach(((e,n)=>t[e]=n)),t})(hU),vU=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,gU=String.fromCharCode.bind(String),yU="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),bU=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),wU=e=>{let t,n,r,o,i="";const a=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=hU[t>>18&63]+hU[t>>12&63]+hU[t>>6&63]+hU[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},xU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jU=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return gU(55296+(t>>>10))+gU(56320+(1023&t));case 3:return gU((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return gU((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},OU=e=>e.replace(xU,jU),SU=e=>{if(e=e.replace(/\s+/g,""),!vU.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,o="";for(let i=0;i<e.length;)t=mU[e.charAt(i++)]<<18|mU[e.charAt(i++)]<<12|(n=mU[e.charAt(i++)])<<6|(r=mU[e.charAt(i++)]),o+=64===n?gU(t>>16&255):64===r?gU(t>>16&255,t>>8&255):gU(t>>16&255,t>>8&255,255&t);return o},_U="function"==typeof atob?e=>atob(bU(e)):dU?e=>fU.from(e,"base64").toString("binary"):SU,kU=dU?e=>yU(fU.from(e,"base64")):e=>yU(_U(e).split("").map((e=>e.charCodeAt(0)))),EU=dU?e=>fU.from(e,"base64").toString("utf8"):pU?e=>pU.decode(kU(e)):e=>OU(_U(e)),CU=e=>bU(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),AU=e=>EU(CU(e)),PU=AU;function IU(){return IU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IU.apply(this,arguments)}const RU=function(e){return s.createElement("svg",IU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"currentColor",d:"M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875zM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 0 1-1.875-1.875zM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 0 1 3 19.875z"}))};function TU(){return TU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TU.apply(this,arguments)}const LU=function(e){return s.createElement("svg",TU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.042 21.672L13.684 16.6m0 0l-2.51 2.225l.569-9.47l5.227 7.917zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59"}))};function zU(){return zU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zU.apply(this,arguments)}const MU=function(e){return s.createElement("svg",zU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("path",{d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178"}),s.createElement("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"})))};function NU(){return NU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NU.apply(this,arguments)}const DU=function(e){return s.createElement("svg",NU({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875zm6.75-4.5c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125zm6.75-4.5c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125z"}))};var $U=function(e){var t=e.postId,n=e.draftId,o=e.scrapeStatus,i=e.content,a=e.stats,s=e.currentPeriod,c=e.previousPeriod,l=e.permalinkHash,u=JSON.parse(a);return(0,r.jsxs)($t,{direction:"column",gap:"md",children:[(0,r.jsx)(cu,{content:(0,r.jsx)(FU,{previousClicks:u.clicksPrev,previousImpressions:u.impressionsPrev,previousPosition:u.positionPrev,currentPeriod:s,previousPeriod:c}),children:(0,r.jsxs)(Rn,{children:[(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:RU,size:"small",color:u.position<u.positionPrev?"green-base":"red-base"}),(0,r.jsx)(Vn,{color:u.position<u.positionPrev?"green-base":"red-base",children:"".concat(u.positionWithSufix," ").concat(Mk(" position","surferseo"))})]}),(0,r.jsx)(Wn,{Component:u.position<u.positionPrev?QT:rL,size:"small",color:u.position<u.positionPrev?"green-base":"red-base"})]}),(0,r.jsxs)($t,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:LU,size:"small"}),u.clicks]}),(0,r.jsxs)($t,{direction:"row",gap:"2xs",alignItems:"center",children:[(0,r.jsx)(Wn,{Component:MU,size:"small"}),u.impressions]})]})]})}),(0,r.jsx)(kT,{wpPostId:t,content:PU(i),draftId:n,scrapeStatus:o,permalinkHash:l,children:(0,r.jsx)(uU,{mode:"button",buttonSize:"xsmall"})})]})},FU=function(e){var t=e.currentPeriod,n=e.previousPeriod,o=e.previousPosition,i=e.previousClicks,a=e.previousImpressions;return(0,r.jsxs)($t,{direction:"column",gap:"base",padding:["sm","all"],children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",color:"white-base",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("7 days ago:","surferseo")}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:DU,size:"small",style:{marginRight:"4px"}}),"".concat(o," ").concat(Mk("position","surferseo"))]}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:MU,size:"small",style:{marginRight:"4px"}}),"".concat(a," ").concat(Mk("impressions","surferseo"))]}),(0,r.jsxs)(Vn,{color:"white-base",children:[(0,r.jsx)(Wn,{Component:LU,size:"small",style:{marginRight:"4px"}}),"".concat(i," ").concat(Mk("clicks","surferseo"))]})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("Current Period:","surferseo")}),(0,r.jsx)(Vn,{color:"white-base",children:t})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{color:"white-base",children:Mk("Previous Period:","surferseo")}),(0,r.jsx)(Vn,{color:"white-base",children:n})]})]})};function BU(e){return BU="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},BU(e)}function WU(){WU=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==BU(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(BU(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function UU(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function HU(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){UU(i,r,o,a,s,"next",e)}function s(e){UU(i,r,o,a,s,"throw",e)}a(void 0)}))}}function VU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return GU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GU(e,t)}(e,t)||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 GU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ZU=function(){var e=VU((0,s.useState)(!1),2),t=e[0],n=e[1],o=VU((0,s.useState)(!1),2),i=o[0],a=o[1],c=VU((0,s.useState)(""),2),l=c[0],u=c[1],f=_T().wpPostId,d=function(){var e=HU(WU().mark((function e(){var t,n;return WU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a(!0),!f){e.next=9;break}return e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_get_post_json_schema",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,post_id:f})});case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,u(n.data.schema);case 9:a(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=HU(WU().mark((function e(){return WU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n(!0),!f){e.next=4;break}return e.next=4,fetch(wpsurfer.ajaxurl+"?action=surfer_save_post_json_schema",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,post_id:f,json_schema:l})});case 4:n(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){d()}),[]),i?(0,r.jsx)($t,{fullWidth:!0,justifyContent:"center",children:(0,r.jsx)(or,{})}):(0,r.jsx)("section",{className:"surfer-json-schema",children:(0,r.jsxs)($t,{direction:"column",gap:"sm",children:[(0,r.jsxs)(Vn,{children:["JSON Schema is a vocabulary that allows you to annotate and validate JSON. Read more ",(0,r.jsx)("a",{href:"https://json-schema.org/",children:"here"}),"."]}),(0,r.jsx)(wx,{value:l,onValueChange:function(e){return u(e)}}),(0,r.jsx)(hr,{variant:"primary",fullWidth:!0,onClick:function(){return p()},loading:t,disabled:t,children:Mk("Save schema","surferseo")})]})})},KU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M11.5 5H2.5C2.22386 5 2 5.22386 2 5.5V12.5C2 12.7761 2.22386 13 2.5 13H11.5C11.7761 13 12 12.7761 12 12.5V5.5C12 5.22386 11.7761 5 11.5 5Z",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M4 5V3.5C4 3.36739 4.05268 3.24021 4.14645 3.14645C4.24021 3.05268 4.36739 3 4.5 3H13.5C13.6326 3 13.7598 3.05268 13.8536 3.14645C13.9473 3.24021 14 3.36739 14 3.5V10.5C14 10.6326 13.9473 10.7598 13.8536 10.8536C13.7598 10.9473 13.6326 11 13.5 11H12",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M2 7H12",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},qU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M8 1.5V14.5",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M11.5 5.5C11.5 5.1717 11.4353 4.84661 11.3097 4.54329C11.1841 4.23998 10.9999 3.96438 10.7678 3.73223C10.5356 3.50009 10.26 3.31594 9.95671 3.1903C9.65339 3.06466 9.3283 3 9 3H6.75C6.08696 3 5.45107 3.26339 4.98223 3.73223C4.51339 4.20107 4.25 4.83696 4.25 5.5C4.25 6.16304 4.51339 6.79893 4.98223 7.26777C5.45107 7.73661 6.08696 8 6.75 8H9.5C10.163 8 10.7989 8.26339 11.2678 8.73223C11.7366 9.20107 12 9.83696 12 10.5C12 11.163 11.7366 11.7989 11.2678 12.2678C10.7989 12.7366 10.163 13 9.5 13H6.5C5.83696 13 5.20107 12.7366 4.73223 12.2678C4.26339 11.7989 4 11.163 4 10.5",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},YU=function(e){var t=e.size,n=void 0===t?"16":t,r=e.fill,o=void 0===r?"none":r,i=e.stroke,a=void 0===i?"#222A3A":i,s=e.className,c=void 0===s?"":s,l=e.tip,u=void 0===l?"":l;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:o,xmlns:"http://www.w3.org/2000/svg",className:c,"data-tip":u,style:{outline:"none"}},React.createElement("path",{d:"M7.9998 8H13.4998C13.5011 9.27417 13.0605 10.5094 12.2531 11.495C11.4457 12.4807 10.3214 13.1559 9.07193 13.4054C7.82244 13.6549 6.52508 13.4634 5.40099 12.8635C4.2769 12.2636 3.39566 11.2924 2.90748 10.1154C2.4193 8.9385 2.3544 7.62868 2.72384 6.40926C3.09328 5.18983 3.87419 4.13627 4.93346 3.42815C5.99274 2.72004 7.2648 2.4012 8.53284 2.52599C9.80088 2.65079 10.9864 3.21148 11.8873 4.1125",stroke:a,strokeLinecap:"round",strokeLinejoin:"round"}))},XU=function(e){var t=e.size,n=void 0===t?"36":t;return React.createElement("svg",{width:n,height:n,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4702 4.44598C6.58699 4.44598 3.439 7.59398 3.439 11.4772V20.0048H1.95282L4.83744 24.1875L7.72205 20.0048H6.2515V11.4772C6.2515 9.14728 8.14029 7.25848 10.4702 7.25848H25.0434C27.1488 7.25848 28.8555 8.96521 28.8555 11.0706H31.668C31.668 7.41191 28.7021 4.44598 25.0434 4.44598H10.4702ZM19.9817 25.0529H22.5057C22.8663 25.0529 23.0826 24.7644 23.0826 24.4759V12.7211C23.0826 12.3606 22.7942 12.1442 22.5057 12.1442H19.9817C19.6211 12.1442 19.4047 12.4327 19.4047 12.7211V24.4759C19.4047 24.7644 19.6932 25.0529 19.9817 25.0529ZM12.4817 25.0529H15.0057C15.3663 25.0529 15.5827 24.7644 15.5827 24.4759V16.9759C15.5827 16.6154 15.2942 16.399 15.0057 16.399H12.4817C12.1211 16.399 11.9048 16.6875 11.9048 16.9759V24.4038C11.9048 24.7644 12.1932 25.0529 12.4817 25.0529ZM27.3849 17.1112H28.8555V25.6388C28.8555 27.9687 26.9667 29.8575 24.6367 29.8575H10.0636C7.95822 29.8575 6.2515 28.1508 6.2515 26.0454H3.439C3.439 29.7041 6.40492 32.67 10.0636 32.67H24.6367C28.52 32.67 31.668 29.522 31.668 25.6388V17.1112H33.1542L30.2696 12.9285L27.3849 17.1112Z"}))},JU=function(e){var t=e.overlapping_pages,n=e.search_volume,o=e.cpc,i=e.className;return(0,r.jsxs)("div",{className:i,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(KU,{tip:Mk("Overlapping Pages","surferseo")}),(0,r.jsxs)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Overlapping Pages","surferseo"),children:[5*t,"%"]})]}),(0,r.jsxs)("div",{className:"align-baseline",children:[(0,r.jsx)(YU,{tip:Mk("Search Volume","surferseo")}),(0,r.jsx)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Search Volume","surferseo"),children:n})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(qU,{tip:Mk("Cost per Click","surferseo")}),(0,r.jsx)("span",{className:"keyword-surfer__single-detail","data-tip":Mk("Cost per Click","surferseo"),children:Math.round(100*o)/100})]})]})},QU=n(3790),eH=n.n(QU),tH=n(4987),nH=n.n(tH);function rH(e){return rH="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},rH(e)}function oH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oH(Object(n),!0).forEach((function(t){aH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=rH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rH(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sH(e){return function(e){if(Array.isArray(e))return pH(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dH(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 cH(){cH=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==rH(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(rH(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function lH(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function uH(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){lH(i,r,o,a,s,"next",e)}function s(e){lH(i,r,o,a,s,"throw",e)}a(void 0)}))}}function fH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||dH(e,t)||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 dH(e,t){if(e){if("string"==typeof e)return pH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pH(e,t):void 0}}function pH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hH=function(e){return{keywords:function(e,t,n){var r=new URL("https://db3.keywordsur.fr/api/ks/keywords");return r.searchParams.set("country",e.country.toUpperCase()),r.searchParams.set("keywords",JSON.stringify(t)),[r.toString(),{method:"GET"}]},domainsOffPage:function(e,t,n){var r=new URL("https://db3.keywordsur.fr/api/ks/domains");return r.searchParams.set("country",e.country.toUpperCase()),r.searchParams.set("domains",JSON.stringify(t)),[r.toString(),{method:"GET"}]},urlsOnPage:function(e,t,n){var r=new URL("https://db.keywordsur.fr/urlsOnPage");return Object.entries(e).forEach((function(e){var t=fH(e,2),n=t[0],o=t[1];r.searchParams.set(n,o.toString())})),[r.toString(),{method:"POST",headers:{"x-recaptcha-token":n[0]},body:JSON.stringify(t)}]}}[e]},mH={keywords:5,domainsOffPage:5,urlsOnPage:1},vH=function(e,t){var n=window.performance.now();return fetch(e,t).then((function(t){var r=window.performance.now()-n;return Math.random()<.05&&fetch("https://db2.keywordsur.fr/timing",{headers:{"x-timing-request-duration-ms":r.toString(),"x-timing-request-category":new URL(e).pathname,"x-timing-client-version":"1.0.0"}}),t}))},gH=function(){var e=uH(cH().mark((function e(t,n,r,o){var i,a,s,c,l,u,f,d=arguments;return cH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>4&&void 0!==d[4]?d[4]:null,a={},s=[],c=function(e){return"surfer-db-cache-".concat(t,"-v11:").concat(e,"-").concat(JSON.stringify(r))},e.next=6,Promise.all(n.map(function(){var e=uH(cH().mark((function e(t){var n;return cH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eH().getItem(c(t));case 2:(n=e.sent)?a[t]=n:s.push(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(!(s.length>0)){e.next=12;break}return e.next=9,Promise.all((0,gt.chunk)(s,mH[t]).map((function(e){var n=fH(hH(t)(r,e,o),2),a=n[0],s=n[1],c=vH(a,s).then((function(e){return e.json()})).catch((function(){return Object.fromEntries(e.map((function(e){return[e,"failed"]})))})),l=new Promise(null==i?function(){return null}:function(t){return setTimeout((function(){return t(Object.fromEntries(e.map((function(e){return[e,"failed"]}))))}),i)});return Promise.race([c,l])})));case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=[{}];case 13:return l=e.t0,u=Object.assign.apply(Object,[{}].concat(sH(l))),Object.entries(u).forEach((function(e){var t=fH(e,2),n=t[0],r=t[1];"failed"!==r&&eH().setItem(c(n),r)})),f=Object.fromEntries(Object.entries(u).map((function(e){var t=fH(e,2),n=t[0],r=t[1];return[n,"failed"===r?{}:r]}))),e.abrupt("return",iH(iH({},a),f));case 18:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),yH=nH()(gH);function bH(e){return bH="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},bH(e)}function wH(){wH=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==bH(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bH(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xH(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function jH(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xH(i,r,o,a,s,"next",e)}function s(e){xH(i,r,o,a,s,"throw",e)}a(void 0)}))}}var OH=function(){var e=jH(wH().mark((function e(t){var n,r,o,i,a,s,c;return wH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.mainKeyword,r=t.location,o=t.setIsLoading,i=t.setIsError,a=t.setResearchDetails,s=t.setHasResults,o(!0),s(!1),e.next=5,SH(2e3);case 5:return e.next=7,fetch(wpsurfer.ajaxurl+"?action=surfer_track_keyword_research_usage",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:n,location:r,_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 7:return e.sent,e.prev=8,e.next=11,_H(n.trim().toLocaleLowerCase(),r);case 11:c=e.sent,a(c[0]),o(!1),s(!0),e.next=22;break;case 17:e.prev=17,e.t0=e.catch(8),o(!1),i(!0),console.error(e.t0);case 22:case"end":return e.stop()}}),e,null,[[8,17]])})));return function(t){return e.apply(this,arguments)}}(),SH=function(e){return new Promise((function(t){return setTimeout(t,e)}))},_H=function(){var e=jH(wH().mark((function e(t,n){var r,o;return wH().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=["",""],e.next=3,yH("keywords",[t.trim().toLocaleLowerCase()],{country:n},r);case 3:return o=e.sent,e.abrupt("return",[{el:null,keyword:t}].map((function(e){return{keyword:e.keyword,el:e.el,data:o[e.keyword]}})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),kH=function(e){var t=e.keyword,n=e.newResearchParams,o=e.setKeywordInputValue,i=Mk("Copy to clipboard","surferseo"),a=q_(Mk("Generate Keyword Ideas for: %s","surferseo"),t);return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[(0,r.jsx)(cu,{content:a,children:(0,r.jsx)(hr,{onClick:function(e){e.preventDefault,OH(n),o(t)},type:"button",variant:"secondary",size:"xsmall",icon:fL,"aria-label":a})}),(0,r.jsx)(cu,{content:i,children:(0,r.jsx)(hr,{onClick:function(e){e.preventDefault(),navigator.clipboard.writeText(t)},type:"button",variant:"secondary",size:"xsmall","aria-label":i,children:Mk("Copy","surferseo")})})]})};function EH(e){return EH="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},EH(e)}function CH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CH(Object(n),!0).forEach((function(t){PH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=EH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=EH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==EH(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var IH=function(e){var t=e.keyword,n=e.overlapping_pages,o=e.search_volume,i=e.cpc,a=e.newResearchParams,s=e.setKeywordInputValue;return(0,r.jsxs)("div",{className:"keyword-surfer-grid__row",children:[(0,r.jsxs)("div",{className:"keyword-surfer-grid__row-major",children:[(0,r.jsx)("div",{children:t}),(0,r.jsxs)("div",{className:"keyword-surfer-grid__row-actions",children:[(0,r.jsx)(JU,{overlapping_pages:n,search_volume:o,cpc:i,className:"keyword-surfer-small surfer-hide-in-sidebar"}),(0,r.jsx)("div",{className:"surfer-hide-in-sidebar",children:"·"}),(0,r.jsx)(kH,{keyword:t,setKeywordInputValue:s,newResearchParams:AH(AH({},a),{},{mainKeyword:t})})]})]}),(0,r.jsx)(JU,{overlapping_pages:n,search_volume:o,cpc:i,className:"keyword-surfer-fullw surfer-hide-in-postbox"})]})},RH=function(e){var t,n,o=e.data,i=e.keyword,a=e.newResearchParams,s=e.setKeywordInputValue,c=0|(null==o||null===(t=o.similar_keywords)||void 0===t?void 0:t.length);return 0===i.length?null:(0,r.jsxs)("div",{className:"keyword-surfer-grid",children:[c>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:Mk("Keyword Ideas","surferseo")}),(0,r.jsx)("div",{children:null==o||null===(n=o.similar_keywords)||void 0===n?void 0:n.map((function(e,t){return(0,r.jsx)(IH,{keyword:e.keyword,cpc:e.cpc,overlapping_pages:e.overlapping_pages,search_volume:e.search_volume,newResearchParams:a,setKeywordInputValue:s},t)}))})]}),c<1&&(0,r.jsxs)("div",{className:"keyword-surfer-grid__no-results",children:[(0,r.jsx)("img",{src:wpsurfer.baseurl+"assets/images/sad_surfy.svg",alt:"Sad Surfy",style:{marginBottom:"2rem"}}),(0,r.jsx)("p",{children:Mk("Sorry, we do not have results for this keyword. Please try different one","surferseo")})]})]})};function TH(){return TH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TH.apply(this,arguments)}const LH=function(e){return s.createElement("svg",TH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25"}))};function zH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return MH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MH(e,t)}(e,t)||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 MH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NH=function(){var e,t=(e=wpsurfer.wp_language,rT.includes(e)?e:"us"),n=zH((0,s.useState)(""),2),o=n[0],i=n[1],a=zH((0,s.useState)(t),2),c=a[0],l=a[1],u=zH((0,s.useState)({el:null,data:null,keyword:""}),2),f=u[0],d=u[1],p=zH((0,s.useState)(!1),2),h=p[0],m=p[1],v=zH((0,s.useState)(!1),2),g=v[0],y=v[1],b=zH((0,s.useState)(!1),2),w=b[0],x=b[1],j=(0,s.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:"keyword-surfer",children:[(0,r.jsxs)("form",{id:"surfer-keyword-research-from",className:"keyword-surfer__form",style:{opacity:h?"0.64":"1.0"},onSubmit:function(e){e.preventDefault(),0!==o.length&&c?OH({mainKeyword:o,location:c,setIsLoading:m,setIsError:x,setResearchDetails:d,setHasResults:y}):y(!0)},children:[(0,r.jsxs)("p",{className:"keyword-surfer__tool-instruction",children:[Mk("Generate keyword ideas and get data on monthly traffic and cost per click. ","surferseo"),(0,r.jsx)("a",{href:wpsurfer.learnmore_url,className:"no-underline",target:"_blank",children:Mk("Learn more","surferseo")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Tg,{htmlFor:"keyword-surfer-keyword-input",children:Mk("Keyword(s)","surferseo")}),(0,r.jsx)(ey,{id:"keyword-surfer-keyword-input",ref:j,icon:LH,placeholder:Mk("e.g. best seo tool","surferseo"),size:"base",onValueChange:i,style:{width:"100%"},invalid:g&&0===o.length,errorMessage:Mk("Please provide keyword.","surferseo")})]}),(0,r.jsx)("div",{children:(0,r.jsxs)(Tg,{children:[Mk("Location / Languages","surferseo"),(0,r.jsx)(_W,{id:"ks-locations",onLocationChange:l,className:w&&(!c||c.length<1)?"surfer-sidebar-box--surfer-field-error":""})]})}),(0,r.jsx)(hr,{variant:"primary",icon:h?void 0:fL,fullWidth:!0,type:"submit",loading:h,disabled:h,children:Mk("Generate Keywords","surferseo")})]}),w&&(0,r.jsx)("div",{className:"surfer-message surfer-message__error",children:Mk("There was an error during search... Please try again.","surferseo")})]}),g&&c?(0,r.jsx)(RH,{data:f.data,el:f.el,keyword:f.keyword,setKeywordInputValue:function(e){j&&j.current&&(j.current.value=e)},newResearchParams:{mainKeyword:o,location:c,setIsLoading:m,setIsError:x,setResearchDetails:d,setHasResults:y}}):""]})},DH=function(e){var t=e.header,n=e.sortingField,o=e.sortingDirection,i=void 0===o?"desc":o;return(0,r.jsxs)(r.Fragment,{children:[t.icon&&(0,r.jsx)(t.icon,{}),t.headerName,t.sortable&&n==t.sortingFieldName&&"asc"==i&&(0,r.jsx)(Wn,{Component:ga,size:"xsmall"}),t.sortable&&n==t.sortingFieldName&&"desc"==i&&(0,r.jsx)(Wn,{Component:UT,size:"xsmall"})]})},$H=function(e){var t=e.headers,n=e.sortingDirection,o=e.sortingField,i=e.setSortingField,a=e.setSortingDirection;return(0,r.jsx)(r.Fragment,{children:["thead","tfoot"].map((function(e){return(0,r.jsx)(e,{children:(0,r.jsx)("tr",{className:"surfer-posts-table__header",children:t.map((function(t){return(0,r.jsx)("th",{className:"surfer-posts-table__header-cell",children:t.sortable&&i&&a?(0,r.jsx)(hr,{size:"small",variant:"text",color:t.sortingFieldName==o?"primary":"secondary",onClick:function(){i(t.sortingFieldName),function(e,t,n,r){var o="asc";e===n&&"asc"==r&&(o="desc"),t(o)}(t.sortingFieldName,a,o,n)},children:(0,r.jsx)(DH,{header:t,sortingDirection:n,sortingField:o},e+"_"+t.field+"_cell")},e+"_"+t.field+"_button"):(0,r.jsx)(DH,{header:t},e+"_"+t.field+"_cell")},e+"_"+t.field)}))},"tr_"+e)},e)}))})},FH=function(e){var t=e.post,n=e.headers;return(0,r.jsx)("tr",{className:"surfer-posts-table__row",children:n.map((function(e){return(0,r.jsx)("td",{className:"surfer-posts-table__row-cell",children:e.valueGetter?e.valueGetter(t):(0,r.jsx)("span",{children:t[e.field]})},t.id+"_"+e.field)}))},t.id)};function BH(){return BH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BH.apply(this,arguments)}const WH=function(e){return s.createElement("svg",BH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m18.75 4.5l-7.5 7.5l7.5 7.5m-6-15L5.25 12l7.5 7.5"}))};function UH(){return UH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UH.apply(this,arguments)}const HH=function(e){return s.createElement("svg",UH({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m5.25 4.5l7.5 7.5l-7.5 7.5m6-15l7.5 7.5l-7.5 7.5"}))};var VH=function(e){var t=e.currentPage,n=void 0===t?1:t,o=e.perPage,i=void 0===o?20:o,a=e.setCurrentPage,s=e.itemsNumber;if(!s||s<i)return null;var c=Math.ceil(s/i);if(!a)return null;for(var l=[],u=function(e){l.push((0,r.jsx)(hr,{variant:"secondary",onClick:function(){return a(e)},children:e},"page_".concat(e)))},f=1;f<=c;f++)u(f);return(0,r.jsxs)($t,{direction:"row",justifyContent:"flex-end",margin:["base","vertical"],gap:"sm",fullWidth:!0,alignItems:"center",children:[(0,r.jsxs)("span",{children:[s," ",Mk("items","surferseo")]}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(1)},disabled:1==n,children:(0,r.jsx)(Wn,{Component:WH})}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(n-1)},disabled:1==n,children:(0,r.jsx)(Wn,{Component:$x})}),(0,r.jsx)("input",{id:"surfer-page-selector",type:"number",min:"1",max:c,value:n,onChange:function(e){return a(parseInt(e.target.value))}}),(0,r.jsxs)("span",{children:[Mk("from","surferseo")," ",c]}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(n+1)},disabled:n==c,children:(0,r.jsx)(Wn,{Component:pp})}),(0,r.jsx)(hr,{size:"small",variant:"secondary",onClick:function(){return a(c)},disabled:n==c,children:(0,r.jsx)(Wn,{Component:HH})})]})},GH=function(e){var t=e.filters,n=e.setFilter,o=e.currentFilter;return t&&n?(0,r.jsx)($t,{direction:"row",gap:"base",margin:["base","vertical"],children:t.map((function(e){return(0,r.jsxs)(hr,{variant:"text",color:e.value==o?"primary":"secondary",size:"small",onClick:function(){return n(e.value)},children:[e.label," ",!1!==e.count&&(0,r.jsx)("span",{className:"surfer-table-filter__button-count",children:"("+e.count+")"})]},e.value)}))}):null},ZH=n(7420),KH=n.n(ZH),qH=function(e){var t=e.posts,n=e.headers,o=e.currentFilter,i=e.filters,a=e.currentPage,s=void 0===a?1:a,c=e.itemsNumber,l=void 0===c?0:c,u=e.itemsPerPage,f=void 0===u?20:u,d=e.setFilter,p=e.setCurrentPage,h=e.sortingField,m=e.setSortingField,v=e.sortingDirection,g=e.setSortingDirection,y=e.isLoading,b=void 0!==y&&y;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(GH,{filters:i,setFilter:d,currentFilter:o}),(0,r.jsx)(VH,{setCurrentPage:p,currentPage:s,itemsNumber:l,perPage:f}),(0,r.jsxs)("table",{className:"surfer-posts-table",cellPadding:0,cellSpacing:0,children:[(0,r.jsx)($H,{headers:n,sortingDirection:v,sortingField:h,setSortingField:m,setSortingDirection:g}),(0,r.jsx)("tbody",{children:b?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:n.length,style:{textAlign:"center",padding:"8px"},children:(0,r.jsx)(KH(),{})})}):l>0?(0,r.jsx)(r.Fragment,{children:t.map((function(e){return(0,r.jsx)(FH,{post:e,headers:n},"post_"+e.id)}))}):(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:n.length,style:{textAlign:"center",padding:"8px"},children:Mk("No posts found for this criteria...","surferseo")})})})]}),(0,r.jsx)(VH,{setCurrentPage:p,currentPage:s,itemsNumber:l,perPage:f})]})};const YH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875h-.75ZM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 0 1-1.875-1.875V8.625ZM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 0 1 3 19.875v-6.75Z"}))}));const XH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 1.5a.75.75 0 0 1 .75.75V4.5a.75.75 0 0 1-1.5 0V2.25A.75.75 0 0 1 12 1.5ZM5.636 4.136a.75.75 0 0 1 1.06 0l1.592 1.591a.75.75 0 0 1-1.061 1.06l-1.591-1.59a.75.75 0 0 1 0-1.061Zm12.728 0a.75.75 0 0 1 0 1.06l-1.591 1.592a.75.75 0 0 1-1.06-1.061l1.59-1.591a.75.75 0 0 1 1.061 0Zm-6.816 4.496a.75.75 0 0 1 .82.311l5.228 7.917a.75.75 0 0 1-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 0 1-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 0 1-1.247-.606l.569-9.47a.75.75 0 0 1 .554-.68ZM3 10.5a.75.75 0 0 1 .75-.75H6a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 10.5Zm14.25 0a.75.75 0 0 1 .75-.75h2.25a.75.75 0 0 1 0 1.5H18a.75.75 0 0 1-.75-.75Zm-8.962 3.712a.75.75 0 0 1 0 1.061l-1.591 1.591a.75.75 0 1 1-1.061-1.06l1.591-1.592a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}));const JH=s.forwardRef((function({title:e,titleId:t,...n},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}));function QH(e){return QH="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},QH(e)}function eV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tV(r.key),r)}}function tV(e){var t=function(e,t){if("object"!=QH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=QH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==QH(t)?t:t+""}function nV(e,t,n){return t=oV(t),function(e,t){if(t&&("object"===QH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rV()?Reflect.construct(t,n||[],oV(e).constructor):t.apply(e,n))}function rV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rV=function(){return!!e})()}function oV(e){return oV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oV(e)}function iV(e,t){return iV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iV(e,t)}var aV=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=nV(this,t,[e])).state={hasError:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iV(e,t)}(t,e),n=t,i=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}],(o=[{key:"componentDidCatch",value:function(e,t){console.log(e,t)}},{key:"render",value:function(){return this.state.hasError?(0,r.jsx)(cw,{color:"danger",title:Mk("Something went wrong...","surferseo"),description:Mk("There was an unknown error. Please reach our Support Team for help.","surferseo")}):this.props.children}}])&&eV(n.prototype,o),i&&eV(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,i}(l().Component);function sV(e){return sV="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},sV(e)}function cV(){cV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==sV(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(sV(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function lV(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function uV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fV(e,t)}(e,t)||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 fV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dV=function(e){var t=e.value,n=e.prevValue;return(0,r.jsxs)("div",{className:" ".concat(t>n?"surfer-domain-report__single-data--up":"surfer-domain-report__single-data--down"),children:[t,function(e,t){return e>t?(0,r.jsxs)("span",{children:["+",e-t]}):e<t?(0,r.jsx)("span",{children:e-t}):(0,r.jsx)(r.Fragment,{})}(t,n)]})},pV=function(e){var t=e.value,n=e.prevValue;return(0,r.jsxs)("div",{className:" ".concat(t<n?"surfer-domain-report__single-data--up":"surfer-domain-report__single-data--down"),children:[t,function(e,t){return e>t?(0,r.jsxs)("span",{children:["+",e-t]}):e<t?(0,r.jsx)("span",{children:e-t}):(0,r.jsx)(r.Fragment,{})}(t,n)]})},hV=function(){var e=uV((0,s.useState)(!1),2),t=e[0],n=e[1],o=uV((0,s.useState)({totalImporessions:0,prevTotalImporessions:0,totalClicks:0,prevTotalClicks:0,fallInPosition:0,prevFallInPosition:0,growthInPosition:0,prevGrowthInPosition:0}),2),i=o[0],a=o[1],c=function(){var e,t=(e=cV().mark((function e(){var t,r;return cV().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,fetch(wpsurfer.ajaxurl+"?action=surfer_get_domain_performance_report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce})});case 3:return t=e.sent,e.next=6,t.json();case 6:r=e.sent,a(r),n(!1);case 9:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){lV(i,r,o,a,s,"next",e)}function s(e){lV(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,s.useEffect)((function(){c()}),[]),(0,r.jsx)("div",{className:"surfer-domain-report",children:t?(0,r.jsx)("div",{className:"surfer-domain-report__loader",children:(0,r.jsx)(KH(),{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsxs)("h3",{children:[(0,r.jsx)(Wn,{Component:MU}),Mk("Total Impressions","surferseo")]}),(0,r.jsx)(dV,{value:0|i.totalImporessions,prevValue:i.prevTotalImporessions})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsxs)("h3",{children:[(0,r.jsx)(Wn,{Component:LU}),Mk("Total Clicks","surferseo")]}),(0,r.jsx)(dV,{value:0|i.totalClicks,prevValue:i.prevTotalClicks})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsx)("h3",{children:Mk("Drop in Position","surferseo")}),(0,r.jsx)(pV,{value:i.fallInPosition,prevValue:i.prevFallInPosition})]}),(0,r.jsxs)("div",{className:"surfer-domain-report__single-data",children:[(0,r.jsx)("h3",{children:Mk("Increased in Position","surferseo")}),(0,r.jsx)(dV,{value:i.growthInPosition,prevValue:i.prevGrowthInPosition})]})]})})};function mV(){return mV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mV.apply(this,arguments)}const vV=function(e){return s.createElement("svg",mV({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 19.5v-15m0 0l-6.75 6.75M12 4.5l6.75 6.75"}))};function gV(){return gV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gV.apply(this,arguments)}const yV=function(e){return s.createElement("svg",gV({viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},e),s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"}))};function bV(e){return bV="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},bV(e)}function wV(){wV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",m="completed",v={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==n&&r.call(j,a)&&(w=j);var O=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==bV(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=d;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:p,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bV(t)+" is not iterable")}return y.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(O),l(O,c,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xV(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function jV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return OV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OV(e,t)}(e,t)||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 OV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SV=function(e,t,n,o){return!1===t?(0,r.jsxs)(r.Fragment,{children:[Mk("For this post we have data from one period.","surferseo"),(0,r.jsxs)("p",{style:{marginBottom:"0px"},children:[Mk("Current Period:","surferseo"),(0,r.jsx)("br",{}),n]})]}):(0,r.jsxs)($t,{direction:"column",gap:"base",children:[(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[Mk("7 days ago:","surferseo"),(0,r.jsxs)($t,{direction:"row",gap:"2xs",style:{marginTop:"0px"},children:["position"==e&&(0,r.jsx)(Wn,{Component:DU,size:"small"}),"impressions"==e&&(0,r.jsx)(Wn,{Component:MU,size:"small"}),"clicks"==e&&(0,r.jsx)(Wn,{Component:LU,size:"small"}),"".concat(t," ").concat(e)]})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{children:Mk("Current Period:","surferseo")}),(0,r.jsx)(Vn,{children:n})]}),(0,r.jsxs)($t,{direction:"column",gap:"2xs",children:[(0,r.jsx)(Vn,{children:Mk("Previous Period:","surferseo")}),(0,r.jsx)(Vn,{children:o})]})]})},_V=function(e){var t=e.param,n=e.value,o=e.previousValue,i=e.previousPeriod;return!1===n||!1===o||"No data gathered yet."===i||"position"==t&&0===o?(0,r.jsx)("span",{style:{width:"16px",display:"inline-block"}}):n==o?(0,r.jsx)(Wn,{Component:zT}):"position"!=t&&n>o||"position"==t&&n<o?(0,r.jsx)(Wn,{Component:vV}):(0,r.jsx)(Wn,{Component:yV})},kV=function(e,t,n,o,i){var a=function(e,t,n){return!1===t||!1===n||0===n?"black":"position"==e?t>n?"red":"black":t<n?"red":"black"}(n,e,t);return(0,r.jsx)(cu,{content:SV(n,t,o,i),portalled:!0,children:(0,r.jsxs)("span",{className:"number number--".concat(a),children:[e," ",(0,r.jsx)(_V,{param:n,value:e,previousValue:t,previousPeriod:i})]})})},EV=function(){var e=jV((0,s.useState)(!1),2),t=e[0],n=e[1],o=jV((0,s.useState)(""),2),i=o[0],a=o[1],c=jV((0,s.useState)({all:0,fall:0,growth:0}),2),l=c[0],u=c[1],f=jV((0,s.useState)([]),2),d=f[0],p=f[1],h=jV((0,s.useState)(0),2),m=h[0],v=h[1],g=jV((0,s.useState)(""),2),y=g[0],b=(g[1],jV((0,s.useState)("all"),2)),w=b[0],x=b[1],j=jV((0,s.useState)(1),2),O=j[0],S=j[1],_=jV((0,s.useState)("ID"),2),k=_[0],E=_[1],C=jV((0,s.useState)("desc"),2),A=C[0],P=C[1],I=function(){var e,t=(e=wV().mark((function e(){var t,r,o,i,s,c,l,f,d=arguments;return wV().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:"",r=d.length>1&&void 0!==d[1]?d[1]:1,o=d.length>2&&void 0!==d[2]?d[2]:20,i=d.length>3&&void 0!==d[3]?d[3]:"ID",s=d.length>4&&void 0!==d[4]?d[4]:"desc",c=d.length>5&&void 0!==d[5]?d[5]:"all",n(!0),e.next=9,fetch(wpsurfer.ajaxurl+"?action=surfer_get_posts_for_performance_report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_surfer_nonce:wpsurfer.surfer_ajax_nonce,query:t,page:r,perPage:o,filter:c,sorting:i+" "+s})});case 9:return l=e.sent,e.next=12,l.json();case 12:f=e.sent,p(f.posts),v(f.counts[c]),u(f.counts),a(f.current_period),n(!1);case 18:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xV(i,r,o,a,s,"next",e)}function s(e){xV(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();(0,s.useEffect)((function(){1!=O?S(1):I(y,O,20,k,A,w)}),[y,w,k,A]),(0,s.useEffect)((function(){I(y,O,20,k,A,w)}),[O]);var R=[{field:"postTitle",headerName:"Title",sortable:!1,valueGetter:function(e){return function(e){return(0,r.jsxs)("div",{className:"post-title-box",children:[(0,r.jsx)("a",{href:e.postEditURL,className:"post-title",children:e.postTitle||Mk("(no title)","surferseo")}),(0,r.jsxs)("div",{className:"post-title-box__hidden-links",children:[(0,r.jsx)("a",{href:e.postEditURL,children:Mk("Edit","surferseo")}),(0,r.jsx)("a",{href:e.postURL,target:"_blank",children:Mk("View","surferseo")})]})]})}(e)}},{field:"position",headerName:"Position",icon:YH,sortable:!0,sortingFieldName:"position",valueGetter:function(e){return kV(e.position,e.previousPosition,"position",e.currentPeriod,e.previousPeriod)}},{field:"clicks",headerName:"Clicks",icon:XH,sortable:!0,sortingFieldName:"clicks",valueGetter:function(e){return kV(e.clicks,e.previousClicks,"clicks",e.currentPeriod,e.previousPeriod)}},{field:"impressions",headerName:"Impressions",icon:JH,sortable:!0,sortingFieldName:"impressions",valueGetter:function(e){return kV(e.impressions,e.previousImpressions,"impressions",e.currentPeriod,e.previousPeriod)}},{field:"actions",headerName:"",valueGetter:function(e){return function(e){return(0,r.jsx)(kT,{wpPostId:e.id,draftId:e.draftId,scrapeStatus:e.scrapeStatus||0,content:e.postContent,children:(0,r.jsx)(uU,{mode:"button",buttonSize:"xsmall"})})}(e)}}],T=[{value:"all",label:"All posts",count:l.all},{value:"fall",label:"Drop in Position",count:l.fall},{value:"growth",label:"Increased in Position",count:l.growth}];return(0,r.jsxs)("div",{className:"performance-report",children:[(0,r.jsxs)("div",{className:"performance-report__header",children:[(0,r.jsxs)("p",{className:"performance-report__date",children:[Mk("Date:","surferseo")," ",i]}),!wpsurfer.emails_enabled&&(0,r.jsx)("a",{href:wpsurfer.wp_admin_url+"?page=surfer&surfer_enable_email_notification=1",className:"surfer-button surfer-button--primary",children:Mk("Turn on a weekly report","surferseo")})]}),(0,r.jsx)("h3",{children:Mk("Domain","surferseo")}),(0,r.jsx)(aV,{children:(0,r.jsx)(hV,{})}),(0,r.jsx)("h3",{children:Mk("Posts","surferseo")}),(0,r.jsx)(aV,{children:(0,r.jsx)(qH,{posts:d,headers:R,currentFilter:w,filters:T,setFilter:x,currentPage:O,setCurrentPage:S,itemsNumber:m,itemsPerPage:20,isLoading:t,sortingField:k,setSortingField:E,sortingDirection:A,setSortingDirection:P})})]})},CV=wp.i18n.__,AV=wp.editPost,PV=AV.PluginSidebarMoreMenuItem,IV=AV.PluginSidebar,RV=wp.components.PanelBody;const TV=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(PV,{target:"surferseo-sidebar",icon:"editor-customchar",children:CV("Surfer","surferseo")}),(0,r.jsxs)(IV,{name:"surferseo-sidebar",title:CV("Surfer","surferseo"),children:[(0,r.jsx)(aV,{children:(0,r.jsx)(RV,{title:CV("Optimize","surferseo"),initialOpen:!0,children:(0,r.jsx)(kT,{children:(0,r.jsx)(uU,{mode:"full",BeforeButtonText:CV("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})})})}),(0,r.jsx)(aV,{children:(0,r.jsx)(RV,{title:CV("Keyword Research","surferseo"),initialOpen:!0,children:(0,r.jsx)(NH,{})})})]},"surfer-sidebar")]})};var LV,zV;function MV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var NV=We.div.attrs({className:"ui-draggable-handle"})(LV||(LV=MV(["\n&&& {\n display: flex;\n flex-direction: row;\n gap: 8px;\n color: #1e1e1e;\n font-size: 13px;\n font-weight: 600;\n padding: 16px;\n line-height: 26px;\n}\n\n &&& button {\n display: flex;\n background: #fff;\n border: 1px solid #e5e5e5;\n border-radius: 4px;\n padding: 4px;\n color: #000;\n cursor: pointer;\n }\n"]))),DV=We.div.attrs({})(zV||(zV=MV(["\n&&& h2 {\n color: #1e1e1e;\n font-size: 13px;\n font-weight: 600;\n padding: 16px 0;\n }\n &&& > div {\n border-top: 1px solid #e5e5e5;\n padding: 0 16px;\n padding-bottom: 16px;\n }\n &&& input {\n background-color: transparent;\n }\n"])));function $V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return FV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FV(e,t)}(e,t)||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 FV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BV=function(){var e=$V((0,s.useState)(!0),2),t=e[0],n=e[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(NV,{children:[(0,r.jsx)("button",{onClick:function(){return n(!t)},children:t?(0,r.jsx)(pp,{}):(0,r.jsx)($x,{})}),t&&"Surfer"]}),(0,r.jsxs)(DV,{style:{visibility:t?"visible":"hidden",width:t?"100%":"0",overflow:t?"scroll":"hidden"},children:[(0,r.jsxs)("div",{className:"surfer-sidebar-box",children:[(0,r.jsx)("h2",{children:"Optimize"}),(0,r.jsx)(uU,{mode:"full",BeforeButtonText:Mk("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})]}),(0,r.jsxs)("div",{className:"surfer-sidebar-box",children:[(0,r.jsx)("h2",{children:"Keyword Research"}),(0,r.jsx)(NH,{})]})]})]})},WV=wp.plugins.registerPlugin;(function(){var e=!1;if("undefined"!=typeof _&&"function"==typeof _.forEach){e=!0,["get","set","at","cloneDeep"].forEach((function(t){e="function"==typeof _[t]&&e}))}return e})()&&_.noConflict(),function(e){addEventListener("DOMContentLoaded",(function(){var e=document.createElement("div");document.head.appendChild(e),i().render((0,r.jsx)(ht,{}),e)}));var t=document.getElementById("surfer-keyword-surfer");null!==t&&i().render((0,r.jsx)(NH,{}),t);var n=document.getElementById("surfer-json-schema");null!==n&&i().render((0,r.jsx)(kT,{children:(0,r.jsx)(ZU,{})}),n);var o=document.getElementById("surfer-performance-report");null!==o&&i().render((0,r.jsx)(EV,{}),o);var a=document.getElementById("surfer-content-export-box");null!==a&&i().render((0,r.jsx)(kT,{children:(0,r.jsx)(uU,{mode:"full",BeforeButtonText:Mk("Sync WordPress and Surfer to easily write articles that read well and rank high!","surferseo")})}),a);var s=document.getElementById("elementor-editor-wrapper");if(null!==s&&1!=wpsurfer.disable_elementor){var c=document.createElement("aside");c.id="surfer-elementor-modal-holder",s.appendChild(c),i().render((0,r.jsx)(kT,{children:(0,r.jsx)(BV,{})}),c)}var l=document.getElementsByClassName("surfer-traffic-details-box");if(null!==l)for(var u=0;u<l.length;u++){var f=l[u];if(f){var d,p,h,m,v,g=f.getAttribute("data-post-id"),y=f.getAttribute("data-draft-id"),b=null!==(d=f.getAttribute("data-content"))&&void 0!==d?d:"",w=f.getAttribute("data-scrape-status"),x=null!==(p=f.getAttribute("data-permalink-hash"))&&void 0!==p?p:"",j=null!==(h=f.getAttribute("data-stats"))&&void 0!==h?h:"",O=null!==(m=f.getAttribute("data-current-period"))&&void 0!==m?m:"",S=null!==(v=f.getAttribute("data-previous-period"))&&void 0!==v?v:"",_=g?parseInt(g,10):0,k=y?parseInt(y,10):0,E=null!=w?parseInt(w,10):0;null!==g&&i().render((0,r.jsx)($U,{postId:_,draftId:k,content:b,scrapeStatus:E,stats:j,currentPeriod:O,previousPeriod:S,permalinkHash:x}),f)}}WV("surferseo",{icon:XU,render:TV})}(window.wp)},1594:e=>{"use strict";e.exports=React},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](n[c])))?n.splice(c--,1):(s=!1,o<a&&(a=o));if(s){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var a={};t=t||[null,n({}),n([]),n(n)];for(var s=2&r&&e;"object"==typeof s&&!~t.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={44:0,507:0,859:0,364:0,461:0,165:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)var u=c(i)}for(t&&t(n);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},n=self.webpackChunkSurferSEO=self.webpackChunkSurferSEO||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i.O(void 0,[507,859,364,461,165],(()=>i(1796))),i.O(void 0,[507,859,364,461,165],(()=>i(8619))),i.O(void 0,[507,859,364,461,165],(()=>i(2123))),i.O(void 0,[507,859,364,461,165],(()=>i(6132))),i.O(void 0,[507,859,364,461,165],(()=>i(1458)));var a=i.O(void 0,[507,859,364,461,165],(()=>i(2329)));a=i.O(a)})(); -
surferseo/trunk/includes/admin/class-surfer-admin.php
r3085583 r3187966 11 11 use SurferSEO\Surferseo; 12 12 use SurferSEO\Forms\Surfer_Form_Config_Ci; 13 use SurferSEO\Surfer\Content_Parsers\Parsers_Controller; 14 use Elementor\Plugin; 15 13 16 14 17 /** … … 29 32 30 33 add_action( 'admin_notices', array( $this, 'check_wordfence_application_password_protection' ) ); 34 add_action( 'admin_notices', array( $this, 'check_elementor_grid_settings' ) ); 31 35 32 36 add_action( 'admin_init', array( $this, 'do_admin_redirects' ) ); … … 249 253 250 254 /** 255 * Check if Elementor Grid Container is enabled. 256 * Without it, export from Surfer to Elementor may not work properly. 257 * 258 * @return void 259 */ 260 public function check_elementor_grid_settings() { 261 262 if ( ! is_plugin_active( 'elementor/elementor.php' ) ) { 263 return; 264 } 265 266 $config_parser = Surfer()->get_surfer_settings()->get_option( 'content-importer', 'default_content_editor', Parsers_Controller::GUTENBERG ); 267 268 if ( Parsers_Controller::ELEMENTOR !== $config_parser ) { 269 return; 270 } 271 272 $grid_is_active = Plugin::$instance->experiments->is_feature_active( 'container_grid' ); 273 274 if ( $grid_is_active ) { 275 return; 276 } 277 278 $class = 'notice notice-error'; 279 $disable_url = admin_url( 'admin.php?page=elementor-settings#e-experiment-container_grid' ); 280 281 /* translators: %s - URL to the option that should be disabled */ 282 $message = sprintf( __( '<b>It appears there may be an issue with Elementor</b> <br/>We have noticed that you are attempting to use the Elementor parser with the Surfer plugin while the Grid Container option is disabled. Please be aware that this configuration may lead to errors during the export process from Surfer. <a href="%s">Please enable this option</a>.', 'surferseo' ), $disable_url ); 283 284 $allowed_html = array( 285 'b' => array(), 286 'br' => array(), 287 'a' => array( 'href' => array() ), 288 ); 289 290 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), wp_kses( $message, $allowed_html ) ); 291 } 292 293 /** 251 294 * Handle redirects to setup/welcome page after install and updates. 252 295 * … … 270 313 // On these pages, or during these events, disable the redirect. 271 314 if ( 272 ( 'surfer' === $current_page && $is_onboarding_path ) ||273 isset( $_GET['activate-multi'] ) // phpcs:ignore WordPress.Security.NonceVerification315 ( 'surfer' === $current_page && $is_onboarding_path ) || 316 isset( $_GET['activate-multi'] ) // phpcs:ignore WordPress.Security.NonceVerification 274 317 ) { 275 318 delete_transient( '_surfer_activation_redirect' ); -
surferseo/trunk/includes/admin/class-surfer-settings.php
r3085583 r3187966 167 167 'default_page_template' => 'default', 168 168 'default_elementor_template' => '', 169 'default_seo_plugin' => '', 169 170 'default_post_author' => $users[0]->ID, 170 171 'default_post_status' => 'draft', 171 172 'default_category' => false, 172 173 'default_tags' => false, 174 'disable_elementor' => false, 173 175 'surfer_gsc_meta_script' => false, 174 176 'surfer_gsc_data_collection_interval' => 7, -
surferseo/trunk/includes/forms/class-surfer-form-config-ci.php
r3123849 r3187966 122 122 $this->add_field( $field ); 123 123 124 $field = new Surfer_Form_Element_Select( 'default_seo_plugin' ); 125 $field->set_label( __( 'Default SEO Plugin', 'surferseo' ) ); 126 $field->set_hint( __( 'SEO plugin that you are using for meta tags.', 'surferseo' ) ); 127 $field->add_option( '', __( 'Auto Detection (Default)', 'surferseo' ) ); 128 $field->add_option( 'aioseo', __( 'All in One SEO', 'surferseo' ) ); 129 $field->add_option( 'rank_math', __( 'Rank Math', 'surferseo' ) ); 130 // $field->add_option( 'surfer', __( 'Surfer Plugin build-in', 'surferseo' ) ); 131 $field->add_option( 'yoast', __( 'Yoast SEO', 'surferseo' ) ); 132 $field->set_row_classes( 'surfer-connected' ); 133 $this->add_field( $field ); 134 124 135 $all_users = get_users( array( 'number' => -1 ) ); 125 136 … … 154 165 $tags = get_tags( $args ); 155 166 156 $field = new Surfer_Form_Element_Select( 'default_tags' ); 157 $field->set_label( __( 'Tag', 'surferseo' ) ); 158 $field->add_option( '', __( '- Select an option -', 'surferseo' ) ); 159 $field->set_row_classes( 'surfer-connected' ); 160 foreach ( $tags as $tag ) { 161 $field->add_option( $tag->name, $tag->name ); 162 } 167 $field = new Surfer_Form_Element_Checkbox( 'disable_elementor' ); 168 $field->set_label( '' ); 169 $field->add_option( 1, __( 'Disable Surfer writing guidelines in Elementor editor', 'surferseo' ) ); 170 $field->set_renderer( array( $this, 'render_switch' ) ); 171 $field->set_row_classes( 'surfer-connected' ); 163 172 $this->add_field( $field ); 164 173 } … … 569 578 private function check_if_tracking_or_emails_was_changed() { 570 579 571 $tracking = isset( $_POST['surfer_tracking_enabled'] ) ? $_POST['surfer_tracking_enabled']: false;572 $emails = isset( $_POST['surfer_position_monitor_summary'] ) ? $_POST['surfer_position_monitor_summary']: false;580 $tracking = isset( $_POST['surfer_tracking_enabled'] ) ? wp_unslash( $_POST['surfer_tracking_enabled'] ) : false; 581 $emails = isset( $_POST['surfer_position_monitor_summary'] ) ? wp_unslash( $_POST['surfer_position_monitor_summary'] ) : false; 573 582 574 583 $tracking_current_state = Surfer()->get_surfer_tracking()->is_tracking_allowed(); -
surferseo/trunk/includes/forms/class-surfer-form.php
r3038491 r3187966 238 238 </h3> 239 239 <?php if ( $field->get_hint() ) : ?> 240 <span class="surfer-admin-config-form__header_description"><?php echo $field->get_hint(); ?></span>240 <span class="surfer-admin-config-form__header_description"><?php echo wp_kses_post( $field->get_hint() ); ?></span> 241 241 <?php endif; ?> 242 242 <?php else : ?> … … 252 252 <?php $field->render(); ?> 253 253 <?php if ( $field->get_hint() ) : ?> 254 <br/><small><?php echo $field->get_hint(); ?></small>254 <br/><small><?php echo wp_kses_post( $field->get_hint() ); ?></small> 255 255 <?php endif; ?> 256 256 <?php if ( count( $field->get_errors() ) > 0 ) : ?> … … 406 406 $save = $this->save_data_into_options( $tab ); 407 407 } elseif ( self::REPO_DB === $this->repo ) { 408 $save = $this->save_data_into_datab se();408 $save = $this->save_data_into_database(); 409 409 } 410 410 … … 445 445 * @return bool 446 446 */ 447 private function save_data_into_datab se() {447 private function save_data_into_database() { 448 448 return false; 449 449 } -
surferseo/trunk/includes/surfer/class-content-exporter.php
r3123849 r3187966 11 11 use DOMDocument; 12 12 use PHP_CodeSniffer\Tokenizers\PHP; 13 use SurferSEO\Surfer; 13 14 use SurferSEO\Surferseo; 14 15 … … 72 73 } 73 74 74 $keywords = isset( $data->keywords ) ? sanitize_text_field( wp_unslash( $data->keywords ) ) : false; 75 $location = isset( $data->location ) ? sanitize_text_field( wp_unslash( $data->location ) ) : 'United States'; 76 $content = isset( $data->content ) ? wp_kses_post( $data->content ) : false; 77 $post_id = isset( $data->post_id ) ? intval( $data->post_id ) : false; 75 $keywords = isset( $data->keywords ) ? sanitize_text_field( wp_unslash( $data->keywords ) ) : false; 76 $location = isset( $data->location ) ? sanitize_text_field( wp_unslash( $data->location ) ) : 'United States'; 77 $content = isset( $data->content ) ? wp_kses_post( $data->content ) : false; 78 $post_id = isset( $data->post_id ) ? intval( $data->post_id ) : false; 79 $meta_title = isset( $data->post_id ) ? sanitize_text_field( wp_unslash( Surfer()->get_surfer()->get_post_meta_title( $data->post_id ) ) ) : false; 80 $meta_description = isset( $data->post_id ) ? sanitize_text_field( wp_unslash( Surfer()->get_surfer()->get_post_meta_description( $data->post_id ) ) ) : false; 78 81 79 82 if ( false === $keywords || '' === $keywords || empty( $keywords ) ) { … … 87 90 88 91 $params = array( 89 'keywords' => $keywords, 90 'location' => $location, 91 'content' => $content, 92 'wp_post_id' => $post_id, 93 'url' => apply_filters( 'surfer_api_base_url', get_site_url() ), 92 'keywords' => $keywords, 93 'location' => $location, 94 'content' => $content, 95 'wp_post_id' => $post_id, 96 'url' => apply_filters( 'surfer_api_base_url', get_site_url() ), 97 'meta_title' => $meta_title, 98 'meta_description' => $meta_description, 94 99 ); 95 100 … … 121 126 $keywords = isset( $data->keywords ) ? $data->keywords : false; 122 127 123 $content = isset( $data->content ) ? wp_kses_post( $this->parse_content_for_surfer( $data->content ) ) : false; 124 $draft_id = isset( $data->draft_id ) ? intval( $data->draft_id ) : false; 125 $post_id = isset( $data->post_id ) ? intval( $data->post_id ) : false; 126 $permalink_hash = isset( $data->permalink_hash ) ? sanitize_text_field( wp_unslash( $data->permalink_hash ) ) : false; 127 $keywords = is_array( $data->keywords ) ? array_map( 'sanitize_text_field', $data->keywords ) : sanitize_text_field( wp_unslash( $data->keywords ) ); 128 $location = isset( $data->location ) ? sanitize_text_field( wp_unslash( $data->location ) ) : false; 128 $content = isset( $data->content ) ? wp_kses_post( $this->parse_content_for_surfer( $data->content ) ) : false; 129 $draft_id = isset( $data->draft_id ) ? intval( $data->draft_id ) : false; 130 $post_id = isset( $data->post_id ) ? intval( $data->post_id ) : false; 131 $permalink_hash = isset( $data->permalink_hash ) ? sanitize_text_field( wp_unslash( $data->permalink_hash ) ) : false; 132 $keywords = is_array( $data->keywords ) ? array_map( 'sanitize_text_field', $data->keywords ) : sanitize_text_field( wp_unslash( $data->keywords ) ); 133 $location = isset( $data->location ) ? sanitize_text_field( wp_unslash( $data->location ) ) : false; 134 $meta_title = isset( $data->post_id ) ? sanitize_text_field( wp_unslash( Surfer()->get_surfer()->get_post_meta_title( $data->post_id ) ) ) : false; 135 $meta_description = isset( $data->post_id ) ? sanitize_text_field( wp_unslash( Surfer()->get_surfer()->get_post_meta_description( $data->post_id ) ) ) : false; 129 136 130 137 $params = array( 131 'draft_id' => $draft_id, 132 'content' => $content, 133 'wp_post_id' => $post_id, 134 'url' => apply_filters( 'surfer_api_base_url', get_site_url() ), 138 'draft_id' => $draft_id, 139 'content' => $content, 140 'wp_post_id' => $post_id, 141 'url' => apply_filters( 'surfer_api_base_url', get_site_url() ), 142 'meta_title' => $meta_title, 143 'meta_description' => $meta_description, 135 144 ); 136 145 … … 235 244 236 245 /** 237 * Function i nterates by HTML tags in provided content.246 * Function iterates by HTML tags in provided content. 238 247 * 239 248 * @param DOMDocument $parent_node - node to parse. … … 464 473 } 465 474 466 $posts = isset( $_POST['posts'] ) ? $_POST['posts']: false;475 $posts = isset( $_POST['posts'] ) ? wp_unslash( $_POST['posts'] ) : false; 467 476 468 477 if ( ! $posts ) { -
surferseo/trunk/includes/surfer/class-content-importer.php
r3071743 r3187966 85 85 if ( isset( $post ) && 'published' === $post['post_status'] ) { 86 86 // WordPress set current date as default and we do not want to change publication date. 87 $data['post_date'] = $post['post_date']; 87 $data['post_date'] = $post['post_date']; 88 $data['post_date_gmt'] = $post['post_date_gmt']; 88 89 } else { 89 90 $this->resolve_post_date( $args, $data ); … … 263 264 private function resolve_post_meta_details( $args, &$data ) { 264 265 265 $seo_plugin_is_active = false; 266 $chosen_seo_plugin = Surfer()->get_surfer_settings()->get_option( 'content-importer', 'default_seo_plugin', '' ); 267 268 if ( '' === $chosen_seo_plugin ) { 269 $chosen_seo_plugin = $this->find_active_seo_plugin(); 270 } 266 271 267 272 if ( ! isset( $data['meta_input'] ) ) { … … 270 275 271 276 // Yoast SEO is active. 272 if ( surfer_check_if_plugins_is_active( 'wordpress-seo/wp-seo.php' )) {277 if ( 'yoast' === $chosen_seo_plugin ) { 273 278 274 279 if ( isset( $args['meta_title'] ) && '' !== $args['meta_title'] ) { … … 279 284 $data['meta_input']['_yoast_wpseo_metadesc'] = $args['meta_description']; 280 285 } 281 282 $seo_plugin_is_active = true;283 286 } 284 287 285 288 // All in One SEO is active. 286 if ( surfer_check_if_plugins_is_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' )) {289 if ( 'aioseo' === $chosen_seo_plugin ) { 287 290 288 291 if ( isset( $args['meta_title'] ) && '' !== $args['meta_title'] ) { … … 293 296 $data['meta_input']['_aioseo_description'] = $args['meta_description']; 294 297 } 295 296 $seo_plugin_is_active = true;297 298 } 298 299 299 300 // Rank Math SEO. 300 if ( surfer_check_if_plugins_is_active( 'seo-by-rank-math/rank-math.php' )) {301 if ( 'rank_math' === $chosen_seo_plugin ) { 301 302 302 303 if ( isset( $args['meta_title'] ) && '' !== $args['meta_title'] ) { … … 307 308 $data['meta_input']['rank_math_description'] = $args['meta_description']; 308 309 } 309 310 $seo_plugin_is_active = true;311 310 } 312 311 313 312 // Save in Surfer Meta to display. 314 if ( ! $seo_plugin_is_active) {313 if ( 'surfer' === $chosen_seo_plugin ) { 315 314 316 315 if ( isset( $args['meta_title'] ) && '' !== $args['meta_title'] ) { … … 322 321 } 323 322 } 323 } 324 325 /** 326 * Checks which SEO plugin is active. 327 */ 328 private function find_active_seo_plugin() { 329 330 if ( surfer_check_if_plugins_is_active( 'wordpress-seo/wp-seo.php' ) ) { 331 return 'yoast'; 332 } elseif ( surfer_check_if_plugins_is_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) { 333 return 'aioseo'; 334 } elseif ( surfer_check_if_plugins_is_active( 'seo-by-rank-math/rank-math.php' ) ) { 335 return 'rank_math'; 336 } 337 338 return 'surfer'; 324 339 } 325 340 -
surferseo/trunk/includes/surfer/class-surfer-general-endpoints.php
r3071743 r3187966 34 34 35 35 add_action( 'init', array( $this, 'register_request_to_endpoints' ) ); 36 // add_action( 'rest_api_init', array( $this, 'register_general_api_endpoints' ) );37 36 } 38 37 -
surferseo/trunk/includes/surfer/class-surfer.php
r3123849 r3187966 16 16 17 17 /** 18 * Object responsible for handli g all Surfer features.18 * Object responsible for handling all Surfer features. 19 19 */ 20 20 class Surfer { … … 42 42 43 43 /** 44 * Class that ha dnle importing content from Surfer/GoogleDocs into WordPress.44 * Class that handle importing content from Surfer/GoogleDocs into WordPress. 45 45 * 46 46 * @var Content_Importer … … 56 56 57 57 /** 58 * Class that handle writing guid lines sidebar.58 * Class that handle writing guidelines sidebar. 59 59 * 60 60 * @var Surfer_Sidebar … … 530 530 $args['post_type'] = $metadata['postType']['value'] ?? ''; 531 531 $args['post_name'] = $request->get_param( 'url' ); 532 $args['meta_title'] = $ request->get_param( 'meta_title' );533 $args['meta_description'] = $ request->get_param( 'meta_description' );532 $args['meta_title'] = $metadata['postMetaTitle'] ?? ''; 533 $args['meta_description'] = $metadata['postMetaDescription'] ?? ''; 534 534 $args['draft_id'] = $request->get_param( 'draft_id' ); 535 535 $args['permalink_hash'] = $request->get_param( 'permalink_hash' ); … … 653 653 654 654 $posts[] = array( 655 'id' => $post->ID, 656 'title' => $post->post_title, 657 'status' => $post->post_status, 658 'created_at' => $post->post_date, 659 'modified_at' => $post->post_modified, 660 'post_type' => $post->post_type, 661 'url' => get_permalink( $post ), 662 'edit_url' => $this->get_edit_post_link( $post->ID, 'notdisplay' ), 663 'author' => $author, 664 'categories' => $this->convert_categories_to_surfer_select( $post->ID ), 665 'tags' => $this->convert_tags_to_surfer_select( $post->ID ), 655 'id' => $post->ID, 656 'title' => $post->post_title, 657 'status' => $post->post_status, 658 'created_at' => $post->post_date, 659 'modified_at' => $post->post_modified, 660 'post_type' => $post->post_type, 661 'url' => get_permalink( $post ), 662 'edit_url' => $this->get_edit_post_link( $post->ID, 'notdisplay' ), 663 'author' => $author, 664 'categories' => $this->convert_categories_to_surfer_select( $post->ID ), 665 'tags' => $this->convert_tags_to_surfer_select( $post->ID ), 666 'meta_title' => $this->get_post_meta_title( $post->ID ), 667 'meta_description' => $this->get_post_meta_description( $post->ID ), 666 668 ); 667 669 } … … 725 727 726 728 return $tags; 729 } 730 731 /** 732 * Get post meta title. 733 * 734 * @param int $post_id - ID of the post. 735 * @return string 736 */ 737 public function get_post_meta_title( $post_id ) { 738 739 $chosen_seo_plugin = Surfer()->get_surfer_settings()->get_option( 'content-importer', 'default_seo_plugin', '' ); 740 741 if ( ! empty( $chosen_seo_plugin ) ) { 742 switch ( $chosen_seo_plugin ) { 743 case 'yoast': 744 return get_post_meta( $post_id, '_yoast_wpseo_title', true ); 745 case 'rank_math': 746 return get_post_meta( $post_id, 'rank_math_title', true ); 747 case 'aioseo': 748 return get_post_meta( $post_id, '_aioseo_title', true ); 749 case 'surfer': 750 return get_post_meta( $post_id, '_surferseo_title', true ); 751 } 752 } 753 754 if ( surfer_check_if_plugins_is_active( 'wordpress-seo/wp-seo.php' ) ) { 755 $title = get_post_meta( $post_id, '_yoast_wpseo_title', true ); 756 if ( ! empty( $title ) ) { 757 return $title; 758 } 759 } 760 761 if ( surfer_check_if_plugins_is_active( 'rank-math/rank-math.php' ) ) { 762 $title = get_post_meta( $post_id, 'rank_math_title', true ); 763 if ( ! empty( $title ) ) { 764 return $title; 765 } 766 } 767 768 if ( surfer_check_if_plugins_is_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) { 769 $title = get_post_meta( $post_id, '_aioseo_title', true ); 770 if ( ! empty( $title ) ) { 771 return $title; 772 } 773 } 774 775 return ''; 776 } 777 778 /** 779 * Get post meta description. 780 * 781 * @param int $post_id - ID of the post. 782 * @return string 783 */ 784 public function get_post_meta_description( $post_id ) { 785 786 $chosen_seo_plugin = Surfer()->get_surfer_settings()->get_option( 'content-importer', 'default_seo_plugin', '' ); 787 788 if ( ! empty( $chosen_seo_plugin ) ) { 789 switch ( $chosen_seo_plugin ) { 790 case 'yoast': 791 return get_post_meta( $post_id, '_yoast_wpseo_metadesc', true ); 792 case 'rank_math': 793 return get_post_meta( $post_id, 'rank_math_description', true ); 794 case 'aioseo': 795 return get_post_meta( $post_id, '_aioseo_description', true ); 796 case 'surfer': 797 return get_post_meta( $post_id, '_surferseo_description', true ); 798 } 799 } 800 801 if ( surfer_check_if_plugins_is_active( 'wordpress-seo/wp-seo.php' ) ) { 802 $description = get_post_meta( $post_id, '_yoast_wpseo_metadesc', true ); 803 if ( ! empty( $description ) ) { 804 return $description; 805 } 806 } 807 808 if ( surfer_check_if_plugins_is_active( 'rank-math/rank-math.php' ) ) { 809 $description = get_post_meta( $post_id, 'rank_math_description', true ); 810 if ( ! empty( $description ) ) { 811 return $description; 812 } 813 } 814 815 if ( surfer_check_if_plugins_is_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) { 816 $description = get_post_meta( $post_id, '_aioseo_description', true ); 817 if ( ! empty( $description ) ) { 818 return $description; 819 } 820 } 821 822 return ''; 727 823 } 728 824 … … 1098 1194 'wp_admin_url' => admin_url( 'index.php' ), 1099 1195 'baseurl' => Surfer()->get_baseurl(), 1100 // Surfer gen ral usage.1196 // Surfer general usage. 1101 1197 'wp_language' => strtolower( $this->get_langauge_code() ), 1102 1198 'learnmore_url' => 'https://docs.surferseo.com/en/collections/3548643-wpsurfer', … … 1119 1215 // Security. 1120 1216 'surfer_ajax_nonce' => wp_create_nonce( 'surfer-ajax-nonce' ), 1217 // Integrations. 1218 'disable_elementor' => Surfer()->get_surfer_settings()->get_option( 'content-importer', 'disable_elementor', false ), 1121 1219 ) 1122 1220 ); -
surferseo/trunk/includes/surfer/content-parsers/class-content-parser.php
r3123849 r3187966 89 89 protected function download_img_to_media_library( $image_url, $image_alt = '', $url_only = true ) { 90 90 91 $file_name = basename( $image_url ); 92 $image_id = $this->find_image_by_name( $file_name ); 91 $image_id = $this->find_image_by_url( $image_url ); 93 92 if ( 0 === $image_id ) { 94 93 $image_id = $this->upload_images_to_wp( $image_url ); … … 152 151 $attachment_id = media_handle_sideload( $file_array, 0, null, $post_data ); 153 152 update_post_meta( $attachment_id, 'surfer_file_name', $file_name ); 153 update_post_meta( $attachment_id, 'surfer_file_original_url', $image_url ); 154 154 @unlink( $tmp_directory ); // phpcs:ignore 155 155 … … 158 158 159 159 /** 160 * Search for image by name and return it's URL.161 * 162 * @param string $ file_name - name of the file.160 * Search for image by URL and return it's ID. 161 * 162 * @param string $image_url - URL to the image. 163 163 * @return int 164 164 */ 165 private function find_image_by_ name( $file_name) {165 private function find_image_by_url( $image_url ) { 166 166 167 167 $image_id = 0; 168 169 $file_name = explode( '.', $file_name );170 $file_name = $file_name[0];171 168 172 169 $args = array( 173 170 'post_type' => 'attachment', 174 'name' => sanitize_title( $file_name ), 171 'meta_query' => array( 172 array( 173 'key' => 'surfer_file_original_url', 174 'value' => $image_url, 175 ), 176 ), 175 177 'posts_per_page' => 1, 176 178 'post_status' => 'inherit', -
surferseo/trunk/includes/surfer/content-parsers/class-elementor-parser.php
r3123849 r3187966 116 116 if ( $elementor_template > 0 ) { 117 117 $template_post = get_post( $elementor_template ); 118 $template = json_decode( get_post_meta( $template_post->ID, '_elementor_data', true ) )[0]; 119 120 if ( isset( $template->elType ) && 'container' === $template->elType ) { // @codingStandardsIgnoreLine 121 $settings = $template->settings; 122 } 123 124 foreach ( $template->elements as $element ) { 125 if ( isset( $element->elType ) && 'widget' === $element->elType ) { // @codingStandardsIgnoreLine 126 if ( 'heading' === $element->widgetType ) { // @codingStandardsIgnoreLine 127 $elementor_styling[ ( $element->settings->header_size ) ? $element->settings->header_size : 'h2' ] = $element->settings; // @codingStandardsIgnoreLine 128 } else { 129 $elementor_styling[ $element->widgetType ] = $element->settings; // @codingStandardsIgnoreLine 118 if ( isset( $template_post ) && $template_post->ID > 0 ) { 119 $template = json_decode( get_post_meta( $template_post->ID, '_elementor_data', true ) )[0]; 120 121 if ( isset( $template->elType ) && 'container' === $template->elType ) { // @codingStandardsIgnoreLine 122 $settings = $template->settings; 123 } 124 125 foreach ( $template->elements as $element ) { 126 if ( isset( $element->elType ) && 'widget' === $element->elType ) { // @codingStandardsIgnoreLine 127 if ( 'heading' === $element->widgetType ) { // @codingStandardsIgnoreLine 128 $elementor_styling[ ( $element->settings->header_size ) ? $element->settings->header_size : 'h2' ] = $element->settings; // @codingStandardsIgnoreLine 129 } else { 130 $elementor_styling[ $element->widgetType ] = $element->settings; // @codingStandardsIgnoreLine 131 } 130 132 } 131 133 } -
surferseo/trunk/includes/surfer/gsc/class-surfer-gsc-drop-monitor.php
r3071743 r3187966 303 303 ); 304 304 305 $email_sent = wp_mail( get_ admin_url(), $title, $message, $headers );305 $email_sent = wp_mail( get_option( 'admin_email' ), $title, $message, $headers ); 306 306 if ( $email_sent ) { 307 307 Surfer()->get_surfer_tracking()->track_wp_event( 'report_email_sent', home_url() ); … … 577 577 } 578 578 579 $query = $data['query'];580 $current_page = $data['page'];581 $per_page = $data['perPage'];582 $filter = $data['filter'];583 $sorting = $data['sorting'];579 $query = sanitize_text_field( $data['query'] ); 580 $current_page = absint( $data['page'] ); 581 $per_page = absint( $data['perPage'] ); 582 $filter = sanitize_key( $data['filter'] ); 583 $sorting = sanitize_key( $data['sorting'] ); 584 584 585 585 $return = new stdClass(); … … 658 658 659 659 if ( ! $count_only ) { 660 $sql .= ' ORDER BY ' . $sorting;660 $sql .= $wpdb->prepare( ' ORDER BY %s', $sorting ); 661 661 $sql .= $wpdb->prepare( ' LIMIT %d OFFSET %d', $per_page, ( $current_page - 1 ) * $per_page ); 662 662 } -
surferseo/trunk/includes/surfer/integrations/class-elementor.php
r3123849 r3187966 38 38 39 39 add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'enqueue_scripts_and_styles_in_elementor' ) ); 40 41 // We are too late for elementor/init. We should see if we can be on time, or else this workaround works (we do always get the "else" though).42 /*43 if ( ! \did_action( 'elementor/init' ) ) {44 \add_action( 'elementor/init', array( $this, 'add_surfer_panel_tab' ) );45 } else {46 $this->add_surfer_panel_tab();47 }*/48 49 40 add_action( 'elementor/documents/register_controls', array( $this, 'register_document_controls' ) ); 50 41 } … … 142 133 'keyword_research', 143 134 array( 144 // 'label' => esc_html__( 'Keywrod Research', 'surferseo' ),145 135 'type' => Controls_Manager::RAW_HTML, 146 // 'return_value' => 'open',147 136 'raw' => $raw_html, 148 137 'separator' => 'none', -
surferseo/trunk/readme.txt
r3123849 r3187966 4 4 Requires at least: 6.0 5 5 Requires PHP: 7.4 6 Tested up to: 6. 6.07 Stable tag: 1. 5.0.5026 Tested up to: 6.7.0 7 Stable tag: 1.6.0.523 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 89 89 == Changelog == 90 90 91 = 1.6.0 = 92 * FEATURE: Support Meta Tags Import/Export from/to Surfer 93 * FEATURE: Configuration option to disable writing guidelines in Elementor 94 * FEATURE: Support for files with same name or files with name changed after export from Surfer, during saving images in Media Library 95 * FIX: Notification for conflict between Surfer export and Elementor settings 96 * FIX: GSC reports e-mails with empty "to" 97 * FIX: Security improvements 98 * FIX: Typos 99 91 100 = 1.5.0 = 92 101 * FEATURE: Elementor integration … … 94 103 * FIX: Writing Guidelines stuck on first load in Classic Editor 95 104 * FIX: Parsing special chars in headings during import 96 * FIX: Missing content issue during export of cert ein types of images105 * FIX: Missing content issue during export of certain types of images 97 106 * FIX: Better support for custom post types in Classic Editor 98 107 … … 197 206 == Upgrade Notice == 198 207 208 = 1.6.0 = 209 * FEATURE: Support Meta Tags Import/Export from/to Surfer 210 * FEATURE: Configuration option to disable writing guidelines in Elementor 211 * FEATURE: Support for files with same name or files with name changed after export from Surfer, during saving images in Media Library 212 * FIX: Notification for conflict between Surfer export and Elementor settings 213 * FIX: GSC reports e-mails with empty "to" 214 * FIX: Security improvements 215 * FIX: Typos 216 199 217 = 1.5.0 = 200 218 * FEATURE: Elementor integration … … 202 220 * FIX: Writing Guidelines stuck on first load in Classic Editor 203 221 * FIX: Parsing special chars in headings during import 204 * FIX: Missing content issue during export of cert ein types of images222 * FIX: Missing content issue during export of certain types of images 205 223 * FIX: Better support for custom post types in Classic Editor 206 224 -
surferseo/trunk/surferseo.php
r3123849 r3187966 4 4 * Plugin URI: https://wordpress.org/plugins/surferseo/ 5 5 * Description: Create content that ranks with Surfer in WordPress 6 * Version: 1. 5.0.5026 * Version: 1.6.0.523 7 7 * Author: Surfer 8 8 * Author URI: https://surferseo.com … … 12 12 * Domain Path: /languages 13 13 * Requires at least: 6.0 14 * Test up to: 6. 6.014 * Test up to: 6.7.0 15 15 * Requires PHP: 7.4 16 16 * … … 23 23 24 24 if ( ! defined( 'SURFER_VERSION' ) ) { 25 define( 'SURFER_VERSION', '1. 5.0.502' );25 define( 'SURFER_VERSION', '1.6.0.523' ); 26 26 } 27 27
Note: See TracChangeset
for help on using the changeset viewer.