import{s as Ue}from"./js/client.d00863cc.js";import"./js/_commonjsHelpers.10c44588.js";var V={exports:{}},R={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var ae=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable;function Ye(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Je(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;var r=Object.getOwnPropertyNames(t).map(function(l){return t[l]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(l){a[l]=l}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Ke=Je()?Object.assign:function(e,t){for(var o,r=Ye(e),a,l=1;l<arguments.length;l++){o=Object(arguments[l]);for(var i in o)Ge.call(o,i)&&(r[i]=o[i]);if(ae){a=ae(o);for(var s=0;s<a.length;s++)qe.call(o,a[s])&&(r[a[s]]=o[a[s]])}}return r},ue={exports:{}},u={};/** @license React v17.0.2
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var K=Ke,E=60103,he=60106;u.Fragment=60107;u.StrictMode=60108;u.Profiler=60114;var fe=60109,we=60110,me=60112;u.Suspense=60113;var ye=60115,pe=60116;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;E=b("react.element"),he=b("react.portal"),u.Fragment=b("react.fragment"),u.StrictMode=b("react.strict_mode"),u.Profiler=b("react.profiler"),fe=b("react.provider"),we=b("react.context"),me=b("react.forward_ref"),u.Suspense=b("react.suspense"),ye=b("react.memo"),pe=b("react.lazy")}var te=typeof Symbol=="function"&&Symbol.iterator;function Qe(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ge={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ve={};function F(e,t,o){this.props=e,this.context=t,this.refs=ve,this.updater=o||ge}F.prototype.isReactComponent={};F.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(W(85));this.updater.enqueueSetState(this,e,t,"setState")};F.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function be(){}be.prototype=F.prototype;function Q(e,t,o){this.props=e,this.context=t,this.refs=ve,this.updater=o||ge}var X=Q.prototype=new be;X.constructor=Q;K(X,F.prototype);X.isPureReactComponent=!0;var ee={current:null},Ce=Object.prototype.hasOwnProperty,_e={key:!0,ref:!0,__self:!0,__source:!0};function ze(e,t,o){var r,a={},l=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(l=""+t.key),t)Ce.call(t,r)&&!_e.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=o;else if(1<s){for(var c=Array(s),w=0;w<s;w++)c[w]=arguments[w+2];a.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)a[r]===void 0&&(a[r]=s[r]);return{$$typeof:E,type:e,key:l,ref:i,props:a,_owner:ee.current}}function Xe(e,t){return{$$typeof:E,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ne(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function en(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return t[o]})}var oe=/\/+/g;function Z(e,t){return typeof e=="object"&&e!==null&&e.key!=null?en(""+e.key):t.toString(36)}function j(e,t,o,r,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(l){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case E:case he:i=!0}}if(i)return i=e,a=a(i),e=r===""?"."+Z(i,0):r,Array.isArray(a)?(o="",e!=null&&(o=e.replace(oe,"$&/")+"/"),j(a,t,o,"",function(w){return w})):a!=null&&(ne(a)&&(a=Xe(a,o+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(oe,"$&/")+"/")+e)),t.push(a)),1;if(i=0,r=r===""?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){l=e[s];var c=r+Z(l,s);i+=j(l,t,o,c,a)}else if(c=Qe(e),typeof c=="function")for(e=c.call(e),s=0;!(l=e.next()).done;)l=l.value,c=r+Z(l,s++),i+=j(l,t,o,c,a);else if(l==="object")throw t=""+e,Error(W(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return i}function A(e,t,o){if(e==null)return e;var r=[],a=0;return j(e,r,"","",function(l){return t.call(o,l,a++)}),r}function nn(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(o){e._status===0&&(o=o.default,e._status=1,e._result=o)},function(o){e._status===0&&(e._status=2,e._result=o)})}if(e._status===1)return e._result;throw e._result}var Se={current:null};function z(){var e=Se.current;if(e===null)throw Error(W(321));return e}var an={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:ee,IsSomeRendererActing:{current:!1},assign:K};u.Children={map:A,forEach:function(e,t,o){A(e,function(){t.apply(this,arguments)},o)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(t){return t})||[]},only:function(e){if(!ne(e))throw Error(W(143));return e}};u.Component=F;u.PureComponent=Q;u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=an;u.cloneElement=function(e,t,o){if(e==null)throw Error(W(267,e));var r=K({},e.props),a=e.key,l=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,i=ee.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)Ce.call(t,c)&&!_e.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=o;else if(1<c){s=Array(c);for(var w=0;w<c;w++)s[w]=arguments[w+2];r.children=s}return{$$typeof:E,type:e.type,key:a,ref:l,props:r,_owner:i}};u.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:we,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:fe,_context:e},e.Consumer=e};u.createElement=ze;u.createFactory=function(e){var t=ze.bind(null,e);return t.type=e,t};u.createRef=function(){return{current:null}};u.forwardRef=function(e){return{$$typeof:me,render:e}};u.isValidElement=ne;u.lazy=function(e){return{$$typeof:pe,_payload:{_status:-1,_result:e},_init:nn}};u.memo=function(e,t){return{$$typeof:ye,type:e,compare:t===void 0?null:t}};u.useCallback=function(e,t){return z().useCallback(e,t)};u.useContext=function(e,t){return z().useContext(e,t)};u.useDebugValue=function(){};u.useEffect=function(e,t){return z().useEffect(e,t)};u.useImperativeHandle=function(e,t,o){return z().useImperativeHandle(e,t,o)};u.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)};u.useMemo=function(e,t){return z().useMemo(e,t)};u.useReducer=function(e,t,o){return z().useReducer(e,t,o)};u.useRef=function(e){return z().useRef(e)};u.useState=function(e){return z().useState(e)};u.version="17.0.2";(function(e){e.exports=u})(ue);/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var tn=ue.exports,ke=60103;R.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var re=Symbol.for;ke=re("react.element"),R.Fragment=re("react.fragment")}var on=tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rn=Object.prototype.hasOwnProperty,ln={key:!0,ref:!0,__self:!0,__source:!0};function Pe(e,t,o){var r,a={},l=null,i=null;o!==void 0&&(l=""+o),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)rn.call(t,r)&&!ln.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:ke,type:e,key:l,ref:i,props:a,_owner:on.current}}R.jsx=Pe;R.jsxs=Pe;(function(e){e.exports=R})(V);const n=V.exports.jsx,d=V.exports.jsxs,J=V.exports.Fragment,g={};g.headline=d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.817 2H22v.038l-6.183 4.226V2.001zm-7.62 9.473V2H2.016v4.683-.267l6.126 5.094.057-.038zm-6.182 5.061l6.183 4.213v1.252H2.015v-5.465zm13.802-.857L22 11.559v10.437h-6.183v-6.32z",fill:"#F18200"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.198 11.435l-.057.039L2.016 6.38v.265-4.644h6.182v9.434zm0 9.226L2.015 16.45v5.55h6.183v-1.337zm7.62-5.07L22 11.474v10.522h-6.183v-6.405zM22 2.001l-6.183 4.226V2H22z",fill:"#F18200"}),n("path",{d:"M8.141 13.537L22 4.064v5.432l-13.8 9.19L2 14.46l.016-6.018 6.125 5.094z",fill:"#F18200"})]});g.headlineBlack=n("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{d:"M13.5 2V12H14.5C14.6458 12 14.7604 12.0521 14.8438 12.1562C14.9479 12.2396 15 12.3542 15 12.5V13.5C15 13.6458 14.9479 13.7604 14.8438 13.8438C14.7604 13.9479 14.6458 14 14.5 14H9.5C9.35417 14 9.22917 13.9479 9.125 13.8438C9.04167 13.7604 9 13.6458 9 13.5V12.5C9 12.3542 9.04167 12.2396 9.125 12.1562C9.22917 12.0521 9.35417 12 9.5 12H10.5V8H4.5V12H5.5C5.64583 12 5.76042 12.0521 5.84375 12.1562C5.94792 12.2396 6 12.3542 6 12.5V13.5C6 13.6458 5.94792 13.7604 5.84375 13.8438C5.76042 13.9479 5.64583 14 5.5 14H0.5C0.354167 14 0.229167 13.9479 0.125 13.8438C0.0416667 13.7604 0 13.6458 0 13.5V12.5C0 12.3542 0.0416667 12.2396 0.125 12.1562C0.229167 12.0521 0.354167 12 0.5 12H1.5V2H0.5C0.354167 2 0.229167 1.95833 0.125 1.875C0.0416667 1.77083 0 1.64583 0 1.5V0.5C0 0.354167 0.0416667 0.239583 0.125 0.15625C0.229167 0.0520833 0.354167 0 0.5 0H5.5C5.64583 0 5.76042 0.0520833 5.84375 0.15625C5.94792 0.239583 6 0.354167 6 0.5V1.5C6 1.64583 5.94792 1.77083 5.84375 1.875C5.76042 1.95833 5.64583 2 5.5 2H4.5V6H10.5V2H9.5C9.35417 2 9.22917 1.95833 9.125 1.875C9.04167 1.77083 9 1.64583 9 1.5V0.5C9 0.354167 9.04167 0.239583 9.125 0.15625C9.22917 0.0520833 9.35417 0 9.5 0H14.5C14.6458 0 14.7604 0.0520833 14.8438 0.15625C14.9479 0.239583 15 0.354167 15 0.5V1.5C15 1.64583 14.9479 1.77083 14.8438 1.875C14.7604 1.95833 14.6458 2 14.5 2H13.5Z",fill:"#000"})});g.warning=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM11 5.00002H9V11H11V5.00002ZM11 13H9V15H11V13ZM2.00002 10C2.00002 14.42 5.58002 18 10 18C14.42 18 18 14.42 18 10C18 5.58002 14.42 2.00002 10 2.00002C5.58002 2.00002 2.00002 5.58002 2.00002 10Z",fill:"#005AE0"})});g.smile=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM6.5 6C5.67157 6 5 6.67157 5 7.5C5 8.32843 5.67157 9 6.5 9C7.32843 9 8 8.32843 8 7.5C8 6.67157 7.32843 6 6.5 6ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM6.55 12C7.25 13.19 8.52 14 10 14C11.48 14 12.75 13.19 13.45 12H15.12C14.32 14.05 12.33 15.5 10 15.5C7.67 15.5 5.68 14.05 4.88 12H6.55ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#00AA63"})});g.neutral=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM5 7.5C5 6.67157 5.67157 6 6.5 6C7.32843 6 8 6.67157 8 7.5C8 8.32843 7.32843 9 6.5 9C5.67157 9 5 8.32843 5 7.5ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM7 13.5V12H13V13.5H7ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#005AE0"})});g.negative=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM6.5 6C5.67157 6 5 6.67157 5 7.5C5 8.32843 5.67157 9 6.5 9C7.32843 9 8 8.32843 8 7.5C8 6.67157 7.32843 6 6.5 6ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM4.88 15.5C5.68 13.45 7.67 12 10 12C12.33 12 14.32 13.45 15.12 15.5H13.45C12.75 14.31 11.48 13.5 10 13.5C8.52 13.5 7.24 14.31 6.55 15.5H4.88ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#DF2A4A"})});g.check=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18ZM8 12.17L14.59 5.58L16 7L8 15L4 11L5.41 9.59L8 12.17Z",fill:"#00AA63"})});const Ne=e=>Ue.agent().set("X-WP-Nonce",e).use(t=>{t.on("response",o=>{(o.status===401||o.status===403)&&console.error(o)})}),sn=e=>e.replace(/^\//,""),$e=e=>e.replace(/\/$/,""),U=e=>$e(e)+"/",xe=e=>(e=window.aioseo.data.hasUrlTrailingSlash?U(e):$e(e),U(window.aioseo.urls.restUrl)+U("aioseo/v1")+sn(e));var He={exports:{}};/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var r=[],a=0;a<arguments.length;a++){var l=arguments[a];if(!!l){var i=typeof l;if(i==="string"||i==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var s=o.apply(null,l);s&&r.push(s)}}else if(i==="object")if(l.toString===Object.prototype.toString)for(var c in l)t.call(l,c)&&l[c]&&r.push(c);else r.push(l.toString())}}return r.join(" ")}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(He);const p=He.exports,{Fragment:cn}=window.wp.element,Oe=e=>{const t=e.barScore,o=e.color;return n(cn,{children:n("div",{className:"aioseo-donut-container",style:{flexDirection:"column"},children:d("svg",{className:"aioseo-donut-score-svg",viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg",children:[n("circle",{className:"aioseo-seo-headline-analyzer-score__background",stroke:"#e8e8eb",strokeWidth:"2",fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"}),n("circle",{className:"aioseo-seo-headline-analyzer-score__circle",stroke:o,strokeWidth:"2",strokeDasharray:`${t}, 100`,strokeLinecap:"round",fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"})]})})})},{__:I,sprintf:T}=window.wp.i18n,dn=T(I("Headlines that are lists and how-to get more engagement on average than other types of headlines. %1$s%2$sLearn More%3$s \u2192","all-in-one-seo-pack"),"<br /><br />",'<a href="https://optinmonster.com/why-these-21-headlines-went-viral-and-how-you-can-copy-their-success/" target="_blank" className="aioseo-headline-analyzer-link"><span>',"</span></a>"),De=T(I("A very good score is between %1$d and %2$d.","all-in-one-seo-pack"),70,90),Ee=T(I("For best results, you should strive for %1$d and above.","all-in-one-seo-pack"),70),un=T(I("This headline analyzer is part of AIOSEO to help you increase your traffic. %1$sAnalyze your site further here%2$s \u2192%3$s","all-in-one-seo-pack"),T('<a href="%1$s" className="aioseo-headline-analyzer-link" target="_blank"><span>',window.aioseo.urls.aio.seoAnalysis),"</span>","</a>"),{__:O}=window.wp.i18n,{Fragment:hn}=window.wp.element,{PanelBody:fn,PanelRow:wn}=window.wp.components,D="all-in-one-seo-pack",mn=e=>{const t=e.analyzer.currentHeadlineData.sentence,o=O("Score",D),r=e.analyzer.currentHeadlineData.score,a=40>r?"red":70>=r?"orange":"green",l=a==="red"?"#df2a4a":a==="orange"?"#F2994A":"#00aa63";let i;switch(!0){case 25>r:i=n("span",{children:O("Not Looking Great",D)});break;case 50>r:i=n("span",{children:O("Could Be Better",D)});break;case 60>r:i=n("span",{children:O("Getting There",D)});break;case 75>r:i=n("span",{children:O("Looks Good! \u{1F44D}\u{1F44D}",D)});break;case 75<r:i=n("span",{children:O("Super! \u{1F525}\u{1F525}\u{1F525}",D)});break;default:i=!1}return n(hn,{children:n(fn,{className:"aioseo-headline-analyzer-panel-score",title:o,children:n(wn,{children:d("div",{className:"aioseo-headline-analyzer-current-score-tab aioseo-headline-analyzer-panel-first-block",children:[d("h4",{className:"aioseo-headline-analyzer-current-title",children:["\u201C",t,"\u201D"]}),d("div",{className:"aioseo-headline-analyzer-pie-chart-container",children:[d("div",{className:p("aioseo-headline-analyzer-current-score",a),children:[r,n("span",{className:"aioseo-headline-analyzer-total-out-of-score",children:"/ 100"})]}),i&&n("div",{className:p("aioseo-headline-analyzer-score-status",a),children:i}),n(Oe,{barScore:r,color:l})]}),d("p",{children:[De," ",Ee]})]})})})})},{__:G}=window.wp.i18n,{Fragment:yn}=window.wp.element,{PanelBody:pn,PanelRow:gn,TextControl:vn,Button:bn}=window.wp.components,q="all-in-one-seo-pack",Cn=e=>{const t=G("Try New Headline",q),o=G("Enter a different headline than your post title to see how it compares.",q),r=G("Analyze Headline",q),a=typeof e.analyzer.newHeadline<"u"?e.analyzer.newHeadline:"",l=typeof e.analyzer.previousHeadlinesData<"u"?e.analyzer.previousHeadlinesData:[],i=!a,s=c=>{const w=c.trim();!w||Ne(window.aioseo.nonce).post(xe("analyze_headline")).send({headline:w,shouldStoreHeadline:!1}).then(f=>{const h=JSON.parse(f.body[Object.keys(f.body)[0]]);e.setAnalyzer({newHeadlineData:h,headlineData:h,previousHeadlinesData:[e.analyzer.headlineData,...l],isNewData:!0})}).catch(f=>{e.setAnalyzer({isNewData:!1}),console.log(f)})};return n(yn,{children:n(pn,{title:t,className:p("aioseo-headline-analyzer-panel-tab-new-score-form"),children:n(gn,{children:n("div",{className:"aioseo-headline-analyzer-new-tab",children:n("div",{className:"aioseo-headline-analyzer-new-score-form-block",children:d("form",{onSubmit:c=>{c.preventDefault(),s(a)},children:[n(vn,{label:o,value:a,onChange:c=>{c!==" "&&e.setAnalyzer({newHeadline:c})},className:"aioseo-headline-analyzer-input-field"}),n(bn,{className:p("aioseo-headline-analyzer-button"),onClick:()=>{s(a)},disabled:i,children:r})]})})})})})})},{__:N}=window.wp.i18n,{Fragment:_n}=window.wp.element,{PanelBody:zn,PanelRow:Sn}=window.wp.components,$="all-in-one-seo-pack",kn=e=>{const t=e.analyzer.currentHeadlineData.sentence,o=N("New Score",$),r=N("Current Score",$),a=typeof e.analyzer.newHeadlineData<"u"?e.analyzer.newHeadlineData.sentence:"",l=typeof e.analyzer.newHeadlineData<"u"?e.analyzer.newHeadlineData.score:"",i=typeof e.analyzer.currentHeadlineData.score<"u"?e.analyzer.currentHeadlineData.score:"",s=40>l?"red":60>=l?"orange":"green",c=s==="red"?"#df2a4a":s==="orange"?"#F2994A":"#00aa63",w=40>i?"red-bg":60>=i?"orange-bg":"green-bg",f=Math.abs(l-i);let h;switch(!0){case 25>l:h=n("span",{children:N("Not Looking Great",$)});break;case 50>l:h=n("span",{children:N("Could Be Better",$)});break;case 60>l:h=n("span",{children:N("Getting There",$)});break;case 75>l:h=n("span",{children:N("Looks Good! \u{1F44D}\u{1F44D}",$)});break;case 75<l:h=n("span",{children:N("Super! \u{1F525}\u{1F525}\u{1F525}",$)});break;default:h=!1}return n(_n,{children:n(zn,{title:o,className:"aioseo-headline-analyzer-panel-tab-new-score",children:n(Sn,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:d("div",{className:"aioseo-headline-analyzer-new-score-panel",children:[d("p",{children:[De," ",Ee]}),d("h4",{children:["\u201C",a,"\u201D"]}),d("div",{className:"aioseo-headline-analyzer-pie-chart-container",children:[n("span",{className:p("aioseo-headline-analyzer-new-score",s),children:l}),n(Oe,{barScore:l,color:c}),d("span",{className:p("aioseo-headline-analyzer-score-difference",s),children:[l>i?"+ ":l===i?"":"- ",f]}),h&&n("div",{className:p("aioseo-headline-analyzer-score-status",s),children:h})]}),d("div",{className:"current-score",children:[n("span",{className:p("aioseo-headline-analyzer-score",w),children:i}),d("div",{className:"aioseo-headline-analyzer-current-score-content",children:[n("h5",{children:r}),n("p",{children:t})]})]})]})})})})})},{__:le}=window.wp.i18n,{Fragment:Pn,useState:Nn,useEffect:$n}=window.wp.element,xn=e=>{const t=le("Current Score","all-in-one-seo-pack"),o=le("Try New Headline","all-in-one-seo-pack"),[r,a]=Nn("current-score"),l=()=>a("current-score"),i=()=>a("new-headline"),s=typeof e.analyzer.isNewData<"u"?e.analyzer.isNewData:!1;return $n(()=>{e.setAnalyzer({activeTab:r})},[r]),d(Pn,{children:[d("div",{className:"aioseo-inline-buttons",children:[n("button",{onClick:l,className:p("aioseo-switcher-button",{active:r==="current-score"}),children:t}),n("button",{onClick:i,className:p("aioseo-switcher-button",{active:r==="new-headline"}),children:o})]}),r==="new-headline"?n(J,{children:n(Cn,{analyzer:e.analyzer,setAnalyzer:e.setAnalyzer})}):n(mn,{analyzer:e.analyzer}),s?n(kn,{analyzer:e.analyzer}):""]})},{__:Hn}=window.wp.i18n,{Fragment:On}=window.wp.element,{PanelBody:Dn,PanelRow:En}=window.wp.components,Fn=e=>{const t=Hn("Previous Scores","all-in-one-seo-pack"),o=e.analyzer.previousHeadlinesData!=="undefined"?e.analyzer.previousHeadlinesData:[],r=document.querySelector(".edit-post-sidebar"),l=(e.analyzer.activeTab!=="undefined"?e.analyzer.activeTab:"current-score")==="current-score"?390:300,i=s=>{e.setAnalyzer({newHeadlineData:o[s],headlineData:o[s],newHeadline:o[s].sentence,isNewData:!0}),r&&(r.scrollTop=l)};return n(On,{children:n(Dn,{title:t,className:"aioseo-headline-analyzer-panel-previous-scores",children:n(En,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:n("ul",{className:"aioseo-headline-analyzer-previous-scores",children:o.map((s,c)=>{if(10>c&&(typeof s.sentence<"u"||typeof s.score<"u")){const w=40>s.score?"red-bg":60>=s.score?"orange-bg":"green-bg";return d("li",{onClick:()=>i(c),children:[n("span",{className:p("aioseo-headline-analyzer-score",w),children:s.score}),n("span",{className:"aioseo-headline-analyzer-score-text",children:s.sentence})]},c)}return null})})})})})})},{__:Tn}=window.wp.i18n,L=e=>{const t=Tn("Goal: ","all-in-one-seo-pack"),o={width:e.value+"%"};return d("div",{className:"aioseo-headline-analyzer-words-block",children:[n("h5",{children:e.title}),d("div",{className:"aioseo-headline-analyzer-words-block-data",children:[d("span",{className:p("aioseo-headline-analyzer-words-block-percentage",e.classOnScore),children:[e.value,"%"]}),d("span",{className:p("aioseo-headline-analyzer-words-block-percentage-right-column",e.classOnScore),children:[d("span",{className:"aioseo-headline-analyzer-words-block-goal",children:[t," ",e.goalValue]}),d("span",{className:"aioseo-headline-analyzer-words-block-progressbar",children:[n("span",{className:"aioseo-headline-analyzer-progressbar-bg"}),n("span",{className:p("aioseo-headline-analyzer-progressbar-part",e.classOnScoreBg),style:o})]})]})]}),n("ul",{className:"aioseo-headline-analyzer-words-tag-list",children:0<e.words.length?e.words.map((r,a)=>n("li",{children:r},a)):""}),n("p",{className:"aioseo-headline-analyzer-words-guideline",children:e.guideLine})]})},{__:m}=window.wp.i18n,{Fragment:Rn}=window.wp.element,{PanelBody:Wn,PanelRow:An}=window.wp.components,y="all-in-one-seo-pack",Ln=e=>{const t=m("Word Balance",y),o=m("Compare the percentages of your results to the goal for each category and adjust as necessary.",y),r=e.data.score,a=40>e.data.score?"red":60>=e.data.score?"orange":"green",l=e.data.result.commonWordsPercentage===0?"red":.2>e.data.result.commonWordsPercentage?"orange":"green",i=e.data.result.commonWordsPercentage===0?"red-bg":.2>e.data.result.commonWordsPercentage?"orange-bg":"green-bg",s=.2>e.data.result.commonWordsPercentage?m("Your headline would be more likely to get clicks if it had more common words.",y):m("Headlines with 20-30% common words are more likely to get clicks.",y),c=e.data.result.uncommonWordsPercentage===0?"red":.1>e.data.result.uncommonWordsPercentage?"orange":"green",w=e.data.result.uncommonWordsPercentage===0?"red-bg":.1>e.data.result.uncommonWordsPercentage?"orange-bg":"green-bg",f=.1>e.data.result.uncommonWordsPercentage?m("Your headline would be more likely to get clicks if it had more uncommon words.",y):m("Headlines with uncommon words are more likely to get clicks.",y),h=e.data.result.emotionalWordsPercentage===0?"red":.1>e.data.result.emotionalWordsPercentage?"orange":"green",v=e.data.result.emotionalWordsPercentage===0?"red-bg":.1>e.data.result.emotionalWordsPercentage?"orange-bg":"green-bg",Fe=m("Emotionally triggered headlines are likely to drive more clicks.",y),Te=e.data.result.powerWords.length===0?"orange":"green",Re=e.data.result.powerWords.length===0?"orange":"green-bg",We=m("Headlines with power words are more likely to get clicks.",y),Ae=m("Common Words",y),Le=m("20-30%",y),Be=m("Uncommon Words",y),Me=m("10-20%",y),je=m("Emotional Words",y),Ve=m("10-15%",y),Ie=m("Power Words",y),Ze=m("At least one",y);let P;switch(!0){case 25>r:P=n("span",{children:m("Not Looking Great",y)});break;case 50>r:P=n("span",{children:m("Could Be Better",y)});break;case 60>r:P=n("span",{children:m("Getting There",y)});break;case 75>r:P=n("span",{children:m("Looks Good! \u{1F44D}\u{1F44D}",y)});break;case 75<r:P=n("span",{children:m("Super! \u{1F525}\u{1F525}\u{1F525}",y)});break;default:P=!1}return n(Rn,{children:n(Wn,{title:t,className:p("aioseo-headline-analyzer-panel-word-balance","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:d(An,{children:[d("div",{className:"aioseo-headline-analyzer-words-block",children:[n("h4",{children:P}),n("p",{children:o})]}),n(L,{title:Ae,value:Math.round(e.data.result.commonWordsPercentage*100),goalValue:Le,words:e.data.result.commonWords,guideLine:s,classOnScore:l,classOnScoreBg:i}),n(L,{title:Be,value:Math.round(e.data.result.uncommonWordsPercentage*100),goalValue:Me,words:e.data.result.uncommonWords,guideLine:f,classOnScore:c,classOnScoreBg:w}),n(L,{title:je,value:Math.round(e.data.result.emotionalWordsPercentage*100),goalValue:Ve,words:e.data.result.emotionWords,guideLine:Fe,classOnScore:h,classOnScoreBg:v}),n(L,{title:Ie,value:Math.round(e.data.result.powerWordsPercentage*100),goalValue:Ze,words:e.data.result.powerWords,guideLine:We,classOnScore:Te,classOnScoreBg:Re})]})})})},{__:C}=window.wp.i18n,{Fragment:Bn}=window.wp.element,{PanelBody:Mn,PanelRow:jn}=window.wp.components,_="all-in-one-seo-pack",Vn=e=>{const t=C("Your headline has a neutral sentiment.",_),o=C("Headlines that are strongly positive or negative tend to get more engagement then neutral ones.",_),r=C("Your headline has a positive sentiment.",_),a=C("Positive headlines tend to get better engagement than neutral or negative ones.",_),l=C("Your headline has a negative sentiment.",_),i=C("Negative headlines are attention-grabbing and tend to perform better than neutral ones.",_),s=C("Sentiment",_),c=e.data.result.sentiment==="neu"?C("Neutral",_):e.data.result.sentiment==="pos"?C("Positive",_):C("Negative",_),w=e.data.result.sentiment==="neu"?g.neutral:e.data.result.sentiment==="pos"?g.smile:g.negative,f=e.data.result.sentiment==="neu"?"orange":e.data.result.sentiment==="pos"?"green":"red";return n(Bn,{children:n(Mn,{title:s,className:p("aioseo-headline-analyzer-panel-sentiment","aioseo-headline-analyzer-panel-has-icon",f),icon:w,children:n(jn,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[n("h4",{children:c}),e.data.result.sentiment==="neu"?d("p",{children:[n("strong",{children:t}),n("br",{}),o]}):"",e.data.result.sentiment==="pos"?d("p",{children:[n("strong",{children:r}),n("br",{}),a]}):"",e.data.result.sentiment==="neg"?d("p",{children:[n("strong",{children:l}),n("br",{})," ",i]}):""]})})})})},{__:In}=window.wp.i18n,{Fragment:Zn}=window.wp.element,{PanelBody:Un,PanelRow:Gn}=window.wp.components,qn=e=>{const t=e.data.result.headlineTypes.join(", "),o=In("Headline Type","all-in-one-seo-pack");return n(Zn,{children:n(Un,{title:d("span",{className:"aioseo-headline-analyzer-panel-types-title",children:[o,n("span",{children:t})]}),className:"aioseo-headline-analyzer-panel-types",children:n(Gn,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[n("h4",{children:t}),n("p",{dangerouslySetInnerHTML:{__html:dn}})]})})})})},{__:x}=window.wp.i18n,{Fragment:Yn}=window.wp.element,{PanelBody:Jn,PanelRow:Kn}=window.wp.components,H="all-in-one-seo-pack",Qn=e=>{const t=x("Character Count",H),o=e.data.result.length,r=o.toString();let a="",l="",i="",s="";if(r.length===1&&(s=`<span class="character-zero">0</span><span class="character-zero">0</span><span>${o}</span>`),r.length===2){s='<span class="character-zero">0</span>';for(const c of r)s+=`<span>${c}</span>`}if(o.toString().length===3)for(const c of r)s+=`<span>${c}</span>`;return 19>=o?a="red":20<=o&&34>=o?a="orange":35<=o&&66>=o?a="green":67<=o&&79>=o?a="orange":80<=o&&(a="red"),34>=o?(l=x("Too Short \u{1F643}",H),i=x("You have space to add more keywords and power words to boost your rankings and click-through rate.",H)):35<=o&&66>=o?(l=x("Good \u{1F642}",H),i=x("Headlines that are about 55 characters long will display fully in search results and tend to get more clicks.",H)):67<=o&&(l=x("Too Long \u{1F611}",H),i=x("At this length, it will get cut off in search results. Try reducing it to about 55 characters.",H)),n(Yn,{children:n(Jn,{title:t,className:p("aioseo-headline-analyzer-panel-character-count","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:n(Kn,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[d("div",{className:"aioseo-headline-analyzer-character-count-container",children:[n("span",{className:"aioseo-headline-analyzer-status-on-character-length",children:l}),n("span",{className:p("aioseo-headline-analyzer-character-length",a),dangerouslySetInnerHTML:{__html:s}})]}),n("p",{children:i})]})})})})},{__:S}=window.wp.i18n,{Fragment:Xn}=window.wp.element,{PanelBody:ea,PanelRow:na}=window.wp.components,k="all-in-one-seo-pack",aa=e=>{const t=S("Word Count",k),o=e.data.result.wordCount,r=o.toString();let a="",l="",i="",s="";if(r.length===1&&(s=`<span class="character-zero">0</span><span class="character-zero">0</span><span>${o}</span>`),r.length===2){s='<span class="character-zero">0</span>';for(const c of r)s+=`<span>${c}</span>`}if(r.length===3)for(const c of r)s+=`<span>${c}</span>`;return 4>=o?(a="red",l=S("Not Enough Words \u{1F643}",k),i=S("Your headline doesn\u2019t use enough words. You have more space to add keywords and power words to improve your SEO and get more engagement.",k)):5<=o&&9>=o?(a="green",l=S("Good \u{1F642}",k),i=S("Your headline has the right amount of words. Headlines are more likely to be clicked on in search results if they have about 6 words.",k)):10<=o&&11>=o?(a="orange",l=S("Reduce Word Count \u{1F642}",k)):(a="red",l=S("Too Many Words \u{1F611}",k),i=S("Your headline has too many words. Long headlines will get cut off in search results and won\u2019t get as many clicks.",k)),n(Xn,{children:n(ea,{title:t,className:p("aioseo-headline-analyzer-panel-word-count","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:n(na,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[d("div",{className:"aioseo-headline-analyzer-word-counter",children:[n("span",{className:"aioseo-headline-analyzer-status-on-word-length",children:l}),n("span",{className:p("aioseo-headline-analyzer-word-length",a),dangerouslySetInnerHTML:{__html:s}})]}),n("p",{children:i})]})})})})},{__:B}=window.wp.i18n,{Fragment:ta}=window.wp.element,{PanelBody:oa,PanelRow:ra}=window.wp.components,M="all-in-one-seo-pack",la=e=>{const t=B("Beginning & Ending Words",M),o=e.data.result.originalExplodedHeadline,r=B("Most readers only look at the first and last 3 words of a headline before deciding whether to click.",M);let a="",l="";return 6<=o.length?(a=o.slice(0,3).join(" "),l=o.slice(-3).join(" ")):3<o.length&&5>=o.length?(a=o.slice(0,3).join(" "),l=o.slice(3).join(" ")):a=o.slice(0,3).join(" "),n(ta,{children:n(oa,{title:t,className:"aioseo-headline-analyzer-panel-beginning-ending-words",children:n(ra,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[a?d(J,{children:[n("ul",{className:"aioseo-headline-analyzer-word-begining-title",children:n("li",{children:B("Beginning Words",M)})}),n("div",{className:"aioseo-headline-analyzer-words beginning",children:n("span",{children:a})})]}):"",l?d(J,{children:[n("ul",{className:"aioseo-headline-analyzer-word-ending-title",children:n("li",{children:B("Ending Words",M)})}),n("div",{className:"aioseo-headline-analyzer-words ending",children:n("span",{children:l})})]}):"",n("p",{className:"aioseo-headline-analyzer-words-guideline",children:r})]})})})})},{__:se}=window.wp.i18n,{Fragment:sa}=window.wp.element,{PanelBody:ia,PanelRow:ca}=window.wp.components,{select:da}=window.wp.data,ua=e=>{const t=se("Search Preview","all-in-one-seo-pack"),o=se("Here is how your headline will look like in Google search results page.","all-in-one-seo-pack"),r=da("core/editor").getPermalink();return n(sa,{children:n(ia,{title:t,className:"aioseo-headline-analyzer-panel-search-preview",children:n(ca,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:d("div",{className:"aioseo-headline-analyzer-search-prevew-wrap",children:[n("p",{className:"aioseo-headline-analyzer-post-url",children:n("a",{...{href:r},target:"_blank",children:r})}),n("h4",{children:e.data.sentence}),n("p",{children:o})]})})})})})};const{__:ie}=window.wp.i18n,{Fragment:ha,useState:fa,useEffect:wa}=window.wp.element,{registerPlugin:ma}=window.wp.plugins,{PluginSidebar:ya,PluginSidebarMoreMenuItem:pa}=window.wp.editPost,{select:Y}=window.wp.data,ce="all-in-one-seo-pack";let de;const ga=(e,t)=>((...o)=>{const r=()=>e(...o);clearTimeout(de),de=setTimeout(r,t)}).call(),va=()=>{let e=Y("core/editor").getEditedPostAttribute("title");const t=()=>{if(!e){l({...a,...{dataExist:!1}});return}Ne(window.aioseo.nonce).post(xe("analyze_headline")).send({headline:e,shouldStoreHeadline:!1}).then(f=>{const h={dataExist:!1},v=JSON.parse(f.body[Object.keys(f.body)[0]]);v.analysed&&(h.currentHeadlineData=v,h.headlineData=v,h.dataExist=!0,typeof a.headlineData<"u"&&(h.previousHeadlinesData=[a.headlineData,...i])),l({...a,...h})}).catch(f=>{l({...a,...{dataExist:!1}}),console.log("Couldn't fetch score for headline:",f)})};wa(()=>t(),[]),window.wp.data.subscribe(()=>{e!==Y("core/editor").getEditedPostAttribute("title")&&(e=Y("core/editor").getEditedPostAttribute("title"),ga(()=>t(),2e3))});const o=ie("SEO Headline Analyzer",ce),r=ie("Write your post title to see the analyzer data. This Headline Analyzer tool enables you to write irresistible SEO headlines that drive traffic, shares, and rank better in search results.",ce),[a,l]=fa({}),i=typeof a.previousHeadlinesData<"u"?a.previousHeadlinesData:[],s=document.querySelector(`.components-button[aria-label='${o}'] svg`);if(s){const f=document.createElement("span");if(a.dataExist&&typeof a.currentHeadlineData.score<"u"){const h=a.currentHeadlineData.score,v=40>h?"red":60>=h?"orange":"green";s.parentNode.setAttribute("aioseo-button-color",v),s.nextElementSibling?s.nextElementSibling.innerHTML=`${h}/100`:(f.innerHTML=`${h}/100`,s.parentNode.insertBefore(f,s.nextSibling))}else s.parentNode.setAttribute("aioseo-button-color","red"),s.nextElementSibling?s.nextElementSibling.innerHTML="00/100":(f.innerHTML="00/100",s.parentNode.insertBefore(f,s.nextSibling))}const c=document.querySelector(".aioseo-headline-analyzer-wrapper");if(c){const f=c.parentNode.querySelectorAll(".components-panel__header");f&&f.forEach(function(h){const v=h.querySelector(".interface-complementary-area__pin-unpin-item");v&&v!==null&&(v.style.display="none")})}const w=f=>{l({...a,...f})};return d(ha,{children:[n(pa,{target:"aioseo-headline-analyzer",children:o}),d(ya,{name:"aioseo-headline-analyzer",title:o,className:"aioseo-headline-analyzer-wrapper",children:[typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(xn,{analyzer:a,setAnalyzer:w}):n("p",{className:"aioseo-headline-analyzer-empty-title-warning",children:r}),typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed&&0<i.length?n(Fn,{analyzer:a,setAnalyzer:w}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Ln,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Vn,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(qn,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Qn,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(aa,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(la,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(ua,{data:a.headlineData}):"",n("div",{className:"aioseo-headline-analyzer-bottom-notice",children:n("p",{dangerouslySetInnerHTML:{__html:un}})})]})]})};ma("aioseo-headline-analyzer",{icon:g.headline,render:va});
