4 lines
31 KiB
JavaScript
4 lines
31 KiB
JavaScript
|
!function(e){var t={};function a(l){if(t[l])return t[l].exports;var c=t[l]={i:l,l:!1,exports:{}};return e[l].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.m=e,a.c=t,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(l,c,function(t){return e[t]}.bind(null,c));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=249)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},153:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var l=a(0),c=a(2),n=a.n(c),r=a(1),o=a(5),s=a(8),i=a(9);function p(e){let{name:t,title:a,subtitle:c,usps:n,id:p,image:d,finishableSteps:m,finishedSteps:u,upsellLink:f,upsellText:h,workout:z,badges:E}=e;const{openWorkout:b,toggleWorkout:M}=Object(o.useDispatch)("yoast-seo/workouts"),w=Object(o.useSelect)(e=>e("yoast-seo/workouts").getActiveWorkout(),[]),[g,k]=Object(l.useState)(!1),v=z,O=d;Object(l.useEffect)(()=>{m&&u&&u.length===m.length?k(!0):k(!1)},[u,m]);const y=Object(l.useMemo)(()=>u&&0!==u.length?u.length<m.length?Object(r.__)("Continue workout!","wordpress-seo"):Object(r.__)("Do workout again","wordpress-seo"):Object(r.__)("Start workout!","wordpress-seo"),[u,m]),j=Object(l.useCallback)(()=>{b(t),g&&M(t)},[z,g,b,M]),F=Object(i.makeOutboundLink)(),B=h||Object(r.sprintf)(
|
||
|
/* translators: %s : Expands to the add-on name. */
|
||
|
Object(r.__)("Unlock with %s!","wordpress-seo"),"Premium"),A=z?"":" card-disabled";return Object(l.createElement)(l.Fragment,null,!w&&Object(l.createElement)("div",{id:p,className:"card card-small"+A},Object(l.createElement)("h2",null,a," ",E),Object(l.createElement)("h3",null,c),Object(l.createElement)("div",{className:"workout-card-content-flex"},Object(l.createElement)("ul",{id:p+"-usp-list",className:"yoast-list--usp"},n.map((e,t)=>Object(l.createElement)("li",{id:`${p}-usp-${t}`,key:`${p}-${t}`},e))),d&&Object(l.createElement)(O,null)),Object(l.createElement)("span",null,z&&Object(l.createElement)(s.NewButton,{id:p+"-action-button",className:"yoast-button yoast-button--"+(g?"secondary":"primary"),onClick:j},y),!z&&Object(l.createElement)(F,{id:p+"-upsell-button",href:f,className:"yoast-button yoast-button-upsell","data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"},B,Object(l.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})),m&&u&&Object(l.createElement)("div",{className:"workout-card-progress"},Object(l.createElement)(s.ProgressBar,{id:p+"-progress",max:m.length,value:u.length}),Object(l.createElement)("label",{htmlFor:p+"-progress"},Object(l.createElement)("i",null,Object(r.sprintf)(// translators: %1$s: number of finished steps, %2$s: number of finishable steps
|
||
|
Object(r.__)("%1$s/%2$s steps completed","wordpress-seo"),u.length,m.length)))))),z&&w===t&&Object(l.createElement)(v,null))}p.propTypes={name:n.a.string.isRequired,title:n.a.string.isRequired,subtitle:n.a.string.isRequired,usps:n.a.arrayOf(n.a.string).isRequired,id:n.a.string,finishableSteps:n.a.arrayOf(n.a.string),finishedSteps:n.a.arrayOf(n.a.string),image:n.a.func,upsellLink:n.a.string,upsellText:n.a.string,workout:n.a.func,badges:n.a.arrayOf(n.a.element)},p.defaultProps={id:"",finishableSteps:null,finishedSteps:null,image:null,upsellLink:null,upsellText:null,workout:null,badges:[]}},2:function(e,t){e.exports=window.yoast.propTypes},210:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var l,c=a(0),n=a(2),r=a.n(n),o=a(1),s=a(5),i=a(153),p=a(3);function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(this,arguments)}function m(e){return p.createElement("svg",d({viewBox:"0 0 296 317",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),l||(l=p.createElement("g",{transform:"matrix(-1 0 0 1 295.274 .96)",fill:"none"},p.createElement("circle",{fill:"#F0ECF0",cx:131.18,cy:184.261,r:131.18}),p.createElement("g",{fill:"#EAB881"},p.createElement("path",{d:"M236.42 96.56c-.15-.43-.29-.87-.44-1.3.15.43.29.87.44 1.3zm-31.98 59.96a11 11 0 00-2.11.82c.67-.3 1.4-.56 2.11-.82zm-2.11.82a58.65 58.65 0 00-6 2.81c2.67-1.11 4.56-2.11 6-2.81z"}),p.createElement("path",{d:"M293.49 164.27c-8.58-10.51-1.05-27.75-34.52-86.31-3-5.22-5.26-14.52-12.85-17.58-9.11-3.67-12.77-9.16-21.89-12.83-6.85-2.76-4-1.36-3.21-.49 1.49 1.67-2-1.31-5.72 7.13-.38.85 2.86 1.63 4 5 .36 1.07.49 1.14 1.23 1.33 4.71 1.2 6.52 6.89 4.2 10.06-.7-1.43.18-6-4.68-6.36 2 1.44 4.06 3.42 4 5.88 9.4 16.64 17.56 14 20 15 12.43 4.92-17.28 64.57 23 86.13-7.34-1.94-14.31-5.46-23.92-1.33 7.28-5.53 2.46-7.57.86-10.89-2.17-2.92-2.29-11.71-2.6-22.62a103.2 103.2 0 001.09 20.32 54.8 54.8 0 00-38-.12c5.19-1.21 15.45 48.34 20.15 53.9 3.8-1.4 23-8.57 35.17-14.11 21.52-9.81 34.94-25.76 35.44-28.31.24-1.47-.85-2.71-1.75-3.8zm-41.62-99.13c.06.1 8.87 19.59.56 1.21-.2-.44-.38-.84-.56-1.21z"}),p.createElement("path",{d:"M215.17 56.04c.46.17 2 1.49-.23-.93-.88 2.39-.6 4.42 2 6.74 1.06-3 0-3.51-1.77-5.81zm-4.33 23.82c.28-.07.36.05-.35-.38l.35.38z"})),p.createElement("path",{d:"M203.74 73.77c0 .4-.33-.06 2.94 2.38l-2.94-2.38zm5.26 4.27c2.3 2 3.13 2.53 2.19 1.77L209 78.04zm6.17-22c.05.06 1.79 2.31 1.83 2.38-.49-1.27-.83-2.01-1.83-2.38zm-.52 11.73c1.38-.08.73 1.34 2.16-.5.52-.67 1.91-3.21.71-2.6.56-2.33-.09-6.71-.19-4.75-.13 2.46-3.7 10.77-8.67 9.87a7.6 7.6 0 003.25.22c2.74-.39 2.36-.97 2.74-2.24zm-5.99 2.02a6.27 6.27 0 01-1.42-.59c.42.309.906.51 1.42.59z",fill:"#D38053"}),p.createElement("path",{d:"M214.2 69.33a4.13 4.13 0 01-.85 3.73c3.38-1.27 3.66-3.51 2.48-4.78-1.18-1.27-1.34.03-1.63 1.05zm-32.31 1.85c.11.84 2.61 2.33 3.3 2.78a13.33 13.33 0 01-3.3-2.78zm10 4.39c-.21.13-.45.1.31 0-.28-.12-.13-.1-.31 0zm-6.51-1.53a29.79 29.79 0 004.51 2.28c2.54-1.52.8.82-4.51-2.28z",fill:"#D38053"}),p.createElement("path",{d:"M202.61 77.13c-.91.35-5.67.26-10.41-1.57-6.74 1-6.41 12.08-1 12.4 8.18.48 10.11 3 13.48 1.92 6.82-2.28 2.4-11.62-2.07-12.75z",fill:"#EAB881"}),p.createElement("path",{d:"M217.52 64.67a4.92 4.92 0 012.54-.48c4.87.36 4 5 4.68 6.36 2.31-3.16.52-8.86-4.2-10.06-2.25-.57.56-2.91-7.86-7.27a10.79 10.79 0 014.84 11.45zm15.23 112.51c-6.79 1.78-17.9 1.65-21-5.2 3.71 11.1 9 26.86 12.86 37.68 2.88-.89 7.41-1.86 8.89-3.4-3.52-4.16-8.67-10.41-8.74-15.89-.07-5.48 2.92-11.16 7.99-13.19zm-26.31-20.36c-.14.17-.15 0 .53 1.27-.18-.46-.35-.89-.53-1.27z",fill:"#D38053"}),p.createElement("path",{d:"M246.11 86.55c-2.26-3.64-4.21.58 2.23-3.3-10.49 4.56-18.5-2.9-24.34-13.21-.05 1.82-1.23 3.13-2.61 4.36-9.64 8.64-10.89 4.95-12.39 3.64-8-7-3.86-2.44-6.09-1-.71.46 4.08 1 5.31 7.11a5.26 5.26 0 01-2.67 5.38c7.41 5.8 14.7 2.46 25.68-4.09 14.67 22.17 7.38 66.27 12.78 73.54 1.6 3.32 6.42 5.36-.86 10.89 9.61-4.13 16.58-.61 23.92 1.33-37.63-20.16-14.29-73.91-20.96-84.65z",fill:"
|